ghutch92 Posted August 14, 2012 Posted August 14, 2012 Edit: THIS IS ALREADY IN RocketLauncher. THERE ARE INSTRUCTIONS FOR IT IN THE SEGA MODEL 2 MODULE NOTES. Now you can play with up to 8 people on the Sega Model 2. Imagine a Daytona race with 7 friends. Doesn't that sound awesome? Only 4 players allowed per machine since any more looks bad on one screen and would be rough on a normal CPU. In this update: You can now enable or disable the link screen according to games. Add the name to the setting in the "Settings.ini" For multiplayer to work you will need to create a folder structure like the one in the image. Each folder with the red line contains the files in the black box. NetResView is for players who want to be able to play over LAN with this module. It is a small, free program by nirsofer and can be downloaded here Here's my script for a module that can make it happen. It is messy and long, but it should work. ;--------------------------------------------------------------------------------------------------------- ; Sega Model 2 (with Multiplayer Support) ; Sega Model 2 Emulator Multi-CPU v1.1 ; emulator_multicpu.exe ; by ghutch92 ; (single player code based off of Shateredsoul & djvj module 1.4) ; ; Notes: ; Oustide of Hyperspin, open the folder with the Sega Model 2 Emulator ; Open the EMULATOR.INI and set your Dir1 to your roms dir (no backslash needed) ; User defined settings for screen resolution and spitscreen styles can be defined in the section after ; the dashed line. ; ; For Multiplayer Support: ; If you plan on using LAN, you will need to download the free program netresview by nirsofer. ; Place the netresview.exe in your Sega Model 2 emulator folder, in a folder called "NetResView". ; Be sure to run it once to see if it gets computer names and ip addresses. ; Put one installation of the emulator inside a folder named "Player 2", another installation ; in a folder named "Player 3" and finally another installation in a folder named "Player 4". These folders ; should all be inside the Sega Model 2 emulator folder. ; ; You will also need the "m2network.ini" file with each installation of the emulator. ;################---m2network.ini---############### ;# [network] ;# Rxport=1978 ;# NextIp=127.0.0.1 ;# NextPort=1979 ;################################################## ; ; Included in this module's folder should be a file named "Settings.ini" ;################---Settings.ini---#################################### ;# ;This is for the ghutch92 sega model 2 module for hyperspin. ;# ;put in the same folder as the player 1 emulator ;# ; I.P. Addresses of computers on LAN. ;# ; 8 LAN connections is the maximum ;# [network] ;# LocalorLAN=Local ;# TotalMachines=1 ;# ThisMachineNumber=1 ;# CombinedPlay=0 ;# ;do not change Local Address ;# LocalAddress=127.0.0.1 ;# OpponentAddress=192.168.1.72 ; ;# [history] ;# Address1=192.168.1.64 ;# Address2=192.168.1.2 ;# Address3=192.168.1.3 ;# Address4=192.168.1.4 ;# Address5=192.168.1.5 ;# Address6=192.168.1.6 ;# ;# [start_gui] ;# ;rom names that need link start screen (separate with comma) ;# start_gui_games = dayton93,daytona,daytonagtx,daytonat,indy500,manxtt,motoraid,overrev,segawski,sgt24h,skisuprg,skytargt,srallyc,stcc,waverunr ;# ;######################################################################## ;--------------------------------------------------------------------------------------------------------- ;~~~~~2 Player splitscreen setting~~~~~~~ VerticalSplit = true ;For a Horizontal Split: "VerticalSplit = false" ;For a Vertical Split: "VerticalSplit = true" ;~~~~~3 Player splitscreen setting~~~~~~~ 3playersP1 = top ;For the Player1 screen to be on left: "3playersP1 = left" ;For the Player1 screen to be on top: "3playersP1 = top" ;For the Player1 screen to be on bottom: "3playersP1 = bottom" ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CloseOnlyOne = true ;To close Multiplayer screens one at a time to allow for saving or continuing: "CloseOnlyOne = true" ;To close all screens at the same time: "CloseOnlyOne = false" FullMode = 4 ;FullMode values {0,1,2,3,4} ; 640x480 = 0 ; 800x600 = 1 ; 1024x768 = 2 ; 1280x1024 = 3 ; Custom = 4 ; ;Set Custom Screen Size ;To use these values change the value for "FullMode" to = 4 fsWidth=%A_ScreenWidth% ;Use "%A_ScreenWidth%" sans quotation marks to use current screen width fsHeight=%A_ScreenHeight% ;Use "%A_ScreenHeight%" sans quotation marks to use current screen height ;Be sure that these are acceptable values for your driver ;--------------------------------------------------------------------------------------------------------- settingsFile := CheckFile("C:\Hyperspin" . "\Modules\" . "Sega Model 2" . "\Settings.ini") IniRead, start_gui_games, %settingsFile%, start_gui, start_gui_games skip = true Loop, Parse, start_gui_games, CSV { If (A_LoopField = romName) skip = false } If (skip = "true") { NumberOfPlayers = 1 GoTo NoLinkStart } ;Create window asking how many players are playing Gui, 3:Color, 000000 Gui, 3:-Caption +ToolWindow +AlwaysOnTop +LastFound Gui, 3:Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% WinSet, Transparent, 200 HowMany: Link=false Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s20 w800 ;, Comic Sans MS Bold Gui, Add, Text,,How many players? Gui, Font, s14 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,xp+85 yp+38,(No Link) Gui, Font, s20 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Button,Default xp-70 yp+32 w100 h50,1 Gui, Add, Button,xp+130 w100 h50,2 Gui, Add, Button,xp-130 yp+55 w100 h50,3 Gui, Add, Button,xp+130 w100 h50,4 Gui, Font, s12 w800 ;, Comic Sans MS Bold Gui, Add, Button,xp-155 yp+102 w140 h58,Old Settings Gui, Add, Button,xp+150 w140 h58,New Settings Gui, Font, s20 w800 ;, Comic Sans MS Bold Gui, Add, Text,xp-80 yp-42,Link Using... Gui, Show, AutoSize Center return Button1: If (GuiLinking = "true") AND (GuiLinkingLanPlayers = "true" OR GuiLinkingLanMachineTwo = "true") { NumberOfPlayers = 1 GoTo LanSetup } If (GuiLinkingLanPlayers = "true") { CombinedPlay = 1 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { GuiLinkingLanPlayers = true ThisMachineNumber = 1 IniRead, MachineNum, %settingsFile%, network, ThisMachineNumber If (MachineNum != ThisMachineNumber) IniWrite,%ThisMachineNumber%, %settingsFile%, network, ThisMachineNumber CombinedPlay = 0 IniRead, CoPlay, %settingsFile%, network, CombinedPlay If (CoPlay != CombinedPlay) IniWrite,%CombinedPlay%, %settingsFile%, network, CombinedPlay GoTo GuiLinking } NumberOfPlayers = 1 If (Link="true") GoTo LinkStart Else GoTo NoLinkStart Button2: If (GuiLinking = "true") AND (GuiLinkingLanPlayers = "true" OR GuiLinkingLanMachineTwo = "true") { NumberOfPlayers = 2 GoTo LanSetup } If (GuiLinkingLanPlayers = "true") { CombinedPlay = 2 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 2 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 2 GoTo GuiLinkingLanMachineTwo } NumberOfPlayers = 2 If (Link="true") GoTo LinkStart Else GoTo NoLinkStart Button3: If (GuiLinking = "true") AND (GuiLinkingLanPlayers = "true" OR GuiLinkingLanMachineTwo = "true") { NumberOfPlayers = 3 GoTo LanSetup } If (GuiLinkingLanPlayers = "true") { CombinedPlay = 3 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 3 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 3 GoTo GuiLinkingLanMachineTwo } NumberOfPlayers = 3 If (Link="true") GoTo LinkStart Else GoTo NoLinkStart Button4: If (GuiLinking = "true") AND (GuiLinkingLanPlayers = "true" OR GuiLinkingLanMachineTwo = "true") { NumberOfPlayers = 1 GoTo LanSetup } If (GuiLinkingLanPlayers = "true") { CombinedPlay = 4 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 4 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 4 GoTo GuiLinkingLanMachineTwo } NumberOfPlayers = 4 If (Link="true") GoTo LinkStart Else GoTo NoLinkStart Button5: If (GuiLinkingLanPlayers = "true") { CombinedPlay = 5 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 5 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 5 GoTo GuiLinkingLanMachineTwo } Button6: If (GuiLinkingLanPlayers = "true") { CombinedPlay = 6 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 6 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 6 GoTo GuiLinkingLanMachineTwo } Button7: If (GuiLinkingLanPlayers = "true") { CombinedPlay = 7 GoTo GuiLinking } If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 7 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 7 GoTo GuiLinkingLanMachineTwo } Button8: If (GuiLinkingLanMachineTwo = "true") { ThisMachineNumber = 8 GoTo GuiLinkingLanPlayers } If (GuiLinkingLanMachineOne = "true") { TotalMachines = 8 GoTo GuiLinkingLanMachineTwo } GuiClose: GuiEscape: Gui Destroy Gui, 3:Destroy WinActivate, HyperSpin ExitApp ;End HowMany prompt NoLinkStart: IniRead, LocalAddress, %settingsFile%, network, LocalAddress LocAddress = %LocalAddress% emupath2=%emupath% Port=1978 Loop, %NumberOfPlayers% { If (A_Index > 1) emupath := emupath2 . "Player " . A_Index . "\" NetworkINI := CheckFile(emuPath . "m2network.ini") IniRead, RxPort, %NetworkINI%, network, RxPort If(RxPort != %Port%) IniWrite, %Port%, %NetworkINI%, network, RxPort IniRead, NextIp, %NetworkINI%, network, NextIp If(NextIp != (LocAddress)) IniWrite, %LocAddress%, %NetworkINI%, network, NextIp IniRead, NextPort, %NetworkINI%, network, NextPort If(NextPort != %Port%) IniWrite, %Port%, %NetworkINI%, network, NextPort } emupath = %emupath2% Start: Gui Destroy Gui, 3:Destroy Pass=false GUI_ID := FadeInStart() If (NumberOfPlayers = 1) ;-------------------------------------------------------------------------------------------------- ;---------------------------------------- One Player ---------------------------------------------- ;-------------------------------------------------------------------------------------------------- { SM2EINI_1 := CheckFile(emuPath . "EMULATOR.ini") IniRead, cFullmode, %SM2EINI_1%, Renderer, FullMode IniRead, cAutoFull, %SM2EINI_1%, Renderer, AutoFull IniRead, cWidth, %SM2EINI_1%, Renderer, FullScreenWidth IniRead, cHeight, %SM2EINI_1%, Renderer, FullScreenHeight ; Setting Fullscreen in ini If(cFullmode != FullMode) IniWrite, %VideoMode1P%, %SM2EINI_1%, Renderer, FullMode If(cAutoFull != 1) IniWrite, 1, %SM2EINI_1%, Renderer, AutoFull If(cWidth != fsWidth) IniWrite, %fsWidth%, %SM2EINI_1%, Renderer, FullScreenWidth If(cHeight != fsHeight) IniWrite, %fsHeight%, %SM2EINI_1%, Renderer, FullScreenHeight 7z1 := 7z(romPath, romName, romExtension, 7zExtractDir) Run, %executable% %romName%, %emuPath%,,SM2E_PID WinWait, ahk_pid %SM2E_PID% WinWaitActive, ahk_pid %SM2E_PID%,,10000 Sleep, 2000 ; Increase if Hyperspin is getting a quick flash in before the game loads GUI_ID2 := FadeInExit() } Else { ;-------------------------------------------------------------------------------------------------- ;------------------------------------------- 2-8 Players ------------------------------------------ ;-------------------------------------------------------------------------------------------------- 7z1 := 7z(romPath, romName, romExtension, 7zExtractDir) emupath2=%emupath% Loop, %NumberOfPlayers% { If (A_Index > 1) emupath := emupath2 . "Player " . A_Index . "\" SM2EINI := CheckFile(emuPath . "EMULATOR.ini") IniRead, cAutoFull, %SM2EINI%, Renderer, AutoFull ; Removing Fullscreen If(cAutoFull != 0) IniWrite, 0, %SM2EINI%, Renderer, AutoFull ; Hyperspin currently does not allow for 2 different roms to be chosen. You can change games inside the emulator. ; Multiplayer is done by opening up multiple instances of the emulator (it's like each player has their own machine). Run, %executable% %romName%, %emuPath%,,ArraySM2E%A_Index% SM2E_PID := ArraySM2E%A_Index% } SM2E_PID_1 := ArraySM2E1 SM2E_PID_2 := ArraySM2E2 SM2E_PID_3 := ArraySM2E3 SM2E_PID_4 := ArraySM2E4 SetWinDelay=0 Sleep 2000 ; resize emulator windows 1playersWinRS: If (NumberOfPlayers = 1) WinMove, ahk_pid %SM2E_PID_1%,,0,0,(A_ScreenWidth),(A_ScreenHeight) 2playersWinRS: If (NumberOfPlayers = 2) { If (VerticalSplit != "true") { WinMove, ahk_pid %SM2E_PID_1%,,0,0,(A_ScreenWidth/2),(A_ScreenHeight) WinMove, ahk_pid %SM2E_PID_2%,,(A_ScreenWidth/2),0,(A_ScreenWidth/2),(A_ScreenHeight) } Else { WinMove, ahk_pid %SM2E_PID_1%,,0,0,(A_ScreenWidth),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_2%,,0,(A_ScreenHeight/2),(A_ScreenWidth),(A_ScreenHeight/2) } } 3playersWinRS: If (NumberOfPlayers = 3) { If (3playersP1 = "left") { WinMove, ahk_pid %SM2E_PID_1%,,0, 0, (A_ScreenWidth/2),(A_ScreenHeight) WinMove, ahk_pid %SM2E_PID_2%,,(A_ScreenWidth/2),0, (A_ScreenWidth/2),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_3%,,(A_ScreenWidth/2),(A_ScreenHeight/2),(A_ScreenWidth/2),(A_ScreenHeight/2) } Else If (3playersP1 = "top") { WinMove, ahk_pid %SM2E_PID_1%,,0, 0, (A_ScreenWidth), (A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_2%,,0, (A_ScreenHeight/2),(A_ScreenWidth/2),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_3%,,(A_ScreenWidth/2),(A_ScreenHeight/2),(A_ScreenWidth/2),(A_ScreenHeight/2) } Else { WinMove, ahk_pid %SM2E_PID_1%,,0, (A_ScreenHeight/2),(A_ScreenWidth), (A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_2%,,0, 0, (A_ScreenWidth/2),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_3%,,(A_ScreenWidth/2),0, (A_ScreenWidth/2),(A_ScreenHeight/2) } } 4playersWinRS: If (NumberOfPlayers = 4) { WinMove, ahk_pid %SM2E_PID_1%,,0, 0, (A_ScreenWidth/2),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_2%,,(A_ScreenWidth/2),0, (A_ScreenWidth/2),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_3%,,0, (A_ScreenHeight/2),(A_ScreenWidth/2),(A_ScreenHeight/2) WinMove, ahk_pid %SM2E_PID_4%,,(A_ScreenWidth/2),(A_ScreenHeight/2),(A_ScreenWidth/2),(A_ScreenHeight/2) } ; MultiPlayer If (Pass = "false") { GroupAdd,DIE,DIEmWin GroupClose, DIE, A Loop, %NumberOfPlayers% { SM2E_PID := ArraySM2E%A_Index% Sleep 50 WinSet, AlwaysOnTop,On,ahk_pid %SM2E_PID% WinSet, Style, 0x800000, ahk_pid %SM2E_PID% WinShow, ahk_pid %SM2E_PID% WinGet,WID_%A_Index%,ID,ahk_pid %SM2E_PID% } GUI_ID2 := FadeInExit() WinActivate, ahk_pid %SM2E_PID_1% } Else { Loop, %NumberOfPlayers% { SM2E_PID := ArraySM2E%A_Index% WinSet, AlwaysOnTop,On,ahk_pid %SM2E_PID% DllCall("SetMenu", uint, WID_%A_Index%, uint, Menu_%A_Index%) WinGet,WID_%A_Index%,ID,ahk_pid %SM2E_PID% } GUI_ID4 := FadeOutExit() WinActivate, ahk_pid %SM2E_PID_1% } ; Set variables for CheckLoop MouseIdleTime = 0 MouseGetPos, mX, mY OldmX= %mX% OldmY= %mY% Pass = true Menu_1 := DllCall("GetMenu", uint, WID_1) Menu_2 := DllCall("GetMenu", uint, WID_2) Menu_3 := DllCall("GetMenu", uint, WID_3) Menu_4 := DllCall("GetMenu", uint, WID_4) Loop, %NumberOfPlayers% { SM2E_PID := ArraySM2E%A_Index% GroupAdd,SM2E, ahk_pid %SM2E_PID% } ;************************************************* CheckLoop ********************************************** Loop { Loop 5 { Sleep 1 GetKeyState, state, Escape ;change Escape to your current exitemukey (HS default is Escape) if state = D { GroupClose, SM2E, R Break } } ; Check to see if a window closed If !WinExist("ahk_pid " . SM2E_PID_1) { GUI_ID3 := FadeOutStart() If (CloseOnlyOne = "false") Break Else { NumberOfPlayers -= 1 If (NumberOfPlayers<= 0) Break If (NumberOfPlayers = 1) { SM2E_PID_1 = %SM2E_PID_2% GoTo 1playersWinRS } If (NumberOfPlayers = 2) { SM2E_PID_1 = %SM2E_PID_2% SM2E_PID_2 = %SM2E_PID_3% GoTo 2playersWinRS } If (NumberOfPlayers = 3) { SM2E_PID_1 = %SM2E_PID_2% SM2E_PID_2 = %SM2E_PID_3% SM2E_PID_3 = %SM2E_PID_4% GoTo 3playersWinRS } } } If (NumberOfPlayers>=2) AND !WinExist("ahk_pid " . SM2E_PID_2) { GUI_ID3 := FadeOutStart() If (CloseOnlyOne = "false") Break Else { NumberOfPlayers -= 1 If (NumberOfPlayers = 1) GoTo 1playersWinRS If (NumberOfPlayers = 2) { SM2E_PID_2 = %SM2E_PID_3% GoTo 2playersWinRS } If (NumberOfPlayers = 3) { SM2E_PID_2 = %SM2E_PID_3% SM2E_PID_3 = %SM2E_PID_4% GoTo 3playersWinRS } } } If (NumberOfPlayers>=3) AND !WinExist("ahk_pid " . SM2E_PID_3) { GUI_ID3 := FadeOutStart() If (CloseOnlyOne = "false") Break Else { NumberOfPlayers -= 1 If (NumberOfPlayers = 2) GoTo 2playersWinRS If (NumberOfPlayers = 3) { SM2E_PID_3 = %SM2E_PID_4% GoTo 3playersWinRS } } } If (NumberOfPlayers>=4) AND !WinExist("ahk_pid " . SM2E_PID_4) { GUI_ID3 := FadeOutStart() If (CloseOnlyOne = "false") Break Else { NumberOfPlayers -= 1 If (NumberOfPlayers = 3) GoTo 3playersWinRS } } ; Check to see if window changed size WinGetPos, X_1, Y_1, Width_1, Height_1, ahk_id %WID_1% WinGetPos, X_2, Y_2, Width_2, Height_2, ahk_id %WID_2% WinGetPos, X_3, Y_3, Width_3, Height_3, ahk_id %WID_3% WinGetPos, X_4, Y_4, Width_4, Height_4, ahk_id %WID_4% ; Change Size and position if window is incorrect (this happens when switching games inside the emulator) If (NumberOfPlayers = 1) { If (X_1!=0) OR (Y_1!=0) OR (Width_1!=(A_ScreenWidth)) OR (Height_1!=(A_ScreenHeight)) { GUI_ID3 := FadeOutStart() GoTo 1playersWinRS } } If (NumberOfPlayers = 2) { If (VerticalSplit != "true") { If (X_1!=0) OR (Y_1!=0) OR (Width_1!=(A_ScreenWidth/2)) OR (Height_1!=(A_ScreenHeight)) OR (X_2!=(A_ScreenWidth/2)) OR (Y_2!=0) OR (Width_2!=(A_ScreenWidth/2)) OR (Height_2!=(A_ScreenHeight)) { GUI_ID3 := FadeOutStart() GoTo 2playersWinRS } } Else { If (X_1!=0) OR (Y_1!=0) OR (Width_1!=(A_ScreenWidth)) OR (Height_1!=(A_ScreenHeight/2)) OR (X_2!=0) OR (Y_2!=(A_ScreenHeight/2)) OR (Width_2!=(A_ScreenWidth)) OR (Height_2!=(A_ScreenHeight/2)) { GUI_ID3 := FadeOutStart() GoTo 2playersWinRS } } } If (NumberOfPlayers = 3) { If (3playersP1 = "left") { If (X_1!=0) OR (Y_1!=0) OR (Width_1!=(A_ScreenWidth/2)) OR (Height_1!=(A_ScreenHeight)) OR (X_2!=(A_ScreenWidth/2)) OR (Y_2!=0) OR (Width_2!=(A_ScreenWidth/2)) OR (Height_2!=(A_ScreenHeight/2)) OR (X_3!=(A_ScreenWidth/2)) OR (Y_3!=(A_ScreenHeight/2)) OR (Width_3!=(A_ScreenWidth/2)) OR (Height_3!=(A_ScreenHeight/2)) { GUI_ID3 := FadeOutStart() GoTo 3playersWinRS } } Else If (3playersP1 = "top") { If (X_1!=0) OR (Y_1!=0) OR (Width_1!=(A_ScreenWidth)) OR (Height_1!=(A_ScreenHeight/2)) OR (X_2!=0) OR (Y_2!=(A_ScreenHeight/2)) OR (Width_2!=(A_ScreenWidth/2)) OR (Height_2!=(A_ScreenHeight/2)) OR (X_3!=(A_ScreenWidth/2)) OR (Y_3!=(A_ScreenHeight/2)) OR (Width_3!=(A_ScreenWidth/2)) OR (Height_3!=(A_ScreenHeight/2)) { GUI_ID3 := FadeOutStart() GoTo 3playersWinRS } } Else { If (X_1!=0) OR (Y_1!=(A_ScreenHeight/2)) OR (Width_1!=(A_ScreenWidth)) OR (Height_1!=(A_ScreenHeight/2)) OR (X_2!=0) OR (Y_2!=0) OR (Width_2!=(A_ScreenWidth/2)) OR (Height_2!=(A_ScreenHeight/2)) OR (X_3!=(A_ScreenWidth/2)) OR (Y_3!=0) OR (Width_3!=(A_ScreenWidth/2)) OR (Height_3!=(A_ScreenHeight/2)) { GUI_ID3 := FadeOutStart() GoTo 3playersWinRS } } } If (NumberOfPlayers = 4) { If (X_1!=0) OR (Y_1!=0) OR (Width_1!=(A_ScreenWidth/2)) OR (Height_1!=(A_ScreenHeight/2)) OR (X_2!=(A_ScreenWidth/2)) OR (Y_2!=0) OR (Width_2!=(A_ScreenWidth/2)) OR (Height_2!=(A_ScreenHeight/2)) OR (X_3!=0) OR (Y_3!=(A_ScreenHeight/2)) OR (Width_3!=(A_ScreenWidth/2)) OR (Height_3!=(A_ScreenHeight/2)) OR (X_4!=(A_ScreenWidth/2)) OR (Y_4!=(A_ScreenHeight/2)) OR (Width_4!=(A_ScreenWidth/2)) OR (Height_4!=(A_ScreenHeight/2)) { GUI_ID3 := FadeOutStart() GoTo 4playersWinRS } } ; Move cursor to top right corner of screen (to hide it) MouseGetPos, mX, mY If (OldmX = mX) AND (OldmY = mY) MouseIdleTime += 1 If (OldmX != mX) AND (OldmY != mY) { MouseIdleTime=0 If (cursor = "off") { SystemCursor(1) cursor = on Loop, %NumberOfPlayers% { DllCall("SetMenu", uint, WID_%A_Index%, uint, Menu_%A_Index%) } } } OldmX= %mX% OldmY= %mY% If MouseIdleTime = 40 ;moves cursor that has been idle for 4 seconds { Loop,%NumberOfPlayers% { DllCall("SetMenu", uint, WID_%A_Index%, uint, 0) } SystemCursor(0) cursor = off MouseIdleTime=0 } } GroupClose, SM2E, A } ;-------------------------------------------------------------------------------------------------- ;----------------------------------------------- All ---------------------------------------------- ;-------------------------------------------------------------------------------------------------- Process, WaitClose, %executable% If (NumberOfPlayers=1) AND (Pass = "false") GUI_ID3 := FadeOutStart() 7z2 := 7zCleanUp() GUI_ID4 := FadeOutExit() WinActivate, HyperSpin ExitApp ;*************************************** LINK ******************************************************** ButtonOldSettings: Link=true LanAsk=false LANOptions=false IniRead, LocalorLAN, %settingsFile%, network, LocalorLAN If (LocalorLAN = "Local") GoTo GuiLinking Else GoTo LinkStart return ButtonNewSettings: Link=true LanAsk=false LANOptions=false IniRead, LocOLan, %settingsFile%, network, LocalorLAN GoTo GuiLAN YesNoReturn: If (LocalorLAN ="Local") { LanAsk=true GoTo GuiLinking } Else If (LANOptions = "false") GoTo LANOptions Else GoTo GuiLinking return LANOptions: GuiLinkingLanMachineOne = false IniRead, OppAddress, %settingsFile%, network, OpponentAddress ;read csv file ouptput by netresview to extract available names and ip addresses netpath := (emupath . "NetResView\") Run NetResView.exe /DisplayShares 0 /DisplayComputers 1 /RetrieveIPAddresses 1 /scomma "ipaddresses.csv", %netpath%,,NRV Gui Destroy Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s16 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,, ...Pinging Network... Gui, Font, s12 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,xp+80 yp+36, Please Wait Gui, Show, AutoSize Center Sleep 3000 csvfile := (netpath . "ipaddresses.csv") ArrayCount=0 Loop, Read, %csvfile% { Loop, Parse, A_LoopReadLine,CSV { If (A_Index =1) Name = %A_LoopField% If (A_Index =5) Address = %A_LoopField% } ArrayCount+=1 ArrayNames%A_Index% = %Name% ArrayAddresses%A_Index% = %Address% } ;Retrieve most recently used ip addresses from "ini" history Loop,6 IniRead, iphistory%A_Index%, %settingsFile%, history, Address%A_Index% Gui Destroy Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s16 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,xp+130, LAN Options Gui, Font, s14 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,xp-110 yp+38, Current Opponent's Address: Gui, Add, Text,xp+110 yp+30, %OppAddress% Gui, Font, s12 ;, Comic Sans MS Bold Gui, Add, ListView, xp-130 yp+30 r5 w400 gMyListView, Description|I.P. Address ; Gather a list of names and addresses and put them into the ListView: Count := ArrayCount + 8 Ind=0 Ind2=0 Loop, %Count% { If (A_Index = 1) { ArrayDescription%A_Index% = Current Opponent ArrayIP%A_Index% = %OppAddress% } Else If (A_Index >= 2) AND (A_Index <= (ArrayCount+1)) { Ind +=1 element := ArrayNames%Ind% ArrayDescription%A_Index% = %element% element := ArrayAddresses%Ind% ArrayIP%A_Index% = %element% } Else If (A_Index > (ArrayCount+1)) AND (A_Index < (Count)) { Ind2 +=1 ArrayDescription%A_Index% = Prev.Opp.%Ind2% element := iphistory%Ind2% ArrayIP%A_Index% = %element% } Else { ArrayDescription%A_Index% = Go Back ArrayIP%A_Index% = Go Back } LV_Add("", ArrayDescription%A_Index%, ArrayIP%A_Index%) } LV_ModifyCol(1,200) LV_ModifyCol(2,175) LV_Modify(1, "Select") LV_Modify(1, "Focus") Gui, Add, Button, Hidden Default, OK Gui, Show, AutoSize Center return MyListView: if A_GuiEvent = DoubleClick { GoTo ButtonOK } return ;this button is hidden in the LAN Options to enable pressing the enter key ButtonOK: RowNumber := LV_GetNext(0,"Focused") If (RowNumber = Count) { LANOptions=false GoTo GuiLAN } Else { LANOptions=true LV_GetText(Name, RowNumber, 1) LV_GetText(OppAddress, RowNumber, 2) Gui Destroy Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s16 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,xp+20, LAN Options Gui, Font, s14 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,yp+38, Is This Correct? Gui, Add, Text,yp+40, %Name% Gui, Add, Text,yp+28, %OppAddress% Gui, Add, Button,Default xp-20 yp+50 w100 h50,Yes Gui, Add, Button,xp+120 w100 h50,No Gui, Show, AutoSize Center } return LanSetup: IniRead, CoPlay, %settingsFile%, network, CombinedPlay If (CoPlay != CombinedPlay) IniWrite,%CombinedPlay%, %settingsFile%, network, CombinedPlay IniRead, LocalAddress, %settingsFile%, network, LocalAddress LocAddress = %LocalAddress% IniRead, OpponentAddress, %settingsFile%, network, OpponentAddress If (OpponentAddress != OppAddress) { IniWrite,%OppAddress%, %settingsFile%, network, OpponentAddress IniWrite,%OpponentAddress%, %settingsFile%, history, Address1 Ind=1 Loop, 5 { Ind +=1 element := iphistory%A_Index% Iniwrite, %element%, %settingsFile%, history, Address%Ind% } } GoTo LinkStart return LinkStart: If (LocalorLAN="Local") { IniRead, LocalAddress, %settingsFile%, network, LocalAddress LocAddress = %LocalAddress% emupath2=%emupath% Port=1978 Loop, %NumberOfPlayers% { If (A_Index > 1) emupath := emupath2 . "Player " . A_Index . "\" NetworkINI := CheckFile(emuPath . "m2network.ini") IniRead, RxPort, %NetworkINI%, network, RxPort If(RxPort != %Port%) IniWrite, %Port%, %NetworkINI%, network, RxPort IniRead, NextIp, %NetworkINI%, network, NextIp If(NextIp != (LocAddress)) IniWrite, %LocAddress%, %NetworkINI%, network, NextIp IniRead, NextPort, %NetworkINI%, network, NextPort If (A_Index = (NumberOfPlayers)) Port=1978 Else Port += 1 If(NextPort != %Port%) IniWrite, %Port%, %NetworkINI%, network, NextPort } } Else { IniRead, TotMach, %settingsFile%, network, TotalMachines If (TotMach = 1) { LocalorLAN=Local If (LocOLan != %LocalorLAN%) IniWrite, %LocalorLAN%, %settingsFile%, network, LocalorLAN GoTo GuiLinking } IniRead, MachineNum, %settingsFile%, network, ThisMachineNumber IniRead, CoPlay, %settingsFile%, network, CombinedPlay IniRead, LocalAddress, %settingsFile%, network, LocalAddress IniRead, OpponentAddress, %settingsFile%, network, OpponentAddress LocAddress = %LocalAddress% emupath2=%emupath% Port := 1978+CoPlay Loop, %NumberOfPlayers% { If (A_Index > 1) emupath := emupath2 . "Player " . A_Index . "\" Else If (Coplay != 0) Port := Port - MachineNum +1 NetworkINI := CheckFile(emuPath . "m2network.ini") IniRead, RxPort, %NetworkINI%, network, RxPort If(RxPort != %Port%) IniWrite, %Port%, %NetworkINI%, network, RxPort IniRead, NextIp, %NetworkINI%, network, NextIp IniRead, NextPort, %NetworkINI%, network, NextPort3 If (A_Index = (NumberOfPlayers)) LocAddress=%OpponentAddress% If(NextIp != (LocAddress)) IniWrite, %LocAddress%, %NetworkINI%, network, NextIp If (A_Index = (NumberOfPlayers)) AND (TotMach = MachineNum) Port=1978 Else If (A_Index != (NumberOfPlayers)) Port += 1 If(NextPort != %Port%) IniWrite, %Port%, %NetworkINI%, network, NextPort } } emupath = %emupath2% CloseOnlyOne = false GoTo Start return GuiLinking: If (GuiLinkingLanPlayers = "true") { GuiLinkingLanPlayers = false GLLP=true } If (LocalorLAN = "Local") CombinedPlay=0 GuiLinking=true Gui Destroy Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s20 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,x60 y0, ...Linking... Gui, Font, s16 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,x5 y38, How many players are`n on this machine? Gui, Font, s20 w800 Gui, Font, s20 w800 c000000 Gui, Add, Button,x30 y223 w230 h50,Back Gui, Add, Button,Default x30 y113 w100 h50,1 If (CombinedPlay < 7) Gui, Add, Button,x160 y113 w100 h50,2 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x200 y113,2 } If (CombinedPlay < 6) Gui, Add, Button,x30 y168 w100 h50,3 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x70 y168,3 } If (CombinedPlay < 5) Gui, Add, Button,x160 y168 w100 h50,4 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x200 y168,4 } Gui, Show, AutoSize Center return GuiLinkingLanMachineOne: GuiLinkingLanMachineTwo=false GuiLinkingLanMachineOne = true Gui Destroy Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s20 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,xp+90, ...Linking... Gui, Font, s16 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,xp-90 yp+38, Total number of Machines?`n(including this machine) Gui, Font, s20 w800 Gui, Add, Button,Default xp+20 yp+75 w100 h50,2 Gui, Add, Button,xp+110 w100 h50,3 Gui, Add, Button,xp+110 w100 h50,4 Gui, Add, Button,xp-220 yp+55 w100 h50,5 Gui, Add, Button,xp+110 w100 h50,6 Gui, Add, Button,xp+110 w100 h50,7 Gui, Add, Button,xp-220 yp+55 w100 h50,8 Gui, Add, Button,xp+110 w210 h50,Back Gui, Show, AutoSize Center return GuiLinkingLanMachineTwo: GuiLinkingLanMachineOne=false GuiLinkingLanPlayers=false IniRead, TotMach, %settingsFile%, network, TotalMachines If (TotMach != TotalMachines) IniWrite,%TotalMachines%, %settingsFile%, network, TotalMachines GuiLinkingLanMachineTwo = true Gui Destroy Gui, +AlwaysOnTop -Border +LastFound Gui, Font, s20 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,x130 y0, ...Linking... Gui, Font, s16 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,x5 y42, What Number is this Machine? Gui, Font, s20 w800 c000000 Gui, Add, Button,x260 y190 w100 h50,Back Gui, Add, Button,Default x40 y80 w100 h50,1 Gui, Add, Button,x150 y80 w100 h50,2 If (TotalMachines>2) Gui, Add, Button,x260 y80 w100 h50,3 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x300 y80,3 } If (TotalMachines>3) Gui, Add, Button,x40 y135 w100 h50,4 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x80 y135,4 } If (TotalMachines>4) Gui, Add, Button,x150 y135 w100 h50,5 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x190 y135,5 } If (TotalMachines>5) Gui, Add, Button,x260 y135 w100 h50,6 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x300 y135,6 } If (TotalMachines>6) Gui, Add, Button,x40 y190 w100 h50,7 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x80 y190,7 } If (TotalMachines>7) Gui, Add, Button,x150 y190 w100 h50,8 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x190 y190,8 } Gui, Show, AutoSize Center return GuiLinkingLanPlayers: GuiLinkingLanMachineTwo=false GuiLinkingLanMachineOne=false IniRead, MachineNum, %settingsFile%, network, ThisMachineNumber If (MachineNum != ThisMachineNumber) IniWrite,%ThisMachineNumber%, %settingsFile%, network, ThisMachineNumber GuiLinkingLanPlayers = true Gui Destroy Gui, -Border +AlwaysOnTop +LastFound Gui, Font, s20 w800 c808080 ;, Comic Sans MS Bold Gui, Add, Text,x140 y4, ...Linking... Gui, Font, s16 w800 c000000 ;, Comic Sans MS Bold MachineNum := ThisMachineNumber - 1 Gui, Add, Text,x10 y42, What is the combined number of`nplayers on machine(s) 1 through %MachineNum%? Gui, Font, s20 w800 If (ThisMachineNumber < 3) Gui, Add, Button,x70 y117 w100 h50,1 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x110 y117,1 } If (ThisMachineNumber < 4) Gui, Add, Button,x180 y117 w100 h50,2 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x220 y117,2 } If (ThisMachineNumber < 5) Gui, Add, Button,x290 y117 w100 h50,3 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x330 y117,3 } If (ThisMachineNumber < 6) Gui, Add, Button,x70 y172 w100 h50,4 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x110 y172,4 } If (ThisMachineNumber <= 2) { Gui, Font, s20 w800 c000000 Gui, Add, Button,x180 y227 w210 h50,Back } If (ThisMachineNumber < 7) AND (ThisMachineNumber > 2) Gui, Add, Button,x180 y172 w100 h50,5 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x220 y172,5 } If (ThisMachineNumber < 8) AND (ThisMachineNumber > 2) Gui, Add, Button,x290 y172 w100 h50,6 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x330 y172,6 } If (ThisMachineNumber < 9) AND (ThisMachineNumber > 2) Gui, Add, Button,x70 y227 w100 h50,7 Else { Gui, Font, s20 w800 c808080 Gui, Add, Text,x110 y227,7 } If (ThisMachineNumber > 2) { Gui, Font, s20 w800 c000000 Gui, Add, Button,x180 y227 w210 h50,Back } GuiControl,+Default,Button1 Gui, Show, AutoSize Center return GuiLAN: LanAsk=false Gui Destroy Gui, +AlwaysOnTop -Border Gui, Font, s20 w800 c000000 ;, Comic Sans MS Bold Gui, Add, Text,, Are you linking on LAN? Gui, Add, Button,Default xp+36 yp+52 w100 h50,Yes Gui, Add, Button,xp+136 w100 h50,No Gui, Add, Button,xp-136 yp+66 w236 h50,Back Gui, Add, Text,xp+102 yp-60,or Gui, Show, AutoSize Center return ButtonYes: If (LANOptions = "true") GoTo GuiLinkingLanMachineOne Else { LocalorLAN=LAN If (LocOLan != %LocalorLAN%) IniWrite, %LocalorLAN%, %settingsFile%, network, LocalorLAN GoTo YesNoReturn } return ButtonNO: If (LANOptions = "true") GoTo LANOptions Else { LocalorLAN=Local If (LocOLan != %LocalorLAN%) IniWrite, %LocalorLAN%, %settingsFile%, network, LocalorLAN GoTo YesNoReturn } return ButtonBack: If (GLLP = "true") { GLLP = false GuiLinking=false GoTo GuiLinkingLanPlayers } If (GuiLinkingLanPlayers = "true") GoTo GuiLinkingLanMachineTwo If (GuiLinkingLanMachineTwo = "true") GoTo GuiLinkingLanMachineOne If (GuiLinkingLanMachineOne = "true") GoTo LANOptions If (LANOptions = "true") GoTo ButtonNewSettings Else If (LanAsk="true") { GoTo GuiLAN } { Link=false Gui Destroy Goto HowMany } return ;*********************************** END LINK ******************************************************** CloseProcess: If (NumberOfPlayers=1) AND (Pass = "false") { Pass = true GUI_ID3 := FadeOutStart() WinClose, ahk_pid %SM2E_PID% } Else { Loop, %NumberOfPlayers% { SM2E_PID := ArraySM2E%A_Index% GroupAdd,SM2E, ahk_pid %SM2E_PID% } GUI_ID3 := FadeOutStart() GroupClose, SM2E, A } Return ;------------------ hide cursor function--------------------------------------------------------------- SystemCursor(OnOff=1) ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others { static AndMask, XorMask, $, h_cursor ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 ; blank cursors , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13 ; handles of default cursors if (OnOff = "Init" or OnOff = "I" or $ = "") ; init when requested or at first call { $ = h ; active default cursors VarSetCapacity( h_cursor,4444, 1 ) VarSetCapacity( AndMask, 32*4, 0xFF ) VarSetCapacity( XorMask, 32*4, 0 ) system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650 StringSplit c, system_cursors, `, Loop %c0% { h_cursor := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% ) h%A_Index% := DllCall( "CopyImage", "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 ) b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0 , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask ) } } if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T")) $ = b ; use blank cursors else $ = h ; use the saved cursors Loop %c0% { h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 ) DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% ) } } Copy and paste the code into a .ahk file and save it. m2network.ini [network] Rxport=1978 NextIp=127.0.0.1 NextPort=1979 Copy and paste the code into a .txt file and save it as "m2network.ini". Then put this file in each folder your emulator is in. IPSettings.ini ;This is for the ghutch92 sega model 2 module for hyperspin. ;put in the same folder as the player 1 emulator ; I.P. Addresses of computers on LAN. ; 8 LAN connections is the maximum [network] LocalorLAN=Local TotalMachines=6 ThisMachineNumber=5 CombinedPlay=0 ;do not change Local Address LocalAddress=127.0.0.1 OpponentAddress=192.168.1.72 [history] Address1=192.168.1.64 Address2=192.168.1.2 Address3=192.168.1.3 Address4=192.168.1.4 Address5=192.168.1.5 Address6=192.168.1.6 [start_gui] ;rom names that need link start screen start_gui_games = dayton93,daytona,daytonagtx,daytonat,indy500,manxtt,motoraid,overrev,segawski,sgt24h,skisuprg,skytargt,srallyc,stcc,waverunr Copy and paste the code into a .txt file and save it as "Settings.ini". Then put this file in the same folder as your module. Plans for the Future: 1. Support for multiple monitors (anybody want to explain how to do this in ahk or find a link explaining it for ahk). 2. Fix the CloseProcess issue. Current Issues: The closeprocess label won't launch when the exitemu key is used in multiplayer (it works fine in single player). The current workaround is to use the Escape key to close the emulators. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
djvj Posted August 14, 2012 Posted August 14, 2012 Nice job, but sooo much duplicated code... makes it hell to make one change. Hopefully you don't have to change anything... Wait...now that I think of it, who has a setup with 8 screens on one pc for 8 different players... I guess that's the only solution? There is no way to play via lan? "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
ghutch92 Posted August 14, 2012 Author Posted August 14, 2012 Nice job, but sooo much duplicated code... makes it hell to make one change. Hopefully you don't have to change anything...Wait...now that I think of it, who has a setup with 8 screens on one pc for 8 different players... I guess that's the only solution? There is no way to play via lan? Yeah there is a way to play via lan, but you need to know the computer's ip address. Over the internet is bad though since model 2 doesn't expect to lose packets or get out of sync. I'm including linking in the module as I learn more about it. I noticed that I did duplicate a lot of code and I'm working on a solution to it, since it not only makes it hard for me to change the script but for others as well. I am only working with one screen; I have no idea how a multiple monitor setup will work. 5-8 player is very CPU intensive, but I figure someone might want it. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
Jumpstile Posted August 14, 2012 Posted August 14, 2012 So we can now play two player with a split screen (on one actual monitor)? - J* How to rebuild your MAME ROM set using CLRMAMEPRO - Walkthrough HERE!
djvj Posted August 14, 2012 Posted August 14, 2012 Playing on one computer would require the script to do some winmoves which will split the screen for you. Look over the script above, I'm sure it's all in there, ghutch, over LAN, you won't have packet loss, so that's not an issue. I don't think playing over the internet is an option because the game wasn't designed for it like you say. "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
ghutch92 Posted August 14, 2012 Author Posted August 14, 2012 So we can now play two player with a split screen (on one actual monitor)? - J* Yes splitscreen on one monitor is what it's supposed to do. It does splitscreen for 2,3,4,5,6,7, and 8 players. 5-8 kills my cpu and framerate though. It does about the same thing that my module for the VBALink (Gameboy Advance) does. I'm having trouble with it when it moves sometimes it moves and sometimes it doesn't. When it doesn't it leaves a whitespace with the window title DIEmWIN and it has the same process id. Anyone have any suggestions for fixing this? How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
ghutch92 Posted August 14, 2012 Author Posted August 14, 2012 I'm thinking about adding a gui for the individual closing out, that way you can choose which window to close instead of just closing the active one. I also need some ideas on how a gui for linking would work. I need to take into account: All Linking on same computer Linking over LAN, If linking LAN, ask for i.p. address and have the option to have a static ip address stored in an ".ini" file or in the module (static meaning no asking to type in address since it is fixed). If linking over LAN what player number are you and splitscreen friends. (example: player 1 & 2 on computer_1 and 4 & 5 on computer_2) Link two fullscreeens (player_1 on computer_1 and player_2 on computer_2). I'm having the most trouble with the gui layout to make it easy to see from a distance and easy to navigate with arrow, enter and exit keys. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
djvj Posted August 14, 2012 Posted August 14, 2012 I wouldn't even bother with mroe then 4p on one screen IMHO. I hate playing 4p games because the screen is so small as it is, now you want to shrink them even more?? I don't see something like that ever being used. I would only support static IPs for LAN. To do anything else, you need to learn how to use TCP/IP through ahk because some communication between 2+ PCs to resolve IPs needs to happen. Unless there is a library or something that can find and ping hostnames to create a database of found names. "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
evil eye Posted August 15, 2012 Posted August 15, 2012 Is there a way to run multiple instances of Model 2 on one machine? Meaning, is it possible to have an 8-player game of Daytona running full screen on 8 monitors off one machine? It would be cool to have an 8 player race but not cool having 8 PC's in one central location.
ghutch92 Posted August 15, 2012 Author Posted August 15, 2012 Is there a way to run multiple instances of Model 2 on one machine? Meaning, is it possible to have an 8-player game of Daytona running full screen on 8 monitors off one machine? It would be cool to have an 8 player race but not cool having 8 PC's in one central location. That would be very cpu intensive, as of right now it's for one screen since I only use one screen, but I will look into it after I get the linking feature setup which should be ready by next week. It looks like it's possible, but there maybe a few dllcalls if the monitors are disabled or duplicated. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
evil eye Posted August 15, 2012 Posted August 15, 2012 Gotcha. Even if it was 2 PC's handling 4 screens each, that would be better than 8 machines and more realistic too. I'm willing to bet most of us here have too many computers at our homes to begin with.
djvj Posted August 15, 2012 Posted August 15, 2012 There is no such thing as too many! "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
ghutch92 Posted August 22, 2012 Author Posted August 22, 2012 Just added link support so you don't need to exit hyperspin every time if you want to link up emus. Can someone make an xml for the games that can link on the sega model 2 emulator? How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
ghutch92 Posted October 10, 2012 Author Posted October 10, 2012 New update allows you to enable the launching gui on a per game basis. Module and Settings file were changed. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
zerojay Posted October 11, 2012 Posted October 11, 2012 I have no more Daytonas left to give. (This is on an i3 2120, 4GB RAM, GTX 560. Each game running was taking just 5% CPU time each. Everything running at a steady 60FPS in each window.)
djvj Posted October 12, 2012 Posted October 12, 2012 Wow, that's one efficient emu! "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
zerojay Posted October 12, 2012 Posted October 12, 2012 Well, it's only pushing a max of 5200 triangles per frame, so...
evil eye Posted October 12, 2012 Posted October 12, 2012 This is so awesome bro, thanks for making this a reality. How many separate screens can be hooked up to one PC? I know it depends on the type of video cards, but I'm imagining 2 PC's with 4 screens on each. I so want to make this happen one day. I'm crazy about Daytona, haha.
miglea85 Posted October 12, 2012 Posted October 12, 2012 Hi all, Nice work man. this is huge But I have a simple question. How can I drive each car in each windows? Example: In this image posted by zerojay I only play in the last windows (the one that is selected) [ATTACH=CONFIG]20744[/ATTACH] Thank you for your sharing Miguel Leão
ghutch92 Posted October 12, 2012 Author Posted October 12, 2012 This is so awesome bro, thanks for making this a reality. How many separate screens can be hooked up to one PC? I know it depends on the type of video cards, but I'm imagining 2 PC's with 4 screens on each. I so want to make this happen one day. I'm crazy about Daytona, haha. I haven't added multiple monitor support yet, but it's coming. I'm running into the issue of enabling more than one monitors and making them extend instead of clone the display. Hi all,Nice work man. this is huge But I have a simple question. How can I drive each car in each windows? Example: In this image posted by zerojay I only play in the last windows (the one that is selected) Thank you for your sharing Miguel Leão Only the active window can take keyboard input. In the inactive windows you can you use a gamepad or a joystick of some sort. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
miglea85 Posted October 12, 2012 Posted October 12, 2012 hmmmm, OK. That's my problem, lolol. Thanks alot ghutch92
evil eye Posted October 12, 2012 Posted October 12, 2012 I haven't added multiple monitor support yet, but it's coming. I'm running into the issue of enabling more than one monitors and making them extend instead of clone the display. Ahh, gotcha. I wish I could help, but you are definitely the expert here. If you can't figure it out, me sitting here on my couch with a bag of chips doesn't have a shot.
ghutch92 Posted October 12, 2012 Author Posted October 12, 2012 Here is what I know about using multiple monitors in ahk. I know how to fullscreen each window according to monitor, but I do not know how to enable and extend more monitors than 2, (I only own two and have no plans on getting anymore).My knowledge is very limited on this. I can add multi-monitor support, but the monitors will need to be manually enabled and set to extend. How to Install HyperSpin and more RocketLauncher HyperSpin Startup Script
FaithLes Posted November 4, 2013 Posted November 4, 2013 i have a small laptop with an i7 2.4 ghz (3.4 turbo) and it runs all 8 machines demo at once just fine. how ever, its totaly useless for playing. as soon as you start any other machine than master the rival cars will flicker and be out of sync. i have a setup at home using 2 pc with lan conection, and its the same problem. start the slave machine and its unplayable. not really sure what this module is for? setting up the m2network.ini is pretty straight forword.
djvj Posted January 2, 2014 Posted January 2, 2014 Ghutch, the emu was updated to v1.1, did you want to check it still works with your multiplayer module? http://nebula.emulatronia.com/ Doesn't sound like anything changed that would break it. "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
Recommended Posts
Archived
This topic is now archived and is closed to further replies.