Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

I was wondering if there was a way to have a certain program run before only certain Mame games. I need to run a program to change the resolution of the monitor before launching a game in 640x480. I'm using a 15Khz Arcade Monitor and an ArcadeVGA 3000 card. My GameEx runs in 640x288 which is a non-interlaced resolution. Running a game in an interlaced resolution causes directdraw to crash, unless you change to that resolution first (and vice versa if launcing a non-interlaced game from an interlaced resolution). Since most games don't need interlaced resolutions, it is best to run GameEx at one that isn't. I have switchres, which is a few exe files to change the resolution. I can launch these games properly with a batch file from the command prompt by running 640x480.exe before the game, then 640x288.exe after the game. However, I haven't found a way to do this with GameEX.

Would the best solution be to add Mame as another emulator, and only include those games in its rom directory? Then I could set up a file to run before and after. Seems that would work, but was wondering if there would be a simpler solution?

Posted

There's a utility to do this, but I've never used it. I think it's called multires or something (definitely has res in the file name). It might be in the files section here, but it definitely should be in the BYOAC files area.

Posted

Right, I have this tool, that is the 640x480.exe I'm referring to. I think it is called changeres. As I said, I've made a batch file to do this. My question is how to trigger this behavior from Gameex. Most games don't need this to be run, only a few. Is there a way that I could have Gameex do something similar to my batch file (but only for certain games):

640x480.exe

mame.exe gamename.zip

640x288.exe

Posted

Right, I have this tool, that is the 640x480.exe I'm referring to. I think it is called changeres. As I said, I've made a batch file to do this. My question is how to trigger this behavior from Gameex. Most games don't need this to be run, only a few. Is there a way that I could have Gameex do something similar to my batch file (but only for certain games):

640x480.exe

mame.exe gamename.zip

640x288.exe

Launch an ahk script that takes [ROM] as a parameter and selectively execute your resolution switching exe based on the ROM name.

BTW, you can also detect and switch resolutions within ahk. Here's an example of something you might be able to adapt.


;Custom resolution switching
EMU = %1%
RES = %A_ScreenWidth% . "x" . %A_ScreenHeight%
if (EMU = "GameEx" and RES <> "1600x1200")
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1600) , (Hei:=1200) , (Hz:=60) )
else if (EMU = "Emerson_Arcadia_2001")
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1024) , (Hei:=768) , (Hz:=60) )

ChangeDisplaySettings( cD, sW, sH, rR ) {
VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
NumPut(cD,dM,104), NumPut(sW,dM,108), NumPut(sH,dM,112), NumPut(rR,dM,120)
Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}

Guest
This topic is now closed to further replies.
×
×
  • Create New...