Memory mapped registers

=Address decode masks=

Decode masks aren't verified !

Decode masks are used to know which register will be mapped to a precise address, they can be seen as a sort of mirroring range notation.

A "1" bit means that the corresponding address line is involved in decoding, a "0" bit means it can be anything.

For example, 's base is $300000 and its mask is $FE0001: BASE 00110000 00000000 00000000 MASK 11111110 00000000 00000001 0011000x xxxxxxxx xxxxxxx0

This means that it should also be accessible at $300002, $300004, $300006... up to $31FFFE. The highest address is BASE OR (NOT MASK).

Mirror guesser
=Register descriptions=

REG_P1CNT

 * Address: $300000
 * Decode mask: $FE0001
 * Handled by:

REG_DIPSW

 * Address: $300001
 * Decode mask: $FE0081 (not sure for write)
 * Handled by: (read),  (write)

REG_SYSTYPE
Reads DSW2 on board.


 * Address: $300081
 * Decode mask: $FE0081
 * Handled by:

REG_SOUND

 * Address: $320000
 * Decode mask: $FE0001
 * Handled by:

REG_STATUS_A

 * Address: $320001
 * Decode mask: $FE0001
 * Handled by:

REG_P2CNT

 * Address: $340000
 * Decode mask: $FE0001
 * Handled by:

REG_STATUS_B

 * Address: $380000
 * Decode mask: $FE0001
 * Handled by:

REG_POUTPUT

 * Address: $380001
 * Decode mask: $FE0071
 * Handled by:

REG_CRDBANK

 * Address: $380011
 * Decode mask: $FE0071
 * Handled by:

REG_SLOT

 * Address: $380021
 * Decode mask: $FE00F1
 * Handled by:

REG_LEDLATCHES

 * Address: $380031
 * Decode mask: $FE00F1
 * Handled by:

REG_LEDDATA

 * Address: $380041
 * Decode mask: $FE00F1
 * Handled by:

REG_RTCCTRL

 * Address: $380051
 * Decode mask: $FE00F1
 * Handled by:

REG_RESETCC1

 * Address: $380061
 * Decode mask: $FE00F1
 * Handled by:

REG_RESETCC2

 * Address: $380063
 * Decode mask: $FE00F1
 * Handled by:

REG_RESETCL1

 * Address: $380065
 * Decode mask: $FE00F1
 * Handled by:

REG_RESETCL2

 * Address: $380067
 * Decode mask: $FE00F1
 * Handled by:

REG_RTCOUT

 * Address: $3800D1
 * Decode mask: $FE00F1
 * Handled by:

REG_SETCC1

 * Address: $3800E1
 * Decode mask: $FE00F1
 * Handled by:

REG_SETCC2

 * Address: $3800E3
 * Decode mask: $FE00F1
 * Handled by:

REG_SETCL1

 * Address: $3800E5
 * Decode mask: $FE00F1
 * Handled by:

REG_SETCL2

 * Address: $3800E7
 * Decode mask: $FE00F1
 * Handled by:

System registers
Handled by a 74HC259 addressable latch on cart systems. Byte writes only. Decode mask: $FE0001. Registers go in pairs, bit 4 of address is the data bit.

Video registers
Handled by the GPUs. Byte writes only work on even addresses and stores the same data in the MSB and LSB. Odd addresses aren't mapped ? Decode mask: $FE0001.

NeoGeo CD registers
NEO-MGA / LC8953 / LC98000 ?