aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/apu.s4
-rw-r--r--include/asm.s9
-rw-r--r--include/mmc1.s5
-rw-r--r--include/oam.s12
-rw-r--r--include/ppu.s6
5 files changed, 36 insertions, 0 deletions
diff --git a/include/apu.s b/include/apu.s
new file mode 100644
index 0000000..8a23c49
--- /dev/null
+++ b/include/apu.s
@@ -0,0 +1,4 @@
+.scope APU
+ m_dmc = $4010
+ m_frame_counter = $4017
+.endscope
diff --git a/include/asm.s b/include/asm.s
new file mode 100644
index 0000000..f5d39bc
--- /dev/null
+++ b/include/asm.s
@@ -0,0 +1,9 @@
+;; Pseudo-instruction from 'nasm' that is not available for 'ca65'. An empty
+;; implementation is actually quite accurate, as it's just a way for 'nasm' to
+;; perform extra checks when programmers want to explicitly make the code fall
+;; through.
+.ifndef __NASM__
+ .macro __fallthrough__ arg
+ ;; Nothing to do.
+ .endmacro
+.endif
diff --git a/include/mmc1.s b/include/mmc1.s
new file mode 100644
index 0000000..3a6bc5d
--- /dev/null
+++ b/include/mmc1.s
@@ -0,0 +1,5 @@
+.scope MMC1
+ m_control = $8000
+ m_chr_bank = $A000
+ m_prg_bank = $E000
+.endscope
diff --git a/include/oam.s b/include/oam.s
new file mode 100644
index 0000000..a73494d
--- /dev/null
+++ b/include/oam.s
@@ -0,0 +1,12 @@
+.scope OAM
+ ;; Region in internal RAM where sprites are being allocated for later use in
+ ;; the DMA process. The entire page is reserved, as there are 64 sprites x 4
+ ;; bytes each = 256 bytes in total.
+ m_sprites = $200 ; asan:reserve $100
+
+ ;;;
+ ;; Actual addresses from OAM space.
+
+ m_address = $2003
+ m_dma = $4014
+.endscope
diff --git a/include/ppu.s b/include/ppu.s
new file mode 100644
index 0000000..dbef40e
--- /dev/null
+++ b/include/ppu.s
@@ -0,0 +1,6 @@
+.scope PPU
+ m_control = $2000
+ m_mask = $2001
+ m_status = $2002
+ m_scroll = $2005
+.endscope