Namco 163: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(Should note the NES 2.0 situation with battery backing.)
(Redirected page to INES Mapper 019)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Mappers with CHR ROM and CHR RAM]]
#REDIRECT [[INES Mapper 019]]
{{Infobox_iNES_mapper
[[Category:Mappers with CHR ROM and CHR RAM]][[Category:Mappers using $4020-$5FFF]][[Category:ASIC mappers]][[Category:Mappers with ROM nametables]][[Category:Mappers with cycle IRQs]][[Category:Mappers with single-screen mirroring]]
|name=Namco 129/163
|company=Namco
|mapper=19
|nescartdbgames=20
|boards=11xF0, 111F0S
|complexity=ASIC
|prgmax=512K
|prgpage=8Kx3 + 8K fixed
|wrammax=8K
|wrampage=8K
|chrmax=256K
|chrpage=1Kx8 (PT) + 1Kx4 (NT)
|mirroring=arbitrary, up to 226 source nametables
|busconflicts=No
|irq=CPU cycle counter
|audio=[[Namco_163_audio|Yes]]
}}{{Infobox_iNES_mapper
|name=Namco 175
|company=Namco
|mapper=210
|nescartdbgames=4
|boards=110F0B
|complexity=ASIC
|prgmax=512K
|prgpage=8Kx3 + 8K fixed
|wrammax=8K
|wrampage=8K
|chrmax=256K
|chrpage=1Kx8
|mirroring=H or V fixed
|busconflicts=No
|irq=No
|audio=No
}}{{Infobox_iNES_mapper
|name=Namco 340
|company=Namco
|mapper=210
|nescartdbgames=8
|boards=CS000x
|complexity=ASIC
|prgmax=512K
|prgpage=8Kx3 + 8K fixed
|wrammax=none
|wrampage=none
|chrmax=256K
|chrpage=1Kx8
|mirroring=H, V, or 1 switchable
|busconflicts=No
|irq=No
|audio=No
}}
The '''Namco 163''' with expansion sound (and its predecessor '''129''' which has some mistake in the audio hardware) are assigned to '''iNES Mapper 19''', while simpler variants are assigned to [[iNES Mapper 210]]: those using the Namco '''175''' ICs have hard-wired mirroring and those using the Namco '''340''' support mapper-switchable mirroring. All four were packaged in 48-pin TQFPs (see: [[Namcot 163 family pinout]]).
 
Many older programs incorrectly identify this mapper by the name '''Namco 106'''. Some sources use the name Namcot instead of Namco, as some games and PCBs use this variation on the company name.
 
In addition to the 8 KB of PRG RAM that may be available, the Namco 163 has an additional 128 bytes of internal memory intended for [[Namco 163 audio|expansion audio]]. Any of that memory that is not used to specify sound could be used as RAM by the game.
 
Example games: (Mapper 019)
* ''Digital Devil Story - Megami Tensei II''
* ''Erika to Satoru no Yume Bouken''
* ''Famista '90''
* ''Final Lap''
* ''King of Kings (Namco)''
* ''Rolling Thunder (J)''
* ''Sangokushi I, II (Namco)''
* ''Star Wars (Namco)''
* ''Mappy Kids''
* ''Namco Classic I, II''
 
Example games: (Mapper 210)
* ''Dream Master''
* ''Famista '91 - '94''
* ''Splatter House''
* ''Wagyan Land 2, 3''
 
