From 1c15f9daa120d7137a8949bfb6ead7cab461e687 Mon Sep 17 00:00:00 2001 From: 4am Date: Sun, 26 May 2024 00:40:54 -0400 Subject: [PATCH] factor out BuildHGRTables, standardize some table locations across FX --- src/4cade.a | 64 ++++++- src/constants.a | 1 + src/demo/stellar.7.a | 1 + src/fx/fx.dhgr.2pass.lr.a | 7 +- src/fx/fx.dhgr.48boxes.common.a | 238 +++++++++++++------------- src/fx/fx.dhgr.bar.dissolve.a | 6 +- src/fx/fx.dhgr.diagonal.a | 8 +- src/fx/fx.dhgr.dither.radial.a | 2 +- src/fx/fx.dhgr.dither.radial.common.a | 2 +- src/fx/fx.dhgr.flick.a | 10 +- src/fx/fx.dhgr.precomputed.1bit.a | 4 +- src/fx/fx.dhgr.precomputed.2bit.a | 4 +- src/fx/fx.dhgr.r.by.pixel.a | 3 +- src/fx/fx.dhgr.radial.a | 2 +- src/fx/fx.dhgr.radial.common.a | 2 +- src/fx/fx.dhgr.radial3.a | 2 +- src/fx/fx.dhgr.redlines.a | 7 +- src/fx/fx.hgr.48boxes.common.a | 7 +- src/fx/fx.hgr.arrow.white.a | 6 +- src/fx/fx.hgr.circle.stripes.a | 6 +- src/fx/fx.hgr.diagonal.stripes.a | 6 +- src/fx/fx.hgr.diamond.stripes.a | 6 +- src/fx/fx.hgr.dither.radial.a | 2 +- src/fx/fx.hgr.dither.radial.common.a | 2 +- src/fx/fx.hgr.flick.a | 10 +- src/fx/fx.hgr.precomputed.1bit.a | 20 +-- src/fx/fx.hgr.precomputed.2bit.a | 18 +- src/fx/fx.hgr.precomputed.3bit.a | 10 +- src/fx/fx.hgr.radial.a | 2 +- src/fx/fx.hgr.radial.common.a | 2 +- src/fx/fx.hgr.radial3.a | 2 +- src/fx/fx.hgr.soft.diagonal.a | 6 +- src/fx/macros.hgr.a | 35 ---- src/index/artwork.idx.a | 2 +- src/index/attract.idx.a | 2 +- src/index/cache00.idx.a | 2 +- src/index/cache01.idx.a | 2 +- src/index/cache10.idx.a | 2 +- src/index/cache11.idx.a | 2 +- src/index/coverfade.idx.a | 2 +- src/index/credits.idx.a | 2 +- src/index/decrunch.idx.a | 2 +- src/index/demo.idx.a | 2 +- src/index/dfx.idx.a | 2 +- src/index/dgr.fizzle.idx.a | 2 +- src/index/dgr.idx.a | 2 +- src/index/dhgr.idx.a | 2 +- src/index/dtitle.idx.a | 2 +- src/index/fx.idx.a | 2 +- src/index/fxdata.idx.a | 2 +- src/index/gamehelp.idx.a | 2 +- src/index/gr.fizzle.idx.a | 2 +- src/index/gr.idx.a | 2 +- src/index/helptext.idx.a | 2 +- src/index/hgr0.idx.a | 2 +- src/index/hgr1.idx.a | 2 +- src/index/hgr2.idx.a | 2 +- src/index/hgr3.idx.a | 2 +- src/index/hgr4.idx.a | 2 +- src/index/hgr5.idx.a | 2 +- src/index/hgr6.idx.a | 2 +- src/index/joystick.idx.a | 2 +- src/index/miniattract0.idx.a | 2 +- src/index/miniattract1.idx.a | 2 +- src/index/prelaunch.idx.a | 2 +- src/index/search00.idx.a | 2 +- src/index/search01.idx.a | 2 +- src/index/search10.idx.a | 2 +- src/index/search11.idx.a | 2 +- src/index/sfx.idx.a | 2 +- src/index/slideshow.idx.a | 2 +- src/index/title.idx.a | 2 +- src/index/xsingle.idx.a | 2 +- src/macros.a | 2 + src/prelaunch/stellar.7.a | 2 +- 75 files changed, 307 insertions(+), 280 deletions(-) diff --git a/src/4cade.a b/src/4cade.a index ef1fd3d0b..1fd64e061 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -127,6 +127,7 @@ ResetVector ; 6 bytes, copied to $100 !source "src/glue.decompress.a" !source "src/textrank.a" !source "src/okvs.a" + !source "src/prodos.path.a" ; add new files above here !source "src/hw.vbl.a" @@ -154,9 +155,42 @@ gGlobalPrefsStore SwitchToBank2 +READ_RAM2_WRITE_RAM2 rts - !source "src/prodos.path.a" ; paths end up on the same page + +; BuildHGRTables (label is on constants.a) +!if (RELBASE != $2000) and (* != BuildHGRTables) { + !serious "BuildHGRTables=",*,", fix constants.a" +} +; out: A clobbered +; X=$C0 +; Z=1 +; Y preserved + ldx #0 +- txa + and #$F8 + bpl + + ora #5 ++ asl + bpl + + ora #5 ++ asl + asl + sta $0201, x + txa + and #7 + rol + asl $0201, x + rol + ora #$20 + sta $0301, x + inx + cpx #$C0 + bne - + rts ; WaitForKeyWithTimeout (label is in constants.a) +!if (RELBASE != $2000) and (* != WaitForKeyWithTimeout) { + !serious "WaitForKeyWithTimeout=",*,", fix constants.a" +} ; in: A = timeout length (like standard $FCA8 wait routine) ; out: A clobbered ; X/Y preserved @@ -172,29 +206,54 @@ SwitchToBank2 @exit rts ; iLoadFXDATA (label is in constants.a) +!if (RELBASE != $2000) and (* != iLoadFXDATA) { + !serious "iLoadFXDATA=",*,", fix constants.a" +} jmp LoadFXDATA ; no direct calling - target can move ; iLoadXSingle (label is in constants.a) +!if (RELBASE != $2000) and (* != iLoadXSingle) { + !serious "iLoadXSingle=",*,", fix constants.a" +} jmp LoadXSingle ; no direct calling - target can move ; iAddToPath (label is in constants.a) +!if (RELBASE != $2000) and (* != iAddToPath) { + !serious "iAddToPath=",*,", fix constants.a" +} jmp AddToPath ; no direct calling - target can move ; iLoadFileDirect (label is in constants.a) +!if (RELBASE != $2000) and (* != iLoadFileDirect) { + !serious "iLoadFileDirect=",*,", fix constants.a" +} jmp LoadFileDirect ; no direct calling - target can move ; WaitForVBL (label is in constants.a) +!if (RELBASE != $2000) and (* != WaitForVBL) { + !serious "WaitForVBL=",*,", fix constants.a" +} jmp WaitForVBL_iie ; SMC to RTS on a II+ ; UnwaitForVBL (label is in constants.a) +!if (RELBASE != $2000) and (* != UnwaitForVBL) { + !serious "UnwaitForVBL=",*,", fix constants.a" +} rts ; SMC to JMP on a IIc !word iUnwaitForVBL ; MockingboardStuff (label is in constants.a) +!if (RELBASE != $2000) and (* != MockingboardStuff) { + !serious "MockingboardStuff=",*,", fix constants.a" +} ; slot number where Mockingboard was detected and type of board ; #$00 if no Mockingboard detected !byte $FD ; MockingboardStuff ($FFF8) + ; MachineStatus (label is in constants.a so prelaunchers can use it) +!if (RELBASE != $2000) and (* != MachineStatus) { + !serious "MachineStatus=",*,", fix constants.a" +} ; 7 6 5 4 3 2 1 0 ; | | | | | | | +- bit 0 reserved ; | | | | | | +--- bit 1 reserved @@ -206,6 +265,9 @@ SwitchToBank2 ; +--------------- bit 7 = 1 if joystick ; Use the bit masks defined in constants.a !byte $FD ; MachineStatus ($FFF9) +!if (RELBASE != $2000) and (* != $FFFA) { + !serious "Expected LC vectors to start at $FFFA, found ",* +} !word Reenter ; NMI vector ($FFFA-B) !word Reenter ; reset vector ($FFFC-D) !word Ignore ; IRQ vector ($FFFE-F) diff --git a/src/constants.a b/src/constants.a index 299795378..f82881a86 100644 --- a/src/constants.a +++ b/src/constants.a @@ -170,6 +170,7 @@ gSearchIndex = $6000 gSearchCache = $A000 ; LC RAM 1 & 2 +BuildHGRTables = $FFAF WaitForKeyWithTimeout = $FFD5 iLoadFXDATA = $FFE6 iLoadXSingle = $FFE9 diff --git a/src/demo/stellar.7.a b/src/demo/stellar.7.a index 9b88d6c23..225942635 100644 --- a/src/demo/stellar.7.a +++ b/src/demo/stellar.7.a @@ -11,6 +11,7 @@ +READ_RAM2_WRITE_RAM2 jsr EnableAccelerator +LOAD_FILE_KEEP_DIR stellar_7, stellar_7_dir_e-stellar_7_dir_b + +READ_ROM_NO_WRITE lda #$60 sta $863 diff --git a/src/fx/fx.dhgr.2pass.lr.a b/src/fx/fx.dhgr.2pass.lr.a index a7b4460e6..ef7eb5630 100644 --- a/src/fx/fx.dhgr.2pass.lr.a +++ b/src/fx/fx.dhgr.2pass.lr.a @@ -5,14 +5,13 @@ !to "build/FX.INDEXED/DHGR.TWOPASS.LR",plain *=$6000 -hgrlo = $0200 ; [$C0 bytes, main memory only] -hgr1hi = $0300 ; [$C0 bytes, main memory only] +hgrlo = $0201 ; [$C0 bytes, main memory only] +hgr1hi = $0301 ; [$C0 bytes, main memory only] !source "src/fx/macros.a" +COPY_TO_0 start, end - ;X=0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables jmp loop start diff --git a/src/fx/fx.dhgr.48boxes.common.a b/src/fx/fx.dhgr.48boxes.common.a index e46345124..29b379408 100644 --- a/src/fx/fx.dhgr.48boxes.common.a +++ b/src/fx/fx.dhgr.48boxes.common.a @@ -80,10 +80,10 @@ rowcount = $04 ; [byte] used by drawing routines tmpy = $05 ; [byte] used by drawing routines box = $0E ; [byte] 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 -hgrlo = $BE00 ; [$C0 bytes] HGR base addresses (lo) starting at $2000 -BoxesX = $BDC0 ; [$30 bytes] starting row for each box +auxsrc_hgrhi = $BD01 ; [$C0 bytes] HGR base addresses (hi) starting at $9000 +hgrlo = $0201 ; [$C0 bytes] HGR base addresses (lo) starting at $2000 +hgrhi = $0301 ; [$C0 bytes] HGR base addresses (hi) starting at $2000 +BoxesX = $BE90 ; [$30 bytes] starting row for each box BoxesY = $BEC0 ; [$30 bytes] starting byte offset for each box ; High bytes of drawing routines for each stage (actual routines will be page-aligned). @@ -167,6 +167,122 @@ k_bitcopy = 30 ; must be last token !source "src/fx/macros.a" + jmp GenerateBoxes + +; All template p-code must be on the same page +;!align 255,0 +; Template for 'stage 0' routine (copy00), which copies the innermost +; part of the box (labeled '0' in diagram above). +STAGE0 + !byte k_set_first_row + !byte k_iny2 + !byte k_recalc + !byte k_bitcopy, k_left_mask_main + !byte k_switch_to_aux + !byte k_bitcopy, k_left_mask_main + !byte k_switch_to_main + !byte k_inx_and_recalc + !byte k_bitcopy, k_left_mask_aux + !byte k_switch_to_aux + !byte k_bitcopy, k_left_mask_aux + !byte k_rts ; also serves as an end-of-template marker + +; Template for 'stage 1' routine (copy01), which copies the pixels +; around the innermost box (labeled '1' in diagram above). +STAGE1 + !byte k_set_first_row + !byte k_iny2 + !byte k_recalc + !byte k_byte_copy + !byte k_switch_to_aux_and_byte_copy + !byte k_switch_to_main + !byte k_inx_and_recalc + !byte k_byte_copy + !byte k_switch_to_aux_and_byte_copy + !byte k_switch_to_main + !byte k_inx_and_recalc + !byte k_byte_copy + !byte k_switch_to_aux_and_byte_copy + !byte k_switch_to_main + !byte k_inx_and_recalc + !byte k_byte_copy + !byte k_switch_to_aux_and_byte_copy + !byte k_rts ; also serves as an end-of-template marker + +; Template for stages 2-8 (copy02..copy08) +MIDDLE_STAGE + !byte k_set_row_count + !byte k_set_first_row + !byte k_iny + !byte k_save_y + !byte k_middle_jsr, k_current_page + ;- + !byte k_inx_and_recalc + !byte k_bitcopy, k_left_mask_main + !byte k_iny2 + !byte k_bitcopy, k_right_mask_main + !byte k_switch_to_aux + !byte k_bitcopy, k_right_mask_aux + !byte k_restore_y + !byte k_bitcopy, k_left_mask_aux + !byte k_switch_to_main + !byte k_middle_branch + ;+ + !byte k_inx_and_recalc + !byte k_bitcopy, k_edge_left_mask_main + !byte k_iny + !byte k_byte_copy_and_iny + !byte k_bitcopy, k_edge_right_mask_main + !byte k_switch_to_aux + !byte k_bitcopy, k_edge_right_mask_aux + !byte k_dey + !byte k_byte_copy + !byte k_dey + !byte k_bitcopy, k_edge_left_mask_aux + !byte k_rts ; also serves as an end-of-template marker + +; Template for stages 9-15 (copy09..copy0F) +OUTER_STAGE + !byte k_set_row_count + !byte k_set_first_row + !byte k_save_y + !byte k_outer_jsr, k_current_page + ;- + !byte k_inx_and_recalc + !byte k_bitcopy, k_left_mask_main + !byte k_iny2 + !byte k_iny2 + !byte k_bitcopy, k_right_mask_main + !byte k_switch_to_aux + !byte k_bitcopy, k_right_mask_aux + !byte k_restore_y + !byte k_bitcopy, k_left_mask_aux + !byte k_switch_to_main + !byte k_outer_branch + ;+ + !byte k_inx_and_recalc + !byte k_bitcopy, k_edge_left_mask_main + !byte k_iny + !byte k_byte_copy_and_iny + !byte k_byte_copy_and_iny + !byte k_byte_copy_and_iny + !byte k_bitcopy, k_edge_right_mask_main + !byte k_switch_to_aux + !byte k_bitcopy, k_edge_right_mask_aux + !byte k_dey + !byte k_byte_copy + !byte k_dey + !byte k_byte_copy + !byte k_dey + !byte k_byte_copy + !byte k_dey + !byte k_bitcopy, k_edge_left_mask_aux + !byte k_rts ; also serves as an end-of-template marker +!if >* != >STAGE0 { + !error "Templates are not all on same page" +} + +GenerateBoxes ; generate |BoxesX| and |BoxesY| arrays ldx #48 ldy #$A0 @@ -206,7 +322,7 @@ k_bitcopy = 30 ; must be last token bne - ; X=0 here - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgrhi + jsr BuildHGRTables ; X=$C0 here - lda hgrhi-1, x @@ -638,116 +754,4 @@ BuildStage1And0 lda #* != >STAGE0 { - !error "Templates are not all on same page" -} BoxInitialStages diff --git a/src/fx/fx.dhgr.bar.dissolve.a b/src/fx/fx.dhgr.bar.dissolve.a index 85ca54bea..389bd4973 100644 --- a/src/fx/fx.dhgr.bar.dissolve.a +++ b/src/fx/fx.dhgr.bar.dissolve.a @@ -5,14 +5,14 @@ !to "build/FX.INDEXED/DHGR.BAR.DISSLV",plain *=$6000 -hgrlo = $0200 ; [$C0 bytes, main memory only] -hgr1hi = $0300 ; [$C0 bytes, main memory only] +hgrlo = $0201 ; [$C0 bytes, main memory only] +hgr1hi = $0301 ; [$C0 bytes, main memory only] !source "src/fx/macros.a" +COPY_TO_0 start, end ;X=0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables jmp loop start diff --git a/src/fx/fx.dhgr.diagonal.a b/src/fx/fx.dhgr.diagonal.a index c5805c135..385276bbd 100644 --- a/src/fx/fx.dhgr.diagonal.a +++ b/src/fx/fx.dhgr.diagonal.a @@ -5,15 +5,15 @@ !to "build/FX.INDEXED/DHGR.DIAGONAL",plain *=$6000 -hgrlo = $0200 ; [$C0 bytes, main memory only] -hgr1hi = $0300 ; [$C0 bytes, main memory only] -copymasks= $02C0 ; [$08 bytes, different values in main and auxmem] +hgrlo = $0201 ; [$C0 bytes, main memory only] +hgr1hi = $0301 ; [$C0 bytes, main memory only] +copymasks= $02C1 ; [$08 bytes, different values in main and auxmem] !source "src/fx/macros.a" +COPY_TO_0 start, end ;X=0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables ldy #8 ; copy copymask arrays into place in main and auxmem - lda copymasks_main-1, y diff --git a/src/fx/fx.dhgr.dither.radial.a b/src/fx/fx.dhgr.dither.radial.a index df29884fd..e5c4a2e4c 100644 --- a/src/fx/fx.dhgr.dither.radial.a +++ b/src/fx/fx.dhgr.dither.radial.a @@ -26,7 +26,7 @@ input = $FE ; word Start +BUILD_DITHER_MASKS_DHGR dithermasks +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_AUXMEM $60, 4 diff --git a/src/fx/fx.dhgr.dither.radial.common.a b/src/fx/fx.dhgr.dither.radial.common.a index 3bf45c263..42909f96f 100644 --- a/src/fx/fx.dhgr.dither.radial.common.a +++ b/src/fx/fx.dhgr.dither.radial.common.a @@ -17,7 +17,7 @@ input = $FE ; word +BUILD_DITHER_MASKS_DHGR dithermasks +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_AUXMEM $60, 4 diff --git a/src/fx/fx.dhgr.flick.a b/src/fx/fx.dhgr.flick.a index b9897bab1..93c2d3fba 100644 --- a/src/fx/fx.dhgr.flick.a +++ b/src/fx/fx.dhgr.flick.a @@ -5,9 +5,9 @@ !to "build/FX.INDEXED/DHGR.FLICK",plain *=$6000 -hgrlo = $200 ; [$C0 bytes, main memory only] -startrows_by_column = $2C0 ; [$28 bytes, main memory only] -hgr1hi = $300 ; [$C0 bytes, main memory only] +hgrlo = $201 ; [$C0 bytes, main memory only] +startrows_by_column = $2C1 ; [$28 bytes, main memory only] +hgr1hi = $301 ; [$C0 bytes, main memory only] !source "src/fx/macros.a" @@ -18,9 +18,7 @@ hgr1hi = $300 ; [$C0 bytes, main memory only] sta startrows_by_column-1, x dex bne - - ;X=0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi - + jsr BuildHGRTables jmp loop start diff --git a/src/fx/fx.dhgr.precomputed.1bit.a b/src/fx/fx.dhgr.precomputed.1bit.a index 60e9a08c5..b2e95048e 100644 --- a/src/fx/fx.dhgr.precomputed.1bit.a +++ b/src/fx/fx.dhgr.precomputed.1bit.a @@ -51,7 +51,7 @@ !macro FX_PRECOMPUTED_1BIT_DHGR .coords { +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_0 start, end @@ -143,7 +143,7 @@ end !macro FX_PRECOMPUTED_1BIT_DHGR_DITHER .coords, .endcoords { +BUILD_DITHER_MASKS_DHGR dithermasks +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols diff --git a/src/fx/fx.dhgr.precomputed.2bit.a b/src/fx/fx.dhgr.precomputed.2bit.a index 61d52f9cf..6fb96a4c0 100644 --- a/src/fx/fx.dhgr.precomputed.2bit.a +++ b/src/fx/fx.dhgr.precomputed.2bit.a @@ -53,7 +53,7 @@ !macro FX_PRECOMPUTED_2BIT_DHGR .coords { +BUILD_SPARSE_BITMASKS_2BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_0 start, end jmp InputLoop @@ -128,7 +128,7 @@ end !macro FX_PRECOMPUTED_2BIT_DHGR_DITHER .coords, .endcoords { +BUILD_DITHER_MASKS_DHGR dithermasks +BUILD_SPARSE_BITMASKS_2BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_MIRROR_COLS_DHGR mirror_cols ; phase 1 - in reverse, with additional masking (dithering) diff --git a/src/fx/fx.dhgr.r.by.pixel.a b/src/fx/fx.dhgr.r.by.pixel.a index c1c345284..e9d5cb49d 100644 --- a/src/fx/fx.dhgr.r.by.pixel.a +++ b/src/fx/fx.dhgr.r.by.pixel.a @@ -12,8 +12,7 @@ copymasks= $02C1 ; [$07 bytes, different values in main and !source "src/fx/macros.a" +COPY_TO_0 start, end - ;X=0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables ldy #7 ; copy copymask arrays into place in main and auxmem - lda copymasks_main-1, y diff --git a/src/fx/fx.dhgr.radial.a b/src/fx/fx.dhgr.radial.a index b5e5bded3..681f3a393 100644 --- a/src/fx/fx.dhgr.radial.a +++ b/src/fx/fx.dhgr.radial.a @@ -23,7 +23,7 @@ input = $FE ; word Start +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_AUXMEM $60, 4 diff --git a/src/fx/fx.dhgr.radial.common.a b/src/fx/fx.dhgr.radial.common.a index f73143872..e35e6d9fb 100644 --- a/src/fx/fx.dhgr.radial.common.a +++ b/src/fx/fx.dhgr.radial.common.a @@ -14,7 +14,7 @@ reverse_input = $FC ; word input = $FE ; word +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_AUXMEM $60, 4 diff --git a/src/fx/fx.dhgr.radial3.a b/src/fx/fx.dhgr.radial3.a index 4cd81d6d6..9dd19997a 100644 --- a/src/fx/fx.dhgr.radial3.a +++ b/src/fx/fx.dhgr.radial3.a @@ -22,7 +22,7 @@ input = $FE ; word Start +BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS_DHGR mirror_cols +COPY_TO_AUXMEM $60, 4 diff --git a/src/fx/fx.dhgr.redlines.a b/src/fx/fx.dhgr.redlines.a index 4f1810aca..792480fb3 100644 --- a/src/fx/fx.dhgr.redlines.a +++ b/src/fx/fx.dhgr.redlines.a @@ -9,14 +9,13 @@ ; mainmem alternate #$11/#$44 ; auxmem alternate #$08/#$22 -hgrlo = $0200 ; [$C0 bytes, main memory only] -hgr1hi = $0300 ; [$C0 bytes, main memory only] +hgrlo = $0201 ; [$C0 bytes, main memory only] +hgr1hi = $0301 ; [$C0 bytes, main memory only] !source "src/fx/macros.a" +COPY_TO_0 start, end - ;X=0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi + jsr BuildHGRTables jmp loop start diff --git a/src/fx/fx.hgr.48boxes.common.a b/src/fx/fx.hgr.48boxes.common.a index b2e12d8ba..6c7e89306 100644 --- a/src/fx/fx.hgr.48boxes.common.a +++ b/src/fx/fx.hgr.48boxes.common.a @@ -76,8 +76,8 @@ src = $00 ; [word][must be at $00] used by drawing routines dst = $02 ; [word] used by drawing routines rowcount = $04 ; [byte] used by drawing routines -hgrhi = $200 ; [$C0 bytes] HGR base addresses -hgrlo = $300 ; [$C0 bytes] HGR base addresses +hgrlo = $201 ; [$C0 bytes] HGR base addresses +hgrhi = $301 ; [$C0 bytes] HGR base addresses BoxesX = $90 ; [$30 bytes] starting row for each box BoxesY = $C0 ; [$30 bytes] starting byte offset for each box @@ -164,8 +164,7 @@ k_right_mask = 17 inx bne - - ; X=0 here - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgrhi + jsr BuildHGRTables ; Generate |BoxesX| and |BoxesY| arrays ; BoxesX (starting row for each box) diff --git a/src/fx/fx.hgr.arrow.white.a b/src/fx/fx.hgr.arrow.white.a index 3a3ae9fcd..544d07a72 100644 --- a/src/fx/fx.hgr.arrow.white.a +++ b/src/fx/fx.hgr.arrow.white.a @@ -10,13 +10,13 @@ row = $fd col = $fe counter = $ff -hgrlo = $8000 -hgr1hi = $80C0 +hgrlo = $0201 +hgr1hi = $0301 !source "src/fx/macros.a" !source "src/constants.a" - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables lda #(40+12+1) sta counter diff --git a/src/fx/fx.hgr.circle.stripes.a b/src/fx/fx.hgr.circle.stripes.a index cdbddd8e4..2950c1d36 100644 --- a/src/fx/fx.hgr.circle.stripes.a +++ b/src/fx/fx.hgr.circle.stripes.a @@ -5,8 +5,8 @@ !to "build/FX.INDEXED/CIRCLE.STRIPES",plain *=$6000 -hgrhi = $BE01 ; [$C0 bytes] HGR base addresses -hgrlo = $BD01 ; [$C0 bytes] HGR base addresses +hgrlo = $0201 ; [$C0 bytes] HGR base addresses +hgrhi = $0301 ; [$C0 bytes] HGR base addresses src = $F0 dst = $F2 @@ -18,7 +18,7 @@ mask2 = $F7 !source "src/fx/macros.a" !source "src/constants.a" - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgrhi + jsr BuildHGRTables lda #$00 sta row1 diff --git a/src/fx/fx.hgr.diagonal.stripes.a b/src/fx/fx.hgr.diagonal.stripes.a index 5dc029dee..0bad3ffb0 100644 --- a/src/fx/fx.hgr.diagonal.stripes.a +++ b/src/fx/fx.hgr.diagonal.stripes.a @@ -5,8 +5,8 @@ !to "build/FX.INDEXED/DIAG.STRIPES",plain *=$6000 -hgrhi = $BE01 ; [$C0 bytes] HGR base addresses -hgrlo = $BD01 ; [$C0 bytes] HGR base addresses +hgrlo = $0201 ; [$C0 bytes] HGR base addresses +hgrhi = $0301 ; [$C0 bytes] HGR base addresses src = $F0 dst = $F2 @@ -18,7 +18,7 @@ mask2 = $F7 !source "src/fx/macros.a" !source "src/constants.a" - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgrhi + jsr BuildHGRTables lda #$00 sta row1 diff --git a/src/fx/fx.hgr.diamond.stripes.a b/src/fx/fx.hgr.diamond.stripes.a index 3851f6b9b..e0f1e4c40 100644 --- a/src/fx/fx.hgr.diamond.stripes.a +++ b/src/fx/fx.hgr.diamond.stripes.a @@ -5,8 +5,8 @@ !to "build/FX.INDEXED/DIAMOND.STRIPES",plain *=$6000 -hgrhi = $BE01 ; [$C0 bytes] HGR base addresses -hgrlo = $BD01 ; [$C0 bytes] HGR base addresses +hgrlo = $0201 ; [$C0 bytes] HGR base addresses +hgrhi = $0301 ; [$C0 bytes] HGR base addresses src = $F0 dst = $F2 @@ -18,7 +18,7 @@ mask2 = $F7 !source "src/fx/macros.a" !source "src/constants.a" - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgrhi + jsr BuildHGRTables lda #$00 sta row1 diff --git a/src/fx/fx.hgr.dither.radial.a b/src/fx/fx.hgr.dither.radial.a index 009c53a6c..202c897be 100644 --- a/src/fx/fx.hgr.dither.radial.a +++ b/src/fx/fx.hgr.dither.radial.a @@ -25,7 +25,7 @@ input = $FE ; word Start +BUILD_DITHER_MASKS dithermasks - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS mirror_cols +BUILD_SPARSE_BITMASKS_1BIT diff --git a/src/fx/fx.hgr.dither.radial.common.a b/src/fx/fx.hgr.dither.radial.common.a index 31b788b0f..1ae6c9773 100644 --- a/src/fx/fx.hgr.dither.radial.common.a +++ b/src/fx/fx.hgr.dither.radial.common.a @@ -17,7 +17,7 @@ input = $FE ; word +BUILD_DITHER_MASKS dithermasks +BUILD_MIRROR_COLS mirror_cols - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_SPARSE_BITMASKS_1BIT diff --git a/src/fx/fx.hgr.flick.a b/src/fx/fx.hgr.flick.a index c8584d020..ff603e710 100644 --- a/src/fx/fx.hgr.flick.a +++ b/src/fx/fx.hgr.flick.a @@ -6,14 +6,14 @@ *=$6000 rowcount = $FF ; [byte] -hgrlo = $200 ; [$C0 bytes] -startrows_by_column = $2C0 ; [$28 bytes] -hgrhi = $300 ; [$C0 bytes] -rowcounts_by_column = $3C0 ; [$28 bytes] +hgrlo = $201 ; [$C0 bytes] +startrows_by_column = $2C1 ; [$28 bytes] +hgrhi = $301 ; [$C0 bytes] +rowcounts_by_column = $3C1 ; [$28 bytes] !source "src/fx/macros.a" - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgrhi + jsr BuildHGRTables ldy #$27 - lda #$00 diff --git a/src/fx/fx.hgr.precomputed.1bit.a b/src/fx/fx.hgr.precomputed.1bit.a index 9e4a0edd7..c0e6d428c 100644 --- a/src/fx/fx.hgr.precomputed.1bit.a +++ b/src/fx/fx.hgr.precomputed.1bit.a @@ -1,17 +1,17 @@ ;license:MIT ;(c) 2019-2022 by 4am ; -copymasks = $0200 ; $100 bytes but sparse, index is 0..6 but in high 3 bits, so $00, $20, $40, $60, $80, $A0, $C0 -mirror_copymasks = $0201 -hgrlo = $0300 ; $C0 bytes -hgrlomirror = $BD40 ; $C0 bytes -mirror_cols = $BE00 ; $28 bytes -hgr1hi = $BE40 ; $C0 bytes -hgr1himirror = $BF40 ; $C0 bytes -dithermasks = $8500 ; $58 bytes +hgrlo = $0201 ; $C0 bytes +hgr1hi = $0301 ; $C0 bytes +mirror_cols = $02C1 ; $28 bytes +dithermasks = $BBAA ; $58 bytes evenrow_masks = dithermasks oddrow_masks = dithermasks+2 no_masks = dithermasks+44 +hgrlomirror = $BC01 ; $C0 bytes +hgr1himirror = $BD01 ; $C0 bytes +copymasks = $BE00 ; $100 bytes but sparse, index is 0..6 but in high 3 bits, so $00, $20, $40, $60, $80, $A0, $C0 +mirror_copymasks = copymasks+1 Coordinates1Bit= $8600 ; $3481 bytes ($3480 on disk + 1 byte EOF marker) EndCoordinates1Bit=Coordinates1Bit+$3480 @@ -190,7 +190,7 @@ aslmod cmp #$1A } !macro FX_PRECOMPUTED_1BIT .coords { - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS mirror_cols +BUILD_SPARSE_BITMASKS_1BIT @@ -262,7 +262,7 @@ end !macro FX_PRECOMPUTED_1BIT_DITHER .coords, .endcoords { +BUILD_DITHER_MASKS dithermasks - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS mirror_cols +BUILD_SPARSE_BITMASKS_1BIT diff --git a/src/fx/fx.hgr.precomputed.2bit.a b/src/fx/fx.hgr.precomputed.2bit.a index 73f8802ad..764366e12 100644 --- a/src/fx/fx.hgr.precomputed.2bit.a +++ b/src/fx/fx.hgr.precomputed.2bit.a @@ -1,17 +1,15 @@ ;license:MIT ;(c) 2019-2022 by 4am ; -copymasks = $0200 ; $100 bytes but sparse, index is 0..4 but in high 3 bits, so $00, $20, $40, $60, $80 -mirror_copymasks = $0201 -hgrlo = $0301 ; $C0 bytes -hgrlomirror = $BD40 ; $C0 bytes -mirror_cols = $BE00 ; $28 bytes -hgr1hi = $BE40 ; $C0 bytes -hgr1himirror = $BF40 ; $C0 bytes -dithermasks = $8000 ; $58 bytes +hgrlo = $0201 ; $C0 bytes +mirror_cols = $02C1 ; $28 bytes +hgr1hi = $0301 ; $C0 bytes +dithermasks = $BDAA ; $58 bytes evenrow_masks = dithermasks oddrow_masks = dithermasks+2 no_masks = dithermasks+44 +copymasks = $BE00 ; $100 bytes but sparse, index is 0..4 but in high 3 bits, so $00, $20, $40, $60, $80 +mirror_copymasks = copymasks+1 Coordinates2Bit= $8100 ; $3C01 bytes ($3C00 on disk + 1 byte as EOF) EndCoordinates2Bit = Coordinates2Bit + $3C00 @@ -251,7 +249,7 @@ zerotbl !byte $f0, $f2, $ca, $d2, $d8, $e0, $e2, $e6, $ea, $ee } !macro FX_PRECOMPUTED_2BIT .coords { - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_MIRROR_COLS mirror_cols +BUILD_SPARSE_BITMASKS_2BIT copymasks, mirror_copymasks +COPY_TO_0 start, end @@ -304,7 +302,7 @@ end !macro FX_PRECOMPUTED_2BIT_DITHER .coords, .endcoords { +BUILD_DITHER_MASKS dithermasks - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_MIRROR_COLS mirror_cols +BUILD_SPARSE_BITMASKS_2BIT copymasks, mirror_copymasks diff --git a/src/fx/fx.hgr.precomputed.3bit.a b/src/fx/fx.hgr.precomputed.3bit.a index 8d3cdcd55..29e611b6d 100644 --- a/src/fx/fx.hgr.precomputed.3bit.a +++ b/src/fx/fx.hgr.precomputed.3bit.a @@ -2,10 +2,10 @@ ;(c) 2019-2022 by 4am ; -copymasks = $0200 ; $100 bytes but sparse, index is 0..7 but in high 3 bits, so $00, $20, $40... -tmplo = $0300 ; $C0 bytes -extra_cols = $02F8 ; $08 bytes -tmphi = $BF40 ; $C0 bytes +tmplo = $0201 ; $C0 bytes +tmphi = $0301 ; $C0 bytes +copymasks = $BB01 ; $100 bytes but sparse, index is 0..7 but in high 3 bits, so $00, $20, $40... +extra_cols = $BBF8 ; $08 bytes hgrlo3a = $BC00 ; $80 bytes hgrlo3b = $BC80 ; $80 bytes hgrlo3c = $BD00 ; $80 bytes @@ -66,7 +66,7 @@ EndCoordinates3Bit = Coordinates3Bit + $5000 } !macro BUILD_3BIT_HGR_LOOKUP_TABLES { - +BUILD_HGR_LOOKUP_TABLES tmplo, tmphi + jsr BuildHGRTables ldx #$BF ldy #$3F - lda tmplo, x diff --git a/src/fx/fx.hgr.radial.a b/src/fx/fx.hgr.radial.a index 299bb9b3c..0d39bc38f 100644 --- a/src/fx/fx.hgr.radial.a +++ b/src/fx/fx.hgr.radial.a @@ -22,7 +22,7 @@ input = $FE ; word sta Coordinates1Bit-2 Start - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_MIRROR_COLS mirror_cols +BUILD_SPARSE_BITMASKS_1BIT diff --git a/src/fx/fx.hgr.radial.common.a b/src/fx/fx.hgr.radial.common.a index 540bb5822..3008db2ea 100644 --- a/src/fx/fx.hgr.radial.common.a +++ b/src/fx/fx.hgr.radial.common.a @@ -14,7 +14,7 @@ reverse_input = $FC ; word input = $FE ; word +BUILD_MIRROR_COLS mirror_cols - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_SPARSE_BITMASKS_1BIT diff --git a/src/fx/fx.hgr.radial3.a b/src/fx/fx.hgr.radial3.a index ecc1f5edb..6e3ba102e 100644 --- a/src/fx/fx.hgr.radial3.a +++ b/src/fx/fx.hgr.radial3.a @@ -22,7 +22,7 @@ input = $FE ; word Start +BUILD_MIRROR_COLS mirror_cols - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables +BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror +BUILD_SPARSE_BITMASKS_1BIT +LDADDR Coordinates1Bit diff --git a/src/fx/fx.hgr.soft.diagonal.a b/src/fx/fx.hgr.soft.diagonal.a index b0c87efee..a2d63ee4a 100644 --- a/src/fx/fx.hgr.soft.diagonal.a +++ b/src/fx/fx.hgr.soft.diagonal.a @@ -10,8 +10,8 @@ row = $fd col = $fe counter = $ff -hgrlo = $0200 ; [$C0 bytes] -hgr1hi = $0300 ; [$C0 bytes] +hgrlo = $0201 ; [$C0 bytes] +hgr1hi = $0301 ; [$C0 bytes] !source "src/fx/macros.a" @@ -24,7 +24,7 @@ hgr1hi = $0300 ; [$C0 bytes] sta $3d } - +BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi + jsr BuildHGRTables lda #(40+24+7-1) ; columns + rows + blocks per row - 1 sta counter diff --git a/src/fx/macros.hgr.a b/src/fx/macros.hgr.a index bfe4e7afb..bbc5b63de 100644 --- a/src/fx/macros.hgr.a +++ b/src/fx/macros.hgr.a @@ -4,41 +4,6 @@ !ifndef _FX_MACROS_HGR_ { -; .hgrlo, .hgr1hi will each be filled with $C0 bytes -; based on routine by John Brooks -; posted on comp.sys.apple2 on 2018-07-11 -; https://groups.google.com/d/msg/comp.sys.apple2/v2HOfHOmeNQ/zD76fJg_BAAJ -!macro BUILD_HGR_LOOKUP_TABLES .hgrlo, .hgr1hi { -; preserves Y - ldx #0 - +BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 .hgrlo, .hgr1hi -} - -; use this macro instead if you know X is already 0 on entry, to save 2 bytes -!macro BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 .hgrlo, .hgr1hi { -; preserves Y -- txa - and #$F8 - bpl + - ora #5 -+ asl - bpl + - ora #5 -+ asl - asl - sta .hgrlo,x - txa - and #7 - rol - asl .hgrlo,x - rol - ora #$20 - sta .hgr1hi,x - inx - cpx #$C0 - bne - -} - ; .hgrlomirror, .hgr1himirror will each be filled with $C0 bytes !macro BUILD_HGR_MIRROR_LOOKUP_TABLES .hgrlomirror, .hgr1himirror { ldx #$C0 diff --git a/src/index/artwork.idx.a b/src/index/artwork.idx.a index 2ee083951..d761e064a 100644 --- a/src/index/artwork.idx.a +++ b/src/index/artwork.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15940340 + !be24 15934478 !le16 5130 diff --git a/src/index/attract.idx.a b/src/index/attract.idx.a index 81623b327..ffdfe80dd 100644 --- a/src/index/attract.idx.a +++ b/src/index/attract.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15885020 + !be24 15879158 !le16 5732 diff --git a/src/index/cache00.idx.a b/src/index/cache00.idx.a index c3027d670..5b37e80ab 100644 --- a/src/index/cache00.idx.a +++ b/src/index/cache00.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15816787 + !be24 15810925 !le16 4194 diff --git a/src/index/cache01.idx.a b/src/index/cache01.idx.a index 0bc5204ad..affd40280 100644 --- a/src/index/cache01.idx.a +++ b/src/index/cache01.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15831501 + !be24 15825639 !le16 4652 diff --git a/src/index/cache10.idx.a b/src/index/cache10.idx.a index cb8b7af5c..bb13b9b0c 100644 --- a/src/index/cache10.idx.a +++ b/src/index/cache10.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15850216 + !be24 15844354 !le16 5621 diff --git a/src/index/cache11.idx.a b/src/index/cache11.idx.a index 903c4057d..c74cf2a88 100644 --- a/src/index/cache11.idx.a +++ b/src/index/cache11.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15871257 + !be24 15865395 !le16 6199 diff --git a/src/index/coverfade.idx.a b/src/index/coverfade.idx.a index 173b80765..d97f0b5b9 100644 --- a/src/index/coverfade.idx.a +++ b/src/index/coverfade.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15945470 + !be24 15939608 !le16 410 diff --git a/src/index/credits.idx.a b/src/index/credits.idx.a index b98d0ec0f..d337da40c 100644 --- a/src/index/credits.idx.a +++ b/src/index/credits.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15946224 + !be24 15940362 !le16 449 diff --git a/src/index/decrunch.idx.a b/src/index/decrunch.idx.a index 2b17948f3..d8d324785 100644 --- a/src/index/decrunch.idx.a +++ b/src/index/decrunch.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15946673 + !be24 15940811 !le16 303 diff --git a/src/index/demo.idx.a b/src/index/demo.idx.a index 145bd96ed..751bb4211 100644 --- a/src/index/demo.idx.a +++ b/src/index/demo.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 12713005 + !be24 12707143 !le16 1652 diff --git a/src/index/dfx.idx.a b/src/index/dfx.idx.a index e03091f44..f9cf3715c 100644 --- a/src/index/dfx.idx.a +++ b/src/index/dfx.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15893392 + !be24 15887530 !le16 1640 diff --git a/src/index/dgr.fizzle.idx.a b/src/index/dgr.fizzle.idx.a index 086d46584..64573d674 100644 --- a/src/index/dgr.fizzle.idx.a +++ b/src/index/dgr.fizzle.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15945956 + !be24 15940094 !le16 67 diff --git a/src/index/dgr.idx.a b/src/index/dgr.idx.a index b7ded8c28..70ef4f974 100644 --- a/src/index/dgr.idx.a +++ b/src/index/dgr.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15940281 + !be24 15934419 !le16 59 diff --git a/src/index/dhgr.idx.a b/src/index/dhgr.idx.a index 519320a5e..bc7a725bd 100644 --- a/src/index/dhgr.idx.a +++ b/src/index/dhgr.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15938701 + !be24 15932839 !le16 1426 diff --git a/src/index/dtitle.idx.a b/src/index/dtitle.idx.a index 95520ed33..c55585f70 100644 --- a/src/index/dtitle.idx.a +++ b/src/index/dtitle.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15923467 + !be24 15917605 !le16 557 diff --git a/src/index/fx.idx.a b/src/index/fx.idx.a index 464619867..8256f4426 100644 --- a/src/index/fx.idx.a +++ b/src/index/fx.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15890752 + !be24 15884890 !le16 2640 diff --git a/src/index/fxdata.idx.a b/src/index/fxdata.idx.a index 8efffd2d5..0bcb3728f 100644 --- a/src/index/fxdata.idx.a +++ b/src/index/fxdata.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15895390 + !be24 15889528 !le16 451 diff --git a/src/index/gamehelp.idx.a b/src/index/gamehelp.idx.a index 81a259cb9..e9ef492d4 100644 --- a/src/index/gamehelp.idx.a +++ b/src/index/gamehelp.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15895841 + !be24 15889979 !le16 7564 diff --git a/src/index/gr.fizzle.idx.a b/src/index/gr.fizzle.idx.a index a7e24f4af..3114b1680 100644 --- a/src/index/gr.fizzle.idx.a +++ b/src/index/gr.fizzle.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15945880 + !be24 15940018 !le16 76 diff --git a/src/index/gr.idx.a b/src/index/gr.idx.a index 2f8e2736b..329e39a37 100644 --- a/src/index/gr.idx.a +++ b/src/index/gr.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15940127 + !be24 15934265 !le16 154 diff --git a/src/index/helptext.idx.a b/src/index/helptext.idx.a index 06fe6046f..3bbb4071d 100644 --- a/src/index/helptext.idx.a +++ b/src/index/helptext.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15946023 + !be24 15940161 !le16 201 diff --git a/src/index/hgr0.idx.a b/src/index/hgr0.idx.a index 8d9772cde..d2d0f94e8 100644 --- a/src/index/hgr0.idx.a +++ b/src/index/hgr0.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15924024 + !be24 15918162 !le16 4334 diff --git a/src/index/hgr1.idx.a b/src/index/hgr1.idx.a index 43ed4db2b..994927116 100644 --- a/src/index/hgr1.idx.a +++ b/src/index/hgr1.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15928358 + !be24 15922496 !le16 1733 diff --git a/src/index/hgr2.idx.a b/src/index/hgr2.idx.a index 70ed031a1..2679fbb8d 100644 --- a/src/index/hgr2.idx.a +++ b/src/index/hgr2.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15930091 + !be24 15924229 !le16 1181 diff --git a/src/index/hgr3.idx.a b/src/index/hgr3.idx.a index 08c9341ea..ef954cd9a 100644 --- a/src/index/hgr3.idx.a +++ b/src/index/hgr3.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15931272 + !be24 15925410 !le16 3394 diff --git a/src/index/hgr4.idx.a b/src/index/hgr4.idx.a index 98422fb3d..c7ea0c67d 100644 --- a/src/index/hgr4.idx.a +++ b/src/index/hgr4.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15934666 + !be24 15928804 !le16 3429 diff --git a/src/index/hgr5.idx.a b/src/index/hgr5.idx.a index 75af1b687..41bc13fe8 100644 --- a/src/index/hgr5.idx.a +++ b/src/index/hgr5.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15938095 + !be24 15932233 !le16 479 diff --git a/src/index/hgr6.idx.a b/src/index/hgr6.idx.a index bcccf5fa6..7a8b116d7 100644 --- a/src/index/hgr6.idx.a +++ b/src/index/hgr6.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15938574 + !be24 15932712 !le16 127 diff --git a/src/index/joystick.idx.a b/src/index/joystick.idx.a index d2f681eb1..8b3ceeb6b 100644 --- a/src/index/joystick.idx.a +++ b/src/index/joystick.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15946976 + !be24 15941114 !le16 2370 diff --git a/src/index/miniattract0.idx.a b/src/index/miniattract0.idx.a index fb62385f5..323d604ef 100644 --- a/src/index/miniattract0.idx.a +++ b/src/index/miniattract0.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15908810 + !be24 15902948 !le16 5083 diff --git a/src/index/miniattract1.idx.a b/src/index/miniattract1.idx.a index 0c72f0deb..8dae6fcfd 100644 --- a/src/index/miniattract1.idx.a +++ b/src/index/miniattract1.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15913893 + !be24 15908031 !le16 2485 diff --git a/src/index/prelaunch.idx.a b/src/index/prelaunch.idx.a index e6547bb56..1032ad375 100644 --- a/src/index/prelaunch.idx.a +++ b/src/index/prelaunch.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15877456 + !be24 15871594 !le16 7564 diff --git a/src/index/search00.idx.a b/src/index/search00.idx.a index beb656756..1df04b043 100644 --- a/src/index/search00.idx.a +++ b/src/index/search00.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15807204 + !be24 15801342 !le16 9583 diff --git a/src/index/search01.idx.a b/src/index/search01.idx.a index 0e14ea25c..874df7374 100644 --- a/src/index/search01.idx.a +++ b/src/index/search01.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15820981 + !be24 15815119 !le16 10520 diff --git a/src/index/search10.idx.a b/src/index/search10.idx.a index 84fed0b66..f2ab64531 100644 --- a/src/index/search10.idx.a +++ b/src/index/search10.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15836153 + !be24 15830291 !le16 14063 diff --git a/src/index/search11.idx.a b/src/index/search11.idx.a index b3a2e6dcc..8bd559f7c 100644 --- a/src/index/search11.idx.a +++ b/src/index/search11.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15855837 + !be24 15849975 !le16 15420 diff --git a/src/index/sfx.idx.a b/src/index/sfx.idx.a index db9d533d3..895f7047d 100644 --- a/src/index/sfx.idx.a +++ b/src/index/sfx.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15895032 + !be24 15889170 !le16 358 diff --git a/src/index/slideshow.idx.a b/src/index/slideshow.idx.a index 56a342a06..a2e4e636d 100644 --- a/src/index/slideshow.idx.a +++ b/src/index/slideshow.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15903405 + !be24 15897543 !le16 5405 diff --git a/src/index/title.idx.a b/src/index/title.idx.a index 57a2a11df..9aac51e8d 100644 --- a/src/index/title.idx.a +++ b/src/index/title.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15916378 + !be24 15910516 !le16 7089 diff --git a/src/index/xsingle.idx.a b/src/index/xsingle.idx.a index e460be3b6..add9b62ad 100644 --- a/src/index/xsingle.idx.a +++ b/src/index/xsingle.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 15802856 + !be24 15796994 !le16 4348 diff --git a/src/macros.a b/src/macros.a index ae0b0f16e..cdea6ee7f 100755 --- a/src/macros.a +++ b/src/macros.a @@ -358,6 +358,7 @@ +READ_ROM_NO_WRITE } +; ROM must be banked in! !macro USES_TEXT_PAGE_2 { ; If we know we are going into a game one-time lda ROM_MACHINEID ; only we can just blindly turn on TEXT2COPY, as cmp #$06 ; Alternate Display Mode turns off on reset or reboot. @@ -370,6 +371,7 @@ + } +; ROM must be banked in! !macro TEST_TEXT_PAGE_2 { ; On a ROM3 IIgs we can test if Alternate Display Mode lda ROM_MACHINEID ; is already on. ROM0 and ROM1 versions of ADM use cmp #$06 ; interrupts and can cause hangs, so safer to just diff --git a/src/prelaunch/stellar.7.a b/src/prelaunch/stellar.7.a index b442818dc..d7f79f3c2 100755 --- a/src/prelaunch/stellar.7.a +++ b/src/prelaunch/stellar.7.a @@ -8,7 +8,7 @@ !source "src/macros.a" lda #$60 - sta $336 + sta $33C jsr $300 +USES_TEXT_PAGE_2 +ENABLE_ACCEL