INES Mapper 178: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(Add PCB names.)
(Add information on Jncota cartridges using this chipset with CHR-ROM; shorten descripton of PRG banking modes)
Line 1: Line 1:
{{DEFAULTSORT:178}}[[Category:iNES Mappers]][[Category:Mappers using $4020-$5FFF]][[Category:Mappers with large PRG RAM]]iNES Mapper 178 is used by some games from Waixing (on a PCB named '''FS305'''), Nanjing (on a PCB named '''NJ0430''') and Henge Dianzi as well as some educational computers from GameStar, a.k.a. Belsonic. It always uses CHR-RAM and can use up to 32 KiB of PRG-RAM, banked in 8 KiB amounts.  
{{DEFAULTSORT:178}}[[Category:iNES Mappers]][[Category:Mappers using $4020-$5FFF]][[Category:Mappers with large PRG RAM]]'''iNES Mapper 178''' is used by some games from Waixing (on a PCB named '''FS305'''), Nanjing (on a PCB named '''NJ0430'''), Jncota and Henge Dianzi as well as some educational computers from GameStar, a.k.a. Belsonic. The chipset is designed for using 8 KiB of chip-internal unbanked CHR-RAM, but can address external RAM as well, banked in 8 KiB amounts, which can be connected on the circuit board as PRG-RAM, CHR-RAM or CHR-ROM.  


=Registers=
=Registers=
Line 5: Line 5:
  7654 3210
  7654 3210
  ---------
  ---------
  .... .PPM
  .... .SSM
       ||+- Select nametable mirroring type
       ||+- Nametable mirroring
       ||    0: Vertical
       ||    0: Vertical
       ||    1: Horizontal
       ||    1: Horizontal
       ++-- Select PRG banking mode
       |+-- PRG banking mode
             0: 32 KiB PRG-ROM bank at CPU $8000-$FFFF, low bank bit 0 ignored
             0: NROM-128/BNROM (PRG A14=CPU A14)
             1: 16 KiB PRG-ROM bank at CPU $8000-$BFFF comprised of selectable high and low banks
             1: UNROM (PRG A14..16=111b if CPU A14=1)
                16 KiB PRG-ROM bank at CPU $C000-$FFFF comprised of selectable high and fixed low bank 7
             2: NROM-128
             2: 16 KiB PRG-ROM bank at CPU $8000-$BFFF comprised of selectable high and low banks
             3: UNROM but with bit 0 of "fixed" bank selectable
                16 KiB PRG-ROM bank at CPU $C000-$FFFF being a mirror of $8000-$BFFF
                 (PRG A15..16=11b if CPU A14=1)
             3: 16 KiB PRG-ROM bank at CPU $8000-$BFFF comprised of selectable high and low banks
                16 KiB PRG-ROM bank at CPU $C000-$FFFF comprised of selectable high, fixed low bank bits 1-2
                 and selectable low bank bit 0 (i.e. low bank register content OR 6)
 
Banking modes 2 and 3 are rarely used. One multicart that uses them is ''4-in-1 (SO1)''.
 
==Low PRG Bank Register ($4801)==
==Low PRG Bank Register ($4801)==
  7654 3210
  7654 3210
  ---------
  ---------
  .... .LLL
  .... .LLL
       +++- 16 KiB bank number bits 0-2.
       +++- PRG A16..A14
 
Bit 0 is ignored in 32 KiB PRG banking mode.


This can be considered an inner bank register for UNROM mode.
==High PRG Bank Register ($4802)==
==High PRG Bank Register ($4802)==
  7654 3210
  7654 3210
  ---------
  ---------
  HHHH HHHH
  HHHH HHHH
  ++++-++++ 16 KiB bank number bits 3-10.
  ++++-++++ PRG A17..A24?
 
The final 16 KiB PRG-ROM bank number thus is $4801 OR ($4802 SHL 3).


==WRAM Bank Register ($4803) ==
This can be considered an outer bank register for UNROM mode.
==External RAM/ROM Bank Register ($4803) ==
  7654 3210
  7654 3210
  ---------
  ---------
  .... ..BB
  BBBB BBBB
        ++ Select 8 KiB WRAM bank at CPU $6000-$7FFF
++++ ++++ External A13..A20