== Banks ==
* CPU $6000-$7FFF: 8 KB PRG RAM bank (Namco 129, 163, and 175)
* CPU $8000-$9FFF: 8 KB switchable PRG ROM bank
* CPU $A000-$BFFF: 8 KB switchable PRG ROM bank
* CPU $C000-$DFFF: 8 KB switchable PRG ROM bank
* CPU $E000-$FFFF: 8 KB PRG ROM bank, fixed to the last bank
* PPU $0000-$03FF: 1 KB switchable CHR bank
* PPU $0400-$07FF: 1 KB switchable CHR bank
* PPU $0800-$0BFF: 1 KB switchable CHR bank
* PPU $0C00-$0FFF: 1 KB switchable CHR bank
* PPU $1000-$13FF: 1 KB switchable CHR bank
* PPU $1400-$17FF: 1 KB switchable CHR bank
* PPU $1800-$1BFF: 1 KB switchable CHR bank
* PPU $1C00-$1FFF: 1 KB switchable CHR bank
* PPU $2000-$23FF: 1 KB switchable CHR bank (Namco 129/163 only)
* PPU $2400-$27FF: 1 KB switchable CHR bank (Namco 129/163 only)
* PPU $2800-$2BFF: 1 KB switchable CHR bank (Namco 129/163 only)
* PPU $2C00-$2FFF: 1 KB switchable CHR bank (Namco 129/163 only)
 
The Namco 129 and 163 have the unusual ability to select the internal 2 KB nametable RAM as a CHR bank page, allowing it to be used as CHR RAM in combination with the existing CHR ROM.
 
== Registers ==
 
The 163 has 19 registers within $4800-$5FFF and $8000-$FFFF, while the the 175 and 340 only have 12. Each register occupies a range of $800 bytes, so $4800-$4FFF all refers to one register, $5000-$57FF all refers to another register, and so on.
 
=== Sound Data Port ($4800-$4FFF) r/w (Namco 129,163 only) ===
See [[Namco 163 audio]]. Note that the 129's audio doesn't work correctly.
 
=== IRQ Counter (low) ($5000-$57FF) r/w (Namco 129,163 only) ===
7  bit  0
---- ----
IIII IIII
|||| ||||
++++-++++- Low 8 bits of IRQ counter
 
=== IRQ Counter (high) / IRQ Enable ($5800-$5FFF) r/w (Namco 129,163 only) ===
7  bit  0
---- ----
EIII IIII
|||| ||||
|+++-++++- High 7 bits of IRQ counter
+--------- IRQ Enable: (0: disabled; 1: enabled)
 
=== CHR and NT Select ($8000-$DFFF) w ===
'''Note:''' The Namco 175 and 340 do not support using nametable RAM as CHR-RAM, and the nametable selection registers have no effect.
 
{| class="wikitable"
! Value CPU writes !! Behavior
|-
| $00-$DF || Always selects 1KB page of CHR-ROM
|-
| $E0-$FF || If enabled by bit in $E800 and using a N163 or N129, use the NES's internal nametables (even values for A, odd values for B)
|}
{| class="wikitable"
! Write to CPU address !! 1KB CHR bank affected !! Values ≥ $E0 denote NES NTRAM if
|-
| $8000-$87FF || $0000-$03FF || $E800.6 = 0
|-
| $8800-$8FFF || $0400-$07FF || $E800.6 = 0
|-
| $9000-$97FF || $0800-$0BFF || $E800.6 = 0
|-
| $9800-$9FFF || $0C00-$0FFF || $E800.6 = 0
|-
| $A000-$A7FF || $1000-$13FF || $E800.7 = 0
|-
| $A800-$AFFF || $1400-$17FF || $E800.7 = 0
|-
| $B000-$B7FF || $1800-$1BFF || $E800.7 = 0
|-
| $B800-$BFFF || $1C00-$1FFF || $E800.7 = 0
|-
| $C000-$C7FF || $2000-$23FF || always
|-
| $C800-$CFFF || $2400-$27FF || always
|-
| $D000-$D7FF || $2800-$2BFF || always
|-
| $D800-$DFFF || $2C00-$2FFF || always
|}
It is believed, but untested, that a game could add a normal SRAM and use it in lieu of the nametable RAM; if so, a game would be able to get 4-screen mirroring and many more pages of CHR-RAM.
 
=== External PRG RAM enable ($C000-$C7FF) w (Namco 175 only) ===
7  bit  0
---- ----
.... ...E
        |
        +- 1: Enable PRG RAM
 
