snes-asm/my_custom.asm
greg da806439a5 SUCCESS!
Have successfully written a background tile to screen!
2016-12-07 01:13:29 -08:00

48 lines
608 B
NASM

.MACRO Spin_Loop ARGS XCOUNT
ldx #XCOUNT
lvl3\@:
lda #$ff
lvl2\@:
xba
lda #$ff
lvl1\@:
dea
cmp #$00
bne lvl1\@
xba
dea
cmp #$00
bne lvl2\@
dex
txa
cmp #$00
bne lvl3\@
.ENDM
.MACRO Set_A_8_XY_16
; 16-bit xy, 8-bit a
rep #%00010000
sep #%00100000
.ENDM
.MACRO Reset_Palette_Offset
stz $2121
.ENDM
.MACRO Load_Palette_Color ARGS BYTE1 BYTE2
lda #BYTE1
sta $2122
;lda #BYTE2
;sta $2122
.ENDM
.MACRO Set_Screen_Brightness
lda #\1
sta $2100 ; $2100 is the screen brightness register
.ENDM