diff --git a/src/fx/fx.dhgr.48boxes.common.a b/src/fx/fx.dhgr.48boxes.common.a index 1a77270ee..c7efe19d4 100644 --- a/src/fx/fx.dhgr.48boxes.common.a +++ b/src/fx/fx.dhgr.48boxes.common.a @@ -79,7 +79,6 @@ dst = $02 ; [word] used by drawing routines rowcount = $04 ; [byte] used by drawing routines tmpy = $05 ; [byte] used by drawing routines box = $0E ; [byte] counter in main loop -any = $0F ; [byte][must be at $0F] counter in main loop BoxStages = $10 ; [$30 bytes] current stage for each box auxsrc_hgrhi = $BC00 ; [$C0 bytes] HGR base addresses (hi) starting at $9000 hgrhi = $BD00 ; [$C0 bytes] HGR base addresses (hi) starting at $2000 @@ -228,15 +227,14 @@ BoxLoop ldy BoxStages-1, x ; for each box, get its current stage lda BoxesX-1, x ldy BoxesY-1, x ; Y = starting byte offset for this box tax ; X = starting HGR row for this box - inc any ; was initialized by the BoxStages copy loop clc -j jsr $FD00 ; [SMC] call drawing routine for this stage +j jsr $0000 ; [SMC] call drawing routine for this stage ldx box NextBox dex bne BoxLoop - lda any + lda j+2 beq + ; if we didn't draw anything in any box, we're done - stx any ; X=0 here + stx j+2 ; X=0 here bit $C000 ; check for key bpl MainLoop + sta $C000 ; 80STORE off @@ -754,6 +752,4 @@ OUTER_STAGE !if >* != >STAGE0 { !error "Templates are not all on same page" } -; Note: the final k_rts is later copied to zero page $0F and used in MainLoop, -; so don't put any more code before BoxInitialStages. BoxInitialStages diff --git a/src/fx/fx.hgr.48boxes.common.a b/src/fx/fx.hgr.48boxes.common.a index f9d852f29..39a3e5a4c 100644 --- a/src/fx/fx.hgr.48boxes.common.a +++ b/src/fx/fx.hgr.48boxes.common.a @@ -77,7 +77,6 @@ src = $00 ; [word][must be at $00] used by drawing ro dst = $02 ; [word] used by drawing routines rowcount = $04 ; [byte] used by drawing routines box = $0E ; [byte] counter in main loop -any = $0F ; [byte][must be at $0F] counter in main loop BoxStages = $10 ; [$30 bytes] current stage for each box hgrhi = $40 ; [$C0 bytes] HGR base addresses hgrlo = $300 ; [$C0 bytes] HGR base addresses @@ -220,15 +219,14 @@ BoxLoop ldy BoxStages-1, x ; for each box, get its current stage lda BoxesX-1, x ldy BoxesY-1, x ; Y = starting byte offset for this box tax ; X = starting HGR row for this box - inc any ; was initialized by the BoxStages copy loop clc -j jsr $FD00 ; [SMC] call drawing routine for this stage +j jsr $0000 ; [SMC] call drawing routine for this stage ldx box NextBox dex bne BoxLoop - lda any + lda j+2 beq + ; if we didn't draw anything in any box, we're done - stx any ; X=0 here + stx j+2 ; X=0 here bit $C000 bpl MainLoop + @@ -561,8 +559,5 @@ BuildStage1And0 jsr BuildDrawingRoutineFrom lda #