=== PRG Select 1 ($E000-$E7FF) w ===
7  bit  0
---- ----
MMPP PPPP
|||| ||||
||++-++++- Select 8KB page of PRG-ROM at $8000
|+-------- Namco 129, 163 only: Disable sound if set
++-------- Namco 340 only: Select mirroring
              0: One-screen A
              1: Vertical
              2: Horizontal
              3: One-screen B
 
=== PRG Select 2 / CHR-RAM Enable ($E800-$EFFF) w ===
7  bit  0
---- ----
HLPP PPPP
|||| ||||
||++-++++- Select 8KB page of PRG-ROM at $A000
|+-------- Disable CHR-RAM at $0000-$0FFF (Namco 129, 163 only)
|            0: Pages $E0-$FF use NT RAM as CHR-RAM
|            1: Pages $E0-$FF are the last $20 banks of CHR-ROM
+--------- Disable CHR-RAM at $1000-$1FFF (Namco 129, 163 only)
              0: Pages $E0-$FF use NT RAM as CHR-RAM
              1: Pages $E0-$FF are the last $20 banks of CHR-ROM
 
=== PRG Select 3 ($F000-$F7FF) w ===
7  bit  0
---- ----
..PP PPPP
  || ||||
  ++-++++- Select 8KB page of PRG-ROM at $C000
 
=== Write Protect for External RAM AND Sound Address Port ($F800-$FFFF) w (Namco 129, 163 only) ===
7  bit  0
---- ----
KKKK DCBA
|||| ||||
|||| |||+- 1: Write-protect 2kB window of external RAM from $6000-$67FF (0: write enable)
|||| ||+-- 1: Write-protect 2kB window of external RAM from $6800-$6FFF (0: write enable)
|||| |+--- 1: Write-protect 2kB window of external RAM from $7000-$77FF (0: write enable)
|||| +---- 1: Write-protect 2kB window of external RAM from $7800-$7FFF (0: write enable)
++++------ Additionally the upper nybble must be equal to b0100 to enable writes
 
Any value outside of the range $40-$4E will cause all PRG RAM to be read-only.
 
Also see [[Namco 163 audio]].
 
== IRQ Operation ==
The IRQ is a 15-bit CPU cycle up-counter. $5000 and $5800 provide ''direct'' access to the counter itself (i.e., this isn't a reload value). Games can read and write to these registers in realtime.
 
The IRQ counter increments on each CPU cycle. Upon reaching $7FFF, an IRQ is fired, and it stops counting. Writing to $5000 or $5800 will acknowledge any pending IRQs.
 
== Battery Backed RAM ==
The N163 supports 8k of PRG-RAM but also has 128 bytes of internal memory. Either or both may be battery backed. An [[NES_2.0#Byte 10 (RAM_size)|NES 2.0]] may be used to disambiguate this.
 
== See also ==
*[http://nesdev.org/namco106.txt Namcot 106] by goroh, fix by ZW4 and nori, english translation by nori.
*[http://nesdev.org/mappers.zip Comprehensive NES Mapper Document] by \Firebug\, information about mapper's initial state is inaccurate.
All of the below are in Japanese:
*[http://nesdev.org/namco.txt Namco mapper] by goroh
*[http://forums.nesdev.org/viewtopic.php?p=77795#77795 Naruko's post to the forum]
*[http://unagi.sourceforge.jp/cgi-bin/hiki/hiki.cgi?163_namco Wiki on same]
*[http://d.hatena.ne.jp/na6ko/20110501/1304181038 Naruko's blog's post on mirroring on the 340]
*[http://d.hatena.ne.jp/na6ko/20110430/1304099059 Naruko's blog's post on the write protect register at $F800]
[[Category:Mappers using $4020-$5FFF]][[Category:ASIC mappers]][[Category:Mappers with ROM nametables]][[Category:Mappers with cycle IRQs]][[Category:Mappers with single-screen mirroring]]

Latest revision as of 19:49, 9 August 2018

Redirect to: