The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: sega_mad on July 10, 2011, 05:05:11 am

Title: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 10, 2011, 05:05:11 am
Title says it all.

It's a bit of an arcade experience killer.

Would just like it to go straight from MALA front end to Daytona without the M2 box showing for a second.

Is it possible to achieve?

Thanks.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 10, 2011, 11:18:55 am
I had a look at this and I assume you wanted to remove the M2 logo from the emulator?

Okay I have edited the binaries to remove the logo and menu strip. So you will only be able to configure it from EMULATOR.INI.

If the original authors have a problem with this I'll remove the download.

m2emulator.zip (http://www.headsoft.com.au/download/emulation/m2emulator.zip)
Title: Re: How do I stop Model 2 from showing at launch??
Post by: Dan_Dan_91_07 on July 10, 2011, 11:32:06 am
Wow, that's awesome headkaze.

Could you point me to a website or something, where I'll be able to learn how to do that? I would love to do something similar to a few programmes.

Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 10, 2011, 01:58:35 pm
It really wont work the same way with all applications because they can be done differently. But there are some general things you can do.

For the Model 2 emulator I used HxD to search the file for "PNG". I found 3 images embedded in the binary. The 3rd one was the largest and was what I assumed to be logo. The start of a PNG has 0x89 followed by "PNG" and the end has "END" followed by 4 bytes. So you can copy and paste the png to another file, edit in Photoshop to make it black and then "Paste write" the png back over the top. It doesn't matter that the file will be smaller, just make sure you paste it from the beginning of the original png.

For removing the menu just use ResEdit to delete its menu resource. You can often use ResEdit to change window sizes, start them minimized or hide them so it's a very handy tool for this sort of thing.

One other tool worthy of mentioning is AutoHotKey or AutoIt which is a scripting language you can use for launching executables. Many emulator loaders are written in this which is very easy to pick up.

PS I updated the Model2 download to include two scripts in AutoHotKey that will remove the window border and make its window size 0, 0. It will also close the emulator when you press the ESC key. You can modify the scripts for other emulators or change the exit key etc. To use them just launch the game the same way but replace emulator.exe [ROM] with launch_emulator.exe [ROM] or emulator_multicpu.exe [ROM] with launch_emulator_multicpu.exe [ROM].
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 10, 2011, 04:01:25 pm
Wow thanks headkaze.

I for got to mention I need version 0.9 as version 1.0 plays in black and white (even after updating to the latest Direct X 9c)....which seems to be quite a common complaint.

Many thanks for your work

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 10, 2011, 04:52:19 pm
Hi Headkaze,

Just tried it out. Still showing a model 2 box then a Daytona (or Sega rally, which ever you load), for a brief second. Then it goes back to the MALA front End, which indicates it's not working correctly.

Any thoughts?

Regards

Sega_Mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 10, 2011, 06:17:09 pm
Hi Headkaze,

Just tried it out. Still showing a model 2 box then a Daytona (or Sega rally, which ever you load), for a brief second. Then it goes back to the MALA front End, which indicates it's not working correctly.

Any thoughts?

Regards

Sega_Mad

If you create a shortcut to launch_emulator.exe and add a ROM name manually does it work then?

ie. In the Shortcut's Target location have the full path to launch_emulator.exe and then add a ROM name to it.

eg. "C:\Emulators\Model2\launch_emulator.exe" zerogun
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 10, 2011, 10:06:30 pm
Sorry,

Didn't understand that at all...are you able to spell in it please?

Cheers
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 10, 2011, 10:09:36 pm
Sorry,

Didn't understand that at all...are you able to spell in it please?

Cheers

The idea is to see if you can launch a game outside of MaLa either by using a shortcut or command line.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 10, 2011, 10:30:01 pm
Hi Headkaze,

Got it to run under commandline

On start up it's still producing a Blue Box (with game title) as seen in the screen shot, also it produces one just before this...looks the same, but says "model 2 emulator"

Not sure why it's not working in MALA

Also, with the menu gone, not sure how I'll configure the controls??

But I see we are on the right track   :)

Sega_mad
 
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 10, 2011, 11:43:16 pm
If you're not using the executable from my download link then the logo will still be displayed.

You will have to configure controls using the original exe and then copy over it with my one.

In EMULATOR.INI make sure you have the following set

Code: [Select]
FullMode=1
AutoFull=1

Then it should go into full screen mode when launched from the command line.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 11, 2011, 12:02:06 am
Pretty sure I was using your file. Will try again when I get home.

It's not showing the model 2 startup page but is still showing the blue box as in the screen shot.

Thanks for all your help.

Cheers
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 11, 2011, 01:26:55 am
Headkaze,

I was using correct exe.

The main model 2 screen is gone, but like it shows in the screen shot, the "Blue" box still shows up.

When I changed the autofull=1 the emulator failed to load bringing up an error box??

Sega_mad

Title: Re: How do I stop Model 2 from showing at launch??
Post by: korbitz on July 11, 2011, 02:20:22 am
The way i removed the 'blue box' was to change some of the settings in the box, namely Cabinet from twin to another option and country, cant remember exactly what i changed them too. I'll have a play with it later when i get back from work.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 11, 2011, 02:28:18 am
Already changed to Single cabinet  and Export. still does it.
 ???

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 11, 2011, 10:14:59 am
The main model 2 screen is gone, but like it shows in the screen shot, the "Blue" box still shows up.

From your screenshot I can see you're not using the loader.

Try typing the following from command line

Code: [Select]
launch_emulator daytona
This should make the window very small before running the game. Unfortunately you may still see a window for a split second. This is really the best you can do for hiding Model 2 without having a special window for hiding the background like GameEx has.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 11, 2011, 04:25:01 pm
Headkaze,

Ok, tried that. Still shows the 2 X "Blue" boxes on start up, then it loads.....but it's invisable. Nothing on screen, but can here the game playing.

I'm guessing that this is not achievable, but thanks very much for trying. :)

Regards

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 11, 2011, 04:31:20 pm
Must be something to do with MaLa.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 11, 2011, 04:35:13 pm
So, can it be done within GameEx?

If so, is it possible to run Mala for the MAME games, and GameEx for the Model2 games?

Thanks

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 11, 2011, 04:57:36 pm
GameEx has built in support for Model 2 which means you have your MAME set and it will automatically use Model2 for the games that support it. So you don't really notice any difference to running MAME. Also GameEx can automatically hide your desktop so you don't see emulator windows and all that.

That being said I don't want to upset MaLa fans by saying give it up for GameEx. Perhaps there is a way around the problem you're seeing? Make a post in the MaLa forum and ask if anyone has Model 2 running without it showing the desktop and emulator window.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 11, 2011, 05:16:16 pm
Thanks Headkaze,

Will look into it. Might check out gameEx as well.

Thanks for all your help

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 12, 2011, 02:24:44 am
I wonder if this could be solved by simply using the following ahk script and pointing mala to this instead of the rom:

Quote
settitlematchmode, 2
splashimage, blackscreen.bmp, B

setworkingdir, <dir containing M2 emulator>
run <whatever you type on the command line to run the emu>
WinWaitActive, <title or partial title of the emu window>
sleep 1000
return

esc::
send !{F4}
exitapp

Open up Paint and make a solid black image the size of your screen resolution. Name it blackscreen.bmp and put it in the same directory as the script. Fill in the < >, making sure though that the window title of what you're trying to hide does not contain the text you use for the emu window. Now when you run from mala, the screen should turn black until the emu starts in full screen + 1 second just for good measure. Also, esc (or any key of your choosing) will send alt-F4 to close the emu and the script. I think the script needs to run as long as the game is running since I think mala sees the script as the "game" and will try to take back focus as soon as the script exits.

FWIW, I tried this with mame and it worked great. I run the script and the screen turns completely black hiding my desktop and the command line until mame launches. I don't have the model 2 emu handy, but I'm thinking it could work with that as well.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 12, 2011, 02:43:42 am
Hi Nitz.

This sounds promising.

I'm not so good at this stuff, would you be kind enough to really spell this out in "simple" speak.

I really appreciate this.

Cheers

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 13, 2011, 01:41:19 am
I have mala and the model 2 emu set up on another computer. I think I'd really have to experiment with it myself to write you a full proper script. I tend to be really busy during the week, but I'll see what I can come up with on the weekend...
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 13, 2011, 01:59:05 am
Great.

Thanks
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 17, 2011, 08:10:17 pm
OK, I took a look at this, and I came up with something that works great for me! Hopefully it works for you too.

I'll try to spell this out as best I can as I know this stuff is tough when you're first learning it.

1) If you don't have it already, download and install autohotkey.

2) Open up Paint, go to Image, then Attributes, and set the width and height to your screen resolution.

3) Use the fill with color tool to make a solid black image. Save it to your desktop as blackimage.bmp

4) Right click on your desktop, go to new, and then select Autohotkey Script, or just rename a new txt file with the ahk extension. Name it m2.ahk

5) Copy the following into that file, close and save it. From here on out, I will put stuff that you may need to change in red, and explain it below.

Quote
splashimage, blackimage.bmp, B

setworkingdir, C:\emus\otheremus\model2  
run emulator vf2

WinWaitActive, Model
WinWaitNotActive, Model
sleep 500

splashimage, off

esc::
send !{F4}
exitapp

Change C:\emus\otheremus\model2 to the directory of the m2 emulator
If you don't have the vf2 rom, change this to the name of a rom you do have
If you don't use escape as your exit button, change this to what you do use. (You may need to consult the help file with autohotkey to find out the exact key name you need).

6) Right click your taskbar, go to properties, then uncheck keep the taskbar on top of other windows.

7) Double click m2.ahk. The screen should go black, and then seamlessly right into the game!

Press esc (or whatever your exit key is) and both the emu and script should exit and you'll be back at your desktop.

If this worked for you, continue with step 8 to integrate this into Mala. If it didn't work like it should, post here and we'll troubleshoot before you try to set it up with Mala.

8 ) Make a new m2.ahk script with the following (it's almost like our test one) and place it wherever you like along with your blackimage.bmp.

Quote
splashimage, C:\emus\blackimage.bmp, B

setworkingdir, C:\emus\otheremus\model2
run emulator %1%

WinWaitActive, Model
WinWaitNotActive, Model
sleep 500

splashimage, off

esc::
send !{F4}
exitapp

Change C:\emus\ to the path where you have blackimage.bmp (Normally you should not have to specify the path for blackimage.bmp when it's in the same directory as the script, but oddly I found I had problems using this with Mala when I didn't do that.)

Change C:\emus\otheremus\model2 to the directory where your model 2 emu is located.

9) Make a file called mame.cmd and place it in your mame folder. Put the following in it:

Quote
if "%2" == "C:\emus\otheremus\model2\roms" goto model2

mame %1
exit

:model2
cd C:\Program Files\Autohotkey
autohotkey.exe C:\emus\m2.ahk %1
exit

Change C:\emus\otheremus\model2\roms to wherever you keep your model2 roms
Change C:\Program Files\Autohotkey to the directory of your autohotkey installation (it's probably the same though)
Change C:\emus\ to the directory containing your m2.ahk script.

10) Point Mala to mame.cmd instead of mame.exe
     Set 2 rom paths. Point the first one to your mame roms, point the second to your otheremus directory.
     Make sure Search in subfolders is checked.
     Change the command line to %rom% %path%

*See attached pics for clarity.*

11) Refresh your game list.

Now when you choose a model 2 game, the screen should turn black until the game starts. You may need to keep your taskbar set to not be on top of other windows. When you choose a mame game, it should run as normal.

Let me know if this works for you! :cheers:
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 18, 2011, 02:43:42 am
Hi Nitz

You sir are a Legend!! ;D ;D ;D

That worked perfectly.

I was a little worried at first, that it was to complicated, but I got it right first time. Your instructions were easy to follow, and spot on!!

I'm justy wondering 2 things...the "Get ready to Play" only slows for like a quater of a second. Is there any way to make it display a little longer?

Secondly......While the m2 spash screen are now hidden, is there any way to hide the Daytona/Sega Rally initializing screen (ie the country region, wether its a Master/Slave etc). I tried changing the sleep time to 3000, but no change.

if not, it's not a biggie......it's 99.9% what I wanted...and better than I ever hoped for

Thanks sooooooo much for making this possible

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: BadMouth on July 18, 2011, 07:33:44 am
Thanks Nitz!  (and thanks sega_mad for bringing up the topic)

This has been on my to-do list for a while, but I never got around to it.
It's nice to have it already sorted out and tested.  :cheers:
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 18, 2011, 11:50:34 pm
Hi Nitz

