Dual Monitor -2 Instances of Mame - 1 PC

HyperFighting

New member
Hi Everyone!

I have managed to do something kinda cool....

I have a dual monitor rig designed to play throttle/twinstick games.

Games like After burner and Space harrier are 1 player but I have two monitors so I got thinking it would be cool if both players could play one player games simultaneously.

I tried to get two mame64's running simultaneously but I had a heck of time finding information. In the end I found a solution that works perfectly.

Code:
cd C:\Hyperspin\RocketLauncher\roms\Mame\Mame64
start mame64 sharrier
cd C:\Hyperspin\RocketLauncher\roms\Mame\Mame32
start mame32 -video gdi sharrier

I made a .bat that loads an instance of Mame64 and an instance of Mame32 (the video is set to gdi so it doesn't conflict with d3d Mame64 runs by default)

This is great! Two players side by side playing Space Harrier!

Now my rocket launcher rig is strictly using the PCLauncher... because of the need to launch a .bat file. I'm happy only using the PC Launcher...my rig only has a handful of games...
The first issue was an error message that was resolved by adding a "Fade Title" EX: "Space Harrier (Rev A, 8751 315-5163A) [sharrier] - MAME 0.258 (LLP64) ahk_class MAME"

Now HyperSpin and RocketLauncher does not error out but unfortunately my Mame64 window is hidden behind HyperSpin I have tried for several hours to issue commands via the .bat file for it to regain focus but the best I have been able to do is maxmize the console window of mame64 and not the game window itself....

I've tapped out here hoping someone can give me some advice on this one.
 

djvj

Administrator
Staff member
Developer
HS has a nasty habit of wanting focus and a l had to add hacky methods to hide it that has worked for some computers. There is nothing you can do in a bat to hide HS, but you might be able to send an ahk command to minimize it and restore on exit, or make it transparent.

RLUI -> Settings -> Main Settings -> Hide Frontend -> True

See if that helps.
 

HyperFighting

New member
Man! djvj!!! the man the myth the legend!

Thanks so much for all the hardwork you have put into perfecting RocketLauncher over the years!
I tried your method via RocketLauncher and Hyperspin.

With RocketLauncher I actually see Mame64 appear briefly before it disappears.
With HyperSpin I miss the brief Mame64 appearances...

I'm left with a desktop on the left with overlapping Mame64,Mame32 command prompts
The right monitor fully displays Mame32 and ESC will exit and return to Hyperspin.

Hyperspin is hidden but it seems there is a conflict when the second Mame instance runs?
Mame64 is running in the taskbar but it is not in focus. The odd thing is just launching the .bat on its own is seamless.
I should mention the OS is win10

Are there other tricks I could try or do I need to change my frontend to something like attract mode?
I would love to keep Hyperspin rolling as its just about setup menu and theme wise....
 
Last edited:

HyperFighting

New member
I can emulate the behavior using the .bat file

Code:
cd C:\Hyperspin\RocketLauncher\roms\Mame\Mame64
start mame64 sharrier

Timeout 5 >Nul

cd C:\Hyperspin\RocketLauncher\roms\Mame\Mame32
start mame32 -video gdi sharrier

By adding the "Timeout" the .bat is no longer seamless....

Mame64 will launch (Full Screen left monitor)
timeout happens
Mame64 will minimize to taskbar
Mame32 will display (Full Screen right monitor)

I guess rocketLauncher adds the "Time" and that breaks the seamless.... Dual Monitor opening stuff
 

djvj

Administrator
Staff member
Developer
You're very welcome 😊

It should be relatively quick to test another FE and only this setup before hopping in and setting up all the systems. At least than can learn if moving off HS will make a diff.

I wrote the mame module to support multiple mames launching at the same time. I don't recall running into these issues you originally speak of with video modes. I had like 6 or 8 mames running at the same time, all using the same exe. The code is still in the module.
 

HyperFighting

New member
I'm gonna try to stick with HyperSpin if I can.

As I see it I have two options....either solution works for me!

.bat - What I believe is happening launching Mame32 after launching Mame64 hides the Mame64 window...
I haven't been able to find a the .bat command to maximize mame64 from the taskbar....
It seems each instance of Mame has two windows console,video window...the best I have been able to do is maximize the mame64 console window not sure what command I could issue to maximize the video window?

Mame.ahk - I saw the note on "Linking/NetPlay:" but I'm a bit intimidated lol.
I wonder if anyone would be willing to walk me through setting up Space Harrier running two instances of mame...I guess my difference is there is no linking just two separate instances running on a Left and Right monitor....I will also attempt to get this rolling and report back...
 

djvj

Administrator
Staff member
Developer
1st problem is stop using bat files, keep all the code in ahk so you can control everything.
 

HyperFighting

New member
I accept your challenge lol. I will start by trying to write the .bat file in ahk format. Thanks for pushing me in the right direction!
 

HyperFighting

New member
So I made my first ahk script...I stumbled and got some stuff to kinda work but in the end best case I just get one of the two windows to display

Code:
Run "cmd", "C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\"
WinWaitActive "C:\Windows\SYSTEM32\cmd.exe"
SendText "mame64 -priority 1 sharrier"
Send "{Enter}"

Run "cmd", "C:\Hyperspin\RocketLauncher\roms\Mame\Mame32\"
WinWaitActive "C:\Windows\SYSTEM32\cmd.exe"
SendText "mame32 -priority 2 -video gdi sharrier"
Send "{Enter}"
WinWaitActive "Space Harrier (Rev A, 8751 315-5163A) [sharrier] - MAME 0.254 (ILP32)"

Sleep 5000 ;I know this is too long to wait just making sure the window is ready to accept input....
Send "{Shift down}{LWin down}{Right}" ;Move this window to the "right" screen
Send "{Shift up}{LWin up}"

Sleep 5000 
WinRestore "Space Harrier (Rev A, 8751 315-5163A) [sharrier] - MAME 0.258 (LLP64)" ;WinRestore,WinSetEnabled,WinActivate

This will launch Mame64 and Mame32 (Mame32 gets pushed to the right screen SHIFT+WIN+RIGHT)
As soon as Mame32 launches Mame64 is hidden (not ideal)
After Mame32 is fully launched I attempt to show Mame64 but this hides Mame32 (not ideal)

I'm stuck atm....its odd that the bat file will launch them both and let them appear on their respective screens...
 

HyperFighting

New member
As an alternative to my terrible scripting attempt I am trying to use the Mame Module to see if I can get the 2 instances loading that way.
1. Under Global > Emulators- Mame is listed and the Mame64 UI launches
2. Under my custom heading "1 PLAYER" > Emulators Mame is listed and the Mame64 UI launches
3. Under my custom heading "1 PLAYER" > Games an audit finds all my games but refuses to launch them with "ahk_class mame error"
I have turned fade off but I can't make heads or tails of why the rom won't launch....
Mame Module is 2.3.10
Exe Path is "roms\Mame\Mame64\Mame64.exe"
rom Path is "roms\Mame\Mame64\roms"
OS is windows 10
 

HyperFighting

New member
I logged it...it seems that there are two rom paths not sure if this is normal or not...

Code:
11:21:16:682 | MD |     TRACE  | +0     | File.Delete - Deleting: tempBezel.txt
11:21:16:682 | MD |      INFO  | +0     | Controller Remap: Start
11:21:16:713 | MD |      INFO  | +32    | Controller Remap: ControllerRemapConfigPath: C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\ControllerRemap\ctrlr\
11:21:16:713 | MD |      INFO  | +0     | Controller Remap: No Controller config file found.
11:21:16:713 | MD |      INFO  | +0     | Controller Remap: End
11:21:16:745 | MD |     TRACE  | +31    | StringUtils.StringLength - This string is "5" long
11:21:16:745 | MD |     TRACE  | +0     | StringUtils.Right - Trimming "0.258" to "258"
11:21:16:745 | MD |      INFO  | +0     | Module - Detected MAME Product Version from 'C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\Mame64.exe' is 258
11:21:16:776 | MD |     TRACE  | +31    | StringUtils.Contains - "MAME" does not contain "ti99_4a|aes|apple2gs|electron|mbeeic|odyssey2|astrocde|samcoupe|vic10|cpc664|mo5"
11:21:16:776 | MD |     TRACE  | +0     | StringUtils.Contains - "MAME" does not contain "studio2|mpt02"
11:21:16:776 | MD |     TRACE  | +0     | StringUtils.Replace - Replacing "|" with ";"
11:21:16:807 | MD |     TRACE  | +31    | StringUtils.InStr - Could not find "-rompath" in "" starting at position 1
11:21:16:807 | MD |     TRACE  | +0     | StringUtils.InStr - Could not find "-rompath" in "" starting at position 1
11:21:16:807 | MD |     TRACE  | +0     | File.__New - Creating new file object of: "C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\cfg\MAME\sharrier"
11:21:16:838 | MD |     TRACE  | +32    | Folder.__New - Created new folder object of: "C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\cfg\MAME\sharrier"
11:21:16:838 | MD |      INFO  | +0     | Module - Running MAME in non-legacy mode
11:21:16:838 | MD |      INFO  | +0     | Module - SinglePlayer session
11:21:16:870 | MD |     TRACE  | +31    | CustomFunction.PreLaunch - Starting
11:21:16:870 | MD |     TRACE  | +0     | CustomFunction.PreLaunch - Ending
11:21:16:870 | MD |      INFO  | +0     | Process.Run - Running: "C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\Mame64.exe"  sharrier -rompath "C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\roms;C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\roms" -nowindow -nohlsl_enable -nogl_glsl -video d3d -artwork_crop -nouse_bezels -use_overlays -use_backdrops -nouse_cpanels -nouse_marquees -nofilter -skip_gameinfo
11:21:16:963 | MD |     DEBUG  | +94    | Process.Run - "Mame64.exe  sharrier -rompath "C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\roms;C:\Hyperspin\RocketLauncher\roms\Mame\Mame64\roms" -nowindow -nohlsl_enable -nogl_glsl -video d3d -artwork_crop -nouse_bezels -use_overlays -use_backdrops -nouse_cpanels -nouse_marquees -nofilter -skip_gameinfo" Process ID: 420
11:21:16:963 | MD |     TRACE  | +0     | CustomFunction.PostLaunch - Starting
11:21:16:963 | MD |     TRACE  | +0     | CustomFunction.PostLaunch - Ending
11:21:16:995 | MD |     TRACE  | +31    | Window.__New - Created: "ahk_id 2295548"
11:21:16:995 | MD |     TRACE  | +0     | MiscUtils.DetectHiddenWindows - Mode changed to "Off"
11:21:16:995 | MD |     TRACE  | +0     | Window.GetPos - Retrieved x:483 y:475 w: 375 h: 179 from "ahk_id 2295548"
11:21:16:026 | MD |     TRACE  | +31    | MiscUtils.DetectHiddenWindows - Mode changed to "On"
11:21:17:026 | MD |     DEBUG  | +0     | MiscUtils.GetActiveWindowStatus - Title: Reload | Class: #32770 | State: 0 | X: 483 | Y: 475 | Width: 375 | Height: 179 | Window HWND: 0x2306fc | Process ID: 10100 | Process Path: C:\Program Files\Notepad++\notepad++.exe
11:21:17:026 | MD |      INFO  | +0     | Window.Wait - Waiting for window "ahk_class MAME"
11:21:47:049 | MD |     TRACE  | +30031 | Window.__New - Created: "ahk_id 329252"
11:21:47:049 | MD |     TRACE  | +0     | MiscUtils.DetectHiddenWindows - Mode changed to "Off"
11:21:47:049 | MD |     TRACE  | +0     | Window.GetPos - Retrieved x:57 y:71 w: 1150 h: 967 from "ahk_id 329252"
11:21:47:081 | MD |     TRACE  | +32    | MiscUtils.DetectHiddenWindows - Mode changed to "On"
11:21:47:081 | MD |     DEBUG  | +0     | MiscUtils.GetActiveWindowStatus - Title: RocketLauncherUI v1.0.1.10 [ FE = HyperSpin | Plugin = HyperSpin ] | Class: HwndWrapper[RocketLauncherUI.exe;;4bf17ffc-91cd-47da-9bc5-cfe26b0fc8e2] | State: 0 | X: 57 | Y: 71 | Width: 1150 | Height: 967 | Window HWND: 0x50624 | Process ID: 8264 | Process Path: C:\Hyperspin\RocketLauncher\RocketLauncherUI\RocketLauncherUI.exe
11:21:47:081 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Started
11:21:47:112 | MD |     DEBUG  | +31    | XHotkeyTableCreation - KeyGroup ~End is in TableKeyGroups ~End,~e&~t,
11:21:47:112 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 10 check
11:21:47:112 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Disabled Hotkey for: "~End"
11:21:47:143 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Post loop 11 check
11:21:47:143 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Disabling "CloseProcess" standard Hotkey method for key(s): "~End"
11:21:47:143 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 12 check
11:21:47:143 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Ended
11:21:47:175 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Started
11:21:47:175 | MD |     DEBUG  | +0     | XHotkeyTableCreation - KeyGroup ~End is in TableKeyGroups ~End,~e&~t,
11:21:47:175 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 10 check
11:21:47:206 | MD |     DEBUG  | +32    | XHotkeyTableCreation - Disabled Hotkey for: "~End"
11:21:47:206 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 11 check
11:21:47:206 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Using standard Hotkey method for key(s): "~End" to call label: "CloseError"
11:21:47:206 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 12 check
11:21:47:237 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Ended
11:21:47:581 | MD |     DEBUG  | +344   | ScriptError - Playing error sound: error5.mp3
11:21:49:444 | MD |     DEBUG  | +1859  | XHotkeyTableCreation - Started
11:21:49:444 | MD |     DEBUG  | +0     | XHotkeyTableCreation - KeyGroup ~End is in TableKeyGroups ~End,~e&~t,
11:21:49:453 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 10 check
11:21:49:474 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Disabled Hotkey for: "~End"
11:21:49:483 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 11 check
11:21:49:505 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Disabling "CloseError" standard Hotkey method for key(s): "~End"
11:21:49:505 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 12 check
11:21:49:513 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Ended
11:21:49:537 | MD |     DEBUG  | +32    | XHotkeyTableCreation - Started
11:21:49:537 | MD |     DEBUG  | +0     | XHotkeyTableCreation - KeyGroup ~End is in TableKeyGroups ~End,~e&~t,
11:21:49:545 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 10 check
11:21:49:567 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Disabled Hotkey for: "~End"
11:21:49:567 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Post loop 11 check
11:21:49:575 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Using standard Hotkey method for key(s): "~End" to call label: "CloseProcess"
11:21:49:599 | MD |     DEBUG  | +31    | XHotkeyTableCreation - Post loop 12 check
11:21:49:599 | MD |     DEBUG  | +0     | XHotkeyTableCreation - Ended
11:21:49:607 | MD |     ERROR  | +0     | ScriptError - There was an error waiting for the window "ahk_class MAME". Please check you have the correct version emulator installed for this module, followed any notes in the module, and have this emulator working outside your Frontend first. Also turn off Fade to see if you are hiding your problem.
 

HyperFighting

New member
[Update] I did manage to get Mame running - I had an older version of Mame in another rig and that seemed to work when I point the directories etc...
My goal was to investigate the Link/Network settings - from the standpoint of what I am trying to achieve I don't know how to make the settings work the way I want.

1. 1 Player games are two instances of mame 1 per monitor... EX: Space Harrier/AfterBurner
2. 2 Player games are mirrored to both monitors through 1 mame instance EX: Final Fight/Simpsons

I tried "Enable_Link_Play" setting the value to 2 (2 monitors)
I tried "Max Player per Monitor" 1

There is always an option popping up to play multiplayer or not...In my case I don't need this option...
I tried to play with the options to see if I could get two instances launching but I was unsuccessful....

My thought is the custom AHK script through the PCLauncher might be my best bet for running two instances...If I could somehow get both instances to run at the same time...without minimizing each other doh!
 

HyperFighting

New member
OK so here goes....
I am trying to get two instances of Mame running simultaneously with key inputs....
I have achieved this via the following .bat script
Code:
cd C:\Hyperspin\RocketLauncher\roms\Mame\Mame64
start mame64 -priority 1  sharrier

cd C:\Hyperspin\RocketLauncher\roms\Mame\Mame32
start mame32 -priority 2 -video gdi sharrier

The problem is rocketLauncher does not like the .bat and neither does djvj he has challenged me to a duel and I accept to attempt to autoHotKey up my .bat

Well I have been struggling so I figured if djvj already put the work in then why not use his mame module...my jam is the PCLauncher just having one module and a handful of scripts to launch my gamez....but hey maybe the module actually built for mame would work =)

