diff --git a/greenspace.asm b/greenspace.asm index d12d0e3..6a5380c 100644 --- a/greenspace.asm +++ b/greenspace.asm @@ -1,28 +1,71 @@ .include "header.inc" .include "snes_init.asm" +.BANK 0 SLOT 0 +.ORG 0 +.SECTION "maincode" + VBlank: - RTI + rti Start: Snes_Init ; Initialize the SNES -sep #$20 ; set A register to 8-bit +;stz $1337 - -lda #%10000000 ; force Vblank by turning off screen +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 -; load 16-bit color into color data register $2122 -lda #%11100000 ;low byte of green -sta $2122 -lda #%00000000 ;high byte of green -sta $2122 +lda #$3 +oye: + dea + cmp #$00 + bne oye -lda #%00001111 ; End Vblank set brightness to 0b1111 (=100%) -sta $2100 ; store it to Screen Display Register -; loop forever -Forever: - jmp Forever +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