INES Mapper 218: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(Created page with "Mapper 218 is used by the homebrew Magic Floor game. The cartridge contains only one single PRG-ROM chip (and a CIC, if required). There's no CHR-ROM or CHR-RAM. Instead, the...")
 
(not "four screen" nametables bit)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Mapper 218 is used by the homebrew Magic Floor game. The cartridge contains only one single PRG-ROM chip (and a CIC, if required).
[[Category:INES Mappers|218]]
'''iNES Mapper 218''' is used by the homebrew Magic Floor game. The cartridge contains only one single PRG-ROM chip (and a CIC, if required).


There's no CHR-ROM or CHR-RAM. Instead, the console's internal 2Kbyte Name Table RAM is mapped as CHR-RAM. The 2K RAM is permanently selected (/VCS wired to GND), and can be used in four modes by wiring VA10 to one of the PPU.A10..A13 address lines:
There's no CHR-ROM or CHR-RAM. Instead, the console's internal 2Kbyte Name Table RAM is mapped as CHR-RAM. The 2K RAM is permanently selected (/VCS wired to GND), and can be used in four modes by wiring VA10 to one of the PPU.A10..A13 address lines:


  VA10     Effect on                         iNES Byte 6   UNIF "MIRR"
{| class="tabular"
  to      Name Tables                      Bit3.Bit0    Bit7-0
! VA10 connection || Effect on nametables || [[iNES]] Flags 6 || UNIF "MIRR" bit 7-0
  PPU.A10 Two-Screen, Vertical Mirroring   0.1          01h
|-
  PPU.A11 Two-Screen, Horizontal Mirroring 0.0          00h
| PPU.A10 || Two-Screen, Vertical Mirroring   || $A1 (0001) || $01
  PPU.A12 One-Screen, BLK0                 1.0          02h
|-
  PPU.A13 One-Screen, BLK1                 1.1          03h
| PPU.A11 || Two-Screen, Horizontal Mirroring || $A0 (0000) || $00
  Note: Bit 3 in Byte 6 of iNES header would be usually Four-Screen flag,
|-
  but, for this mapper it is used as One-Screen flag.
| PPU.A12 || One-Screen, BLK0                 || $A8 (1000) || $02
|-
| PPU.A13 || One-Screen, BLK1                 || $A9 (1001) || $03
|}
Note: The "alternative nametables" bit 3 in Byte 6 of iNES header is commonly thought as meaning four screens, but for this mapper it is used to choose between the two one-screen layouts.


The VA10 connection does, of course, also affect the CHR-RAM mapping at 0000h-1FFFh. BLK1 would be the most common case (1K NT plus 1K CHR-RAM). BLK0 would allow to swap CHR RAM via Port 2000h.Bit3-4. Two-Screen would allow to use two NTs (and to squeeze CHR data into unused NT areas). Two-Screen would also allow to use 2K OBJ tiles (when leaving BG unused).
The VA10 connection also affects the CHR-RAM mapping at 0000h-1FFFh. BLK1 would be the most common case (1K NT plus 1K CHR-RAM). BLK0 would allow to swap CHR RAM via Port 2000h.Bit3-4. Two-Screen would allow to use two NTs (and to squeeze CHR data into unused NT areas). Two-Screen would also allow to use 2K OBJ tiles (when leaving BG unused).


Note: 1K CHR-RAM allows to use as much as 64 tiles of 2bpp (or, with suitable color attributes, 128 monochrome tiles of 1bpp).
Note: 1K CHR-RAM allows to use as much as 64 tiles of 2bpp (or, with suitable color attributes, 128 monochrome tiles of 1bpp).


* http://forums.nesdev.org/viewtopic.php?f=2&t=9342 - nesdev forum, Post subject: Single Chip Cartridge
Also note that with if reads/writes to mirrored addresses are avoided, software for this mapper can also be made compatible with [[AxROM]] ($A8,$A9), [[BxROM]] ($A0,A1) or [[NROM]] + CHR-RAM, or other suitable mappers. ''Magic Floor'' itself is well behaved enough to be emulated as AxROM or NROM + CHR-RAM with vertical mirroring.
* http://nocash.emubase.de/magicflr.htm - Magic Floor game
 
It has been used in two games, and one test ROM:
* [//problemkaputt.de/magicflr.htm ''Magic Floor''] ($A8)
* [//problemkaputt.de/starfigh.htm ''Starfight''] ($A8)
* [//forums.nesdev.org/viewtopic.php?p=232238#p232238 OAM corruption stress test ROM] ($A0)
 
== References ==
* [//forums.nesdev.org/viewtopic.php?t=9342 nesdev forum, Post subject: Single Chip Cartridge]
* [//forums.nesdev.org/viewtopic.php?t=5156 nesdev forum, Post subject: Using the NES's PPU RAM as CHR RAM?]

Latest revision as of 10:10, 1 February 2024

iNES Mapper 218 is used by the homebrew Magic Floor game. The cartridge contains only one single PRG-ROM chip (and a CIC, if required).

There's no CHR-ROM or CHR-RAM. Instead, the console's internal 2Kbyte Name Table RAM is mapped as CHR-RAM. The 2K RAM is permanently selected (/VCS wired to GND), and can be used in four modes by wiring VA10 to one of the PPU.A10..A13 address lines:

VA10 connection Effect on nametables iNES Flags 6 UNIF "MIRR" bit 7-0
PPU.A10 Two-Screen, Vertical Mirroring $A1 (0001) $01
PPU.A11 Two-Screen, Horizontal Mirroring $A0 (0000) $00
PPU.A12 One-Screen, BLK0 $A8 (1000) $02
PPU.A13 One-Screen, BLK1 $A9 (1001) $03

Note: The "alternative nametables" bit 3 in Byte 6 of iNES header is commonly thought as meaning four screens, but for this mapper it is used to choose between the two one-screen layouts.

The VA10 connection also affects the CHR-RAM mapping at 0000h-1FFFh. BLK1 would be the most common case (1K NT plus 1K CHR-RAM). BLK0 would allow to swap CHR RAM via Port 2000h.Bit3-4. Two-Screen would allow to use two NTs (and to squeeze CHR data into unused NT areas). Two-Screen would also allow to use 2K OBJ tiles (when leaving BG unused).

Note: 1K CHR-RAM allows to use as much as 64 tiles of 2bpp (or, with suitable color attributes, 128 monochrome tiles of 1bpp).

Also note that with if reads/writes to mirrored addresses are avoided, software for this mapper can also be made compatible with AxROM ($A8,$A9), BxROM ($A0,A1) or NROM + CHR-RAM, or other suitable mappers. Magic Floor itself is well behaved enough to be emulated as AxROM or NROM + CHR-RAM with vertical mirroring.

It has been used in two games, and one test ROM:

References