diff options
Diffstat (limited to 'shared')
| -rw-r--r-- | shared/apu.s | 8 | ||||
| -rw-r--r-- | shared/asm.s | 8 | ||||
| -rw-r--r-- | shared/oam.s | 11 | ||||
| -rw-r--r-- | shared/ppu.s | 9 |
4 files changed, 36 insertions, 0 deletions
diff --git a/shared/apu.s b/shared/apu.s new file mode 100644 index 0000000..814c446 --- /dev/null +++ b/shared/apu.s @@ -0,0 +1,8 @@ +.scope APU + m_square_1_envelope = $4000 + m_square_1_low = $4002 + m_square_1_high = $4003 + m_dmc = $4010 + m_status = $4015 + m_frame_counter = $4017 +.endscope diff --git a/shared/asm.s b/shared/asm.s index 67b195c..e67b7a6 100644 --- a/shared/asm.s +++ b/shared/asm.s @@ -20,3 +20,11 @@ .macro JAL ADDR jmp ADDR .endmacro + +;; The __fallthrough__ special statement allows developers to explicitly tell +;; the assembler that a "fall through" situation does not happen by mistake. +.ifndef __NASM__ + .macro __fallthrough__ arg + ;; NOTE: nothing to do :) + .endmacro +.endif diff --git a/shared/oam.s b/shared/oam.s new file mode 100644 index 0000000..ff23d64 --- /dev/null +++ b/shared/oam.s @@ -0,0 +1,11 @@ +.scope OAM + m_addr = $2003 + m_dma = $4014 +.endscope + +.macro OAM_WRITE_SPRITES + lda #$00 + sta OAM::m_addr + lda #$02 + sta OAM::m_dma +.endmacro diff --git a/shared/ppu.s b/shared/ppu.s index 42acb06..8b548e9 100644 --- a/shared/ppu.s +++ b/shared/ppu.s @@ -9,3 +9,12 @@ lda #value sta $2007 .endmacro + +.scope PPU + m_control = $2000 + m_mask = $2001 + m_status = $2002 + m_scroll = $2005 + m_address = $2006 + m_data = $2007 +.endscope |
