Better TestBat.bat

Post Reply
User avatar
SpiderDave
Posts: 16
Joined: Tue Jun 18, 2019 5:50 am

Better TestBat.bat

Post by SpiderDave » Sat Aug 10, 2019 5:56 am

When you use the "Export and Test asm" button in NESMaker it runs a batch file named TestBat.bat (located in GameEngineData). I don't like how you have to press a key every time it runs, so here's a little upgrade:

Code: Select all

@echo off
asm6 MainASM.nes game.nes demo.txt 1>log.txt 2>&1

if exist game.nes goto theend

pause

theend:
If there are no errors, it will run the emulator immediately instead of having to press a key. If there are errors, it will pause so you can read the error. It will also log all output to a file log.txt (which is overwritten each time). There are a few old threads of this, but they're out of the way and don't have it exactly the way I do it.
User avatar
Artix
Posts: 19
Joined: Wed Nov 21, 2018 3:41 am
Location: Tampa, Floridas
Contact:

Re: Better TestBat.bat

Post by Artix » Mon Sep 02, 2019 6:10 pm

This... is the greatest thing ever! I had been manually changing the TestBat.bat each time, REM'ing out the line unless I was coding, in which case I needed to switch it back.

Thank you so much.
User avatar
dale_coop
Posts: 4206
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Better TestBat.bat

Post by dale_coop » Mon Sep 02, 2019 7:23 pm

But if there is any error, the batch window will close... a even better one would be just:

Code: Select all

@echo off
asm6 MainASM.nes game.nes demo.txt

if exist game.nes goto theend

pause

theend:
If there is no error, the window closes... and if error it remains open, displaying the error.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
slobu
Posts: 6
Joined: Tue Mar 06, 2018 10:42 pm

Re: Better TestBat.bat

Post by slobu » Tue Oct 01, 2019 12:41 pm

Hopefully there's a way to officially submit suggestions to Joe. I'm sure having a .BAT file that pauses is great for debugging NES Maker and advanced users. For dead end users like me I'm still working on my own lack of knowledge using the software and the errors that come up whilst in the software.

I might go as far as suggesting the output be funneled back into a memo field in NES Maker proper so we never leave the GUI.
User avatar
Dirk
Posts: 364
Joined: Fri Mar 09, 2018 5:30 am

Re: Better TestBat.bat

Post by Dirk » Tue Oct 01, 2019 7:39 pm

You can make suggestions here: [url] http://www.nesmakers.com/viewtopic.php?f=49&t=2516 [/url]
-----
Disclaimer: English is not my first language, so mistakes are bound to happen.
Post Reply