Difference between revisions of "Peripheral 1 Register"

From SpecNext official Wiki
Jump to: navigation, search
(Updating joystick configuration by the "TBBLUE SD Distribution v.0.8e" changelog)
Line 3: Line 3:
 
|Readable=Yes
 
|Readable=Yes
 
|Writable=Yes
 
|Writable=Yes
|ShortDesc=Sets joystick mode, video frequency, [[Scanlines]] and [[Scandoubler]].
+
|ShortDesc=Sets joystick mode, video frequency and [[Scandoubler]].
 
}}
 
}}
  
Line 9: Line 9:
 
! Bit !! Function
 
! Bit !! Function
 
|-
 
|-
| 7-6 || Joystick 1 mode
+
| 7-6 || Joystick 1 mode (LSB)
 
|-
 
|-
| 5-4 || Joystick 0 mode
+
| 5-4 || Joystick 2 mode (LSB)
 
|-
 
|-
| 3 || Reserved
+
| 3 || Joystick 1 mode (MSB)
 
|-
 
|-
| 2 || Enable 60hz mode
+
| 2 || 50/60 Hz mode (0 = 50Hz, 1 = 60Hz) (0 after a PoR or Hard-reset)
 
|-
 
|-
| 1 || Enable Scanlines
+
| 1 || Joystick 2 mode (MSB)
 
|-  
 
|-  
| 0 || Enable Scandoubler
+
| 0 || Enable Scandoubler (1 = enabled) (1 after a PoR or Hard-reset)
 
|}
 
|}
  
The codes for joystick modes are as follows:
+
Joystick modes are as follows:
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! Code !! Effect
 
! Code !! Effect
 
|-
 
|-
| 00 || Sinclair Joystick (Joystick 1 maps to keys 1,2,3,4,5; joystick 2 maps to keys 6,7,8,9,0)
+
| %000 || Sinclair Joystick 2 (maps to keys 6,7,8,9,0)
 
|-
 
|-
| 01 || Kempston Joystick (uses port {{PortNo|$xx1F}}). Only one joystick can be Kempston
+
| %001 || Kempston Joystick 1 (uses port {{PortNo|$xx1F}})
 
|-
 
|-
| 10 || Cursor Joystick (maps to keys 5,6,7,8,0). Only one joystick can be Cursor
+
| %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 {{PortNo|$xx37}})
 +
|-
 +
| %101 || MD 1 (3 or 6 button joystick port {{PortNo|$xx1F}})
 +
|-
 +
| %110 || MD 2 (3 or 6 button joystick port {{PortNo|$xx37}})
 +
|}
 +
 
 +
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):
 +
 
 +
{| class="wikitable"
 +
! 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
 
|}
 
|}

Revision as of 20:38, 20 December 2018

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