Proof of concept for page flipping

This commit is contained in:
Quinn Dunki 2017-02-26 20:17:22 -08:00
parent 9284814222
commit 110760c8b1
5 changed files with 485 additions and 131 deletions

View File

@ -162,10 +162,14 @@ def generateBlitter(colorStreams,maskStreams,height,xdraw):
def rowStartCalculatorCode():
return \
"\tlda HGRROWS_H1,x\n" + \
"\tphy\n" + \
"\ttxa\n" + \
"\ttay\n" + \
"\tlda (HIRES_PAGE_L),y\n" + \
"\tsta SCRATCH1\n" + \
"\tlda HGRROWS_L,x\n" + \
"\tlda HGRROWS_L,y\n" + \
"\tsta SCRATCH0\n" + \
"\tply\n" + \
"\tldy PARAM0\n" + \
"\tlda DIV7_2,y\n" + \
"\ttay\n";

View File

@ -16,6 +16,42 @@ EnableHires:
lda HIRES2
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WritePage1
; Trashes A
;
WritePage1:
lda #<HGRROWS_H1
sta HIRES_PAGE_L
lda #>HGRROWS_H1
sta HIRES_PAGE_H
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WritePage2
; Trashes A
;
WritePage2:
lda #<HGRROWS_H2
sta HIRES_PAGE_L
lda #>HGRROWS_H2
sta HIRES_PAGE_H
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PageFlip
; Trashes A
;
PageFlip:
lda RDPAGE2
bmi PageFlip_Show1
lda HIRESPAGE2
jmp WritePage1
PageFlip_Show1:
lda HIRESPAGE1
jmp WritePage2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SaveBackground
; PARAM0: X pos
@ -37,21 +73,24 @@ saveBackground_loop:
pha
adc PARAM1 ; Calculate Y line
tax
phy
tay
lda HGRROWS_H1,x ; Compute hires row
lda (HIRES_PAGE_L),y ; Compute hires row
sta saveBackground_smc0+2
sta saveBackground_smc1+2
sta saveBackground_smc2+2
sta saveBackground_smc3+2
sta saveBackground_smc4+2
sta saveBackground_smc5+2
lda HGRROWS_L,x
lda HGRROWS_L,y
sta saveBackground_smc0+1
sta saveBackground_smc1+1
sta saveBackground_smc2+1
sta saveBackground_smc3+1
sta saveBackground_smc4+1
sta saveBackground_smc5+1
ply
ldx PARAM0 ; Compute hires column
lda DIV7_2,x
@ -120,21 +159,24 @@ restoreBackground_loop:
pha
adc PARAM1 ; Calculate Y line
tax
phy
tay
lda HGRROWS_H1,x ; Compute hires row
lda (HIRES_PAGE_L),y ; Compute hires row
sta restoreBackground_smc0+2
sta restoreBackground_smc1+2
sta restoreBackground_smc2+2
sta restoreBackground_smc3+2
sta restoreBackground_smc4+2
sta restoreBackground_smc5+2
lda HGRROWS_L,x
lda HGRROWS_L,y
sta restoreBackground_smc0+1
sta restoreBackground_smc1+1
sta restoreBackground_smc2+1
sta restoreBackground_smc3+1
sta restoreBackground_smc4+1
sta restoreBackground_smc5+1
ply
ldx PARAM0 ; Compute hires column
lda DIV7_2,x

Binary file not shown.

View File

