I'll say it again, I'm behind because I started only a week ago, but I'm catching up.
Here is my playfield. It draws GAME OVER. This was a great exercise, I feel like I'm getting somewhere.
Now I can read Session 19
; 4 columns for letters in playfield, 40 pixels each
; (of course letters will have to span PF sections
; but doesn't matter since we're just reading from graphics bytes)
;
; Frame scanlines are laid out like this:
; 21 blank scanlines
; 64 GAME (each letter is 8 segments high, ea. segment 8 pixel high)
; 22 blank
; 64 OVER
; 21 blank
;------------------------------------------------
; Do 192 scanlines
lda #$4a
sta COLUPF ; reddish color for "GAME"
ldx #0 ; this counts our scanline number
TopBlankArea sta WSYNC
inx ;(+2=2) ; my first attempt at cycle counting
cpx #21 ;(+2=4)
bne TopBlankArea ;(+3=7)
ldx #0 ;(+2=9) ; we've gone thru 21 scanlines so far...
ldy #0 ;(+2=11); this counts our letter segment number
WordRow1
; load playfield for left half of screen
lda P0_1_LEFT,Y ;(+4=15) or from branch below->;(+4=20)
sta PF0 ;(+3=18) ;(+3=23)
lda P1_1_LEFT,Y ;(+4=22) ;(+4=27) * 3 = 81
sta PF1 ;(+3=25) ;(+3=30) * 3 = 90
lda P2_1_LEFT,Y ;(+4=29)
sta PF2 ;(+3=31) * 3 = 93
; load playfield for right half of screen
lda P0_1_RIGHT,Y ;(+4=35)
sta PF0 ;(+3=38)
lda P1_1_RIGHT,Y ;(+4=42) * 3 = 126
sta PF1
nop ;(+2=44) ; wait until we can safely write PF2
lda P2_1_RIGHT,Y ;(+4=48)
sta PF2 ;(+3=51)
nop ; wait until we can safely
nop ; change PF1
nop
; updating PF1 here in case this
; is the end of a 8 pixel high segment and we
; need to run the extra branch code
; for y below. if we do, then PF1 won't
; be written in time unless we do it ahead
; of time here
lda P1_1_LEFT+1,Y
sta PF1
sta WSYNC
inx ;(+2=2)
cpx #8 ;(+2=4)
bne WordRow1 ;(+3=7) ; still in same segment?
; no. so inc y for next segment
ldx #0 ;(+2=9)
iny ;(+2=11)
cpy #8 ;(+2=13)
bne WordRow1 ;(+3=16)
ldx #0 ; we've done 21+64=85 scanlines so far
lda #0
sta PF0 ; blank out the playfield
sta PF1
sta PF2
;------------------------------------------------
MiddleBlankArea sta WSYNC ; 21+1=22 blank lines in middle of frame
inx
cpx #21
bne MiddleBlankArea
; use one blank line for setting PF color
lda #$68
sta COLUPF ; bluish color for "OVER"
sta WSYNC
;------------------------------------------------
; WordRow2 is just like WordRow1, but with different graphics
; if I knew more, I'd reuse the code for WordRow1 to display this
; section instead of doing a copy/paste of the code and changing a few things
ldx #0 ;(+2=9) ; we've done 21+64+22=107 scanlines
ldy #0 ;(+2=11); this counts our letter segment number
WordRow2
; load playfield for left half of screen
lda P0_2_LEFT,Y ;(+4=15) or from branch below->;(+4=20)
sta PF0 ;(+3=18) ;(+3=23)
lda P1_2_LEFT,Y ;(+4=22) ;(+4=27) * 3 = 81
sta PF1 ;(+3=25) ;(+3=30) * 3 = 90
lda P2_2_LEFT,Y ;(+4=29)
sta PF2 ;(+3=31) * 3 = 93
; load playfield for right half of screen
lda P0_2_RIGHT,Y ;(+4=35)
sta PF0 ;(+3=38)
lda P1_2_RIGHT,Y ;(+4=42) * 3 = 126
sta PF1
nop ;(+2=44) ; wait until we can safely write PF2
lda P2_2_RIGHT,Y ;(+4=48)
sta PF2 ;(+3=51)
nop ; wait until we can safely
nop ; change PF1
nop
; updating PF1 here in case this
; is the end of a 8 pixel high segment and we
; need to run the extra branch code
; for y below. if we do, then PF1 won't
; be written in time unless we do it ahead
; of time here
lda P1_2_LEFT+1,Y
sta PF1
sta WSYNC
inx ;(+2=2)
cpx #8 ;(+2=4)
bne WordRow2 ;(+3=7) ; still in same segment?
; no. so inc y for next segment
ldx #0 ;(+2=9)
iny ;(+2=11)
cpy #8 ;(+2=13)
bne WordRow2 ;(+3=16)
ldx #0 ; we've done 21+64+22+64=171 scanlines so far
lda #0
sta PF0 ; blank out the playfield
sta PF1
sta PF2
;------------------------------------------------
BottomBlankArea sta WSYNC
inx
cpx #21
bne BottomBlankArea
s174.zip