Well I struggled hard and couldn't get the mame module to launch...
The issue was my mame versions (Insert More Coins) version .259
I tested an older version mame 0.156 and the module launched...I tried out the module settings but I can't get the instances running and it seems overkill for what I need so I kept struggling with a .ahk script that would launch from the PCLauncher then it dawned on me maybe an older mame version like my old 0.156 version would work...and sure enough this script pulls up two screens...I am ashamed because I can't get ahk parameters to work to just run mame....it can't load the rom when I attempt to just run mame with parameters so I launch a command prompt and do all this funky stuff...

Code:
Run "cmd", "C:\Hyperspin\RocketLauncher\roms\Mame\MAME\"
WinWaitActive "C:\Windows\SYSTEM32\cmd.exe"
MasterID := WinActive("C:\Windows\SYSTEM32\cmd.exe")
SendText "mame -priority 1 -nofilter sharrier"

Run "cmd", "C:\Hyperspin\RocketLauncher\roms\Mame\MAME_SLAVE\"
WinWaitActive "C:\Windows\SYSTEM32\cmd.exe"
SendText "mame -priority 2 -video gdi sharrier"
Send "{Enter}"
WinWaitActive "Space Harrier (Rev A, 8751 315-5163A) [sharrier]"
Sleep 1000
Send "{Shift down}{LWin down}{Right}"
Send "{Shift up}{LWin up}"

