Rizin
unix-like reverse engineering framework and cli tools
nes_specs.h File Reference

Go to the source code of this file.

Macros

#define INES_MAGIC   "\x4E\x45\x53\x1A"
 
#define PRG_PAGE_SIZE   0x4000
 
#define CHR_PAGE_SIZE   0x2000
 
#define INES_HDR_SIZE   sizeof(ines_hdr)
 
#define RAM_START_ADDRESS   0x0000
 
#define RAM_SIZE   0x0800
 
#define RAM_MIRROR_1_ADDRESS   0x0800
 
#define RAM_MIRROR_1_SIZE   0x0800
 
#define RAM_MIRROR_2_ADDRESS   0x1000
 
#define RAM_MIRROR_2_SIZE   0x0800
 
#define RAM_MIRROR_3_ADDRESS   0x1800
 
#define RAM_MIRROR_3_SIZE   0x0800
 
#define PPU_REG_ADDRESS   0x2000
 
#define PPU_REG_SIZE   0x0008
 
#define APU_AND_IOREGS_START_ADDRESS   0x4000
 
#define APU_AND_IOREGS_SIZE   0x0020
 
#define SRAM_START_ADDRESS   0x6000
 
#define SRAM_SIZE   0x2000
 
#define ROM_START_ADDRESS   0x8000
 
#define ROM_SIZE   0x8000
 
#define ROM_MIRROR_ADDRESS   0xC000
 
#define ROM_MIRROR_SIZE   0x8000
 
#define NMI_VECTOR_START_ADDRESS   0xFFFA
 
#define RESET_VECTOR_START_ADDRESS   0xFFFC
 
#define IRQ_VECTOR_START_ADDRESS   0xFFFE
 
#define PPU_CTRL_REG1   0x2000
 
#define PPU_CTRL_REG2   0x2001
 
#define PPU_STATUS   0x2002
 
#define PPU_SPR_ADDR   0x2003
 
#define PPU_SPR_DATA   0x2004
 
#define PPU_SCROLL_REG   0x2005
 
#define PPU_ADDRESS   0x2006
 
#define PPU_DATA   0x2007
 
#define SND_REGISTER   0x4000
 
#define SND_SQUARE1_REG   0x4000
 
#define SND_SQUARE2_REG   0x4004
 
#define SND_TRIANGLE_REG   0x4008
 
#define SND_NOISE_REG   0x400c
 
#define SND_DELTA_REG   0x4010
 
#define SND_MASTERCTRL_REG   0x4015
 
#define SPR_DMA   0x4014
 
#define JOYPAD_PORT   0x4016
 
#define JOYPAD_PORT1   0x4016
 
#define JOYPAD_PORT2   0x4017
 

Functions

 RZ_PACKED (typedef struct { char id[0x4];ut8 prg_page_count_16k;ut8 chr_page_count_8k;ut8 rom_control_byte_0;ut8 rom_control_byte_1;ut8 ram_bank_count_8k;ut8 reserved[7];}) ines_hdr
 

Macro Definition Documentation

◆ APU_AND_IOREGS_SIZE

#define APU_AND_IOREGS_SIZE   0x0020

Definition at line 31 of file nes_specs.h.

◆ APU_AND_IOREGS_START_ADDRESS

#define APU_AND_IOREGS_START_ADDRESS   0x4000

Definition at line 30 of file nes_specs.h.

◆ CHR_PAGE_SIZE

#define CHR_PAGE_SIZE   0x2000

Definition at line 12 of file nes_specs.h.

◆ INES_HDR_SIZE

#define INES_HDR_SIZE   sizeof(ines_hdr)

Definition at line 13 of file nes_specs.h.

◆ INES_MAGIC

#define INES_MAGIC   "\x4E\x45\x53\x1A"

Definition at line 9 of file nes_specs.h.

◆ IRQ_VECTOR_START_ADDRESS

#define IRQ_VECTOR_START_ADDRESS   0xFFFE

Definition at line 44 of file nes_specs.h.

◆ JOYPAD_PORT

#define JOYPAD_PORT   0x4016

Definition at line 64 of file nes_specs.h.

◆ JOYPAD_PORT1

#define JOYPAD_PORT1   0x4016

Definition at line 65 of file nes_specs.h.

◆ JOYPAD_PORT2

#define JOYPAD_PORT2   0x4017

Definition at line 66 of file nes_specs.h.

◆ NMI_VECTOR_START_ADDRESS

#define NMI_VECTOR_START_ADDRESS   0xFFFA

Definition at line 42 of file nes_specs.h.

◆ PPU_ADDRESS

#define PPU_ADDRESS   0x2006

Definition at line 52 of file nes_specs.h.

◆ PPU_CTRL_REG1

#define PPU_CTRL_REG1   0x2000

Definition at line 46 of file nes_specs.h.