If a cartridge has CHR-ROM, this register selects the 8 KiB CHR-ROM bank, otherwise it selects an 8 KiB PRG-RAM bank at CPU $6000-$7FFF.
==Infrared==
==Infrared==
Apparently some cartridge have an infrared sensor. Infrared receiving is working by having two registers:
Some cartridges have an additional infrared sensor. Infrared receiving is working by having two registers:
   $5000-$5FFF:  [.... ...V]  (read only)
   $5000-$5FFF:  [.... ...V]  (read only)
     V = read current bit from IR sensor
     V = read current bit from IR sensor
Line 57: Line 50:
* Supposedly, the new PRG bank is only committed when $4801 is written. Emulating this supposed behavior however will break ''Ping Pong'', while commiting the PRG bank after any $480x write does not seem to break anything else.
* Supposedly, the new PRG bank is only committed when $4801 is written. Emulating this supposed behavior however will break ''Ping Pong'', while commiting the PRG bank after any $480x write does not seem to break anything else.
* Most of the educational computers using this mapper require Dendy video timing and will freeze at various points when run with NTSC timing.
* Most of the educational computers using this mapper require Dendy video timing and will freeze at various points when run with NTSC timing.
==See also==
* The Waixing FS305 circuit board connects PRG A14 directly to CPU A14, making all PRG banking modes except BNROM unusable. Since it writes the correct banking mode to $4800, it does not require any special treatment.
=See also=
* https://forums.nesdev.org/viewtopic.php?t=16657
* https://forums.nesdev.org/viewtopic.php?t=16657

Revision as of 16:18, 3 November 2019

iNES Mapper 178 is used by some games from Waixing (on a PCB named FS305), Nanjing (on a PCB named NJ0430), Jncota and Henge Dianzi as well as some educational computers from GameStar, a.k.a. Belsonic. The chipset is designed for using 8 KiB of chip-internal unbanked CHR-RAM, but can address external RAM as well, banked in 8 KiB amounts, which can be connected on the circuit board as PRG-RAM, CHR-RAM or CHR-ROM.

Registers

Mode Register ($4800)

7654 3210
---------
.... .SSM
      ||+- Nametable mirroring
      ||    0: Vertical
      ||    1: Horizontal
      |+-- PRG banking mode
            0: NROM-128/BNROM (PRG A14=CPU A14)
            1: UNROM (PRG A14..16=111b if CPU A14=1)
            2: NROM-128
            3: UNROM but with bit 0 of "fixed" bank selectable
               (PRG A15..16=11b if CPU A14=1)

Low PRG Bank Register ($4801)

7654 3210
---------
.... .LLL
      +++- PRG A16..A14

This can be considered an inner bank register for UNROM mode.

High PRG Bank Register ($4802)

7654 3210
---------
HHHH HHHH
++++-++++ PRG A17..A24?

This can be considered an outer bank register for UNROM mode.

External RAM/ROM Bank Register ($4803)

7654 3210
---------
BBBB BBBB
++++ ++++ External A13..A20

If a cartridge has CHR-ROM, this register selects the 8 KiB CHR-ROM bank, otherwise it selects an 8 KiB PRG-RAM bank at CPU $6000-$7FFF.

Infrared

Some cartridges have an additional infrared sensor. Infrared receiving is working by having two registers:

 $5000-$5FFF:  [.... ...V]  (read only)
    V = read current bit from IR sensor
 $6000-$7FFF:  [I... ....]  (write only)
    I = set to activate interrupts by infrared signal

Errata

  • The commonly-available ROM images of
    • 宠物: 小精灵 IV (Chǒngwù: Xiǎo Jīnglíng IV), headerless CRC32 0xB0B13DBD
    • Education Computer 32-in-1 (Game Star) [!], headerless CRC32 0xF834F634
will not work when emulated using the above description. The meaning of registers $4801 and $4802 is swapped, and an emulator must shift the value of $4802 one bit to the left before ORing with $4801. While it cannot be ruled out that these games use an alternative version of the hardware, the more likely explanation is that these are simply bad dumps (notwithstanding GoodNES 3.23b's [!] tag) where the dumper confused the two bank registers.
  • Supposedly, the new PRG bank is only committed when $4801 is written. Emulating this supposed behavior however will break Ping Pong, while commiting the PRG bank after any $480x write does not seem to break anything else.
  • Most of the educational computers using this mapper require Dendy video timing and will freeze at various points when run with NTSC timing.
  • The Waixing FS305 circuit board connects PRG A14 directly to CPU A14, making all PRG banking modes except BNROM unusable. Since it writes the correct banking mode to $4800, it does not require any special treatment.

See also