1
0
mirror of https://github.com/safiire/n65.git synced 2024-05-28 02:48:25 +00:00
n65/nes_lib/nes.sym

106 lines
3.3 KiB
Plaintext

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Let's start a little library for naming parts of memory in the NES
;
; Including this file will not emit any instructions or data into your binary
; It only defines symbols in the symbol table to name memory addresses
;
; Author: Saf Allen 2015
; I picked up some extra register names for mappers etc here:
; http://wiki.nesdev.com/w/index.php/Registers
; Some different common names from here:
; http://wiki.nesdev.com/w/index.php/PPU_registers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.org $0000
.scope nes
.scope ppu
.org $2000
.space control 1 ; $2000
.space mask 1 ; $2001
.space status 1 ; $2002
.org $2005
.space scroll 1 ; $2005
.
.org $2003
.scope oam
.space address 1 ; $2003
.space io 1 ; $2004
.org $4014
.space dma 1 ; $4014
.
.org $2006
.scope vram
.space address 1 ; $2006
.space io 1 ; $2007
.
; Now let's do the APU registers
.org $4000
.scope apu
.scope pulse1
.space control 1 ; $4000
.space ramp_control 1 ; $4001
.space ft 1 ; $4002
.space ct 1 ; $4003
.
.scope pulse2
.space control 1 ; $4004
.space ramp_control 1 ; $4005
.space ft 1 ; $4006
.space ct 1 ; $4007
.
.scope triangle
.space control1 1 ; $4008
.space control2 1 ; $4009
.space freq1 1 ; $400A
.space freq2 1 ; $400B
.
.scope noise
.space control1 1 ; $400C
.space control2 1 ; $400D
.space freq1 1 ; $400E
.space freq2 1 ; $400F
.
.scope dmc
.space control 1 ; $4010
.space da 1 ; $4011
.space address 1 ; $4012
.space dl 1 ; $4013
.
.org $4015
.space channel_enable 1 ; $4015
.
.org $4016
.space controller1 1 ; $4016
.space controller2 1 ; $4017
.scope mapper
.org $8000
.space unrom 1
.org $8000
.space cnrom 1
.org $8000
.space mmc1_control 1
.org $A000
.space mmc1_vrom_low 1
.org $C000
.space mmc1_vrom_high 1
.org $E000
.space mmc1_prog 1
.org $8000
.space mmc3_command 1
.space mmc3_page 1
.org $A000
.space mmc3_mirror 1
.space mmc3_sram 1
.org $C000
.space mmc3_clock 1
.space mmc3_latch 1
.org $E000
.space mmc3_clock_off 1
.space mmc3_clock_on 1
.
.
; Let's put PC back somewhere sane
.org $0000