INES Mapper 176

From NESdev Wiki
Revision as of 08:47, 27 May 2012 by Zeromus (talk | contribs) (add mapper 176 documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Mapper 176 is used by some chinese games, of the WXN type. At one point, fceux by way of fceumm rewired mapper 176 to be handled by the BMCFK23C board but it is unclear what that means. Hacked builds of VirtuaNesEX and nestopia acquired support for this mapper, at least so far as to emulate "水浒神兽", whatever that is. Fceux supposedly acquired support for it in r2519 by reimplementing the mapper and getting BMCFK23C out of the picture.

This documentation is based on VirtuaNesEX's hack's and fceux's sources are somewhat non-representative of logical hardware. This documentation was reasoned out from those sources into a slightly more logical explanation; working sources should be considered authoritative.

The initial PRG state is as follows:

     $8000   $A000   $C000   $E000  
   +-------+-------+-------+-------+
   |   0   |   1   |   62  |   63  |
   +-------+-------+-------+-------+

This is the case even for 1024KB roms where you might expect 127 and 128 instead. Perhaps the registers are only 6 bits. This distinction is significant.

By writing to $5FF1, you can effect the following:

     $8000   $A000   $C000   $E000  a
   +-------+-------+-------+-------+
   |             $5FF1             |
   +-------+-------+-------+-------+

By writing $24 to $5010, you can set the 'SBW' mode bit. Once that bit is set, other registers become available for mapping control. There seems to be no way to clear the bit.

By writing to $5001 with SBW set, you can effect the following:

     $8000   $A000   $C000   $E000  
   +-------+-------+-------+-------+
   |             $5001             |
   +-------+-------+-------+-------+

By writing to $5011 with SBW set, you can effect the following:

     $8000   $A000   $C000   $E000  
   +-------+-------+-------+-------+
   |            <$5011>            |
   +-------+-------+-------+-------+

There is a CHR register at $5FF2 with the following format:

 $5FF2:  [CCCC CCCC] (exact number of bits unknown)
   C = Select 8k CHR page @ $0000-1FFF

With this mapper, there may be no VROM present.