sd2snes/snes/msu1/const.a65
2010-12-31 03:25:17 +01:00

116 lines
3.0 KiB
Plaintext

zero .word 0
; hdma_blank: write to $2100 once (mode 0)
; force blanking up to line 40 and from line 184
; (active display = 144 lines)
hdma_blank .byt 40
.byt $8f
.byt 127
.byt $0f
.byt 17
.byt $0f
.byt 1
.byt $8f
.byt 0
; h/vscroll: write to $210d twice, write to $210e twice (mode 3)
; adjust hscroll and vscroll to split one tilemap row into two display rows
; in conjunction with 16x16 tiles this reduces the effective tilemap size
; to 288 bytes
hdma_scroll .byt 56
.word 0
.word 152+255
.byt 16
.word 256
.word 136+255
.byt 16
.word 0
.word 136+255
.byt 16
.word 256
.word 120+255
.byt 16
.word 0
.word 120+255
.byt 16
.word 256
.word 104+255
.byt 16
.word 0
.word 104+255
.byt 16
.word 256
.word 88+255
; last row -> new tilemap
.byt 16
.word 0
.word 24+255
.byt 0
; tilemap address switch: write to $2107 once (mode 0)
; last row of tilemap is located elsewhere due to size
hdma_tilemap .byt 40
.byt $bc
.byt 127
.byt $bc
.byt 1
.byt $bc
.byt 1
.byt $fc
.byt 0
; tilemap part 1 (goes to VRAM 7F00-7FFF)
tilemap .word $0000, $0000, $0002, $0004, $0006, $0008, $000a, $000c
.word $000e, $0020, $0022, $0024, $0026, $0028, $002a, $0000
.word $0000, $002c, $002e, $0040, $0042, $0044, $0046, $0048
.word $004a, $004c, $004e, $0060, $0062, $0064, $0066, $0000
.word $0000, $0068, $006a, $006c, $006e, $0080, $0082, $0084
.word $0086, $0088, $008a, $008c, $008e, $00a0, $00a2, $0000
.word $0000, $00a4, $00a6, $00a8, $00aa, $00ac, $00ae, $00c0
.word $00c2, $00c4, $00c6, $00c8, $00ca, $00cc, $00ce, $0000
.word $0000, $00e0, $00e2, $00e4, $00e6, $00e8, $00ea, $00ec
.word $00ee, $0100, $0102, $0104, $0106, $0108, $010a, $0000
.word $0000, $010c, $010e, $0120, $0122, $0124, $0126, $0128
.word $012a, $012c, $012e, $0140, $0142, $0144, $0146, $0000
.word $0000, $0148, $014a, $014c, $014e, $0160, $0162, $0164
.word $0166, $0168, $016a, $016c, $016e, $0180, $0182, $0000
.word $0000, $0184, $0186, $0188, $018a, $018c, $018e, $01a0
.word $01a2, $01a4, $01a6, $01a8, $01aa, $01ac, $01ae, $0000
; tilemap part 2 (goes to VRAM FF00-FFFF)
tilemap2 .word $0000, $01c0, $01c2, $01c4, $01c6, $01c8, $01ca, $01cc
.word $01ce, $01e0, $01e2, $01e4, $01e6, $01e8, $01ea, $0000
spcaddr .word $0100 ; target address
spcexec .word $0100 ; execute address
spclen .byt 41 ; length
spccode .byt $e8, $6c ; - MOV A, #$6c ; FLG register
.byt $c4, $f2 ; MOV $f2, A
.byt $e8, $20 ; MOV A, #$20 ; unmute, disable echo
.byt $c4, $f3 ; MOV $f3, A
.byt $78, $20, $f3 ; CMP $f3, #$20
.byt $d0, $f3 ; BNE -
.byt $e8, $2c ; - MOV A, #$2c ; Echo volume left
.byt $c4, $f2 ; MOV $f2, A
.byt $e8, $00 ; MOV A, #$00 ; silent
.byt $c4, $f3 ; MOV $f3, A
.byt $78, $00, $f3 ; CMP $f3, #$00
.byt $d0, $f3 ; BNE -
.byt $e8, $3c ; - MOV A, #$3c ; Echo volume right
.byt $c4, $f2 ; MOV $f2, A
.byt $e8, $00 ; MOV A, #$00 ; silent
.byt $c4, $f3 ; MOV $f3, A
.byt $78, $00, $f3 ; CMP $f3, #$00
.byt $d0, $f3 ; BNE -
.byt $2f, $fe ; - BRA -