68k ASM defines: Difference between revisions
Jump to navigation
Jump to search
(Page créée avec « Here are preliminary ASM defines for memory locations and constants. For detailed descriptions, see Memory mapped registers. This can be made into a file and included in... ») |
m (1 revision) |
(No difference)
| |
Revision as of 08:26, 7 February 2011
Here are preliminary ASM defines for memory locations and constants. For detailed descriptions, see Memory mapped registers.
This can be made into a file and included in your ASM source code to use register names instead of their (meaningless) addresses in RAM.
SCB1 equ $0000 ; VRAM, Sprite tilemaps
FIXMAP equ $7000 ; VRAM, Fix map
SCB2 equ $8000 ; VRAM, Sprite shrink
SCB3 equ $8200 ; VRAM, Sprite Y positions and sizes
SCB4 equ $8400 ; VRAM, Sprite X positions
RAMSTART equ $100000 ; User RAM start
PALETTES equ $400000 ; Palette RAM start
REG_P1CNT equ $300000 ; Joystick port 1
REG_DIPSW equ $300001 ; Dipswitches/Watchdog
REG_SOUND equ $320000 ; In/Out Z80
REG_STATUS_A equ $320001
REG_P2CNT equ $340000 ; Joystick port 2
REG_STATUS_B equ $380000
REG_DISPENABL equ $3A0001 ; Video output ON
REG_DISPDSABL equ $3A0011 ; Video output OFF
REG_SWPROM equ $3A0013 ; Use ROM vector table
REG_BRDFIX equ $3A000B ; Use board fix tileset
REG_CRTFIX equ $3A001B ; Use ROM fix tileset
REG_SRAMLOCK equ $3A000D ; Write-protect SRAM
REG_SRAMUNLOCK equ $3A001D ; Write-unprotect SRAM
REG_PALBANK1 equ $3A000F ; Use palette bank 1
REG_PALBANK0 equ $3A001F ; Use palette bank 0 (default)
VRAM_ADDR equ $3C0000
VRAM_RW equ $3C0002
VRAM_MOD equ $3C0004
REG_HBLANKCNT equ $3C0006
REG_HBLANKPOS equ $3C0008
REG_IRQACK equ $3C000C
BIOSF_BOOTSCR equ $C00438 ; BIOSCall: show bootscreen
BIOSF_CLEARFIX equ $C004C2 ; BIOSCall: clear fix layer
BIOSF_CLEARSPR equ $C004C8 ; BIOSCall: clear sprites
BIOSF_UPLOAD equ $C00546 ; BIOSCall: CD, upload to DRAM
BIOSF_CDDACMD equ $C0056A ; BIOSCall: CD, CDDA command
BIOS_P1CURRENT equ $10FD95 ; Set by BIOSCall $C0044A: Read joystick 1 state
BIOS_P1PREVIOUS equ $10FD96 ; Set by BIOSCall $C0044A: Read previous joystick 1 state
BIOS_P1CHANGE equ $10FD97 ; Set by BIOSCall $C0044A: Read joystick 1 state change
BIOS_P1REPEAT equ $10FD98 ; Set by BIOSCall $C0044A: Read joystick 1 repeat
BIOS_SYSSTAT equ $10FD80 ; Word