modflash/addrom.bat: optimized process of adding new ROM (automated slot number calculation)

This commit is contained in:
Ivan Tatarinov 2021-04-06 16:39:29 +03:00
parent c9ceca8cfe
commit 8f4eb28ff2
1 changed files with 45 additions and 55 deletions

View File

@ -1,55 +1,45 @@
GenRom xdnlh17 "ZX Spectrum 48K" roms\48.rom 48.tap
GenRom xtdnh1 "ZX Spectrum 128K EN" roms\128en.rom 128en.tap
GenRom xt "ZX Spectrum +2A EN" roms\plus3en41.rom plus3en41.tap
GenRom xdlh "48K Cargando Leches" roms\leches.rom leches.tap
GenRom xdnlh17 "Inves Spectrum+" roms\inves.rom inves.tap
GenRom xdnlh17 "Microdigital TK95" roms\tk95.rom tk95.tap
GenRom xdnlh17 "Looking Glass 1.07" roms\lg18v07.rom lg18v07.tap
GenRom xdnmlh17 "Timex Computer 2048" roms\tc2048.rom tc2048.tap
GenRom xmh1 "Timex Computer 2068" roms\tc2068.rom tc2068.tap
GenRom xpch1 "Pentagon 128" roms\pentagon.rom pentagon.tap
GenRom xdlh17 "Pokemon" roms\pokemon.rom pokemon.tap
GenRom xdnlh17 "Gosh Wonderful v1.33" roms\gw03v33.rom gw03v33.tap
GenRom xdh1 "SE Basic IV 4.0 Anya" roms\se.rom se.tap
GenRom xtdnh1 "Derby+" roms\derbyp.rom derbyp.tap
GenRom xt "DivMMC +3e ES 1.43" roms\plus3es143.rom plus3es143.tap
GenRom xt "Next +3e 1.53" roms\next.rom next.tap
GenRom xth1ru "BBC Micro" roms\BBCBasic.rom BBCBasic.tap
GenRom xth1ru "Jupiter Ace" roms\jupace.rom jupace.tap
GenRom xth1ru "ZX81" roms\zx81.rom zx81.tap
GenRom xlh17ru "Manic Miner (1983)" roms\ManicMiner.rom ManicMiner.tap
GenRom xlh17ru "Jet Set Willy (1984)" roms\JetSetWilly.rom JetSetWilly.tap
GenRom xlh17ru "Jet Pac (1983)" roms\JetPac.rom JetPac.tap
GenRom xlh17ru "Cookie (1983)" roms\Cookie.rom Cookie.tap
GenRom xlh17ru "Tranz Am (1983)" roms\TranzAm.rom TranzAm.tap
GenRom xlh17ru "Planetoids (1983)" roms\Planetoids.rom Planetoids.tap
GenRom xlh17ru "Space Raiders (1983)" roms\SpaceRaiders.rom SpaceRaiders.tap
GenRom xlh17ru "Misco Jones (2013)" roms\MiscoJones.rom Mis­coJones.tap
AddItem ROM 0 48.tap
AddItem ROM 1 128en.tap
AddItem ROM 3 plus3en41.tap
AddItem ROM 7 leches.tap
AddItem ROM 8 inves.tap
AddItem ROM 9 tk95.tap
AddItem ROM 10 lg18v07.tap
AddItem ROM 11 tc2048.tap
AddItem ROM 12 tc2068.tap
AddItem ROM 14 pentagon.tap
AddItem ROM 16 pokemon.tap
AddItem ROM 17 gw03v33.tap
AddItem ROM 18 se.tap
AddItem ROM 20 derbyp.tap
AddItem ROM 22 plus3es143.tap
AddItem ROM 26 next.tap
AddItem ROM 30 BBCBasic.tap
AddItem ROM 32 jupace.tap
AddItem ROM 34 zx81.tap
AddItem ROM 36 ManicMiner.tap
AddItem ROM 37 JetSetWilly.tap
AddItem ROM 38 JetPac.tap
AddItem ROM 39 Cookie.tap
AddItem ROM 40 TranzAm.tap
AddItem ROM 41 Planetoids.tap
AddItem ROM 42 SpaceRaiders.tap
AddItem ROM 43 Mis­coJones.tap
del *.tap
@echo off
set /a i=0
call :AddROM xdnlh17 "ZX Spectrum 48K" roms\48.rom
call :AddROM xtdnh1 "ZX Spectrum 128K EN" roms\128en.rom
call :AddROM xt "ZX Spectrum +2A EN" roms\plus3en41.rom
call :AddROM xdlh "48K Cargando Leches" roms\leches.rom
call :AddROM xdnlh17 "Inves Spectrum+" roms\inves.rom
call :AddROM xdnlh17 "Microdigital TK95" roms\tk95.rom
call :AddROM xdnlh17 "Looking Glass 1.07" roms\lg18v07.rom
call :AddROM xdnmlh17 "Timex Computer 2048" roms\tc2048.rom
call :AddROM xmh1 "Timex Computer 2068" roms\tc2068.rom
call :AddROM xpch1 "Pentagon 128" roms\pentagon.rom
call :AddROM xdlh17 "Pokemon" roms\pokemon48.rom
call :AddROM xdnlh17 "Gosh Wonderful v1.33" roms\gw03v33.rom
call :AddROM xdh1 "SE Basic IV 4.0 Anya" roms\se.rom
call :AddROM xtdnh1 "Derby+" roms\derbyp.rom
call :AddROM xt "DivMMC +3e ES 1.43" roms\plus3es143.rom
call :AddROM xt "Next +3e 1.53" roms\next.rom
call :AddROM xth1ru "BBC Micro" roms\BBCBasic.rom
call :AddROM xth1ru "Jupiter Ace" roms\jupace.rom
call :AddROM xth1ru "ZX81" roms\zx81.rom
call :AddROM xlh17ru "Manic Miner (1983)" roms\ManicMiner.rom
call :AddROM xlh17ru "Jet Set Willy (1984)" roms\JetSetWilly.rom
call :AddROM xlh17ru "Jet Pac (1983)" roms\JetPac.rom
call :AddROM xlh17ru "Cookie (1983)" roms\Cookie.rom
call :AddROM xlh17ru "Tranz Am (1983)" roms\TranzAm.rom
call :AddROM xlh17ru "Planetoids (1983)" roms\Planetoids.rom
call :AddROM xlh17ru "Space Raiders (1983)" roms\SpaceRaiders.rom
call :AddROM xlh17ru "Misco Jones (2013)" roms\MiscoJones.rom
exit /b
:AddROM
set /a i1=i+(%~z3)/16384-1
echo Adding ROM in slots %i%-%i1%: %2 (%3)...
GenRom %1 %2 %3 %~n3.tap
if not %ERRORLEVEL% == 0 goto Error
AddItem ROM %i% %~n3.tap
if not %ERRORLEVEL% == 0 goto Error
del %~n3.tap
set /a i=i1+1
exit /b
:Error
echo ERROR: Exit status %ERRORLEVEL%. Stopped.
exit %ERRORLEVEL% /b