snes-asm/legacy/greenspace/greenspace.asm

72 lines
830 B
NASM
Raw Permalink Normal View History

.include "header.inc"
.include "snes_init.asm"
.BANK 0 SLOT 0
.ORG 0
.SECTION "maincode"
VBlank:
rti
Start:
Snes_Init ; Initialize the SNES
;stz $1337
stz $2121 ;store zero in memory
lda #%11000000 ;3-green, 5-red
sta $2122
lda #%00000111 ;blank, 5-blue, 2-green
sta $2122
lda #$0f
sta $2100
lda #$3
oye:
dea
cmp #$00
bne oye
ldx #$03
lvl3:
lda #$ff
lvl2:
xba
lda #$ff
lvl1:
dea
cmp #$00
bne lvl1
xba
dea
cmp #$00
bne lvl2
stz $1337
dex
txa
cmp #$00
bne lvl3
stz $2121 ;store zero in memory
lda #%00111111 ;3-green, 5-red
sta $2122
lda #%00000000 ;blank, 5-blue, 2-green
sta $2122
lda #$0f
sta $2100
mainloop:
jmp mainloop
.ENDS
.BANK 1
.ORG 0
.SECTION "TileData"
.ENDS