Joypad

From NeoGeo Development Wiki
Revision as of 07:57, 7 February 2011 by Furrtek (talk | contribs) (1 revision)
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.