WinActivate masterID
Send "{Enter}"

I'm kinda tapping out as my mind is fried....the shitty part is this only works with an old version of mame w/ a nag screen and I can't find old precompiled version despite my searches...this isn't ideal....I would really like to use recent version of Mame64/Mame32 if possible.

Using my new Mame64 and Mame32 builds I do have a method that I believe will work but I haven't been able to get it there...
The ideal is use the same script as above but use "-window -nomaximize" so now you have two tiny windows on monitor 1 and 2
Then you send the "Alt+Enter" hot key to each window which I believe is like "Send "!{Enter}" but I can't seem to send the command to the windows...
I can send it to the CMD but not the damn windows...

I'm stuck atm....
 
Last edited:

HyperFighting

New member
So more research shows that sending simple key commands to mame through ahk or powershell like "alt+enter" is difficult next to impossible. Apparently you can compile your own version that will allow this behavior but as far as I know it can't be done....
The best I have been able to come up with is running a Mame64 and Mame32 maximized window on each screen.
So close but the damn window borders look lame....full screen is where its at but I'm still stuck on that one atm.
 

HyperFighting

New member
Hi everyone!

I'm back with another update...sorry for constantly repeating myself....

So to put things into perspective...I am trying to run two instances of Mame on a dual monitor setup.
The intention is for two players to play the same 1 player game against each other in a VS mode setup.
EX: Space Harrier is 1 player - both players sit beside each other and see who can complete the levels with the highest score get the furthest without dying etc...

