Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; My first asm test
- .include "Header.inc"
- .include "Snes_Init.asm"
- VBlank:
- lda $4210 ;Reset the VBlank by querrying this
- inc $0002 ;Update low byte
- bne NOLOOP
- inc $0003 ;Update high byte
- NOLOOP NOP
- stz $2121 ;Force palette indexupdate
- lda $0002 ;Set background color
- sta $2122
- lda $0003
- sta $2122
- RTI ;Return
- .bank 0
- .section "MainCode"
- Start:
- ;Init
- Snes_Init
- lda #%00001111 ;Enable the screen (bit 7) and force brightness to 100%
- sta $2100
- lda #$80 ;Enable VBlank IRQ
- sta $4200
- sep #$20 ;Set the A register to 8bit
- stz $0002 ;$0002 = 0
- stz $0003 ;$0003 = 0
- Forever:
- wai
- jmp Forever
- .ends
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement