INES Mapper 068: Difference between revisions
m (add link to pinout) |
(Add licensing IC mechanism description and link to naruko's doc) |
||
Line 5: | Line 5: | ||
== Registers == | == Registers == | ||
=== $6000-$7FFF: Licensing IC === | |||
Only for the game <u>Nantettatte!! Baseball</u>, when WRAM is disabled ($F000.4 is 0), writes to this register reset a timer in the external option ROM cartridge. The external ROM is only readable while the timer has not expired; once it has, reads should return open bus. | |||
The game verifies that the timer expires after 107516 to 107575 M2 cycles by reading a signature from the end of the external ROM. | |||
=== $8000-$8FFF: CHR bank at $0000 === | === $8000-$8FFF: CHR bank at $0000 === | ||
Line 23: | Line 28: | ||
<pre> | <pre> | ||
7654 3210 | 7654 3210 | ||
| | | || | ||
| | | ++- Mirroring | ||
| 0: vertical (0101); 1: horizontal (0011); | | 0: vertical (0101); 1: horizontal (0011); | ||
| 2: 1-screen (0000); 3: 1-screen (1111) | | 2: 1-screen (0000); 3: 1-screen (1111) | ||
Line 59: | Line 64: | ||
== References == | == References == | ||
*[http://nesdev.org/sunsoft.txt Goroh's Sunsoft mapper doc] | *[http://nesdev.org/sunsoft.txt Goroh's Sunsoft mapper doc] | ||
*[http://forums.nesdev.org/viewtopic.php?t=9744 Naruko's notes in the forum] | |||
Here are Disch's original notes: | Here are Disch's original notes: |
Revision as of 23:13, 27 January 2013
iNES Mapper 068 denotes PCBs using the Sunsoft-4 mapper IC. In the US it was only used in the game After Burner.
It has the unusual ability to map CHR ROM into the part of the PPU's address space used for nametables.
Registers
$6000-$7FFF: Licensing IC
Only for the game Nantettatte!! Baseball, when WRAM is disabled ($F000.4 is 0), writes to this register reset a timer in the external option ROM cartridge. The external ROM is only readable while the timer has not expired; once it has, reads should return open bus.
The game verifies that the timer expires after 107516 to 107575 M2 cycles by reading a signature from the end of the external ROM.
$8000-$8FFF: CHR bank at $0000
Map a 2 KiB CHR ROM bank into PPU $0000.
$9000-$9FFF: CHR bank at $0800
Map a 2 KiB CHR ROM bank into PPU $0800.
$A000-$AFFF: CHR bank at $1000
Map a 2 KiB CHR ROM bank into PPU $1000.
$B000-$BFFF: CHR bank at $1800
Map a 2 KiB CHR ROM bank into PPU $1800.
$C000-$CFFF: Nametable register 0
Map a 1 KiB CHR ROM bank in place of the lower nametable (CIRAM $000-$3FF). Only D6-D0 are used; D7 is ignored and treated as 1, so nametables must be in the last 128 KiB of CHR ROM.
$D000-$DFFF: Nametable register 1
Map a 1 KiB CHR ROM bank in place of the upper nametable (CIRAM $400-$7FF). Only D6-D0 are used; D7 is ignored and treated as 1.
$E000-$EFFF: Nametable control
7654 3210 | || | ++- Mirroring | 0: vertical (0101); 1: horizontal (0011); | 2: 1-screen (0000); 3: 1-screen (1111) +------ Chip select for PPU $2000-$2FFF (nametables): 0 for CIRAM or 1 for CHR ROM
Nametable mirroring works the same way in both CIRAM and CHR ROM modes. Not all documents mention the single screen mirroring mode; its behavior should be verified against an authentic cartridge.
$F000-$FFFF: PRG bank at $8000
7 bit 0 ---- ---- ...E BBBB | |||| | ++++- Select 16 KiB PRG banked into $8000-$BFFF +------ 1:Enable PRG RAM = WRAM +CS2
Nantettatte!! Baseball repurposes some of the bits:
7 bit 0 ---- ---- ...E RBBB | |||| | |+++- Select 16 KiB PRG banked into $8000-$BFFF | +---- 1: select internal ROM | 0: select external ROM +------ 1:Enable PRG RAM = WRAM +CS2 0:Enable licensing verification
Note that although the external ROM could be up to 128KB, both seen subcartridges are only 32KB, so are mirrored four times. The known UNIF dumps of these external ROMs are only 16KB in size. Naruko implies that the game only reads the first 16KB of the external ROM.
Hardware
Both the US and Japanese release of After Burner have CHR ROM split into two chips.
References
Here are Disch's original notes: ======================== = Mapper 068 = ======================== Example Games: -------------------------- After Burner 2 Maharaja Registers: --------------------------- Range,Mask: $8000-FFFF, $F000 $8000: CHR Reg 0 (2k @ $0000) $9000: CHR Reg 1 (2k @ $0800) $A000: CHR Reg 2 (2k @ $1000) $B000: CHR Reg 3 (2k @ $1800) $C000: [.NNN NNNN] NT-ROM Reg 0 $D000: [.NNN NNNN] NT-ROM Reg 1 $E000: [...R ...M] Mirroring (see section below) $F000: PRG Reg (16k @ $8000) CHR Setup: --------------------------- $0000 $0400 $0800 $0C00 $1000 $1400 $1800 $1C00 +---------------+---------------+---------------+---------------+ | $8000 | $9000 | $A000 | $B000 | +---------------+---------------+---------------+---------------+ PRG Setup: --------------------------- $8000 $A000 $C000 $E000 +---------------+---------------+ | $F000 | { -1} | +---------------+---------------+ Mirroring: --------------------------- The mirroring reg has two significant bits: $E000: [...R ...M] 'M' selects H/V: 0 = Vert 1 = Horz 'R' selects whether or not to use CHR-ROM as nametables. 0 = normal mirroring 1 = use CHR-ROM When 'R' is set, $C000 and $D000 are used to select 1k CHR-ROM pages to use as nametables. They are arranged in either Horz or Vert mirroring fashion depending on the 'M' bit ($C000 would be used in place of NTA, $D000 in place of NTB). R=1, M=0: [ $C000 ][ $D000 ] [ $C000 ][ $D000 ] R=1, M=1: [ $C000 ][ $C000 ] [ $D000 ][ $D000 ] Note that CHR-ROM for nametables is taken from the last 128k of CHR. This means you must effectively OR the value written to $C000/$D000 with $80.