vasmNEO.bat

ASM Development for the NeoGeo
Post Reply
puppydrum64
Posts: 26
Joined: Thu Apr 22, 2021 9:30 pm

vasmNEO.bat

Post by puppydrum64 » Sun Aug 22, 2021 5:37 pm

I've been trying to learn how to make batch files and I tweaked vasmNEO.bat to work with any NEOGEO cartridge so that you don't have to retype the source and destination folders to match your rom files. I'm still a total noob at Batch so it only works under the following limitations:
  • The folder your roms are stored in, in \RelNEO\roms\, must have the same name as your source code document.
  • The .XML file that the Batch script uses to copy to "neogeo.xml" must have the same name as your source code document.
  • In that XML file, the second entry <software name="">, must have in those quotes the same name as your source code document.
These are case sensitive, no spaces allowed. Use underscores instead of spaces. (I'm going to try to put quotes around the file names and see if that fixes it.)

Here's an example for my source code file: NINJA_ADVENTURE.asm

X:\RelNEO\roms\NINJA_ADVENTURE
X:\RelNEO\hash\NINJA_ADVENTURE.xml
<software name="NINJA_ADVENTURE">

In the below script, %~n1 gets replaced with the file name, minus the .asm extension. That's the magic behind this Batch file. As always, call it from Notepad++ with the F6 key:

Code: Select all

$(CURRENT_DRIVE)\Utils\Vasm\vasmNEO.bat $(FILE_NAME) $(CURRENT_DIRECTORY) nopause
And here is the batch file:

Code: Select all

@echo off

if not exist X:\ goto Abandon

cd %2

if not exist \RelNEO\roms\neogeo.zip goto MissingRom

\Utils\Vasm\vasmm68k_mot_win32.exe %1 -chklabels -nocase -Fbin -m68000  -devpac -Dvasm=1  -L \BldNEO\Listing.txt -DBldNEO=1 -o "\BldNEO\cart.p"


if not "%errorlevel%"=="0" goto Abandon

cd \BldNEO

\Utils\byteswap \BldNEO\cart.p 202-p1.p1
\Utils\pad 202-p1.p1 524288 25

copy 202-p1.p1 \RelNEO\roms\%~n1

\Utils\MakeNeoGeoHash.exe "\RelNEO\hash\%~n1.xml" "\RelNEO\hash\neogeo.xml" "\RelNEO\roms\%~n1"

cd \Emu\mame0200b_32bit
mame neogeo %~n1 -video gdi -skip_gameinfo

exit
:MissingRom
echo No Neogeo Rom found.
echo put a MAME neogeo.zip file in \RelNEO\roms and try again!
:Abandon
if "%3"=="nopause" exit
pause
If this doesn't work for you, don't worry about it and keep using the one that Keith provided. But it's saved me time when switching back and forth between different games I want to try (I have a test cartridge for certain functions before I put them in the main game)

Post Reply

Return to “NeoGeo Assembly Programming”