You sir are a Legend!! ;D ;D ;D

Naw! :laugh: It's just that I've been writing so much autohotkey stuff over the last year or so that I've gotten to the point where stuff like this has gotten pretty routine and straightforward. And I confess that I nicked the idea of running a cmd file from Mala from a stickied thread in the Mala section about having games from multiple emus in the same list.

So glad it worked for you!

I'm justy wondering 2 things...the "Get ready to Play" only slows for like a quater of a second. Is there any way to make it display a little longer?

You can fix this via an option in Mala. Go to the Gui tab, then the Game Start/Quit tab, and check "sleep before start" or something like that, then you can set the number of milliseconds to show the image before the game starts. I don't think Mala always had this option though, so if you're using an older version, it might be time to upgrade.

Secondly......While the m2 spash screen are now hidden, is there any way to hide the Daytona/Sega Rally initializing screen (ie the country region, wether its a Master/Slave etc). I tried changing the sleep time to 3000, but no change.

The reason changing the sleep time doesn't work is that you can't overlay an image onto a Direct3d app. So while the splashimage is being displayed longer, it's actually underneath the emu window, so the net effect is that basically nothing happens. I tried to get around this by scripting to hide the window, didn't work, then I tried scripting to minimize the window and remaximize it. That didn't really work either.

There is some discussion of the issue in this thread on the ahk forum:

http://www.autohotkey.com/forum/topic11891.html&postdays=0&postorder=asc&highlight=splashimage+d3d&start=0&sid=54b5a19ad591d9f7e550f1957c107395 (http://www.autohotkey.com/forum/topic11891.html&postdays=0&postorder=asc&highlight=splashimage+d3d&start=0&sid=54b5a19ad591d9f7e550f1957c107395)

I just skimmed the thread and haven't really investigated this, but it looks like there could be a work around using other programs. Though I'm thinking it's probably not worth the effort, unless those initializing screens really bug you and you have lots of free time.;)

Maybe save state support will be added to the emu sometime, and then you could probably get around it that way.

Cheers :cheers:
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 19, 2011, 12:09:22 am
Thanks nitz for the info.

I can't believe that I actuall solved the "get ready to play" issue on my own.(before I read your answer)

I just added this to the begining of your script...and seems to work perfectly.

Sleep 2  

if "%2" == "C:\emus\otheremus\model2\roms" goto model2

mame %1
exit

:model2
cd C:\Program Files\Autohotkey
autohotkey.exe C:\emus\m2.ahk %1
exit



Do you foresee any problems with what I've done?

Would it be possible to get the Black screen to play a second time, ie loop, Would that work??

Thanks again for all your help

Sega_mad

Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 19, 2011, 01:12:57 am
As long as that works for you, I see no issue other than the fact that if you've got other emus setup via mala's "other emus" option, this will have no effect when you run those since mame.cmd is being run for mame and model 2 games only. In that case, you would be better off using the function built into to mala.

Would it be possible to get the Black screen to play a second time, ie loop, Would that work??

I've thought of this before too, but have never been able to get it to work. I think they mention it not working in that thread I linked to as well. What the heck though, I've never tried it with this particular emu, so you could give it a try. I would place this at the appropriate place in the script:

Quote
Loop 50 {
splashimage, C:\emus\blackimage.bmp, B
splashimage, 2:C:\emus\blackimage.bmp, B
}

You don't want to use just one splashimage over and over because that definitely won't work - it'll just produce a lot of flickering as the image is continuously destroyed and redrawn. What this does is quickly cycle through 2 identical images for several seconds. First one is drawn, second is drawn over top, first is destroyed, then redrawn over second, second is destroyed and redrawn over first...and so on. If you run a script with just this in it on your desktop, it should produce a solid black image for several seconds, although your mouse will probably flicker with all the activity that's going on. I think if you try to do a splashimage over a d3d app, it does appear for a split second, so theoretically, continously redrawing splash images could work, but you'll likely just get bunch of flicker that looks far worse that the initialization screens unfortunately.

One more thing I thought of that might help with this problem. Does the emu have a speed/frameskip key like mame does? (I don't have it handy atm, it's on my other PC which I shut down for the night). If so, you could have autohotkey hold that key down for a couple seconds after launching those certain games, and that might at least minimize the amount of time those screens show up.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 19, 2011, 01:22:51 am
Thanks Nitz

Only running the 2 emulators. So shouldn't be a problem.

M2 doesn't have frame skip(that I can see).

Will give it a crack tomorrow.... Can you advise exactly where I should insert the script please?

Thanks again.



Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 19, 2011, 02:21:53 am
Oops, my bad, I guess you can't quite just insert that, but give this a try:

Quote
splashimage, C:\emus\blackimage.bmp, B

setworkingdir, C:\emus\otheremus\model2
run emulator %1%

WinWaitActive, Model
WinWaitNotActive, Model
Loop 50 {
splashimage, 2:C:\emus\blackimage.bmp, B
splashimage, 3:C:\emus\blackimage.bmp, B
}


sleep 500

splashimage, off
splashimage, 2:off
splashimage, 3:off
return

esc::
send !{F4}
exitapp

Let us know how that works out. And if by chance it does work, you would just adjust the 50 to increase or decrease the duration of the black splash images.

Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 19, 2011, 04:42:25 am
No go :'(

Oh well, thanks for trying.

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 23, 2011, 06:21:27 pm
Hi Nitz,

Well using the same logic I installed CPS3 to play SF3.....and got it running.  ;D ;D ;D

All splash screens hidden etc.....Am stoked.

Can't thank you enough for all your great work!!

When I exit it....the sounds stutters..any thoughts? (just for 1 second or so)

Also, seeing as you know my setup...any idea how to get Zinc games running within Mala. I can run it from the command line, but don't know how to intergrate it to Mala.

Cheers

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 24, 2011, 03:09:05 am
I'm not familiar with the CPS3 emulator as the CPS3 games run fine for me in mame, so not sure how much I can help. Does the sound stutter if you run the emulator and exit just on its own outside of Mala? Does it stutter if you run it from Mala but without using an AHK script?

I'll get you setup to run zinc from mala.

Copy this to a file named temp.txt

Quote
:rom1
cd path
zinc.exe 1
exit

:rom2
cd path
zinc.exe 2
exit

:rom3
cd path
zinc.exe 3
exit

:rom4
cd path
zinc.exe 4
exit

:rom5
cd path
zinc.exe 5
exit

:rom6
cd path
zinc.exe 6
exit

:rom7
cd path
zinc.exe 7
exit

:rom8
cd path
zinc.exe 8
exit

:rom9
cd path
zinc.exe 9
exit

:rom10
cd path
zinc.exe 10
exit

:rom11
cd path
zinc.exe 11
exit

:rom12
cd path
zinc.exe 12
exit

:rom13
cd path
zinc.exe 13
exit

:rom14
cd path
zinc.exe 14
exit

:rom15
cd path
zinc.exe 15
exit

:rom16
cd path
zinc.exe 16
exit

:rom17
cd path
zinc.exe 17
exit

:rom18
cd path
zinc.exe 18
exit

:rom19
cd path
zinc.exe 19
exit

:rom20
cd path
zinc.exe 20
exit

:rom21
cd path
zinc.exe 21
exit

:rom22
cd path
zinc.exe 22
exit

:rom23
cd path
zinc.exe 23
exit

:rom24
cd path
zinc.exe 24
exit

:rom25
cd path
zinc.exe 25
exit

:rom26
cd path
zinc.exe 26
exit

:rom27
cd path
zinc.exe 27
exit

:rom28
cd path
zinc.exe 28
exit

:rom29
cd path
zinc.exe 29
exit

:rom30
cd path
zinc.exe 30
exit

:rom31
cd path
zinc.exe 31
exit

:rom32
cd path
zinc.exe 32
exit

:rom33
cd path
zinc.exe 33
exit

:rom34
cd path
zinc.exe 34
exit

:rom35
cd path
zinc.exe 35
exit

:rom36
cd path
zinc.exe 36
exit

:rom37
cd path
zinc.exe 37
exit

:rom38
cd path
zinc.exe 38
exit

:rom39
cd path
zinc.exe 39
exit

:rom40
cd path
zinc.exe 40
exit

:rom41
cd path
zinc.exe 41
exit

:rom42
cd path
zinc.exe 42
exit

:rom43
cd path
zinc.exe 43
exit

:rom44
cd path
zinc.exe 44
exit

:rom45
cd path
zinc.exe 45
exit

:rom46
cd path
zinc.exe 46
exit

:rom47
cd path
zinc.exe 47
exit

:rom48
cd path
zinc.exe 48
exit

:rom49
cd path
zinc.exe 49
exit

:rom50
cd path
zinc.exe 50
exit

:rom51
cd path
zinc.exe 51
exit

:rom52
cd path
zinc.exe 52
exit

:rom53
cd path
zinc.exe 53
exit

:rom54
cd path
zinc.exe 54
exit

:rom55
cd path
zinc.exe 55
exit

:rom56
cd path
zinc.exe 56
exit

:rom57
cd path
zinc.exe 57
exit

:rom58
cd path
zinc.exe 58
exit

:rom59
cd path
zinc.exe 59
exit

:rom60
cd path
zinc.exe 60
exit

:rom61
cd path
zinc.exe 61
exit

:rom62
cd path
zinc.exe 62
exit

:rom63
cd path
zinc.exe 63
exit

:rom64
cd path
zinc.exe 64
exit

:rom65
cd path
zinc.exe 65
exit

:rom66
cd path
zinc.exe 66
exit

:rom67
cd path
zinc.exe 67
exit

:rom68
cd path
zinc.exe 68
exit

:rom69
cd path
zinc.exe 69
exit

:rom70
cd path
zinc.exe 70
exit

:rom71
cd path
zinc.exe 71
exit

Now copy the following into a .ahk file (name it whatever you want) in the same directory as temp.txt.

Quote
FileRead, invar, temp.txt

StringReplace, outvar, invar, path, yourPathToZinc, 1

FileAppend, %outvar%, addToMameCmd.txt

but change yourPathToZinc to, well, your path to zinc. ;)

Run that ahk file and it will create a file called addToMameCmd.txt. It's basically the same as temp, only your path to Zinc will have replaced all the instances of the word "path".

Now copy and paste all of this at the top of your mame.cmd

Quote
if "%1" == "starglad" goto rom1
if "%1" == "sfex" goto rom2
if "%1" == "sfexj" goto rom3
if "%1" == "sfexa" goto rom4
if "%1" == "sfexp" goto rom5
if "%1" == "sfexpu1" goto rom6
if "%1" == "sfexpj" goto rom7
if "%1" == "sfex2" goto rom8
if "%1" == "sfex2j" goto rom9
if "%1" == "sfex2p" goto rom10
if "%1" == "sfex2pj" goto rom11
if "%1" == "sfex2pa" goto rom12
if "%1" == "plsmaswd" goto rom13
if "%1" == "stargld2" goto rom14
if "%1" == "rvschola" goto rom15
if "%1" == "jgakuen" goto rom16
if "%1" == "rvschool" goto rom17
if "%1" == "shiryu2" goto rom18
if "%1" == "strider2" goto rom19
if "%1" == "kikaioh" goto rom20
if "%1" == "techromn" goto rom21
if "%1" == "ts2" goto rom22
if "%1" == "ts2j" goto rom23
if "%1" == "tgmj" goto rom24
if "%1" == "sncwgltd" goto rom25
if "%1" == "beastrzb" goto rom26
if "%1" == "beastrzr" goto rom27
if "%1" == "bldyror2" goto rom28
if "%1" == "brvblade" goto rom29
if "%1" == "psyforcj" goto rom30
if "%1" == "psyforce" goto rom31
if "%1" == "psyfrcex" goto rom32
if "%1" == "mgcldtex" goto rom33
if "%1" == "raystorj" goto rom34
if "%1" == "raystorm" goto rom35
if "%1" == "ftimpcta" goto rom36
if "%1" == "gdarius" goto rom37
if "%1" == "gdarius2" goto rom38
if "%1" == "danceyes" goto rom39
if "%1" == "xevi3dg" goto rom40
if "%1" == "starswep" goto rom41
if "%1" == "myangel3" goto rom42
if "%1" == "tekkenb" goto rom43
if "%1" == "tekkena" goto rom44
if "%1" == "tekken" goto rom45
if "%1" == "tekken2a" goto rom46
if "%1" == "tekken2b" goto rom47
if "%1" == "tekken2" goto rom48
if "%1" == "souledga" goto rom49
if "%1" == "souledgb" goto rom50
if "%1" == "souledge" goto rom51
if "%1" == "dunkmnia" goto rom52
if "%1" == "dunkmnic" goto rom53
if "%1" == "primglex" goto rom54
if "%1" == "weddingr" goto rom55
if "%1" == "hyperath" goto rom56
if "%1" == "pbball96" goto rom57
if "%1" == "susume" goto rom58
if "%1" == "fgtlayer" goto rom59
if "%1" == "ehrgeiz" goto rom60
if "%1" == "tekken3" goto rom61
if "%1" == "mrdrillr" goto rom62
if "%1" == "aquarush" goto rom63
if "%1" == "pacapp" goto rom64
if "%1" == "glpracr3" goto rom65
if "%1" == "shngmtkb" goto rom66
if "%1" == "cbaj" goto rom67
if "%1" == "doapp" goto rom68
if "%1" == "tondemo" goto rom69
if "%1" == "mfjump" goto rom70
if "%1" == "hvnsgate" goto rom71

And copy the contents of addToMameCmd.txt underneath

Quote
mame %1
exit

Note that if you want any of these roms to run in mame instead, you just need to delete the appropriate lines.

You should be good to go. :cheers:

EDIT: Fixed stupid mistake so that these instructions work properly now.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 24, 2011, 03:27:22 am
Hi Nitz

Do you run Street Fighter 3  games with CHD'S under MAME........as I can't??

Stuttering only happens on my machine running a Arcade screen, if I run the same computer on a VGA screen..... No stuttering!!

Is it possible to put a "mute" function in the cmd file prior to shut down??

I'll have a crack tomorrow

Have you tried Zinc with Dragon Kings wrapper..... That's the bit I can't get to work.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: headkaze on July 24, 2011, 04:21:05 am
Check out ZincCab (http://forum.arcadecontrols.com/index.php?topic=86588.0)
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 24, 2011, 04:34:19 am
Check out ZincCab (http://forum.arcadecontrols.com/index.php?topic=86588.0)

Will do.

Thanks
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 24, 2011, 05:34:10 pm
Hi Nitz

Do you run Street Fighter 3  games with CHD'S under MAME........as I can't??

Stuttering only happens on my machine running a Arcade screen, if I run the same computer on a VGA screen..... No stuttering!!

Is it possible to put a "mute" function in the cmd file prior to shut down??

I'll have a crack tomorrow

Have you tried Zinc with Dragon Kings wrapper..... That's the bit I can't get to work.

Yep, SF3 games run fine for me in Mame using the CHDs. Is your issue that they run too slow for you, or that they don't run at all? If they're not running at all, that should be fixable...

It's certainly possible to have an ahk script run the CPS3 emu, similar to what we setup with Model2, and have your exit key mute the volume, exit the emu, bring the volume level back up, then exit the script.

I've never tried Zinc with a wrapper. The reason I didn't suggest a wrapper is because I tried 2 or 3 wrappers for various stuff awhile back and had nothing but headaches with them. Unless the wrapper is as simple as "point the frontend to it and everything automatically works perfectly", I just don't bother anymore and come up with my own solutions. My solution above just requires a bit of cutting and pasting and you're good to go, plus no program running in the background eating up cpu cycles (though to be fair, the cpu usage of a wrapper is probably pretty minimal anyway).
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 24, 2011, 05:35:14 pm
Hi Nitz,

Ok, did everything you said, and it worked....sort of!!

Game loads, but when I exit, it automatically loads the next zinc game....and so on, and so on, and so on...

Also, on starting zinc (from Mala), the (Drunken Muppets) window box shows.....need to get rid of that!!

Thoughts??

Here is my mame cmd file

Cheers
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 24, 2011, 05:40:44 pm
Hi Nitz,

Just got your message.

Can't get (Street Fighter 2 EX for example), to run under MAME. Have the CHD's, but must be missing something as well. I read somnewhere last night that while it runs on the CHD's, it takes 25 minutes to load....is this true??

As I have it running already, would you be kind enough to write the mute functions for the cmd file?? That way I can run other CPS3 games!!

Previous post updates my zinc issues

Cheers

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 24, 2011, 06:23:53 pm
Game loads, but when I exit, it automatically loads the next zinc game....and so on, and so on, and so on...

BLECH!!! :banghead: I know exactly why that happened. I made a silly error and left out all the "exits" under my goto labels, so it just keeps going and going. Sorry about that. I fixed it in my post above, so you can just follow the instructions again, or manually add the word exit underneath each of those in your mame cmd.

As for the CHD thing, what version of mame are you running? This will affect where the CHD needs to be. Some versions just require it loose in your roms folder, others require it to be in a folder with the same name as the CHD in the rom folder. And also, the CHD format changed awhile back (it's changed a couple times I think) so you will need to have a version that is compatiple with your mame version. You might be able to easily convert your version to the one you need though if it's wrong.

If we can't get those working in mame, or you don't want to be bothered, I could write that mute thing for you a little later as it should be pretty easy. Bit busy at the moment though and gotta go, but I'll check back later on.

Cheers :cheers:

EDIT: Forgot to address your "drunken muppets box showing" issue. We can talk about that later as well.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 24, 2011, 06:36:03 pm
Hi Nitz.

Thanks so much for all this.

Would prefer to stay with the CPS3 emulator, as I can run other games that MAME cant play. So would love the mute setup when you can.

Thanks again

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: nitz on July 24, 2011, 09:29:09 pm
Ok, here we go.

Create a file called cps3.ahk with the following in it:

Quote
setworkingdir, path to cps3 emu
run cps3 emu command

$esc::
soundget, volume
soundset, 0
send {esc}
sleep 3000
soundset, %volume%
exitapp

Put in the path to the emu where indicated. Replace cps3 emu command with whatever you would type at the command line to run it, but instead of a rom name, type %1%. I've assumed this emu exits by pressing escape, if not, you'll need to change send {esc} to whatever it should be sending. I've set it to wait 3000 ms before turning the sound back up and exiting the script. If this is not enough/too much time, just adjust it until it seems about right.

Add these to the appropriate places in your mame.cmd

Quote
if "%2" == "C:\emus\otheremus\cps3\roms" goto cps3


:cps3
cd C:\Program Files\Autohotkey
autohotkey.exe C:\emus\cps3.ahk %1
exit

As always, change the file paths to your own.

Let me know if this works for you!

As for the command line showing up when you launch zinc, I don't think I've ever had that problem with Zinc and Mala. Are you sure you have Dos Window State set to hidden on the main Mala config menu?
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 24, 2011, 09:44:54 pm
Hi Nitz,

Have been called out to work again....away from my computer for 3 days.

Have only had time to try the auto start fix....and its all good  ;D ;D ;D...but the controllers don't work :-[ Any thoughts??

Windows is hidden state....as it works correctly for all MAME games. It only shows up as a Blue Bar at the top of the screen, flashing up 3 times!!

Will have a crack at the "mute" fix when I get home.

Thanks again for all your excellent work.

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 27, 2011, 01:08:45 am
Hi Nitz,

Back now...... ;D

Unfortunately I couldn't get that to work.

It would still "stutter" on exit, infact after the first exit it would re-load the game, then when it did exit the emulator was running minimized in the bottom left corner??

Don't know if this was contributing, but I also had to run the "black screen" ahk file like in model2 in the command line (as the emu is almost exactly the same as M2)

Any help appreciated.
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 27, 2011, 01:22:05 am
Hi Nitz,

With regard to the hidden state for zinc games.....is this correct, and what you were referring to??

Any idea how to configure the controls...or where to get the correct file?

If it makes any difference, I'm running a JPAC

Cheers
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 27, 2011, 03:29:01 am
Update.......

Looks like I might have the controls sorted.

Used ZincCab, reconfigured the controls, then pointed the mame.cmd file to ZincCab.exe

First trials look good. Will have to configure each game, but it all looks good.

Just need to sort the stuttering and the flashing "drunken muppets" issue.

Cheers

Sega_mad
Title: Re: How do I stop Model 2 from showing at launch??
Post by: sega_mad on July 27, 2011, 05:19:58 pm
Hi Nitz,

I think the issue might be that I'm trying to run 2 ahk files. 1 to hide the emu on startup, the other to mute...what do you think...or am I way off. Maybe we could combine the 2 ahk files into one??

Cheers

Sega_mad