NES 2.0 Mapper 544: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(Restrict pin 18 description to VRC clones for now.)
(→‎CHR-RAM Bank Selection: VRC4 has 9 bit banks, call out that the MSbit both exists and is ignored)
Line 56: Line 56:
==CHR-RAM Bank Selection==
==CHR-RAM Bank Selection==
The game writes, via the PPU, to specific CHR banks in order to select both which and how many CHR banks are mapped to RAM instead of ROM. Writes to CHR ROM in multiples of 1 KiB:
The game writes, via the PPU, to specific CHR banks in order to select both which and how many CHR banks are mapped to RAM instead of ROM. Writes to CHR ROM in multiples of 1 KiB:
  CHRB~[1Z.D L.L.]
  CHRB~[. 1Z.D L.L.]
      || | | |
        || | | |
      |+-|-+-+---------------- Select first bank and size of CHR RAM:
        |+-|-+-+---------------- Select first bank and size of CHR RAM:
      || |                      $80 = $28-$2B
        || |                      $80 = $28-$2B
      || |                      $82 = $00-$03
        || |                      $82 = $00-$03
      || |                      $88 = $4C-$4F
        || |                      $88 = $4C-$4F
      || |                      $8A = $64-$67
        || |                      $8A = $64-$67
      || |                      $C0 = $46-$47
        || |                      $C0 = $46-$47
      || |                      $C2 = $7C-$7D
        || |                      $C2 = $7C-$7D
      || |                      $C8 = $04-$05
        || |                      $C8 = $04-$05
      || |                      $CA = only CHR ROM
        || |                      $CA = only CHR ROM
      || +-------------------- If 1, ignore above and always enable CHR ROM / disable CHR RAM
        || +-------------------- If 1, ignore above and always enable CHR ROM / disable CHR RAM
      |+---------------------- Number of banks of CHR RAM, 0=four, 1=two
        |+---------------------- Number of banks of CHR RAM, 0=four, 1=two
      +----------------------- Must be 1  
        +----------------------- Must be 1  
  Power-on value: $80
  Power-on value: $80
The meanings are identical to [[INES Mapper 195]] except for value $C8. The game uses different banks as CHR-RAM for different game situations, so the CHR-RAM Bank Selection feature must be emulated. Unlike Mapper 195, since there are only 2 KiB of CHR-RAM mounted on the circuit board, the 4 KiB settings cause CHR-RAM to be mirrored once, and all settings mapping the same 2 KiB of CHR-RAM.
The meanings are identical to [[INES Mapper 195]] except for value $C8. The game uses different banks as CHR-RAM for different game situations, so the CHR-RAM Bank Selection feature must be emulated. Unlike Mapper 195, since there are only 2 KiB of CHR-RAM mounted on the circuit board, the 4 KiB settings cause CHR-RAM to be mirrored once, and all settings mapping the same 2 KiB of CHR-RAM.

Revision as of 19:07, 3 July 2019

NES 2.0 Mapper 544 denotes the Waixing FS306 board, used for 覇王的大陸 (Bàwáng de Dàlù), which is their Chinese translation of Namco's 三国志 II: 覇王の大陸 (Sangokushi II: Haō no Tairiku). It is similar to INES Mapper 253 in combining a VRC4 clone with a GAL chip that replaces a selectable two or four CHR banks with 2 KiB of CHR-RAM. It differs in the address lines to which the VRC4 responds, in adding a third selectable 8 KiB PRG-ROM bank, and in selecting the CIRAM bank for all four nametables independently.

A later re-release of the game uses INES Mapper 176.

Banks

  • CPU $6000-$7FFF: 8 KiB fixed PRG-RAM bank (battery-backed)
  • CPU $8000-$9FFF: 8 KiB switchable PRG-ROM bank
  • CPU $A000-$BFFF: 8 KiB switchable PRG-ROM bank
  • CPU $C000-$DFFF: 8 KiB switchable PRG-ROM bank
  • CPU $E000-$FFFF: 8 KiB PRG-ROM bank, fixed to last bank
  • PPU $0000-$03FF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $0400-$07FF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $0800-$0BFF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $0C00-$0FFF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $1000-$13FF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $1400-$17FF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $1800-$1BFF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $1C00-$1FFF: 1 KiB switchable CHR-ROM/RAM bank
  • PPU $2000-$23FF: 1 KiB switchable CIRAM bank
  • PPU $2400-$27FF: 1 KiB switchable CIRAM bank
  • PPU $2800-$2BFF: 1 KiB switchable CIRAM bank
  • PPU $2C00-$2FFF: 1 KiB switchable CIRAM bank

Registers

The VRC4 clone's A0 and A1 inputs are connected to CPU A10 and A11, respectively. Subaddresses $000/$001/$002/$003 therefore become $000/$400/$800/$C00. The VRC4 clones's general-purpose output port at $9C00 (pin 18) is used to select the third PRG-ROM bank and the CIRAM for all four nametables.

VRC4 registers

  • PRG-ROM select #0 ($8000, write)
  • PRG-ROM select #1 ($A000, write)
  • CHR Select Low/High ($B000-$EFFF, write)
  • IRQ Control ($F000-$FFFF, write)

These registers function identically to a normal VRC4. Note that the game uses 512 KiB of CHR-ROM, which even the original VRC4 supported. The IRQ seems to occur one M2 cycle later than on an original VRC4.

PRG-ROM select #2 ($9C00, write)

Mask: $9C04

D~7654 3210
  ---------
  ...P PPPP
     | ||||
     +-++++- Select 8 KiB PRG bank at $C000-$DFFF

CIRAM select ($9C0C-$9C0F, write)

Mask: $9C07

D~7654 3210
  ---------
  .... ...N
          +- Select 1 KiB CIRAM bank

$9C0C: Select 1 KiB CIRAM bank at PPU $2000-$23FF
$9C0D: Select 1 KiB CIRAM bank at PPU $2400-$27FF
$9C0E: Select 1 KiB CIRAM bank at PPU $2800-$2BFF
$9C0F: Select 1 KiB CIRAM bank at PPU $2C00-$2FFF

CHR-RAM Bank Selection

The game writes, via the PPU, to specific CHR banks in order to select both which and how many CHR banks are mapped to RAM instead of ROM. Writes to CHR ROM in multiples of 1 KiB:

CHRB~[. 1Z.D L.L.]
        || | | |
        |+-|-+-+---------------- Select first bank and size of CHR RAM:
        || |                      $80 = $28-$2B
        || |                      $82 = $00-$03
        || |                      $88 = $4C-$4F
        || |                      $8A = $64-$67
        || |                      $C0 = $46-$47
        || |                      $C2 = $7C-$7D
        || |                      $C8 = $04-$05
        || |                      $CA = only CHR ROM
        || +-------------------- If 1, ignore above and always enable CHR ROM / disable CHR RAM
        |+---------------------- Number of banks of CHR RAM, 0=four, 1=two
        +----------------------- Must be 1 
Power-on value: $80

The meanings are identical to INES Mapper 195 except for value $C8. The game uses different banks as CHR-RAM for different game situations, so the CHR-RAM Bank Selection feature must be emulated. Unlike Mapper 195, since there are only 2 KiB of CHR-RAM mounted on the circuit board, the 4 KiB settings cause CHR-RAM to be mirrored once, and all settings mapping the same 2 KiB of CHR-RAM.

See also

Discussion with PCB pictures