psx.wiki

Controller Protocol

Byte exchange between the console and controllers on SIO0.

This is an old revision of this page, as edited by RemmyLee at 02:46, 23 October 2026. Edit this revision | Latest revision

Summary

Controllers and Memory Cards communicate with the console through SIO0 by a synchronous serial protocol similar to SPI. There are no start, stop or parity bits. Unlike SPI, one byte is transferred at a time, and the device answers each byte on a separate line, /ACK, when it is ready for the next one.1 The controller page describes the devices and Sony's library view of them, and the SIO page describes the registers.

Because the transfer is synchronous, the console receives one byte from the device for every byte it sends. When the console has sent all its command bytes and still expects data, it sends dummy bytes to clock the replies in. The dummy bytes are normally 00h.1

Signals

A transfer begins when the console pulls /CS low for the port. It then clocks out the address byte, the command and the parameters on CMD while the device replies on DAT, and the device pulses /ACK after each byte that it wants to continue:2

      ____                                                              _____
/CS       \____________________________________________________________/
      ______        ____        ____        ____        ____        _________
SCK         ||||||||    ||||||||    ||||||||    ||||||||    ||||||||
      ____                                                              _____
CMD       '=[ Addr ]====[ Cmd  ]====[ Tap  ]====[Param ]====[Param ]==='
DAT   ---------------===[ IDlo ]====[ IDhi ]====[ Data ]====[ Data ]===------
      _______________   _________   _________   _________   _________________
/ACK                 |_|         |_|         |_|         |_|

psx-spx gives the following timing rules:2

Table 1: Controller signal timing
Item Value
Bit order Least significant bit first
Clock rate used by the kernel About 250 kHz
Clock polarity High when idle; data changes on the falling edge and is sampled on the next rising edge
/ACK pulse Low for at least 2 microseconds; no pulse after the last byte
Kernel timeout 100 microseconds after the last clock pulse without /ACK
Ignored /ACK Pulses within 2 to 3 microseconds (100 cycles) of the last clock pulse

A device must not respond when /CS goes low. It waits for the address byte and answers with /ACK and data only when the address is its own.2

Addressing

The first byte after /CS selects the device. All devices keep the data line idle until it has been sent, and the addressed device then pulls /ACK low to signal that it is present:3

Table 2: Device addresses
Device Address
Standard controller 01h
Yaroze Access Card 21h
Memory Card 81h

The reply to the address byte is not driven by any device and is ignored.1 The Memory Card page describes the commands after address 81h.

/ACK Interrupt

/ACK is wired to the DSR input of SIO0. Each /ACK pulse after a received byte raises interrupt 7. No interrupt therefore occurs when the device fails to answer or no device is plugged in.1 Because /ACK means that the device wants more data, it is not sent after the last byte.1

The interrupt flag in the interrupt controller is edge triggered, but SIO0 status bit 9 is not. psx-spx therefore reports that bit 9 cannot be acknowledged while /ACK is still low: a program waits until SIO0 status bit 7 is 0 and then sets control bit 4. The low pulse lasts about 100 clock cycles.1

psx-spx also reports that the kernel waits about 100 cycles after sending a byte before it acknowledges the old interrupt and waits for the new one. An emulator therefore cannot raise interrupt 7 immediately after the byte.1

Read Sequence

The controller read is command 42h ("B"). The console sends the following bytes and receives the replies shown:4

Table 3: Controller communication sequence
Send Reply Content
01h Hi-Z Controller address
42h idlo Read command; receive ID bits 0 to 7
TAP idhi Receive ID bits 8 to 15 (5Ah)
MOT swlo Receive button bits 0 to 7
MOT swhi Receive button bits 8 to 15
00h adc0 Analog input 0 (analog pad or mouse)
00h adc1 Analog input 1 (analog pad or mouse)
00h adc2 Analog input 2 (analog pad)
00h adc3 Analog input 3 (analog pad)

A digital pad stops the transfer after the button bytes. A mouse stops after adc1 and an analog pad after adc3. The TAP byte is normally 00h and requests Multi Tap data when it is 01h. The MOT bytes control the vibration motors but have no effect until vibration is enabled by configuration commands.4

Controller ID

The ID halfword tells the console how long the rest of the reply is:5

Table 4: Controller ID halfword
Bits Content
0 to 3 Number of following halfwords (1 to 15, or 0 for 16)
4 to 7 Controller type, or the current controller mode
8 to 15 Fixed 5Ah
Table 5: Known controller IDs
ID Device
5A12h Mouse (two buttons)
5A23h neGcon (twist, wheel or paddle)
5A31h Konami lightgun (IRQ10 type)
5A41h Digital pad, or analog pad in digital mode (LED off)
5A53h Analog stick, or analog pad in flight mode (LED green)
5A63h Namco lightgun (cinch type)
5A73h Analog pad in analog mode (LED red)
5A79h Dualshock2 with all inputs enabled
5A80h Multitap (when activated)
5AE3h Jogcon
5AF3h Configuration mode
FFFFh No controller connected (lines floating high)

Before any read, the BIOS InitPad() buffer holds xx00h.5

Standard Controllers

The digital pad returns one halfword of buttons. The analog pad and the analog stick in analog mode add two halfwords for the sticks. A button bit is 0 when pressed and 1 when released:6

Table 6: Standard controller reply
Halfword Bits Content
0 0 to 15 ID (5A41h digital, 5A73h analog pad, 5A53h analog stick)
1 0 Select
1 1 L3 (analog mode only)
1 2 R3 (analog mode only)
1 3 Start
1 4 Up
1 5 Right
1 6 Down
1 7 Left
1 8 L2
1 9 R2
1 10 L1
1 11 R1
1 12 Triangle
1 13 Circle
1 14 Cross
1 15 Square
2 0 to 7 Right stick X (00h left, 80h center, FFh right)
2 8 to 15 Right stick Y (00h up, 80h center, FFh down)
3 0 to 7 Left stick X (00h left, 80h center, FFh right)
3 8 to 15 Left stick Y (00h up, 80h center, FFh down)

A controller powers up in digital mode. The Analog button switches analog mode on and off by hand, and the pads with two motors can also be switched by software with the configuration commands.7 psx-spx notes that some games, such as Gran Turismo, never switch the pad to analog mode themselves, so the player must press the Analog button.7

In the green LED mode of the Dual Analog pad the ID is 5A53h, the L3 and R3 bits are always 1, and some buttons move: bit 9 is L1, bit 10 Square, bit 11 Triangle, bit 12 R1 and bit 15 R2. The mode matches the button layout of the analog stick, and psx-spx names MechWarrior 2, Ace Combat 2, Descent Maximum and Colony Wars as games that use it.8

Mouse

The Sony mouse returns a button halfword and one motion halfword:9

Table 7: Mouse reply
Halfword Bits Content
0 0 to 15 ID (5A12h)
1 0 to 7 Not used, always 1
1 8 to 9 Unknown, always 0
1 10 Right button (0 = pressed)
1 11 Left button (0 = pressed)
1 12 to 15 Not used, always 1
2 0 to 7 Horizontal motion, -80h to +7Fh (left to right)
2 8 to 15 Vertical motion, -80h to +7Fh (up to down)

The Sony mouse holds /ACK low from power-on until it is accessed once. Because /ACK is shared by both controller ports and both Memory Card slots, this blocks every other device. psx-spx therefore recommends that a program access both controller ports, even when it uses only one, and use a timeout when it waits for /ACK to go high.10

neGcon

The neGcon (ID 5A23h) is twisted instead of steered. Its reply has the following layout:11

Table 8: neGcon reply
Halfword Bits Content
1 0 to 2 Not used, always 1
1 3 Start
1 4 to 7 Up, Right, Down, Left
1 8 to 10 Not used, always 1
1 11 R button
1 12 B button
1 13 A button
1 14 to 15 Not used, always 1
2 0 to 7 Steering (twist) axis, 80h at center
2 8 to 15 Analog I button, 00h released to FFh pressed
3 0 to 7 Analog II button
3 8 to 15 Analog L button

The Namco Volume Controller, a paddle with two buttons, returns the same ID with most of the buttons missing.11

Jogcon

The Namco Jogcon (ID 5AE3h in Jogcon mode) returns the digital pad buttons in halfword 1 and a dial in halfwords 2 and 3. Bits 1 to 15 of halfword 2 hold the dial rotation, and bits 0 and 1 of halfword 3 flag a turn to the left and to the right. The dial is read by an optical sensor and has a motor for force feedback, and it accepts configuration command 4Dh as the analog pads do.12

Configuration Mode

The pads with two motors (SCPH-1200 and SCPH-110) have a configuration mode. It was introduced to enable the second motor, and it also lets software switch between analog and digital input and read type and status bytes.13

A transfer is 5 bytes in normal digital mode and 9 bytes in analog mode. In configuration mode it is always 9 bytes. While the pad is in configuration mode its ID is F3h 5Ah.13

Table 9: Configuration commands
Command Mode Function
42h "B" Normal and config Read buttons; in config mode analog inputs are always returned
43h "C" Normal and config Enter or exit configuration mode
44h "D" Config Set LED state (analog mode on or off)
45h "E" Config Get LED state and type
46h "F" Config Get variable response A (actuator information)
47h "G" Config Get constant values
48h "H" Config Unknown
4Ch "L" Config Get variable response B
4Dh "M" Config Get and set the vibration protocol
40h, 41h, 4Fh Config Unused on PlayStation pads; used by Dualshock2
49h, 4Ah, 4Bh, 4Eh Config Unused

