From 13d65a0b67ca44b2b15179adfb5362b36caa3b2a Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 15 Nov 2021 10:23:44 -0800 Subject: [PATCH] fix seek(0) and update demos for low-cost seek --- res/DEMO/AC | Bin 100 -> 100 bytes res/DEMO/AGENT.U.S.A | Bin 149 -> 149 bytes res/DEMO/ALIEN.DOWNPOUR | Bin 140 -> 140 bytes res/DEMO/ALIEN.MUNCHIES | Bin 159 -> 159 bytes res/DEMO/ALIEN.TYPHOON | Bin 161 -> 161 bytes res/DEMO/APPLE.INVADER | Bin 186 -> 186 bytes res/DEMO/AQUATRON | Bin 122 -> 122 bytes res/DEMO/BATTLEZONE | Bin 216 -> 216 bytes res/DEMO/BB | Bin 163 -> 163 bytes res/DEMO/BEER.RUN | Bin 155 -> 155 bytes res/DEMO/BK | Bin 165 -> 165 bytes res/DEMO/BOLO | Bin 112 -> 112 bytes res/DEMO/BU | Bin 165 -> 165 bytes res/DEMO/BUZZARD.BAIT | Bin 135 -> 135 bytes res/DEMO/CB | Bin 118 -> 118 bytes res/DEMO/CHOPLIFTER | Bin 120 -> 120 bytes res/DEMO/CL | Bin 118 -> 118 bytes res/DEMO/CRIME.WAVE | Bin 116 -> 116 bytes res/DEMO/CYCLOD | Bin 112 -> 112 bytes res/DEMO/DIG.DUG | Bin 111 -> 111 bytes res/DEMO/DINO.EGGS | Bin 133 -> 133 bytes res/DEMO/DUNG.BEETLES | Bin 170 -> 170 bytes res/DEMO/FALCONS | Bin 103 -> 103 bytes res/DEMO/FIREBUG | Bin 145 -> 145 bytes res/DEMO/FLIP.OUT | Bin 183 -> 183 bytes res/DEMO/GAMMA.GOBLINS | Bin 168 -> 168 bytes res/DEMO/GUMBALL | Bin 175 -> 175 bytes res/DEMO/HARD.HAT.MACK | Bin 180 -> 180 bytes res/DEMO/HIGH.RISE | Bin 113 -> 113 bytes res/DEMO/JUNGLE.HUNT | Bin 169 -> 169 bytes res/DEMO/LABYRINTH | Bin 154 -> 154 bytes res/DEMO/LAZER.SILK | Bin 168 -> 168 bytes res/DEMO/LODE.RUNNER | Bin 141 -> 141 bytes res/DEMO/MC | Bin 119 -> 119 bytes res/DEMO/MOON.PATROL | Bin 187 -> 187 bytes res/DEMO/N.O.R.A.D | Bin 130 -> 130 bytes res/DEMO/NI | Bin 115 -> 115 bytes res/DEMO/NIBBLER | Bin 139 -> 139 bytes res/DEMO/NIGHT.STALKER | Bin 291 -> 291 bytes res/DEMO/PACMAN | Bin 200 -> 200 bytes res/DEMO/PEST.PATROL | Bin 147 -> 147 bytes res/DEMO/PITFALL.II | Bin 198 -> 198 bytes res/DEMO/PLASMANIA | Bin 159 -> 159 bytes res/DEMO/PM | Bin 149 -> 149 bytes res/DEMO/POOYAN | Bin 122 -> 122 bytes res/DEMO/REPTON | Bin 116 -> 116 bytes res/DEMO/ROBOTRON.2084 | Bin 110 -> 110 bytes res/DEMO/SAMMY.LIGHTFOOT | Bin 205 -> 205 bytes res/DEMO/SHORT.CIRCUIT | Bin 143 -> 143 bytes res/DEMO/SNEAKERS | Bin 105 -> 105 bytes res/DEMO/SPACE.EGGS | Bin 218 -> 218 bytes res/DEMO/SPACE.QUARKS | Bin 173 -> 173 bytes res/DEMO/STAR.BLAZER | Bin 167 -> 167 bytes res/DEMO/STARGATE | Bin 195 -> 195 bytes res/DEMO/TB | Bin 164 -> 164 bytes res/DEMO/TUNNEL.TERROR | Bin 209 -> 209 bytes res/DEMO/VINDICATOR | Bin 184 -> 184 bytes res/DEMO/WARP.DESTROYER | Bin 196 -> 196 bytes res/DEMO/WAVY.NAVY | Bin 106 -> 106 bytes src/constants.a | 10 +++++----- src/prodos.impl.lc2.a | 9 +++++++++ 61 files changed, 14 insertions(+), 5 deletions(-) diff --git a/res/DEMO/AC b/res/DEMO/AC index 4591668294f103a68c9ff7a105c61abac793ef72..ac801c652dec7565ac1f5204c38e32749fabe50b 100755 GIT binary patch delta 20 acmYdE;nZn907MGg?@#1(XS_c#P#6GJ6bKvu delta 20 acmYdE;nZn907MGgZ%^cOXS_WzP#6GI;0P1| diff --git a/res/DEMO/AGENT.U.S.A b/res/DEMO/AGENT.U.S.A index 87132b3f194aeb10aae8be7fc3599caa7f95ef9f..c1f59bfe547cbf8448940453e426dca33893a907 100644 GIT binary patch delta 49 zcmbQrIF(UFr}+R7DQv&Lmhqa$TIOpWix}EMS5_}zR(StEqnG(wMla*Fi7H-<_b2A7 F0RRv$6>tCm delta 49 zcmbQrIF(UFr}+R7DQv&Jmhp|s>VX+8i%3fu3mWxVFGmid~;B8Ilml{pKT72f~P=w-f^(aU&kqKYHq{fTL6 E01G`8Jpcdz delta 49 zcmeBS>|s>VX+8i%3fph5WxV3CmidauB8Ilml{pKT72f~P=w-f=(aU&cqKYHq?TKk> E015RKEdT%j diff --git a/res/DEMO/ALIEN.MUNCHIES b/res/DEMO/ALIEN.MUNCHIES index 718d0aa871b90cea811ab38ba3163ba1e3dd9b7e..ca5a1bbe317b5921dfd7c35fd63e75dfd1153fc6 100755 GIT binary patch delta 49 zcmbQwIG<5Pr}+R7DQv&Lmhqa$TIOpWix}EMSJp3JQh5JAqnG(wMla*Fi7HNv_a~-X F000yP6^Q@< delta 49 zcmbQwIG<5Pr}+R7DQv&Jmhp F000%u6{-LL delta 49 zcmZ3;xR6mrr}+R7DQv&JmhpO0EShmoS*_A@Be6x1Jr1Z0o0K+VFBBbmL!@c B69E7K diff --git a/res/DEMO/AQUATRON b/res/DEMO/AQUATRON index f920d8340d21d6ae98b749639a8dec98a8245055..4c066342d3bda3794ee87db62128b34a498b7bf5 100755 GIT binary patch delta 47 zcmb=bQqgHX07MGg@2_RN=CPLfn#UrBw$PPn3-&6!|DVyzd@ZAw@!CWcYsUK%6QlqT CcNMb$ delta 47 zcmb=bQqgHX07MGgZ?9#%;<1+bipL^`w$PPn3-&6!|DVyzd?llo@ybLMYsT9X6QlqS CFBPKz diff --git a/res/DEMO/BATTLEZONE b/res/DEMO/BATTLEZONE index 1b8f1c32b2c65e71bcf1d7c124b10aa5587a8827..cb613d3b0e569f1b3d22681b05c932090a7a0576 100755 GIT binary patch delta 41 wcmcb?c!N<{zT6h0AU>n*#H0l delta 22 ccmZ3=xRjAor}+R7DQv$zk<*^>_C(JZ0AT3|(EtDd diff --git a/res/DEMO/BOLO b/res/DEMO/BOLO index a1bfa5ddb1f78133f01bcecf6af5ae30c683f682..45ae43323984a613d5c18d89a4f5c7d9bf0825fd 100755 GIT binary patch delta 62 zcmXRYP|;~V07MGg@2_RN=CPLfn#UrBw$PO+3z!w&|Ig@UzLwF;cx|GJrSN^7rUO0< Og4_}MPX0drU;+SEH5kkQ delta 62 zcmXRYP|;~V07MGgZ?9#%;<1+bipL^`w$PO+3z!w&|Ig@UzLL?)cx9rBrSNT?rUO0< Og4_}MPX0drU;+SB{TRFe diff --git a/res/DEMO/BU b/res/DEMO/BU index 5479cd9be5f73c375264d005b62e68fd196bd7a9..9e5a45afb8e968adbefede832c4b036b7eb52c26 100755 GIT binary patch delta 48 xcmZ3=xRjAor}+R7DQv$#kyDlN{zQFwAmQ&Ma$l$EfDglBmI!^PP<9XjL;$#V5XS%j delta 48 xcmZ3=xRjAor}+R7DQv$zkyDlN_C$SoAmQ&Ma$BeAfDglBmI!^PP<9XjL;$wG5VrsT diff --git a/res/DEMO/BUZZARD.BAIT b/res/DEMO/BUZZARD.BAIT index a7438ec161bd13c75da4b0f81638e7d52d9771a2..3419eaf12779c53ffccaf18af9cbf61fc45a1e28 100755 GIT binary patch delta 49 zcmZo?Y-d!_X+8i%3fu3mWxVFGmid~;B8IlmmDvlJ72f~P=w-f^(aU&kqKX6K{fVhc E00}!4EC2ui delta 49 zcmZo?Y-d!_X+8i%3fph5WxV3CmidauB8IlmmDvlJ72f~P=w-f=(aU&cqKX6K?TM*M E00;9G8~^|S diff --git a/res/DEMO/CB b/res/DEMO/CB index 20a23cf089e92ed18027c85e6377a9eef632438f..febc5524bb5288f96a89d387660c7fa00b3ee1be 100755 GIT binary patch delta 47 zcmXRbQ_*QY07MGg@2_RN=CPLfn#UrBw$PPz3z!t%|Ig@UzLwF;cx|GJ732Mh@!|ji CY!w3l delta 47 zcmXRbQ_*QY07MGgZ?9#%;<1+bipL^`w$PPz3z!t%|Ig@UzLL?)cx9rB731xR@!|jh CBoy-i diff --git a/res/DEMO/CHOPLIFTER b/res/DEMO/CHOPLIFTER index b9422bac544de2b9d38ea3d18ddc408e8a31f4f8..11f2d3808243628684471a1f1afdd338a15d061b 100755 GIT binary patch delta 41 zcmV+^0M`F_c#s$z->m`GNUa0bNTL9SRjFX010e7JXpIBbXpI5Zku)O#-;r1#eF72C delta 41 zcmV+^0M`F_c#s$z+pPiANUa0ZNTL9SRjFX010e7JXpIBZXpI5Xku)O#+mToxd%6+8 diff --git a/res/DEMO/CL b/res/DEMO/CL index 9136ee2e65319e51760f811e61a4bee2044f46aa..a0e0e81c4198d441db5eaa3ce1bb98f096d5d784 100755 GIT binary patch delta 36 mcmXRbq`yrUO0< R4T2H+E}rgsE}`x)8UXc#8lwOJ delta 68 zcmd1LSJ7!c07MGgZ?9#%;<1+bipL^`w$PQa3z!w&|Ig@UzLL?)cx9rBk>qWirUO0< R4T2H+E}rgsE}`x)8UXU_8j}D3 diff --git a/res/DEMO/DINO.EGGS b/res/DEMO/DINO.EGGS index 306da3a2b7cc0fe10b5b7a1f6434094f97bb0060..427151c6d4a280a010c588873ce68bfd007afe52 100755 GIT binary patch delta 16 WcmZo=Y-OAv!FYe7q%)9+)c^o2N(FcT delta 16 WcmZo=Y-OAv!FYS3q%)9+)c^o276ots diff --git a/res/DEMO/DUNG.BEETLES b/res/DEMO/DUNG.BEETLES index e123adcb6eb27d61e0d704f56c45c354c5e575de..c63bb421782cf741206fb1c996737e8f4cb97aa4 100755 GIT binary patch delta 49 zcmZ3*xQbClr}+R7DQv&Lmhqa$TIOpWix}EMSN1JnR(StEqnG(wMla*Fi7K&-_a`=K F000_G71aO$ delta 49 zcmZ3*xQbClr}+R7DQv&JmhpS6~zDm diff --git a/res/DEMO/FALCONS b/res/DEMO/FALCONS index 4d892571e8bce180ef76c87e4bc91f874d618221..7e5f4ec6e4ee44363e2c42386eeae591abb7b53f 100755 GIT binary patch delta 47 zcmYdKSJ7!c07MGg@2_RN=CPLfn#UrBw$PQK3pOac|DVyzd@ZAw@!CWcEynv3{Urbf Cj1@}& delta 47 zcmYdKSJ7!c07MGgZ?9#%;<1+bipL^`w$PQK3pOac|DVyzd?llo@ybLMEymju{Urbe CL=`&# diff --git a/res/DEMO/FIREBUG b/res/DEMO/FIREBUG index 89b2a400907dd9b7ff130f602ded55492e2c0d24..5ff4f8a23cc589fb78123fe6d8a34cc38b1f3c63 100755 GIT binary patch delta 70 zcmbQpIFV6Br}+R7DQv&Lmhqa$TIOpWix}EMSJp3JQh5JAqnG(wMla*Fi7FwI_jQ^M T_y}+aM(DeF2Dv(gy2EGy4SyR5 delta 70 zcmbQpIFV6Br}+R7DQv&JmhpO0EShmilDF{@Be6x1Jr1Z0o0K+Oaa@GfhV7( B6H)*G diff --git a/res/DEMO/GUMBALL b/res/DEMO/GUMBALL index 957ca326301d7085796e756a8d1f5e429592f37e..beeec432e43690328e946a2adbf6315c27fa9d62 100755 GIT binary patch delta 22 ccmZ3_xSo+yr}+R7DQv$#k<*0n{zSV%0AhX!>;M1& delta 22 ccmZ3_xSo+yr}+R7DQv$zk<*0n_C&iv0AflAKtnmJSMlbWVj9$iT6ID_f?@#QK F0{|KA71;m) delta 49 zcmZ3%xPnndr}+R7DQv&JmhpKtnmJSMlbV~j9$ho6ID_fZ%^!! F0{|GM70Cbq diff --git a/res/DEMO/LODE.RUNNER b/res/DEMO/LODE.RUNNER index 037d1948440d50d71e8ac3865ec8eb44dffda1de..93f0643f5dfe94f952fdaa61ac333e5fc570ff1c 100755 GIT binary patch delta 22 ccmeBW>}BNCX+8i%3fu2b}BNCX+8i%3fpf_}FKaX+8i%3fu3mWxVFGmid~;B8Ilmm6Z#a72f~P=w-f^(aU&kqKcp7eVwKQ TJ`9|K5&C|fPEJ0qK`}FKaX+8i%3fph5WxV3CmidauB8Ilmm6Z#a72f~P=w-f=(aU&cqKcp7ZJnkA TJ`9|K5&C|fPEJ0qK`O0EShm1)!lI@Be6x1Jr1Z0o0K>tpVGS=RB3c B6Py45 diff --git a/res/DEMO/PACMAN b/res/DEMO/PACMAN index a2108cbbf2c0166712ea2a4aa9838de173e63f68..8728422426b0344342e226ae3268d54d3dbe3295 100644 GIT binary patch delta 68 zcmX@Xc!E(yr}+R7DQv&Lmhqa$TIOpWix}EMSMFHAtnmJSMlbWVj9$iT6IFV}@9Q)j S@L>?(kI)ZrboO=hgHiwi-y1am delta 68 zcmX@Xc!E(yr}+R7DQv&Jmhp?(kI)ZrboO=hgHizhSQ{k( diff --git a/res/DEMO/PEST.PATROL b/res/DEMO/PEST.PATROL index d10491bbf3ea417d3792261c19b03fc52b8f556a..057fa8e684586e3a323fe33e3d94c6f5741a3255 100755 GIT binary patch delta 49 zcmbQtIGIsJr}+R7DQv&Lmhqa$TIOpWix}EMSLQ8XR(StEqnG(wMla*Fi7L*F_a|m( F0{{*l6;=QM delta 49 zcmbQtIGIsJr}+R7DQv&JmhpO0EShmuAl=T@Be6x1Jr1Z0o0K+I04&{ZCRe9 B6Au6Y diff --git a/res/DEMO/PLASMANIA b/res/DEMO/PLASMANIA index 5e1d88312f49b8f91c3a800eafad0c42a1cb4053..0876bbf2ba036d46d2674e55b9eb770dbeebe9d7 100755 GIT binary patch delta 41 wcmbQwIG<5br}+R7t!2FCv6lIo$0CNd(3PDFm=xas&*){omeI?2ZK7fw0BQyj0{{R3 delta 41 wcmbQwIG<5br}+R7t!2F8v6lIY$0CNd(3PDFm=xas&*){olF`d}Wujso0BMF1`v3p{ diff --git a/res/DEMO/PM b/res/DEMO/PM index 2e37ba9482cea25514f9b372714401f28d2e05ea..4c0dcca940d736d2584f1b2e1e0e42f4fe00a840 100755 GIT binary patch delta 39 ucmbQrIF*r8r}+R7DQv$#kyBRazE0DDl?lBo?G!rfbQ%sQY`H(tA{GESOc00w delta 39 ucmbQrIF*r8r}+R7DQv$zkyBRawocQ5l?lBo?G!rfbQ%sQY`HzrA{GERfDn8D diff --git a/res/DEMO/POOYAN b/res/DEMO/POOYAN index 3c4a586f76f708b17f38ca538a4573b2be913f76..90132f5986dc1896cd72976a3558df0f3a1b34df 100755 GIT binary patch delta 66 zcmb=bQqgHX07MGg@2_RN=CPLfn#UrBw$PPX3z!w&|Ig@UzLwF;cx|GJz4(2drUO0< Q3H%ZI0sj7xj($)I0LpqAmjD0& delta 66 zcmb=bQqgHX07MGgZ?9#%;<1+bipL^`w$PPX3z!w&|Ig@UzLL?)cx9rBz4&dNrUO0< Q3H%ZI0sj7xj($)I0LTIwhX4Qo diff --git a/res/DEMO/REPTON b/res/DEMO/REPTON index 3d4df31646929da2c000924db08ed499740b04ca..82c14ecb7cb4d19eb0e94dd613eaa13d5dfc56ad 100755 GIT binary patch delta 20 acmXRZ;nZn907MGg?@#1(X1qVqR~-OXcnC-U delta 20 acmXRZ;nZn907MGgZ%^cOX1qPoR~-OXL}TZEX+8i%3fu2b@~ delta 22 ccmeBY>}TZEX+8i%3fpf_w} B6SDvS delta 43 zcmV+`0M!550onnO7#!QJ0n|vX1Jp>O0EShm!k_~n@Be6x1Jr1Z0o0K+d;!~$u_>tA B6QckC diff --git a/res/DEMO/SPACE.QUARKS b/res/DEMO/SPACE.QUARKS index 804979cf939d6f61f1a542edcda6221bdcca3ae0..ae55c91c6c885465c1b4b70969bc0ea53518731d 100755 GIT binary patch delta 49 zcmZ3>xRy~xr}+R7DQv&Lmhqa$TIOpWix}EMS2irzpz!{GMlbWVj9$iT6IDVP?@z2U F1^_397Igps delta 49 zcmZ3>xRy~xr}+R7DQv&Jmhp097L*L;wH) delta 78 zcmZ3^xSY{Zr}+R7DQv&Jmhp{W01RJh%1}{0H&20p#T5? delta 66 zcmX@ic$jg5gv{-=j8{C?GGFmn#LyPHa{U4(h4=q6dYP|e^fF$VXi_45Tc_!O4?}=( Qgnn>{W01RJh%1}{0HfU*kpKVy diff --git a/res/DEMO/TB b/res/DEMO/TB index d5d6866b829591b912c966a6cada6c6c08977c19..f746858c8206c58dd7fbad66768e6da256eb5501 100755 GIT binary patch delta 54 zcmZ3&xP)lQzAOZk(5*6G4 delta 54 zcmZ3&xP)lQzAOZk%8Wqd{ diff --git a/res/DEMO/TUNNEL.TERROR b/res/DEMO/TUNNEL.TERROR index 5f66144c6498f3c1e4b2beb32730c022ef1d328e..d9e9186ac7704a787c79c50c0156be14a6d9180e 100755 GIT binary patch delta 49 zcmcb}c#%;>r}+R7DQv&Lmhqa$TIOpWix}EMS8iUgSKr}+R7DQv&Jmhp^0A|7oMgRZ+ delta 22 ccmX@Yc!ZHtr}+R7DQv$zk<*{?_Qc3+0A`K}J^%m! diff --git a/res/DEMO/WAVY.NAVY b/res/DEMO/WAVY.NAVY index 25449f7e47a76af3147a456dca5b426e4d0e6eb5..c77b6f4e0a1b3ab3caf6d033e5fe8da49f0e2930 100644 GIT binary patch delta 51 zcmd1G($Hx>07MGg@2})&4O`22&0{U|HIGFMZJ{gu7BDNk|DVyzd@ZAw@!CWUdB*z_ GJ(K`SlNKoe delta 51 zcmd1G($Hx>07MGgZ?EKN4O`22#bYh=6^}&>ZJ{gu7BDNk|DVyzd?llo@ybLEdB)ol GJ(K`RI~ExL diff --git a/src/constants.a b/src/constants.a index d2e9a03cb..e3d4ef200 100644 --- a/src/constants.a +++ b/src/constants.a @@ -11,7 +11,7 @@ ; ...unused... ; E000..E3FF - HGR font data ; ...unused... -; E8F2..FFEE - main program code +; E8CA..FFEE - main program code ; FFEF..FFF9 - API functions and global constants available for main program ; code, prelaunchers, transition effects, &c. ; (LoadFileDirect, Wait/UnwaitForVBL, MockingboardStuff, MachineStatus) @@ -20,9 +20,9 @@ ; LC RAM BANK 2 ; D000..D5FF - ProRWTS data ; D600..D8B4 - ProRWTS code -; D8C5..DC86 - ProRWTS glue code -; DC87..DC8C - backup of stack (during gameplay and self-running demos) -; DC8D..DC92 - okvs cache (attract state saved across self-running demo) +; D8C5..DC94 - ProRWTS glue code +; DC95..DC9A - backup of stack (during gameplay and self-running demos) +; DC9B..DCA0 - okvs cache (attract state saved across self-running demo) ; ...unused... ; DFB4..DFFF - (de)acceleration function ; @@ -202,7 +202,7 @@ iCurBlockLo = $D601 ; constant iCurBlockHi = $D603 ; constant launchpatch = $D853 ; glue.launch.a iAddToPath = $FEA5 ; Roger Rabbit, avoid, use Infiltrator 2 style instead -itraverse = $DB31 ; Roger Rabbit, avoid, use Infiltrator 2 style instead +itraverse = $DB3F ; Roger Rabbit, avoid, use Infiltrator 2 style instead ldrlo = $55 ; constant ldrhi = $56 ; constant namlo = $57 ; constant diff --git a/src/prodos.impl.lc2.a b/src/prodos.impl.lc2.a index d87f85bed..cc4aa5a5e 100644 --- a/src/prodos.impl.lc2.a +++ b/src/prodos.impl.lc2.a @@ -218,6 +218,15 @@ ProDOS_enter resetval=$f0 @imp_seek jsr @set_rdwrbuff + lda sizelo + ora ldrlo + ora ldrhi + bne @not_zero + sta treeidx + sta blkidx + beq @link_jmpzp + +@not_zero lda sizelo lsr pha