Visivopro Posted May 18, 2020 Share Posted May 18, 2020 I wrote a simple bat file to delete the NVRAM file for Star Wars Trilogy on supermodel, it was causing issues when reloading the game. Script works great but how can I tell launchbox and bigbox to run the bat file every time I exit Supermodel? Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 (edited) 3 hours ago, Visivopro said: I wrote a simple bat file to delete the NVRAM file for Star Wars Trilogy on supermodel, it was causing issues when reloading the game. Script works great but how can I tell launchbox and bigbox to run the bat file every time I exit Supermodel? I'm not sure LB can run a script on exit yet, but you could modify your script to also include starting that game, waiting until it closes, then do what you have now. Then set this specific game to use that script, rather than use an emulator. When you edit the game, under the additional apps tab you can set applications to run before or after the game. Edited May 18, 2020 by Headrush69 Removed wrong info. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 30 minutes ago, Headrush69 said: I'm not sure LB can run a script on exit yet, but you could modify your script to also include starting that game, waiting until it closes, then do what you have now. Then set this specific game to use that script, rather than use an emulator. I'm really new to writing script I did read that was possible so would I create a bat file then tell launchbox to open the bat file rather then the .zip? How would i get launchbox to run my bat rather then the traditional way of running the game? Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 36 minutes ago, Headrush69 said: I'm not sure LB can run a script on exit yet, but you could modify your script to also include starting that game, waiting until it closes, then do what you have now. Then set this specific game to use that script, rather than use an emulator. also how do I tell it to launch the game considering it isn't an EXE but rather a zip file? seems launching the zip just opens it in unrar. Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 6 minutes ago, Visivopro said: I'm really new to writing script I did read that was possible so would I create a bat file then tell launchbox to open the bat file rather then the .zip? How would i get launchbox to run my bat rather then the traditional way of running the game? Right click on current rom, select Edit, change the rom file path to your BAT file. In the same window, click the Emulation tab and un-check use emulator. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 1 minute ago, Headrush69 said: Right click on current rom, select Edit, change the rom file path to your BAT file. In the same window, click the Emulation tab and un-check use emulator. I understand how to make it open but the rom is a Zip file so it just opens with urar rather then supermodel. Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 (edited) 1 hour ago, Visivopro said: I understand how to make it open but the rom is a Zip file so it just opens with urar rather then supermodel. Launchbox doesn't know about the zip file. You launch Supermodel passing the zip file for your game in your BAT script. Something like this: @echo off cd "C:\Users\ARCADEPC\LaunchBox\Emulators\SuperModel_3" START /WAIT "" "C:\Users\ARCADEPC\LaunchBox\Emulators\Supermodel3\supermodel3.exe" "E:\ROMS\Supermodel3\mygame.zip" the rest of your script here exit 0 If you have more supermodel options, you can add them here. I don't as I have mine saved in the supermodel.ini file. Edited May 18, 2020 by Headrush69 Fixed missing line Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 1 minute ago, Headrush69 said: Launchbox doesn't know about the zip file. You launch Supermodel passing the zip file for your game in your BAT script. can you explain how to do that? Sorry i am new to .bat files and just created one with notepad. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 15 minutes ago, Headrush69 said: Launchbox doesn't know about the zip file. You launch Supermodel passing the zip file for your game in your BAT script. okay I figured out how to launch the game with the .bat however now it starts the game in windowed mode any chance you know how to launch it with the bat using the command line perimeters set up in the emulator? Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 1 minute ago, Visivopro said: okay I figured out how to launch the game with the .bat however now it starts the game in windowed mode any chance you know how to launch it with the bat using the command line perimeters set up in the emulator? just add -fullscreen after the exe in the line I posted above. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 (edited) 16 minutes ago, Headrush69 said: just add -fullscreen after the exe in the line I posted above. okay thank you that worked however now when I load it in bigbox it does all kinds of resolution changes and tries to launch on my secondary monitor. i tried to turn off the secondary monitor but it didn't make a difference. Should I try setting the resolution to my current monitor resolution in supermodel? Edited May 18, 2020 by Visivopro adding details Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 7 minutes ago, Visivopro said: okay thank you that worked however now when I load it in bigbox it does all kinds of resolution changes and tries to launch on my secondary monitor. i tried to turn off the secondary monitor but it didn't make a difference. Should I try setting the resolution to my current monitor resolution in supermodel? I don't know why it's trying to launch on your secondary monitor, but yes setting the resolution to your native monitor resolution will likely help. Like I mentioned, I don't pass these options to supermodel3.exe, but have them set in my supermodel3.ini file in the COnfig folder in the supermodel3 folder. FullScreen = 1 Throttle = 1 ShowFrameRate = 0 FlipStereo = 1 VSync = 1 XResolution = 1920 YResolution = 1080 ... Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 1 minute ago, Headrush69 said: I don't know why it's trying to launch on your secondary monitor, but yes setting the resolution to your native monitor resolution will likely help. Like I mentioned, I don't pass these options to supermodel3.exe, but have them set in my supermodel3.ini file in the COnfig folder in the supermodel3 folder. FullScreen = 1 Throttle = 1 ShowFrameRate = 0 FlipStereo = 1 VSync = 1 XResolution = 1920 YResolution = 1080 ... yes that is exactly what I have. it launches fine, changes the resolution of my screen, loses focus and jumps to my secondary monitor and finally hides behind supermodels command window Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 (edited) 6 minutes ago, Headrush69 said: I don't know why it's trying to launch on your secondary monitor, but yes setting the resolution to your native monitor resolution will likely help. Like I mentioned, I don't pass these options to supermodel3.exe, but have them set in my supermodel3.ini file in the COnfig folder in the supermodel3 folder. FullScreen = 1 Throttle = 1 ShowFrameRate = 0 FlipStereo = 1 VSync = 1 XResolution = 1920 YResolution = 1080 ... also oddly enough it works perfect in launchbox, just not in big box. Yeah i don't think it's going to work because for some reason it is also losing all my control configs as well so it basically launching directly, causing it to ignore all the config file stuff. Edited May 18, 2020 by Visivopro Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 12 minutes ago, Visivopro said: yes that is exactly what I have. it launches fine, changes the resolution of my screen, loses focus and jumps to my secondary monitor and finally hides behind supermodels command window Trying adding to your script, changing into the supermodel folder first. (I added it to example above) It should not be trying to change the resolution if you set it to your monitor resolution, so it's not reading the supermodel.ini file if we aren't in the supermodel folder first. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 4 minutes ago, Headrush69 said: Trying adding to your script, changing into the supermodel folder first. (I added it to example above) It should not be trying to change the resolution if you set it to your monitor resolution, so it's not reading the supermodel.ini file if we aren't in the supermodel folder first. I figured it out a different way. Main issue was supermodel was creating a corrupted .NV file, causing the game to perform poorly or not at all upon second launch. Found this from a DEV: "The underlying cause of this has never been investigated. Clearly, the game is skipping some initialization step when it detects unused coins." The game will boot with an NVRAM file, I think. Just make sure there are no unused credits. Try inserting only one coin, playing a game, then exiting. However this is a horrible solution so I just changed the folder Name of NVRAM to something else and voila it worked! No more errors or glitches. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 Lies!!! So worked in launchbox but when opening in big box it quits after the first mouseclick at least according to bigbox but the game continues to play in the background uhhhhggg. Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 (edited) 5 minutes ago, Visivopro said: Lies!!! So worked in launchbox but when opening in big box it quits after the first mouseclick at least according to bigbox but the game continues to play in the background uhhhhggg. Too tired, I should be sleeping..... I forgot, when you edit the game, in the additional apps tab you can set apps to run before or after the game runs. Try running your script there. Sorry about that. Edit: It's more complex but I currently use Rocketlauncher for launching supermodel3 games as it has an option to erase that nvram per game, use bezels, and add scanlines, Edited May 18, 2020 by Headrush69 Added more options. Quote Link to comment Share on other sites More sharing options...
Visivopro Posted May 18, 2020 Author Share Posted May 18, 2020 23 minutes ago, Headrush69 said: Too tired, I should be sleeping..... I forgot, when you edit the game, in the additional apps tab you can set apps to run before or after the game runs. Try running your script there. Sorry about that. great try what you suggested worked however now the game loses focus and continues to play in the background. also because its playing in the background bigbox doesn't see it anymore and assumes you quit. only way to fix it is to click on star wars window and quit the app. Any other ideas? Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted May 18, 2020 Share Posted May 18, 2020 6 minutes ago, Visivopro said: what you suggested worked however now the game loses focus and continues to play in the background. also because its playing in the background bigbox doesn't see it anymore and assumes you quit. only way to fix it is to click on star wars window and quit the app. Not really. I just changed my configuration to use that bat script to start and it worked fine from both LB and Big Box. No issues with my secondary monitor, or losing focus. I would try using the additional apps method and forget the script method if it's causing focus issues. There are some tricks you can do using AHK scripts to grab focus back, but that additional apps and running you script to erase the nvram file should work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.