INES Mapper 015

From NESdev Wiki
Revision as of 20:59, 18 March 2015 by Lidnariq (talk | contribs) (→‎Bank mode 0 ( 32K ): disambiguate)
Jump to navigationJump to search


The iNES format assigns iNES Mapper 015 as the mapper used in 100-in-1 Contra Function 16, the first pirate multicart to be emulated.

The mapper allows multiple NROM or BNROM games plus one UNROM game to be used with very little modification. A few games originally released on a CNROM compatible board (such as two variants of Tetris) showed up on the cart; these were ripped to NROM by tossing out all 8 KB CHR banks except the one used for gameplay.

Overview

  • PRG ROM size: Up to 512 KB
  • PRG ROM bank size: 8 KB, 16 KB, or 32 KB
  • PRG RAM: 8 KB
  • CHR capacity: 8 KB RAM
  • CHR bank size: None
  • Nametable mirroring: Controlled by mapper
  • Subject to bus conflicts: Unknown

Banks

There is one switchable bank. How this is mapped into depends on the current bank mode (see Registers below).

Bank mode 0 ( 32K )

  • CPU $8000-$BFFF: Bank B
  • CPU $C000-$FFFF: Bank (B bitwise ORed with 1)

If bit 0 of B equals 1, then the 16K and 32K modes are identical.

Bank mode 1 ( 128K )

  • CPU $8000-$BFFF: Switchable 16 KB bank B
  • CPU $C000-$DFFF: Fixed to last bank in the cart

This mode uses the same configuration as UNROM.

Bank mode 2 ( 8K )

  • CPU $8000-$9FFF: Sub-bank b of 16 KB PRG ROM bank B
  • CPU $A000-$FFFF: Mirrors of $8000-$9FFF

Bank mode 3 ( 16K )

  • CPU $8000-$BFFF: 16 KB bank B
  • CPU $C000-$FFFF: Mirror of $8000-$BFFF

Registers

Control ($8000-$FFFF)

This is a 10-bit register. The upper 2 bits of the value are set from address lines A1-A0.

15 bit  8 7  bit  0  Address bus
---- ---- ---- ----
1xxx xxxx xxxx xxSS
|                ||
|                ++- Select PRG ROM bank mode
|                    0: 32K; 1: 128K (UNROM style); 2: 8K; 3: 16K
+------------------- Always 1

7  bit  0  Data bus
---- ----
bMBB BBBB
|||| ||||
||++-++++- Select 16 KB PRG ROM bank
|+-------- Select nametable mirroring mode (0=vertical; 1=horizontal)
+--------- Select 8 KB half of 16 KB PRG ROM bank
           (should be 0 except in 8K bank mode)

The result when b=1 outside of bank mode 0 is not specified.

Power-up state: bank mode 2, bank 0, mirroring not specified.

Some emulators (fceux, virtuanesex) are XORing the b (8KB half) bit frequently instead of ORing or ignoring. It is unclear what effects this would have. Additionally, there is some disagreement as to the boot-up state (disch says mode 0, the above says mode 2, emulators vary).

The unlicensed chinese WXN game "Bio Hazard" which uses this mapper freezes in the same way in fceux, fceu-mm, nestopia, bizhawk, and virtuanesx (maybe?) and so the game is probably buggy.

Hardware

Variants

 Here are Disch's original notes:
 ========================
 =  Mapper 015          =
 ========================
 
 Example Game:
 --------------------------
 100-in-1 Contra Function 16
 
 
 Notes:
 ---------------------------
 
 Possible bus conflicts???
 
 
 
 Registers:
 ---------------------------
 
   $8000-FFFF:  A~[.... .... .... ..OO]
                  [pMPP PPPP]
     O = Mode
     p = Low bit of PRG page (not always used)
     P = High bits of PRG page
     M = Mirroring  (0=Vert, 1=Horz)
 
 
 PRG Setup:
 ---------------------------
 
 Depending on the Mode used, the 'p' bit may not be used.  In the chart below, "P" will indicate that only the
 'P' bits are used to form a 6-bit page number... whereas "Pp" will indicate the full 7-bit page number.
 
 
            $8000   $A000   $C000   $E000  
          +---------------+---------------+
 Mode 0:  |       P       |     P OR 1    |
          +---------------+---------------+
 Mode 1:  |       P       |     { -1}     |
          +---------------+---------------+
 Mode 2:  |  Pp   |  Pp   |  Pp   |  Pp   |
          +---------------+---------------+
 Mode 3:  |       P       |       P       |
          +---------------+---------------+
 
 
 Powerup:
 ---------------------------
 All regs reset to 0 on powerup.