VRC2: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (→‎Banks: I guess technically we know what that bit is for, so it's not "unknown")
(merged VRC2 and VRC4)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:ASIC mappers]]
#REDIRECT [[VRC2 and VRC4]]
The Konami VRC2 is an [[:Category:ASIC mappers|ASIC]] [[MMC|mapper]].
 
__TOC__
 
== Overview ==
* PRG ROM size: Up to 256 KB
* PRG ROM bank size: 8 KiB
* PRG RAM: One bit or 8 KiB
* CHR bank size: 1 KiB
* Nametable [[mirroring]]: Controlled by mapper
* Subject to [[bus conflict]]s: No
 
The Konami VRC2 is almost identical to the [[VRC4|VRC4]], but a bit more limited.
 
See [[VRC2 pinout]] for chip pinout.
 
== Banks ==
* CPU $6000-$6FFF: 1 bit latch, or
* CPU $6000-$7FFF: optional 8 KiB RAM
* CPU $8000-$9FFF: 8 KiB switchable PRG ROM bank
* CPU $A000-$BFFF: 8 KiB switchable PRG ROM bank
* CPU $C000-$FFFF: 16 KiB PRG ROM bank, fixed to the last 16 KiB
* PPU $0000-$03FF: 1 KiB switchable CHR bank
* PPU $0400-$07FF: 1 KiB switchable CHR bank
* PPU $0800-$0BFF: 1 KiB switchable CHR bank
* PPU $0C00-$0FFF: 1 KiB switchable CHR bank
* PPU $1000-$13FF: 1 KiB switchable CHR bank
* PPU $1400-$17FF: 1 KiB switchable CHR bank
* PPU $1800-$1BFF: 1 KiB switchable CHR bank
* PPU $1C00-$1FFF: 1 KiB switchable CHR bank
 
== Revisions ==
 
This mapper had two known revisions:  VRC2a and VRC2b.  Both revisions uses Address lines A0, A1, and A12-A15 for registers, however VRC2a has A0 and A1 "backwards" from the norm.  Address $x001 on VRC2b would be $x002 on VRC2a, and $x002 on VRC2b would be $x001 on VRC2a.
 
Additionally, VRC2a has 7-bit wide CHR registers, whereas VRC2b has 8-bit wide CHR registers.
 
The two wiring variants correspond to iNES mappers [[INES Mapper 022|22]] and [[INES Mapper 023|23]].
 
A third variant (similar to VRC2a but with full-width CHR registers and PRG-RAM) is canonically emulated as using the VRC4, and it's assigned to [[iNES Mapper 025|mapper 25]].
 
This page lists registers as they are in the VRC2b variant.  For VRC2a registers, reverse A0 and A1 lines.
 
== Registers ==
 
 
=== PRG Select 0 ($8000, $8001, $8002, $8003) ===
 
7  bit  0
---------
...P PPPP
    | ||||
    + ++++- Select 8 KB PRG bank at $8000
 
=== PRG Select 1 ($A000, $A001, $A002, $A003) ===
 
7  bit  0
---------
...P PPPP
    | ||||
    + ++++- Select 8 KB PRG bank at $A000
 
 
=== Mirroring Control ($9000, $9001, $9002, $9003) ===
 
7  bit  0
---------
.... ..MM
        ||
        ++- [[Mirroring]] (0: vertical; 1: horizontal;
                          2: one-screen, lower bank; 3: one-screen, upper bank;)
 
 
=== CHR Select 0 ($B000 + $B001) ===
 
  $B000        $B001
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $0000
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
 
=== CHR Select 1 ($B002 + $B003) ===
 
  $B002        $B003
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $0400
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== CHR Select 2 ($C000 + $C001) ===
 
  $C000        $C001
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $0800
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== CHR Select 3 ($C002 + $C003) ===
 
  $C002        $C003
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $0C00
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== CHR Select 4 ($D000 + $D001) ===
 
  $D000        $D001
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $1000
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== CHR Select 5 ($D002 + $D003) ===
 
  $D002        $D003
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $1400
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== CHR Select 6 ($E000 + $E001) ===
 
  $E000        $E001
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $1800
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== CHR Select 7 ($E002 + $E003) ===
 
  $E002        $E003
7  bit  0    7  bit  0
---------    ---------
.... LLLL    .... HHHH
      ||||        ||||
      ||||        ++++- High 4-bits of 1 KB CHR bank at PPU $1C00
      ++++-------------- Low 4-bits
 
Note:  On VRC2a, the low bit is ignored (right shift value by 1)
 
=== Microwire interface ($6000-$6FFF) ===
 
How it was supposed to work:
7  bit  0
---------
.... .SCD
      |||
      ||+- Data to EEPROM (write) or from EEPROM (read)
      |+-- Clock to EEPROM (write only)
      +--- Chip Select (write only)
 
How it works in practice:
7  bit  0
---------
.... ...L
        |
        +- 1-bit latch value (r/w)
 
Reads from $6000-6FFF return open bus for the top 7 bits. Reads from $7000-7FFF only ever return open bus.
 
The VRC2 was supposed to have shipped with a [[wikipedia:Microwire|Microwire]] interface for save games. However, Konami never used it, seemingly due to a defect in the VRC2.
 
Across all the VRC2-using boards, the ''Data from EEPROM'' pin has been connected to many different things. On '''351618''' ([[iNES Mapper 022|22]]) it's connected to ground. On '''350603''', '''350636''', and '''351179''' it floats. On '''350926''' it's connected to ''Data to EEPROM''. On '''351948''' ([[iNES Mapper 025|25]]) it's connected to ground but extra hardware keeps the VRC2 some seeing reads from $6000 so as to not conflict with PRG RAM.
 
Several games, including Contra (J) and Ganbare Goemon 2 (J), rely on the two ''Data'' pins being connected to each other, and so expect to be able to read the written value back. In these cases, the LSB agrees with the last value written and the upper seven bits are open bus, e.g. both LDA $6100 and LDA $6000 will return $60|latch. Returning neither open bus nor 0x00 will work, and these games will lock almost immediately after execution begins. Fortunately, no games ever rely on any other behavior.
 
Emulators that use the same VRC4 core (and its PRG RAM) for VRC2 emulation will have the effect simulated for them. However, only one VRC2 board contains any RAM.

Latest revision as of 20:11, 28 April 2017

Redirect to: