This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Burger pieces: | |
; #$00 - nothing Keys: | |
; #$01 - bottom bread A 1: bottom bread | |
; #$02 - bottom bread B 2: sauce | |
; #$03 - sauce 3: lettuce | |
; #$04 - lettuce 4: tomato | |
; #$05 - tomato 5: patty | |
; #$06 - patty A 6: cheese | |
; #$07 - patty B 7: top bread | |
; #$08 - cheese | |
; #$09 - top bread A | |
; #$0a - top bread B 0: remove piece | |
Init: | |
; Colors | |
LDA #$0e ; ╮ $00 BG color | |
STA $00 ; ╯ | |
LDA #$08 ; ╮ $01 Bread color | |
STA $01 ; ╯ | |
LDA #$0a ; ╮ $03 Sauce color | |
STA $03 ; ╯ | |
LDA #$0d ; ╮ $04 Lettuce color | |
STA $04 ; ╯ | |
LDA #$02 ; ╮ $05 Tomato color | |
STA $05 ; ╯ | |
LDA #$09 ; ╮ $06 Patty color | |
STA $06 ; ╯ | |
LDA #$07 ; ╮ $08 Cheese color | |
STA $08 ; ╯ | |
; Stack | |
; ... | |
StoreGraphics: | |
; Bottom Bread A | |
; Bottom Bread B | |
; Sauce | |
; Lettuce | |
; Tomato | |
; Patty A | |
; Patty B | |
; Cheese | |
; Top Bread A | |
; Top Bread B | |
FillBG_init: | |
LDA #$02 ; ╮ X/$11: Drawing page/high byte | |
TAX ; ╯ | |
LDA #$00 ; ╮ Y: Drawing position | |
TAY ; ╯ | |
LDA $00 ; Load background color into A | |
FillBG_loop: | |
STX $11 ; ╮ Draw background color pixel | |
STA ($10),Y ; ╯ to screen using indirect addrs. | |
INY ; Increment screen position | |
CPY #$00 ; ╮ Check if Y has overflowed, | |
BNE FillBG_loop ; ╯ otherwise loop. | |
INX ; Increment page | |
CPX #$06 ; ╮ Check if X passed enough pages, | |
BNE FillBG_loop ; ╯ otherwise loop. | |
DrawBurger: | |
; Pen on/pen off technique for 1-bit graphics | |
; ... | |
PollInput: | |
; ... | |
UpdateStack: | |
; ... | |
BRK ; Debug | |
JMP DrawBurger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment