Peripheral 1 Register

From SpecNext official Wiki
Revision as of 20:38, 20 December 2018 by wiki>Ped7g (Updating joystick configuration by the "TBBLUE SD Distribution v.0.8e" changelog)
Jump to: navigation, search
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 6,7,8,9,0)
%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 1,2,3,4,5)
%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))

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).

"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