snes-asm/homebrew-tutorial/main.asm

34 lines
426 B
NASM
Raw Normal View History

2022-06-13 16:00:17 -07:00
.p816
.smart
.include "macros.inc"
.include "registers.inc"
.include "header.asm"
.segment "CODE"
start:
.include "init.asm"
; Set up the color palette
stz CGADD
2022-06-13 16:00:41 -07:00
; Set color zero to some color
2022-06-13 16:00:17 -07:00
; $001f = %0000000000011111
; bbbbbgggggrrrrr
2022-06-13 16:00:41 -07:00
lda #$ff
2022-06-13 16:00:17 -07:00
sta CGDATA
2022-06-13 16:00:41 -07:00
lda #$03
2022-06-13 16:00:17 -07:00
sta CGDATA
lda #$0f
sta INIDISP
busywait:
bra busywait
nmi:
bit RDNMI
_rti:
rti