I have a low tier PC - mini lenovo i7 HD4600 integrated card.
I figure since I will show you my hacky methods they are based on this setup you might have much better luck with your more powerful systems.

So I came up with a simple solution that is at the top of the thread run Mame64 and Mame32 (video mode gdi on the 32 bit version)
Now you are playing with power provided your mame versions are setup to respective displays and receive inputs.

Unfortunately launching my .bat file via the PCLauncher created a wack a mole situation one window would always hide when the .bat was run.
I replicated the behavior by putting time between the launches of the two mame versions in the .bat file.

djvj - suggested use ahk but as far as I could tell it did the same thing....I finally got it working launching from rocketlauncher displaying both screens etc...
Now this script is ugly in many ways
A) zero ahk experience
B) when I cleaned the script up to just launch mame via setting a directory and using the command line parameters it broke and went to wack mole mode again... so my method to load mame is less than desirable.
C) There are commands issued that seem useless or unnecessary but without them the script doesn't work so here it is in its awful state....

Code:
;Break the monitors into seperate screens
Run 'wsds.exe -mode extend'
Sleep 1000

;Long winded and painfully load Mame64
Run "cmd", "C:\Hyperspin\RocketLauncher\roms\Mame\MAME64\"
WinWaitActive "C:\Windows\SYSTEM32\cmd.exe"
SendText "mame64 -priority 1 -window -maximize -nofilter valkyrie"
Send "{Enter}"
MasterID := WinActive("C:\Windows\SYSTEM32\cmd.exe")
WinMinimize MasterID
Sleep 1000
WinWaitActive "Valkyrie no Densetsu (Japan) [valkyrie] - MAME 0.258 (LLP64)"
WinSetStyle "-0xC00000", "A"
WinWaitActive "Valkyrie no Densetsu (Japan) [valkyrie] - MAME 0.258 (LLP64)"
WinMaximize
Sleep 1000

