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

View File

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

View File

@ -16,42 +16,6 @@ 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
@ -73,24 +37,21 @@ saveBackground_loop:
pha
adc PARAM1 ; Calculate Y line
tax
phy
tay
lda (HIRES_PAGE_L),y ; Compute hires row
lda HGRROWS_H1,x ; 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,y
lda HGRROWS_L,x
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
@ -159,24 +120,21 @@ restoreBackground_loop:
pha
adc PARAM1 ; Calculate Y line
tax
phy
tay
lda (HIRES_PAGE_L),y ; Compute hires row
lda HGRROWS_H1,x ; 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,y
lda HGRROWS_L,x
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,9 +14,7 @@
TEXT = $c050
HIRES1 = $c057
HIRES2 = $c058
HIRESPAGE1 = $c054
HIRESPAGE2 = $c055
RDPAGE2 = $c01c
; ROM entry points
COUT = $fded
@ -77,7 +75,10 @@ main:
; sta PARAM1
; jsr BloadHires
jsr WritePage2
lda #<HGRROWS_H1
sta HIRES_PAGE_L
lda #>HGRROWS_H1
sta HIRES_PAGE_H
ldx #0
;;;;
@ -102,23 +103,10 @@ loop:
lda #0
sta PARAM1
lda RDPAGE2
bmi loop_SavePage1
loop_SavePage2:
lda #<bgBuffer2
lda #<bgBuffer
sta PARAM2
lda #>bgBuffer2
lda #>bgBuffer
sta PARAM3
bra loop_SavePage
loop_SavePage1:
lda #<bgBuffer1
sta PARAM2
lda #>bgBuffer1
sta PARAM3
loop_SavePage:
jsr SaveBackground
jsr BOXW_MAG
@ -126,34 +114,13 @@ loop_SavePage:
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
@ -163,7 +130,7 @@ loop_RestorePage:
rts
bgBuffer1:
bgBuffer:
.byte 0
.byte 0
.byte 0
@ -213,57 +180,6 @@ bgBuffer1:
.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,14 +20,10 @@ BOXW_MAG_JMP:
BOXW_MAG_SHIFT0:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -51,14 +47,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -82,14 +74,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -113,14 +101,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -144,14 +128,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -175,14 +155,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -206,14 +182,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -237,14 +209,10 @@ BOXW_MAG_SHIFT0:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -274,14 +242,10 @@ BOXW_MAG_SHIFT0:
BOXW_MAG_SHIFT1:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -305,14 +269,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -336,14 +296,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -367,14 +323,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -398,14 +350,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -429,14 +377,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -460,14 +404,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -491,14 +431,10 @@ BOXW_MAG_SHIFT1:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -528,14 +464,10 @@ BOXW_MAG_SHIFT1:
BOXW_MAG_SHIFT2:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -559,14 +491,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -590,14 +518,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -621,14 +545,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -652,14 +572,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -683,14 +599,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -714,14 +626,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -745,14 +653,10 @@ BOXW_MAG_SHIFT2:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -782,14 +686,10 @@ BOXW_MAG_SHIFT2:
BOXW_MAG_SHIFT3:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -813,14 +713,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -844,14 +740,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -875,14 +767,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -906,14 +794,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -937,14 +821,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -968,14 +848,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -999,14 +875,10 @@ BOXW_MAG_SHIFT3:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1036,14 +908,10 @@ BOXW_MAG_SHIFT3:
BOXW_MAG_SHIFT4:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1067,14 +935,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1098,14 +962,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1129,14 +989,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1160,14 +1016,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1191,14 +1043,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1222,14 +1070,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1253,14 +1097,10 @@ BOXW_MAG_SHIFT4:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1290,14 +1130,10 @@ BOXW_MAG_SHIFT4:
BOXW_MAG_SHIFT5:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1321,14 +1157,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1352,14 +1184,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1383,14 +1211,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1414,14 +1238,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1445,14 +1265,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1476,14 +1292,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1507,14 +1319,10 @@ BOXW_MAG_SHIFT5:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1544,14 +1352,10 @@ BOXW_MAG_SHIFT5:
BOXW_MAG_SHIFT6:
ldx PARAM1
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1575,14 +1379,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1606,14 +1406,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1637,14 +1433,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1668,14 +1460,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1699,14 +1487,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1730,14 +1514,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay
@ -1761,14 +1541,10 @@ BOXW_MAG_SHIFT6:
sta (SCRATCH0),y
inx
phy
txa
tay
lda (HIRES_PAGE_L),y
lda HGRROWS_H1,x
sta SCRATCH1
lda HGRROWS_L,y
lda HGRROWS_L,x
sta SCRATCH0
ply
ldy PARAM0
lda DIV7_2,y
tay