Casio PV-1000/Controller

From Obscure Wiki
< Casio PV-1000
Revision as of 19:39, 29 May 2023 by Lidnariq (talk | contribs) (got joystick mapping backwards)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The Casio PV-1000 Joystick is a 2-axis, 4-button joystick. Pictures are available here: https://commons.wikimedia.org/wiki/Category:Casio_PV-1000_accessories

Reading its status is much like one how one reads the buttons on a Game Boy.

Input (port $FD write)

7  bit  0
---- ----
xxxx ABCD
     ||||
     |||+-- 1: include information about joysticks' start and select buttons
     ||+--- 1: include information about joysticks' right and down directions
     |+---- 1: include information about joysticks' up and left directions
     +----- 1: include information about joysticks' "Attack" buttons

Output (port $FD read)

7  bit  0
---- ----
xxxx ABCD
     ||||
     |||+-- 1: if Player 1 select, down, left, or "Attack" was pressed, depending on above
     ||+--- 1: if Player 1 start, right, up, or "Attack" was pressed
     |+---- 1: if Player 2 select, down, left, or "Attack"
     +----- 1: if Player 2 start, right, up, or "Attack"

A 2-position-2-pole switch on the controller lets each player swap the two "Attack" buttons, so there is no consistent mapping of "button at tip of joystick" vs "button above start and select buttons" to which bit above.

Hardware

The values written to port $FD appear on the pins of the ASIC. The voltages are then current-limited by four 10kΩ resistors, where they go to the joystick ports, through diodes in the joystick, and if the relevant button is pressed, back to the joystick port to a 330pF capacitor and then back to the ASIC.

However if a button is not pressed, the 330pF capacitor is instead discharged by a 56kΩ resistor on the mainboard.

ASIC----10kΩ----jack----|>|----button----jack----+----+----10kΩ----ASIC
                                               330pF 56kΩ
                                                 |    |
                                                gnd  gnd

Experimental measurements have established that it takes 0-41 T states after a row is selected before a button press can be detected, and 126-147 T states after a row is cleared before a lack of button press can be detected.