2013-04-08 01:26:49 -07:00
|
|
|
.include "header.inc"
|
|
|
|
.include "snes_init.asm"
|
|
|
|
|
2016-12-01 02:23:44 -08:00
|
|
|
.BANK 0 SLOT 0
|
|
|
|
.ORG 0
|
|
|
|
.SECTION "maincode"
|
|
|
|
|
2013-04-08 01:26:49 -07:00
|
|
|
VBlank:
|
2016-12-01 02:23:44 -08:00
|
|
|
rti
|
2013-04-08 01:26:49 -07:00
|
|
|
|
|
|
|
Start:
|
|
|
|
|
|
|
|
Snes_Init ; Initialize the SNES
|
|
|
|
|
2016-12-01 02:23:44 -08:00
|
|
|
;stz $1337
|
2013-04-08 01:26:49 -07:00
|
|
|
|
2016-12-01 02:23:44 -08:00
|
|
|
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
|
2013-04-08 01:26:49 -07:00
|
|
|
sta $2100
|
|
|
|
|
2016-12-01 02:23:44 -08:00
|
|
|
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
|
2013-04-08 01:26:49 -07:00
|
|
|
sta $2122
|
2016-12-01 02:23:44 -08:00
|
|
|
lda #%00000000 ;blank, 5-blue, 2-green
|
2013-04-08 01:26:49 -07:00
|
|
|
sta $2122
|
2016-12-01 02:23:44 -08:00
|
|
|
lda #$0f
|
|
|
|
sta $2100
|
|
|
|
|
|
|
|
|
|
|
|
mainloop:
|
|
|
|
jmp mainloop
|
|
|
|
|
|
|
|
.ENDS
|
|
|
|
|
|
|
|
.BANK 1
|
|
|
|
.ORG 0
|
|
|
|
.SECTION "TileData"
|
2013-04-08 01:26:49 -07:00
|
|
|
|
|
|
|
|
2016-12-01 02:23:44 -08:00
|
|
|
.ENDS
|