SEGA SATURN TECHNICAL BULLETIN # 4 5(PRELIMINARY)
To:

Sega and Third Party Developers

From:

Developer Technical Support

Date:

July 10, 1996

Re:

Saturn Keyboard Data Format Ver.1.00

Table 1 Keyboard Data Format
bit7bit6
SATURN Peripheral00
ID
1st Data
Right
Left
2nd Data
RTRG
XTRG
3rd Data
4th Data

0D7

CapsLockD6bit51bit41bit30

Down
YTRG

Up
ZTRG

Start
LTRG

NumLock
D5

ScrLock
D4MakeD3bit21bit10

ATRG
CTRG
KB TYPE2 KB TYPE11
D21
D1bit00
BTRG
KB
TYPE0BreakD0• Saturn peripheral ID = 34H• Saturn peripheral type: 3H• Data size: 4H (4 bytes)• Description of data
• KB TYPE2-0: 000B = Saturn keyboard, 001B-110B = Reserved, 111B =Not recognized as keyboard.
• CapsLock: Outputs 1 while CapsLock is locked.
• NumLock: Outputs 1 while NumLock is locked.
• ScrLock: Outputs 1 while ScrLock is locked.
• Make: Outputs 1 when there is a valid Make code in D7-D0.
• Break: Outputs 1 when there is a valid Break code in D7-D0.
• D7-D0: Key code. Undefined except when Make or Break is 1. Keys
and key codes are explained in the table "Meaning of Key Codes"
below• Right, Left, Down, Up, Start: Output 0 while the button (key) isdepressed.
• ATRG, BTRG, CTRG, XTRG, YTRG, ZTRG, LTRG, RTRG
• Relationship between buttons and keys
• The following shows the relationship between standard Sega Saturnpad buttons and the keyboard.

• Right: [→] key• CTRG: [C] key• Left: [←] key• XTRG: [A] key• Down: [↓] key• YTRG: [S] key• Up: [↑] key• ZTRG: [D] key• Right: [ESC] key• LTRG: [Q] key• ATRG: [Z] key• RTRG: [E] key• BTRG: [X] key• Flag changes for the CapsLock, Scroll, and NumLock keys
• The following shows how the flags change for the CapsLock,ScrLock, and NumLock keys.

Make
Flag setting forvarious lock keys

0Break Make
1

Break0Make Break1

• Key Hitting Characteristics (Make or Break action)
Sends keycodes sequentially upon a roll over. Code is also sent sequentiallywhen a key is released. When a wraparound produced by hitting two or more
keys at once is detected, however, it waits until that status is cleared.
1)
KEY1

When no wraparound occurs
ON

KEY2

OFFONOFFKEY3ONOFF

KeycodeTransmitted
KEY1Make
2)

KEY2
Make

KEY3Make

KEY1
Break

KEY2
Break

KEY3
Break

When a wraparound occurs

KEY1

ON

KEY2

OFFON

KEY3

ON

OFF

ON

KeycodeTransmitted
KEY1MakeKEY2Make

KEY3
Make

KEY1 KEY3
Break BreakWraparoundoccurs
3)

WraparoundclearedRepeat function (on all keys)
KEY1

ONOFFON

KEY2
TS

KeycodeTransmittedKEY1MakeTRTRTR

KEY1 KEY1 KEY1 KEY1MAKE Make Make MakeTS

KEY2 KEY1Make BreakTR

KEY2Make• The Make code is transmitted as long as the key is depressed. Whenanother key is pressed, a new repeat cycle begins.

Meaning of Key Codes
0123F9F500HAlt
Shift
10H
CX
D20H
NB
H
30H
<KI
40H
_:
50H
60H
70H
Ins Pause F780H

4567F3Ctrl
EGO
@F1Q
4Y0^

F21369F12AltPrint

Del89F10A

F8CtrlZFSpaceVM>?
CapsL Shift EnterBack\EscF11← Home End↑↓BCDEF6S

F4ATU;

TabW
R7P]

258-Down→JL[ScrLUp• Positions of duplicated keys
• 11H [Alt key] is on the left of the keyboard• 17H [Alt key] is on the right of the keyboard• 12H [Shift key] is on the left of the keyboard• 59H [Shift key] is on the right of the keyboard• 14H [Ctrl key] is on the left of the keyboard• 18H [Ctrl key] is on the right of the keyboard

F