Bandai EPROM mapper

From NESdev Wiki
Revision as of 00:31, 14 November 2011 by Zeromus (talk | contribs)
Jump to navigationJump to search

Bandai EPROM mapper is an ad hoc designation for a mapper used by Bandai for Dragon Ball and Gundam games.

These boards contain one of Bandai's FCG mapper chips.

Three mappers are used to describe these boards

  1. iNES Mapper 016 is for boards which contain a 24C02 256-byte serial EEPROM
  2. iNES Mapper 153 is for TBD
  3. iNES Mapper 159 is for boards which contain a 24C01 128-byte serial EEPROM

Hardware: PRG ROM (16 KiB banks, one switchable and one fixed), CHR ROM (1 KiB banks), no PRG RAM, optional serial EEPROM (24C02 or 24C01).

Ports

The mapper's ports are mirrored at $6000-$FFFF, except for the EEPROM I/O register which can only be read at $6000-$7FFF.

  • $8000-$8007: Select 1024 byte CHR bank at $0000, $0400, ..., $1C00
  • $8008: Select 16384 byte PRG bank at $8000 (the last bank is fixed at $C000)
  • $8009: Mirroring (0: vertical; 1: horizontal; 2: 1-screen $2000; 3: 1-screen $2C00)
  • $800A: IRQ control (0: pause; 1: count; any write acknowledges)
  • $800B: Low 8 bits of IRQ counter
  • $800C: High 8 bits of IRQ counter
  • $800D: EEPROM write

When enabled, IRQ counts down by 1 every CPU cycle. /IRQ goes low when the counter goes from $0001 to $0000, and it goes high when $800A is written. The counter is not reloaded after IRQ; it'll fire once every 65536 cycles unless paused or reloaded with $800B/$800C writes.

Any read from $6000-$7FFF appears to read the EEPROM.

EEPROM appears to be laid out like this:

7  bit  0  $800D: EPROM control
|||' ''''
||+-------- Clock
|+--------- Data in
+---------- Enable Read

7654 3210  $6000-$7FFF: EPROM read
   |
   +------ Data out

Some patterns observed in the games' save code:

  • Start I/O: $00 $40 $60 $20 $00
  • Write 0 bit: $00 $20 $00
  • Write 1 bit: $00 $40 $60 $40 $00
  • Acknowledge: $00 $20 $A0 Read $00
  • Read bit: $60 $E0 Read $40
  • Stop I/O: $00 $20 $60 $40 $C0