| Everynes - Nocash NES Specs |
| Tech Data |
| Memory Maps |
0000h-07FFh Internal 2K Work RAM (mirrored to 800h-1FFFh) 2000h-2007h Internal PPU Registers (mirrored to 2008h-3FFFh) 4000h-4017h Internal APU Registers 4018h-5FFFh Cartridge Expansion Area almost 8K 6000h-7FFFh Cartridge SRAM Area 8K 8000h-FFFFh Cartridge PRG-ROM Area 32K |
0000h-0FFFh Pattern Table 0 (4K) (256 Tiles) 1000h-1FFFh Pattern Table 1 (4K) (256 Tiles) 2000h-23FFh Name Table 0 and Attribute Table 0 (1K) (32x30 BG Map) 2400h-27FFh Name Table 1 and Attribute Table 1 (1K) (32x30 BG Map) 2800h-2BFFh Name Table 2 and Attribute Table 2 (1K) (32x30 BG Map) 2C00h-2FFFh Name Table 3 and Attribute Table 3 (1K) (32x30 BG Map) 3000h-3EFFh Mirror of 2000h-2EFFh 3F00h-3F1Fh Background and Sprite Palettes (25 entries used) 3F20h-3FFFh Mirrors of 3F00h-3F1Fh |
00-FF Sprite Attributes (256 bytes, for 64 sprites / 4 bytes each) |
| I/O Map |
2000h - PPU Control Register 1 (W) 2001h - PPU Control Register 2 (W) 2002h - PPU Status Register (R) 2003h - SPR-RAM Address Register (W) 2004h - SPR-RAM Data Register (RW) 2005h - PPU Background Scrolling Offset (W2) 2006h - VRAM Address Register (W2) 2007h - VRAM Read/Write Data Register (RW) 4000h - APU Channel 1 (Rectangle) Volume/Decay 4001h - APU Channel 1 (Rectangle) Sweep 4002h - APU Channel 1 (Rectangle) Frequency 4003h - APU Channel 1 (Rectangle) Length 4004h - APU Channel 2 (Rectangle) Volume/Decay 4005h - APU Channel 2 (Rectangle) Sweep 4006h - APU Channel 2 (Rectangle) Frequency 4007h - APU Channel 2 (Rectangle) Length 4008h - APU Channel 3 (Triangle) Linear Counter 4009h - APU Channel 3 (Triangle) N/A 400Ah - APU Channel 3 (Triangle) Frequency 400Bh - APU Channel 3 (Triangle) Length 400Ch - APU Channel 4 (Noise) Volume/Decay 400Dh - APU Channel 4 (Noise) N/A 400Eh - APU Channel 4 (Noise) Frequency 400Fh - APU Channel 4 (Noise) Length 4010h - APU Channel 5 (DMC) Play mode and DMA frequency 4011h - APU Channel 5 (DMC) Delta counter load register 4012h - APU Channel 5 (DMC) Address load register 4013h - APU Channel 5 (DMC) Length register 4014h - SPR-RAM DMA Register 4015h - DMC/IRQ/length counter status/channel enable register (RW) 4016h - Joypad #1 (RW) 4017h - Joypad #2/APU SOFTCLK (RW) |
4020h - VS Unisystem Coin Acknowlege 4020h-40FFh - Famicom Disk System (FDS) 4100h-FFFFh - Various addresses used by various cartridge mappers |
| Picture Processing Unit (PPU) |
| PPU Control and Status Registers |
Bit7 Execute NMI on VBlank (0=Disabled, 1=Enabled) Bit6 PPU Master/Slave Selection (0=Master, 1=Slave) (Not used in NES) Bit5 Sprite Size (0=8x8, 1=8x16) Bit4 Pattern Table Address Background (0=VRAM 0000h, 1=VRAM 1000h) Bit3 Pattern Table Address 8x8 Sprites (0=VRAM 0000h, 1=VRAM 1000h) Bit2 Port 2007h VRAM Address Increment (0=Increment by 1, 1=Increment by 32) Bit1-0 Name Table Scroll Address (0-3=VRAM 2000h,2400h,2800h,2C00h) (That is, Bit0=Horizontal Scroll by 256, Bit1=Vertical Scroll by 240) |
Bit7-5 Color Emphasis (0=Normal, 1-7=Emphasis) (see Palettes chapter) Bit4 Sprite Visibility (0=Not displayed, 1=Displayed) Bit3 Background Visibility (0=Not displayed, 1=Displayed) Bit2 Sprite Clipping (0=Hide in left 8-pixel column, 1=No clipping) Bit1 Background Clipping (0=Hide in left 8-pixel column, 1=No clipping) Bit0 Monochrome Mode (0=Color, 1=Monochrome) (see Palettes chapter) |
Bit7 VBlank Flag (1=VBlank) Bit6 Sprite 0 Hit (1=Background-to-Sprite0 collision) Bit5 Lost Sprites (1=More than 8 sprites in 1 scanline) Bit4-0 Not used (Undefined garbage) |
| PPU SPR-RAM Access Registers |
D7-D0: 8bit address in SPR-RAM (00h-FFh) |
D7-D0: 8bit data written to SPR-RAM. |
Bit7-0 Upper 8bit of source address (Source=N*100h) (Lower bits are zero) |
| PPU VRAM Access Registers |
Port 2005h-1st write: Horizontal Scroll Origin (X*1) (0-255) Port 2005h-2nd write: Vertical Scroll Origin (Y*1) (0-239) Port 2000h-Bit0: Horizontal Name Table Origin (X*256) Port 2000h-Bit1: Vertical Name Table Origin (Y*240) |
Port 2006h-1st write: VRAM Address Pointer MSB (6bit) Port 2006h-2nd write: VRAM Address Pointer LSB (8bit) |
Bit7-0 8bit data read/written from/to VRAM |
| PPU Scrolling |
VRAM-Pointer Scroll-Reload A8 2006h/1st-Bit0 <--> Y*64 2005h/2nd-Bit6 A9 2006h/1st-Bit1 <--> Y*128 2005h/2nd-Bit7 A10 2006h/1st-Bit2 <--> X*256 2000h-Bit0 A11 2006h/1st-Bit3 <--> Y*240 2000h-Bit1 A12 2006h/1st-Bit4 <--> Y*1 2005h/2nd-Bit0 A13 2006h/1st-Bit5 <--> Y*2 2005h/2nd-Bit1 - 2006h/1st-Bit6 <--> Y*4 2005h/2nd-Bit2 - 2006h/1st-Bit7 <--> - - A0 2006h/2nd-Bit0 <--> X*8 2005h/1st-Bit3 A1 2006h/2nd-Bit1 <--> X*16 2005h/1st-Bit4 A2 2006h/2nd-Bit2 <--> X*32 2005h/1st-Bit5 A3 2006h/2nd-Bit3 <--> X*64 2005h/1st-Bit6 A4 2006h/2nd-Bit4 <--> X*128 2005h/1st-Bit7 A5 2006h/2nd-Bit5 <--> Y*8 2005h/2nd-Bit3 A6 2006h/2nd-Bit6 <--> Y*16 2005h/2nd-Bit4 A7 2006h/2nd-Bit7 <--> Y*32 2005h/2nd-Bit5 - - <--> X*1 2005h/1st-Bit0 - - <--> X*2 2005h/1st-Bit1 - - <--> X*4 2005h/1st-Bit2 |
[2006h.1st]=(X/256)*4 + (Y/240)*8 [2005h.2nd]=((Y MOD 240) AND C7h) [2005h.1st]=(X AND 07h) [2006h.2nd]=(X AND F8h)/8 + ((Y MOD 240) AND 38h)*4 |
| PPU Tile Memory |
| PPU Background |
Bit0-1 Palette Number for upperleft 16x16 pixels of the 32x32 area Bit2-3 Palette Number for upperright 16x16 pixels of the 32x32 area Bit4-5 Palette Number for lowerleft 16x16 pixels of the 32x32 area Bit6-7 Palette Number for lowerright 16x16 pixels of the 32x32 area |
Square Horizontal Scroll Vertical Scroll NT0 NT1 NT0 left/right NT1 NT0 above/below NT2 NT2 NT3 NT2 left/right NT3 NT1 above/below NT3 |
_Name Table____________NT0___NT1___NT2___NT3___Purpose______________ Horizontal Mirroring BLK0 BLK0 BLK1 BLK1 Vertical Scrolling Vertical Mirroring BLK0 BLK1 BLK0 BLK1 Horizontal Scrolling Four-screen BLK0 BLK1 BLK2 BLK3 Four-Way Scrolling |
| PPU Sprites |
Vertical Position-1 (FFh,00h..EEh=Scanline 0..239, EFh..FEh=Not displayed) |
Bit7-0 Specifies 8bit tile number And, Pattern Table selected by Bit 3 in PPU Control Register 1 |
Bit7-1 Upper 7bit of tile number (N=0-127 uses Tiles N*2 and N*2+1) Bit0 Pattern Table Address (0=VRAM 0000h, 1=VRAM 1000h) |
7 Vertical Flip (0=Normal, 1=Mirror) 6 Horizontal Flip (0=Normal, 1=Mirror) 5 Background Priority (0=Sprite In front of BG, 1=Sprite Behind BG) 4-2 Not used (Always zero when reading from SPR-RAM) 1-0 Sprite Palette (0-3=Sprite Palette 0-3) |
Horizontal Position (00h..FFh) |
Sprite 0 = highest priority Sprite 63 = lowest priority |
| PPU Palettes |
3F00h Background Color (Color 0) 3F01h-3F03h Background Palette 0 (Color 1-3) 3F05h-3F07h Background Palette 1 (Color 1-3) 3F09h-3F0Bh Background Palette 2 (Color 1-3) 3F0Dh-3F0Fh Background Palette 3 (Color 1-3) 3F11h-3F13h Sprite Palette 0 (Color 1-3) 3F15h-3F17h Sprite Palette 1 (Color 1-3) 3F19h-3F1Bh Sprite Palette 2 (Color 1-3) 3F1Dh-3F1Fh Sprite Palette 3 (Color 1-3) |
3F04h,3F08h,3F0Ch - Three general purpose 6bit data registers. 3F10h,3F14h,3F18h,3F1Ch - Mirrors of 3F00h,3F04h,3F08h,3F0Ch. 3F20h-3FFFh - Mirrors of 3F00h-3F1Fh. |
Bit7-6 Not used (contains garbage when reading palette memory) Bit5-4 Luminance (Grayscale) (0-3) Bit3-0 Chrominance (Color) (0-F) |
|__0__|__1___2___3___4___5___6___7___8___9___A___B___C_|_D__|__E___F__| |White|..Blue..Magenta..Red......Yellow...Green....Blue|Gray| Black | |
Luminance__0Xh_______1Xh__________2Xh_________3Xh___________________ Color 0: Med Gray, Light Gray, White, White Color 1-C: (Dark), (Normal), (Brighter), (Brightest/Pastelized) Color D: Reserved, Black, Dark Gray, Lighter Gray Color E-F: Black, Black, Black, Black |
000b Normal 001b Green 010b Brown 100b Blue |
| PPU Dimensions & Timings |
Item NTSC PAL Video Clock 21.47727MHz 26.601712MHz CPU Clock 1.7897725MHz 1.7734474MHz Clock Divider CPU=Video/12 CPU=Video/15 Cycles/Scanline 113.66; 1364/12 106.53; 1598/15 Total Scanlines 262 (240+22) 312 (240+72) Frame Rate 60.098Hz 53.355Hz |
1) Delay Loops synchronized with NMI (badly wasting CPU time) or using
meaningful code with fixed non-conditional execution time instead delays.
2) Producing a "Sprite 0 Hit", or a "More Than 8 Sprites Per Scanline"
situation at specific screen location (which sets corresponding flag in
PPU Status Register, one cannot reset the flag manually, so either works
only once per frame)
3) Using PCM Sound IRQs as Timer (synchronized with NMI)
4) Using external Timers (contained in some Cartridge Mappers)
|
| PPU 2C02 Timings |
- Pixels are rendered at the same rate as the base PPU clock.
In other words, 1 clock cycle= 1 pixel.
- One frame consists of 262 scanlines.
This equals 341*262 PPU cc's per frame (divide by 3 for # of CPU cc's).
- 341 PPU cc's make up the time of a typical scanline (or 341/3 CPU cc's).
|
- Reading from $2002 clears the vblank flag (bit 7), and resets the
internal $2005/6 flip-flop. Writes here have no effect.
- $2002.5 and $2002.6 after being set, stay that way for the first 20
scanlines of the new frame, relative to the VINT.
- Pin /VBL on the 2C02 is the logical NAND between 2002.7 and 2000.7.
|
| Audio Processing Unit (APU) |
| APU Channel 1-4 Register 0 (Volume/Decay) |
0-3 Volume / Envelope decay rate
When Bit4=1: Volume (0=Silent/None..F=Loud/Max)
When Bit4=0: Envelope decay rate, NTSC=240Hz/(N+1), PAL=192Hz/(N+1)
4 Envelope decay disable (0=Envelope/Decay, 1=Fixed Volume)
5 Length counter clock disable / Envelope decay looping enable
When Bit4=1: length counter clock disable
When Bit4=0: envelope decay looping enable
0: Disable Looping, stay at 0 on end of decay [ \_____ ]
1: Enable Looping, restart decay at F [ \\\\\\ ]
(Does this still affect Length counter clock disable ?)
6-7 Duty cycle type (unused on noise channel)
0 [--______________] 12.5% Whereas,
1 [----____________] 25.0% [_] = LOW (zero) (0)
2 [--------________] 50.0% [-] = HIGH (volume/decay) (0..F)
3 [------------____] 75.0% Noise randomly outputs LOW or HIGH
|
0-6 linear counter load register 7 length counter clock disable / linear counter start |
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,F,E,D,C,B,A,9,8,7,6,5,4,3,2,1,0 |
| APU Channel 1-4 Register 1 (Sweep) |
0-2 Sweep right shift amount (S=0..7) 3 Sweep Direction (0=[+]Increase, 1=[-]Decrease) 4-6 Sweep update rate (N=0..7), NTSC=120Hz/(N+1), PAL=96Hz/(N+1) 7 Sweep enable (0=Disable, 1=Enable) |
Wavelength = Wavelength +/- (Wavelength SHR S) (For Channel 1 Decrease only: minus an additional 1) (Ie. in Decrease mode: Channel 1 uses NOT, Channel 2 uses NEG) |
Bit 7 is set (sweeping enabled) The shift value (which is S in the formula) does not equal to 0 The channel's length counter contains a non-zero value |
1) current 11bit wavelength value is less than 008h 2) new 11bit wavelength would become greater than 7FFh |
0-7 Unused (No Sweep support for these channels) |
| APU Channel 1-4 Register 2 (Frequency) |
0-7 Lower 8 bits of wavelength (upper 3 bits in Register 3) |
0-3 Noise frequency, F=1.79MHz/2/(N+1)
Value 0..F corresponds to following 11bit clock cycle value:
N=002,004,008,010,020,030,040,050,065,07F,0BE,0FE,17D,1FC,3F9,7F2
4-6 Unused
7 Random number type generation (0=32767 bits, 1=93 bits)
|
| APU Channel 1-4 Register 3 (Length) |
2-0 Upper 3 bits of wavelength (unused on noise channel) 7-3 Length counter load register (5bit value, see below) |
Bit3=0 and Bit7=0 (Dividers matched for use with PAL/50Hz)
Bit6-4 (0..7 = 05h,0Ah,14h,28h,50h,1Eh,07h,0Dh)
Bit3=0 and Bit7=1 (Dividers matched for use with NTSC/60Hz)
Bit6-4 (0..7 = 06h,0Ch,18h,30h,60h,24h,08h,10h)
Bit3=1 (General Fixed Dividers)
Bit7-4 (0..F = 7Fh,01h..0Fh)
|
| APU Channel 5 - DMC Sound |
7 IRQ Enable, when Length=0 AND Loop=Disabled (0=Disable, 1=Enable)
DMC IRQs can be acknowledged by writing 0 to Bit7 of 4010h, or
by writing any value to 4015h
6 Loop when reaching Length=0 (0=Stop, 1=Loop)
In looped mode, the sample block is restarted by reloading the
DMA Start Address and Length values, IRQs are not generated.
5-4 Appear to be unused
3-0 DMC frequency control. For values 0-F, number of cycles/samplebyte are:
D60,BE0,AA0,A00,8F0,7F0,710,6B0,5F0,500,470,400,350,2A8,240,1B0
|
7 Appears to be unused 6-1 MSBs of 7bit DAC (6bit "Delta Counter") 0 LSB of 7bit DAC |
7-0 DMA Start Address for DMC (Address = C000h+N*40h) |
7-0 DMA Length DMC (Length = N*10h+1 Bytes = N*80h+8 Bits) |
1 = Increment Delta counter by 1 (unless result would be greater than 3Fh) 0 = Decrement Delta counter by 1 (unless result would be less than 0) |
| APU Control and Status Registers |
0 Status/Enable rectangle wave channel 1 1 Status/Enable rectangle wave channel 2 2 Status/Enable triangle wave channel 3 3 Status/Enable noise channel 4 4 Status/Enable DMC channel 5 5 Not used (returns garbage on reading) 6 Frame IRQ status (active when set) 7 DMC's IRQ status (active when set) |
bit6: Frame IRQ Disable (0=Enable Frame IRQ, 1=Disable Frame IRQ) bit7: Frame Rate Select (0=NTSC=60Hz=240Hz/4, 1=PAL=48Hz=240Hz/5) |
! These timings are NOT physically related to actual PPU VBlank/NMI timings ! |
0/NTSC: 4,0,1,2,3,0,1,2,3,0,1,2,3 | 1/PAL: 0,1,2,3,4,0,1,2,3,4,0,1,2,3,4 240Hz: __-_-_-_-_-_-_-_-_-_-_-_- | 192Hz: -_-_-_-___-_-_-_-___-_-_-_-__ 120Hz: ____-___-___-___-___-___- | 96Hz: __-___-_____-___-_____-___-__ 60Hz: (above somehow div by 2) | 48Hz: (above somehow divided by 2) |
| APU 4-bit DAC |
| APU Various |
| APU External Sound Channels |
| Controllers |
| Controllers - I/O Ports |
2-0 OUT2-0 Expansion Port Outputs 0 OUT0 NES/Famicom: Joypad 1+2 Strobe (for BOTH joypads) |
Bit Name NES Famicom Purpose 7-5 N/A Not used (undefined) Not used (undefined) - 4 PORT0-4 Expansion/Gameport Not used (undefined) Zapper 1 Button 3 PORT0-3 Expansion/Gameport Not used (undefined) Zapper 1 Light 2 PORT0-2 Expansion Microphone Input Microphone 1 PORT0-1 Expansion Expansion Exp. 0 PORT0-0 Expansion/Gameport Joypad Joypad 1 |
Bit Name NES Famicom Purpose 7-5 N/A Not used (undefined) Not used (undefined) - 4 PORT1-4 Expansion/Gameport Expansion Zapper 2 Button 3 PORT1-3 Expansion/Gameport Expansion Zapper 2 Light 2 PORT1-2 Expansion Expansion Exp. 1 PORT1-1 Expansion Expansion Exp. 0 PORT1-0 Expansion/Gameport Expansion/Joypad Joypad 2 |
| Controllers - Pin-Outs |
Pin Dir Player 1 Player 2 Expl. _________ 1 Out GND GND Ground | 4 3 2 1 | 2 Out PORT0-CLK PORT1-CLK Joystick Clock (CPU Port Read) |_7_6_5__/ 3 Out OUT0 OUT0 Joystick Serial-Start 4 In PORT0-0 PORT1-0 Joystick Serial-Data _________ 5 Out +5VDC +5VDC Supply | 4 3 2 1 | 6 In PORT0-3 PORT1-3 Zapper Light |_7_6_5__/ 7 In PORT0-4 PORT1-4 Zapper Button |
1 Out GND ------------------------ 2 Out SOUND OUT | 8 7 6 5 4 3 2 1 | 3 I/O /IRQ \ 15 14 13 12 11 10 9 / 4 In port1-D4 (zapper button) -------------------- 5 In port1-D3 (zapper light) 6 In port1-D2 7 In port1-D1 (joystick 4 serial input) (paddle ADC serial input) 8 In port1-D0 (joystick 2 serial input) 9 Out port1-CLK (joystick 2+4 clock read) 10 Out OUT2 11 Out OUT1 12 Out OUT0 (joystick 1+2+3+4 start) 13 In port0-D1 (joystick 3 serial input) (paddle button input) 14 Out port0-CLK (joystick 1+3 clock read) 15 Out +5V |
| Controllers - Joypads |
A, B, SELECT, START, UP, DOWN, LEFT, RIGHT |
write "1-then-0" to (4016h) (that only once, for all 24 bits) read 1st 8 bits: controller 1 (4016h) / controller 2 (4017h) (as normal) read 2nd 8 bits: controller 3 (4016h) / controller 4 (4017h) (new ports) read 3rd 8 bits: 0,0,0,1,0,0,0,0 (4016h) / 0,0,1,0,0,0,0,0 (4017h) (ID codes) |
___________________________________ | _ | | _| |_ Nintendo | | |_ _| SELECT START | | |_| (==) (==) ( B ) ( A ) | |___________________________________| |
| Controllers - Zapper |
Bit4 Trigger state of the gun (0=Released, 1=Pulled/Pressed) Bit3 State of the gun sight (0=None, 1=Light detected) |
| Controllers - Paddles |
| Controllers - Keyboard |
[4016h]=05h:WAIT(16clks) ;reset (force row 0)
FOR i=0 TO 8 ;loop 9 rows
[4016h]=04h:WAIT(56clks) ;request LSB of NEXT row
Row[i]=(([4017h] SHR 1) AND 0Fh) ;read LSB
[4016h]=06h:WAIT(56clks) ;request MSB of SAME row
Row[i]=(([4017h] SHL 3) AND F0h)+Row[i] ;read MSB
NEXT ;loop next
|
Row Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 0 F8 RETURN [ ] KANA R-SHFT \(Yen) STOP 1 F7 @ : ; _ / - ^ 2 F6 O L K . , P 0 3 F5 I U J M N 9 8 4 F4 Y G H B V 7 6 5 F3 T R D F C 5 4 6 F2 W S A X Z E 3 7 F1 ESC Q CTRL L-SHFT GRPH 1 2 8 CLR UP RIGHT LEFT DOWN SPACE DEL INS |
________________________________________________ | F1 F2 F3 F4 F5 F6 F7 F8 | | 1 2 3 4 5 6 7 8 9 0 - ^ \ STOP | | ESC Q W E R T Y U I O P @ [ ENTER CLR INS DEL | | CTRL A S D F G H J K L ; : ] KANA UP | | SHIFT Z X C V B N M , . / _ SHIFT LEFT RIGHT | |______GRPH____SPACE____________________DOWN_____| |
Row Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 0 4 G F C F2 E 5 V 1 2 D S END F1 W 3 X 2 INS BS PGDN RIGHT F8 PGUP ESC HOME 3 9 I L , F5 O 0 . 4 ] ENTER UP LEFT F7 [ \ DOWN 5 Q CAPS Z Pa ESC A 1 CTRL 6 7 Y K M F4 U 8 J 7 - ; ' / F6 P = SHIFT 8 T H N SPACE F3 R 6 B |
____________________________________________________________ | ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Pa. Br Nu Re. | | ~ 1 2 3 4 5 6 7 8 9 0 - + BS HOME | | TAB Q W E R T Y U I O P [ ] \ END | | CAPS A S D F G H J K L ; ' ENTER PGUP | | SHIFT Z X C V B N M , . / SHIFT UP PGDN | |_###_CTRL_ALT_##_[______SPACE______]_ALT_INS_DEL_LT_DN_RIGH_| |
OUT.0 Keyboard Strobe/Reset (0=Normal, 1=Initialize) OUT.1 Keyboard Clock (0=LSB, 1=MSB) (1-to-0=Next Row) OUT.2 Tape Output? (Should be 1 when accessing Keyboard) PORT0-1 Tape Input PORT1-4..1 Keyboard Input Bit3..0 (either MSB or LSB of current row) |
| Controllers - Power Pad |
_____/--A--\_____ _____/--B--\_____ | | | | | (b) (b) | | (1) (2) (3) (4) | | (b) (r) (r) (b) | | (5) (6) (7) (8) | | (b) (b) | | (9) (A) (B) (C) | |_________________| |_________________| |
Output 1-then-0 to Bit0 of Port 4016h Read eight times from Port 4017h (and/or 4016h on NES) |
Bit4 4,3,C,8,u,u,u,u (0=Released, 1=Pressed) (u=Unused always 1) Bit3 2,1,5,9,6,A,B,7 (0=Released, 1=Pressed) |
| Controllers - Microphone |
| Controllers - Reset Button |
| Controllers - Arcade Machines |
Port 4016h/Write: Bit2 Select 8K VROM bank at PPU 0000h-1FFFh (Mapper 99 games only) Port 4016h/Read: Bit2 Credit Service Button (0=Released, 1=Service Credit) Bit3-4 DIP Switch 1-2 (0=Off, 1=On) Bit5-6 Credit Left/Right Coin Slot (0=None, 1=Coin) (Acknowledge via 4020h) Port 4017h/Read: Bit2-7 DIP Switch 3-8 (0=Off, 1=On) Port 4020h/Write: Bit0 Acknowlege Coin Slot Signal (0=Normal, 1=Acknowlege Coin) |
Read NES/4016h VS/4016h NES/4017h VS/4017h 1st Button A (1) Button A (2) Button B (2) Button A (1) 2nd Button B (1) Button B (2) Button B (2) Button B (1) 3rd Select (1) Button 1 Select (2) Button 2 4th Start (1) Button 3 Start (2) Button 4 5th Up (1) Up (2) Up (2) Up (1) 6th Down (1) Down (2) Down (2) Down (1) 7th Left (1) Left (2) Left (2) Left (1) 8th Right (1) Right (2) Right (2) Right (1) |
| Cartridges and Mappers |
| Cartridge Info |
| Cartridge Overview |
Type Games Percent Mapper 0 (NROM) 446 12.5% Mapper 1 (MMC1) 723 20.3% Mapper 2 (UNROM) 397 11.2% Mapper 3 (CNROM) 273 7.7% Mapper 4 (MMC3) 784 22.1% Mapper 20 (FDS) ? x.x% Other Mappers 932 26.2% Total 3555 100.0% |
| Cartridge ROM-Image File Formats |
00h File ID ('NES',1Ah)
04h Number of 16K PRG-ROM pages
05h Number of 8K CHR-ROM pages (00h=None / VRAM)
06h Cartridge Type LSB
Bit7-4 Mapper Number (lower 4bits)
Bit3 1=Four-screen VRAM layout
Bit2 1=512-byte trainer/patch at 7000h-71FFh
Bit1 1=Battery-backed SRAM at 6000h-7FFFh, set only if battery-backed
Bit0 0=Horizontal mirroring, 1=Vertical mirroring
07h Cartridge Type MSB (ignore this and further bytes if Byte 0Fh nonzero)
Bit7-4 Mapper Number (upper 4bits)
Bit3-2 Reserved (zero)
Bit1 1=PC10 game (arcade machine with additional 8K Z80-ROM) (*)
Bit0 1=VS Unisystem game (arcade machine with different palette)
08h Number of 8K RAM (SRAM?) pages (usually 00h=None-or-not-specified)
09h Reserved (zero)
0Ah Reserved (zero) (sometimes 03h,10h,13h,30h,33h purpose unknown) (*)
0Bh Reserved (zero)
0Ch Reserved (zero)
0Dh Reserved (zero)
0Eh Reserved (zero)
0Fh Nonzero if [07h..0Fh]=GARBAGE, if so, assume [07h..0Fh]=ALL ZERO (*)
|
00h-03h: "UNIF" tag identifier
04h-07h: Revision number ("currently 4, for REV 7b, Revision 6 of UNIF" Huh!)
08h-1Fh: Reserved for future usage
|
00h-03h: Chunk ID string (4-letter ASCII, described below) 04h-07h: Length of Data Block in bytes (excluding above ID and length entry) 08h... : Data |
This uses ASCIZ strings to describe the board names (instead of iNES mapper numbers), it's meant to be more specific than mapper numbers, for example, it's using different names for different MMC1-boards. http://www.parodius.com/~veilleux/boardtable.txt http://www.parodius.com/~veilleux/boardnames |
Normally using only PRG0 (and CHR0, if VROM used). In rare cases, if the cart contains more than 1 PRG (or CHR) ROM chip, then PRG1-F and CHR1-F may be used for the additional chips. |
00h 60Hz/NTSC (USA, Japan, etc.) 01h 50Hz/PAL (Germany, etc.) 02h Compatible with both 50Hz and 60Hz refresh rates |
Bit0 Regular Joypad Bit1 Zapper Bit2 R.O.B Bit3 Arkanoid Controller (presumably Paddle) Bit4 Power Pad Bit5 Four-Score adapter (NES 4-player adapter) (Not Famicom adapter!) Bit6-7 Reserved |
00h Two-Screen Horizontal Mirroring (Hard Wired) 01h Two-Screen Vertical Mirroring (Hard Wired) 02h Single-Screen BLK0 (Hard Wired) 03h Single-Screen BLK1 (Hard Wired) 04h Four-Screens of VRAM (Hard Wired) 05h Mirroring Controlled By Mapper Hardware |
Presence of this chunk means yes, absence means no. |
Game Title |
Probably some sort of ASCII text of unspecified formatting |
Presence of this chunk means yes, absence means no. |
Intended "to make sth sure on EPROMs" ;-) Checksum algorythm not specified. |
100 bytes ASCIZ name of the person who dumped the cart 4 bytes day, month, year-lsb, year-msb when cartridge was dumped 100 bytes ASCIZ agent "name of the ROM-dumping means used" |
| Cartridge IRQ Counters |
| Cartridge Bus Conflicts |
| Cartridge Cicurity Chip (CIC) (Lockout Chip) |
3193A NES, USA 3195A NES, European 3196A NES, Hong Kong 3197A NES, UK N/A NES, newer top-loading version (1993-1995) N/A Famicom, Japan (1983-1995) |
HIGH (+5V) Lock, used in console LOW (GND) Key, used in cartridge |
| Cartridge Game Genie |
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F Letter A P Z L G I T Y E O X U K S V N |
Char Bit3 Bit2 Bit1 Bit0 Char Bit3 Bit2 Bit1 Bit0 1st D7 D2 D1 D0 2nd A7 D6 D5 D4 3rd LEN A6 A5 A4 4th A3 A14 A13 A12 5th A11 A2 A1 A0 6th CD3 A10 A9 A8 7th C7 C2 C1 C0 8th D3 C6 C5 C4 |
| Cartridge Pin-Outs |
1 GND 19-25 PPU A6-A0 45 EXP SND_IN 2-13 CPU A11-A0 26-29 PPU D0-D3 45,46 EXP SND_OUT 14 CPU R/W 30-31 +5VDC 47 PPU /WR 15 CPU /IRQ 32 PHI2 CLK 48 PPU NT /CS 16 GND 33,35 CPU A12-A14 49 PPU NT /A13 17 PPU /RD 36-43 CPU D7-D0 49-56 PPU A7-A12,A13 18 PPU NT A10 44 CPU /PRG 57-60 PPU D7-D4 |
Pin Dir Use Expl. 1 Out VEE GND 2-13 Out CPU A11-A0 14 Out CPU R/W 15 I/O CPU /IRQ 16-20 I/O EXP Expansion Port Pins 42-38 (not used by the console itself) 21 Out PPU /R 22 In PPU VA10 (A10 of internal 2K VRAM, ie. select BLK0 or BLK1) 23-29 Out PPU A6-A0 30-33 I/O PPU D0-D3 34-35 I/O CIC S0-S1 (cicurity/lockup chip protocol signals) 36 Out VCC +5VDC 37 Out CPU 21.47727MHz (NTSC), 26.601712MHz (PAL) 38 Out CPU PHI2 39-41 Out CPU A12-A14 42-49 I/O CPU D7-D0 50 Out CPU /PRG (PRG-ROM access, logical NAND of PHI2 and CPU A15) 51-55 I/O EXP Pins 06-10 56 Out PPU /W 57 In PPU /VCS (internal 2K VRAM Chip-Select) 58 Out PPU /A13 (inverted A13, wired to /VCS when used as name table) 59-65 Out PPU A7-A9,A11,A10,A12-A13 66-69 I/O PPU D7-D4 70 I/O CIC S2 (cicurity/lockup chip protocol signals) 71 Out CIC 4Mhz (cicurity/lockout chip clock line) 72 Out VEE GND |
| Mapper 0: NROM - (No Mapper) |
| Mapper 1: MMC1 - PRG/32K/16K, VROM/8K/4K, NT |
8000h-FFFFh
Bit 0 Serial data loaded to 5bit shift register (LSB=1st write)
Bit 7 Clear 5bit shift register (1=Reset, next write will be "1st write")
|
8000h-9FFFh Register 0 - Configuration Register
Bit0-1 Name Table Mirroring
0,1 Single-Screen (BLK0 only)
2 Two-Screen Vertical Mirroring
3 Two-Screen Horizontal Mirroring
Bit2-3 PRG-Switching Mode (usually 3)
0,1 Switchable 32K Area at 8000h-FFFFh (via Register 3)
2 Switchable 16K Area at C000h-FFFFh (via Register 3)
And Fixed 16K Area at 8000h-BFFFh (always 1st 16K)
3 Switchable 16K Area at 8000h-BFFFh (via Register 3)
And Fixed 16K Area at C000h-FFFFh (always last 16K)
Bit4 VROM Switching Size (for carts with VROM)
0 Swap 8K of VROM at PPU 0000h
1 Swap 4K of VROM at PPU 0000h and 1000h
A000h-BFFFh Register 1
Bit4-0 Select 4K or 8K VROM bank at 0000h (4K and 8K Mode, see Reg0/Bit4)
C000h-DFFFh Register 2
Bit4-0 Select 4K VROM bank at 1000h (used in 4K Mode only, see Reg0/Bit4)
E000h-FFFFh Register 3
Bit3-0 Select 16K or 2x16K ROM bank (see Reg0/Bit3-2)
Bit4 Unused ?
|
Register 0, Bit 4 <1024K carts> 0 = Ignore 256K selection register 1 1 = Acknowledge 256K selection register 1 Register 1, Bit4 - 256K ROM Selection Register 0 <512K carts> 0 = Swap banks from first 256K of PRG 1 = Swap banks from second 256K of PRG <1024K carts with bit 4 of register 0 off> 0 = Swap banks from first 256K of PRG 1 = Swap banks from third 256K of PRG <1024K carts with bit 4 of register 0 on> Low bit of 256K PRG bank selection Register 2, Bit4 - 256K ROM Selection Register 1 <1024K carts with bit 4 of register 0 off> Store but ignore this bit (base 256K selection on 256K selection Reg 0) <1024K carts with bit 4 of register 0 on> High bit of 256K PRG bank selection |
| Mapper 2: UNROM - PRG/16K |
8000h-FFFFh Select 16K ROM bank at 8000h-BFFFh (initially 1st bank) N/A Fixed 16K ROM at C000h-FFFFh (always last bank) |
| Mapper 3: CNROM - VROM/8K |
8000h-FFFFh Bit 0-1 Select 8K VROM bank at PPU 0000h (initially 1st bank) Bit 4-5 Name Table Mirroring Select? |
| Mapper 4: MMC3 - PRG/8K, VROM/2K/1K, VT, SRAM, IRQ |
8000h Index/Control (5bit)
Bit7 CHR Address Select (0=Normal, 1=Address Areas XOR 1000h)
Bit6 PRG Register 6 Area (0=8000h-9FFFh, 1=C000h-DFFFh)
Bit2-0 Command Number
0 - Select 2x1K VROM at PPU 0000h-07FFh (or 1000h-17FFh, if Bit7=1)
1 - Select 2x1K VROM at PPU 0800h-0FFFh (or 1800h-1FFFh, if Bit7=1)
2 - Select 1K VROM at PPU 1000h-13FFh (or 0000h-03FFh, if Bit7=1)
3 - Select 1K VROM at PPU 1400h-17FFh (or 0400h-07FFh, if Bit7=1)
4 - Select 1K VROM at PPU 1800h-1BFFh (or 0800h-0BFFh, if Bit7=1)
5 - Select 1K VROM at PPU 1C00h-1FFFh (or 0C00h-0FFFh, if Bit7=1)
6 - Select 8K ROM at 8000h-9FFFh (or C000h-DFFFh, if Bit6=1)
7 - Select 8K ROM at A000h-BFFFh
N/A - Fixed 8K ROM at C000h-DFFFh (or 8000h-9FFFh, if Bit6=1)
N/A - Fixed 8K ROM at E000h-FFFFh (always last 8K bank)
8001h Data Register (Indexed via Port 8000h)
A000h Mirroring Select (Bit0: 0=Vertical, 1=Horizontal Mirroring)
A001h SaveRAM Toggle (Bit7: 0=Disable 6000h-7FFFh, 1=Enable 6000h-7FFFh)
C000h IRQ Counter Register - The IRQ countdown value is stored here.
C001h IRQ Latch Register - A temporary value is stored here.
E000h IRQ Control Register 0
Any value written here will disable IRQ's and copy the
latch register to the actual IRQ counter register.
E001h IRQ Control Register 1 - Any value written here will enable IRQ's.
|
| Mapper 5: MMC5 - BANKING, IRQ, SOUND, VIDEO, MULTIPLY, etc. |
| Mapper 5: MMC5 - I/O Map |
5000h Sound Channel 1 Pulse Control 5002h Sound Channel 1 Frequency LSB 5003h Sound Channel 1 Frequency MSB 5004h Sound Channel 2 Pulse Control 5006h Sound Channel 2 Frequency LSB 5007h Sound Channel 2 Frequency MSB 5010h Sound Channel 3 Enable 5011h Sound Channel 4 Synthetic Voice business channel 2 5015h Sound Channel 1 and 2 Enable 5100h PRG Bank Size (Mode for Port 5114h-5117h) 5101h CHR Bank Size 5102h RAM Write Protect Key 1 5103h RAM Write Protect Key 2 5104h EXRAM Mode Setting 5105h Name Table Select 5106h Name Table Fill-Mode Tile Number 5107h Name Table Fill-Mode Palette Number 5113h-5117h PRG Bank Selection Registers 5120h-5127h CHR Bank Selection for Sprites and for CPU Access 5128h-512Bh CHR Bank Selection for Background 5130h Unknown 5200h Horizontal Split Control 5201h Horizontal Split Scroll Position 5202h Horizontal Split CHR Bank Selection 5203h Vertical IRQ Counter 5204h Vertical IRQ Control/Status (R/W) 5205h Multiply unit input/output 5206h Multiply unit input/output 5800h Unknown 5C00h-5FFFh EXRAM (1K) |
| Mapper 5: MMC5 - CPU Memory Control |
Bit7-2 Not used Bit1-0 PRG Bank Size (0=32K, 1=16K, 2=Mixed, 3=8K) |
5102h RAM Write Protect Key 0 (Lower 2bit must be 02h for write-enable) 5103h RAM Write Protect Key 1 (Lower 2bit must be 01h for write-enable) |
Port Type Mode3/8K Mode2/Mixed Mode1/16K Mode0/32K 5113h RAM 8K at 6000h 8K at 6000h 8K at 6000h 8K at 6000h 5114h ROM/RAM 8K at 8000h, N/A , N/A , N/A 5115h ROM/RAM 8K at A000h, 2x8K at 8000h, 2x8K at 8000h, N/A 5116h ROM/RAM 8K at C000h, 8K at C000h, N/A , N/A 5117h ROM 8K at E000h, 8K at E000h, 2x8K at C000h, 4x8K at 8000h |
Bit7 ROM/RAM Mode (0=RAM, 1=ROM) (Port 5114h-5116h only, not 5113h,5117h) Bit6-3 Not used Bit2 RAM Chip Select (0=1st chip, 1=2nd chip, or open bus if single chip) Bit1-0 Select 8K RAM Bank in currently selected RAM chip (32K chips only) |
| Mapper 5: MMC5 - Video Name Table |
Bit1-0 Select NT0 VRAM at 2000h-23FFh (0=BLK0, 1=BLK1, 2=EXRAM, 3=FILLMODE) Bit3-2 Select NT1 VRAM at 2400h-27FFh (0=BLK0, 1=BLK1, 2=EXRAM, 3=FILLMODE) Bit5-4 Select NT2 VRAM at 2800h-2BFFh (0=BLK0, 1=BLK1, 2=EXRAM, 3=FILLMODE) Bit7-6 Select NT3 VRAM at 2C00h-2FFFh (0=BLK0, 1=BLK1, 2=EXRAM, 3=FILLMODE) |
| Mapper 5: MMC5 - Video Pattern Table |
Bit7-6 Not used Bit1-0 CHR Bank Size (0=8K, 1=4K, 2=2K, 3=1K) |
Port Mode3/1K Mode2/2K Mode1/4K Mode1/8K 5120h 1K at 0000h N/A N/A N/A 5121h 1K at 0400h 2K at 0000h N/A N/A 5122h 1K at 0800h N/A N/A N/A 5123h 1K at 0C00h 2K at 0800h 4K at 0000h N/A 5124h 1K at 1000h N/A N/A N/A 5125h 1K at 1400h 2K at 1000h N/A N/A 5126h 1K at 1800h N/A N/A N/A 5127h 1K at 1C00h 2K at 1800h 4K at 1000h 8K at 0000h |
5128h 1K at X000h N/A N/A N/A 5129h 1K at X400h 2K at X000h N/A N/A 512Ah 1K at X800h N/A N/A N/A 512Bh 1K at XC00h 2K at X800h 4K at X000h 8K at 0000h |
| Mapper 5: MMC5 - Video Split and IRQ |
Bit7 For the E function (0=Don't use, 1=Use)
Bit6 Boundary's side is for using Split Mode extension of graphics
(0=Left side, 1=Right side)
Bit5 Not used
Bit4-0 Left boundary is designated with the char. # to count places
|
Examples for 5200h Settings: 00h (not?) used yet 82h Used for SplitMode GFX extension from left 1-2 character C2h Used for SplitMode GFX extension from the right side 3 chars. C0h Used for SplitMode GFX extension on the whole screen D0h Used for SplitMode GFX extension on the right side of the screen 90h Used for SplitMode GFX extension on the left side of the screen |
Bit7-6 Not used Bit5-0 Select 4K VROM at both 0000h-0FFFh and 1000h-1FFFh |
Bit7/Write IRQ Enable (0=Disable, 1=Enable) Bit6/Read Unknown |
| Mapper 5: MMC5 - Video EXRAM |
Bit7-6 Not used
Bit1-0 Select EXRAM Mode
0 VRAM Extra Name Table (via Port 5105h)
1 VRAM ExGrafix Color Expansion (see below)
2 General purpose WRAM (read/write)
3 General purpose WRAM (write protected)
|
Bit7-6 Palette Number for each Tile Bit5-0 4K Bank Number for each Tile |
| Mapper 5: MMC5 - Sound Control |
Bit7-6 Duty Cycle (0..3 = 87.5%, 75.0%, 50.0%, 25.0%) Bit5 Waveform Hold (e.g. Looping) (0=Off, 1=On) Bit4 Envelope Select (0=Varied, 1=Fixed) Bit3-0 When Bit4=0: Playback Rate (0..0Fh = Fast..Slow) Bit3-0 When Bit4=1: Output Volume (0..0Fh) |
Bit7-0 Lower 8bit of 11bit Frequency |
Bit7-3 Sound Occurence Time Bit2-0 Upper 3bit of 11bit Frequency |
Bit7-1 Not used Bit0 Wave output (0=Off, 1=On) |
Bit7-0 Wave Size |
Bit7-2 Not used Bit1 Channel 2 (0=Disable, 1=Enable) Bit0 Channel 1 (0=Disable, 1=Enable) |
| Mapper 5: MMC5 - Other Registers |
| Mapper 6,8,12,17: Front Far East (FFE) Configuration, IRQs, Patches |
4501h IRQ Disable/Acknowledge (write any value, usually 00h) 4502h IRQ set lower 8bit of 16bit counter 4503h IRQ set upper 8bit of 16bit counter and Start/Enable IRQs |
42FCh-42FFh Configuration Register 1
A0 Name Table Mode (0=One-Screen, 1=Two-Screen) (with D4 below)
A1 Unknown (0=WE, 1=SW) (usually 1)
D7-D5 Memory Mode (0-7) "*MODE"
1 Mapper 6 F4xxx
2 Mapper 2 UNROM
3 Mapper ? F4xxx
4 Mapper 8 F3xxx/GNROM
0,5-7 unknown (Great Tank uses settings 1 and 6)
? unknown how to select Mapper 12 and Mapper 17
|
0 Mapper 17 (Kaiketsu, Saiyuuki)
7 Mapper 17 (Wing of Madoola)
D4 When A0=0: Select VRAM Page (?=BLK0, ?=BLK1)
When A0=1: ?Mirroring (0=Vertical, 1=Horizontal Mirroring)
D3-D0 Unknown (usually zero)
43FEh Memory Control (apparently independendly of current Mode) (?)
D7-D2 Select ?K ROM at 8000h-?
D1-D0 Select 8K VROM at PPU 0000h-1FFFh
43FFh Memory Control (as for current mode, ie. mirror of 8000h-FFFFh) (?)
4500h Configuration Register 2
D7-D6 FDS Mode (0=Disk/Load, 1=Reserved, 2=Cartridge, 3=Disk/Execute)
D5-D4 SRAM 6000h-7FFFh BANK "Present or Not" (0-3=?)
D3 SW Pin (maybe something related with above WE/SW selection)
D2-D0 PPU Mode Select (1or2?="*MODE" (32K), 5=256K, VRAM EXT, 7=256K)
|
| Mapper 6: FFE F4xxx - PRG/16K, VROM/8K, NT, IRQ |
8000h-FFFFh Memory Control (6bit)
Bit1-0 Select 8K VRAM (read/write-able) at PPU 0000h-1FFFh
Bit5-2 Select 16K ROM at 8000h-BFFFh (bank 0-0Fh)
N/A Fixed 16K ROM at C000h-FFFFh (always bank 7) (!)
|
| Mapper ?: FFE F4xxx - PRG/16K, VROM/8K, NT, IRQ |
8000h-FFFFh Memory Control (6bit)
Bit3-0 Select 16K ROM at 8000h-BFFFh
Bit5-4 Select 8K VROM at PPU 0000h-1FFFh
|
| Mapper 7: AOROM - PRG/32K, Name Table Select |
8000h-FFFFh Memory Control
Bit2-0 Select 32K ROM bank at 8000h-FFFFh (initially 1st bank)
Bit4 One-Screen Name Table Select (0=BLK0, 1=BLK1)
Bit3,5-7 Not used
|
| Mapper 8: FFE F3xxx - PRG/32K, VROM/8K, NT, IRQ |
8000h-FFFFh Memory Control (same as GNROM, Mapper 66)
Bit1-0 Select 8K VROM (usually read-only) at PPU 0000h-1FFFh
Bit5-4 Select 32K ROM at 8000h-FFFFh (initially 1st bank)
|
| Mapper 9: MMC2 - PRG/24K/8K, VROM/4K, NT, LATCH |
A000h-AFFFh Select 8K ROM at 8000h-9FFFh (initially 1st bank) N/A Fixed 24K ROM at A000h-FFFFh (always last three 8K banks) B000h-CFFFh Select 4K VROM at PPU 0000h-0FFFh D000h-DFFFh Select 4K VROM at PPU 1000h-1FFFh (used when latch=FDh) E000h-EFFFh Select 4K VROM at PPU 1000h-1FFFh (used when latch=FEh) F000h-FFFFh Mirroring Select (Bit0: 0=Vertical, 1=Horizontal mirroring) PPU 1FD0h-1FDFh Access to Pattern Table 0, Tile FDh --> sets latch=FDh PPU 1FE0h-1FEFh Access to Pattern Table 0, Tile FEh --> sets latch=FEh |
| Mapper 10: MMC4 - PRG/16K, VROM/4K, NT, LATCH |
A000h-AFFFh Select 16K ROM bank at 8000h-BFFFh (initially 1st bank) N/A Fixed 16K ROM bank at C000h-FFFFh (always last bank) B000h-BFFFh Select 4K VROM bank at PPU 0000h-0FFFh (used when latch0=FDh) C000h-CFFFh Select 4K VROM bank at PPU 0000h-0FFFh (used when latch0=FEh) D000h-DFFFh Select 4K VROM bank at PPU 1000h-1FFFh (used when latch1=FDh) E000h-EFFFh Select 4K VROM bank at PPU 1000h-1FFFh (used when latch1=FEh) F000h-FFFFh Mirroring Select (Bit0: 0=Vertical, 1=Horizontal mirroring) PPU 0FD0h-0FDFh Access to Pattern Table 0, Tile FDh --> sets latch0=FDh PPU 0FE0h-0FEFh Access to Pattern Table 0, Tile FEh --> sets latch0=FEh PPU 1FD0h-1FDFh Access to Pattern Table 1, Tile FDh --> sets latch1=FDh PPU 1FE0h-1FEFh Access to Pattern Table 1, Tile FEh --> sets latch1=FEh |
| Mapper 11: Color Dreams - PRG/32K, VROM/8K |
8000h-FFFFh Memory Control
Bit3-0 Select 32K ROM bank at 8000h-FFFFh (initially 1st bank)
Bit7-4 Select 8K VROM bank at PPU 0000h-1FFFh (initially 1st bank)
|
| Mapper 12: FFE F6xxx - Not specified, NT, IRQ |
| Mapper 13: CPROM - 16K VRAM |
N/A Fixed 4K VRAM at PPU 0000h-0FFFh (always Bank 0) 8000h-FFFFh Select 4K VRAM at PPU 1000h-1FFFh (Bank 0-3) |
| Mapper 15: X-in-1 - PRG/32K/16K, NT |
8000h-FFFFh Memory Control (Decoded by address AND data lines)
D5-D0 Select 16K ROM Bank (X)
D6 Mirroring Control (0=Vertical, 1=Horizontal Mirroring)
D7 Select 8K ROM Bank (Y) (should be zero in non-8K-modes)
A1-A0 ROM Bank Mode (0=32K, 1=128K, 2=8K, 3=16K)
Mapping in different modes is:
8K Mode - Bank (X*2+Y) at each 8000h, A000h, C000h, E000h
16K Mode - Bank (X) at 8000h-BFFFh and (X) at C000h-FFFFh
32K Mode - Bank (X) at 8000h-BFFFh and (X OR 1) at C000h-FFFFh
128K Mode - Bank (X) at 8000h-BFFFh and LAST bank at C000h-FFFFh
|
| Mapper 16: Bandai - PRG/16K, VROM/1K, IRQ, EPROM |
6000h,7FF0h,8000h Select 1K VROM at PPU 0000h-03FFh
6001h,7FF1h,8001h Select 1K VROM at PPU 0400h-07FFh
6002h,7FF2h,8002h Select 1K VROM at PPU 0800h-0BFFh
6003h,7FF3h,8003h Select 1K VROM at PPU 0C00h-0FFFh
6004h,7FF4h,8004h Select 1K VROM at PPU 1000h-13FFh
6005h,7FF5h,8005h Select 1K VROM at PPU 1400h-17FFh
6006h,7FF6h,8006h Select 1K VROM at PPU 1800h-1BFFh
6007h,7FF7h,8007h Select 1K VROM at PPU 1C00h-1FFFh
6008h,7FF8h,8008h Select 16K ROM at 8000h-BFFFh (initially 1st bank)
N/A Fixed 16K ROM at C000h-FFFFh (always last bank)
6009h,7FF9h,8009h Mirroring/Page Select (Bit1-0)
0 Two-Screen Vertical mirroring
1 Two-Screen Horizontal mirroring
2 Single-Screen BLK0
3 Single-Screen BLK1
600Ah,7FFAh,800Ah IRQ Control Register (Bit 0)
0 Disable/Acknowledge IRQ
1 Enable IRQ
600Bh,7FFBh,800Bh Low byte of IRQ counter
600Ch,7FFCh,800Ch High byte of IRQ counter
600Dh,7FFDh,800Dh EPROM I/O Port - I am not sure how this works.
|
| Mapper 17: FFE F8xxx - PRG/8K, VROM/1K, NT, IRQ |
4504h Select 8K ROM at 8000h-9FFFh (initially 1st half of 1st 16K) 4505h Select 8K ROM at A000h-BFFFh (initially 2nd half of 1st 16K) 4506h Select 8K ROM at C000h-DFFFh (initially 1st half of last 16K) 4507h Select 8K ROM at E000h-FFFFh (initially 2nd half of last 16K) 4510h Select 1K VROM at PPU 0000h-03FFh 4511h Select 1K VROM at PPU 0400h-07FFh 4512h Select 1K VROM at PPU 0800h-0BFFh 4513h Select 1K VROM at PPU 0C00h-0FFFh 4514h Select 1K VROM at PPU 1000h-13FFh 4515h Select 1K VROM at PPU 1400h-17FFh 4516h Select 1K VROM at PPU 1800h-1BFFh 4517h Select 1K VROM at PPU 1C00h-1FFFh |
| Mapper 18: Jaleco SS8806 - PRG/8K, VROM/1K, NT, IRQ, EXT |
8000h/8001h Select 8K ROM at 8000h-9FFFh (Lower/Upper 4bits)
8002h/8003h Select 8K ROM at A000h-BFFFh (Lower/Upper 4bits)
9000h/9001h Select 8K ROM at C000h-DFFFh (Lower/Upper 4bits)
N/A Fixed 8K ROM at E000h-FFFFh (always last bank)
9002h Battery Back SRAM (Bit0: 0=Enable, 1=Disable)
(unused by Lord of Kings)
9003h Unknown
(used by Lord of Kings)
A000h/A001h Select 1K VROM at PPU 0000h-03FFh (Lower/Upper 4bits)
A002h/A003h Select 1K VROM at PPU 0400h-07FFh (Lower/Upper 4bits)
B000h/A001h Select 1K VROM at PPU 0800h-0BFFh (Lower/Upper 4bits)
B002h/A003h Select 1K VROM at PPU 0C00h-0FFFh (Lower/Upper 4bits)
C000h/C001h Select 1K VROM at PPU 1000h-13FFh (Lower/Upper 4bits)
C002h/C003h Select 1K VROM at PPU 1400h-17FFh (Lower/Upper 4bits)
D000h/D001h Select 1K VROM at PPU 1800h-1BFFh (Lower/Upper 4bits)
D002h/D003h Select 1K VROM at PPU 1C00h-1FFFh (Lower/Upper 4bits)
E000h/E001h Lower 8bit of decrementing 16bit IRQ counter (Lower/Upper 4bits)
E002h/E003h Upper 8bit of decrementing 16bit IRQ counter (Lower/Upper 4bits)
F000h IRQ Control Register 0
Bit0 Maybe 1=Load Counter?
F001h IRQ Control Register 1
Bit0 IRQ Enable (0=Disabled, 1=Enable)
Bit1-3 IRQ Counter Width (0=16bit, 1=12bit, 2-3=8bit, 4-7=4bit)
With widths less than 16bit, underflows recurse only lower counter bits.
F002h Name Table Select (2bit)
0 Two-Screen, Horizontal Mirroring
1 Two-Screen, Vertical Mirroring
2-3 Single-Screen BLK0
F003h Unused (or an External I/O Port which is unused?)
|
| Mapper 19: Namcot 106 - PRG/8K, VROM/1K/VRAM, IRQ, SOUND |
8000h-87FFh Select 1K VROM at PPU 0000h-03FFh (with E800h/Bit6)
8800h-8FFFh Select 1K VROM at PPU 0400h-07FFh ("")
9000h-97FFh Select 1K VROM at PPU 0800h-0BFFh ("")
9800h-9FFFh Select 1K VROM at PPU 0C00h-0FFFh ("")
A000h-A7FFh Select 1K VROM at PPU 1000h-13FFh (with E800h/Bit7)
A800h-AFFFh Select 1K VROM at PPU 1400h-17FFh ("")
B000h-B7FFh Select 1K VROM at PPU 1800h-1BFFh ("")
B800h-BFFFh Select 1K VROM at PPU 1C00h-1FFFh ("")
|
E800h, Bit6 VROM/VRAM Mode for PPU 0000h-0FFFh (0=VROM+VRAM, 1=VROM-Only) E800h, Bit7 VROM/VRAM Mode for PPU 1000h-1FFFh (0=VROM+VRAM, 1=VROM-Only) |
C000h-C7FFh Select 1K VROM/VRAM at PPU 2000h-23FFh (E0h and up = VRAM) C800h-CFFFh Select 1K VROM/VRAM at PPU 2400h-27FFh (E0h and up = VRAM) D000h-D7FFh Select 1K VROM/VRAM at PPU 2800h-2BFFh (E0h and up = VRAM) D800h-DFFFh Select 1K VROM/VRAM at PPU 2C00h-2FFFh (E0h and up = VRAM) |
E000h-E7FFh Select 8K ROM at 8000h-9FFFh (initially 1st half of 1st 16K)
Bit5-0 Page_number
E800h-EFFFh Select 8K ROM at A000h-BFFFh (initially 2nd half of 1st 16K)
Bit5-0 Page_number
Bit6 Select at CHR_address $0000-$0FFF 0:ROM&RAM 1:ROM
Bit7 Select at CHR_address $1000-$1FFF 0:ROM&RAM 1:ROM
F000h-F7FFh Select 8K ROM at C000h-DFFFh (initially 1st half of last 16K)
Bit5-0 Page_number
N/A Fixed 8K ROM at E000h-FFFFh (always 2nd half of last 16K)
|
5000h-57FFh Bit7-0: Lower 8bit of 15bit IRQ counter (R/W) (!)
5800h-5FFFh Bit6-0: Upper 7bit of 15bit IRQ counter (R/W) (!)
Bit7: 0=Disable IRQs, 1=Enable IRQs
|
4800h Expand I/O Data Register
F800h Expand I/O Address Register
Bit7 Auto Increment (0=Disable, 1=Enable)
Bit6-0 Address (00h-7Fh)
|
00h-3Fh See NAMCO.TXT, Japanese (.............)
40h,48h,50h,58h,60h,68h,70h,78h Channel 1-8, Frequency Lower 8bit
41h,49h,51h,59h,61h,69h,71h,79h See NAMCO.TXT, Japanese (......)
42h,4Ah,52h,5Ah,62h,6Ah,72h,7Ah Channel 1-8, Frequency Middle 8bit
43h,4Bh,53h,5Bh,63h,6Bh,73h,7Bh See NAMCO.TXT, Japanese (......)
44h,4Ch,54h,5Ch,64h,6Ch,74h,7Ch Channel 1-8, Frequency Upper 2bit & Option
Bit7-5 Not used
Bit4-2 VVV: 8-(....)(... 2byte) ..: VVV=000... 16byte,VVV=100..8byte....
Bit1-0 Frequency Upper 2bit
45h,4Dh,55h,5Dh,65h,6Dh,75h,7Dh See NAMCO.TXT, Japanese (......)
46h,4Eh,56h,5Eh,66h,6Eh,76h,7Eh Channel 1-8, Offset Address (00h-3Fh)
Bit7-1 AAAAAAA [6bit address stored in a 7bit value?]
Bit0 Not used
47h,4Fh,57h,5Fh,67h,6Fh,77h,7Fh Channel 1-8
Bit7-4 ????: 7...(kingofkings),3...
Bit3-0 VVVV: ....
|
| Mapper 20: Disk System - PRG RAM, BIOS, DISK, IRQ, SOUND |
| Mapper 21: Konami VRC4A/VRC4C - PRG/8K, VROM/1K, NT, IRQ |
| Mapper 22: Konami VRC2A - PRG/8K, VROM/1K, NT |
| Mapper 23: Konami VRC2B/VRC4E - PRG/8K, VROM/1K, NT, (IRQ) |
| Mapper 24: Konami VRC6A - PRG/16K/8K, VROM/1K, NT, IRQ, SOUND |
| Mapper 25: Konami VRC4B/VRC4D - PRG/8K, VROM/1K, NT, IRQ |
| Mapper 26: Konami VRC6B - PRG/16K/8K, VROM/1K, NT, IRQ, SOUND |
Bit7-4 Duty Cycle bits:
0000 - 1/16 "-_______________-_______________" ( 6.25%)
0001 - 2/16 "--______________--______________" (12.50%)
0010 - 3/16 "---_____________---_____________" (18.75%)
0011 - 4/16 "----____________----____________" (25.00%)
0100 - 5/16 "-----___________-----___________" (31.25%)
0101 - 6/16 "------__________------__________" (37.50%)
0110 - 7/16 "-------_________-------_________" (43.75%)
0111 - 8/16 "--------________--------________" (50.00%)
1xxx - 16/16 "--------------------------------" (100.00%)
Bit3-0 Linear Volume (0=Silence, 0Fh=Loudest)
|
Bit7-6 Not used Bit5-0 Volume Step (V) (0..2Ah=Silent..Loudest) (2Bh..3Fh=Wraps/Garbage) |
FOR I=1 to 7 ;step 1-7
IF I=1 THEN X=0 ;reset to 0 in 1st step
ELSE X=(X+V) AND FFh ;add accumulator
Output=(X/8) ;output upper 5bit of X
NEXT
|
Bit7-0 Lower 8 bits of frequency data |
Bit7 Channel disable (0=Disable, 1=Enable) Bit6-4 Not used Bit3-0 Upper 4 bits of frequency data |
Channel 1/2: F=1.79MHz/16/(N+1) ;16-step duty cycles Channel 3: F=1.79MHz/14/(N+1) ;7-step phases |
| Mapper 21-26,73,75,85: Konami VRC Mappers |
Type PRG Bank VROM Banks NT IRQ Sound VRC1 PRG/8K VROM/4K NT - - VRC2 PRG/8K VROM/1K NT - - VRC3 PRG/16K VRAM IRQ - VRC4 PRG/8K VROM/1K NT IRQ - VRC6 PRG/16K/8K VROM/1K NT IRQ SOUND VRC7 PRG/16K/8K VROM/1K NT IRQ SOUND |
Mapper Y Z Used by
75 VRC1 - - Ganbare Goemon 1, Junior Basket - Two on Two, King Kong 2,
Exciting Boxing, Jajamaru Ninpou Chou, Tetsuwan Atom
22 VRC2a A0 A1 Twin Bee 3, Ganbare Pennant Race
23 VRC2b A1 A0 Wai Wai World 1, Getsufuu Maden, Kaiketsu Yanchamaru 2
Dragon Scroll, Gryzor/Contra, Jarinko Chie, Ganbare Goemon
73 VRC3 - - Salamander
21 VRC4a A2 A1 Wai Wai World 2
21 VRC4c A7 A6 Ganbare Goemon Gaiden 2
25 VRC4b A0 A1 Bio Miracle Bokutte Upa, Ganbare Goemon Gaiden, Gradius 2,
Racer Mini Yonku
25 VRC4d A2 A3 Teenage Mutant Hero Turtles 1+2, Goal!!
23 VRC4e A3 A2 Parodius da!, Akumajou Special, Crisis Force,
Tiny Toon Adventures 1, Moe Pro!
24 VRC6a A1 A0 Akumajou Densetsu (Castlevania 3)
26 VRC6b A0 A1 Esper Dream 2, Mouryou Senki Madara
85 VRC7 A4 (A5) Lagrange Point (Z=A5 used for Sound only)
85 VRC7b A3 (?) Tiny Toon Adventures 2 (no Sound - maybe not a VRC7 ?)
|
VRC1 VRC2 VRC3 VRC4 VRC6 VRC7 Expl. - - F - 8 - Select 16K ROM at 8000h-BFFFh 8 8 - 8 - 8.0 Select 8K ROM at 8000h-9FFFh A A - A - 8.1 Select 8K ROM at A000h-BFFFh C - - - C 9.0 Select 8K ROM at C000h-DFFFh - FIX FIX FIX - - Fixed 8K ROM at C000h-DFFFh (last-1 8K) FIX FIX FIX FIX FIX FIX Fixed 8K ROM at E000h-FFFFh (last-0 8K) |
VRC2,4 VRC6 VRC7 Expl. B.0.0/1 D.0.0 A.0 Select 1K VROM bank at PPU 0000h-03FFh B.1.0/1 D.0.1 A.1 Select 1K VROM bank at PPU 0400h-07FFh C.0.0/1 D.1.0 B.0 Select 1K VROM bank at PPU 0800h-0BFFh C.1.0/1 D.1.1 B.1 Select 1K VROM bank at PPU 0C00h-0FFFh D.0.0/1 E.0.0 C.0 Select 1K VROM bank at PPU 1000h-13FFh D.1.0/1 E.0.1 C.1 Select 1K VROM bank at PPU 1400h-17FFh E.0.0/1 E.1.0 D.0 Select 1K VROM bank at PPU 1800h-1BFFh E.1.0/1 E.1.1 D.1 Select 1K VROM bank at PPU 1C00h-1FFFh |
9 Bit0: Mirroring, Bit1-2: MSBs of VROM banks, Bit3: Unused/zero E Lower 4bit of 4K VROM bank at PPU 0000h-0FFFh (MSB in Bit1 of Register 9) F Lower 4bit of 4K VROM bank at PPU 1000h-1FFFh (MSB in Bit2 of Register 9) |
VRC4 VRC6 VRC7 VRC3 Expl. F.0.0/1 F.0.0 E.1 A/B IRQ Reload value F.1.0 F.0.1 F.0 C IRQ Control (Bit0: 0=Disable, Bit1: 0=One-Shot) F.1.1 F.1.0 F.1 D IRQ Acknowledge (write any value to this address) |
9.0.1 (or 9.1.0?) Memory Control (2bit) |
VRC1 VRC2,4 VRC6 VRC7 Expl. 9 9.0.0 B.1.1 E.0 Mirroring/Page Select |
0 Two-Screen Vertical mirroring (VRC1: Register 9, Bit0=0) 1 Two-Screen Horizontal mirroring (VRC1: Register 9, Bit0=1) 2 Single-Screen BLK1 (VRC1: N/A) 3 Single-Screen BLK0 (VRC1: N/A) |
9.1.0 Index Register 9.1.1 Data Register Mapper 85: Konami VRC7A/B - PRG/16K/8K, VROM/1K, NT, IRQ, SOUND |
| Mapper 32: Irem G-101 - PRG/8K, VROM/1K, NT |
9FFFh Control Register (Bit1,0)
Bit0 - Name Table ?Mirroring (0=Horizontal, 1=Vertical Mirroring)
Bit1 - Port 8FFFh Switching Mode (see above)
8FFFh When 9FFFh/Bit1=0:
Select 8K ROM bank at 8000h-9FFFh (initially 1st 8K bank)
Fixed 8K ROM bank at C000h-DFFFh (always 1st half of last 16K)
When 9FFFh/Bit1=1:
Fixed 8K ROM bank at 8000h-9FFFh (always 1st 8K bank)
Select 8K ROM bank at C000h-DFFFh (initially probably 9FFFh/Bit1=0)
AFFFh Select 8K ROM bank at A000h-BFFFh (initially 2nd 8K bank)
N/A Fixed 8K ROM bank at E000h-FFFFh (always last 8K bank)
BFF0h Select 1K VROM bank at PPU 0000h-03FFh
BFF1h Select 1K VROM bank at PPU 0400h-07FFh
BFF2h Select 1K VROM bank at PPU 0800h-0BFFh
BFF3h Select 1K VROM bank at PPU 0C00h-0FFFh
BFF4h Select 1K VROM bank at PPU 1000h-13FFh
BFF5h Select 1K VROM bank at PPU 1400h-17FFh
BFF6h Select 1K VROM bank at PPU 1800h-1BFFh
BFF7h Select 1K VROM bank at PPU 1C00h-1FFFh
|
| Mapper 33: Taito TC0190/TC0350 - PRG/8K, VROM/1K/2K, NT, IRQ |
8000h Select 8K ROM bank at 8000h-9FFFh (Type I: Bit6=Mirroring, see below) 8001h Select 8K ROM bank at A000h-BFFFh N/A Fixed 16K ROM bank at C000h-FFFFh (always last 16K) 8002h Select 2K VROM bank at PPU 0000h-07FFh 8003h Select 2K VROM bank at PPU 0800h-0FFFh A000h Select 1K VROM bank at PPU 1000h-13FFh A001h Select 1K VROM bank at PPU 1400h-17FFh A002h Select 1K VROM bank at PPU 1800h-1BFFh A003h Select 1K VROM bank at PPU 1C00h-1FFFh |
8000h Bit4-0:See above, Bit6:Mirroring (0=Vertical, 1=Horizontal Mirroring) |
C000h IRQ Counter (incremented every scanline, paused during VBlank) C001h IRQ Related (write same value as to C000h) C002h IRQ Start/Enable (write any value) C003h IRQ Acknowledge/Stop (write any value) E000h Mirroring (Bit6) (0=Vertical, 1=Horizontal Mirroring) E001h,E002h,E003h Unknown |
| Mapper 34: Nina-1 - PRG/32K, VROM/4K |
7FFEh Select 4K VROM bank at PPU 0000h-0FFFh (4bit) 7FFFh Select 4K VROM bank at PPU 1000h-1FFFh (4bit) 7FFDh Select 32K ROM bank at 8000h-FFFFh (1bit) (initially 1st bank) |
| Mapper 40: FDS-Port - Lost Levels |
8000h-9FFFh Disable/Reset IRQ counter (by writing any value) A000h-BFFFh Enable/Start IRQ counter (by writing any value) C000h-DFFFh Not Used N/A Fixed 8K ROM at 6000h-7FFFh (always bank 6) N/A Fixed 8K ROM at 8000h-9FFFh (always bank 4) N/A Fixed 8K ROM at A000h-BFFFh (always bank 5) E000h-FFFFh Select 8K ROM at C000h-DFFFh N/A Fixed 8K ROM at E000h-FFFFh (always bank 7, ie. last bank) |
| Mapper 41: Caltron 6-in-1 |
6000h-67FFh Main Control Register (decoded by ADDRESS lines A0-A5)
A2-A0 Select 32K ROM at 8000h-FFFFh
A2 MSB of above bank number - also enables second register
A4-A3 Upper two bits of 8K VROM bank at 0000h-1FFFh
A5 Name Table (0=Vertical, 1=Horizontal Mirroring)
8000h-FFFFh Auxilary CHR control (decoded by DATA lines D0-D1)
This register is write-protected when above A2=0 (!)
D1-D0 Lower two bits of 8K VROM bank at 0000h-1FFFh
|
| Mapper 42: FDS-Port - Mario Baby |
E000h-FFFCh Select 8K ROM at 6000h-7FFFh N/A Fixed 32K ROM at 8000h-FFFFh (always last 32K) E001h-FFFDh Select mirroring (Bit3: 0=Vertical, 1=Horizontal Mirroring) E002h-FFFEh IRQ Control (Bit1: 0=Disable/Reset, 1=Enable/Start) E003h-FFFFh Not used |
8000h Select 8K VROM at PPU 0000h-1FFFh F000h Select 8K ROM at 6000h-7FFFh N/A Fixed 32K ROM at 8000h-FFFFh (always last 32K) |
| Mapper 43: X-in-1 |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A7-A0 Select 32K ROM Bank (From currently selected Chip)
A9-A8 Select ROM Chip (Empty bus if selected chip not installed)
A10 Not used (Always zero)
A11 Bank Mode (0=32K, 1=16K; Lower/Upper half via A12)
A12 Select 16K ROM Bank (0=Lower, 1=Upper) (Should be zero in 32K mode)
A13 Mirroring (0=Vertical, 1=Horizontal Mirroring)
A14 Not used (Always zero)
|
| Mapper 44: 7-in-1 MMC3 Port A001h |
A001h - Select 128K ROM/VROM Block (0..5) or last 256K ROM/VROM Block (6) |
| Mapper 45: X-in-1 MMC3 Port 6000hx4 |
6000h 1st write - Configuration Bits 0-7 6000h 2nd write - Configuration Bits 8-15 6000h 3nd write - Configuration Bits 16-23 6000h 4th write - Configuration Bits 24-31 |
Bit7-0 VROM base in 1K steps Bit15-8 ROM base in 8K steps Bit19-16 VROM mask in 1K steps, Mask=(2 SHL (X AND 7))+(X AND 8)/8 Bit23-20 VROM base in 256K steps Bit29-24 ROM mask in 8K steps, Mask=(3Fh AND (NOT X)) Bit30 LOCK (set when menu selection completed, probably locks Port 6000h) Bit31 ??? |
| Mapper 46: 15-in-1 Color Dreams |
6000h-7FFFh Multicart Memory Control
Bit0-3 Select 64K ROM Block (initially 1st bank) (always same as below)
Bit4-7 Select 64K VROM Block (initially 1st bank) (always same as above)
8000h-FFFFh Memory Control (selection within current 64K block)
Bit1 Select 32K ROM bank at 8000h-FFFFh (initially 1st bank)
Bit6-4 Select 8K VROM bank at PPU 0000h-1FFFh (initially 1st bank)
|
| Mapper 47: 2-in-1 MMC3 Port 6000h |
6000h Select 1st or 2nd half of ROM/VROM (0 or 1) |
| Mapper 48: Taito TC190V |
| Mapper 49: 4-in-1 MMC3 Port 6xxxh |
[6000h]=01h ;init [6800h]=00h ;game 0 + [6808h]=08h crashes ? [6841h]=41h ;game 1 [6881h]=81h ;game 2 [68C1h]=C1h ;game 3 |
| Mapper 50: FDS-Port - Alt. Levels |
4022h Select 8K ROM at C000h-DFFFh
Bit0 and/or Bit3 ZERO Bank 0
Bit0 and/or Bit3 SET Bank 0Ch (or maybe INCREMENT bank number?)
Other Bits Unknown
4122h IRQ Control
Bit0 and/or Bit1 ZERO Disable/Acknowledge
Bit0 and/or Bit1 SET Enable/Start
N/A Fixed 8K ROM at 6000h-7FFFh (always bank 0Fh, ie. last bank)
N/A Fixed 8K ROM at 8000h-9FFFh (always bank 08h)
N/A Fixed 8K ROM at A000h-BFFFh (always bank 09h)
N/A Fixed 8K ROM at E000h-FFFFh (always bank 0Bh)
|
| Mapper 51: 11-in-1 |
6000h Mode Register
Bit1 ROM Block Size (0=128K Mode, 1=32K Mode)
Bit4 Unknown
8000h Base Address in 32K Steps (X) (0-0Fh)
32K Mode: Select 32K Bank (X) at 8000h-FFFFh (initially 1st 32K bank)
128K Mode: Select 16K Bank (X*2 OR 07h) at C000h-FFFFh
And: Select 8K Bank (X*4 OR 23h) at 6000h-7FFFh (for FDS ports)
C000h Lower 16K Select (Y) (0-1Fh) (128K Mode only, UNROM-style)
128K Mode: Select 16K Bank (Y*2 OR Y/10h) at 8000h-BFFFh
|
| Mapper 52: 7-in-1 MMC3 Port 6800h with SRAM |
6800h Bank Control Byte
Bit7 Not used
Bit6 VROM Bank Size (0=256K, 1=128K)
Bit5,2,4 VROM 128K Bank (Bit4 not used in 256K CHR mode)
Bit3 PRG ROM Bank Size (0=256K, 1=128K)
Bit2,1,0 PRG ROM 128K Bank (Bit0 not used in 256K PRG mode)
|
| Mapper 56: Pirate SMB3 |
8000h Unknown (always 08h) (maybe counter LSBs, if any) 9000h Bit7-4 of 16bit IRQ counter A000h Bit11-8 of 16bit IRQ counter B000h Bit15-12 of 16bit IRQ counter C000h IRQ Anable (FFh=Enable, 00h=Disable) D000h IRQ Acknowledge (Always write FFh, or EFh) E000h Ignore - MMC3-index (Port 8000h) relicts redirected to E000h F000h Select 8K ROM at 8000h-9FFFh F001h Select 8K ROM at A000h-BFFFh F002h Select 8K ROM at C000h-DFFFh N/A Fixed 8K ROM at E000h-FFFFh (always last bank) F003h Unknown (always 10h) F400h Select 1K VROM at PPU 0000h-03FFh F401h Select 1K VROM at PPU 0400h-07FFh F402h Select 1K VROM at PPU 0800h-0BFFh F403h Select 1K VROM at PPU 0C00h-0FFFh F404h Select 1K VROM at PPU 1000h-13FFh F405h Select 1K VROM at PPU 1400h-17FFh F406h Select 1K VROM at PPU 1800h-1BFFh F407h Select 1K VROM at PPU 1C00h-1FFFh |
| Mapper 57: 6-in-1 |
8000h Extra Port for CNROM Games in 2nd 64K of VROM
Bit2-0 Select 8K VROM at PPU 0000h-1FFFh (ORed with value in Port 8800h)
Bit5-3 Not used (zero)
Bit6 Must be set for Second 64K Block of VROM
Bit7 Must be set for First 64K Block of VROM
8800h Main Port
Bit2-0 Select 8K VROM at PPU 0000h-1FFFh (ORed with value in Port 8000h)
Bit3 Mirroring (0=Vertical, 1=Horizontal Mirroring)
Bit4 ROM Size (0=16K; Bank X twice, 1=32K; Bank X and X+1)
Bit7-5 Select 16K ROM at 8000h-BFFFh and C000h-FFFFh (X)
|
| Mapper 58: X-in-1 |
C000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A2-A0 Select 16K ROM Bank at 8000h-BFFFh and C000h-FFFFh (X)
A5-A3 Select 8K VROM Bank at PPU 0000h-1FFFh
A6 ROM Size (0=32K; Bank X and X+1, 1=16K; Bank X twice)
A7 Mirroring (0=Vertical, 1=Horizontal Mirroring)
A12-A8 Unknown (Usually 0,/A6,0,/A6,A5,A3, except in yie-ar-kung-fu)
|
| Mapper 61: 20-in-1 |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A3-0 Select 32K ROM Bank at 8000h-FFFFh
A4 Bank Size (0=32K, 1=16K; only lower/upper half via Bit5)
A5 Select lower/upper half of selected 32K bank (in 16K mode)
A7 Mirroring (0=Vertical, 1=Horizontal Mirroring)
A6,A8-A14 Not used (always 0)
|
| Mapper 62: X-in-1 |
8000h-BFFFh Memory Control (Decoded by address AND data lines)
A4-A0,D1-D0 Select 8K VROM at PPU 0000h-1FFFh
A5 ROM Size (0=32K; Bank X-1 and X, 1=16K; Bank X twice)
A7 Mirroring (0=Vertical, 1=Horizontal Mirroring)
A6,A13-A8 Select 16K ROM at 8000h-BFFFh and C000h-FFFFh (X)
A14 Always 0 ?
|
| Mapper 64: Tengen RAMBO-1 - PRG/8K, VROM/2K/1K, NT |
8000h Index/Control (6bit)
Bit7 CHR Address Select (0=Normal, 1=Address Areas XOR 1000h)
Bit6 PRG Address Select (0=Normal, 1=Address Areas plus 2000h)
Bit3-0 Command Number (Note: Index 0-7 same as for MMC3)
0 - Select 2x1K VROM at PPU 0000h-07FFh (or 1000h-17FFh, if Bit7=1)
1 - Select 2x1K VROM at PPU 0800h-0FFFh (or 1800h-1FFFh, if Bit7=1)
2 - Select 1K VROM at PPU 1000h-13FFh (or 0000h-03FFh, if Bit7=1)
3 - Select 1K VROM at PPU 1400h-17FFh (or 0400h-07FFh, if Bit7=1)
4 - Select 1K VROM at PPU 1800h-1BFFh (or 0800h-0BFFh, if Bit7=1)
5 - Select 1K VROM at PPU 1C00h-1FFFh (or 0C00h-0FFFh, if Bit7=1)
6 - Select 8K ROM at 8000h-9FFFh (or A000h-BFFFh, if Bit6=1)
7 - Select 8K ROM at A000h-BFFFh (or C000h-DFFFh, if Bit6=1)
F - Select 8K ROM at C000h-DFFFh (or 8000h-9FFFh, if Bit6=1)
N/A - Fixed 8K ROM at E000h-FFFFh (always last 8K bank)
8 - Select 1K VROM page at PPU 0400h
9 - Select 1K VROM page at PPU 0C00h
8001h Data Register (indexed via Port 8000h)
A000h ?Mirroring Select (Bit0: 0=Horizontal, 1=Vertical Mirroring)
No confidence in the accuracy of this information.
|
| Mapper 65: Irem H-3001 - PRG/8K, VROM/1K, NT, IRQ |
9000h Unknown 9001h Unknown 9003h,9004h IRQ Control (not sure about difference between 9003h/9004h) (00h=Disable IRQ, C0h=Enable IRQ, other values unknown) 9005h IRQ Counter MSB of decrementing 16bit counter 9006h IRQ Counter LSB of decrementing 16bit counter B000h Select 1K VROM bank at PPU 0000h-03FFh B001h Select 1K VROM bank at PPU 0400h-07FFh B002h Select 1K VROM bank at PPU 0800h-0BFFh B003h Select 1K VROM bank at PPU 0C00h-0FFFh B004h Select 1K VROM bank at PPU 1000h-13FFh B005h Select 1K VROM bank at PPU 1400h-17FFh B006h Select 1K VROM bank at PPU 1800h-1BFFh B007h Select 1K VROM bank at PPU 1C00h-1FFFh 8000h Select 8K ROM bank at 8000h-9FFFh (initially 1st half of 1st 16K) A000h Select 8K ROM bank at A000h-BFFFh (initially 2nd half of 1st 16K) C000h Select 8K ROM bank at C000h-DFFFh (initially 1st half of last 16K) N/A Fixed 8K ROM bank at E000h-FFFFh (always 2nd half of last 16K) |
| Mapper 66: GNROM - PRG/32K, VROM/8K |
8000h-FFFFh Memory Control (2x2bits)
Bit1-0 Select 8K VROM bank at PPU 0000h-1FFFh (initially 1st bank)
Bit5-4 Select 32K ROM bank at 8000h-FFFFh (initially 1st bank)
|
| Mapper 67: Sunsoft3 - PRG/16K, VROM/2K, IRQ |
8000h IRQ Acknowledge (write any data to this address)
8800h-8FFFh Select 2K VROM bank at PPU 0000h-07FFh
9800h-9FFFh Select 2K VROM bank at PPU 0800h-0FFFh
A800h-AFFFh Select 2K VROM bank at PPU 1000h-17FFh
B800h-BFFFh Select 2K VROM bank at PPU 1800h-1FFFh
C800h-CFFFh IRQ Counter (two writes: 1st=MSB, 2nd=LSB)
(16bit decrementing clock cycle counter)
D800h-DFFFh IRQ Control (Bit4: 0=Disable, 1=Enable)
E800h-EFFFh No info - maybe Mirroring control ?
F800h-FFFFh Select 16K ROM bank at 8000h-BFFFh (initially 1st bank)
N/A Fixed 16K ROM bank at C000h-FFFFh (always last bank)
|
| Mapper 68: Sunsoft4 - PRG/16K, VROM/2K, NT-VROM |
8000h Select 2K VROM bank at PPU 0000h-07FFh
9000h Select 2K VROM bank at PPU 0800h-0FFFh
A000h Select 2K VROM bank at PPU 1000h-17FFh
B000h Select 2K VROM bank at PPU 1800h-1FFFh
C000h Select 1K VROM bank as BLK0 (in VROM Mode) (from LAST 128 banks)
D000h Select 1K VROM bank as BLK1 (in VROM Mode) (from LAST 128 banks)
E000h Name Table Control
Bit4 Name Table VROM Mode (0=VRAM, 1=VROM via Port C000h/D000h)
Bit0 Name Table Mirroring (0=Horizontal, 1=Vertical Mirroring)
F000h Select 16K ROM bank at 8000h-BFFFh (initially 1st bank)
N/A Fixed 16K ROM bank at C000h-FFFFh (always last bank)
|
| Mapper 69: Sunsoft5 FME-7 - PRG/8K, VROM/1K, NT ctrl, SRAM, IRQ |
8000h Index Register (4bit)
0 - Select 1K VROM at PPU 0000h-03FFh
1 - Select 1K VROM at PPU 0400h-07FFh
2 - Select 1K VROM at PPU 0800h-0BFFh
3 - Select 1K VROM at PPU 0C00h-0FFFh
4 - Select 1K VROM at PPU 1000h-13FFh
5 - Select 1K VROM at PPU 1400h-17FFh
6 - Select 1K VROM at PPU 1800h-1BFFh
7 - Select 1K VROM at PPU 1C00h-1FFFh
8 - Select 8K ROM/RAM at 6000h-7FFFh
Bit6=0 --> Select 8K ROM (Page number in bit5-0)
Bit6=1,Bit7=1 --> Select 8K SRAM
Bit6=1,Bit7=0 --> Select 8K "pseudo-random numbers?"
9 - Select 8K ROM at 8000h-9FFFh
A - Select 8K ROM at A000h-BFFFh
B - Select 8K ROM at C000h-DFFFh
C - Select Mirroring
0 Two-Screen, Vertical Mirroring
1 Two-Screen, Horizontal Mirroring
2 One-Screen, BLK0
3 One-Screen, BLK1
D - IRQ control (00h=Disable, 81h=Enable, other values?)
E - IRQ LSB of decrementing clock cycle counter
F - IRQ MSB of decrementing clock cycle counter
N/A - Fixed 8K ROM at E000h-FFFFh (always last 8K bank)
A000h Data Register (indexed via Port 8000h)
|
| Mapper 70: Bandai - PRG/16K, VROM/8K, NT |
C000h-C0FFh Memory Control Bit7 Name Table Select (0/1 = BLK0/BLK1) (One-Screen Mode only) Bit6-4 Select 16K ROM at 8000h-BFFFh Bit3-0 Select 8K VROM at PPU 0000h-1FFFh |
| Mapper 71: Camerica - PRG/16K |
8000h-BFFFh Unknown C000h-FFFFh Select 16K ROM bank at 8000h-BFFFh (initially 1st bank) N/A Fixed 16K ROM bank at C000h-FFFFh (always last bank) |
| Mapper 72: Jaleco Early Mapper 0 - PRG-LO, VROM/8K |
8000h-FFFFh Memory Control
Bit7-6 Function Select
0 Confirm Selection
1 Select 8K VROM bank at PPU 0000h-1FFFh
2 Select 16K ROM bank at 8000h-BFFFh (lower half of PRG memory)
3 Reserved (would probably select both PRG+VROM)
Bit5-4 Not used
Bit0-3 ROM or VROM Bank Number for above Selection
|
| Mapper 73: Konami VRC3 - PRG/16K, IRQ |
| Mapper 74: Whatever MMC3-style |
| Mapper 75: Jaleco SS8805/Konami VRC1 - PRG/8K, VROM/4K |
| Mapper 76: Namco 109 - PRG/8K, VROM/2K |
8000h Index/Control (3bit)
Bit2-0 Command Number
0 - Not used
1 - Not used
2 - Select 2K VROM at PPU 0000h-07FFh
3 - Select 2K VROM at PPU 0800h-0FFFh
4 - Select 2K VROM at PPU 1000h-17FFh
5 - Select 2K VROM at PPU 1800h-1FFFh
6 - Select 8K ROM at 8000h-9FFFh
7 - Select 8K ROM at A000h-BFFFh
N/A - Fixed 16K ROM at C000h-FFFFh (always last bank)
8001h Data Register (Indexed via Port 8000h)
|
| Mapper 77: Irem - PRG/32K, VROM/2K, VRAM 6K+2K |
8000h-FFFFh Memory Control
Bit0-1 Select 32K ROM bank at 8000h-FFFFh
Bit2-3 Not used
Bit4-7 Select 2K VROM bank at PPU 0000h-07FFh
6K VRAM at PPU 0800h-1FFFh (ie. upper 6K of Pattern Tables are VRAM)
2K VRAM at PPU 2800h-2FFFh (ie. uses Four-Screen Name Tables)
|
| Mapper 78: Irem 74HC161/32 - PRG/16K, VROM/8K |
8000h-FFFFh Memory Control
Bit2-0 Select 16K ROM bank at 8000h-BFFFh (initially 1st bank)
N/A Fixed 16K ROM bank at C000h-FFFFh (always last bank)
Bit3 Name Table Control
Jaleco/Cosmo Carrier: One-Screen (0=BLK0, 1=BLK1)
Irem/Holy Diver: Two-Screen (0=Horizontal, 1=Vertical Mirroring)
Bit7-4 Select 8K VROM bank at PPU 0000h-1FFFh
|
| Mapper 79: AVE Nina-3 - VROM/8K |
4100h Bit1-0 Select 8K VROM bank at PPU 0000h-1FFFh |
| Mapper 80: Taito X-005 - PRG/8K, VROM/2K/1K, NT |
7EF0h Select 2x1K VROM at PPU 0000h-07FFh (Bit7: Name Table, see below) 7EF1h Select 2x1K VROM at PPU 0800h-0FFFh (Bit7: Name Table, see below) 7EF2h Select 1K VROM at PPU 1000h-13FFh 7EF3h Select 1K VROM at PPU 1400h-17FFh 7EF4h Select 1K VROM at PPU 1800h-1BFFh 7EF5h Select 1K VROM at PPU 1C00h-1FFFh 7EF6h Unknown (usually FFh, 01h, or 00h) 7EF8h SRAM Enable (A3h=Enable, FFh=Disable) 7EFAh Select 8K ROM 8000h-9FFFh 7EFCh Select 8K ROM A000h-BFFFh 7EFEh Select 8K ROM C000h-DFFFh N/A Fixed 8K ROM E000h-FFFFh (always last bank) 7EF7h,7EF9h Not used 7EFBh,7EFDh,7EFFh Dupes of 7EFAh,7EFCh,7EFEh used by Kyonshiizu 2 only 7F00h-7FFFh SRAM Area (seems to be only 256 bytes or less used) |
| Mapper 81: AVE Nina-6 |
| Mapper 82: Taito X1-17 - PRG/8K, VROM/2K/1K |
7EF0h Select 2x1K VROM at PPU 0000h-07FFh (or 1000h-17FFh if swapped) 7EF1h Select 2x1K VROM at PPU 0800h-0FFFh (or 1800h-1FFFh if swapped) 7EF2h Select 1K VROM at PPU 1000h-13FFh (or 0000h-03FFh if swapped) 7EF3h Select 1K VROM at PPU 1400h-17FFh (or 0400h-07FFh if swapped) 7EF4h Select 1K VROM at PPU 1800h-1BFFh (or 0800h-0BFFh if swapped) 7EF5h Select 1K VROM at PPU 1C00h-1FFFh (or 0C00h-0FFFh if swapped) 7EF6h Swap PPU 0000h-0FFFh / 1000h-1FFFh (Bit1: 0=Normal, 1=Swap) 7EF7h SRAM .... CAh,00h,01h,40h 7EF8h SRAM .... 69h,00h,40h 7EF9h SRAM .... 84h,00h,40h 7EFAh Select 8K ROM 8000h-9FFFh (Bit7-2) 7EFBh Select 8K ROM A000h-BFFFh (Bit7-2) 7EFCh Select 8K ROM C000h-DFFFh (Bit7-2) N/A Fixed 8K ROM E000h-FFFFh (unknown?) 7EFDh SRAM .... FFh 7EFEh SRAM .... FFh,07h 7EFFh SRAM .... FFh 6000h-7FFFh SRAM Area (probably 8K size, at least 6000h-73xxh used) |
| Mapper 83: Cony |
Cony (A) 128K+256K Fatal Fury 2 Cony (B) 256K+512K World Heroes 2 Cony (C) 4x256K+4x256K Dragon Ball Z 4-in-1 Also used by Garou Densetsu Special? |
8310h Select 1K VROM at PPU 0000h-03FFh (in current 256K block) 8311h Select 1K VROM at PPU 0400h-07FFh (in current 256K block) 8312h Select 1K VROM at PPU 0800h-0BFFh (in current 256K block) 8313h Select 1K VROM at PPU 0C00h-0FFFh (in current 256K block) 8314h Select 1K VROM at PPU 1000h-13FFh (in current 256K block) 8315h Select 1K VROM at PPU 1400h-17FFh (in current 256K block) 8316h Select 1K VROM at PPU 1800h-1BFFh (in current 256K block) 8317h Select 1K VROM at PPU 1C00h-1FFFh (in current 256K block) |
8310h Select 2K VROM at PPU 0000h-07FFh 8311h Select 2K VROM at PPU 0800h-0FFFh 8316h Select 2K VROM at PPU 1000h-17FFh 8317h Select 2K VROM at PPU 1800h-1FFFh |
8300h Select 8K ROM at 8000h-9FFFh 8301h Select 8K ROM at A000h-BFFFh 8302h Select 8K ROM at C000h-DFFFh N/A Fixed 8K ROM at E000h-FFFFh (always last bank) |
8000h Select 16K ROM at 8000h-BFFFh (in current 256K block) N/A Fixed 16K ROM at C000h-FFFFh (last bank in current 256K block) |
8200h IRQ Counter LSB, writing to this address acknowledges IRQs 8201h IRQ Counter MSB, writing to this address starts counting |
8100h IRQ Control (Bit7=Enable IRQs) (other bits unknown) Bit7, unlike C 5000h Unknown, program reads from this address |
8100h IRQ Control (Bit1=Enable IRQs) (other bits unknown) Bit1, unlike A/B
B000h Select 256K ROM/VROM Windows (upper two address bits)
Bit0-3 Unknown
Bit4,6 Bit0 of 256K Block Number
Bit5,7 Bit1 of 256K Block Number
Used values are 00h,50h,A0h,F0h. Other values could probably select
separate 256K banks for ROM/VROM. The ROM selection also affects
the "fixed" 16K at C000h-FFFFh (last bank in current 256K block).
B0FFh Probably same as B000h
B1FFh Probably same as B000h
510Xh Unknown, program reads/writes to/from this address
430Xh Unknown, program reads from this address
|
| Mapper 84: Whatever |
| Mapper 85: Konami VRC7A/B - PRG/16K/8K, VROM/1K, NT, IRQ, SOUND |
9010h (aka 9.1.0) Index register 9030h (aka 9.1.1) Data Register |
Bit7-0 Lower 8bit of 9bit Frequency (f; 0-1FFh) |
Bit7-5 Unknown Bit4 Channel trigger Bit3-1 Octave Select (o; 0-7) Bit0 Upper 1bit of 9bit Frequency (f; 0-1FFh) |
Bit7-4 Instrument number (0=Custom, 1-0Fh=Fixed Instruments) Bit3-0 Volume |
Here's a link to a good document about this chip: http://www.ccms.net/~aomit/oplx/ |
Bit7 Tremolo Enable Bit6 Vibrato Enable Bit5 Sustain Enable Bit4 KSR Bit3-0 Multiplier |
Bit7-6 Key Scale Level Bit5-0 Output Level |
Bit7-5 Not used (Write 0's)
Bit4 Carrier Waveform
Bit3 Modulator Waveform
There are only two waveforms available. Sine and rectified sine (only
the positive cycle of the sine; negative cycle "chopped off".)
Bit2-0 Feedback Control
|
Bit7-4 Attack Bit3-0 Decay |
Bit7-4 Sustain Bit3-0 Release |
1 - 05 03 10 06 74 A1 13 F4 2 - 05 01 16 00 F9 A2 15 F5 3 - 01 41 11 00 A0 A0 83 95 4 - 01 41 17 00 60 F0 83 95 5 - 24 41 1F 00 50 B0 94 94 6 - 05 01 0B 04 65 A0 54 95 7 - 11 41 0E 04 70 C7 13 10 8 - 02 44 16 06 E0 E0 31 35 9 - 48 22 22 07 50 A1 A5 F4 A - 05 A1 18 00 A2 A2 F5 F5 B - 07 81 2B 05 A5 A5 03 03 C - 01 41 08 08 A0 A0 83 95 D - 21 61 12 00 93 92 74 75 E - 21 62 21 00 84 85 34 15 F - 21 62 0E 00 A1 A0 34 15 |
| Mapper 86: Jaleco Early Mapper 2 - PRG/32K, VROM/8K |
6000h Memory Control
Bit6,1,0 Select 8K VROM bank at PPU 0000h-1FFFh
Bit5,4 Select 32K ROM bank at 8000h-FFFFh
Bit7,3,2 Not used (always zero)
7000h Unknown
|
| Mapper 87: Jaleco/Konami 16K VROM - VROM/8K |
6000h Select 8K VROM bank at PPU 0000h-1FFFh (Bit 1 used only) |
| Mapper 88: Namco 118 |
8000h Index/Control (3bit)
Bit2-0 Command Number
0 - Select 2x1K VROM at PPU 0000h-07FFh (Banks 0-63)
1 - Select 2x1K VROM at PPU 0800h-0FFFh (Banks 0-63)
2 - Select 1K VROM at PPU 1000h-13FFh (Banks 64-127)
3 - Select 1K VROM at PPU 1400h-17FFh (Banks 64-127)
4 - Select 1K VROM at PPU 1800h-1BFFh (Banks 64-127)
5 - Select 1K VROM at PPU 1C00h-1FFFh (Banks 64-127)
6 - Select 8K ROM at 8000h-9FFFh
7 - Select 8K ROM at A000h-BFFFh
N/A - Fixed 16K ROM at C000h-FFFFh (always last bank)
8001h Data Register (Indexed via Port 8000h)
|
| Mapper 89: Sunsoft Early - PRG/16K, VROM/8K |
8000h-FFFFh Memory Control
Bit7 Unknown - maybe Name Table related, maybe not.
Bit6-4 Select 16K ROM bank at 8000h-BFFFh
N/A Fixed 16K ROM bank at C000h-FFFFh (always last bank)
Bit3-0 Select 8K VROM bank at PPU 0000h-1FFFh
|
| Mapper 90: Pirate MMC5-style |
5000h(W) Maths Coprocessor Parameter A 5001h(W) Maths Coprocessor Parameter B 5000h(R) Maths Coprocessor 8bit Result of A*B 8000h PRG 8K at 8000h-9FFFh 8001h PRG 8K at A000h-BFFFh or 16k PRG bank at $A000-? 8002h PRG 8K at C000h-DFFFh 8003h PRG 8K at E000h-FFFFh 9000h/A000h LSB/MSB of VROM bank at PPU 0000h (1K,2K,4K,8K) 9001h/A001h LSB/MSB of VROM bank at PPU 0400h (1K) 9002h/A002h LSB/MSB of VROM bank at PPU 0800h (1K,2K) 9003h/A003h LSB/MSB of VROM bank at PPU 0C00h (1K) 9004h/A004h LSB/MSB of VROM bank at PPU 1000h (1K,2K,4K) 9005h/A005h LSB/MSB of VROM bank at PPU 1400h (1K) 9006h/A006h LSB/MSB of VROM bank at PPU 1800h (1K,2K) 9007h/A007h LSB/MSB of VROM bank at PPU 1C00h (1K) B000h/B004h LSB/MSB of 1K VROM bank at PPU 2000h (Name Table VROM mode) B001h/B005h LSB/MSB of 1K VROM bank at PPU 2400h (Name Table VROM mode) B002h/B006h LSB/MSB of 1K VROM bank at PPU 2800h (Name Table VROM mode) B003h/B007h LSB/MSB of 1K VROM bank at PPU 2C00h (Name Table VROM mode) |
$C000 irq registers Unknown
$C001 irq registers Unknown
$C006 irq registers Unknown
$C007 irq registers Unknown
$C002 irq clear irq_flag=0 and INT signal is clear
$C003 irq reset if $C005=0, irq_flag=0
else, irq_flag=1 and irq_counter=irq_latch
$C004 irq reset It seems same of $C003
$C005 irq counter irq_flag=1, irq_latch = irq_counter = value
|
D000h Bank Mode
Bit1-0 PRG Bank Size
0 Fixed last 32K at 8000h-FFFFh (initial setting)
1 16K Banks, and Fixed last 16K at C000h-FFFFh
2 8K Banks, via Bits 2,7, and Ports 8000h-8003h
3 8K in reverse mode?
Bit2 PRG Bank at E000h in 8K Mode (0=Last 8K, 1=Port 8003h)
Bit4-3 VROM Bank Size (0=8K, 1=4K, 2=2K, 3=1K)
Bit5 Name Table Source (0=VRAM via D001h, 1=VROM via B00Xh)
Bit6 Not used
Bit7 PRG Bank at 6000h (1=enabled) (Similiar/Instead E000h?)
D001h Name Table Control (in VRAM mode) (only lower 2bit used)
0 Two-Screen, Vertical mirroring
1 Two-Screen, Horizontal mirroring
2,3 One-Screen, BLK0
|
$D002 unknown Unused? $D003 bank page Only used by larger carts |
for(i=0;i<4;i++) {
if(!nam_high_byte[i] && (nam_low_byte[i] == i)) {
bankmode &= 0xdf; //clear bit5 --> use VRAM with mirroring
return;
next
|
| Mapper 91: HK-SF3 - PRG/8K, VROM/2K, IRQ |
6000h Select 2K VROM bank at PPU 0000h-07FFh 6001h Select 2K VROM bank at PPU 0800h-0FFFh 6002h Select 2K VROM bank at PPU 1000h-17FFh 6003h Select 2K VROM bank at PPU 1800h-1FFFh 7000h Select 8K ROM bank at 8000h-9FFFh 7001h Select 8K ROM bank at A000h-BFFFh N/A Fixed 16K ROM bank at C000h-FFFFh (always last 16K) 7006h IRQ Disable/Acknowledge (write any value) 7007h IRQ Enable (write any value) |
| Mapper 92: Jaleco Early Mapper 1 - PRG-HI, VROM/8K |
8000h-FFFFh Memory Control
Bit7-6 Function Select
0 Confirm Selection
1 Select 8K VROM bank at PPU 0000h-1FFFh
2 Select 16K ROM bank at C000h-FFFFh (upper half of PRG memory)
3 Reserved (would probably select both PRG+VROM)
Bit5-4 Not used
Bit0-3 ROM or VROM Bank Number for above Selection
|
| Mapper 93: 74161/32 - PRG/16K |
8000h-FFFFh Memory Control
Bit0 Unknown, seems to be always set.
Bit1-3 Always zero
Bit4-6 Select 16K ROM bank at 8000h-BFFFh
Bit7 Always zero
|
| Mapper 94: 74161/32 - PRG/16K |
8000h-FFFFh Memory Control
Bit0-1 Always zero
Bit2-4 Select 16K ROM bank at 8000h-BFFFh
Bit5-7 Always zero
|
| Mapper 95: Namcot MMC3-Style |
8000h Index/Control (3bit)
Bit2-0 Command Number
0 - Select 2x1K VROM at PPU 0000h-07FFh
1 - Select 2x1K VROM at PPU 0800h-0FFFh
2 - Select 1K VROM at PPU 1000h-13FFh
3 - Select 1K VROM at PPU 1400h-17FFh
4 - Select 1K VROM at PPU 1800h-1BFFh
5 - Select 1K VROM at PPU 1C00h-1FFFh
6 - Select 8K ROM at 8000h-9FFFh
7 - Select 8K ROM at A000h-BFFFh
N/A - Fixed 16K ROM at C000h-FFFFh (always last bank)
8001h Data Register (Indexed via Port 8000h)
|
| Mapper 96: 74161/32 |
8000h-FFFFh Bit0-1 Select 32K ROM bank at 8000h-FFFFh (2bit) Bit2 Unknown (maybe MSB of above for bigger ROMs) |
| Mapper 97: Irem - PRG HI |
8000h-FFFFh Memory Control
Bit7-6 Unknown (used values are 1,2 - values 0,3 unused)
(Maybe Name Table Mirroring)
Bit5-4 Not used (always zero)
Bit3-0 Select 16K ROM bank at C000h-FFFFh (upper block!)
N/A Fixed 16K ROM bank at 8000h-BFFFh (always LAST 16K bank)
|
| Mapper 99: VS Unisystem Port 4016h - VROM/8K |
Port 4016h/Write: Bit2 Select 8K VROM bank at PPU 0000h-1FFFh (VS Unisystem only) Bit0 Joypad Strobe |
| Mapper 100: Whatever |
| Mapper 105: X-in-1 MMC1 |
Register 0 Configuration Register (same as MMC1) Register 1 ROM Bank Base (Bit4 unknown) Register 2 Not used Register 3 ROM Bank (same as MMC1, but ORed with Base) |
| Mapper 112: Asder - PRG/8K, VROM/2K/1K |
8000h Index (0-7)
0 Select 8K ROM at 8000h-9FFFh
1 Select 8K ROM at A000h-BFFFh
2 Select 2x1K VROM at PPU 0000h-07FFh
3 Select 2x1K VROM at PPU 0800h-0FFFh
4 Select 1K VROM at PPU 1000h-13FFh
5 Select 1K VROM at PPU 1400h-17FFh
6 Select 1K VROM at PPU 1800h-1BFFh
7 Select 1K VROM at PPU 1C00h-1FFFh
N/A Fixed 16K ROM at C000h-FFFFh (always last 16K)
A000h Data (indexed via Port 8000h)
C000h Unknown, always 00h
E000h Unknown, always 00h
|
| Mapper 113: Sachen/Hacker/Nina |
4100h-41FFh Memory Control (commonly used addresses: 4100h, 4101h, 4120h)
Bit0-2 Select 8K VROM bank at PPU 0000h-1FFFh
Bit3-4 Select 32K ROM bank at 8000h-FFFFh (bigger carts only)
|
| Mapper 114: Super Games |
6000h Unknown (usually zero, except Lion King before crashing?) 8000h Unknown (see notes below) A000h Memory Control Index (see list below) C000h Memory Control Data (indexed via A000h) E000h IRQ Acknowledge (write any value) 6001h Unknown (always zero) 8001h Unknown (see notes below) A001h IRQ Counter (MMC3-style, decremented per scanline, paused in VBlank) C001h IRQ Counter E001h IRQ Start |
0 Select 2x1K VROM at PPU 0000h-07FFh 1 Select 1K VROM at PPU 1400h-17FFh 2 Select 2x1K VROM at PPU 0800h-0FFFh 3 Select 1K VROM at PPU 1C00h-1FFFh 4 Select 8K ROM at 8000h-9FFFh 5 Select 8K ROM at A000h-BFFFh 6 Select 1K VROM at PPU 1000h-13FFh 7 Select 1K VROM at PPU 1800h-1BFFh |
| Mapper 115: MMC3 Cart Saint |
6000h Unknown (used values 00h, A0h, A4h) 6001h Unknown (always 00h) |
| Mapper 116: Whatever |
| Mapper 117: Future |
8000h Select 8K ROM at 8000h-9FFFh 8001h Select 8K ROM at A000h-BFFFh 8002h Select 8K ROM at C000h-DFFFh N/A Fixed 8K ROM at E000h-FFFFh (last bank) 9000h Unknown (always FFh) 9001h Unknown (always 08h) 9003h Unknown (always 00h) A000h Select 1K VROM at PPU 0000h-03FFh A001h Select 1K VROM at PPU 0400h-07FFh A002h Select 1K VROM at PPU 0800h-0BFFh A003h Select 1K VROM at PPU 0C00h-0FFFh A004h Select 1K VROM at PPU 1000h-13FFh A005h Select 1K VROM at PPU 1400h-17FFh A006h Select 1K VROM at PPU 1800h-1BFFh A007h Select 1K VROM at PPU 1C00h-1FFFh A008h-A00Fh Unknown (always 01h, probably VROM bank related) C001h IRQ Counter/Start (MMC3, decremented per scanline, paused in VBlank) C002h IRQ Acknowledge (write any value) C003h IRQ Counter/Start (always write same value as to C001h) D000h Unknown (always 00h) E000h IRQ Enable (Bit0), upper 7bit unknown (always 0000011b) F000h Unknown (always 00h) |
| Mapper 118: MMC3 with different Name Tables |
| Mapper 119: MMC3 TQROM with VROM+VRAM Pattern Tables |
| Mapper 122: Whatever |
| Mapper 133: Sachen |
4120h Memory Control
Bit1-0 Select 8K VROM at PPU 0000h-1FFFh
Bit2 Select 32K ROM at 8000h-FFFFh
|
| Mapper 151: VS Unisystem - PRG/8K, VROM/4K |
8000h Select 8K ROM bank at 8000h-9FFFh A000h Select 8K ROM bank at A000h-BFFFh C000h Select 8K ROM bank at C000h-DFFFh N/A Fixed 8K ROM bank at E000h-FFFFh E000h Select 4K VROM bank at PPU 0000h-0FFFh F000h Select 4K VROM bank at PPU 1000h-1FFFh |
| Mapper 152: Whatever |
| Mapper 160: Same as Mapper 90 |
| Mapper 161: Same as Mapper 1 |
| Mapper 180: Nihon Bussan - PRG HI |
8000h-FFFFh Memory Control
Bit7-3 Not used (always zero)
Bit2-0 Select 16K ROM bank at C000h-FFFFh (upper block!)
N/A Fixed 16K ROM bank at 8000h-BFFFh (always FIRST 16K bank)
|
| Mapper 182: Same as Mapper 114 |
| Mapper 184: Sunsoft - VROM/4K |
6000h Select VROM Banks
Bit2-0 Select 4K VROM at PPU 0000h-0FFFh
Bit6-4 Select 4K VROM at PPU 1000h-1FFFh
|
| Mapper 185: VROM-disable |
8000h-FFFFh (De-)select VROM bank |
Off On Title F0h 0Fh Bird Week 00h 33h B-Wings 00h 11h Mighty Bomb Jack 20h 22h Sansuu 1 Nen - Keisan Game 20h 22h Sansuu 2 Nen - Keisan Game 00h FFh Sansuu 3 Nen - Keisan Game 13h 21h Spy vs Spy |
| Mapper 188: UNROM-reversed |
| Mapper 189: MMC3 Variant |
610xh Select 32K ROM Block (D7-D0 should match A7-A0, eg. [6103h]=03h) |
| Mapper 222: Dragon Ninja |
8000h Select 8K ROM at 8000h-9FFFh A000h Select 8K ROM at A000h-BFFFh N/A Fixed 16K ROM at C000h-FFFFh (last 16K) 9000h Unknown (always E0h = Vertical Mirroring) B000h/B001h Lower/upper 4bit of 1K VROM bank at PPU 0000h-03FFh B002h/B003h Lower/upper 4bit of 1K VROM bank at PPU 0400h-07FFh C000h/C001h Lower/upper 4bit of 1K VROM bank at PPU 0800h-0BFFh C002h/C003h Lower/upper 4bit of 1K VROM bank at PPU 0C00h-0FFFh D000h/D001h Lower/upper 4bit of 1K VROM bank at PPU 1000h-13FFh D002h/D003h Lower/upper 4bit of 1K VROM bank at PPU 1400h-17FFh E000h/E001h Lower/upper 4bit of 1K VROM bank at PPU 1800h-1BFFh E002h/E003h Lower/upper 4bit of 1K VROM bank at PPU 1C00h-1FFFh F000h IRQ Counter/Stop/Set/Ack F001h IRQ Counter/Stop/Set/Ack F002h IRQ Counter/Start (incrementing approx every 120 (?) cycles) |
| Mapper 225: X-in-1 |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A14,A5-0 Select 8K VROM bank at PPU 0000h-1FFFh
A14,A11-A6 Select PRG 2x16K ROM bank at 8000h-FFFFh
A12 Select PRG page size (0=32K, 1=16K)
0 32K page at 8000h-FFFFh (LSB/A6 of bank number ignored)
1 16K page mirrored to 8000h-BFFFh and C000h-FFFFh
A13 ?Mirroring select (0=Vertical, 1=Horizontal Mirroring)
A15 Must be "1"
5800h-5FFFh 4x4bit Register File (D0-D3 data bits, addressed via A0-A1)
|
| Mapper 226: X-in-1 |
8000h,8E8Eh Memory Control
Bit4-0 Bank Number Bit4-0
Bit5 Mode
0 Map 32K ROM at 8000h-FFFFh (bank bits 6-1 used, bit0 ignored)
1 Map the same 16K ROM bank at both 8000h-BFFFh and C000h-FFFFh
Bit6 Name Table (0=Horizontal, 1=Vertical Mirroring)
Bit7 Bank Number Bit5
8001h Upper Bit of bank selection (2048K carts only)
Bit0 Bank Number Bit6
|
Register 1, Bit 1 - controls whether the CHR-RAM is write-protected:
0 - not write-protected
1 - write-protected
|
| Mapper 227: X-in-1 |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A6-A2 Select 16K ROM at 8000h-BFFFh (X)
A1 Mirroring (0=Vertical, 1=Horizontal Mirroring)
A14-A13 Menu mode (00b=Menu, 11b=Other)
A9 128K Mode (1=128K, 0=Other)
A0 32K Mode (1=32K, 0=Other)
A11-A10,A8 Always 0
A12 Usually 1 (except when initializing VRAM for game)
A7 Usually 1 (except menu/contra/galaxian)
|
| Mapper 228: X-in-1 Homebrewn |
8000h-FFFFh Memory Control (Decoded by address AND data lines)
A3-A0,D1-D0 Select 8K VROM at PPU 0000h-1FFFh
A12-A7 Select 32K ROM at 8000h-FFFFh
A14-A13,A6-A4,D7-D2 Not used (always zero)
5FF0h-5FF3h 4x4bit Register File (D0-D3 data bits, addressed via A0-A1)
|
| Mapper 229: 31-in-1 |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A4-A0 Bank Selection, shared for PRG and VROM:
Select 8K VROM bank at PPU 0000h-1FFFh
Select 16K ROM bank at 8000h-BFFFh and same bank at C000h-FFFFh
A selection of 01h works special, it maps 16K ROM banks 0 and 1,
and bank 1 VROM, used for Super Mario which has 32K PRG ROM.
A6-A5 Name Table
0 Two-Screen, Vertical Mirroring
1 Two-Screen, Horizontal Mirroring
2 Probably one-screen, used on boot
3 Probably one-screen, used in menu
A14 The menu sets this bit when accessing bank 0
|
| Mapper 230: X-in-1 plus Contra |
| Mapper 231: 20-in-1 |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines)
A7-A6 Name Table Setting (0-3)
0 Probably one-screen (used by menu only)
1 Two-Screen Vertical Mirroring
2 Two-Screen Horizontal Mirroring
3 Not used
A5 Always opposite of A1, ie. A5=(A0 XOR 1), probably 2nd chip-select
A4-A1 Select 32K ROM bank at 8000h-FFFFh
A0 Mode (0=Normal, 1=Mirror 1st half selected 32K bank to C000h-FFFFh)
|
| Mapper 232: 4-in-1 Quattro Camerica |
9000h Select 64K block for 8000h-FFFFh (block number in Bit4-3) C000h-Fxxxh Select 16K ROM bank at 8000h-BFFFh (within current 64K) N/A High 16K ROM bank at C000h-FFFFh (last 16K of current 64K) FFF0h,FFF1h Unknown - Write any value at proper timing (maybe lockout) |
| Mapper 233: X-in-1 plus Reset |
FFFDh Reading from this address (the MSB of reset vector) destroys the
current Bank selection, probably setting it to a value of FFh, at
least anything different than 00h or 80h
|
| Mapper 234: Maxi-15 |
Registers are set by writing *or reading* certain locations. In the case of writing, the programmer would need to ensure that the written value and that put on the data bus by the program ROM do not conflict. |
FF80h-FF9Fh Configuration Register (R1)
Bit7 Name Table Control (0=Vertical, 1=Horizontal Mirroring)
Bit6 Page Mode ROM/VROM Size (0=32K, 1=64K)
Bit5-0 Select 32K ROM/VROM bank (LSB ignored in 64K Page Mode)
Bit5 is wired to /CS or /OE of the ROM chips, ie. both ROM
and VROM are disabled when bit5 is set (unless additional ROMs
would be connected to inverted Bit5, in larger carts).
FFE8h-FFF7h Memory Banking Register (R2)
Bit7 Not Used
Bit6-4 Select 8K VROM at PPU 0000h-1FFFh (Bit6 not used in 32K Page mode)
Bit3-1 Not Used
Bit0 Select 32K ROM at 8000h-FFFFh (Bit0 not used in 32K Page mode)
FFC0h-FFDFh Lockout Register (R3)
Initially it is not possible to access R3. This is only possible
after R1 has been set to a non-zero value.
Bit7-2 Not Used
Bit1 CIC RST
Bit0 CIC OUT
|
| Mapper 240: C&E/Supertone - PRG/32K, VROM/8K |
4120h,4800h,8000h-FFFFh Memory Control
Bit7-6 Not used (always zero)
Bit5-4 Select 32K ROM at 8000h-FFFFh (initially any 32K bank)
Bit3-0 Select 8K VROM at PPU 0000h-1FFFh
|
| Mapper 241: X-in-1 Education |
8000h-FFFFh Select 32K ROM at 8000h-FFFFh (initially 1st 32K bank) 5FF0h-5FFFh/Write Unknown (No info) 5FF0h-5FFFh/Read Unknown (somewhat Bit6: 1=Ready/Okay) |
| Mapper 242: Waixing - PRG/32K, NT |
8000h-FFFFh Memory Control (Write any data, port decoded by address lines) A6-A3 Select 32K ROM at 8000h-FFFFh (initially 1st 32K bank) A1 Mirroring (0=Vertical, 1=Horizontal Mirroring) A7,A0 Always 1 A14-A8,A2 Always 0 |
| Mapper 243: Sachen Poker - PRG/32K, VROM/8K |
4100h Index (0-7) 4101h Data for above index |
0 Unknown, always 00h 1 Unknown, always 00h 2 Bit3 of 8K VROM at PPU 0000h-1FFFh 3 Unknown, always 00h 4 Bit0 of 8K VROM at PPU 0000h-1FFFh 5 Select 32K ROM at 8000h-FFFFh 6 Bit2,1 of 8K VROM at PPU 0000h-1FFFh 7 Unknown, always 05h |
| Mapper 244: C&E - PRG/32K, VROM/8K |
8000h-FFFFh Memory Control
Bit7 Not used (zero)
Bit6-4 Swap bits (some sort of confusion / copy protection, see below)
Bit3 Set ROM or VROM bank (0=ROM, 1=VROM)
Bit2-0 Select 32K ROM at 8000h-FFFFh or 8K VROM at PPU 0000h-1FFFh
|
Bit4=1: XOR bank number by 03h Bit5=1: Exchange bank number Bit0,1 Bit6=1: Not used |
Bit4=1, Bit5=1, Bit6=1: XOR bank number by 07h (without further exchanges) Bit4=0, Bit5=1, Bit6=1: Not used Bit4=1: Exchange bank number Bit 0,1 (processed first) Bit5=1: Exchange bank number Bit 1,2 Bit6=1; Exchange bank number Bit 2,0 (processed last) |
| Mapper 246: C&E - PRG/8K, VROM/2K, SRAM |
6000h Select 8K ROM at 8000h-9FFFh 6001h Select 8K ROM at A000h-BFFFh 6002h Select 8K ROM at C000h-DFFFh 6003h Select 8K ROM at E000h-FFFFh (initially probably last bank, or bank 3) 6004h Select 2K VROM at PPU 0000h-07FFh 6005h Select 2K VROM at PPU 0800h-0FFFh 6006h Select 2K VROM at PPU 1000h-17FFh 6007h Select 2K VROM at PPU 1800h-1FFFh |
| Mapper 255: X-in-1 - (Same as Mapper 225) |
| Famicom Disk System (FDS) |
| FDS Memory and I/O Maps |
4020h-40FFh I/O Ports (2C33) (Disk, Sound, Timer) 6000h-DFFFh 32K WRAM E000h-FFFFh 8K FDS BIOS ROM |
0000h-1FFFh Pattern Tables - 8K VRAM |
4020h Timer IRQ Counter Reload value LSB (W) 4021h Timer IRQ Counter Reload value MSB (W) 4022h Timer IRQ Enable/Disable (W) 4023h 2C33 I/O Control Port 4024h Disk Data Write Register (W) 4025h Disk Control Register (W) 4026h Disk External Connector Output (W) 4030h Disk Status Register 0 (R) 4031h Disk Data Read Register (R) 4032h Disk Status Register 1 (R) 4033h Disk External Connector Input (R) 4040h..407Fh Sound Wave RAM - 64 x 6bit sample data (R/W) 4080h Sound Volume Envelope (W) 4082h Sound Wave RAM Sample Rate LSB (W) 4083h Sound Wave RAM Sample Rate MSB and Control (W) 4084h Sound Sweep Envelope (W) 4085h Sound Sweep Bias (W) 4086h Sound Modulation Frequency LSB (W) 4087h Sound Modulation Frequency MSB (W) 4088h Sound Modulation Table (W) 4089h Sound Wave RAM Control (W) 408Ah Sound Envelope Base Frequency (W) 4090h Sound Current Volume Gain Level (6bit) (R) 4092h Sound Current Sweep Gain Level (6bit) (R) |
| FDS I/O Ports - Timer |
Reload value loaded to actual 16bit counter register on write to 4022h, and on counter underflow. Counter is decremented once per CPU clock cycle. |
Bit1 Enable (0=Stop/Acknowledge Timer IRQ, 1=Start/Enable Timer IRQ) |
| FDS I/O Ports - Disk |
Bit0 Drive Motor (0=On, 1=Off)
When active (0), causes disk drive motor to stop. During this time,
$4025.1 has no effect. Uh, Active=0=Stop ?
Bit1 \ = Set drive head to the start of the first track.
When active (0), causes disk drive motor to turn on. This bit must stay
active throughout a disk transfer, otherwise $4032.1 will always return 1.
When deactivated, disk drive motor stays on until disk head reaches most
inner track of disk.
Bit2 Disk Data Direction (0=Write, 1=Read)
Bit3 Screen Mirroring (0=Vertical, 1=Horizontal Mirroring)
Bit4 Enable CRC Phase (0=Read/Write Data, 1=Verify/Write CRC)
Bit5 Unknown (Should be always 1)
Bit6 GAP Control, Read Mode: 1=Reset CRC, and wait for end of GAP.
Write Mode: 1=Reset CRC, and start writing data. 0=Write GAP (zeros)
Bit7 Disk IRQs on every byte transfer (0=Disable, 1=Enable)
|
Bit0 Timer IRQ Flag (0=None, 1=IRQ: Timer Underflow)
Bit1 Disk IRQ Flag (0=None, 1=IRQ: Request Data Transfer via 4024h/4031h)
Reset when $4024, $4031, or $4030 has been serviced.
Bit4 CRC Status (0=Okay, 1=Error, Checksum at end of block not matching)
Bit6 Lost Data (0=Okay, 1=Error, CPU didn't process 4024h/4031h in time)
Bit7 Unknown
|
Bit0 Disk Presence (0=Inserted, 1=Not inserted) Bit1 Disk Rewind Flag (0=Ready/Playback, 1=Rewind Active) Bit2 Write Protection (0=Writeable, 1=Read-only, or Disk not inserted) Bit6 Usually 1 (probably relict of recent opcode byte) |
8bit data received from / to be written to disk (least significant first). |
Bit0-6 External Connector Pins 3-9 (0=Low, 1=High/Input) Bit7 Power Good (0=Okay, 1=Battery power low) |
Bit0 Disk I/O (0=Disable, 1=Enable) Bit1 Sound (0=Disable, 1=Enable) |
| FDS I/O Ports - Sound |
Bit7 Wave Write Mode (1=Stop Sound output & Allow to write to Wave RAM) Bit6-2 Not used Bit1-0 Master Volume (0-3 = 100%,66%,50%,40% = 30/30,20/30,15/30,12/30) |
Bit7-0 Lower 8 bits of the main unit's frequency (upper 4 bits in 4083h) |
Bit7 Main Unit disable (0=Enable, 1=Disable Sound Output) Bit6 Envelope disable (0=Normal, 1=Disable Volume/Sweep Envelopes) Bit5-4 Not used Bit3-0 Upper 4 bits of the main unit's frequency |
F = 1.79MHz * (Freq + Mod) / 65536 Mod = Frequency change based on the Modulation unit |
Bit7-0 Envelope Base Frequency, Fbase=1.79MHz/8/N |
Bit7 Volume Envelope Mode (0=Volume Envelope, 1=Fixed Volume)
Bit6 Volume Envelope Direction (When enabled / at specified rate)
0=Decrease Volume by 1 (only if Volume>00h)
1=Increase Volume by 1 (only if Volume<20h)
Bit5-0 When Bit7=1: Volume Level (0-20h=Muted-Loudest, 21h-3Fh=Same as 20h)
Bit5-0 When Bit7=0: Volume Envelope Rate, F=Fbase/(N+1)
|
Bit7 Sweep Envelope Disable (1=Disable) Bit6 Sweep Envelope Mode (0=Decrease, 1=Increase sweep gain) Bit5-0 When Bit7=1: Sweep Gain Bit5-0 When Bit7=0: Sweep Envelope Rate, F=Fbase/(N+1) |
Bit7 Not used Bit6-0 Sweep Bias (signed 7bit; -40h..+3Fh) |
Bit7-0 Lower 8bit of 12bit Modulation frequency |
Bit7 Modulation Enable/Disable (0=Enable, 1=Disable) Bit6-4 Not used Bit3-0 Upper 4bit of 12bit Modulation frequency |
F = 1.79MHz * ModFreq / 65536 |
Bit7-3 Not used Bit2-0 Modulation input |
Bit0 Disk I/O (0=Disable, 1=Enable) Bit1 Sound (0=Disable, 1=Enable) |
Increase/Decrease mode is determined by bit 6 of $4084 |
0:Bias=Bias+0 1:Bias=Bias+1 2:Bias=Bias+2 3:Bias=Bias+4 4:Bias=0 5:Bias=Bias-4 6:Bias=Bias-2 7:Bias=Bias-1 |
temp = Sweep_Bias * Sweep_Gain;
if temp AND 0Fh then
if Sweep_Bias<0 then temp=temp-10h else temp=temp+20h
temp=temp/10h
if temp>193 then temp -= 258; // not a typo... for some reason the wraps
if temp<-64 then temp += 256; // are inconsistent
Mod = Freq * temp / 64;
|
Hz = NES * (Freq + Mod) / 65536 |
- Volume Envelope must be enabled (bit 7 of $4080 must be off) - Envelope Speed must be nonzero (set by $408A) - Envelope must be enabled (bit 6 of $4083 must be off) |
- Sweep Envelope must be enabled (bit 7 of $4084 must be off) - Envelope Speed must be nonzero (set by $408A) - Envelope must be enabled (bit 6 of $4083 must be off) |
- Modulation must be enabled (bit 7 of $4087 must be off) - Modulation frequency must be non-zero (set by $4086/$4087) |
- Main Unit must be enabled (bit 7 of $4083 must be off) - Main Unit Frequency must be non-zero (set by $4082/$4083) - 'Freq + Mod' must be greater than zero (see Frequency Calculation section) - Write Mode must be off (bit 7 of $4089 must be off) |
| FDS BIOS Disk Format |
00h Block Type (01h)
01h-0Eh Disk ID (Must be ASCII string "*NINTENDO-HVC*")
0Fh Maker ID
10h-13h Game Name (usually 4 letter ASCII)
14h Version Number (usually 00h)
15h Side Number (00h=Side A, 01h=Side B) (00h=bootable)
16h Disk Number (00h=First, 01h=Second, etc.) (00h=bootable)
17h-18h Extra Disk ID Field
19h Highest File ID for Boot files (all files whose File ID is less
or equal than this value are loaded automatically on power-up)
1Ah-37h Reserved Space (30 bytes, ignored by BIOS)
|
00h Block Type (02h) 01h Number of Files on this side |
00h Block Type (03h) 01h File Number (00h=First file on this side, 01h=Second, etc.) 02h File ID (used to access files by Load Files function) 03h-0Ah File Name (not used, the BIOS access files by above File ID) 0Bh-0Ch Target Address (LSB, MSB) 0Dh-0Eh File Size (LSB, MSB) 0Fh Target Area (00h=WRAM, Other=VRAM) |
00h Block Type (04h) 01h-LEN Data (LEN=File Size in File Header Block) |
| FDS BIOS Disk Functions |
RETaddr: pointer to DiskID RETaddr+2: pointer to LoadList A on return: error code Y on return: count of files actually found |
RETaddr: pointer to DiskInfo A on return: error code |
0Ah bytes Disk Header Block [0Fh..18h], manufacturer, disk name, etc. 1 byte File Number Block [01h], number of files on disk (N) N*9 bytes File Header Block [02h..0Ah], File ID and Filename, for each file 2 bytes Disk Size (MSB,LSB) |
RETaddr: pointer to DiskID RETaddr+2: pointer to FileInfo A on call: File Number (00h=First) (FFh=Append after last file) A on return: error code |
RETaddr: pointer to DiskID A on call: number to reduce current file count by A on return: error code Special error: #$31 if A is less than the disk's file count |
RETaddr: pointer to DiskID A on call: number to set file count to A on return: error code Special error: #$31 if A is less than the disk's file count |
RETaddr: pointer to DiskID A on call: number to set file count to A on return: error code |
RETaddr: pointer to DiskID A on call: number to set file count to minus 1 A on return: error code |
" NINTENDO r " " FAMILY COMPUTER TM " " " " THIS PRODUCT IS MANUFACTURED " " AND SOLD BY NINTENDO CO;LDT. " " OR BY OTHER COMPANY UNDER " " LICENSE OF NINTENDO CO;LTD.. " |
| FDS BIOS Disk Errors |
00h Okay (no error) (zero flag set) 01h No disk inserted (Port 4032h, Bit0) 02h No battery/power (Port 4033h, Bit7) 03h Disk write-protected (Port 4032h, Bit2) 04h Bad Side Header [0Fh], Maker ID 05h Bad Side Header [10h..13h], Game name 06h Bad Side Header [14h], Game version 07h Bad Side Header [15h], Side number (flip the disk) 08h Bad Side Header [16h], Disk number 09h Bad Side Header [17h], Extra ID Value 1 10h Bad Side Header [18h], Extra ID Value 2 20h Bad Nintendo License String (must be loaded to PPU 2800h-28DFh on boot) 21h Bad Side Header [01h..0Eh], Disk ID (must be "*NINTENDO-HVC*") 22h Bad Side Header [00h], Block ID must be 01h 23h Bad File Number [00h], Block ID must be 02h 24h Bad File Header [00h], Block ID must be 03h 25h Bad File Data [00h], Block ID must be 04h 26h Write-Verify Error (verification of written data failed) 27h Block CRC Read Failure (Port 4030h, Bit 4) 28h Lost Data (Port 4030h, Bit 6), CPU didn't read from 4031h in time 29h Lost Data (Port 4030h, Bit 6), CPU didn't write to 4024h in time 30h Disk Full (Port 4032h, Bit 1), Disk head has reached most inner track 31h Data number of a disk doesn't match up (?) |
| FDS BIOS Data Areas in WRAM |
Addr Size Expl. |
0000h 2 first 16bit parameter 0002h 2 second 16bit parameter 0004h 1 previous stack frame 0005h 1 error retry count 0006h 1 file counter 0007h 1 current block type 0008h 1 boot ID code 0009h 1 dummy read flag 000Ah 2 16bit destination address 000Ch 2 16bit transfer length count 000Eh 1 file found counter |
00F9h 1 value last written to [$4026] $FF on reset (disk ext connector) 00FAh 1 value last written to [$4025] $2E on reset (disk control) 00FBh 1 value last written to [$4016] 0'd on reset (joypad) 00FCh 1 value last written to [$2005]#2 0'd on reset (ppu scrolling) 00FDh 1 value last written to [$2005]#1 0'd on reset (ppu scrolling) 00FEh 1 value last written to [$2001] $06 on reset (ppu control) 00FFh 1 value last written to [$2000] $80 on reset (ppu control) |
0100h 1 Action on NMI (set to C0h on reset) 0101h 1 Action on IRQ (set to 80h on reset) 0102h 2 Action on Reset (AC35h after disk-boot, 5335h after warm-boot) |
DFF6h 2 Game NMI vector 1, used if [0100h]=01xxxxxxb DFF8h 2 Game NMI vector 2, used if [0100h]=10xxxxxxb DFFAh 2 Game NMI vector 3, used if [0100h]=11xxxxxxb DFFCh 2 Game Reset vector, used if [0102h]=5335h or =AC35h DFFEh 2 Game IRQ vector, used if [0101h]=11xxxxxxb |
| FDS Disk Drive Operation |
1.Data ------------__________________------______------ 2.Rate ---___---___---___---___---___---___---___---___ 3.XOR ___---___------___---___---______------______--- 4.Write ___------_________------_________------------___ 5.Read ___-_____-________-_____-________-___________-__ |
// ax is used as CRC accumulator
// si is the array element counter
// di is a temp reg
// Size is the size of the file + 2 (with the last 2 bytes as 0)
// Buf points to the file data (with the 2 appended bytes)
mov ax,8000h // this is the block start mark
sub si,si // zero out file byte index ptr
@@lop1:
mov dl,byte ptr Buf[si]
inc si
REPT 8
shr dl,1; rcr ax,1; sbb di,di; and di,8408h; xor ax,di
ENDM
cmp si,Size
jc @@lop1
|
| Nintendo Playchoice 10 |
0000h-3FFFh 16KB BIOS ROM 8000h-87FFh 2KB Work RAM 8800h-8FFFh 2KB Battery backed RAM 9000h-97FFh 2KB Video RAM (write only) C000h-DFFFh 8Kb Cartridge BIOS (resides on each game cartridge) E000h-FFFFh Protection |
00h Button/Status
bit 0: Channel select button
bit 1: Enter button
bit 2: Reset button
bit 3: N2A03 interrupt detect
bit 4: <zero>
bit 5: Coin 2 button
bit 6: Service button
bit 7: Coin 1 button
01h DIP-switch 1, Bits 0-7
02h DIP-switch 2, Bits 0-7
03h Reading from this address clears Bit 3 of read port 00h
|
00h VRAM Access (0=by Z80 CPU, 1=by Video circuit)
01h Game Controls (0=Disable, 1=Enable)
02h PPU N2B03 Display output (0=Disable, 1=Enable)
03h APU N2A03 Sound output (0=Disable, 1=Enable)
04h Reset N2A03 CPU (0=Reset, 1=Run)
05h Stop N2A03 CPU (0=Stop, 1=Run)
06h Display Output Select (0=Z80/Video circuit, 1=N2B03 PPU)
(Only on single monitor version)
08h Z80 NMI Control (0=Disable, 1=Enable)
09h Watchdog Control (0=Enable, 1=Disable)
0Ah N2B03 PPU Control (0=Reset PPU, 1=Run PPU)
0Bh-0Eh Bits 0-3 of Game Channel Select (0-9)
0Fh Upper KB of battery ram (0=Disable, 1=Enable)
|
c: character code ($000 - $7FF) p: color code ($00 - $1F) |
| Unpredictable Things |
| CPU 65XX Microprocessor |
| CPU Registers and Flags |
Bits Name Expl. 8 A Accumulator 8 X Index Register X 8 Y Index Register Y 16 PC Program Counter 8 S Stack Pointer (see below) 8 P Processor Status Register (see below) |
Bit Name Expl. 0 C Carry (0=No Carry, 1=Carry) 1 Z Zero (0=Nonzero, 1=Zero) 2 I IRQ Disable (0=IRQ Enable, 1=IRQ Disable) 3 D Decimal Mode (0=Normal, 1=BCD Mode for ADC/SBC opcodes) 4 B Break Flag (0=IRQ/NMI, 1=BRK/PHP opcode) 5 - Not used (Always 1) 6 V Overflow (0=No Overflow, 1=Overflow) 7 N Negative/Sign (0=Positive, 1=Negative) |
| CPU Memory Addressing |
| CPU Memory and Register Transfers |
A8 nz---- 2 TAY Transfer Accumulator to Y Y=A AA nz---- 2 TAX Transfer Accumulator to X X=A BA nz---- 2 TSX Transfer Stack pointer to X X=S 98 nz---- 2 TYA Transfer Y to Accumulator A=Y 8A nz---- 2 TXA Transfer X to Accumulator A=X 9A ------ 2 TXS Transfer X to Stack pointer S=X |
A9 nn nz---- 2 LDA #nn Load A with Immediate A=nn A5 nn nz---- 3 LDA nn Load A with Zero Page A=[nn] B5 nn nz---- 4 LDA nn,X Load A with Zero Page,X A=[nn+X] AD nn nn nz---- 4 LDA nnnn Load A with Absolute A=[nnnn] BD nn nn nz---- 4* LDA nnnn,X Load A with Absolute,X A=[nnnn+X] B9 nn nn nz---- 4* LDA nnnn,Y Load A with Absolute,Y A=[nnnn+Y] A1 nn nz---- 6 LDA (nn,X) Load A with (Indirect,X) A=[WORD[nn+X]] B1 nn nz---- 5* LDA (nn),Y Load A with (Indirect),Y A=[WORD[nn]+Y] A2 nn nz---- 2 LDX #nn Load X with Immediate X=nn A6 nn nz---- 3 LDX nn Load X with Zero Page X=[nn] B6 nn nz---- 4 LDX nn,Y Load X with Zero Page,Y X=[nn+Y] AE nn nn nz---- 4 LDX nnnn Load X with Absolute X=[nnnn] BE nn nn nz---- 4* LDX nnnn,Y Load X with Absolute,Y X=[nnnn+Y] A0 nn nz---- 2 LDY #nn Load Y with Immediate Y=nn A4 nn nz---- 3 LDY nn Load Y with Zero Page Y=[nn] B4 nn nz---- 4 LDY nn,X Load Y with Zero Page,X Y=[nn+X] AC nn nn nz---- 4 LDY nnnn Load Y with Absolute Y=[nnnn] BC nn nn nz---- 4* LDY nnnn,X Load Y with Absolute,X Y=[nnnn+X] |
85 nn ------ 3 STA nn Store A in Zero Page [nn]=A 95 nn ------ 4 STA nn,X Store A in Zero Page,X [nn+X]=A 8D nn nn ------ 4 STA nnnn Store A in Absolute [nnnn]=A 9D nn nn ------ 5 STA nnnn,X Store A in Absolute,X [nnnn+X]=A 99 nn nn ------ 5 STA nnnn,Y Store A in Absolute,Y [nnnn+Y]=A 81 nn ------ 6 STA (nn,X) Store A in (Indirect,X) [[nn+x]]=A 91 nn ------ 6 STA (nn),Y Store A in (Indirect),Y [[nn]+y]=A 86 nn ------ 3 STX nn Store X in Zero Page [nn]=X 96 nn ------ 4 STX nn,Y Store X in Zero Page,Y [nn+Y]=X 8E nn nn ------ 4 STX nnnn Store X in Absolute [nnnn]=X 84 nn ------ 3 STY nn Store Y in Zero Page [nn]=Y 94 nn ------ 4 STY nn,X Store Y in Zero Page,X [nn+X]=Y 8C nn nn ------ 4 STY nnnn Store Y in Absolute [nnnn]=Y |
48 ------ 3 PHA Push accumulator on stack [S]=A 08 ------ 3 PHP Push processor status on stack [S]=P 68 nz---- 4 PLA Pull accumulator from stack A=[S] 28 nzcidv 4 PLP Pull processor status from stack P=[S] |
| CPU Arithmetic/Logical Operations |
69 nn nzc--v 2 ADC #nn Add Immediate A=A+C+nn 65 nn nzc--v 3 ADC nn Add Zero Page A=A+C+[nn] 75 nn nzc--v 4 ADC nn,X Add Zero Page,X A=A+C+[nn+X] 6D nn nn nzc--v 4 ADC nnnn Add Absolute A=A+C+[nnnn] 7D nn nn nzc--v 4* ADC nnnn,X Add Absolute,X A=A+C+[nnnn+X] 79 nn nn nzc--v 4* ADC nnnn,Y Add Absolute,Y A=A+C+[nnnn+Y] 61 nn nzc--v 6 ADC (nn,X) Add (Indirect,X) A=A+C+[[nn+X]] 71 nn nzc--v 5* ADC (nn),Y Add (Indirect),Y A=A+C+[[nn]+Y] |
E9 nn nzc--v 2 SBC #nn Subtract Immediate A=A+C-1-nn E5 nn nzc--v 3 SBC nn Subtract Zero Page A=A+C-1-[nn] F5 nn nzc--v 4 SBC nn,X Subtract Zero Page,X A=A+C-1-[nn+X] ED nn nn nzc--v 4 SBC nnnn Subtract Absolute A=A+C-1-[nnnn] FD nn nn nzc--v 4* SBC nnnn,X Subtract Absolute,X A=A+C-1-[nnnn+X] F9 nn nn nzc--v 4* SBC nnnn,Y Subtract Absolute,Y A=A+C-1-[nnnn+Y] E1 nn nzc--v 6 SBC (nn,X) Subtract (Indirect,X) A=A+C-1-[[nn+X]] F1 nn nzc--v 5* SBC (nn),Y Subtract (Indirect),Y A=A+C-1-[[nn]+Y] |
29 nn nz---- 2 AND #nn AND Immediate A=A AND nn 25 nn nz---- 3 AND nn AND Zero Page A=A AND [nn] 35 nn nz---- 4 AND nn,X AND Zero Page,X A=A AND [nn+X] 2D nn nn nz---- 4 AND nnnn AND Absolute A=A AND [nnnn] 3D nn nn nz---- 4* AND nnnn,X AND Absolute,X A=A AND [nnnn+X] 39 nn nn nz---- 4* AND nnnn,Y AND Absolute,Y A=A AND [nnnn+Y] 21 nn nz---- 6 AND (nn,X) AND (Indirect,X) A=A AND [[nn+X]] 31 nn nz---- 5* AND (nn),Y AND (Indirect),Y A=A AND [[nn]+Y] |
49 nn nz---- 2 EOR #nn XOR Immediate A=A XOR nn 45 nn nz---- 3 EOR nn XOR Zero Page A=A XOR [nn] 55 nn nz---- 4 EOR nn,X XOR Zero Page,X A=A XOR [nn+X] 4D nn nn nz---- 4 EOR nnnn XOR Absolute A=A XOR [nnnn] 5D nn nn nz---- 4* EOR nnnn,X XOR Absolute,X A=A XOR [nnnn+X] 59 nn nn nz---- 4* EOR nnnn,Y XOR Absolute,Y A=A XOR [nnnn+Y] 41 nn nz---- 6 EOR (nn,X) XOR (Indirect,X) A=A XOR [[nn+X]] 51 nn nz---- 5* EOR (nn),Y XOR (Indirect),Y A=A XOR [[nn]+Y] |
09 nn nz---- 2 ORA #nn OR Immediate A=A OR nn 05 nn nz---- 3 ORA nn OR Zero Page A=A OR [nn] 15 nn nz---- 4 ORA nn,X OR Zero Page,X A=A OR [nn+X] 0D nn nn nz---- 4 ORA nnnn OR Absolute A=A OR [nnnn] 1D nn nn nz---- 4* ORA nnnn,X OR Absolute,X A=A OR [nnnn+X] 19 nn nn nz---- 4* ORA nnnn,Y OR Absolute,Y A=A OR [nnnn+Y] 01 nn nz---- 6 ORA (nn,X) OR (Indirect,X) A=A OR [[nn+X]] 11 nn nz---- 5* ORA (nn),Y OR (Indirect),Y A=A OR [[nn]+Y] |
C9 nn nzc--- 2 CMP #nn Compare A with Immediate A-nn C5 nn nzc--- 3 CMP nn Compare A with Zero Page A-[nn] D5 nn nzc--- 4 CMP nn,X Compare A with Zero Page,X A-[nn+X] CD nn nn nzc--- 4 CMP nnnn Compare A with Absolute A-[nnnn] DD nn nn nzc--- 4* CMP nnnn,X Compare A with Absolute,X A-[nnnn+X] D9 nn nn nzc--- 4* CMP nnnn,Y Compare A with Absolute,Y A-[nnnn+Y] C1 nn nzc--- 6 CMP (nn,X) Compare A with (Indirect,X) A-[[nn+X]] D1 nn nzc--- 5* CMP (nn),Y Compare A with (Indirect),Y A-[[nn]+Y] E0 nn nzc--- 2 CPX #nn Compare X with Immediate X-nn E4 nn nzc--- 3 CPX nn Compare X with Zero Page X-[nn] EC nn nn nzc--- 4 CPX nnnn Compare X with Absolute X-[nnnn] C0 nn nzc--- 2 CPY #nn Compare Y with Immediate Y-nn C4 nn nzc--- 3 CPY nn Compare Y with Zero Page Y-[nn] CC nn nn nzc--- 4 CPY nnnn Compare Y with Absolute Y-[nnnn] |
24 nn xz---x 3 BIT nn Bit Test A AND [nn], N=[nn].7, V=[nn].6 2C nn nn xz---x 4 BIT nnnn Bit Test A AND [..], N=[..].7, V=[..].6 |
E6 nn nz---- 5 INC nn Increment Zero Page [nn]=[nn]+1 F6 nn nz---- 6 INC nn,X Increment Zero Page,X [nn+X]=[nn+X]+1 EE nn nn nz---- 6 INC nnnn Increment Absolute [nnnn]=[nnnn]+1 FE nn nn nz---- 7 INC nnnn,X Increment Absolute,X [nnnn+X]=[nnnn+X]+1 E8 nz---- 2 INX Increment X X=X+1 C8 nz---- 2 INY Increment Y Y=Y+1 |
C6 nn nz---- 5 DEC nn Decrement Zero Page [nn]=[nn]-1 D6 nn nz---- 6 DEC nn,X Decrement Zero Page,X [nn+X]=[nn+X]-1 CE nn nn nz---- 6 DEC nnnn Decrement Absolute [nnnn]=[nnnn]-1 DE nn nn nz---- 7 DEC nnnn,X Decrement Absolute,X [nnnn+X]=[nnnn+X]-1 CA nz---- 2 DEX Decrement X X=X-1 88 nz---- 2 DEY Decrement Y Y=Y-1 |
| CPU Rotate and Shift Instructions |
0A nzc--- 2 ASL A Shift Left Accumulator SHL A 06 nn nzc--- 5 ASL nn Shift Left Zero Page SHL [nn] 16 nn nzc--- 6 ASL nn,X Shift Left Zero Page,X SHL [nn+X] 0E nn nn nzc--- 6 ASL nnnn Shift Left Absolute SHL [nnnn] 1E nn nn nzc--- 7 ASL nnnn,X Shift Left Absolute,X SHL [nnnn+X] |
4A 0zc--- 2 LSR A Shift Right Accumulator SHR A 46 nn 0zc--- 5 LSR nn Shift Right Zero Page SHR [nn] 56 nn 0zc--- 6 LSR nn,X Shift Right Zero Page,X SHR [nn+X] 4E nn nn 0zc--- 6 LSR nnnn Shift Right Absolute SHR [nnnn] 5E nn nn 0zc--- 7 LSR nnnn,X Shift Right Absolute,X SHR [nnnn+X] |
2A nzc--- 2 ROL A Rotate Left Accumulator RCL A 26 nn nzc--- 5 ROL nn Rotate Left Zero Page RCL [nn] 36 nn nzc--- 6 ROL nn,X Rotate Left Zero Page,X RCL [nn+X] 2E nn nn nzc--- 6 ROL nnnn Rotate Left Absolute RCL [nnnn] 3E nn nn nzc--- 7 ROL nnnn,X Rotate Left Absolute,X RCL [nnnn+X] |
6A nzc--- 2 ROR A Rotate Right Accumulator RCR A 66 nn nzc--- 5 ROR nn Rotate Right Zero Page RCR [nn] 76 nn nzc--- 6 ROR nn,X Rotate Right Zero Page,X RCR [nn+X] 6E nn nn nzc--- 6 ROR nnnn Rotate Right Absolute RCR [nnnn] 7E nn nn nzc--- 7 ROR nnnn,X Rotate Right Absolute,X RCR [nnnn+X] |
| CPU Jump and Control Instructions |
4C nn nn ------ 3 JMP nnnn Jump Absolute PC=nnnn 6C nn nn ------ 5 JMP (nnnn) Jump Indirect PC=WORD[nnnn] 20 nn nn ------ 6 JSR nnnn Jump and Save Return Addr. [S]=PC+2,PC=nnnn 40 nzcidv 6 RTI Return from BRK/IRQ/NMI P=[S], PC=[S] 60 ------ 6 RTS Return from Subroutine PC=[S]+1 |
10 dd ------ 2** BPL disp Branch on result plus if N=0 PC=PC+/-nn 30 dd ------ 2** BMI disp Branch on result minus if N=1 PC=PC+/-nn 50 dd ------ 2** BVC disp Branch on overflow clear if V=0 PC=PC+/-nn 70 dd ------ 2** BVS disp Branch on overflow set if V=1 PC=PC+/-nn 90 dd ------ 2** BCC disp Branch on carry clear if C=0 PC=PC+/-nn B0 dd ------ 2** BCS disp Branch on carry set if C=1 PC=PC+/-nn D0 dd ------ 2** BNE disp Branch on result not zero if Z=0 PC=PC+/-nn F0 dd ------ 2** BEQ disp Branch on result zero if Z=1 PC=PC+/-nn |
00 ---1-- 7 BRK Force Break B=1 [S]=PC+1,[S]=P,I=1,PC=[FFFE] -- ---1-- ?? /IRQ Interrupt B=0 [S]=PC,[S]=P,I=1,PC=[FFFE] -- ---1-- ?? /NMI NMI B=0 [S]=PC,[S]=P,I=1,PC=[FFFA] -- ---1-- T+6 /RESET Reset PC=[FFFC],I=1 |
IRQs are executed whenever "/IRQ=LOW AND I=0". NMIs are executed whenever "/NMI changes from HIGH to LOW". |
18 --0--- 2 CLC Clear carry flag C=0 58 ---0-- 2 CLI Clear interrupt disable bit I=0 D8 ----0- 2 CLD Clear decimal mode D=0 B8 -----0 2 CLV Clear overflow flag V=0 38 --1--- 2 SEC Set carry flag C=1 78 ---1-- 2 SEI Set interrupt disable bit I=1 F8 ----1- 2 SED Set decimal mode D=1 |
EA ------ 2 NOP No operation No operation |
| CPU Illegal Opcodes |
87 nn ------ 3 SAX nn STA+STX [nn]=A AND X 97 nn ------ 4 SAX nn,Y STA+STX [nn+Y]=A AND X 8F nn nn ------ 4 SAX nnnn STA+STX [nnnn]=A AND X 83 nn ------ 6 SAX (nn,X) STA+STX [WORD[nn+X]]=A AND X A7 nn nz---- 3 LAX nn LDA+LDX A,X=[nn] B7 nn nz---- 4 LAX nn,Y LDA+LDX A,X=[nn+Y] AF nn nn nz---- 4 LAX nnnn LDA+LDX A,X=[nnnn] BF nn nn nz---- 4* LAX nnnn,X LDA+LDX A,X=[nnnn+X] A3 nn nz---- 6 LAX (nn,X) LDA+LDX A,X=[WORD[nn+X]] B3 nn nz---- 5* LAX (nn),Y LDA+LDX A,X=[WORD[nn]+Y] |
00+yy nzc--- SLO op ASL+ORA op=op SHL 1 // A=A OR op 20+yy nzc--- RLA op ROL+AND op=op RCL 1 // A=A AND op 40+yy nzc--- SRE op LSR+EOR op=op SHR 1 // A=A XOR op 60+yy nzc--v RRA op ROR+ADC op=op RCR 1 // A=A ADC op C0+yy nzc--- DCP op DEC+CMP op=op-1 // A-op E0+yy nzc--v ISC op INC+SBC op=op+1 // A=A-op cy? |
07+xx nn 5 nn [nn] 17+xx nn 6 nn,X [nn+X] 03+xx nn 8 (nn,X) [WORD[nn+X]] 13+xx nn 8 (nn),Y [WORD[nn]+Y] 0F+xx nn nn 6 nnnn [nnnn] 1F+xx nn nn 7 nnnn,X [nnnn+X] 1B+xx nn nn 7 nnnn,Y [nnnn+Y] |
0B nn nzc--- 2 ANC #nn AND+ASL A=A AND nn 2B nn nzc--- 2 ANC #nn AND+ROL A=A AND nn 4B nn nzc--- 2 ALR #nn AND+LSR A=(A AND nn)*2 MUL2??? 6B nn nzc--v 2 ARR #nn AND+ROR A=(A AND nn)/2 8B nn nz---- 2 XAA #nn ((2)) TXA+AND A=X AND nn AB nn nz---- 2 LAX #nn ((2)) LDA+TAX A,X=nn CB nn nzc--- 2 AXS #nn CMP+DEX X=A AND X -nn cy? EB nn nzc--v 2 SBC #nn SBC+NOP A=A-nn cy? 93 nn ------ 6 AHX (nn),Y ((1)) [WORD[nn]+Y] = A AND X AND H 9F nn nn ------ 5 AHX nnnn,Y ((1)) [nnnn+Y] = A AND X AND H 9C nn nn ------ 5 SHY nnnn,X ((1)) [nnnn+X] = Y AND H 9E nn nn ------ 5 SHX nnnn,Y ((1)) [nnnn+Y] = X AND H 9B nn nn ------ 5 TAS nnnn,Y ((1)) STA+TXS S=A AND X // [nnnn+Y]=S AND H BB nn nn nz---- 4* LAS nnnn,Y LDA+TSX A,X,S = [nnnn+Y] AND S |
xx ------ 2 NOP (xx=1A,3A,5A,7A,DA,FA) xx nn ------ 2 NOP #nn (xx=80,82,89,C2,E2) xx nn ------ 3 NOP nn (xx=04,44,64) xx nn ------ 4 NOP nn,X (xx=14,34,54,74,D4,F4) xx nn nn ------ 4 NOP nnnn (xx=0C) xx nn nn ------ 4* NOP nnnn,X (xx=1C,3C,5C,7C,DC,FC) xx ------ - KIL (xx=02,12,22,32,42,52,62,72,92,B2,D2,F2) |
AHX {adr} = stores A&X&H into {adr}
SHX {adr} = stores X&H into {adr}
SHY {adr} = stores Y&H into {adr}
|
| CPU Assembler Directives |
65XX-style 80XX-style Expl. *=$c100 org 0c100h sets the assumed origin in memory *=*+8 org $+8 increments origin, does NOT produce data label label: sets a label equal to the current address label=$dc00 label equ 0dc00h assigns a value or address to label .by $00 db 00h defines a (list of) byte(s) in memory .byt $00 defb 00h same as .by and db .wd $0000 dw 0000h defines a (list of) word(s) in memory .end end indicates end of source code file |nn [|nn] force 16bit "00NN" instead 8bit "NN" #<nnnn nnnn AND 0FFh isolate lower 8bits of 16bit value #>nnnn nnnn DIV 100h isolate upper 8bits of 16bit value |
| CPU The 65XX Family |
6501 6502 Used in the CBM floppies and some other 8 bit computers. 6507 Used in Atari 2600, 28pins (only 13 address lines, no /IRQ, no /NMI). 6510 Used in C64, with one built-in I/O port. 8500 Used in C64-II, with different pin-outs. 8502 Used in C128s. |
65C02 Extension of the 6502, used in the C16, C116 and the Plus/4 computers. 65SC02 Small version of the 65C02 which lost a few opcodes again. 65CE02 Extension of the 65C02, used in the C65. 65816 Extended 6502 with new opcodes and 16 bit operation modes. 2A03 Nintendo NES/Famicom, modified CPU, built-in sound/video registers. |
| CPU Local Usage |
| Hardware Pin-Outs |
| Chipset Pin-Outs |
Pin Name Dir Expl.
1 ROUT Out Sound channel 1+2 output
2 COUT Out Sound channel 3+4+5 output
3 /RES In Resets several internal 2A03 registers, and the 6502.
4-19 A0-15 Out Address Bus
20 GND - Supply Ground
21-28 D7-0 I/O Data Bus
29 CLK In Master clock input (236,250/11 MHz), clocks an internal
divide-by-12 counter.
30 ? In Normally grounded in NES/FC consoles, this pin has unknown
functionality. I suspect that it is an input controlling
somthing, since the pin does draw a little current.
31 PHI2 Out Divide-by-12 result of the CLK signal (1.79 MHz).
The internal 6502 along with function generating hardware,
is clocked off this frequency, and is available externally
here so that it can be used as a data bus enable signal
(when at logic level 1) for external 6502 address decoder
logic. The signal has a 62.5% duty cycle.
32 /IRQ In Interrupt Request (Low)
33 /NMI In Non-Maskable Interrupt (on High-to-Low Transition)
34 R/W Out Direction of 6502's data bus (0=Write/Out, 1=Read/In)
35 /JOY2 Out Low if A0-A15=4017h, R/W=0, PHI2=1
36 /JOY1 Out Low if A0-A15=4016h, R/W=0, PHI2=1
37-39 J2-0 Out Bit2-0 of internal register 4016h (Bit0 = Joystick strobe)
40 VCC - Supply +5VDC
|
Pin Dir Name Expl 1 In CPU R/W Direction when /CS=LOW 2-9 I/O CPU D0-D7 Data when /CS=LOW 10-12 In CPU A2-A0 Register Select when /CS=LOW 13 In CPU /CS CPU read/write to/from PPU Registers 14-17 I/O EXT0-EXT3 External Master/Slave Video signal (not used) 18 In CLK 21.47727MHz NTSC, 26.601712MHz PAL 19 Out /VBL VBlank, LOW max 20 scanlines or until acknowledged 20 In VEE GND Supply Ground 21 Out VOUT Composite Video output 22 In /SYNC EXT External Master /VBL for use by slave (not used) (*) 23,24 Out PPU /W,/R Video memory Write/Read requests 25-30 Out PPU A13-A8 Video memory MSB-address lines 31-38 I/O PPU AD7-AD0 Video memory LSB-address and data lines 39 Out PPU ALE Address Latch Enable, HIGH when A0-A7 output at AD0-AD7 40 In VCC +5VDC Supply |
| NES Expansion Port |
Pin Dir Expl. 1,48,2,47 Out VCC,VCC,GND,GND (Supply +5VDC and Ground) 23 Out VDD voltage from external power supply (usually +10VDC) 3 In AIN (Audio Input) 21,22,23,24 Out VOUT, AOUT (Video and Audio Outputs) 4,14,25-32 I/O CPU /NMI,/IRQ,D7,D6,D5,D4,D3,D2,D1,D0 5,24 Out CPU A15, CIC 4MHz 6-10,38-42 I/O Cart Pin 51-55,20-16 43,44,45 Out OUT0, OUT1, OUT2 (Port 4016h Bit0-2 Outputs) 34 and 37 Out PORT0-CLK (both pins) (CPU Read from Port 4016h) 11 and 17 Out PORT1-CLK (both pins) (CPU Read from Port 4017h) 35,12,33,13,36 In PORT0-0,1,2,3,4 (Port 4016h Bit0-3 Inverted Inputs) 19,20,15,16,18 In PORT1-0,1,2,3,4 (Port 4017h Bit0-3 Inverted Inputs) 46 - Unused |
| Nocash SRAM Circuit |
________ ________ ________
VCC ---------|A13-A19 | VCC ------tmp-|A15-A18 | VCC -----tmp-|A13-A18 |
CPU A0-A12 --|A0-A12 | CPU A0-A14 ---|A0-A14 | PPU A0-A12 --|A0-A12 |
CPU D0-D7 ---|D0-D7 | CPU D0-D7 ----|D0-D7 | PPU D0-D7 ---|D0-D7 |
CPU /PRG ----|/CS | CPU /PRG -----|/CS | PPU A13 -tmp-|/CS |
LPT /LF -tmp-|/OE BIOS| LPT /SEL -----|/OE WRAM| PPU /R ------|/OE VRAM|
|________| CPU R/W ------|/WE | PPU /W ------|/WE |
___ |________| |________|
VCC -|___|- CPU /RESET
CIC /RESET --cut-- CPU /RESET FLOPPY 5VDC ------- VCC (supply)
CIC /RESET --|<|-- CPU /RESET LPT GND ------- GND
LPT /INIT --|<|-- CPU /RESET PPU /A13 --tmp-- NES /VCS
LPT /STROBE --|<|-- CPU /NMI PPU A10 --tmp-- NES VA10
CIC MODE --cut-- VCC (lockout) LPT BUSY ------- CPU OUT2
CIC MODE ------- GND (no lockout) LPT D7 ------- EXP PORT0-1
|
____ ____ LPT D0 ----|OR \__|AND |_______ NES VA10 (out) PPU A10 --undo-- NES VA10 PPU A10 ---|____/ |7411| LPT D1 ----|OR \__| |__tmp__ VCC (third AND-input, used in Step 3) PPU A11 ---|____/ |____| |
____ ____ ___ CPU /PRG --|OR \__ SLOT /PRG LPT /LF --|AND \__ CART VCC -|___|- LPT /LF /CART -----|____/ LPT /SEL -|____/ VCC -|___|- LPT /SEL PPU /R ----|OR \__ SLOT /R CART -----|NAND\__ /CART VCC -|___|- LPT D0 /CART -----|____/ CART -----|____/ VCC -|___|- LPT D1 CART ------|OR \__ VRAM /CS CPU A14 --|AND \__ SLOT A14 PPU A13 ---|____/ CART -----|____/ NES /VCS --cut-- SLOT /VCS /CART -----|OR \__ AND (Step 2) NES VA10 --cut-- SLOT VA10 SLOT VA10 -|____/ CPU A14 --cut-- SLOT A14 CART ------|OR \__ ____ CPU /PRG --cut-- SLOT /PRG PPU /A13 --|____/ |AND \__ NES /VCS PPU /R --cut-- SLOT /R SLOT /VCS -|OR \__|____/ VCC --undo-- AND (Step 2) /CART -----|____/ PPU A13 -undo- VRAM /CS PPU /A13 --undo- NES /VCS |
__________ __________ ____
LPT /LF ----|/CLKEN1 | LPT LF -----|/CLKEN1 | WRAM A14 --|____|-- VCC
CPU R/W ----|/CLKEN2 | CPU R/W ----|/CLKEN2 | WRAM A15 --|____|-- VCC
CPU /PRG ---|CLK | CPU /PRG ---|CLK | WRAM A16 --|____|-- VCC
CPU D0..3 --|Q0..3 | CPU D0..3 --|Q0..3 | LPT /LF ---|NAND\_ LPT LF
GND --------|/OE1 | CPU A14 ----|/OE1 | LPT /LF ---|____/
GND --------|/OE2 74173| GND --------|/OE2 74173| LPT /SEL --|NAND\_ BIOS
GND --------|RST CNROM| GND --------|RST UNROM| LPT LF ----|____/ /OE
VRAM A13-16-|D0..3 | WRAM A14-16-|D0..2 | WRAM A15-A16 --undo-- VCC
|__________| |__________| VRAM A13-A16 --undo-- VCC
LPT /LF --undo-- BIOS /OE WRAM A14 --undo-- CPU A14
|
____ ____ __________ CPU A13 --|AND | CPU /PRG -|AND | ____ CPU D0-7--|Q0-7 D0-7|--LPT D0-7 CPU A14 --|7411| CPU R/W --|7411| VCC-|NAND\__________|/OE1 /OE2|--LPT /SEL CPU PHI2 -|____|-----------|____|-----|____/ 74541 |__________| |
2 SRAM WRAM/VRAM, min 32K/8K, recommended 128K/32K, max 128K/128K 1 EPROM BIOS, 27C64 or similar, min 8K 2 74LS32 quad 2-input OR gates 1 74LS08 quad 2-input AND gates 1 74LS00 quad 2-input NAND gates 1 74LS11 triple 3-input AND gates 2 74LS173 4-bit 3-state flip-flops 1 74LS541 8-bit 3-state buffer/line driver 8 10K pull-up resitors 3 1N4148 diodes for /RESET and /NMI |
0000 85 04 48 8A 48 A9 19 8D FA FF A9 04 8D FB FF A2 0010 08 E0 00 D0 FC 68 AA 68 60 A9 00 06 04 69 03 8D 0020 16 40 CA 40 8A 48 A9 3B 8D FA FF A9 04 8D FB FF 0030 A2 08 E0 00 D0 FC 68 AA A5 04 60 24 0D 30 09 AD 0040 16 40 4A 4A 26 04 CA 40 AD 00 60 85 04 A2 00 40 0050 20 24 04 A2 7E A0 04 24 0D 30 04 A2 8D A0 04 8E 0060 FA FF 8C FB FF 8D FF FF A9 00 8D 01 20 8D 06 20 0070 8D 06 20 A2 00 A0 20 A9 01 85 04 4C 7B 04 AD 00 0080 60 8D 07 20 CA D0 FE 88 D0 FE 4C 1C 06 AD 16 40 0090 4A 4A 26 04 90 FE A5 04 8D 07 20 A9 01 85 04 CA 00A0 D0 FE 88 D0 FE 4C 1C 06 20 24 04 A2 DC A0 04 24 00B0 0D 30 04 A2 EE A0 04 8E FA FF 8C FB FF 8D FF FF 00C0 A0 BF A2 FF C9 FF D0 04 A0 FF A2 F9 8C FC 04 8C 00D0 E2 04 E8 A0 40 A9 01 85 04 4C D9 04 AD 00 60 CA 00E0 9D 00 FF D0 FE CE E2 04 88 D0 FE 4C 1C 06 AD 16 00F0 40 4A 4A 26 04 90 FE A5 04 CA 9D 00 FF A9 01 85 0100 04 E0 00 D0 FE CE FC 04 88 D0 FE 4C 1C 06 A2 00 0110 20 24 04 95 05 E8 E0 08 D0 F6 A2 00 B5 05 9D FA 0120 FF E8 E0 06 D0 F6 A1 05 81 05 4C 2A 05 A2 55 A0 0130 AA 8E FE FF 8C FF FF EC FE FF D0 F5 CC FF FF D0 0140 F0 8C FE FF 8E FF FF CC FE FF D0 E5 EC FF FF D0 0150 E0 60 A2 00 BD 61 05 20 00 04 E8 BD 61 05 D0 F4 0160 60 4E 4F 24 4E 45 53 20 42 49 4F 53 20 56 31 2E 0170 30 00 A9 00 85 0D 20 87 05 A9 80 85 0D 20 87 05 0180 F0 04 A9 00 85 0D 60 A2 00 A0 2B 20 24 04 DD A1 0190 05 F0 02 A0 2D E8 E0 08 D0 F1 98 20 00 04 C9 2B 01A0 60 00 FF 55 AA 0F F0 3C C3 A9 57 20 00 04 A2 FF 01B0 8D FF FF E8 8E 00 80 8E FF BF EC FF FF F0 06 E0 01C0 1F D0 F0 A2 01 E8 8A 20 00 04 60 A9 56 20 00 04 01D0 A2 40 A0 56 A9 00 8D 01 20 CA 8E FF FF 8D 06 20 01E0 8D 06 20 8C 07 20 8E 07 20 D0 EE A2 00 8E FF FF 01F0 8D 06 20 8D 06 20 CD 07 20 CC 07 20 D0 0A EC 07 0200 20 D0 05 E8 E0 40 D0 E5 8A 20 00 04 60 20 2D 05 0210 20 52 05 20 72 05 20 A9 05 20 CB 05 A9 52 20 00 0220 04 20 24 04 C9 57 D0 03 4C A8 04 C9 56 D0 03 4C 0230 50 04 C9 46 D0 03 4C 0E 05 4C 39 06 A2 00 BD 00 0240 E0 9D 00 04 BD 00 E1 9D 00 05 BD 00 E2 9D 00 06 0250 BD 00 E3 9D 00 07 E8 D0 E5 60 78 D8 A9 00 8D 00 0260 20 AD 02 20 A2 FF 9A 20 3C E2 4C 0D 06 FF FF FF 0270 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF .... FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 1FF0 FF FF FF FF FF FF FF FF FF FF 00 00 5A E2 00 00 |
| About Everynes |
http://nocash.emubase.de/nes.htm |
Pascal Felber Patrick Lesaard Tink Goroh Pan of Anthrox Bas Vijfwinkel Kawasedo Paul Robson Marcel de Kogel Serge Skorobogatov Alex Krasivsky John Stiles |