Difference between revisions of "Kempston Joystick 2, Joystick I/O"
From SpecNext official Wiki
m (Ped7g moved page Kempston Joystick 2 to Kempston Joystick 2, Joystick I/O: core3.1.4 adds I/O mode on joystick ports) |
(core 3.1.4 changes/refresh) |
||
Line 1: | Line 1: | ||
{{Port | {{Port | ||
|Number=$xx37 | |Number=$xx37 | ||
− | |ShortDesc= | + | |ShortDesc=Kempston interface second joystick variant and controls joystick I/O. |
|Readable=Yes | |Readable=Yes | ||
− | |Writable= | + | |Writable=Yes |
|Subsystem=Input | |Subsystem=Input | ||
− | |||
}} | }} | ||
+ | For READ functionality the details are identical with {{PortNo|$xx1F}} | ||
+ | |||
+ | Since core3.1.4 (but needs fixing, so 3.1.5 probably) there is option to do I/O operations through joystick ports. | ||
+ | |||
+ | The I/O mode should be set by writing this port first followed by enabling I/O mode on the joysticks with a write to {{NextRegNo|$05}}. | ||
+ | |||
+ | The WRITE functionality: | ||
+ | {| class="wikitable" | ||
+ | ! Bit !! Function | ||
+ | |- | ||
+ | | 7-6 || select I/O mode: %00 = bit bang, %01 = clock, %10 = uart | ||
+ | |- | ||
+ | | 5-1 || Reserved must be 0 | ||
+ | |- | ||
+ | | 0 || parameter bit controls state of pin 7 on both joystick connectors: | ||
+ | bit bang: bit 0 is copied to pin 7<br> | ||
+ | clock: 0 = place slow clock on pin 7 (Fsys/2048 = 13.672kHz), 1 = place fast clock on pin 7 (Fsys/8 = 3.5MHz) †<br> | ||
+ | uart: 0 = redirect esp uart to joystick connector, 1 = redirect pi uart to joystick connector (Tx appears on pin 7, Rx taken from pin 9) | ||
+ | |} | ||
+ | |||
+ | † A runt clock pulse may appear in the first cycle, minimum pulse width is 1/Fsys = 35.7ns |
Revision as of 10:19, 15 April 2020
Number | $xx37 |
---|---|
Decimal | |
Short desc. | Kempston interface second joystick variant and controls joystick I/O. |
Bit Mask | |
Readable | Yes |
Writable | Yes |
Subsystem | Input |
For READ functionality the details are identical with Kempston Joystick ($xx1F / 31)
Since core3.1.4 (but needs fixing, so 3.1.5 probably) there is option to do I/O operations through joystick ports.
The I/O mode should be set by writing this port first followed by enabling I/O mode on the joysticks with a write to Peripheral 1 Register ($05).
The WRITE functionality:
Bit | Function |
---|---|
7-6 | select I/O mode: %00 = bit bang, %01 = clock, %10 = uart |
5-1 | Reserved must be 0 |
0 | parameter bit controls state of pin 7 on both joystick connectors:
bit bang: bit 0 is copied to pin 7 |
† A runt clock pulse may appear in the first cycle, minimum pulse width is 1/Fsys = 35.7ns