SYSTEM IO
BIOSF_SYSTEM_IO ($C0044A)
Should be called at the end of the VBlank interrupt routine.
Reads coin and game select inputs, jumps to COIN_SOUND, PLAYER_START or DEMO_END accordingly.
Reads the player inputs and sets values in RAM accordingly:
- BIOS_P1STATUS ($10FD94)
- 0:No joypad connected
- 1:Normal joypad
- 2:Expanded joypad (?)
- 3:Mahjong controler
- 4:Keyboard
- BIOS_P1CURRENT ($10FD95) inverted with P1_PREVIOUS ?
- BIOS_P1PREVIOUS ($10FD96)
- BIOS_P1CHANGE ($10FD97) rising edge detection (OFF to ON)
- BIOS_P1REPEAT ($10FD98) rising edge detection + repeat each 8th frame after 16 frames
- BIOS_P1TIMER ($10FD99) repeat timer (used ?)
- BIOS_P2STATUS ($10FD9A)
- BIOS_P2CURRENT ($10FD9B)
- BIOS_P2PREVIOUS ($10FD9C)
- BIOS_P2CHANGE ($10FD9D)
- BIOS_P2REPEAT ($10FD9E)
- BIOS_P2TIMER ($10FD99)
All bits are active high.