Difference between revisions of "Peripheral 1 Register"

From SpecNext official Wiki
Jump to: navigation, search
(core 3.0 changes)
(core 3.1.3 changes/refresh)
Line 27: Line 27:
 
! Code !! Effect
 
! Code !! Effect
 
|-
 
|-
| %000 || Sinclair Joystick 2 (maps to keys 6,7,8,9,0)
+
| %000 || Sinclair Joystick 2 (maps to keys 1,2,3,4,5)
 
|-
 
|-
 
| %001 || Kempston Joystick 1 (uses port {{PortNo|$xx1F}})
 
| %001 || Kempston Joystick 1 (uses port {{PortNo|$xx1F}})
Line 33: Line 33:
 
| %010 || Cursor Joystick (maps to keys 5,6,7,8,0)
 
| %010 || Cursor Joystick (maps to keys 5,6,7,8,0)
 
|-
 
|-
| %011 || Sinclair Joystick 1 (maps to keys 1,2,3,4,5)
+
| %011 || Sinclair Joystick 1 (maps to keys 6,7,8,9,0)
 
|-
 
|-
 
| %100 || Kempston Joystick 2 (uses port {{PortNo|$xx37}})
 
| %100 || Kempston Joystick 2 (uses port {{PortNo|$xx37}})
Line 67: Line 67:
 
| 0 || Right
 
| 0 || Right
 
|}
 
|}
 +
 +
(core 3.1.1) the sinclair joystick modes are swapped, "sinclair 2" are keys 1,2,3,4,5 and "sinclair 1" are keys 6,7,8,9,0.

Revision as of 08:54, 30 March 2020

Number $05
Readable Yes
Writable Yes
Short Description Sets joystick mode, video frequency and Scandoubler.


Bit Function
7-6 Joystick 1 mode (LSB)
5-4 Joystick 2 mode (LSB)
3 Joystick 1 mode (MSB)
2 50/60 Hz mode (0 = 50Hz, 1 = 60Hz) (0 after a PoR or Hard-reset)
1 Joystick 2 mode (MSB)
0 Enable Scandoubler (1 = enabled) (1 after a PoR or Hard-reset)

Joystick modes are as follows:

Code Effect
%000 Sinclair Joystick 2 (maps to keys 1,2,3,4,5)
%001 Kempston Joystick 1 (uses port Kempston Joystick ($xx1F / 31))
%010 Cursor Joystick (maps to keys 5,6,7,8,0)
%011 Sinclair Joystick 1 (maps to keys 6,7,8,9,0)
%100 Kempston Joystick 2 (uses port Kempston Joystick 2, Joystick I/O ($xx37 / 55))
%101 MD 1 (3 or 6 button joystick port Kempston Joystick ($xx1F / 31))
%110 MD 2 (3 or 6 button joystick port Kempston Joystick 2, Joystick I/O ($xx37 / 55))

(core 2.0) Older version of this page warned about configuring at most one joystick as Kempston-1 and at most one as Cursor. The specnext.com refreshed documentation about ports does not warn about such limitation, but rather proceed with caution and avoid setting up both joysticks to the same type (unless somebody from core team clarifies this).

(core 3.0) both joysticks set to the same type is now confirmed as valid configuration. The result is combined readings from both joysticks to single output.

"MD" above refers to controllers compatible with SEGA Mega Drive system. The 6 (and 3) button variant is mapped onto Kempston port this way (mirroring XYZ buttons on the ABC buttons, so only 4 distinct buttons are supported):

Bit Joystick action
7 "start" button
6 A or X button
5 C or Z button
4 B or Y button
3 Up
2 Down
1 Left
0 Right

(core 3.1.1) the sinclair joystick modes are swapped, "sinclair 2" are keys 1,2,3,4,5 and "sinclair 1" are keys 6,7,8,9,0.