ROM_BASE equ $8000 ROM_SIZE equ $8000 K052109_BASE equ $2000 ; RAM CHIPS ; bank switched into work ram space PALETTE_RC_BASE equ $0000 PALETTE_RC_SIZE equ $400 PALETTE_RC_ADDR_LINES equ 10 SPRITE_RC_BASE equ $5c00 SPRITE_RC_SIZE equ $400 SPRITE_RC_ADDR_LINES equ 10 TILE_RC_BASE equ K052109_BASE + $2000 TILE_RC_SIZE equ $1800 TILE_RC_ADDR_LINES equ 12 TILE_ATTR_RC_BASE equ K052109_BASE TILE_ATTR_RC_SIZE equ $1800 TILE_ATTR_RC_ADDR_LINES equ 12 WORK_RC_BASE equ $0000 WORK_RC_SIZE equ $2000 WORK_RC_ADDR_LINES equ 13 ; MEMORY REGIONS LAYER_A_TILE_BASE equ TILE_RC_BASE + $800 LAYER_A_TILE_SIZE equ $800 LAYER_A_TILE_PALETTE_BASE equ PALETTE_BASE + $80 LAYER_A_TILE_ATTR_BASE equ TILE_ATTR_RC_BASE + $800 LAYER_A_TILE_ATTR_SIZE equ $800 LAYER_A_TILE_SCROLL_BASE equ K052109_BASE + $1800 LAYER_A_TILE_SCROLL_SIZE equ $400 LAYER_B_TILE_BASE equ TILE_RC_BASE + $1000 LAYER_B_TILE_SIZE equ $800 LAYER_B_TILE_PALETTE_BASE equ PALETTE_BASE + $100 LAYER_B_TILE_ATTR_BASE equ TILE_ATTR_RC_BASE + $1000 LAYER_B_TILE_ATTR_SIZE equ $800 LAYER_B_TILE_SCROLL_BASE equ K052109_BASE +$3800 LAYER_B_TILE_SCROLL_SIZE equ $400 PALETTE_BASE equ PALETTE_RC_BASE PALETTE_SIZE equ PALETTE_RC_SIZE PALETTE_ENTRY_SIZE equ $20 SPRITE_BASE equ SPRITE_RC_BASE SPRITE_SIZE equ SPRITE_RC_SIZE SPRITE_PALETTE_BASE equ PALETTE_BASE + $200 TXT_TILE_BASE equ TILE_RC_BASE TXT_TILE_SIZE equ $800 TXT_TILE_PALETTE_BASE equ PALETTE_BASE TXT_TILE_ATTR_BASE equ TILE_ATTR_RC_BASE TXT_TILE_ATTR_SIZE equ $800 WORK_RAM_BASE equ WORK_RC_BASE WORK_RAM_SIZE equ WORK_RC_SIZE ; REG/IO ; K052109 registers REG_LAYER_A_TILE_SCROLL_X equ K052109_BASE + $1a00 REG_LAYER_A_TILE_SCROLL_Y equ K052109_BASE + $180c REG_LAYER_B_TILE_SCROLL_X equ K052109_BASE + $3a00 REG_LAYER_B_TILE_SCROLL_Y equ K052109_BASE + $380c ; 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 + $1d80 ; 0000 1111 - bank slots 0 and 1 REG_TILE_BANK_SLOTS_B equ K052109_BASE + $1f00 ; 2222 3333 - bank slots 2 and 3 REG_INPUT_P1 equ $3f81 REG_INPUT_P2 equ $3f82 REG_INPUT_P3 equ $3f85 REG_INPUT_P4 equ $3f86 REG_INPUT_DSW1 equ $3f87 REG_INPUT_DSW2 equ $3f83 REG_INPUT_DSW3 equ $3f84 REG_INPUT_SYSTEM equ $3f80 REG_WATCHDOG equ $3f88 REG_SOUND equ $3f8c SETLN_PROG_BANK_MAX equ $0f SETLN_SELECT_RAM_PALETTE equ $20 SETLN_SELECT_RAM_WORK equ $00 SETLN_CHAR_READ equ $40 SETLN_WATCHDOG_POLL equ $80 ; this bit must be set or the watchdog will stop listening for pings CHAR_COLON equ $10 ; no colon char, using space macro WATCHDOG tst REG_WATCHDOG endm macro SOUND_PLAY sta REG_SOUND endm macro SOUND_STOP clr REG_SOUND endm