sync and fix some crashes

This commit is contained in:
Peter Ferrie 2021-10-20 12:02:42 -07:00
parent b901071177
commit 82ff37cdae
8 changed files with 397 additions and 88 deletions

View File

@ -38,7 +38,7 @@ a.createtextfile("build\\games.lst").write(entries.toString().replace(/,/g, "\n"
pre_off = a.getfile(WScript.Arguments(0) + "\\STANDARD").size
osize = pre_off
groups = "*=0\n" + "!le16 " + entries.length.toString() + ", 0\n"
groups = "*=0\n" + "!le16 " + entries.length + ", 0\n"
for (i = 0; i < entries.length; i++)
{
@ -52,7 +52,14 @@ for (i = 0; i < entries.length; i++)
pre_off += size
}
groups += "!byte " + (1 + 1 + entries[i].length + 5).toString() + "\n" + "!byte " + entries[i].length.toString() + "\n" + "!text \"" + entries[i] + "\"\n" + "!be24 " + c + "\n" + "!le16 " + size + "\n"
if (WScript.Arguments.length == 4)
{
// if offset+size does not cross a block boundary, use the size
// otherwise adjust size until it ends at the next block boundary to avoid a partial copy on the last block
size = ((Math.floor(c / 512) == Math.floor((c + size) / 512)) ? size : (((c + size + 511) & -512) - c))
}
groups += "!byte " + (1 + 1 + entries[i].length + 5) + "\n" + "!byte " + entries[i].length + "\n" + "!text \"" + entries[i] + "\"\n" + "!be24 " + c + "\n" + "!le16 " + size + "\n"
}
f = a.createtextfile("build\\pre.tmp")

View File

@ -1,25 +1,48 @@
a = new ActiveXObject("scripting.filesystemobject")
entries = []
p = WScript.Arguments(0)
for (b = new Enumerator(a.GetFolder(WScript.Arguments(0)).files); !b.atEnd(); b.moveNext())
if (p.charAt(p.length - 1) == "*")
{
entries.push(b.item().name)
b = a.opentextfile(p.substr(0, p.length - 1))
while (!b.atendofstream)
{
c = b.readline()
entries.push(c.substr(c.lastIndexOf("\\") + 1))
}
p = c.substr(0, c.lastIndexOf("\\"))
}
else
{
for (b = new Enumerator(a.GetFolder(p).files); !b.atEnd(); b.moveNext())
{
entries.push(b.item().name)
}
}
entries.sort()
a.createtextfile("build\\games.lst").write(entries.toString().replace(/,/g, "\n"))
ss_off = 0
groups = "*=0\n" + "!le16 " + entries.length.toString() + ", 0\n"
ss_off = a.fileexists(WScript.Arguments(2)) ? a.getFile(WScript.Arguments(2)).size : 0
groups = "*=0\n" + "!le16 " + entries.length + ", 0\n"
for (i = 0; i < entries.length; i++)
{
groups += "!byte " + (1 + 1 + entries[i].length + 5).toString() + "\n" + "!byte " + entries[i].length.toString() + "\n" + "!text \"" + entries[i] + "\"\n" + "!be24 " + ss_off.toString() + "\n"
size = a.getfile(WScript.Arguments(0) + "\\" + entries[i]).size
// if offset+size does not cross a block boundary, use the size
// otherwise adjust size until it ends at the next block boundary to avoid a partial copy on the last block
groups += "!le16 " + ((Math.floor(ss_off / 512) == Math.floor((ss_off + size) / 512)) ? size : (((ss_off + size + 511) & -512) - ss_off)).toString() + "\n"
size = a.getfile(p + "\\" + entries[i]).size
c = ss_off
ss_off += size
if (WScript.Arguments.length == 5)
{
// if offset+size does not cross a block boundary, use the size
// otherwise adjust size until it ends at the next block boundary to avoid a partial copy on the last block
size = ((Math.floor(c / 512) == Math.floor((c + size) / 512)) ? size : (((c + size + 511) & -512) - c))
}
groups += "!byte " + (1 + 1 + entries[i].length + 5) + "\n" + "!byte " + entries[i].length + "\n" + "!text \"" + entries[i] + "\"\n" + "!be24 " + c + "\n" + "!le16 " + size + "\n"
}
f = a.createtextfile("build\\ss.tmp")
@ -27,4 +50,4 @@ f.write(groups)
f.close()
x = new ActiveXObject("wscript.shell")
x.run('cmd /c %acme% -o ' + WScript.Arguments(1) + ' build\\ss.tmp', 0, 1)
x.run('cmd /c bin\\buildpreall.bat ' + WScript.Arguments(0) + ' ' + WScript.Arguments(2) + ' ' + WScript.Arguments(3), 0, 1)
x.run('cmd /c bin\\buildpreall.bat ' + p + ' ' + WScript.Arguments(2) + ' ' + WScript.Arguments(3), 0, 1)

View File

@ -0,0 +1,267 @@
# This file is automatically generated
A.E=Type(06),AuxType(1FF8),Access(C3)
AA=Type(06),AuxType(1FF8),Access(C3)
AB=Type(06),AuxType(1FF8),Access(C3)
AGENT.U.S.A=Type(06),AuxType(1FF8),Access(C3)
AIRHEART=Type(06),AuxType(1FF8),Access(C3)
ALCAZAR=Type(06),AuxType(1FF8),Access(C3)
ALIEN.AMBUSH=Type(06),AuxType(1FF8),Access(C3)
ALIEN.MUNCHIES=Type(06),AuxType(1FF8),Access(C3)
ALIEN.TYPHOON=Type(06),AuxType(1FF8),Access(C3)
ALIENS=Type(06),AuxType(1FF8),Access(C3)
ANKH=Type(06),AuxType(1FF8),Access(C3)
APE.ESCAPE=Type(06),AuxType(1FF8),Access(C3)
APPLE.PANIC=Type(06),AuxType(1FF8),Access(C3)
AQUATRON=Type(06),AuxType(1FF8),Access(C3)
ARCHON=Type(06),AuxType(1FF8),Access(C3)
ARCHON.II=Type(06),AuxType(1FF8),Access(C3)
ARCTIC.FOX=Type(06),AuxType(1FF8),Access(C3)
ARGOS=Type(06),AuxType(1FF8),Access(C3)
ARKANOID=Type(06),AuxType(1FF8),Access(C3)
AXIS.ASSASSIN=Type(06),AuxType(1FF8),Access(C3)
AZTEC=Type(06),AuxType(1FF8),Access(C3)
B1=Type(06),AuxType(1FF8),Access(C3)
B2=Type(06),AuxType(1FF8),Access(C3)
BAD.DUDES=Type(06),AuxType(1FF8),Access(C3)
BALLBLAZER=Type(06),AuxType(1FF8),Access(C3)
BANDITS=Type(06),AuxType(1FF8),Access(C3)
BATMAN=Type(06),AuxType(1FF8),Access(C3)
BATTLEZONE=Type(06),AuxType(1FF8),Access(C3)
BB=Type(06),AuxType(1FF8),Access(C3)
BEER.RUN=Type(06),AuxType(1FF8),Access(C3)
BK=Type(06),AuxType(1FF8),Access(C3)
BLACK.MAGIC=Type(06),AuxType(1FF8),Access(C3)
BOLO=Type(06),AuxType(1FF8),Access(C3)
BORG=Type(06),AuxType(1FF8),Access(C3)
BOULDER.DASH=Type(06),AuxType(1FF8),Access(C3)
BOULDER.DASH.II=Type(06),AuxType(1FF8),Access(C3)
BQ=Type(06),AuxType(1FF8),Access(C3)
BR=Type(06),AuxType(1FF8),Access(C3)
BRUCE.LEE=Type(06),AuxType(1FF8),Access(C3)
BT=Type(06),AuxType(1FF8),Access(C3)
BUBBLE.BOBBLE=Type(06),AuxType(1FF8),Access(C3)
BUG.ATTACK=Type(06),AuxType(1FF8),Access(C3)
BUG.BATTLE=Type(06),AuxType(1FF8),Access(C3)
BW=Type(06),AuxType(1FF8),Access(C3)
CANYON.CLIMBER=Type(06),AuxType(1FF8),Access(C3)
CAPTAIN.POWER=Type(06),AuxType(1FF8),Access(C3)
CB=Type(06),AuxType(1FF8),Access(C3)
CC=Type(06),AuxType(1FF8),Access(C3)
CF=Type(06),AuxType(1FF8),Access(C3)
CG=Type(06),AuxType(1FF8),Access(C3)
CHIVALRY=Type(06),AuxType(1FF8),Access(C3)
CHOPLIFTER=Type(06),AuxType(1FF8),Access(C3)
CL=Type(06),AuxType(1FF8),Access(C3)
COMMANDO=Type(06),AuxType(1FF8),Access(C3)
CONAN=Type(06),AuxType(1FF8),Access(C3)
CONGO=Type(06),AuxType(1FF8),Access(C3)
CONGO.BONGO=Type(06),AuxType(1FF8),Access(C3)
COUNTY.FAIR=Type(06),AuxType(1FF8),Access(C3)
CR=Type(06),AuxType(1FF8),Access(C3)
CRAZY.MAZEY=Type(06),AuxType(1FF8),Access(C3)
CRISIS.MOUNTAIN=Type(06),AuxType(1FF8),Access(C3)
CROSSFIRE=Type(06),AuxType(1FF8),Access(C3)
CRYSTAL.CASTLES=Type(06),AuxType(1FF8),Access(C3)
CW=Type(06),AuxType(1FF8),Access(C3)
CYBER.STRIKE=Type(06),AuxType(1FF8),Access(C3)
CYCLOD=Type(06),AuxType(1FF8),Access(C3)
DEATH.SWORD=Type(06),AuxType(1FF8),Access(C3)
DEEP.SPACE=Type(06),AuxType(1FF8),Access(C3)
DG=Type(06),AuxType(1FF8),Access(C3)
DIG.DUG=Type(06),AuxType(1FF8),Access(C3)
DINO.EGGS=Type(06),AuxType(1FF8),Access(C3)
DIVE.BOMBER=Type(06),AuxType(1FF8),Access(C3)
DM=Type(06),AuxType(1FF8),Access(C3)
DOGFIGHT.II=Type(06),AuxType(1FF8),Access(C3)
DRELBS=Type(06),AuxType(1FF8),Access(C3)
DROL=Type(06),AuxType(1FF8),Access(C3)
DUNG.BEETLES=Type(06),AuxType(1FF8),Access(C3)
EI=Type(06),AuxType(1FF8),Access(C3)
EPOCH=Type(06),AuxType(1FF8),Access(C3)
EVOLUTION=Type(06),AuxType(1FF8),Access(C3)
EXTERMINATOR=Type(06),AuxType(1FF8),Access(C3)
FALCONS=Type(06),AuxType(1FF8),Access(C3)
FIREBIRD=Type(06),AuxType(1FF8),Access(C3)
FIREBUG=Type(06),AuxType(1FF8),Access(C3)
FLIP.OUT=Type(06),AuxType(1FF8),Access(C3)
FLY.WARS=Type(06),AuxType(1FF8),Access(C3)
FORCE.7=Type(06),AuxType(1FF8),Access(C3)
FREE.FALL=Type(06),AuxType(1FF8),Access(C3)
FROGGER=Type(06),AuxType(1FF8),Access(C3)
FROGGER.II=Type(06),AuxType(1FF8),Access(C3)
FS2=Type(06),AuxType(1FF8),Access(C3)
G.I.JOE=Type(06),AuxType(1FF8),Access(C3)
GALACTIC.ATTACK=Type(06),AuxType(1FF8),Access(C3)
GALAXIAN=Type(06),AuxType(1FF8),Access(C3)
GAMMA.GOBLINS=Type(06),AuxType(1FF8),Access(C3)
GAUNTLET=Type(06),AuxType(1FF8),Access(C3)
GENETIC.DRIFT=Type(06),AuxType(1FF8),Access(C3)
GHOSTBUSTERS=Type(06),AuxType(1FF8),Access(C3)
GOLD.RUSH=Type(06),AuxType(1FF8),Access(C3)
GORGON=Type(06),AuxType(1FF8),Access(C3)
GREMLINS=Type(06),AuxType(1FF8),Access(C3)
GUARDIAN=Type(06),AuxType(1FF8),Access(C3)
GUMBALL=Type(06),AuxType(1FF8),Access(C3)
H.E.R.O=Type(06),AuxType(1FF8),Access(C3)
HANDY.DANDY=Type(06),AuxType(1FF8),Access(C3)
HARD.HAT.MACK=Type(06),AuxType(1FF8),Access(C3)
HEAVY.BARREL=Type(06),AuxType(1FF8),Access(C3)
HORIZON.V=Type(06),AuxType(1FF8),Access(C3)
HUNGRYBOY=Type(06),AuxType(1FF8),Access(C3)
I1=Type(06),AuxType(1FF8),Access(C3)
I2=Type(06),AuxType(1FF8),Access(C3)
IE=Type(06),AuxType(1FF8),Access(C3)
IKARI.WARRIORS=Type(06),AuxType(1FF8),Access(C3)
INDIANA.JONES=Type(06),AuxType(1FF8),Access(C3)
INFILTRATOR=Type(06),AuxType(1FF8),Access(C3)
IO=Type(06),AuxType(1FF8),Access(C3)
JAWBREAKER=Type(06),AuxType(1FF8),Access(C3)
JAWBREAKER.II=Type(06),AuxType(1FF8),Access(C3)
JELLYFISH=Type(06),AuxType(1FF8),Access(C3)
JUMPMAN=Type(06),AuxType(1FF8),Access(C3)
KARATEKA=Type(06),AuxType(1FF8),Access(C3)
KID.NIKI=Type(06),AuxType(1FF8),Access(C3)
KUNG.FU.MASTER=Type(06),AuxType(1FF8),Access(C3)
LABYRINTH=Type(06),AuxType(1FF8),Access(C3)
LADY.TUT=Type(06),AuxType(1FF8),Access(C3)
LANCASTER=Type(06),AuxType(1FF8),Access(C3)
LAZER.SILK=Type(06),AuxType(1FF8),Access(C3)
LC=Type(06),AuxType(1FF8),Access(C3)
LEMMINGS=Type(06),AuxType(1FF8),Access(C3)
LG=Type(06),AuxType(1FF8),Access(C3)
LODE.RUNNER=Type(06),AuxType(1FF8),Access(C3)
LOST.TOMB=Type(06),AuxType(1FF8),Access(C3)
LP=Type(06),AuxType(1FF8),Access(C3)
LUNAR.LEEPERS=Type(06),AuxType(1FF8),Access(C3)
MARAUDER=Type(06),AuxType(1FF8),Access(C3)
MARBLE.MADNESS=Type(06),AuxType(1FF8),Access(C3)
MARS.CARS=Type(06),AuxType(1FF8),Access(C3)
MATING.ZONE=Type(06),AuxType(1FF8),Access(C3)
MAXWELL.MANOR=Type(06),AuxType(1FF8),Access(C3)
MB=Type(06),AuxType(1FF8),Access(C3)
MC=Type(06),AuxType(1FF8),Access(C3)
MEGABOTS=Type(06),AuxType(1FF8),Access(C3)
MICROWAVE=Type(06),AuxType(1FF8),Access(C3)
MINER.2049ER=Type(06),AuxType(1FF8),Access(C3)
MINIT.MAN=Type(06),AuxType(1FF8),Access(C3)
MINOTAUR=Type(06),AuxType(1FF8),Access(C3)
MM=Type(06),AuxType(1FF8),Access(C3)
MONSTER.MASH=Type(06),AuxType(1FF8),Access(C3)
MOUSKATTACK=Type(06),AuxType(1FF8),Access(C3)
MP=Type(06),AuxType(1FF8),Access(C3)
MR=Type(06),AuxType(1FF8),Access(C3)
MS=Type(06),AuxType(1FF8),Access(C3)
MT=Type(06),AuxType(1FF8),Access(C3)
N.O.R.A.D=Type(06),AuxType(1FF8),Access(C3)
NEPTUNE=Type(06),AuxType(1FF8),Access(C3)
NI=Type(06),AuxType(1FF8),Access(C3)
NM=Type(06),AuxType(1FF8),Access(C3)
OM=Type(06),AuxType(1FF8),Access(C3)
ORBITRON=Type(06),AuxType(1FF8),Access(C3)
OUTPOST=Type(06),AuxType(1FF8),Access(C3)
PACMAN=Type(06),AuxType(1FF8),Access(C3)
PAPERBOY=Type(06),AuxType(1FF8),Access(C3)
PB=Type(06),AuxType(1FF8),Access(C3)
PEEPING.TOM=Type(06),AuxType(1FF8),Access(C3)
PEGASUS.II=Type(06),AuxType(1FF8),Access(C3)
PENGO=Type(06),AuxType(1FF8),Access(C3)
PEST.PATROL=Type(06),AuxType(1FF8),Access(C3)
PHANTOMS.FIVE=Type(06),AuxType(1FF8),Access(C3)
PHASER.FIRE=Type(06),AuxType(1FF8),Access(C3)
PHOTAR=Type(06),AuxType(1FF8),Access(C3)
PIG.PEN=Type(06),AuxType(1FF8),Access(C3)
PIPE.DREAM=Type(06),AuxType(1FF8),Access(C3)
PITFALL.II=Type(06),AuxType(1FF8),Access(C3)
PITSTOP.II=Type(06),AuxType(1FF8),Access(C3)
PLATOON=Type(06),AuxType(1FF8),Access(C3)
PM=Type(06),AuxType(1FF8),Access(C3)
POOYAN=Type(06),AuxType(1FF8),Access(C3)
POP.END=Type(06),AuxType(1FF8),Access(C3)
PP=Type(06),AuxType(1FF8),Access(C3)
PR=Type(06),AuxType(1FF8),Access(C3)
PULSAR.II=Type(06),AuxType(1FF8),Access(C3)
QIX=Type(06),AuxType(1FF8),Access(C3)
QUADRANT.6112=Type(06),AuxType(1FF8),Access(C3)
RADWARRIOR=Type(06),AuxType(1FF8),Access(C3)
RAMPAGE=Type(06),AuxType(1FF8),Access(C3)
RASTER.BLASTER=Type(06),AuxType(1FF8),Access(C3)
REAR.GUARD=Type(06),AuxType(1FF8),Access(C3)
RED.ALERT=Type(06),AuxType(1FF8),Access(C3)
RENEGADE=Type(06),AuxType(1FF8),Access(C3)
REPTON=Type(06),AuxType(1FF8),Access(C3)
RESCUE.RAIDERS=Type(06),AuxType(1FF8),Access(C3)
RI=Type(06),AuxType(1FF8),Access(C3)
RM=Type(06),AuxType(1FF8),Access(C3)
ROBOCOP=Type(06),AuxType(1FF8),Access(C3)
ROBOTRON.2084=Type(06),AuxType(1FF8),Access(C3)
ROUND.ABOUT=Type(06),AuxType(1FF8),Access(C3)
RR=Type(06),AuxType(1FF8),Access(C3)
RUSSKI.DUCK=Type(06),AuxType(1FF8),Access(C3)
S2=Type(06),AuxType(1FF8),Access(C3)
SABOTAGE=Type(06),AuxType(1FF8),Access(C3)
SAMMY.LIGHTFOOT=Type(06),AuxType(1FF8),Access(C3)
SARACEN=Type(06),AuxType(1FF8),Access(C3)
SD=Type(06),AuxType(1FF8),Access(C3)
SEA.DRAGON=Type(06),AuxType(1FF8),Access(C3)
SEAFOX=Type(06),AuxType(1FF8),Access(C3)
SERPENTINE=Type(06),AuxType(1FF8),Access(C3)
SHORT.CIRCUIT=Type(06),AuxType(1FF8),Access(C3)
SKYFOX=Type(06),AuxType(1FF8),Access(C3)
SNACK.ATTACK=Type(06),AuxType(1FF8),Access(C3)
SNAKE.BYTE=Type(06),AuxType(1FF8),Access(C3)
SNEAKERS=Type(06),AuxType(1FF8),Access(C3)
SNOGGLE=Type(06),AuxType(1FF8),Access(C3)
SO=Type(06),AuxType(1FF8),Access(C3)
SOLO.FLIGHT=Type(06),AuxType(1FF8),Access(C3)
SPACE.EGGS=Type(06),AuxType(1FF8),Access(C3)
SPACE.RAIDERS=Type(06),AuxType(1FF8),Access(C3)
SPARE.CHANGE=Type(06),AuxType(1FF8),Access(C3)
SPIDERBOT=Type(06),AuxType(1FF8),Access(C3)
SPINDIZZY=Type(06),AuxType(1FF8),Access(C3)
SS=Type(06),AuxType(1FF8),Access(C3)
SS2=Type(06),AuxType(1FF8),Access(C3)
SS3=Type(06),AuxType(1FF8),Access(C3)
STAR.BLAZER=Type(06),AuxType(1FF8),Access(C3)
STAR.CRUISER=Type(06),AuxType(1FF8),Access(C3)
STAR.THIEF=Type(06),AuxType(1FF8),Access(C3)
STARBLASTER=Type(06),AuxType(1FF8),Access(C3)
STARGLIDER=Type(06),AuxType(1FF8),Access(C3)
STATION.5=Type(06),AuxType(1FF8),Access(C3)
STELLAR.7=Type(06),AuxType(1FF8),Access(C3)
SUPER.BUNNY=Type(06),AuxType(1FF8),Access(C3)
SUPER.HUEY=Type(06),AuxType(1FF8),Access(C3)
SUPER.ZAXXON=Type(06),AuxType(1FF8),Access(C3)
SWASHBUCKLER=Type(06),AuxType(1FF8),Access(C3)
TAPPER=Type(06),AuxType(1FF8),Access(C3)
TB=Type(06),AuxType(1FF8),Access(C3)
TC=Type(06),AuxType(1FF8),Access(C3)
TELEPORT=Type(06),AuxType(1FF8),Access(C3)
TETRIS=Type(06),AuxType(1FF8),Access(C3)
THE.BILESTOAD=Type(06),AuxType(1FF8),Access(C3)
THE.DAM.BUSTERS=Type(06),AuxType(1FF8),Access(C3)
THE.GOONIES=Type(06),AuxType(1FF8),Access(C3)
THE.HEIST=Type(06),AuxType(1FF8),Access(C3)
THE.LAST.NINJA=Type(06),AuxType(1FF8),Access(C3)
THE.SNAPPER=Type(06),AuxType(1FF8),Access(C3)
THE.SPACE.ARK=Type(06),AuxType(1FF8),Access(C3)
THEXDER=Type(06),AuxType(1FF8),Access(C3)
THIEF=Type(06),AuxType(1FF8),Access(C3)
THRESHOLD=Type(06),AuxType(1FF8),Access(C3)
TOMAHAWK=Type(06),AuxType(1FF8),Access(C3)
TRACK.ATTACK=Type(06),AuxType(1FF8),Access(C3)
TRIAD=Type(06),AuxType(1FF8),Access(C3)
TWERPS=Type(06),AuxType(1FF8),Access(C3)
UD=Type(06),AuxType(1FF8),Access(C3)
VICTORY.ROAD=Type(06),AuxType(1FF8),Access(C3)
VINDICATOR=Type(06),AuxType(1FF8),Access(C3)
WARP.DESTROYER=Type(06),AuxType(1FF8),Access(C3)
WAVY.NAVY=Type(06),AuxType(1FF8),Access(C3)
WAYOUT=Type(06),AuxType(1FF8),Access(C3)
WF=Type(06),AuxType(1FF8),Access(C3)
WILLY.BYTE=Type(06),AuxType(1FF8),Access(C3)
XEVIOUS=Type(06),AuxType(1FF8),Access(C3)
ZARGS=Type(06),AuxType(1FF8),Access(C3)
ZAXXON=Type(06),AuxType(1FF8),Access(C3)
ZENITH=Type(06),AuxType(1FF8),Access(C3)
_FileInformation.txt=Type(06),AuxType(1FF8),Access(C3)

View File

@ -7,7 +7,7 @@
;
; LC RAM BANK 1
; D000..E789 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; E963..FFEE - main program code
; E8E4..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)
@ -15,9 +15,9 @@
;
; LC RAM BANK 2
; D000..D3FF - ProRWTS data
; D400..D6B6 - ProRWTS code
; D6B7..DBA1 - HGR font code & ProRWTS glue code
; DBA2..DBB1 - backup of stack (during gameplay and self-running demos)
; D400..D6B8 - ProRWTS code
; D6B9..DB86 - HGR font code & ProRWTS glue code
; DB87..DB96 - backup of stack (during gameplay and self-running demos)
; ...unused...
; DBB4..DBFF - (de)acceleration function
; DC00..DFFF - HGR font data
@ -148,9 +148,10 @@ CHEATS_ENABLED = %00001000
; shared symbols for prelaunch and effects to call ProRWTS2 functions
iCurBlockLo = $D401 ; constant
iCurBlockHi = $D403 ; constant
launchpatch = $D655 ; glue.launch.a
launchpatch = $D657 ; glue.launch.a
iAddToPath = $FE5C ; Roger Rabbit, avoid, use Infiltrator 2 style instead
itraverse = $D94C ; Roger Rabbit, avoid, use Infiltrator 2 style instead
itraverse = $D94E ; Roger Rabbit, avoid, use Infiltrator 2 style instead
ldrlo = $55 ; constant
ldrhi = $56 ; constant
namlo = $57 ; constant
namhi = $58 ; constant

