ROM_BASE equ $000000 ROM_SIZE equ $40000 ; K052109 tile stuff ; offsets are screwy because the game doesn't have A12 ; hooked up to the ic K052109_BASE equ $100000 ; RAM CHIPS PALETTE_RC_BASE equ $080000 PALETTE_RC_SIZE equ $1000 PALETTE_RC_ADDR_LINES equ 12 PALETTE_RC_MASK equ $ff SPRITE_RC_BASE equ $140400 SPRITE_RC_SIZE equ $400 SPRITE_RC_ADDR_LINES equ 9 SPRITE_RC_MASK equ $ffff TILE_RC_BASE equ K052109_BASE TILE_RC_SIZE equ $6000 TILE_RC_ADDR_LINES equ 13 TILE_RC_MASK equ $ffff WORK_RC_BASE equ $060000 WORK_RC_SIZE equ $4000 WORK_RC_ADDR_LINES equ 14 WORK_RC_MASK equ $ffff ; MEMORY REGIONS LAYER_A_TILE_BASE equ TILE_RC_BASE + $2000 LAYER_A_TILE_SIZE equ $1000 LAYER_A_TILE_PALETTE_BASE equ PALETTE_BASE + $800 ; high byte only LAYER_A_TILE_SCROLL_BASE equ K052109_BASE + $6000 LAYER_A_TILE_SCROLL_SIZE equ $400 LAYER_B_TILE_BASE equ TILE_RC_BASE + $4000 LAYER_B_TILE_SIZE equ $1000 LAYER_B_TILE_PALETTE_BASE equ PALETTE_BASE + $a00 ; lower byte only LAYER_B_TILE_SCROLL_BASE equ K052109_BASE + $6001 LAYER_B_TILE_SCROLL_SIZE equ $400 PALETTE_BASE equ PALETTE_RC_BASE PALETTE_SIZE equ PALETTE_RC_SIZE PALETTE_ENTRY_SIZE equ $40 SPRITE_BASE equ SPRITE_RC_BASE SPRITE_SIZE equ SPRITE_RC_SIZE SPRITE_PALETTE_BASE equ PALETTE_BASE + $400 TXT_TILE_BASE equ TILE_RC_BASE TXT_TILE_SIZE equ $1000 TXT_TILE_PALETTE_BASE equ PALETTE_BASE WORK_RAM_BASE equ WORK_RC_BASE WORK_RAM_SIZE equ WORK_RC_SIZE ; REG/IO REG_LAYER_A_TILE_SCROLL_X_LOW equ K052109_BASE + $6400 REG_LAYER_A_TILE_SCROLL_X_HIGH equ K052109_BASE + $6402 REG_LAYER_A_TILE_SCROLL_Y equ K052109_BASE + $6018 REG_LAYER_B_TILE_SCROLL_X_LOW equ K052109_BASE + $6401 REG_LAYER_B_TILE_SCROLL_X_HIGH equ K052109_BASE + $6403 REG_LAYER_B_TILE_SCROLL_Y equ K052109_BASE + $6019 ; A tile can point at 1 of 4 bank slots, with ; each bank slot being able to point at 1 of ; 16 tile rom banks REG_TILE_BANK_SLOTS_A equ K052109_BASE + $6b00 ; 0000 1111 - bank slots 0 and 1 REG_TILE_BANK_SLOTS_B equ K052109_BASE + $6e00 ; 2222 3333 - bank slots 2 and 3 REG_SOUND equ $0a0009 REG_WATCHDOG equ $0a0011 REG_INPUT_DSW1 equ $0a0011 REG_INPUT_DSW2 equ $0a0013 REG_INPUT_DSW3 equ $0a0019 REG_INPUT_P1 equ $0a0003 REG_INPUT_P2 equ $0a0005 REG_INPUT_P3 equ $0a0007 REG_INPUT_P4 equ $0a0015 REG_INPUT_SYSTEM equ $0a0001 CHAR_COLON equ $40 SOUND_NUM_STOP equ $ff macro WATCHDOG move.b d0, REG_WATCHDOG endm macro SOUND_PLAY move.b d0, REG_SOUND ; transitioning this bit from high to low ; will trigger an irq on the sound cpu. ; need to clean this up a little, the number ; of nops is just randomly picked move.b #$8, $a0001 nop nop nop nop nop nop nop move.b #$0, $a0001 endm macro SOUND_STOP move.b #$0, d0 SOUND_PLAY endm