The unused commands reply with F3h 5Ah followed by 00h bytes.13

43h - Enter or Exit Configuration Mode

Send  01h 43h 00h xx  00h (zero padded)
Reply HiZ id  5Ah buttons (analog inputs)

From normal mode, xx = 01h enters configuration mode and xx = 00h stays in normal mode, and the reply is the button data. From configuration mode, xx = 00h returns to normal mode and xx = 01h stays, and the reply is F3h 5Ah followed by 00h bytes.14

Entering configuration mode also starts a watchdog timer that resets the pad when it has not been accessed for about 1 second. The timer keeps running after the pad returns to normal mode. The reset stops and locks the motors and returns the pad to digital mode with the LED off, so a program must keep reading the pad even while it loads from the CD-ROM.14

Pressing the Analog button causes the same reset. After configuration commands have been used, the press also changes the 5Ah byte of the reply to 00h.14

44h - Set LED State

Send  01h 44h 00h Led Key 00h 00h 00h 00h
Reply HiZ F3h 5Ah 00h 00h Err 00h 00h 00h

Led = 00h selects digital mode with the LED off and Led = 01h analog mode with the red LED; other values are ignored. Key = 03h locks the mode so that the Analog button has no effect, and Key = 00h to 02h unlocks it. Larger Key values act as Key AND 03h.15

45h - Get LED State

Send  01h 45h 00h 00h 00h 00h 00h 00h 00h
Reply HiZ F3h 5Ah Typ 02h Led 02h 01h 00h

Led is the current LED state (00h off, 01h red) and Typ the controller type (01h for the PlayStation analog pad, 03h for the Dualshock2).16

46h and 4Ch - Variable Responses

Send  01h 46h 00h ii  00h 00h 00h 00h 00h
Reply HiZ F3h 5Ah 00h 00h cc  dd  ee  ff

Command 46h returns 01h 02h 00h 0Ah for ii = 00h and 01h 01h 01h 14h for ii = 01h. psx-spx identifies it as the PadInfoAct request of Sony's library: ii selects the actuator, and the last byte is its current drain of 10 or 20 units.17 These values match the drains in Sony's actuator table. Sony gives 10 units for actuator 1 and 20 units for actuator 2 of the SCPH-1200.18

Command 4Ch with the same layout returns dd = 04h for ii = 00h and dd = 07h for ii = 01h.19 Command 47h always returns 00h 00h 02h 00h 01h 00h after F3h 5Ah, and its purpose is not known.20

Vibration

The SCPH-1150 has one motor and no configuration commands. Its motor runs while the first MOT byte (xx) is 40h to 7Fh and the second (yy) is odd, so yyxx = 0140h switches it on and 0000h off. The motor is either on or off, and the LED state does not matter.21

The SCPH-1200 and SCPH-110 accept the same method for their small motor. To use both motors a program enters configuration mode and maps the motors to the MOT bytes with command 4Dh:21

Send  01h 4Dh 00h aa  bb  cc  dd  ee  ff     ;set the new aa..ff values
Reply HiZ F3h 5Ah aa  bb  cc  dd  ee  ff     ;return the old values

Bytes aa to ff give the meaning of the 4th to 9th bytes of the read command. A value of 00h maps the small motor M2 to bit 0 of that byte, 01h maps the large motor M1 to all 8 bits, and FFh maps nothing.22 The usual command is therefore 01h 4Dh 00h 00h 01h FFh FFh FFh FFh, which makes the read command carry M2 in its 4th byte and M1 in its 5th:22

Send  01h 42h 00h M2  M1  00h 00h 00h 00h

M1 runs the large motor at a speed from 00h (stop) to FFh (fastest), and bit 0 of M2 switches the small motor on and off.23 In the initial state aa to ff are all FFh and the old one-motor method is used. Once configuration commands have been used the old method is disabled.22

psx-spx reports that the large motor starts at about 50h to 60h and keeps running down to about 38h. The position of the weight, other movement of the pad, wear and temperature all change the exact threshold.23

Multi Tap

A read with TAP = 01h does not change the current reply. Instead it requests that the next read return the data of all four slots of the Multi Tap:24

Table 10: Multi Tap long reply
Halfwords Content
0 Multi Tap ID (5A80h)
1 to 4 Slot A: controller ID, buttons, analog inputs
5 to 8 Slot B
9 to 12 Slot C
13 to 16 Slot D

The Multi Tap always sends 4 halfwords per slot and pads shorter replies and empty slots with FFFFh. The request can be sent only when slot A holds a controller, because otherwise the slot A transfer ends after the first byte.24

A request sent during the long reply returns a short garbage reply of HiZ, 80h, 5Ah and the low byte of the slot A ID. A program therefore either toggles TAP between reads, receiving slot A data and the long reply in turn, or sends TAP = 01h every time and ignores every second reply.24

A second method addresses one slot directly by sending 0nh in place of 01h, where n is the slot from 1 to 4. It works like a normal read and also allows replies of more than 4 halfwords per slot.25

The Konami lightgun interrupt line is wired to all four slots through resistors. No logic selects one slot.25

References


  1. ^ a b c d e f g psx-spx. Controllers and Memory Cards, Controller and Memory Card Overview. https://psx-spx.consoledev.net/controllersandmemorycards/

  2. ^ a b c psx-spx. Controllers and Memory Cards, Controller and Memory Card Signals. https://psx-spx.consoledev.net/controllersandmemorycards/

  3. ^ psx-spx. Controllers and Memory Cards, Device addressing. https://psx-spx.consoledev.net/controllersandmemorycards/

  4. ^ a b psx-spx. Controllers and Memory Cards, Controller Communication Sequence. https://psx-spx.consoledev.net/controllersandmemorycards/

  5. ^ a b psx-spx. Controllers and Memory Cards, Controller ID (Halfword Number 0). https://psx-spx.consoledev.net/controllersandmemorycards/

  6. ^ psx-spx. Controllers and Memory Cards, Standard Controllers. https://psx-spx.consoledev.net/controllersandmemorycards/

  7. ^ a b psx-spx. Controllers and Memory Cards, Analog Mode Note. https://psx-spx.consoledev.net/controllersandmemorycards/

  8. ^ psx-spx. Controllers and Memory Cards, Dual Analog Pad in LED=Green Mode. https://psx-spx.consoledev.net/controllersandmemorycards/

  9. ^ psx-spx. Controllers and Memory Cards, Sony Mouse Controller. https://psx-spx.consoledev.net/controllersandmemorycards/

  10. ^ psx-spx. Controllers and Memory Cards, Sony Mouse Hardware Bug on Power-On. https://psx-spx.consoledev.net/controllersandmemorycards/

  11. ^ a b psx-spx. Controllers and Memory Cards, neGcon Racing Controller and Namco Volume Controller. https://psx-spx.consoledev.net/controllersandmemorycards/

  12. ^ psx-spx. Controllers and Memory Cards, Namco Jogcon. https://psx-spx.consoledev.net/controllersandmemorycards/

  13. ^ a b c psx-spx. Controllers and Memory Cards, Controllers - Configuration Commands. https://psx-spx.consoledev.net/controllersandmemorycards/

  14. ^ a b c psx-spx. Controllers and Memory Cards, Command 43h - Enter/Exit Configuration Mode. https://psx-spx.consoledev.net/controllersandmemorycards/

  15. ^ psx-spx. Controllers and Memory Cards, Config Mode - Command 44h - Set LED State. https://psx-spx.consoledev.net/controllersandmemorycards/

  16. ^ psx-spx. Controllers and Memory Cards, Config Mode - Command 45h - Get LED State. https://psx-spx.consoledev.net/controllersandmemorycards/

  17. ^ psx-spx. Controllers and Memory Cards, Config Mode - Command 46h - Get Variable Response A. https://psx-spx.consoledev.net/controllersandmemorycards/

  18. ^ Sony Computer Entertainment Inc. Run-Time Library Overview. Run-Time Library 4.4. January 1999. Page 13-19, Table 13-19.

  19. ^ psx-spx. Controllers and Memory Cards, Config Mode - Command 4Ch - Get Variable Response B. https://psx-spx.consoledev.net/controllersandmemorycards/

  20. ^ psx-spx. Controllers and Memory Cards, Config Mode - Command 47h. https://psx-spx.consoledev.net/controllersandmemorycards/

  21. ^ a b psx-spx. Controllers and Memory Cards, Controllers - Vibration/Rumble Control. https://psx-spx.consoledev.net/controllersandmemorycards/

  22. ^ a b c psx-spx. Controllers and Memory Cards, Config Mode - Command 4Dh - Get/Set RumbleProtocol. https://psx-spx.consoledev.net/controllersandmemorycards/

  23. ^ a b psx-spx. Controllers and Memory Cards, Normal Mode - Command 42h. https://psx-spx.consoledev.net/controllersandmemorycards/

  24. ^ a b c psx-spx. Controllers and Memory Cards, Multitap Controller Access, Method 1 Details. https://psx-spx.consoledev.net/controllersandmemorycards/

  25. ^ a b psx-spx. Controllers and Memory Cards, Multitap Controller Access. https://psx-spx.consoledev.net/controllersandmemorycards/

Categories: Hardware