From f9d99949c99045ecaf664386b32af74321f3be59 Mon Sep 17 00:00:00 2001 From: 4am Date: Tue, 3 May 2022 22:36:49 -0400 Subject: [PATCH] split MINIATTRACT.IDX into two because we have too many games --- Makefile | 6 +++-- src/constants.a | 2 +- src/index/artwork.idx.a | 2 +- src/index/coverfade.idx.a | 2 +- src/index/credits.idx.a | 2 +- src/index/decrunch.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/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 +- .../{miniattract.idx.a => miniattract0.idx.a} | 4 +-- src/index/miniattract1.idx.a | 8 ++++++ src/index/title.idx.a | 2 +- src/prodos.path.a | 12 +++++++-- src/ui.attract.mode.a | 25 ++++++++++++++++--- 26 files changed, 67 insertions(+), 30 deletions(-) rename src/index/{miniattract.idx.a => miniattract0.idx.a} (56%) create mode 100644 src/index/miniattract1.idx.a diff --git a/Makefile b/Makefile index c3c89b6f1..fabb6bd23 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,8 @@ index: preconditions md asmfx asmprelaunch compress [ -f build/index ] || $(PARALLEL) '[ $$(echo "{/}" | cut -c-3) = "ACT" ] && bin/buildslideshow.sh -d build/GAMES.CONF < "{}" > "build/SS/{/}" || bin/buildslideshow.sh build/GAMES.CONF < "{}" > "build/SS/{/}"' ::: res/SS/* [ -f build/index ] || ((for f in build/SS/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/SS > build/SLIDESHOW.IDX) [ -f build/index ] || $(PARALLEL) 'bin/buildokvs.sh < "{}" > "build/ATTRACT/{/}"' ::: res/ATTRACT/* - [ -f build/index ] || ((for f in build/ATTRACT/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/ATTRACT > build/MINIATTRACT.IDX) + [ -f build/index ] || ((for f in build/ATTRACT/[ABCDEFGHIJKLM]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/ATTRACT > build/MINIATTRACT0.IDX) + [ -f build/index ] || ((for f in build/ATTRACT/[NOPQRSTUVWXYZ]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/ATTRACT > build/MINIATTRACT1.IDX) # # precompute indexed files for graphic effects # note: these can be padded because they're loaded into $6000 at a time when $6000..$BEFF is clobber-able @@ -182,7 +183,8 @@ index: preconditions md asmfx asmprelaunch compress [ -f build/index ] || bin/addfile.sh build/SFX.IDX build/TOTAL.DATA > src/index/sfx.idx.a [ -f build/index ] || bin/addfile.sh build/GAMEHELP.IDX build/TOTAL.DATA > src/index/gamehelp.idx.a [ -f build/index ] || bin/addfile.sh build/SLIDESHOW.IDX build/TOTAL.DATA > src/index/slideshow.idx.a - [ -f build/index ] || bin/addfile.sh build/MINIATTRACT.IDX build/TOTAL.DATA > src/index/miniattract.idx.a + [ -f build/index ] || bin/addfile.sh build/MINIATTRACT0.IDX build/TOTAL.DATA > src/index/miniattract0.idx.a + [ -f build/index ] || bin/addfile.sh build/MINIATTRACT1.IDX build/TOTAL.DATA > src/index/miniattract1.idx.a [ -f build/index ] || bin/addfile.sh build/TITLE.IDX build/TOTAL.DATA > src/index/title.idx.a [ -f build/index ] || bin/addfile.sh build/DTITLE.IDX build/TOTAL.DATA > src/index/dtitle.idx.a [ -f build/index ] || bin/addfile.sh build/HGR0.IDX build/TOTAL.DATA > src/index/hgr0.idx.a diff --git a/src/constants.a b/src/constants.a index c036162ee..1eff5b8a1 100644 --- a/src/constants.a +++ b/src/constants.a @@ -204,7 +204,7 @@ PRELAUNCH_STANDARD_SIZE = 61 ; LoadStandardPrelaunch, eventually to be d iCurBlockLo = $D601 ; constant iCurBlockHi = $D603 ; constant launchpatch = $D853 ; glue.launch.a -iAddToPath = $FEBF ; Roger Rabbit (via prelaunch), avoid, use Infiltrator 2 style instead +iAddToPath = $FEB5 ; Roger Rabbit (via prelaunch), avoid, use Infiltrator 2 style instead ; also Columns (via file in disk image) itraverse = $DB42 ; Roger Rabbit, avoid, use Infiltrator 2 style instead ; also Columns (via file in disk image) diff --git a/src/index/artwork.idx.a b/src/index/artwork.idx.a index 41aa3d417..7ff5fc8b2 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 11400560 + !be24 11400564 !le16 4515 diff --git a/src/index/coverfade.idx.a b/src/index/coverfade.idx.a index a3c0c168d..371023c1b 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 11405075 + !be24 11405079 !le16 410 diff --git a/src/index/credits.idx.a b/src/index/credits.idx.a index 47307c7c4..eabfa8fed 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 11405829 + !be24 11405833 !le16 448 diff --git a/src/index/decrunch.idx.a b/src/index/decrunch.idx.a index 824769c8e..dc1d4d9bf 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 11406277 + !be24 11406281 !le16 303 diff --git a/src/index/dgr.fizzle.idx.a b/src/index/dgr.fizzle.idx.a index da912cfc6..8cb5e2f99 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 11405561 + !be24 11405565 !le16 67 diff --git a/src/index/dgr.idx.a b/src/index/dgr.idx.a index 99c28e5ff..42d046f57 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 11400501 + !be24 11400505 !le16 59 diff --git a/src/index/dhgr.idx.a b/src/index/dhgr.idx.a index 3805d79c6..baf7663fc 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 11399136 + !be24 11399140 !le16 1284 diff --git a/src/index/dtitle.idx.a b/src/index/dtitle.idx.a index 519bc23ae..75474c5ab 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 11384797 + !be24 11384801 !le16 521 diff --git a/src/index/gr.fizzle.idx.a b/src/index/gr.fizzle.idx.a index b972a429a..31bb8c4a0 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 11405485 + !be24 11405489 !le16 76 diff --git a/src/index/gr.idx.a b/src/index/gr.idx.a index cb8c0fa7c..694607a23 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 11400420 + !be24 11400424 !le16 81 diff --git a/src/index/helptext.idx.a b/src/index/helptext.idx.a index 58a17ed2a..2eac5c611 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 11405628 + !be24 11405632 !le16 201 diff --git a/src/index/hgr0.idx.a b/src/index/hgr0.idx.a index 561d23c8c..257a669d8 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 11385318 + !be24 11385322 !le16 4511 diff --git a/src/index/hgr1.idx.a b/src/index/hgr1.idx.a index 95381cbc2..f5c95b694 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 11389829 + !be24 11389833 !le16 1575 diff --git a/src/index/hgr2.idx.a b/src/index/hgr2.idx.a index 2deb0d721..a769c253c 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 11391404 + !be24 11391408 !le16 1053 diff --git a/src/index/hgr3.idx.a b/src/index/hgr3.idx.a index a6b90563c..041c41a36 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 11392457 + !be24 11392461 !le16 3237 diff --git a/src/index/hgr4.idx.a b/src/index/hgr4.idx.a index 0855df1a1..1ec1cf97b 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 11395694 + !be24 11395698 !le16 2877 diff --git a/src/index/hgr5.idx.a b/src/index/hgr5.idx.a index cd3447042..cda30af7a 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 11398571 + !be24 11398575 !le16 460 diff --git a/src/index/hgr6.idx.a b/src/index/hgr6.idx.a index 050444255..6b9782ca5 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 11399031 + !be24 11399035 !le16 105 diff --git a/src/index/joystick.idx.a b/src/index/joystick.idx.a index 45bc2b664..56d9bbb40 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 11406580 + !be24 11406584 !le16 2370 diff --git a/src/index/miniattract.idx.a b/src/index/miniattract0.idx.a similarity index 56% rename from src/index/miniattract.idx.a rename to src/index/miniattract0.idx.a index 12e2bd9d5..fff5db913 100644 --- a/src/index/miniattract.idx.a +++ b/src/index/miniattract0.idx.a @@ -1,8 +1,8 @@ ; -; Index record for build/MINIATTRACT.IDX +; Index record for build/MINIATTRACT0.IDX ; ; This file is automatically generated ; !byte 0 !be24 11372402 - !le16 6417 + !le16 3626 diff --git a/src/index/miniattract1.idx.a b/src/index/miniattract1.idx.a new file mode 100644 index 000000000..5f2444e49 --- /dev/null +++ b/src/index/miniattract1.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/MINIATTRACT1.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 11376028 + !le16 2795 diff --git a/src/index/title.idx.a b/src/index/title.idx.a index 8feabb02a..00103bc40 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 11378819 + !be24 11378823 !le16 5978 diff --git a/src/prodos.path.a b/src/prodos.path.a index 8117c3490..107b6816d 100644 --- a/src/prodos.path.a +++ b/src/prodos.path.a @@ -69,8 +69,16 @@ kPrelaunchIndexRecord kAttractModeIndexRecord !source "src/index/attract.idx.a" -kMiniAttractIndexRecord - !source "src/index/miniattract.idx.a" +kMiniAttractIndexLo + !byte kMiniAttractIndexRecord0 + !byte >kMiniAttractIndexRecord1 +kMiniAttractIndexRecord0 + !source "src/index/miniattract0.idx.a" +kMiniAttractIndexRecord1 + !source "src/index/miniattract1.idx.a" kAttractModeSlideshowIndexRecord !source "src/index/slideshow.idx.a" diff --git a/src/ui.attract.mode.a b/src/ui.attract.mode.a index e525c93f1..0a2ec9f4f 100644 --- a/src/ui.attract.mode.a +++ b/src/ui.attract.mode.a @@ -68,13 +68,32 @@ MegaAttractMode ;------------------------------------------------------------------------------ MiniAttractMode jsr GetGameToLaunch - +ST16 + + +ST16 @GameToLaunch + + +ST16 PTR + ldy #1 + lda (PTR), y + sec + sbc #$41 ; A in [0..25] + lsr ; A in [0..15] + lsr ; A in [0..7] + lsr ; A in [0..3] + lsr ; A in [0..1] + tax + lda kMiniAttractIndexLo, x + sta @MiniAttractIndexRecord + lda kMiniAttractIndexHi, x + sta @MiniAttractIndexRecord+1 + jsr LoadIndexedFile - !word $0800 - !word kMiniAttractIndexRecord +@MiniAttractIndexRecord + !word $FDFD ; SMC + jsr okvs_find !word - -+ !word $FDFD ; SMC +@GameToLaunch + !word $FDFD ; SMC jsr okvs_next_field jsr SwitchToBank2 sty OKVS_CACHE