diff --git a/HiSprite.py b/HiSprite.py index 80cf581..7376bfa 100755 --- a/HiSprite.py +++ b/HiSprite.py @@ -123,11 +123,9 @@ def layoutSpriteChunk(pixeldata,width,height,shift): for chunkIndex in range(len(byteSplits)): # Store byte into video memory - if (not byteSplits[chunkIndex].endswith("0000000")): # Optimization- don't render all-black bytes - spriteChunks[chunkIndex][row] = \ - "\tlda #%%%s\n" % byteSplits[chunkIndex] + \ - "\tora (SCRATCH0),y\n" + \ - "\tsta (SCRATCH0),y\n"; + spriteChunks[chunkIndex][row] = \ + "\tlda #%%%s\n" % byteSplits[chunkIndex] + \ + "\tsta (SCRATCH0),y\n"; # Increment indices if chunkIndex == len(byteSplits)-1: diff --git a/KOLTitle.bin b/KOLTitle.bin new file mode 100644 index 0000000..1469954 Binary files /dev/null and b/KOLTitle.bin differ diff --git a/boxw_mix.png b/boxw_mix.png index a321548..6f186fb 100644 Binary files a/boxw_mix.png and b/boxw_mix.png differ diff --git a/graphics.s b/graphics.s index e4e8c4d..ed30c1b 100644 --- a/graphics.s +++ b/graphics.s @@ -43,11 +43,15 @@ saveBackground_loop: sta saveBackground_smc1+2 sta saveBackground_smc2+2 sta saveBackground_smc3+2 + sta saveBackground_smc4+2 + sta saveBackground_smc5+2 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 ldx PARAM0 ; Compute hires column lda DIV7_2,x @@ -72,6 +76,16 @@ saveBackground_smc3: lda $2000,x sta (PARAM2),y iny + inx +saveBackground_smc4: + lda $2000,x + sta (PARAM2),y + iny + inx +saveBackground_smc5: + lda $2000,x + sta (PARAM2),y + iny pla inc @@ -112,11 +126,15 @@ restoreBackground_loop: sta restoreBackground_smc1+2 sta restoreBackground_smc2+2 sta restoreBackground_smc3+2 + sta restoreBackground_smc4+2 + sta restoreBackground_smc5+2 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 ldx PARAM0 ; Compute hires column lda DIV7_2,x @@ -144,6 +162,18 @@ restoreBackground_smc2: restoreBackground_smc3: sta $2000,x iny + inx + + lda (PARAM2),y +restoreBackground_smc4: + sta $2000,x + iny + inx + + lda (PARAM2),y +restoreBackground_smc5: + sta $2000,x + iny pla inc @@ -203,3 +233,75 @@ venetianFill_inner: bne venetianFill_outer rts + +INBUF = $0200 +DOSCMD = $be03 +KBD = $c000 +KBDSTRB = $c010 + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; CommandLine +; +; PARAM0: Command line string (LSB) +; PARAM1: Command line string (MSB) +; +CommandLine: + SAVE_AXY + ldx #0 + ldy #0 + +CommandLine_loop: + lda (PARAM0),y + beq CommandLine_done + sta $0200,x ; Keyboard input buffer + inx + iny + bra CommandLine_loop + +CommandLine_done: + lda #$8d ; Terminate with return and null + sta $0200,x + inx + lda #0 + sta $0200,x + + jsr $be03 ; ProDOS 8 entry point + + RESTORE_AXY + rts + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; BloadHires +; +; PARAM0: Filename (LSB) +; PARAM1: Filename (MSB) +; +; Max filename length: 16 chars! +; +BloadHires: + SAVE_AXY + ldx #0 + ldy #0 + +BloadHires_loop: + lda (PARAM0),y ; Copy filename into BLOAD buffer + beq BloadHires_done + sta BloadHires_buffer+6,x + inx + iny + bra BloadHires_loop + +BloadHires_done: + lda #BloadHires_buffer + sta PARAM1 + jsr CommandLine + + RESTORE_AXY + rts + +BloadHires_buffer: + .byte "BLOAD ",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/hisprite.dsk b/hisprite.dsk index 3501e39..567e077 100644 Binary files a/hisprite.dsk and b/hisprite.dsk differ diff --git a/hisprite.s b/hisprite.s index a270089..68fd53a 100644 --- a/hisprite.s +++ b/hisprite.s @@ -64,24 +64,31 @@ SCRATCH1 = $1a main: jsr EnableHires - lda #$00 - jsr VenetianFill +; lda #$00 +; jsr VenetianFill + + lda #bgFilename + sta PARAM1 + jsr BloadHires + ldx #0 ;;;; - stz PARAM0 - stz PARAM1 - jsr BOXW_MAG - - lda #10 - sta PARAM1 - jsr BOXW_MIX - - lda #20 - sta PARAM1 - jsr BOXW_ORG - - rts +; stz PARAM0 +; stz PARAM1 +; jsr BOXW_MAG +; +; lda #10 +; sta PARAM1 +; jsr BOXW_MIX +; +; lda #20 +; sta PARAM1 +; jsr BOXW_ORG +; +; rts ;;;; loop: @@ -104,7 +111,7 @@ loop: inx cpx #133 -; bne loop + bne loop rts bgBuffer: @@ -157,6 +164,9 @@ bgBuffer: .byte 0 .byte 0 +bgFilename: + .byte "KOL",0 + .include "graphics.s" .include "hgrtableX.s" .include "hgrtableY.s" diff --git a/spritegen0.s b/spritegen0.s index 9434deb..e9c218f 100644 --- a/spritegen0.s +++ b/spritegen0.s @@ -31,19 +31,22 @@ BOXW_MAG_SHIFT0: tay lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -55,16 +58,22 @@ BOXW_MAG_SHIFT0: tay lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -76,19 +85,22 @@ BOXW_MAG_SHIFT0: tay lda #%01010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -100,19 +112,22 @@ BOXW_MAG_SHIFT0: tay lda #%00010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -124,19 +139,22 @@ BOXW_MAG_SHIFT0: tay lda #%00010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -148,19 +166,22 @@ BOXW_MAG_SHIFT0: tay lda #%01010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -172,16 +193,22 @@ BOXW_MAG_SHIFT0: tay lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -193,19 +220,22 @@ BOXW_MAG_SHIFT0: tay lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts @@ -225,19 +255,22 @@ BOXW_MAG_SHIFT1: tay lda #%01010100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -249,16 +282,22 @@ BOXW_MAG_SHIFT1: tay lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -270,19 +309,22 @@ BOXW_MAG_SHIFT1: tay lda #%01000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -294,19 +336,22 @@ BOXW_MAG_SHIFT1: tay lda #%01000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -318,19 +363,22 @@ BOXW_MAG_SHIFT1: tay lda #%01000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -342,19 +390,22 @@ BOXW_MAG_SHIFT1: tay lda #%01000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -366,16 +417,22 @@ BOXW_MAG_SHIFT1: tay lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -387,19 +444,22 @@ BOXW_MAG_SHIFT1: tay lda #%01010100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts @@ -419,19 +479,22 @@ BOXW_MAG_SHIFT2: tay lda #%01010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -443,16 +506,22 @@ BOXW_MAG_SHIFT2: tay lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -464,19 +533,22 @@ BOXW_MAG_SHIFT2: tay lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -488,19 +560,22 @@ BOXW_MAG_SHIFT2: tay lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -512,19 +587,22 @@ BOXW_MAG_SHIFT2: tay lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -536,19 +614,22 @@ BOXW_MAG_SHIFT2: tay lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010001 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -560,16 +641,22 @@ BOXW_MAG_SHIFT2: tay lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -581,19 +668,22 @@ BOXW_MAG_SHIFT2: tay lda #%01010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts @@ -613,19 +703,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -637,16 +730,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -658,19 +757,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01000101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -682,19 +784,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -706,19 +811,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -730,19 +838,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01000101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -754,16 +865,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -775,19 +892,22 @@ BOXW_MAG_SHIFT3: tay lda #%01000000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts @@ -806,20 +926,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -830,17 +953,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay - iny - lda #%00000010 - ora (SCRATCH0),y + lda #%00000000 sta (SCRATCH0),y iny - iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000010 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -851,20 +980,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -875,20 +1007,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -899,20 +1034,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -923,20 +1061,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -947,17 +1088,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay - iny - lda #%00000010 - ora (SCRATCH0),y + lda #%00000000 sta (SCRATCH0),y iny - iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000010 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -968,20 +1115,23 @@ BOXW_MAG_SHIFT4: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts @@ -1000,20 +1150,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00101000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1024,17 +1177,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay - iny - lda #%00001000 - ora (SCRATCH0),y + lda #%00000000 sta (SCRATCH0),y iny - iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00001000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1045,20 +1204,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1069,20 +1231,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1093,20 +1258,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01000001 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1117,20 +1285,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1141,17 +1312,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay - iny - lda #%00001000 - ora (SCRATCH0),y + lda #%00000000 sta (SCRATCH0),y iny - iny lda #%00001000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00001000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1162,20 +1339,23 @@ BOXW_MAG_SHIFT5: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00101000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00001010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts @@ -1194,20 +1374,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1218,17 +1401,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay - iny - lda #%00100000 - ora (SCRATCH0),y + lda #%00000000 sta (SCRATCH0),y iny - iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00100000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1239,20 +1428,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1263,20 +1455,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1287,20 +1482,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00000100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1311,20 +1509,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010100 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00100010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1335,17 +1536,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay - iny - lda #%00100000 - ora (SCRATCH0),y + lda #%00000000 sta (SCRATCH0),y iny - iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00100000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y + iny + lda #%00000000 + sta (SCRATCH0),y inx lda HGRROWS_H,x @@ -1356,20 +1563,23 @@ BOXW_MAG_SHIFT6: lda DIV7_2,y tay + lda #%00000000 + sta (SCRATCH0),y iny lda #%00100000 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%01010101 - ora (SCRATCH0),y sta (SCRATCH0),y iny lda #%00101010 - ora (SCRATCH0),y sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y iny + lda #%00000000 + sta (SCRATCH0),y RESTORE_AXY rts