;Long winded and painfully load Mame32 -> Send it to the right screen
Run "cmd", "C:\Hyperspin\RocketLauncher\roms\Mame\MAME32\"
WinWaitActive "C:\Windows\SYSTEM32\cmd.exe"
SendText "mame32 -priority 2 -window -maximize -nofilter -video gdi valkyrie"
Send "{Enter}"
SlaveID := WinActive("C:\Windows\SYSTEM32\cmd.exe")
WinMinimize SlaveID
Sleep 1000
Send "{Shift down}{LWin down}{Right}"
Send "{Shift up}{LWin up}"
WinWaitActive "Valkyrie no Densetsu (Japan) [valkyrie] - MAME 0.254 (ILP32)"
WinSetStyle "-0xC00000", "A"
WinWaitActive "Valkyrie no Densetsu (Japan) [valkyrie] - MAME 0.254 (ILP32)"
WinMaximize
WinWaitActive "Valkyrie no Densetsu (Japan) [valkyrie] - MAME 0.254 (ILP32)"
Send "{Shift down}{LWin down}{Right}"
Send "{Shift up}{LWin up}"

Even though this script looks like its using duct tape, scotch tape and crazy glue I would be happy to use it if it worked properly...After all this getting two screens to display mame cleanly...the focus is on Mame32 due to it being the last .exe to load in the script now my joystick input doesn't work in Mame64 because the window doesn't have focus...I have screwed around with returning focus to mame64 etc but now its the wack a mole of input situation that is killing me...if anyone can step in at this point I would greatly appreciate it.....
 