View File

@ -397,6 +397,7 @@
lda iCurBlockHi
pha
ldx #0 ; read to main memory
stx ldrlo
+LDADDR .filepath
jsr iLoadFileDirect
pla

View File

@ -232,8 +232,8 @@ resetval=$f0
cmp ldrhi
bcc @seek64
bne @seek32
cmp ldrlo
bcc @seek64
cpx ldrlo
bne @seek64
@seek32
lda ldrhi
@ -429,8 +429,6 @@ gRootDirectory
+LDADDR 0 ; SMC
sta (reloc + unrhddblocklo - unrelochdd) + 1
sty (reloc + unrhddblockhi - unrelochdd) + 1
sta @myreadblock+1
sty @myreadblock+3 ; reset 'root' directory (saved at program start)
;search for '/' character in filename
@ -447,64 +445,26 @@ gRootDirectory
sty sizelo
txa
pha
lda #$B1 ; LDA (), y
sta pathpatch1
lda #$68 ; PLA
sta pathpatch2
lda #$60 ; RTS
sta pathpatch2 + 1
@myreadblock
@myx80_parms
ldx #2
lda #0
jsr hddreaddirsel
lda #NAME_LENGTH
sta bloklo
lda #>(hdddirbuf - 1)
sta blokhi
;there can be only one page crossed, so we can increment here
@mynextent1
inc blokhi
@mynextent
ldy #0
lda (bloklo), y
pha
and #$0f
tax
-- iny
lda (bloklo), y
cmp (namlo), y
beq @myfoundname
;match failed, move to next directory in this block, if possible
- pla
@myskiphdr
clc
lda bloklo
adc #ENTRY_SIZE
sta bloklo
bcs @mynextent1
cmp #$ff ;4 + ($27 * $0d)
bne @mynextent
;read next directory block when we reach the end of this block
lda hdddirbuf + NEXT_BLOCK_LO
ldx hdddirbuf + NEXT_BLOCK_HI
bcs +
@myfoundname
dex
bne --
jsr hddopendir
- tax
;parse path until last directory is seen
iny
lda (namlo), y
cmp #'/'
bne -
pla
and #$20 ;Volume Directory Header XOR subdirectory
bne @myskiphdr
beq +
-- jsr pathresume
bne - ; always taken
+ txa
bmi --
tya
eor #$ff
adc sizelo
@ -513,23 +473,31 @@ gRootDirectory
tya
adc namlo
sta namlo
bcc +
inc namhi
+
;cache block number of current directory
;as starting position for subsequent searches
ldy #(KEY_POINTER + 1)
lda (bloklo), y
lda (scratchlo), y
tax
dey
lda (bloklo), y
lda (scratchlo), y
sta (reloc + unrhddblocklo - unrelochdd) + 1
stx (reloc + unrhddblockhi - unrelochdd) + 1
+ sta @myx80_parms + 1
stx @myx80_parms + 3
++ lda sizelo
lda sizelo
bne @myreadblock
tay
lda #$D1 ; CMP (), y
sta pathpatch1
lda #$86 ; STX
sta pathpatch2
lda #$5A
sta pathpatch2 + 1
pla
sta (namlo), y
@go

View File

@ -2586,6 +2586,12 @@ hddnextent ldy #0
and #$0f
tax
inx
;placeholder instructions for path patching
pathpatch1
cmp (namlo), y
- eor (namlo), y
asl
beq hddfoundname
@ -2612,6 +2618,7 @@ hddnextent ldy #0
;move to next entry in this block, if possible
pathresume
+ clc
lda scratchlo
adc #ENTRY_SIZE
@ -2635,6 +2642,7 @@ hddfoundname iny
dex
bne -
pathpatch2
;initialise essential variables
!if allow_trees = 1 {

View File

@ -70,21 +70,47 @@ rem
rem precompute indexed files for game help, slideshow configuration,
rem mini-attract mode configuration, and prelaunch files
rem
cscript /nologo bin\buildpre.js build\GAMEHELP build\GAMEHELP.IDX build\GAMEHELP.ALL build\GAMEHELP\STANDARD >>build\log
for %%q in (res\SS\*) do cscript /nologo bin\buildokvs.js "%%q" "build\SS\%%~nxq" >>build\log
cscript /nologo bin\buildss.js build\SS build\SLIDESHOW.IDX build\SLIDESHOW.ALL nul >>build\log
for %%q in (res\ATTRACT\*) do cscript /nologo bin\buildokvs.js "%%q" "build\ATTRACT\%%~nxq" >>build\log
cscript /nologo bin\buildss.js build\ATTRACT build\MINIATTRACT.IDX build\MINIATTRACT.ALL nul >>build\log
cscript /nologo bin\buildpre.js build\GAMEHELP build\GAMEHELP.IDX build\GAMEHELP.ALL build\GAMEHELP\STANDARD pad >>build\log
for %%q in (res\SS\*) do cscript /nologo bin\buildokvs.js %%q build\SS\%%~nxq >>build\log
cscript /nologo bin\buildss.js build\SS build\SLIDESHOW.IDX build\SLIDESHOW.ALL nul pad >>build\log
for %%q in (res\ATTRACT\*) do cscript /nologo bin\buildokvs.js %%q build\ATTRACT\%%~nxq >>build\log
cscript /nologo bin\buildss.js build\ATTRACT build\MINIATTRACT.IDX build\MINIATTRACT.ALL nul pad >>build\log
cscript /nologo bin\buildpre.js build\PRELAUNCH.INDEXED build\PRELAUNCH.IDX build\PRELAUNCH.ALL build\PRELAUNCH.INDEXED\STANDARD >>build\log
rem
rem precompute indexed files for HGR action screenshots
rem
1>nul copy /y nul build\ACTIONHGR0
1>nul copy /y nul build\ACTIONHGR1
1>nul copy /y nul build\ACTIONHGR2
1>nul copy /y nul build\ACTIONHGR3
1>nul copy /y nul build\ACTIONHGR4
1>nul copy /y nul build\ACTIONHGR5
1>nul copy /y nul build\ACTIONHGR6
for %%q in (res\ACTION.HGR\A* res\ACTION.HGR\B* res\ACTION.HGR\C* res\ACTION.HGR\D*) do 1>nul >>build\ACTIONHGR0 echo %%q
for %%q in (res\ACTION.HGR\E* res\ACTION.HGR\F* res\ACTION.HGR\G* res\ACTION.HGR\H*) do 1>nul >>build\ACTIONHGR1 echo %%q
for %%q in (res\ACTION.HGR\I* res\ACTION.HGR\J* res\ACTION.HGR\K* res\ACTION.HGR\L*) do 1>nul >>build\ACTIONHGR2 echo %%q
for %%q in (res\ACTION.HGR\M* res\ACTION.HGR\N* res\ACTION.HGR\O* res\ACTION.HGR\P*) do 1>nul >>build\ACTIONHGR3 echo %%q
for %%q in (res\ACTION.HGR\Q* res\ACTION.HGR\R* res\ACTION.HGR\S* res\ACTION.HGR\T*) do 1>nul >>build\ACTIONHGR4 echo %%q
for %%q in (res\ACTION.HGR\U* res\ACTION.HGR\V* res\ACTION.HGR\W* res\ACTION.HGR\X*) do 1>nul >>build\ACTIONHGR5 echo %%q
for %%q in (res\ACTION.HGR\Y* res\ACTION.HGR\Z*) do 1>nul >>build\ACTIONHGR6 echo %%q
cscript /nologo bin\buildss.js build\ACTIONHGR0* build\HGR0.IDX build\HGR.ALL nul >>build\log
cscript /nologo bin\buildss.js build\ACTIONHGR1* build\HGR1.IDX build\HGR.ALL build\HGR.ALL >>build\log
cscript /nologo bin\buildss.js build\ACTIONHGR2* build\HGR2.IDX build\HGR.ALL build\HGR.ALL >>build\log
cscript /nologo bin\buildss.js build\ACTIONHGR3* build\HGR3.IDX build\HGR.ALL build\HGR.ALL >>build\log
cscript /nologo bin\buildss.js build\ACTIONHGR4* build\HGR4.IDX build\HGR.ALL build\HGR.ALL >>build\log
cscript /nologo bin\buildss.js build\ACTIONHGR5* build\HGR5.IDX build\HGR.ALL build\HGR.ALL >>build\log
cscript /nologo bin\buildss.js build\ACTIONHGR6* build\HGR6.IDX build\HGR.ALL build\HGR.ALL >>build\log
rem
rem precompute indexed files for SHR artwork
rem
cscript /nologo bin\buildss.js res\ARTWORK.SHR build\ARTWORK.IDX build\ARTWORK.ALL nul >>build\log
rem
rem create _FileInformation.txt files for subdirectories
rem
cscript /nologo bin\buildfileinfo.js res\TITLE.HGR "06" "4000" >>build/log
cscript /nologo bin\buildfileinfo.js res\TITLE.DHGR "06" "4000" >>build/log
cscript /nologo bin\buildfileinfo.js res\ACTION.HGR "06" "3FF8" >>build/log
cscript /nologo bin\buildfileinfo.js res\ACTION.DHGR "06" "3FF8" >>build/log
cscript /nologo bin\buildfileinfo.js res\ACTION.GR "06" "6000" >>build/log
cscript /nologo bin\buildfileinfo.js res\ARTWORK.SHR "06" "1FF8" >>build/log
cscript /nologo bin\buildfileinfo.js res\ICONS "CA" "0000" >>build/log
cscript /nologo bin\buildfileinfo.js build\FX "06" "6000" >>build/log
cscript /nologo bin\buildfileinfo.js build\PRELAUNCH "06" "0106" >>build/log
@ -100,8 +126,8 @@ rem
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\HELPTEXT" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\ATTRACT.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\FX.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\FX.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\DFX.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\FX.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\GAMEHELP.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\GAMEHELP.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\SLIDESHOW.IDX" >>build\log
@ -110,16 +136,24 @@ rem
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\MINIATTRACT.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\PRELAUNCH.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\PRELAUNCH.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/ARTWORK.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/ARTWORK.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR0.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR1.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR2.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR3.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR4.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR5.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR6.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build/HGR.ALL" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\DECRUNCH" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\JOYSTICK" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\Finder.Data" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\Finder.Root" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/TITLE.HGR" "res\TITLE.HGR" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/TITLE.DHGR" "res\TITLE.DHGR" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/ACTION.HGR" "res\ACTION.HGR" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/ACTION.DHGR" "res\ACTION.DHGR" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/ACTION.GR" "res\ACTION.GR" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/ARTWORK.SHR" "res\ARTWORK.SHR" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/DEMO" "res\DEMO" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/TITLE.ANIMATED" "res\TITLE.ANIMATED" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/ICONS" "res\ICONS" >>build\log