Joypad

From NeoGeo Development Wiki
Revision as of 20:01, 28 January 2011 by Furrtek (talk | contribs) (Page créée avec « Need picture and clear bit definitions of registers. Registers used to read the button's states directly: *REG_P1CNT ($300000), byte for DCBARLDU of player 1. *REG_P2CNT ($3... »)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Need picture and clear bit definitions of registers.

Registers used to read the button's states directly:

  • REG_P1CNT ($300000), byte for DCBARLDU of player 1.
  • REG_P2CNT ($340000), byte for DCBARLDU of player 2.
  • REG_STATUS_B ($380000), byte for xxxx Select2 Start2 Select1 Start2.

A BIOS call can be used to read joypads more easily. The call sets values in the BIOS's RAM space which gives currently-pressed, state-change, and "repeat" values for both joypads.