From c9ceca8cfeb4d0d9eddcf488b244da56b130a372 Mon Sep 17 00:00:00 2001 From: Ivan Tatarinov Date: Tue, 6 Apr 2021 16:36:54 +0300 Subject: [PATCH 1/2] modflash/addcore.bat: optimize the process of adding new core (automate core number calculation) --- modflash/addcore.bat | 150 ++++++++++++++++++------------------------- 1 file changed, 61 insertions(+), 89 deletions(-) diff --git a/modflash/addcore.bat b/modflash/addcore.bat index aa942b4..fe738d2 100644 --- a/modflash/addcore.bat +++ b/modflash/addcore.bat @@ -1,89 +1,61 @@ -GenRom 0 "Apple 2" cores\Apple2.ZX1 Apple2.tap -GenRom 0 "Atari 2600" cores\Atari2600.ZX1 Atari2600.tap -GenRom 0 "Atari 800 XL" cores\Atari800XL.ZX1 Atari800XL.tap -GenRom 0 "Acorn Atom" cores\Atom.ZX1 Atom.tap -GenRom 0 "BBC Micro" cores\BBCMicro.ZX1 BBCMicro.tap -GenRom 0 "C16" cores\C16.ZX1 C16.tap -GenRom 0 "C64" cores\C64.ZX1 C64.tap -GenRom 0 "Test" cores\Test.ZX1 Test.tap -GenRom 0 "ColecoVision" cores\Coleco.ZX1 Coleco.tap -GenRom 0 "CPC464" cores\CPC464.ZX1 CPC464.tap -GenRom 0 "CPC6128" cores\CPC6128.ZX1 CPC6128.tap -GenRom 0 "Acorn Electron" cores\Electron.ZX1 Electron.tap -GenRom 0 "Galaksija" cores\Galaksija.zx1 Galaksija.tap -GenRom 0 "Jupiter Ace" cores\JupAce.ZX1 JupAce.tap -GenRom 0 "Spectrum Kyp" cores\Kyp.ZX1 Kyp.tap -GenRom 0 "MSX" cores\MSX.ZX1 MSX.tap -GenRom 0 "Nintendo NES" cores\NES.ZX1 NES.tap -GenRom 0 "Oric" cores\Oric.ZX1 Oric.tap -GenRom 0 "PC" cores\PC.ZX1 PC.tap -GenRom 0 "PC2M" cores\PC2M.ZX1 PC2M.tap -GenRom 0 "Sam Coupe" cores\SamCoupe.ZX1 SamCoupe.tap -GenRom 0 "Sega Master System" cores\SMS.ZX1 SMS.tap -GenRom 0 "TBBlue" cores\TBBlue.ZX1 TBBlue.tap -GenRom 0 "Vectrex" cores\Vectrex.ZX1 Vectrex.tap -GenRom 0 "VIC-20" cores\VIC20.ZX1 VIC20.tap -GenRom 0 "Arcade Pacman" cores\Arcades\pacman.ZX1 pacman.tap -GenRom 0 "Arcade Galaxian" cores\Arcades\galaxian.ZX1 galaxian.tap -GenRom 0 "Arcade Phoenix" cores\Arcades\phoenix.ZX1 phoenix.tap -GenRom 0 "Arcade The Glob" cores\Arcades\theblob.ZX1 theblob.tap -GenRom 0 "Arcade Scramble" cores\Arcades\scramble.ZX1 scramble.tap -GenRom 0 "Arcade Frogger" cores\Arcades\frogger.ZX1 frogger.tap -GenRom 0 "Arcade Moon Cresta" cores\Arcades\mooncresta.ZX1 mooncresta.tap -GenRom 0 "Arcade Jump Shot" cores\Arcades\jumpshot.ZX1 jumpshot.tap -GenRom 0 "Arcade Amidar" cores\Arcades\amidar.ZX1 amidar.tap -GenRom 0 "Arcade Black Hole" cores\Arcades\blackhole.ZX1 blackhole.tap -GenRom 0 "Arcade Crush Roller" cores\Arcades\crush2.ZX1 crush2.tap -GenRom 0 "Arcade Galaga" cores\Arcades\galaga.ZX1 galaga.tap -GenRom 0 "Arcade Gorkans" cores\Arcades\gorkans.ZX1 gorkans.tap -GenRom 0 "Arcade Lizard Wizard" cores\Arcades\lizwiz.ZX1 lizwiz.tap -GenRom 0 "Arcade Mr. Do" cores\Arcades\mrdo.ZX1 mrdo.tap -GenRom 0 "Arcade Ms. Pacman" cores\Arcades\mspacman.ZX1 mspacman.tap -GenRom 0 "Arcade Orbitron" cores\Arcades\orbitron.ZX1 orbitron.tap -GenRom 0 "Arcade Pac Miner" cores\Arcades\pacminer.ZX1 pacminer.tap -GenRom 0 "Arcade Pacman Plus" cores\Arcades\pacplus.ZX1 pacplus.tap -AddItem CORE2 Apple2.tap -AddItem CORE3 Atari2600.tap -AddItem CORE4 Atari800XL.tap -AddItem CORE5 Atom.tap -AddItem CORE6 BBCMicro.tap -AddItem CORE7 C16.tap -AddItem CORE8 C64.tap -AddItem CORE9 Test.tap -AddItem CORE10 Coleco.tap -AddItem CORE11 CPC464.tap -AddItem CORE12 CPC6128.tap -AddItem CORE13 Electron.tap -AddItem CORE14 Galaksija.tap -AddItem CORE15 JupAce.tap -AddItem CORE16 Kyp.tap -AddItem CORE17 MSX.tap -AddItem CORE18 NES.tap -AddItem CORE19 Oric.tap -AddItem CORE20 PC.tap -AddItem CORE21 PC2M.tap -AddItem CORE22 SamCoupe.tap -AddItem CORE23 SMS.tap -AddItem CORE24 TBBlue.tap -AddItem CORE25 Vectrex.tap -AddItem CORE26 VIC20.tap -AddItem CORE27 pacman.tap -AddItem CORE28 galaxian.tap -AddItem CORE29 phoenix.tap -AddItem CORE30 theblob.tap -AddItem CORE31 scramble.tap -AddItem CORE32 frogger.tap -AddItem CORE33 mooncresta.tap -AddItem CORE34 jumpshot.tap -AddItem CORE35 amidar.tap -AddItem CORE36 blackhole.tap -AddItem CORE37 crush2.tap -AddItem CORE38 galaga.tap -AddItem CORE39 gorkans.tap -AddItem CORE40 lizwiz.tap -AddItem CORE41 mrdo.tap -AddItem CORE42 mspacman.tap -AddItem CORE43 orbitron.tap -AddItem CORE44 pacminer.tap -AddItem CORE45 pacplus.tap -del *.tap +@echo off +set /a i=2 +call :AddCore 0 "Apple 2" cores\Apple2.ZX1 +call :AddCore 0 "Atari 2600" cores\Atari2600.ZX1 +call :AddCore 0 "Atari 800 XL" cores\Atari800XL.ZX1 +call :AddCore 0 "Acorn Atom" cores\Atom.ZX1 +call :AddCore 0 "BBC Micro" cores\BBCMicro.ZX1 +call :AddCore 0 "C16" cores\C16.ZX1 +call :AddCore 0 "C64" cores\C64.ZX1 +call :AddCore 0 "Test" cores\Test.ZX1 +call :AddCore 0 "ColecoVision" cores\Coleco.ZX1 +call :AddCore 0 "CPC464" cores\CPC464.ZX1 +call :AddCore 0 "CPC6128" cores\CPC6128.ZX1 +call :AddCore 0 "Acorn Electron" cores\Electron.ZX1 +call :AddCore 0 "Galaksija" cores\Galaksija.zx1 +call :AddCore 0 "Jupiter Ace" cores\JupAce.ZX1 +call :AddCore 0 "Spectrum Kyp" cores\Kyp.ZX1 +call :AddCore 0 "MSX" cores\MSX.ZX1 +call :AddCore 0 "Nintendo NES" cores\NES.ZX1 +call :AddCore 0 "Oric" cores\Oric.ZX1 +call :AddCore 0 "PC" cores\PC.ZX1 +call :AddCore 0 "PC2M" cores\PC2M.ZX1 +call :AddCore 0 "Sam Coupe" cores\SamCoupe.ZX1 +call :AddCore 0 "Sega Master System" cores\SMS.ZX1 +call :AddCore 0 "TBBlue" cores\TBBlue.ZX1 +call :AddCore 0 "Vectrex" cores\Vectrex.ZX1 +call :AddCore 0 "VIC-20" cores\VIC20.ZX1 +call :AddCore 0 "Arcade Pacman" cores\Arcades\pacman.ZX1 +call :AddCore 0 "Arcade Galaxian" cores\Arcades\galaxian.ZX1 +call :AddCore 0 "Arcade Phoenix" cores\Arcades\phoenix.ZX1 +call :AddCore 0 "Arcade The Glob" cores\Arcades\theblob.ZX1 +call :AddCore 0 "Arcade Scramble" cores\Arcades\scramble.ZX1 +call :AddCore 0 "Arcade Frogger" cores\Arcades\frogger.ZX1 +call :AddCore 0 "Arcade Moon Cresta" cores\Arcades\mooncresta.ZX1 +call :AddCore 0 "Arcade Jump Shot" cores\Arcades\jumpshot.ZX1 +call :AddCore 0 "Arcade Amidar" cores\Arcades\amidar.ZX1 +call :AddCore 0 "Arcade Black Hole" cores\Arcades\blackhole.ZX1 +call :AddCore 0 "Arcade Crush Roller" cores\Arcades\crush2.ZX1 +call :AddCore 0 "Arcade Galaga" cores\Arcades\galaga.ZX1 +call :AddCore 0 "Arcade Gorkans" cores\Arcades\gorkans.ZX1 +call :AddCore 0 "Arcade Lizard Wizard" cores\Arcades\lizwiz.ZX1 +call :AddCore 0 "Arcade Mr. Do" cores\Arcades\mrdo.ZX1 +call :AddCore 0 "Arcade Ms. Pacman" cores\Arcades\mspacman.ZX1 +call :AddCore 0 "Arcade Orbitron" cores\Arcades\orbitron.ZX1 +call :AddCore 0 "Arcade Pac Miner" cores\Arcades\pacminer.ZX1 +call :AddCore 0 "Arcade Pacman Plus" cores\Arcades\pacplus.ZX1 +exit /b + +:AddCore +echo Adding core %i%: %2 (%3)... +GenRom %1 %2 %3 %~n3.tap +if not %ERRORLEVEL% == 0 goto Error +AddItem CORE%i% %~n3.tap +if not %ERRORLEVEL% == 0 goto Error +del %~n3.tap +set /a i+=1 +exit /b + +:Error +echo ERROR: Exit status %ERRORLEVEL%. Stopped. +exit %ERRORLEVEL% /b From 8f4eb28ff24255d3902eada15ae627e0f25f410f Mon Sep 17 00:00:00 2001 From: Ivan Tatarinov Date: Tue, 6 Apr 2021 16:39:29 +0300 Subject: [PATCH 2/2] modflash/addrom.bat: optimized process of adding new ROM (automated slot number calculation) --- modflash/addrom.bat | 100 ++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/modflash/addrom.bat b/modflash/addrom.bat index 067ea06..cee4039 100644 --- a/modflash/addrom.bat +++ b/modflash/addrom.bat @@ -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