◆ PPU_CTRL_REG2

#define PPU_CTRL_REG2   0x2001

Definition at line 47 of file nes_specs.h.

◆ PPU_DATA

#define PPU_DATA   0x2007

Definition at line 53 of file nes_specs.h.

◆ PPU_REG_ADDRESS

#define PPU_REG_ADDRESS   0x2000

Definition at line 27 of file nes_specs.h.

◆ PPU_REG_SIZE

#define PPU_REG_SIZE   0x0008

Definition at line 28 of file nes_specs.h.

◆ PPU_SCROLL_REG

#define PPU_SCROLL_REG   0x2005

Definition at line 51 of file nes_specs.h.

◆ PPU_SPR_ADDR

#define PPU_SPR_ADDR   0x2003

Definition at line 49 of file nes_specs.h.

◆ PPU_SPR_DATA

#define PPU_SPR_DATA   0x2004

Definition at line 50 of file nes_specs.h.

◆ PPU_STATUS

#define PPU_STATUS   0x2002

Definition at line 48 of file nes_specs.h.

◆ PRG_PAGE_SIZE

#define PRG_PAGE_SIZE   0x4000

Definition at line 11 of file nes_specs.h.

◆ RAM_MIRROR_1_ADDRESS

#define RAM_MIRROR_1_ADDRESS   0x0800

Definition at line 18 of file nes_specs.h.

◆ RAM_MIRROR_1_SIZE

#define RAM_MIRROR_1_SIZE   0x0800

Definition at line 19 of file nes_specs.h.

◆ RAM_MIRROR_2_ADDRESS

#define RAM_MIRROR_2_ADDRESS   0x1000

Definition at line 21 of file nes_specs.h.

◆ RAM_MIRROR_2_SIZE

#define RAM_MIRROR_2_SIZE   0x0800

Definition at line 22 of file nes_specs.h.

◆ RAM_MIRROR_3_ADDRESS

#define RAM_MIRROR_3_ADDRESS   0x1800

Definition at line 24 of file nes_specs.h.

◆ RAM_MIRROR_3_SIZE

#define RAM_MIRROR_3_SIZE   0x0800

Definition at line 25 of file nes_specs.h.

◆ RAM_SIZE

#define RAM_SIZE   0x0800

Definition at line 16 of file nes_specs.h.

◆ RAM_START_ADDRESS

#define RAM_START_ADDRESS   0x0000

Definition at line 15 of file nes_specs.h.

◆ RESET_VECTOR_START_ADDRESS

#define RESET_VECTOR_START_ADDRESS   0xFFFC

Definition at line 43 of file nes_specs.h.

◆ ROM_MIRROR_ADDRESS

#define ROM_MIRROR_ADDRESS   0xC000

Definition at line 39 of file nes_specs.h.

◆ ROM_MIRROR_SIZE

#define ROM_MIRROR_SIZE   0x8000

Definition at line 40 of file nes_specs.h.

◆ ROM_SIZE

#define ROM_SIZE   0x8000

Definition at line 37 of file nes_specs.h.

◆ ROM_START_ADDRESS

#define ROM_START_ADDRESS   0x8000

Definition at line 36 of file nes_specs.h.

◆ SND_DELTA_REG

#define SND_DELTA_REG   0x4010

Definition at line 60 of file nes_specs.h.

◆ SND_MASTERCTRL_REG

#define SND_MASTERCTRL_REG   0x4015

Definition at line 61 of file nes_specs.h.

◆ SND_NOISE_REG

#define SND_NOISE_REG   0x400c

Definition at line 59 of file nes_specs.h.

◆ SND_REGISTER

#define SND_REGISTER   0x4000

Definition at line 55 of file nes_specs.h.

◆ SND_SQUARE1_REG

#define SND_SQUARE1_REG   0x4000

Definition at line 56 of file nes_specs.h.

◆ SND_SQUARE2_REG

#define SND_SQUARE2_REG   0x4004

Definition at line 57 of file nes_specs.h.

◆ SND_TRIANGLE_REG

#define SND_TRIANGLE_REG   0x4008

Definition at line 58 of file nes_specs.h.

◆ SPR_DMA

#define SPR_DMA   0x4014

Definition at line 63 of file nes_specs.h.

◆ SRAM_SIZE

#define SRAM_SIZE   0x2000

Definition at line 34 of file nes_specs.h.

◆ SRAM_START_ADDRESS

#define SRAM_START_ADDRESS   0x6000

Definition at line 33 of file nes_specs.h.

Function Documentation

◆ RZ_PACKED()

RZ_PACKED ( typedef struct { char id[0x4];ut8 prg_page_count_16k;ut8 chr_page_count_8k;ut8 rom_control_byte_0;ut8 rom_control_byte_1;ut8 ram_bank_count_8k;ut8 reserved[7];}  )

References reserved.