@ -14,7 +14,9 @@
TEXT = $c050
HIRES1 = $c057
HIRES2 = $c058
HIRESPAGE1 = $c054
HIRESPAGE2 = $c055
RDPAGE2 = $c01c
; ROM entry points
COUT = $fded
@ -75,10 +77,7 @@ main:
; sta PARAM1
; jsr BloadHires
lda #<HGRROWS_H1
sta HIRES_PAGE_L
lda #>HGRROWS_H1
sta HIRES_PAGE_H
jsr WritePage2
ldx #0
;;;;
@ -103,10 +102,23 @@ loop:
lda #0
sta PARAM1
lda #<bgBuffer
lda RDPAGE2
bmi loop_SavePage1
loop_SavePage2:
lda #<bgBuffer2
sta PARAM2
lda #>bgBuffer
lda #>bgBuffer2
sta PARAM3
bra loop_SavePage
loop_SavePage1:
lda #<bgBuffer1
sta PARAM2
lda #>bgBuffer1
sta PARAM3
loop_SavePage:
jsr SaveBackground
jsr BOXW_MAG
@ -114,13 +126,34 @@ loop:
jsr ROMWAIT
; Sync to VBL
@1: lda $C019
beq @1
bpl @1
@0: lda $C019
bmi @0
;@1: lda $C019
; beq @1
; bpl @1
;@0: lda $C019
; bmi @0
jsr PageFlip
lda RDPAGE2
bmi loop_RestorePage1
loop_RestorePage2:
lda #<bgBuffer2
sta PARAM2
lda #>bgBuffer2
sta PARAM3
bra loop_RestorePage
loop_RestorePage1:
lda #<bgBuffer1
sta PARAM2
lda #>bgBuffer1
sta PARAM3
loop_RestorePage:
dec PARAM0
jsr RestoreBackground
inc PARAM0
inx
cpx #133
@ -130,7 +163,7 @@ loop:
rts
bgBuffer:
bgBuffer1:
.byte 0
.byte 0
.byte 0
@ -180,6 +213,57 @@ bgBuffer:
.byte 0
.byte 0
bgBuffer2:
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
bgFilename:
.byte "KOL",0

View File

@ -20,10 +20,14 @@ BOXW_MAG_JMP:
BOXW_MAG_SHIFT0:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -47,10 +51,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -74,10 +82,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -101,10 +113,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -128,10 +144,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -155,10 +175,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -182,10 +206,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -209,10 +237,14 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -242,10 +274,14 @@ BOXW_MAG_SHIFT0:
BOXW_MAG_SHIFT1:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -269,10 +305,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -296,10 +336,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -323,10 +367,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -350,10 +398,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -377,10 +429,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -404,10 +460,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -431,10 +491,14 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -464,10 +528,14 @@ BOXW_MAG_SHIFT1:
BOXW_MAG_SHIFT2:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -491,10 +559,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -518,10 +590,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -545,10 +621,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -572,10 +652,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -599,10 +683,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -626,10 +714,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -653,10 +745,14 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -686,10 +782,14 @@ BOXW_MAG_SHIFT2:
BOXW_MAG_SHIFT3:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -713,10 +813,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -740,10 +844,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -767,10 +875,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -794,10 +906,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -821,10 +937,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -848,10 +968,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -875,10 +999,14 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -908,10 +1036,14 @@ BOXW_MAG_SHIFT3:
BOXW_MAG_SHIFT4:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -935,10 +1067,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -962,10 +1098,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -989,10 +1129,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1016,10 +1160,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1043,10 +1191,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1070,10 +1222,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1097,10 +1253,14 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1130,10 +1290,14 @@ BOXW_MAG_SHIFT4:
BOXW_MAG_SHIFT5:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1157,10 +1321,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1184,10 +1352,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1211,10 +1383,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1238,10 +1414,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1265,10 +1445,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1292,10 +1476,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1319,10 +1507,14 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1352,10 +1544,14 @@ BOXW_MAG_SHIFT5:
BOXW_MAG_SHIFT6:
ldx PARAM1
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1379,10 +1575,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1406,10 +1606,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1433,10 +1637,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1460,10 +1668,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1487,10 +1699,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1514,10 +1730,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1541,10 +1761,14 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
lda HGRROWS_H1,x
phy
txa
tay
lda (HIRES_PAGE_L),y
sta SCRATCH1
lda HGRROWS_L,x
lda HGRROWS_L,y
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay