Kempston Joystick: Difference between revisions

From SpecNext Wiki
Jump to: navigation, search
Ped7g (talk | contribs)
core 3.1.4 changes/refresh
Em00k (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Port
{{Port
|Number=$xx1F
|Number=$xx1F
|ShortDesc=Reads movement of joysticks using Kempston interface.
|NumberDec=31
|PortMask=%---- ---- 0001 1111
|ShortDesc=Reads movement of joysticks using Kempston (Joystick/Gamepad) interface.
|Readable=Yes
|Readable=Yes
|Writable=No
|Writable=No
|Subsystem=Input
|Subsystem=Input
|PortMask=%---- ---- 0001 1111
}}
}}
{| class="wikitable"
{| class="wikitable"

Latest revision as of 09:35, 10 September 2025

Number PortNumber::$xx1F
Decimal NumberDec::31
Short desc. ShortDesc::Reads movement of joysticks using Kempston (Joystick/Gamepad) interface.
Bit Mask PortMask::%---- ---- 0001 1111
Readable Readable::Yes
Writable Writable::No
Subsystem Subsystem::Input
Bit Function
Kempston joystick MD controller
7 0 start button
6 0 A button
5 Fire 2 C button
4 Fire 1 B button
3 up
2 down
1 left
0 right

For all bits 0 = not pressed / 1 = pressed

since core3.1.4 the X/Y/Z/mode buttons of 6-button controllers are not read by the FPGA (and Fire 1 is "B" button, this page and some other documentation was mentioning button "C", but seems like it was "B" all the time, or got remapped in core3.1.4).

Note for non-programmers: the Next board does read fire1(B)/fire2(C)/A/start buttons of controller and provide the state for SW through this port, but that does not imply the SW will react to the extra buttons. Actually majority of legacy SW was not aware of existence of joysticks with more than one fire button, the "fire2" input in Kempston interface did appear very late in the life cycle of ZX when game producers already moved onto more modern platforms. So support for second fire button or full four button of MD pads needs to be present also in the code of the particular game, either patched version of legacy game, or new production designed for ZX Next.