atm959

Red, Green, and Blue

Aug 8th, 2016
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;== Include memorymap, header info, and SNES initialization routines
  2. .INCLUDE "header.inc"
  3. .INCLUDE "InitSNES.asm"
  4.  
  5. ;========================
  6. ; Start
  7. ;========================
  8.  
  9. .BANK 0
  10. .ORG 0
  11. .SECTION "MainCode"
  12.  
  13. VBlank: RTI                 ; Perform VBlank
  14.  
  15. Main:
  16.         InitializeSNES      ; Initialize the SNES hardware
  17.  
  18.         stz $2121           ; Edit color 0
  19.        
  20.         lda #$0F            ; = 00001111
  21.         sta $2100           ; Turn on screen, full brightness
  22.        
  23. Loop:
  24.     lda #%00011111
  25.     sta $2122
  26.     lda #%00000000
  27.     sta $2122
  28.     jsr wait
  29.     lda #%11100000
  30.     sta $2122
  31.     lda #%00000011
  32.     sta $2122
  33.     jsr wait
  34.     lda #%00000000
  35.     sta $2122
  36.     lda #%01111100
  37.     sta $2122
  38.     jsr wait
  39.     jmp Loop
  40.    
  41. wait:
  42.     wai
  43.     rts
  44.    
  45. .ENDS
Advertisement
Add Comment
Please, Sign In to add comment