HyperFighting

New member
I've got a method to the madness that works...

This is running off a single low end pc...

1. Hyperspin has 1 mirrored screen both players control to select their game
2. When the game launches if its a 1 player game the screen splits into extended mode (Dual Monitor Mode)
3. The players can player their independent sessions of the same game.
4. When the game is exited the screens combine and control is returned to mirror mode and the players have control over the Hyperspin interface.

Here is what you need:

1. Hyperspin or (frontend of choice not tested)
2. RocketLauncher - We are using the PCLauncher Module for this....

Con - you need this set up for each game! So if you have more than a handful it will be tedious.
Pro - I'm running no nag mame (insert more coins) it seems this version isn't working if I were to try and set up a mame module....
but being we are using PCLauncher these versions of Mame will work just fine =)

3. Mame32 build
4. Mame64 build

5 .https://wizardsoft.nl/products/wsdisplaysettings - easily jump your monitor between monitor modes
EX: Run 'wsds.exe -mode extend'

6. https://www.displayfusion.com/ - DisplayFusion

7. The script above - lets call it sharrier.ahk - note per game you must adjust the script
EX: rom name - sharrier / WinWaitActive (use AutoHotKey/Window Spy)

8.KILL_MAME.bat (launches a powershell script) - all I can say is it works

Code:
@echo off
wsds.exe -mode clone
Timeout 3 >Nul
powershell.exe  -ExecutionPolicy Bypass -File "C:\Hyperspin\RocketLauncher\roms\Mame\1playerVS\KILL_MAME.ps1"

9. KILL_MAME.ps1 - launched by KILL_MAME.bat

Code:
kill -name mame64
kill -name cmd

Here is the setup:

RocketLauncherUI -
1. Modules > PCLauncher > Edit System (little button)

2. Press the + and add your game. This assumes you have a database set up with your game in it.
Now the magical part...

3. Application Tab > Application select your games script in this case sharrier.ahk
Tells rocket launcher to launch Mame64 then Launch Mame32 and chuck it to the other screen.

4. Application Tab > AppWaitExe > Select Mame32
We will wait until Mame32 is killed to launch our exit script.

5. Pre/Post Launch Tab > PrePostExit > Select KILL_MAME.bat
When you exit the game only mame32 is killed Mame64 is still alive!
The kill mame script kills Mame64 and combines the screens back to their original mirrored state.

6. Misc Tab > Fade Title use the utility in RocketLauncher or Window Spy to capture the mame32 window...This is the same mame32 line as your sharrier.ahk script...
If you don't do this RocketLauncher will error out shortly after your game(s) start.

7. FadeTitleWaitTilActive > True

8. Everything works great but one window is not controllable so here is DisplayFusion to the rescue.
A) Triggers
B) Enable Triggers check box
C) Add button
D) Process Filename checkbox, select application > Mame64
E) Add Button > Run Function > Window Management > Prevent Window Deactivation

Now you should have what you need to enter and exit "cleanly" into and out of the HyperSpin interface.
(can't speak to other frontends but hopefully this works for them too)
I'm sure there are way better approaches I would love to be schooled on better ways...
EX: cutout WS.exe and DisplayFusion, improve the horrific script etc...

please post if you think you can smooth this process out...
I hope this helps someone out there.
 
Last edited:
Top