· 9 years ago · Dec 23, 2016, 12:56 AM
1[code]
200:10:40:993 | RL | INFO | +N/A | Main - RocketLauncher v1.2.0.0 (www.rlauncher.com)
300:10:41:510 | RL | INFO | +516 | Main - System Specs:
4 RocketLauncher Dir: D:\RocketLauncher
5 RocketLauncher is: 32-bit
6 OS: Microsoft Windows 10 Pro
7 SKU: Professional
8 Total Memory: 12181.84 MB
9 Free Memory: 7721.27 MB
10 Used Memory: 4460.578 MB
11 SystemType: 64-bit
12 Physical Processors: 1
13 Logical Processors: 8
14 GPU 1 Name: Intel(R) HD Graphics 3000
15 GPU 1 RAM: -1988.00 MB
16 GPU 1 Driver Version: 9.17.10.4229
17 GPU 2 Name: NVIDIA GeForce GTX 970
18 GPU 2 RAM: -1.00 MB
19 GPU 2 Driver Version: 21.21.13.7595
20 Sound 1 Device: Intel(R) Display Audio
21 Sound 1 Status: Enabled
22 Sound 2 Device: Realtek High Definition Audio
23 Sound 2 Status: Enabled
24 Sound 3 Device: NVIDIA High Definition Audio
25 Sound 3 Status: Enabled
26 Sound 4 Device: NVIDIA Virtual Audio Device (Wave Extensible) (WDM)
27 Sound 4 Status: Enabled
28 OS Language: English_United_States
29 System Locale: en-GB
30 Formats Locale: en-GB
31 Windows UI Language: en-US
32 Text Encoding: Windows-1252
33 OS Admin Status: No
34 RL Compatibility Flags: ~ HIGHDPIAWARE
35 Latest .Net Version: v4.0.30319
36 Monitor #1 (\\.\DISPLAY1): 2560x1440 (2560x1400 work) [32bit] [59hz] [Landscape] (Primary)
37 Current AHK Desktop Width: 2560
38 Current AHK Desktop Height: 1440
39 Monitor #1 DPI: 100
40 ErrorMode: 0
41 AutoHotkey Path:
42 AHK Version: 1.1.13.00
43 Unicode: No
4400:10:41:510 | RL | INFO | +0 | CheckFile - Checking if D:\RocketLauncher\RocketLauncher.exe exists
4500:10:41:510 | RL | INFO | +0 | Main - Using HyperSpin normal mode for version 1.4.0.0 found at: D:\HyperSpin\HyperSpin.exe
4600:10:41:510 | RL | INFO | +0 | Main - Raw CLI received: "MAME kinstb"
4700:10:41:511 | RL | INFO | +0 | Main - Loading Front End Plugin: "HyperSpin"
4800:10:41:511 | RL | INFO | +0 | Process.Process - "Exist" "HyperSpin.exe"
4900:10:41:514 | RL | INFO | +15 | Main - Detected HyperSpin.exe is currently running
5000:10:41:515 | RL | INFO | +0 | Main - HyperSpin.exe coordinates are x0 y0 w2560 h1440
5100:10:41:515 | RL | INFO | +0 | Main - RocketLauncher received "MAME" and "kinstb"
5200:10:41:520 | RL | INFO | +0 | Main - Did not find a "D:\RocketLauncher\Settings\MAME\Game Options.ini" file, skipping any game-specific options.
5300:10:41:520 | RL | INFO | +0 | Main - kinstb is using the default emulator: MAME
5400:10:41:521 | RL | INFO | +0 | Main - Checking for a [MAME] section in D:\RocketLauncher\Settings\MAME\Emulators.ini
5500:10:41:521 | RL | INFO | +0 | Main - Checking for a [MAME] section in D:\RocketLauncher\Settings\Global Emulators.ini
5600:10:41:521 | RL | INFO | +0 | Main - Found [MAME] in D:\RocketLauncher\Settings\Global Emulators.ini
5700:10:41:521 | RL | INFO | +0 | CheckFile - Checking if D:\RocketLauncher\Modules\MAME\MAME.ahk exists
5800:10:41:528 | RL | INFO | +0 | Main - CRC Check - CRC matches, this is an official unedited module.
5900:10:41:528 | RL | INFO | +0 | Main - kinstb will use module: D:\RocketLauncher\Modules\MAME\MAME.ahk
6000:10:41:533 | RL | WARNING | +16 | RIniLoadVar - Created missing Global ini key: "Fade_Click_Through " in section: "Fade" in "D:\RocketLauncher\Settings\Global RocketLauncher.ini"
6100:10:41:533 | RL | WARNING | +0 | RIniLoadVar - Created missing System ini key: "Fade_Click_Through " in section: "Fade" in "D:\RocketLauncher\Settings\MAME\RocketLauncher.ini"
6200:10:41:554 | RL | INFO | +16 | Main - Using standard method with "Rom Extension" SkipChecks or without any SkipChecks.
6300:10:41:556 | RL | INFO | +0 | CheckFile - Checking if D:\HyperSpin\Emulators\MAME\mame64.exe exists
6400:10:41:557 | RL | INFO | +0 | Main - INI Keys read
6500:10:41:557 | RL | INFO | +0 | CheckFile - Checking if D:\RocketLauncher\Module Extensions\7z.exe exists
6600:10:41:558 | RL | INFO | +0 | CheckFile - Checking if D:\RocketLauncher\Module Extensions\7z.dll exists
6700:10:41:566 | RL | INFO | +15 | Main - "kinstb" does not qualify for MultiGame. Only roms with any of these strings in their name are acceptable: \(Disc|\(Disk|\(Cart|\(Tape|\(Cassette|\(Part|\(Side
6800:10:41:566 | RL | INFO | +0 | CheckPaths - Started
6900:10:41:566 | RL | INFO | +0 | CheckPaths - Looking for rom: D:\ROMS\MAME\kinstb.7z
7000:10:41:566 | RL | INFO | +0 | CheckPaths - Looking for rom by name in subfolder: D:\ROMS\MAME\kinstb\kinstb.7z
7100:10:41:567 | RL | INFO | +0 | CheckPaths - Rom not found
7200:10:41:567 | RL | INFO | +0 | CheckPaths - Looking for rom: D:\ROMS\MAME\kinstb.rar
7300:10:41:567 | RL | INFO | +0 | CheckPaths - Looking for rom by name in subfolder: D:\ROMS\MAME\kinstb\kinstb.rar
7400:10:41:567 | RL | INFO | +0 | CheckPaths - Rom not found
7500:10:41:567 | RL | INFO | +0 | CheckPaths - Looking for rom: D:\ROMS\MAME\kinstb.zip
7600:10:41:567 | RL | INFO | +0 | CheckPaths - Found rom: D:\ROMS\MAME\kinstb.zip
7700:10:41:567 | RL | INFO | +0 | CheckPaths - Ended
7800:10:41:567 | RL | INFO | +0 | BuildScript - User Variables:
79 ;----------------------------------------------------------------------------
80 ; INJECTED VARIABLES
81 ;----------------------------------------------------------------------------
82
83 #NoTrayIcon
84 #InstallKeybdHook
85 MiscUtils.DetectHiddenWindows("On")
86 SetTitleMatchMode, 2
87 SendMode, Event
88 Global RLLog
89 Global RLObject
90 0 := "2"
91 rlPath := "D:\RocketLauncher"
92 pluginPath := "D:\RocketLauncher\Plugins"
93 pluginName := "HyperSpin"
94 pluginExt := ".plugin"
95 contextOnExit := ""
96 rlMode := ""
97 rlTitle := "RocketLauncher"
98 rlVersion := "1.2.0.0"
99 rlAuthor := "djvj"
100 rlURL := "www.rlauncher.com"
101 langFile := "D:\RocketLauncher\Data\Language\Localization.ini"
102 primMonitor := "1"
103 frontendPID := "5376"
104 frontendPath := "D:\HyperSpin"
105 frontendExe := "HyperSpin.exe"
106 frontendExt := "exe"
107 frontendName := "HyperSpin"
108 frontendDrive := "D"
109 exitEmulatorKey := "~Esc"
110 restoreFE := "false"
111 exitScriptKey := "~q & ~s"
112 toggleCursorKey := "~e & ~t"
113 emuFullPath := "D:\HyperSpin\Emulators\MAME\mame64.exe"
114 emuPath := "D:\HyperSpin\Emulators\MAME"
115 emuName := "MAME"
116 emuExt := "exe"
117 baseRomPath := ""
118 romPath := "D:\ROMS\MAME"
119 romPathFromIni := "D:\ROMS\MAME"
120 romExtension := ".zip"
121 romExtensionOrig := ".zip"
122 romExtensions := "7z|rar|zip|chd|cue|32x|a26|a52|a78|bin|caq|col|cpr|gg|gb|gba|gbc|int|lnx|rom|sms|st2|md|j64|n64|nes|ngc|ngp|pce|sfc|sv|vb|vec|ws|wsc"
123 executable := "mame64.exe"
124 systemDbName := "MAME"
125 systemName := "MAME"
126 dbPath := ""
127 dbName := "kinstb"
128 dbExt := ""
129 romName := "kinstb"
130 romMapPath := ""
131 romMappingEnabled := "false"
132 romMappingLaunchMenuEnabled := "false"
133 romMappingFirstMatchingExt := "false"
134 romMappingShowAllRomsInArchive := "true"
135 romMappingNumberOfGamesByScreen := "7"
136 romMappingHideParent := "false"
137 romMappingMenuWidth := "400"
138 romMappingMenuMargin := "65"
139 romMappingTextFont := "Bebas Neue"
140 romMappingTextOptions := "cFFFFFFFF r4 s60 Bold"
141 romMappingDisabledTextColor := "ff888888"
142 romMappingTextSizeDifference := "7"
143 romMappingTextMargin := "15"
144 romMappingTitleTextFont := "Bebas Neue"
145 romMappingTitleTextOptions := "cFFFFFFFF r4 s90 Bold"
146 romMappingTitle2TextFont := "Bebas Neue"
147 romMappingTitle2TextOptions := "cFFFFFFFF r4 s22 Bold"
148 romMappingGameInfoTextFont := "Bebas Neue"
149 romMappingGameInfoTextOptions := "cFFFFFFFF r4 s22 Regular"
150 romMappingGameNameTextFont := "Bebas Neue"
151 romMappingGameNameTextOptions := "cFFFFFFFF r4 s40 Regular"
152 romMappingBackgroundBrush := "aa000000"
153 romMappingColumnBrush := "33000000"
154 romMappingButtonBrush1 := "6f000000"
155 romMappingButtonBrush2 := "33000000"
156 romMappingBackgroundAlign := "Stretch and Lose Aspect"
157 romMappingMenuFlagWidth := "55"
158 romMappingMenuFlagSeparation := "7"
159 romMappingDefaultMenuList := "FullList"
160 romMappingSingleFilteredRomAutomaticLaunch := "false"
161 altArchiveNameOnly := ""
162 altRomNameOnly := ""
163 altArchiveAndRomName := ""
164 altArchiveAndManyRomNames := ""
165 altRomNamesOnly := ""
166 romMapScenario := ""
167 skipchecks := "false"
168 romMatchExt := "false"
169 blockInputTime := "0"
170 blockInputFile := "D:\RocketLauncher\Module Extensions\BlockInput.exe"
171 errorLevelReporting := "false"
172 lockLaunch := "false"
173 lockLaunchGame := ""
174 screenRotationAngle := "0"
175 screenRotationAngleGame := ""
176 setResolution := ""
177 logFile := ""
178 logLabel := [" INFO"," WARNING"," ERROR"," DEBUG"," TRACE"]
179 logLevel := "3"
180 logShowDebugConsole := "false"
181 logShowCommandWindow := "false"
182 logCommandWindow := "false"
183 logIncludeModule := "true"
184 logIncludeFileProperties := "true"
185 logIncludeDLLLogs := "false"
186 errorSounds := "true"
187 rlDebugConsoleStdout := ""
188 sysLang := "English_United_States"
189 sysType := "64-bit"
190 broadcastWindowTitle := ""
191 navUpKey := "Up"
192 navDownKey := "Down"
193 navLeftKey := "Left"
194 navRightKey := "Right"
195 navSelectKey := "Enter"
196 navP2UpKey := "Numpad8"
197 navP2DownKey := "Numpad2"
198 navP2LeftKey := "Numpad4"
199 navP2RightKey := "Numpad6"
200 navP2SelectKey := "NumpadEnter"
201 originalWidth := "2560"
202 originalHeight := "1440"
203 vdEnabled := "false"
204 vdFullPath := ""
205 vdUseSCSI := "true"
206 vdDriveLetter := ""
207 vdDriveLetterScsi := ""
208 vdAddDrive := "true"
209 demulShooterPath := ""
210 servoStikEnabled := "false"
211 servoStikExitMode := "false"
212 ledblinkyEnabled := "false"
213 ledblinkySystemName := ""
214 ledblinkyFullPath := ""
215 ledblinkyProfilePath := "D:\RocketLauncher\Profiles\LEDBlinky"
216 ledblinkyRLProfile := "D:\RocketLauncher\Profiles\LEDBlinky\RocketLauncher"
217 winIPACFullPath := ""
218 ultraMapEnabled := "false"
219 ultraMapFullPath := ""
220 emuIdleShutdown := "0"
221 launchPasswordHash := "UpUpDownDownLeftRightLeftRight"
222 cursorSize := ""
223 hideCursor := "false"
224 hideEmu := "false"
225 hideFE := "false"
226 suspendFE := "false"
227 fadeIn := "true"
228 fadeInDuration := "500"
229 fadeInTransitionAnimation := "DefaultAnimateFadeIn"
230 fadeInDelay := "0"
231 fadeInExitDelay := "0"
232 fadeOutExitDelay := "0"
233 fadeOut := "true"
234 fadeOutExtraScreen := "false"
235 fadeOutDuration := "500"
236 fadeOutTransitionAnimation := "DefaultAnimateFadeOut"
237 fadeOutDelay := "0"
238 fadeLyrInterpolation := "7"
239 fadeMuteEmulator := "false"
240 fadeUseBackgrounds := "false"
241 fadeClickThrough := "false"
242 fadeSounds := "true"
243 fade7zProgressMode := "extraction"
244 fadeWidthBaseRes := "1920"
245 fadeHeightBaseRes := "1080"
246 fadeLyr1Color := "FF000000"
247 fadeLyr1AlignImage := "Stretch and Lose Aspect"
248 fadeLyr2Pos := "Stretch and Lose Aspect"
249 fadeLyr2X := "0"
250 fadeLyr2Y := "0"
251 fadeLyr2W := ""
252 fadeLyr2H := ""
253 fadeLyr2Adjust := "1"
254 fadeLyr2PicPad := "0"
255 fadeLyr2Prefix := "Extra Layer 1 - Console"
256 fadeLyr3Pos := "Center"
257 fadeLyr3X := "450"
258 fadeLyr3Y := "450"
259 fadeLyr3W := ""
260 fadeLyr3H := ""
261 fadeLyr3Adjust := "1"
262 fadeLyr3PicPad := "0"
263 fadeLyr3Speed := "750"
264 fadeLyr3Animation := "DefaultFadeAnimation"
265 fadeLyr37zAnimation := "DefaultFadeAnimation"
266 fadeLyr3Type := "imageandbar"
267 fadeLyr3ImgFollow7zProgress := "true"
268 fadeLyr3Repeat := "1"
269 fadeLyr3BackImageTransparency := "30"
270 fadeLyr3StaticPos := "No Alignment"
271 fadeLyr3StaticX := "0"
272 fadeLyr3StaticY := "870|1575"
273 fadeLyr3StaticW := ""
274 fadeLyr3StaticH := ""
275 fadeLyr3StaticAdjust := "1"
276 fadeLyr3StaticPicPad := "0"
277 fadeLyr3StaticPrefix := "Info Bar"
278 fadeLyr4Adjust := "1"
279 fadeLyr4X := "1792|952"
280 fadeLyr4Y := "891|1596"
281 fadeLyr4W := "128"
282 fadeLyr4H := ""
283 fadeLyr4Pos := "No Alignment"
284 fadeLyr4FPS := "50"
285 fadeLyr4PicPad := "0"
286 fadeTranspGifColor := "FFFFFF"
287 fadeBarWindow := "Image"
288 fadeBarWindowX := ""
289 fadeBarWindowY := ""
290 fadeBarWindowW := "900"
291 fadeBarWindowH := ""
292 fadeBarWindowR := "30"
293 fadeBarWindowM := "30"
294 fadeBarWindowHatchStyle := "8"
295 fadeBar := "7zOnly"
296 fadeProgressDuration := "0"
297 fadeBarBack := "true"
298 fadeBarBackColor := "FF555555"
299 fadeBarH := "30"
300 fadeBarR := "10"
301 fadeBarColor := "DD00BFFF"
302 fadeBarHatchStyle := "8"
303 fadeBarPercentageText := "true"
304 fadeBarInfoText := "true"
305 fadeBarXOffset := "0"
306 fadeBarYOffset := "150"
307 fadeRomInfoDescription := "filtered text"
308 fadeRomInfoSystemName := "image"
309 fadeRomInfoYear := "text with label"
310 fadeRomInfoDeveloper := "disabled"
311 fadeRomInfoPublisher := "disabled"
312 fadeRomInfoGenre := "disabled"
313 fadeRomInfoRating := "image"
314 fadeRomInfoOrder := "Description|SystemName|Year|Developer|Genre|Rating|Publisher"
315 fadeRomInfoTextPlacement := "User Defined"
316 fadeRomInfoTextMargin := "7"
317 fadeRomInfoText1Options := "w1600|787 h90 x165 y870|1575 cFFE1E1E1 r4 s90 Left Regular"
318 fadeRomInfoText2Options := "w400 x8 y15 cFF555555 r4 s60 Bold"
319 fadeRomInfoText3Options := "w310 x165 y960|1665 cFFE1E1E1 r4 s66 Left Regular"
320 fadeRomInfoText4Options := "w1305|492 h66 x460 y960|1665 cFFE1E1E1 r4 s66 Left Regular"
321 fadeRomInfoText5Options := "cFF555555 r4 s42 Bold"
322 fadeRomInfoText6Options := "h135 x15 y885|1590 cFFCFCFCA r4 s120 Regular"
323 fadeRomInfoText7Options := "h135 x15 y885|1590 cFFCFCFCA r4 s120 Regular"
324 fadeStats_Number_of_Times_Played := "text with label"
325 fadeStats_Last_Time_Played := "text with label"
326 fadeStats_Average_Time_Played := "text with label"
327 fadeStats_Total_Time_Played := "text with label"
328 fadeStats_System_Total_Played_Time := "text with label"
329 fadeStats_Total_Global_Played_Time := "text with label"
330 fadeStatsInfoOrder := "Number_of_Times_Played|Last_Time_Played|Average_Time_Played|Total_Time_Played|System_Total_Played_Time|Total_Global_Played_Time"
331 fadeStatsInfoTextPlacement := "topRight"
332 fadeStatsInfoTextMargin := "7"
333 fadeStatsInfoText1Options := "cFFB4B4B4 r4 s22 Bold"
334 fadeStatsInfoText2Options := "cFFB4B4B4 r4 s22 Bold"
335 fadeStatsInfoText3Options := "cFFB4B4B4 r4 s22 Bold"
336 fadeStatsInfoText4Options := "cFFB4B4B4 r4 s22 Bold"
337 fadeStatsInfoText5Options := "cFFB4B4B4 r4 s22 Bold"
338 fadeStatsInfoText6Options := "cFFB4B4B4 r4 s22 Bold"
339 fadeText1X := "0"
340 fadeText1Y := "0"
341 fadeText1Options := "cFFB4B4B4 r4 s30 Right Bold"
342 fadeText1 := "Loading Game"
343 fadeText2X := "0"
344 fadeText2Y := "0"
345 fadeText2Options := "cFFB4B4B4 r4 s30 Right Bold"
346 fadeText2 := "Extraction Complete, Ready"
347 fadeText3 := "Loading Game"
348 fadeText4 := "Loading Complete"
349 fadeFont := "Bebas Neue"
350 fadeSystemAndRomLayersOnly := "false"
351 fadeExtractionTime := "disabled"
352 fadeExtractionTimeTextX := "0"
353 fadeExtractionTimeTextY := "0"
354 fadeExtractionTimeTextOptions := "cFF555555 r4 s20 Bold"
355 fadeInterruptKey := ""
356 detectFadeErrorEnabled := "true"
357 fadeImgPath := "D:\RocketLauncher\Media\Fade"
358 RLDataPath := "D:\RocketLauncher\Data"
359 RLMediaPath := "D:\RocketLauncher\Media"
360 RLErrSoundPath := "D:\RocketLauncher\Media\Sounds\Error"
361 modulesPath := "D:\RocketLauncher\Modules"
362 moduleFullName := "D:\RocketLauncher\Modules\MAME\MAME.ahk"
363 moduleName := "MAME"
364 modulePath := "D:\RocketLauncher\Modules\MAME"
365 moduleExtension := "ahk"
366 moduleExtensionsPath := "D:\RocketLauncher\Module Extensions"
367 libPath := "D:\RocketLauncher\Lib"
368 sevenZEnabled := "false"
369 sevenZPath := "D:\RocketLauncher\Module Extensions\7z.exe"
370 sevenZDllPath := "D:\RocketLauncher\Module Extensions\7z.dll"
371 sevenZExtractPath := "D:\temp game"
372 sevenZExtractPathOrig := ""
373 sevenZAttachSystemName := "false"
374 sevenZDelTemp := "true"
375 sevenZFormats := ".zip|.rar|.7z|.lzh|.gzip|.tar"
376 sevenZFormatsNoP := "zip|rar|7z|lzh|gzip|tar"
377 sevenZFormatsRegEx := "\.zip|\.rar|\.7z|\.lzh|\.gzip|\.tar"
378 sevenZGamesToKeep := ""
379 sevenZDeletePerSystem := "false"
380 7zExtractPath := "D:\temp game"
381 mgEnabled := "false"
382 mgKey := "~NumpadSub"
383 mgBackgroundColor := "FF000000"
384 mgSidePadding := "0.2"
385 mgWidthBaseRes := "1920"
386 mgHeightBaseRes := "1080"
387 mgYOffset := "500|800"
388 mgFont := "Arial"
389 mgText1Options := "x10p y250|500 w80p Center cBBFFFFFF r4 s100 BoldItalic"
390 mgText1Text := "Please select a game"
391 mgText2Options := "w96p cFFFFFFFF r4 s50 Center BoldItalic"
392 mgText2Offset := "100"
393 mgUseSound := "true"
394 mgSoundfreq := "300"
395 mgExitEffect := "none"
396 mgSelectedEffect := "rotate"
397 mgUseGameArt := "false"
398 mgCandidate := ""
399 mgValidTypes := "\(Disc|\(Disk|\(Cart|\(Tape|\(Cassette|\(Part|\(Side"
400 mgOnLaunch := "false"
401 pauseEnabled := "false"
402 pauseKey := "~NumpadAdd"
403 pauseBackToMenuBarKey := "X"
404 pauseZoomInKey := "C"
405 pauseZoomOutKey := "V"
406 pauseScreenshotKey := "~PrintScreen"
407 pauseHiToTextPath := "D:\RocketLauncher\Module Extensions\HiToText.exe"
408 pauseSaveStateKeyCodes := "{shift down}{F7 down}{F7 up}{shift up}{800}{a down}{a up}|{shift down}{F7 down}{F7 up}{shift up}{800}{b down}{b up}|{shift down}{F7 down}{F7 up}{shift up}{800}{c down}{c up}|{shift down}{F7 down}{F7 up}{shift up}{800}{d down}{d up}|{shift down}{F7 down}{F7 up}{shift up}{800}{e down}{e up}|{shift down}{F7 down}{F7 up}{shift up}{800}{f down}{f up}|{shift down}{F7 down}{F7 up}{shift up}{800}{g down}{g up}|{shift down}{F7 down}{F7 up}{shift up}{800}{h down}{h up}|{shift down}{F7 down}{F7 up}{shift up}{800}{i down}{i up}|{shift down}{F7 down}{F7 up}{shift up}{800}{j down}{j up}"
409 pauseLoadStateKeyCodes := "{F7 down}{F7 up}{800}{a down}{a up}|{F7 down}{F7 up}{800}{b down}{b up}|{F7 down}{F7 up}{800}{c down}{c up}|{F7 down}{F7 up}{800}{d down}{d up}|{F7 down}{F7 up}{800}{e down}{e up}|{F7 down}{F7 up}{800}{f down}{f up}|{F7 down}{F7 up}{800}{g down}{g up}|{F7 down}{F7 up}{800}{h down}{h up}|{F7 down}{F7 up}{800}{i down}{i up}|{F7 down}{F7 up}{800}{j down}{j up}"
410 keyboardEncoder := ""
411 keyboardEncoderEnabled := "false"
412 keymapperEnabled := "false"
413 keymapperAHKMethod := "false"
414 keymapper := "xpadder"
415 xpadderFullPath := "D:\Utilities\Xpadder\xpadder.exe"
416 joyToKeyFullPath := "D:\Utilities\JoyToKey\JoyToKey.exe"
417 profilePath := "D:\RocketLauncher\Profiles"
418 keymapperProfilePath := "D:\RocketLauncher\Profiles\xpadder"
419 keymapperFrontEndProfileName := "RocketLauncherUI"
420 keymapperFrontEndProfile := "false"
421 keymapperRocketLauncherProfileEnabled := "false"
422 joyIDsEnabled := "false"
423 joyIDsPreferredControllersGlobal := ""
424 joyIDsPreferredControllersSystem := "use_global"
425 joyIDsPreferredControllersOnExit := ""
426 CustomJoyNamesEnabled := "false"
427 CustomJoyNames := ""
428 rotateMethod := "false"
429 FEProfile := "D:\RocketLauncher\Profiles\xpadder\RocketLauncherUI"
430 defaultProfile := "D:\RocketLauncher\Profiles\xpadder\_Default"
431 systemProfile := "D:\RocketLauncher\Profiles\xpadder\MAME"
432 xPadderSystemProfile := "D:\RocketLauncher\Profiles\xpadder\MAME\_Default"
433 emuProfile := "D:\RocketLauncher\Profiles\xpadder\MAME\MAME"
434 romProfile := "D:\RocketLauncher\Profiles\xpadder\MAME\kinstb"
435 RocketLauncherProfile := "D:\RocketLauncher\Profiles\xpadder\RocketLauncher"
436 blankProfile := "D:\RocketLauncher\Profiles\xpadder\_Default\blank"
437 ahkFEProfile := "D:\RocketLauncher\Profiles\AHK\RocketLauncherUI"
438 ahkDefaultProfile := "D:\RocketLauncher\Profiles\AHK\_Default"
439 ahkSystemProfile := "D:\RocketLauncher\Profiles\AHK\MAME"
440 ahkEmuProfile := "D:\RocketLauncher\Profiles\AHK\MAME\MAME"
441 ahkRomProfile := "D:\RocketLauncher\Profiles\AHK\MAME\kinstb"
442 ahkRocketLauncherProfile := "D:\RocketLauncher\Profiles\AHK\RocketLauncher"
443 bezelEnabled := "false"
444 bezelICEnabled := "false"
445 shaderName := "false"
446 shaderColor := ""
447 shaderTransparency := ""
448 statisticsEnabled := "true"
449 pressDuration := "-1"
450 emuVolume := "1"
451 dxwndIni := "D:\RocketLauncher\Module Extensions\dxwnd\dxwnd.ini"
452 dxwndFullPath := "D:\RocketLauncher\Module Extensions\dxwnd\dxwnd.exe"
453 qResFullPath := "D:\RocketLauncher\Module Extensions\QRes.exe"
454 mon1O := ""
455 pacDrivedllFile := "D:\RocketLauncher\Module Extensions\PacDrive32.dll"
456 userFadeAnimIniFile := "D:\RocketLauncher\Lib\User Fade Animations.ini"
457 testFile := ""
458 testDuration := ""
459 initialErrorMode := "0"
460
46100:10:41:568 | RL | INFO | +0 | BuildScript - Loaded XHotkey Init.ahk scripts
46200:10:41:568 | RL | INFO | +0 | BuildScript - Loaded Fade Init.ahk scripts
46300:10:41:568 | RL | INFO | +0 | BuildScript - Loaded Statistics Init.ahk scripts
46400:10:41:568 | RL | INFO | +0 | BuildScript - Validating module
46500:10:41:576 | RL | INFO | +0 | BuildScript - Validation complete
46600:10:41:576 | RL | INFO | +0 | BuildScript - Module:
467 MEmu := "MAME"
468 MEmuV := "v0.166"
469 MURL := ["http://www.mame.net/"]
470 MAuthor := ["djvj","faahrev","brolly","Tomkun"]
471 MVersion := "2.3.8"
472 MCRC := "6A458F17"
473 iCRC := "25E2CCF"
474 MID := "635746812784197028"
475 MSystem := ["AAE","Aamber Pegasus","Acorn Electron","Amstrad CPC","Amstrad GX4000","APF Imagination Machine","Apple II","Apple IIGS","Applied Technology MicroBee","Arcade","Arcade Classics","Atari 8-Bit","Atari 2600","Atari 5200","Atari 7800","Atari Classics","Atari Jaguar","Atari Lynx","Bally Astrocade","Bandai Super Vision 8000","Bandai WonderSwan","Bandai WonderSwan Color","Bit Corporation Gamate","Camputers Lynx","Capcom","Capcom Classics","Capcom Play System","Capcom Play System II","Capcom Play System III","Casio PV-1000","Casio PV-2000","Cave","Coleco ADAM","ColecoVision","Commodore 64","Commodore MAX Machine","Creatronic Mega Duck","Data East Classics","EACA EG2000 Colour Genie","Emerson Arcadia 2001","Entex Adventure Vision","Epoch Game Pocket Computer","Epoch Super Cassette Vision","Exidy Sorcerer","Fairchild Channel F","Fujitsu FM-7","Fujitsu FM Towns","Fujitsu FM Towns Marty","Funtech Super Acan","GamePark 32","GCE Vectrex","Hartung Game Master","HBMAME","Interton VC 4000","Irem Classics","JungleTac Sport Vii","Jupiter Ace","Konami Classics","LaserDisc","Magnavox Odyssey 2","MAME","Matra & Hachette Alice","Mattel Aquarius","Mattel Intellivision","MGT Sam Coupe","Midway Classics","Milton Bradley MicroVision","Namco Classics","Namco System 22","NEC PC-8801","NEC PC Engine","NEC PC Engine-CD","NEC SuperGrafx","NEC TurboGrafx-16","NEC TurboGrafx-CD","Nintendo 64","Nintendo 64DD","Nintendo Arcade Systems","Nintendo Classics","Nintendo Entertainment System","Nintendo Famicom","Nintendo Famicom Disk System","Nintendo Game Boy","Nintendo Game Boy Advance","Nintendo Game Boy Color","Nintendo Pokemon Mini","Nintendo Satellaview","Nintendo Super Famicom","Nintendo Super Game Boy","Nintendo Virtual Boy","Othello Multivision","PacMAME","Philips CD-i","Philips VG 5000","Philips Videopac Plus G7400","RCA Studio II","Sega 32X","Sega CD","Sega Classics","Sega Game Gear","Sega Genesis","Sega Master System","Sega Mega Drive","Sega Model 1","Sega Pico","Sega Saturn","Sega SC-3000","Sega SG-1000","Sega ST-V","Sega VMU","Sharp X1","Sinclair ZX81","SNK Classics","SNK Neo Geo","SNK Neo Geo AES","SNK Neo Geo AES","SNK Neo Geo CD","SNK Neo Geo MVS","SNK Neo Geo Pocket","SNK Neo Geo Pocket Color","Sony PlayStation","Sony PocketStation","Sord M5","Soundic Victory MPT-02","Super Nintendo Entertainment System","Taito Classics","Tandy TRS-80 Color Computer","Texas Instruments TI 99-4A","Thomson MO5","Tiger Game.com","Tomy Tutor","VTech CreatiVision","VTech Socrates","Watara Supervision","Williams Classics"]
476 ;----------------------------------------------------------------------------
477 ; Notes:
478 ; This module now includes everything from the legacy MAME and MESS modules, but combined to match the merge of the 2 emulators that occured on version 0.162.
479 ;
480 ; Exit fade will only work correctly if you don't have Esc, the default MAME exit key, as your exit key. If you use Esc, turn off the ExitScreen
481 ; This module will set your rom paths on the fly via CLI, but you must make sure the RLUI module setting for this module "MAME_BIOS_Path" is correctly set. It defaults to your roms subfolder where MAME.exe is found.
482 ; This module assumes you have bios zip in your MAME "roms" directory, which might be different than your actual roms directory, for each system you need this module for. All tested systems listed below
483 ; If MAME has a problem reading the bios zips, try archving them with "no compression"
484 ; This site can help a ton with details for the various systems supported: http://www.progettoemma.net/mess/index.html
485 ; You may get a black screen or MAME may close w/o notice if you do not have a bios rom for your system when one is needed.
486 ; If you use bezel, it is recommended to set the module bezel mode to normal, and go to your MAME.ini file, on your emulator folder, and choose these options: artwork_crop 1, use_backdrops 1, use_overlays 1, use_bezels 0
487 ;
488 ; Command Line Options - http://easyemu.mameworld.info/mameguide/mameguide-options.html
489 ; High Scores DO NOT SAVE when cheats are enabled!
490 ; HLSL Documentation: http://mamedev.org/source/docs/hlsl.txt.html
491 ; If you use MAME for AAE, create a vector.ini in mame's ini subfolder and paste these HLSL settings in there: http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=309968&page=&view=&sb=5&o=&vc=1
492 ;
493 ; Be aware that several systems will require a BIOS zip with their roms inside. They all come bundled in the MAME set so make sure you add your MAME roms folder to the
494 ; roms path for that system. If you have doubts about their filenames check the mTypeVar module variable content.
495 ;
496 ; Following systems will also require some specific files to operate properly:
497 ; APF Imagination Machine - apfimag (tape games), apfm1000 (cart games)
498 ; Camputers Lynx - lynx64k, lynx96k, lynx128k
499 ; Coleco ADAM - adam, adam_ddp, adam_fdc, adam_kb, adam_prn, adam_spi
500 ; NEC PC Engine-CD - "Super CD-ROM2 System V3.0 (J).pce" [262,656 bytes] (placed in the roms subfolder in the emuPath)
501 ; NEC TurboGrafx-CD - "Super CD-ROM2 System V3.01 (U).pce" [262,144 bytes] (placed in the roms subfolder in the emuPath)
502 ; Sega CD - segacd, megacd, megacd2j (megacd2j seems to be more compatible over megacdj)
503 ; Sony PlayStation - psa, pse, psj, psu
504 ;
505 ; Tape Control:
506 ; MAME tape/cassette emulation is terrible because normally it means you need to manually start and stop the tapes yourself so it's highly suggested that you use another emulator for such systems.
507 ; Tape control commands are accessible through the UI, press tab and then select Tape Control and you can start/stop the loaded tape from there.
508 ; The following hotkeys can also be used:
509 ; F2 - Start Tape
510 ; Left Shift + F2 - Stop Tape
511 ; Insert - While held, runs the game with throttling disabled and with the maximum frameskip. Useful to speedup the long tape loading process.
512 ;
513 ; Be aware that tape games are normally used on PC systems therefore it's likely that full keyboard emulation is enabled which means that you'll need to disable it in order to use any of the above
514 ; hotkeys. To disable it press the Scroll Lock key, press it again to enable it back.
515 ;
516 ; 7z Support:
517 ; Make sure you have 7z disabled for all MAME Arcade systems. Their roms are supposed to be archived, if you have 7z enabled then your games will fail to load. It's
518 ; fine to enable 7z to non-arcade systems.
519 ;
520 ; Custom Configuration Files:
521 ; If you want to use custom configuration files (.cfg files) for some games you will need to store them inside your MAME cfg folder using the following structure:
522 ; cfg\mame_system_name\database_rom_name\mame_system_name.cfg
523 ; An example of a game that requires specific settings is ICBM Attack for the Bally Astrocade, in this case special cfg file should be:
524 ; cfg\astrocde\I.C.B.M. Attack (USA) (Unl)\astrocde.cfg
525 ;
526 ; Ini Files:
527 ; Module will set most settings through command line which will override any settings you might have on your MAME ini files. Everything else will be read from
528 ; those. MAME supports a hierarchical ini file structure and will load settings from several ini files following a specific order:
529 ;- mame.ini
530 ;- <mymame>.ini (i.e. if MAME was renamed mame060.exe, MAME parses mame060.ini here)
531 ;- debug.ini (if the debugger is enabled)
532 ;- <parent>.ini (for clones only, may be called recursively)
533 ;- <gamename>.ini
534 ;- vertical.ini (for games with vertical monitor orientation)
535 ;- horizont.ini (for games with horizontal monitor orientation)
536 ;- vector.ini (for vector games only)
537 ;- <driver>.ini (based on the source filename of the driver)
538 ;
539 ; The settings in the later ini's override those in the earlier ini's.
540 ;
541 ; It's highly recommended that you set skipchecks to 'Rom Only" for MAME otherwise RocketLauncher won't be able to launch several games due
542 ; to the way MAME roms are packaged. This will be even more noticeable for those using merged sets.
543 ;
544 ; Bally Astrocade:
545 ; ICBM requires a soft reset (even on the real hardware) to launch. You can read about it here: http://www.ballyalley.com/ballyalley/articles/Playing_ICBM_Attack_Using_MESS.pdf
546 ; Other games might require this as well, you can enable this in the module's settings so the machine is reset automatically on launch, otherwise you need to press F3 to start the game.
547 ; Also ICBM Attack uses different controls then the rest of the games. Make sure you follow the procedure explained above under "Custom Configuration Files" to create such file.
548 ;
549 ; GCE Vectrex:
550 ; Requires a vectrex.lay and a png overlay for each game. These all need to be placed in the MAME\artwork\vectrex folder.
551 ; You can download all these pngs and the lay file in my ftp folder. You need to use the HyperList XML to match the pngs.
552 ;
553 ; Jupiter Ace:
554 ; Set mame to 48k ram
555 ;
556 ; Magnavox Odyssey 2:
557 ; Euro games should use the videopac bios instead of the odyssey2 one or you'll get some timing issues.
558 ; Use the systemName ini file in the folder with this module for this, example:
559 ; [Moto-Crash (France)]
560 ; Bios=videopac
561 ;
562 ; RCA Studio 2:
563 ; Most of the games require you to press a button to start the game, like 1 or 2 (refer to the game's manual).
564 ; The game screen will be black until you do.
565 ;
566 ; Texas Instruments TI 99/4A:
567 ; This system requires full keyboard emulation to work properly
568 ; Split cart dumps are not supported since MESS .145 so you'll have to convert them to RPK format or use an earlier version of MESS (and a different module)
569 ; You can check how to convert split cart dumps to RPK here:
570 ; http://www.ninerpedia.org/index.php/MESS_multicart_system
571 ; For floppy games make sure you have a RPK dump of an extended basic rom on your roms folder. It should be named "extended_basic.rpk"
572 ; This system requires you to use a MAME build with Direct Input enabled in order to auto start the games. Most games will require commands to be typed to start
573 ; and it's normally too complex to be able to do it through the -ab switch so SendCommand is used instead which means a Direct Input enabled MAME version is required.
574 ;
575 ; Bezels:
576 ; Module settings control whether RocketLauncher or MAME bezels are shown
577 ; In the bezel normal mode only RocketLauncher Bezels will be show and the MAME use_bezels option will be forced disbaled
578 ; In the bezel layout mode, RocketLauncher Bezels will be drawn only when you do not have a layout file on your MAME folders for the current game
579 ;
580 ; ServoStik:
581 ; The module will automatically control any connected ServoStiks found on the system.
582 ; It does this by reading the xml info from MAME. If that XML info has directional info at 4 or less, 4-way mode will be enabled. All others get 8-way mode.
583 ;
584 ; Per game controller types:
585 ; MAME allows you to change the controller type for each game by using slot devices. Slot devices are highly customizable and vary greatly from system to
586 ; system so to avoid adding a huge complexity to the module this must be done through the Parameters settings.
587 ; Slot devices are stored in the MAME ini file you are using, so the best way to find the command line you need to use is to start your game set the slot devices
588 ; through the MAME UI (Press tab while in MAME) exit and then open the MAME ini file and search for a section named SLOT DEVICES.
589 ; This is an example for Atari 2600 for a game using wheel controllers on both joy ports:
590 ; #
591 ; # SLOT DEVICES
592 ; #
593 ; joyport1 wheel
594 ; joyport2 wheel
595 ; The suggested method is to set the desired controllers you want to use by default in the Module Global Settings, in this case under the Atari 2600 tab you would
596 ; set Parameters=-joyport1 joy -joyport2 joy
597 ; And then for specific games do the same under Module Specific Settings for that system, if a game requires the wheel controller you'd set
598 ; Parameters=-joyport1 wheel -joyport2 wheel
599 ;
600 ; Another option is to set the default values in the MAME ini file and make sure you also set writeconfig to 0.
601 ; Swapping slot devices wipes out SYSTEM custom configs on the unplugged controllers, so to avoid any customised controls getting erased everytime you change slot devices,
602 ; ensure you set your controls in the main MAME config file (MAME.ini), not the system one (ex. Atari 2600.ini).
603 ;
604 ; Linking/NetPlay:
605 ; The module will automatically set correct network ports for linked games.
606 ; Up to 8 players on the same PC are supported. Multiple copies of MAME will be launched.
607 ; Placement of the screens are automatic but can be controlled in RocketLauncherUI MAME module settings. Windowed mode is required when more than one copy of mame is launched and is set automatically.
608 ; Each player will use a different cfg and nvram folder in your MAME folder. Player 1 will always use .\cfg and .\nvram.
609 ; Players 2 through 8 will use .\cfg2, .\cfg3, etc and .\nvram2, .\nvram3, etc
610 ; These folders and cfg/nvram files will be automatically created for you on launch so you do not need to create them manually.
611 ; Global inputs is automatically turned on for you but it is your job to setup individual controls for each instance. MAME only supports raw-input in this mode however.
612 ; Over a LAN/WAN connection only 2 players are supported due to the way the ports are designated, it's impossible to automate port allocation because there is no 1 server where all hosts connect to.
613 ; Default starting port for the Master is 15111 and consecutively goes up from there upto 15119 for 8 players. You can change the default starting port in the module settings if it conflicts with used ports on your network.
614 ; There are other network related settings in the module settings to assist with starting IPs and connectivity, so check them out as well.
615 ;
616 ; NVRAM Automation for linked games:
617 ; When launching linked games on the same pc NVRAM settings are automatically set for you so each player will be unique.
618 ; For instance, in Virtua Racing, Player 1 is red, player 2 is blue, player 3 is yellow, etc.
619 ; To do this, some other options are also set automatically for you as well, like region, difficulty, countr, course, etc
620 ; I set these to defaults, but prefer USA region. If you do not like these, you will have to disable NVRAM automation in the module settings in RocketLauncherUI.
621 ;
622 ; Additional Link info that may be of some importance:
623 ; The original Model-1 has a max Bandwidth of 6 MBit/s (TOTX173/TORX173).
624 ; One Board sends about 20 KByte/s.
625 ; So bandwidth CLIENTSIDE is like...
626 ; 2 Boards - 20 KByte/s inbound and 20 KByte/s outbound.
627 ; 3 Boards - 40 KByte/s inbound and 20 KByte/s outbound.
628 ; 4 Boards - 60 KByte/s inbound and 20 KByte/s outbound.
629 ; etc.
630 ; Some good info on Linking: http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=297577&page=0
631 ; also http://forum.arcadecontrols.com/index.php/topic,130136.msg1331485.html
632 ;----------------------------------------------------------------------------
633 StartModule()
634 BezelGUI()
635
636 dialogOpen := i18n("dialog.open") ; Looking up local translation
637 primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object
638 emuPrimaryWindow := new Window(new WindowTitle(,"MAME")) ; instantiate primary emulator window object
639 emuOpenWindow := new Window(new WindowTitle(dialogOpen,"ConsoleWindowClass"))
640 emuConsoleWindow := new Window(new WindowTitle(,"ConsoleWindowClass"))
641 emuDebugWindow := new Window(new WindowTitle(,"MAMEDebugWindow"))
642 emuOutputWindow := new Window(new WindowTitle(,"MAMEOutput"))
643
644 ; This object controls how the module reacts to different systems. MAME can play a lot of systems, but needs to know what system you want to run, so this module has to adapt.
645 mTypeVar := "
646 ( LTrim
647 Aamber Pegasus|pegasus
648 Acorn Electron|electron
649 Amstrad CPC|cpc664
650 Amstrad GX4000|gx4000
651 APF Imagination Machine|apfimag
652 Apple II|apple2ep
653 Apple IIGS|apple2gs
654 Applied Technology MicroBee|mbeeic
655 Atari 8-Bit|a800
656 Atari 2600|a2600
657 Atari 5200|a5200
658 Atari 7800|a7800
659 Atari Jaguar|jaguar
660 Atari Lynx|lynx
661 Bally Astrocade|astrocde
662 Bandai Super Vision 8000|sv8000
663 Bandai WonderSwan|wswan
664 Bandai WonderSwan Color|wscolor
665 Bit Corporation Gamate|gamate
666 Camputers Lynx|lynx128k
667 Casio PV-1000|pv1000
668 Casio PV-2000|pv2000
669 Coleco ADAM|adam
670 ColecoVision|coleco
671 Commodore 64|c64
672 Commodore MAX Machine|vic10
673 Creatronic Mega Duck|megaduck
674 EACA EG2000 Colour Genie|cgenie
675 Emerson Arcadia 2001|arcadia
676 Entex Adventure Vision|advision
677 Epoch Game Pocket Computer|gamepock
678 Epoch Super Cassette Vision|scv
679 Exidy Sorcerer|sorcerer
680 Fairchild Channel F|channelf
681 Fujitsu FM-7|fmnew7
682 Fujitsu FM Towns|fmtowns
683 Fujitsu FM Towns Marty|fmtmarty
684 Funtech Super Acan|supracan
685 GamePark 32|gp32
686 GCE Vectrex|vectrex
687 Hartung Game Master|gmaster
688 Interton VC 4000|vc4000
689 JungleTac Sport Vii|vii
690 Jupiter Ace|jupace
691 Magnavox Odyssey 2|odyssey2
692 Matra & Hachette Alice|alice32
693 Mattel Aquarius|aquarius
694 Mattel Intellivision|intv
695 MGT Sam Coupe|samcoupe
696 Milton Bradley MicroVision|microvsn
697 NEC PC-8801|pc8801
698 NEC PC Engine|pce
699 NEC PC Engine-CD|pce
700 NEC SuperGrafx|sgx
701 NEC TurboGrafx-16|tg16
702 NEC TurboGrafx-CD|tg16
703 Nintendo 64|n64
704 Nintendo 64DD|n64dd
705 Nintendo Entertainment System|nes
706 Nintendo Famicom|famicom
707 Nintendo Famicom Disk System|fds
708 Nintendo Game Boy|gameboy
709 Nintendo Game Boy Advance|gba
710 Nintendo Game Boy Color|gbcolor
711 Nintendo Pokemon Mini|pokemini
712 Nintendo Satellaview|snes
713 Nintendo Super Famicom|snes
714 Nintendo Super Game Boy|supergb
715 Nintendo Virtual Boy|vboy
716 Othello Multivision|omv1000
717 Philips CD-i|cdimono1
718 Philips Videopac Plus G7400|g7400
719 Philips VG 5000|vg5k
720 RCA Studio II|studio2
721 Sega 32X|32x
722 Sega CD|segacd
723 Sega Game Gear|gamegear
724 Sega Genesis|genesis
725 Sega Master System|sms
726 Sega Mega Drive|megadriv
727 Sega Pico|pico
728 Sega Saturn|saturn
729 Sega SC-3000|sc3000
730 Sega SG-1000|sg1000
731 Sega VMU|svmu
732 Sharp X1|x1turbo40
733 Sinclair ZX81|zx81
734 SNK Neo Geo AES|aes
735 SNK Neo Geo CD|neocdz
736 SNK Neo Geo Pocket|ngp
737 SNK Neo Geo Pocket Color|ngpc
738 Sony PlayStation|psx
739 Sony PocketStation|pockstat
740 Sord M5|m5
741 Soundic Victory MPT-02|mpt02
742 Super Nintendo Entertainment System|snes
743 Tandy TRS-80 Color Computer|coco3
744 Texas Instruments TI 99-4A|ti99_4a
745 Thomson MO5|mo5
746 Tiger Game.com|gamecom
747 Tomy Tutor|tutor
748 VTech CreatiVision|crvision
749 VTech Socrates|socrates
750 Watara Supervision|svision
751 )"
752 mType := Object()
753 Loop, Parse, mTypeVar, `n, `r
754 {
755 obj := {}
756 Loop, Parse, A_LoopField, |
757 If (A_Index = 1)
758 obj.System := A_LoopField
759 Else ; 2
760 obj.mameID := A_LoopField
761 mType.Insert(obj["System"], obj)
762 }
763 RLLog.Debug("Module - Finished building the " . MEmu . " object")
764 ; For easier use throughout the module
765 mameSystem := mType[systemName].System
766 mameID := mType[systemName].mameID
767
768 If !mameSystem {
769 RLLog.Warning("Module - """ . systemName . """ is not a known console or computer system. Defaulting to MAME's Arcade mode for the remainder of this " . MEmu . " module.")
770 mameSystem := systemName
771 mameID := "MAME"
772 }
773
774 Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1) ; Set fullscreen mode
775 legacyMode := moduleIni.Read(romName . "|" . mameSystem . "|Settings", "LegacyMode","false",,1)
776 mameBiosPath := moduleIni.Read("Settings", "MAME_BIOS_Path", emuPath . "\roms",,1)
777 Videomode := moduleIni.Read("Settings", "Videomode","d3d",,1) ; Choices are gdi,ddraw,d3d. If left blank, MAME uses d3d by default
778 pauseMethod := moduleIni.Read("Settings", "PauseMethod",1,,1) ; set the pause method that works better on your machine (preferred methods 1 and 2) 1 = Win7 and Win8 OK - Problems with Win XP, 2 = preferred method for WinXP - Problems in Win7, 3 and 4 = same as 1 and 2, 5 = only use If you have a direct input version of mame, 6 = suspend mame process method, it could crash mame in some computers
779 bilinearFilter := moduleIni.Read(mameSystem . "|Settings", "BilinearFilter","false",,1)
780 hlsl := moduleIni.Read(romName . "|" . mameSystem . "|Settings", "HLSL","false",,1)
781 glsl := moduleIni.Read(romName . "|" . mameSystem . "|Settings", "GLSL","false",,1)
782 bezelMode := moduleIni.Read(romName . "|" . mameSystem . "|Settings", "BezelMode","layout",,1) ; "layout" or "normal"
783 verticalRotationMode := moduleIni.Read(romName . "|" . mameSystem . "|Settings", "VerticalRotationMode","none",,1)
784 cheatMode := moduleIni.Read("Settings", "CheatMode","false",,1)
785 cheatModeKey := moduleIni.Read("Settings", "CheatModeKey",,,1) ; user defined key to be held down before launching a mame rom.
786 UseSoftwareList := moduleIni.Read(romName . "|" . mameSystem, "UseSoftwareList","false",,1)
787 sysStaticParams := moduleIni.Read(mameSystem, "StaticParameters",,,1)
788 sysParams := moduleIni.Read(mameSystem, "Parameters",,,1)
789 romParams := moduleIni.Read(romName, "Parameters", sysParams,,1)
790 mameRomName := moduleIni.Read(romName, "MameRomName",,,1)
791 autosave := moduleIni.Read(romName . "|" . mameSystem, "Autosave", "false",,1)
792 volume := moduleIni.Read(romName . "|" . mameSystem . "|Settings", "Volume",,,1)
793 Artwork_Crop := moduleIni.Read(romName . "|" . mameSystem, "Artwork_Crop", "true",,1)
794 Use_Bezels := moduleIni.Read(romName . "|" . mameSystem, "Use_Bezels", "false",,1)
795 Use_Overlays := moduleIni.Read(romName . "|" . mameSystem, "Use_Overlays", "true",,1)
796 Use_Backdrops := moduleIni.Read(romName . "|" . mameSystem, "Use_Backdrops", "true",,1)
797 Use_Cpanels := moduleIni.Read(romName . "|" . mameSystem, "Use_Cpanels", "false",,1)
798 Use_Marquees := moduleIni.Read(romName . "|" . mameSystem, "Use_Marquees", "false",,1)
799 inipath := moduleIni.Read(mameSystem, "IniPath",,,1)
800 hashpath := moduleIni.Read(mameSystem, "HashPath",,,1)
801 UseControllerRemap := moduleIni.Read(mameSystem . "|Settings", "UseControllerRemap", "true",,1)
802 ControllerRemapPath := moduleIni.Read(mameSystem . "|Settings", "ControllerRemapPath", emuPath . "\ControllerRemap\ControllerRemap.exe",,1)
803 CtrlRemapFile := new File(ControllerRemapPath)
804 ControllerRemapConfigPath := moduleIni.Read( mameSystem . "|Settings", "ControllerRemapConfigPath", CtrlRemapFile.FilePath . "\ctrlr\",,1)
805 MAMECtrlrPath := moduleIni.Read(mameSystem . "|Settings", "MAMECtrlrPath", emuPath . "\ctrlr",,1)
806
807 mameBiosPath := GetFullName(mameBiosPath)
808
809 ; Loop, 8
810 ; car%A_Index%Color := moduleIni.Read(romName, "Car_" . A_Index . "_Color",,,1)
811
812 enableLinkPlay := moduleIni.Read(romName . "|Link/Network", "Enable_Link_Play", "false",,1)
813 networkSession := ""
814 If (enableLinkPlay != "false") {
815 RLLog.Info("Module - Link/Network Multi-Player is an available option for " . romName)
816 getWANIP := moduleIni.Read("Link/Network", "Get_WAN_IP","false",,1)
817 myIP := If getWANIP = "true" ? GetPublicIP() : "127.0.0.1" ; use local ip by default if user does not want to get the WAN IP as MAME needs this for linked games
818 networkPlayers := enableLinkPlay ; Max amount of networkable players
819 localLink := 1 ; Tell Multiplayer menu to enable menu option for local linking
820
821 enableNVRAMAutomation := moduleIni.Read(romName . "|Link/Network", "Enable_NVRAM_Automation","true",,1)
822 maxPlayersPerMonitor := moduleIni.Read(romName . "|Link/Network", "Max_Players_Per_monitor","1|1|1|1|1|1|1|1",,1)
823 splitScreen2PlayersMode := moduleIni.Read(romName . "|Link/Network", "SplitScreen_2_Players","Horizontal",,1) ;horizontal or vertical
824 splitScreen3PlayersMode := moduleIni.Read(romName . "|Link/Network", "SplitScreen_3_Players","P1top",,1) ; For Player1 screen to be on left: P1left. For Player1 screen to be on top: P1top. For Player1 screen to be on bottom: P1bottom. For Player1 screen to be on right: P1right.
825 localPort := moduleIni.Read("Link/Network", "Local_Port","15111",,1)
826
827 defaultServerIP := moduleIni.Read("Link/Network", "Default_Server_IP", myIP,,1)
828 defaultServerPort := moduleIni.Read("Link/Network", "Default_Server_Port","15111",,1)
829 lastIP := moduleIni.Read("Link/Network", "Last_IP", defaultServerIP,,1) ; also known as the Remote IP in mame. Does not need to be on the ISD
830 lastPort := moduleIni.Read("Link/Network", "Last_Port", defaultServerPort,,1) ; also known as the Remote Port in mame. Does not need to be on the ISD
831
832 MultiplayerMenu(lastIP, lastPort, networkType, networkPlayers,,,,,,localLink,"ipAndPort")
833
834 ;MultiPlayer Menu Result
835 ; If !(networkType)
836 ; MsgBox, % "Single Player Game"
837 ; Else If (networkType="localLink")
838 ; MsgBox, % "Local Link selected with the number of players equal to: " . networkPlayers
839 ; Else If (networkType="server")
840 ; MsgBox, % "WAN IP Address=" . networkIP . " | LAN IP Address=" . localIP[1,2] . " | Port=" . networkPort . " | networkPlayers=" . networkPlayers . " | networkRequiresSetup=" . networkRequiresSetup
841 ; Else If (networkType="client")
842 ; MsgBox, % "NetworkIP=" . networkIP . " | Port Number=" . networkPort . " | networkRequiresSetup=" . networkRequiresSetup
843
844 If networkSession {
845 RLLog.Info("Module - Using a Network for " . romName)
846 multiPlayerObj := Object() ; initialize object to store the multiplayer options
847 If (networkType="localLink") {
848 RLLog.Info("Module - Setting remote host to 127.0.0.1 to support local link mode as it is running on this PC.")
849 linkEnabledGame := 1
850 If networkPlayers > 1
851 { RLLog.Info("Module - Local link mode was selected and " . networkPlayers . " sessions will be launched.")
852 fullscreen := "false" ; must turn off fullscreen if running multiple MAMEs on the same machine
853 Loop % networkPlayers {
854 multiPlayerObj[A_Index,"Player"] := A_Index
855 multiPlayerObj[A_Index,"CfgDir"] := " -cfg_directory cfg" . (If A_Index = 1 ? "" : A_Index)
856 multiPlayerObj[A_Index,"NvramDir"] := " -nvram_directory nvram" . (If A_Index = 1 ? "" : A_Index)
857 If (A_Index = 1) { ; Player 1
858 initialLocalPort := localPort ; must be stored for last player
859 multiPlayerObj[A_Index,"LocalHost"] := " -comm_localhost 0.0.0.0"
860 multiPlayerObj[A_Index,"LocalPort"] := " -comm_localport " . localPort
861 localPort++
862 multiPlayerObj[A_Index,"RemotePort"] := " -comm_remoteport " . localPort
863 } Else { ; Players 2+
864 multiPlayerObj[A_Index,"LocalPort"] := " -comm_localport " . localPort
865 localPort++
866 multiPlayerObj[A_Index,"RemoteHost"] := " -comm_remotehost 127.0.0.1"
867 multiPlayerObj[A_Index,"RemotePort"] := " -comm_remoteport " . (If A_Index = networkPlayers ? initialLocalPort : localPort) ; must set remote port to first port on last player
868 }
869
870 ; msgbox % "Player: " . multiPlayerObj[A_Index]["Player"] . "`nLocalHost: " . multiPlayerObj[A_Index]["LocalHost"] . "`nLocalPort: " . multiPlayerObj[A_Index]["LocalPort"] . "`nRemoteHost: " . multiPlayerObj[A_Index]["RemoteHost"] . "`nRemotePort: " . multiPlayerObj[A_Index]["RemotePort"] . "`nCfgDir: " . multiPlayerObj[A_Index]["CfgDir"] . "`nNvramDir: " . multiPlayerObj[A_Index]["NvramDir"]
871 }
872 } Else
873 RLLog.Info("Module - Local link mode was selected but user only chose 1 player. Launch will be a normal session.")
874 } Else If (networkType = "client") {
875 RLLog.Info("Module - Remote host is running on another PC, module will use remote link mode.")
876 moduleIni.Write(networkIP,"GlobalModuleIni","Link/Network","Last_IP") ; Save last used IP and Port for quicker launching next time
877 moduleIni.Write(networkPort,"GlobalModuleIni","Link/Network","Last_Port")
878 linkType := "Slave"
879 networkPlayers := 1
880 multiPlayerObj[1,"Player"] := 1
881 multiPlayerObj[1,"CfgDir"] := " -cfg_directory cfg"
882 multiPlayerObj[1,"NvramDir"] := " -nvram_directory nvram"
883 multiPlayerObj[1,"LocalHost"] := " -comm_localhost 0.0.0.0" ; don't really need to set this but just in case
884 multiPlayerObj[1,"LocalPort"] := " -comm_localport " . localPort
885 multiPlayerObj[1,"RemoteHost"] := " -comm_remotehost " . networkIP
886 multiPlayerObj[1,"RemotePort"] := " -comm_remoteport " . networkPort
887 } Else { ; server
888 RLLog.Info("Module - This PC is acting as the host, telling mame to listen for incoming connections on port: " . localPort)
889 moduleIni.Write(networkIP,"GlobalModuleIni","Link/Network","Last_IP") ; Save last used IP and Port for quicker launching next time
890 moduleIni.Write(networkPort,"GlobalModuleIni","Link/Network","Last_Port")
891 linkType := "Master"
892 networkPlayers := 1
893 multiPlayerObj[1,"Player"] := 1
894 multiPlayerObj[1,"CfgDir"] := " -cfg_directory cfg"
895 multiPlayerObj[1,"NvramDir"] := " -nvram_directory nvram"
896 multiPlayerObj[1,"LocalHost"] := " -comm_localhost 0.0.0.0" ; don't really need to set this but just in case
897 multiPlayerObj[1,"LocalPort"] := " -comm_localport " . networkPort
898 multiPlayerObj[1,"RemoteHost"] := " -comm_remotehost " . networkIP
899 multiPlayerObj[1,"RemotePort"] := " -comm_remoteport " . networkPort
900 }
901 RLLog.Info("Module - Starting a network session using the IP """ . networkIP . """ and PORT """ . networkPort . """")
902 } Else {
903 RLLog.Info("Module - User chose Single Player mode for this session")
904 }
905 }
906
907 FadeInStart()
908
909 If inipath
910 inipath := AbsoluteFromRelative(EmuPath, inipath)
911 If hashpath
912 hashpath := AbsoluteFromRelative(EmuPath, hashpath)
913
914 artworkCrop := If (Artwork_Crop = "true") ? " -artwork_crop" : " -noartwork_crop"
915 useBezels := If (Use_Bezels = "true") ? " -use_bezels" : " -nouse_bezels"
916 useOverlays := If (Use_Overlays = "true") ? " -use_overlays" : " -nouse_overlays"
917 useBackdrops := If (Use_Backdrops = "true") ? " -use_backdrops" : " -nouse_backdrops"
918 useCpanels := If (Use_Cpanels = "true") ? " -use_cpanels" : " -nouse_cpanels"
919 useMarquees := If (Use_Marquees = "true") ? " -use_marquees" : " -nouse_marquees"
920 autosave := If autosave = "true" ? " -autosave" : ""
921 volume := If volume != "" ? " -volume " . volume : ""
922 inipath := If inipath != "" ? " -inipath """ . inipath . """" : ""
923 hashpath := If hashpath != "" ? " -hashpath """ . hashpath . """" : ""
924
925 If (verticalRotationMode = "none")
926 verticalRotationMode := ""
927
928 ; Process mame's ListXML for certain features
929 If (bezelEnabled = "true" || servoStikEnabled = "auto" || verticalRotationMode || UseControllerRemap = "true") {
930 ListXMLObject := Object()
931 ListXMLObject := ListXMLInfo(If mameRomName ? mameRomName : romName)
932
933 Angle := ListXMLObject["Angle"].Value
934 If (bezelEnabled = "true") {
935 If (networkPlayers > 1) {
936 useBezels := " -nouse_bezels" ; force disabling MAME built-in bezels
937 BezelStart(networkPlayers)
938 } Else {
939 If (bezelMode = "layout"){
940 BezelStart("layout",ListXMLObject["Parent"].Value,Angle,romName)
941 } Else { ;bezel mode = normal
942 useBezels := " -nouse_bezels" ; force disabling MAME built-in bezels
943 BezelStart(,,Angle)
944 }
945 }
946 }
947 If (servoStikEnabled = "auto") {
948 ServoStik(If ListXMLObject["Ways"].Value <= 4 ? 4 : 8) ; If "ways" in the xml is set to 4 or less, the servo will go into 4-way mode, else 8-way mode will be enabled
949 }
950 If (verticalRotationMode && Angle) {
951 RLLog.Info("Setting rotation mode to " . verticalRotationMode . " - Game's angle is " . Angle)
952 If (verticalRotationMode = "original")
953 verticalRotationMode := " -norotate"
954 Else If (verticalRotationMode = "right")
955 verticalRotationMode := " -ror"
956 Else If (verticalRotationMode = "left")
957 verticalRotationMode := " -rol"
958 Else
959 verticalRotationMode := ""
960 }
961 Else
962 verticalRotationMode := ""
963
964 ;Controller Remap
965 If (UseControllerRemap = "true") {
966 RLLog.Info("Controller Remap: Start")
967 romProfileName := (mameRomName ? mameRomName : romName)
968 romParentName := ListXMLObject["Parent"].Value
969
970 If ControllerRemapPath
971 ControllerRemapPath := AbsoluteFromRelative("", ControllerRemapPath)
972 If ControllerRemapConfigPath
973 ControllerRemapConfigPath := AbsoluteFromRelative("", ControllerRemapConfigPath)
974 If MAMECtrlrPath
975 MAMECtrlrPath := AbsoluteFromRelative(emuPath, MAMECtrlrPath)
976
977 ctrlrPath := ""
978 RLLog.Info("Controller Remap: ControllerRemapConfigPath: " . ControllerRemapConfigPath)
979
980 ;~ ;1- Check for Rom. 2- Check for Rom Parent. 3- Check for System default
981 If (FileExist(ControllerRemapConfigPath . "\" . systemName . "\" . romProfileName . ".cfg")) {
982 RLLog.Info("Controller Remap: Rom Config File Found: " . ControllerRemapConfigPath . "\" . systemName . "\" . romProfileName . ".cfg")
983 ctrlrPath := new File(ControllerRemapConfigPath . "\" . systemName . "\" . romProfileName . ".cfg")
984 }
985 else if (romParentName and FileExist(ControllerRemapConfigPath . "\" . systemName . "\" . romParentName . ".cfg")) {
986 RLLog.Info("Controller Remap: Parent Rom Config File Found: " . ControllerRemapConfigPath . "\" . systemName . "\" . romParentName . ".cfg")
987 ctrlrPath := new File(ControllerRemapConfigPath . "\" . systemName . "\" . romParentName . ".cfg")
988 }
989 else If (FileExist(ControllerRemapConfigPath . "\" . systemName . "\_Default.cfg")) {
990 RLLog.Info("Controller Remap: System Config File Found: " . ControllerRemapConfigPath . "\" . systemName . "\_Default.cfg")
991 ctrlrPath := new File(ControllerRemapConfigPath . "\" . systemName . "\_Default.cfg")
992 }
993 else If (FileExist(ControllerRemapConfigPath . "\_Default.cfg")) {
994 RLLog.Info("Controller Remap: Global Config File Found: " . ControllerRemapConfigPath . "\_Default.cfg")
995 ctrlrPath := new File(ControllerRemapConfigPath . "\_Default.cfg")
996 }
997
998 ; Is there a controller file?
999 if (ctrlrPath) {
1000 ctrlrFile := " -ctrlr RocketLauncher"
1001
1002 ;Replace <system name="default"> with the Right mameID in the RocketLauncher.cfg file
1003 if(mameID != "MAME") {
1004 ctrlrPath.Read()
1005 rocketLauncherCfgFile := new File(MAMECtrlrPath . "\RocketLauncher.cfg")
1006 rocketLauncherCfgFile.Delete()
1007 rocketLauncherCfgFile.Append(StringUtils.Replace(ctrlrPath.Text, "<system name=""default"">", "<system name=""" . mameID . """>"))
1008 }
1009 else {
1010 ctrlrPath.Copy(MAMECtrlrPath . "\RocketLauncher.cfg",1)
1011 }
1012
1013 RLLog.Info("Controller Remap: Running """ . ControllerRemapPath . """ /remap:""" . MAMECtrlrPath . "\RocketLauncher.cfg""")
1014 ControllerRemapProcess := new Process(ControllerRemapPath)
1015 ControllerRemapProcess.Run(" /remap:""" . MAMECtrlrPath . "\RocketLauncher.cfg""","Hide")
1016 }
1017 else {
1018 RLLog.Info("Controller Remap: No Controller config file found.")
1019 }
1020 RLLog.Info("Controller Remap: End")
1021 }
1022 }
1023
1024 winstate := If (Fullscreen = "true") ? "Hide UseErrorLevel" : "UseErrorLevel"
1025 fullscreenParam := If (Fullscreen = "true") ? " -nowindow" : " -window"
1026
1027 hideEmuObj := Object(emuOpenWindow,0,emuDebugWindow,0,emuOutputWindow,0,emuPrimaryWindow,1)
1028 7z(romPath, romName, romExtension, sevenZExtractPath)
1029
1030 ; Get MAME version from executable, this is needed since some CLI switches are not available in older MAME versions
1031 exeAtrib := FileGetVersionInfo_AW(emuPath . "\" . executable, "FileVersion|ProductVersion", "|")
1032 Loop, Parse, exeAtrib, |%A_Tab%, %A_Space%
1033 A_Index & 1 ? ( _ := A_LoopField ) : ( %_% := A_LoopField )
1034 If ProductVersion
1035 MAMEVersion := StringUtils.Right(ProductVersion, StringUtils.StringLength(ProductVersion) - 2)
1036 RLLog.Info("Module - Detected MAME Product Version from '" . EmuPath . "\" . executable . "' is " . MAMEVersion)
1037
1038 If (videomode = "opengl") {
1039 hlsl := " -nohlsl_enable"
1040 If (MAMEVersion > 159)
1041 glsl := If glsl = "true" ? " -gl_glsl" : (If glsl = "ini" ? "" : " -nogl_glsl")
1042 Else
1043 glsl := ""
1044 } Else {
1045 hlsl := If hlsl = "true" ? " -hlsl_enable" : (If hlsl = "ini" ? "" : " -nohlsl_enable")
1046 If (MAMEVersion > 159)
1047 glsl := If videomode = "ini" ? "" : " -nogl_glsl"
1048 Else
1049 glsl := ""
1050
1051 If (videomode = "ini")
1052 videomode := ""
1053 }
1054 videomode := If (Videomode != "" ) ? " -video " . videomode : ""
1055
1056 param1 := " -cart """ . romPath . "\" . romName . romExtension . """" ; default param1 used for launching most systems.
1057 If (romExtension = ".txt") ; This can be applied to all systems
1058 param1 := ""
1059
1060 If (mameID = "apfimag") ; APF Imagination Machine
1061 If (romExtension != ".tap")
1062 mameID := "apfm1000" ; cart games for APF Imagination Machine require a different bios to be loaded
1063
1064 If (UseSoftwareList != "true")
1065 { ; Now that we know the system we are loading, determine if we use an ini assocated with that system for custom game configs a user might need. Then load the configs associated to that game.
1066 If StringUtils.Contains(mameID,"ti99_4a|aes|apple2gs|electron|mbeeic|odyssey2|astrocde|samcoupe|vic10|cpc664|mo5") ; these systems will use an ini to store game specific settings
1067 {
1068 If !SystemModuleIni.Exist()
1069 SystemModuleIni.Append() ; create a blank file if it does not exist
1070
1071 If (mameID = "ti99_4a") ; Texas Instruments TI 99-4A
1072 {
1073 ExpansionCartLocation := moduleIni.Read("Settings", "ExpansionCartLocation", romPathOrig . "\System",,1)
1074 ExpansionCartLocation := GetFullName(ExpansionCartLocation)
1075 CommandWaitOffset := moduleIni.Read("Settings", "CommandWaitOffset", 0,,1)
1076
1077 ExpansionCart := moduleIni.Read(romName, "Expansion_Cart","extended_basic.rpk",,1) ; user can specify a rom specific cart instead of the default basic one
1078 Command := moduleIni.Read(romName, "Command",,,1)
1079
1080 ; Now set the parameters to send to MAME
1081 If (romExtension = ".dsk") ; Expansion Disk
1082 {
1083 ; If using the mainCart , send expansionLocation to MAME. This will require DirectInput to be enabled on the MAME build! Else we are loading a Disk game
1084 param1 := " -nat -gromport single -cart1"
1085 param2 := " """ . ExpansionCartLocation . "\" . ExpansionCart . """"
1086 param3 := " -peb:slot2 32kmem -peb:slot3 speech -peb:slot6 tirs232 -peb:slot8 hfdc"
1087 param4 := " -flop1"
1088 param5 := " """ . romPath . "\" . romName . romExtension . """"
1089 If StringUtils.Contains(romName, "\(Disk")
1090 {
1091 TimerUtils.Sleep(50)
1092 If (romTable.MaxIndex() = 2)
1093 {
1094 param4 := " -flop1 " . " """ . romTable[1,1] . """"
1095 param5 := " -flop2 " . " """ . romTable[2,1] . """"
1096 }
1097 }
1098 } Else If (romExtension = ".rpk") ; Cart Game (RPK Format)
1099 param1 := " -nat -gromport single -cart1", param2:=" """ . romPath . "\" . romName . romExtension . """", param3:=" -peb:slot3 speech" ;-cart will also work here
1100 param6 := " -ui_active" ;Enable partial keyboard mode at startup
1101 } Else If (mameID = "aes") ; SNK Neo Geo AES
1102 { biosRegion := moduleIni.Read(romName, "BIOS_Region","asia",,1)
1103 param1 := " -bios " . biosRegion ; can also be japan, but the asian one has english menus for most games
1104 param2 := " -cart " . romName
1105 }Else If (mameID = "apple2gs") ; Apple IIGS
1106 { externalOS := moduleIni.Read(romName, "External_OS","false",,1)
1107 2gsSystemFile := "System6.2mg" ;For games without OS included, always force this name and error out if not found
1108 multipartTable := CreateRomTable(multipartTable)
1109
1110 If (externalOS = "true")
1111 { CheckFile(romPath . "\" . 2gsSystemFile)
1112 param1 := " -flop3", param2:=" """ . romPath . "\" . 2gsSystemFile . """", param3:=" -flop4", param4:=" """ . romPath . "\" . romName . romExtension . """"
1113 } Else {
1114 param1 := " -flop3", param2:=" """ . romPath . "\" . romName . romExtension . """"
1115 If (multipartTable.MaxIndex() > 1)
1116 param3 := " -flop4", param4 := " """ . multipartTable[2,1] . """"
1117 }
1118 param5 := " -ui_active" ;Enable partial keyboard mode at startup
1119 }Else If (mameID = "electron") ; Acorn Electron
1120 { AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2",,1) ; Read delay from config.
1121 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1122 If (romExtension = ".bin")
1123 mediaDeviceType := "cart"
1124 Else ; any other format
1125 mediaDeviceType := "cass"
1126 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""chain""""""""""""\n""" . AutoBootDelay . ""
1127 }Else If (mameID = "sc3000") ; Sega SC-3000
1128 { AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2",,1) ; Read delay from config.
1129 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1130 If StringUtils.Contains(romExtension,"\.bin|\.sg\|.sc")
1131 mediaDeviceType := "cart"
1132 Else ; any other format
1133 mediaDeviceType := "cass"
1134 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""chain""""""""""""\n""" . AutoBootDelay . ""
1135 }Else If (mameID = "c64") ; Commodore 64
1136 { AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2",,1) ; Read delay from config.
1137 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1138 If StringUtils.Contains(romExtension,"\.d64|\.g64|\.g41|\.d77|\.d88|\.1dd|\.dfi|\.imd|\.ipf|\.mfi|\.mfm|\.td0|\.cqm|\.cqi|\.dsk")
1139 mediaDeviceType := "flop1"
1140 Else If StringUtils.Contains(romExtension,"\.wav|\.tap")
1141 mediaDeviceType := "cass1"
1142 Else If StringUtils.Contains(romExtension,"\.80|\.a0|\.e0|\.crt")
1143 mediaDeviceType := "cart1"
1144 Else If StringUtils.Contains(romExtension,"\.p00|\.prg|\.t64")
1145 mediaDeviceType := "quik1"
1146 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""chain""""""""""""\n""" . AutoBootDelay . ""
1147 }Else If mameID = mbeeic ; Applied Technology MicroBee
1148 { microbeeModel := moduleIni.Read(romName, "MicroBee_Model","mbeeic",,1)
1149 If !StringUtils.Contains(microbeeModel,"mbee|mbeeic|mbeepc|mbeepc85|mbee56")
1150 ScriptError("This is not a known MicroBee model value: " . microbeeModel)
1151 Else If (microbeeModel != "mbeeic")
1152 mameID := microbeeModel
1153 If StringUtils.Contains(romExtension,"\.mwb|\.com|\.bee")
1154 mediaDeviceType := "quik1"
1155 Else If StringUtils.Contains(romExtension,"\.wav|\.tap")
1156 mediaDeviceType := "cass"
1157 Else If StringUtils.Contains(romExtension,"\.rom")
1158 mediaDeviceType := "cart"
1159 Else If StringUtils.Contains(romExtension,"\.dsk")
1160 mediaDeviceType := "flop1"
1161 Else ; .bin format
1162 mediaDeviceType := "quik2"
1163 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """"
1164 }Else If (mameID = "odyssey2") ; Magnavox Odyssey 2
1165 {
1166 VoiceModule := moduleIni.Read(romname, "VoiceModule","false","",1)
1167 If (VoiceModule = "true")
1168 param1 := " -cart1 voice -cart2 """ . romPath . "\" . romName . romExtension . """"
1169 param2 := " -ui_active" ;Enable partial keyboard mode at startup
1170
1171 If romName not contains (USA
1172 mameID := "videopac"
1173 }Else If (mameID = "astrocde") ; Bally Astrocade
1174 {
1175 BlueRAMBasicRom := moduleIni.Read("Settings", "BlueRAMBasicRom","Blue RAM Basic v1.1 (USA).bin",,1) ; Blue RAM Basic rom
1176 RequiresReset := moduleIni.Read(romname, "RequiresReset","false",,1) ; Check if game requires a reset
1177
1178 BlueRAMBasicRomPath := new File(romPath . "\" . BlueRAMBasicRom)
1179 If (romExtension = ".script") {
1180 ; Will require blue ram basic
1181 If !BlueRAMBasicRomPath.Exist() {
1182 ; Blue RAM Basic games might be in their own sub-folders since they have several files, so let's try to find the Blue RAM cart in the parent folder as well
1183 StringUtils.SplitPath(romPath,,romBasePath) ; grab path one level up
1184 BlueRAMBasicRomPath.__Delete()
1185 BlueRAMBasicRomPath := new File(romBasePath . "\" . BlueRAMBasicRom)
1186 BlueRAMBasicRomPath.CheckFile("Couldn't find " . BlueRAMBasicRom . " on any of these paths:" . romBasePath . "|" . romPath)
1187 }
1188
1189 ScriptFile := new File(romPath . "\" . romName . romExtension)
1190 param1 := " -cart """ . BlueRAMBasicRomPath.FileFullPath . """"
1191
1192 ; Replace rompath variable in script
1193 ScriptFile.Read()
1194 ScriptFile.Text := StringUtils.Replace(ScriptFile.Text, "{romPath}", romPath, "all")
1195
1196 ; Create cmd file to send to MESS
1197 RomCMDFile := new File(romPath . "\" . romName . ".cmd")
1198 RomCMDFile.Delete()
1199 RomCMDFile.Append(ScriptFile.Text)
1200 param2 := " -exp blue_ram_16k -debug -debugscript """ . RomCMDFile.FileFullPath . """"
1201
1202 closeDebugWindow := "true"
1203 }
1204 }Else If (mameID = "samcoupe") ; MGT Sam Coupe
1205 { AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2",,1) ; Read delay from config.
1206 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1207
1208 If StringUtils.Contains(romExtension,"\.mgt|\.dsk|\.d77|\.d88|\.1dd|\.dfi|\.imd|\.ipf|\.mfi|\.mfm|\.td0|\.cqm|\.cqi")
1209 mediaDeviceType := "flop1"
1210 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""\nBOOT\n""" . AutoBootDelay . ""
1211 }Else If (mameID = "vic10") ; Commodore MAX Machine
1212 { AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2",,1) ; Read delay from config.
1213 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1214
1215 If StringUtils.Contains(romExtension,"\.e0|\.80")
1216 param1 := " -cart """ . romPath . "\" . romName . romExtension . """"
1217 Else If StringUtils.Contains(romExtension,"\.wav|\.tap|\.fd")
1218 param1 := " -cass """ . romPath . "\" . romName . romExtension . """"
1219 Else If StringUtils.Contains(romExtension,"\.t64|\.prg|\.p00")
1220 {
1221 mediaDeviceType := "quik"
1222 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""RUN""" . AutoBootDelay . ""
1223 }
1224 }Else If (mameID = "mo5") ; Thomson MO5
1225 { AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2","",1) ; Read delay from config.
1226 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1227
1228 If StringUtils.Contains(romExtension,"\.bin|\.m5|\.rom")
1229 param1 := " -cart """ . romPath . "\" . romName . romExtension . """"
1230 Else If StringUtils.Contains(romExtension,"\.wav|\.k5|\.k7")
1231 param1 := " -cass """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""RUN \""\""\n""" . AutoBootDelay . ""
1232 Else If StringUtils.Contains(romExtension,"\.fd|\.dsk|\.d77|\.d88")
1233 param1 := " -flop1 """ . romPath . "\" . romName . romExtension . """ -autoboot_command ""DOS\nLOAD\n""" . AutoBootDelay . ""
1234 }Else If (mameID = "cpc664") ; Amstrad CPC
1235 { LaunchProgram := moduleIni.Read(romName, "LaunchProgram","disk",,1) ; Read command from config.
1236 LaunchProgram := " -autoboot_command " . """RUN \""" . LaunchProgram . "\n"""
1237 AutoBootDelay := moduleIni.Read("Settings", "AutoBootDelay","2",,1) ; Read delay from config.
1238 AutoBootDelay := " -autoboot_delay " . AutoBootDelay
1239
1240 If StringUtils.Contains(romExtension,"\.d77|\.d88|\.1dd|\.dfi|\.imd|\.ipf|\.mfi|\.mfm|\.td0|\.cqm|\.cqi|\.dsk")
1241 mediaDeviceType := "flop1"
1242 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """" . LaunchProgram . AutoBootDelay
1243 }
1244
1245 ;Use a different bios if needed (This must be done after the above if conditions since the mameID will change)
1246 iniBios := moduleIni.Read(romName, "Bios",mameID,,1) ; for all games, we use the default bios. Some games might require different bios like Odyssey2's Jopac games use the videopac bios instead, which should be defined in the ini
1247 If (iniBios != "")
1248 mameID := iniBios ; need to change the bios name for some games
1249 }
1250
1251 ; These systems don't use an ini, but do require parameters to be changed from the default method of launching MAME
1252 If (mameID = "neocdz" || mameID = "cdimono1" || mameID = "segacd" || mameID = "saturn" || mameID = "psx" || (mameID = "tg16" && mameSystem = "NEC TurboGrafx-CD") || (mameID = "pce" && mameSystem = "NEC PC Engine-CD")) ; SNK Neo Geo CD, Philips CD-i, Sega CD, Sega Saturn, Sony PlayStation, NEC PC Engine-CD or NEC TurboGrafx-CD
1253 { If !StringUtils.Contains(romExtension,"\.chd|\.cue")
1254 ScriptError("MAME only supports " . mameSystem . " games in chd and cue format. It does not support:`n" . romExtension)
1255 If (mameSystem = "NEC TurboGrafx-CD") { ; NEC TurboGrafx-CD needs an additional bios mounted as a cart to run
1256 ; tgcdBios := CheckFile(emuPath . "\roms\CD-ROM System V2.01 (U).pce") ; older bios that doesn't seem to work with many games
1257 tgcdBios := CheckFile(emuPath . "\roms\Super CD-ROM2 System V3.01 (U).pce")
1258 param2 := " -cart " . """" . tgcdBios . """"
1259 } Else If (mameSystem = "NEC PC Engine-CD") { ; NEC PC Engine-CD needs an additional bios mounted as a cart to run
1260 pcecdBios := CheckFile(emuPath . "\roms\Super CD-ROM2 System V3.0 (J).pce")
1261 param2 := " -cart " . """" . pcecdBios . """"
1262 } Else If (mameID = "psx") { ; Sony PlayStation
1263 mameID := "psu" ; changing mameID sent to MAME to use the USA bios
1264 ; SelectMemCard() ; future function to swap around memcards
1265 ; Usage: mc1 "J:\MAME\software\psu\card1.mc"
1266 } If (mameSystem = "Sega CD") { ;
1267 If StringUtils.InStr(romName,"(Jap") ; Mega CD Japanese v2
1268 mameID := "megacd2j"
1269 Else If StringUtils.InStr(romName,"(Euro") ; Mega CD European (PAL)
1270 mameID := "megacd"
1271 }
1272 param1 := " -cdrm """ . romPath . "\" . romName . romExtension . """"
1273 }Else If (mameID = "gamecom") ; Tiger Game.com
1274 { If (romExtension != ".txt")
1275 param1 := " -cart1 """ . romPath . "\" . romName . romExtension . """"
1276 }Else If (mameID = "genesis") ; Sega Genesis
1277 { If (StringUtils.InStr(romName, "(Europe") || StringUtils.InStr(romName, "(PAL")) ; if rom is from europe, tell MAME to boot a Mega Drive instead
1278 mameID := "megadriv"
1279 }Else If (mameID = "megadriv") ; Sega Mega Drive
1280 { If (StringUtils.InStr(romName, "(USA") || StringUtils.InStr(romName, "(NTSC")) ; if rom is from America, tell MAME to boot a Genesis instead
1281 mameID := "genesis"
1282 }Else If (mameID = "vii") ; JungleTac Sport Vii
1283 { If (romName = "Built-In Games (China)") ; Has some built-in games, gotta launch just BIOS for it.
1284 param1 := ""
1285 }Else If (mameID = "alice32") ; Matra & Hachette Alice
1286 { If (romExtension != ".txt")
1287 param1 := " -cass1 """ . romPath . "\" . romName . romExtension . """"
1288 }Else If (mameID = "cgenie") ; EACA EG2000 Colour Genie
1289 { If (romExtension != ".txt")
1290 param1 := " -cass1 """ . romPath . "\" . romName . romExtension . """"
1291 }Else If (mameID = "pockstat") ; Sony PocketStation
1292 { If (romExtension != ".gme")
1293 param1 := " -cart1 """ . romPath . "\" . romName . romExtension . """"
1294 }Else If (mameID = "coco3") ; Tandy TRS-80 Color Computer
1295 { If (romExtension != ".txt")
1296 param1 := " -cart """ . romPath . "\" . romName . romExtension . """"
1297 }Else If (mameID = "zx81") ; Sinclair ZX81
1298 { If (romExtension != ".txt")
1299 param1 := " -cass1 """ . romPath . "\" . romName . romExtension . """"
1300 }Else If (mameID = "lynx128k") ; Camputers Lynx
1301 { If (romExtension != ".txt")
1302 param1 := " -cass1 """ . romPath . "\" . romName . romExtension . """"
1303 }Else If (mameID = "vg5k") ; Philips VG 5000
1304 { If (romExtension != ".txt")
1305 param1 := " -cass1 """ . romPath . "\" . romName . romExtension . """"
1306 }Else If (mameID = "sorcerer") ; Exidy Sorcerer
1307 { If (romExtension = ".snp") ; Snapshot file
1308 param1 := " -dump """ . romPath . "\" . romName . romExtension . """"
1309 Else If (romExtension = ".bin")
1310 param1 := " -quik """ . romPath . "\" . romName . romExtension . """"
1311 }Else If (messID = "jupace") ; jupiter ace
1312 { If (romExtension = ".ace")
1313 param1 := " -dump """ . romPath . "\" . romName . romExtension . """"
1314 }Else If (mameID = "a800" || mameID = "fds") ; Atari 8-Bit, Nintendo Famicom Disk System
1315 { If (romExtension != ".txt")
1316 param1 := " -flop1 """ . romPath . "\" . romName . romExtension . """"
1317 }Else If (mameID = "vectrex") ; GCE Vectrex
1318 { If (romName = "Mine Storm (World)") ; MAME dumps an error if you try to launch Mine Storm using a rom instead of just booting vectrex w/o a game in it (Mine Storm is built into vectrex)
1319 param1 := ""
1320 }Else If (mameID = "apfm1000") ; APF Imagination Machine/APF M1000
1321 { If (romName = "Rocket Patrol (USA)") ; Rocket Patrol is built into the APF M1000 ROM.
1322 param1 := ""
1323 }Else If (mameID = "adam") ; Coleco ADAM
1324 param1 := (If romExtension = ".ddp" ? " -cass1" : (If romExtension = ".dsk" ? " -flop1" : " -cart1")) . " """ . romPath . "\" . romName . romExtension . """" ; Decide if tape, disk, or cart game
1325 Else If (mameID = "pegasus") ; Aamber Pegasus
1326 { If (romExtension != ".txt")
1327 param1 := " -cart1 """ . romPath . "\" . romName . romExtension . """"
1328 }Else If (mameID = "gp32") ; GamePark 32
1329 { If (romExtension != ".txt")
1330 param1 := " -memc """ . romPath . "\" . romName . romExtension . """"
1331 }Else If (mameID = "svmu") ; Sega VMU
1332 {
1333 param1 := " -quik """ . romPath . "\" . romName . romExtension . """"
1334 }Else If (mameID = "x1turbo40") ; Sharp X1
1335 { If StringUtils.Contains(romExtension,"\.bin|\.rom")
1336 param1 := " -cart """ . romPath . "\" . romName . romExtension . """"
1337 Else If StringUtils.Contains(romExtension,"\.wav|\.tap")
1338 param1 := " -cass """ . romPath . "\" . romName . romExtension . """"
1339 Else
1340 param1 := " -flop1 """ . romPath . "\" . romName . romExtension . """"
1341 }Else If (mameID = "pc8801") ; NEC PC-8801
1342 { If (romExtension = ".d88")
1343 param1 := " -flop1 """ . romPath . "\" . romName . romExtension . """"
1344 }Else If (mameID = "fmnew7") ; Fujitsu FM-7
1345 { If StringUtils.Contains(romExtension,"\.fdi|\.td0|\.imd|\.cqm|\.dsk|\.d77|\.d88|\.1dd")
1346 param1 := " -flop1 """ . romPath . "\" . romName . romExtension . """"
1347 Else If StringUtils.Contains(romExtension,"\.wav|\.t77")
1348 param1 := " -cass """ . romPath . "\" . romName . romExtension . """"
1349 }Else If (mameID = "apple2ep") ; Apple II
1350 { If StringUtils.Contains(romExtension,"\.dsk|\.do|\.po|\.rti|\.edd|\.d77|\.d88|\.1dd|\.dfi|\.imd|\.i pf|\.mfi|\.mfm|\.td0|\.cqm|\.cqi")
1351 param1 := " -flop1 """ . romPath . "\" . romName . romExtension . """"
1352 Else If StringUtils.Contains(romExtension,"\.wav")
1353 param1 := " -cass """ . romPath . "\" . romName . romExtension . """"
1354 }Else If (mameID = "n64dd") ; Nintendo 64DD
1355 {
1356 N64RomFile := new FIle(romPath . "\" . romName . ".n64")
1357 If N64RomFile.Exist()
1358 param1 := " -cart """ . N64RomFile.FileFullPath . """ -quik """ . romPath . "\" . romName . romExtension . """"
1359 Else
1360 param1 := " -quik """ . romPath . "\" . romName . romExtension . """"
1361 }Else If StringUtils.Contains(mameID,"studio2|mpt02") ; RCA Studio 2
1362 {
1363 If (romExtension != ".txt")
1364 param1 := " -cart1 """ . romPath . "\" . romName . romExtension . """"
1365 Else {
1366 If StringUtils.Contains(romName,"Doodle")
1367 button2 := "A 1" ; Press 1 on P1 controller
1368 If StringUtils.Contains(romName,"Patterns")
1369 button2 := "A 2" ; Press 2 on P1 controller
1370 If StringUtils.Contains(romName,"Bowling")
1371 button2 := "A 3" ; Press 3 on P1 controller
1372 If StringUtils.Contains(romName,"Freeway")
1373 button2 := "A 4" ; Press 4 on P1 controller
1374 If StringUtils.Contains(romName,"Addition")
1375 button2 := "A 5" ; Press 5 on P1 controller
1376 }
1377
1378 ; Generate a lua script to press the Clear button so games will start
1379 ScriptFileName := GeneratePressButtonScript("Clear",button2)
1380 bootscript := " -script """ . ScriptFileName . """ -autoboot_delay 1"
1381 }Else If (mameID = "fmtowns" || mameID = "fmtmarty") ; Fujitsu FM Towns
1382 {
1383 If StringUtils.Contains(romExtension,"\.chd|\.cue")
1384 mediaDeviceType := "cdrm"
1385 Else
1386 mediaDeviceType := "flop1"
1387
1388 param1 := " -" . mediaDeviceType . " """ . romPath . "\" . romName . romExtension . """"
1389 }
1390 } Else { ; Use Software List
1391 hashname := mameID
1392 param1 := " """ . romName . """" ; param1 used for launching from software lists
1393
1394 If (mameID = "aes") ; SNK Neo Geo AES
1395 { hashname := "neogeo"
1396 biosRegion := moduleIni.Read(romName, "BIOS_Region","asia",,1)
1397 param2 := " -bios " . biosRegion ; can also be japan, but the asian one has english menus for most games
1398 }
1399 CheckFile(emuPath . "\hash\" . hashname . ".xml","Could not find a software list for the system " . mameID) ;Check if software list for selected system exists
1400 }
1401
1402 If (mameID = "vectrex") { ; GCE Vectrex
1403 VectrexArtFile := new File(emuPath . "\artwork\Vectrex\" . romName . ".png")
1404 param2 := " -view " . (If VectrexArtFile.Exist() ? ("""" . romName . """") : "standard") ; need overlays extracted in the artwork\vectres folder. PNGs must match romName
1405 }
1406
1407 sysStaticParams := If sysStaticParams != "" ? A_Space . sysStaticParams : "" ; tacking on a space in case user forgot to add one
1408 romParams := If romParams != "" ? A_Space . romParams : "" ; tacking on a space in case user forgot to add one
1409
1410 mameRomPaths := StringUtils.Replace(romPathFromIni,"|",`"`;`",1) ; replace all instances of | to ; in the Rom_Path from RL's Emulators.ini so MAME knows where to find your roms
1411 mameRomPaths := " -rompath """ . (If mameRomName ? romPath : mameRomPaths) . (If mameBiosPath ? ";" . mameBiosPath : "") . """" ; If using an alt rom, only supply mame with the path to that rom so it doesn't try to use the original rom. If a bios path was supplied, add it into the rom paths sent to MAME
1412
1413 If StringUtils.InStr(romParams,"-rompath")
1414 ScriptError("""-rompath"" is defined as a parameter for " . romName . ". The MAME module fills this automatically so please remove this from Params in the module's settings.")
1415 If StringUtils.InStr(sysStaticParams,"-rompath")
1416 ScriptError("""-rompath"" is defined as a parameter for " . mameSystem . ". The MAME module fills this automatically so please remove this from Params in the module's settings.")
1417
1418 ; use a custom rom name, not the one from the db
1419 If mameRomName {
1420 MameRomOriginalFile := new File(romPath . "\" . romName . romExtension)
1421 MameRomCustomFile := new File(romPath . "\" . mameRomName . romExtension)
1422 errLvl := MameRomOriginalFile.Move(MameRomCustomFile.FileFullPath) ; rename rom to match what mame needs
1423 originalRomName := romName ; store romName from database so we know what to rename it back to later
1424 romName := mameRomName
1425 If errLvl
1426 ScriptError("There was a problem renaming " . romName . " to " . mameRomName . " in " . romPath . ". Please check you have write permission to this folder/file and you don't already have a file named """ . mameRomName . """ in your rom folder.",8)
1427 Else ; if rename was successful, set var so we know to move it back later
1428 fileRenamed := 1
1429 }
1430
1431 ; use a custom cfg file if it exists and append it to param1
1432 CustomCFGPath := new Folder(emuPath . "\cfg\" . mameID . "\" . dbName)
1433 If CustomCFGPath.Exist()
1434 param1 := " -cfg_directory """ . CustomCFGPath.FileFullPath . """" . param1
1435
1436 If (bilinearFilter = "true")
1437 bilinearEnabled := " -filter"
1438 Else
1439 bilinearEnabled := " -nofilter"
1440
1441 If (cheatMode = "true") {
1442 CheatZipFile := new File(emuPath . "\cheat.zip")
1443 Cheat7zFile := new File(emuPath . "\cheat.7z")
1444 If (!CheatZipFile.Exist() && !Cheat7zFile.Exist())
1445 RLLog.Warning("Module - You have cheats enabled for " . MEmu . " but could not locate a ""cheat.zip"" or ""cheat.7z"" in " . emuPath)
1446 Else {
1447 RLLog.Info("Module - Cheat file found in " . emuPath)
1448 If cheatModeKey ; if user wants to use a key to enable CheatMode
1449 cheatEnabled := If XHotkeyAllKeysPressed(cheatModeKey) ? " -cheat" : "" ; only enables cheatMode when key is held down on launch
1450 Else ; no cheat mode key defined
1451 cheatEnabled := " -cheat"
1452 }
1453 }
1454
1455 If (RequiresReset = "true")
1456 { ; Generate a lua script to send a system soft reset
1457 ScriptFileName := GenerateSoftResetScript()
1458 bootscript := " -script """ . ScriptFileName . """ -autoboot_delay 1"
1459 }
1460
1461 HideAppStart(hideEmuObj,hideEmu)
1462
1463
1464
1465 If (legacyMode = "true")
1466 { RLLog.Info("Module - Running MAME in legacy Mode")
1467 errLvl := primaryExe.Run(" " . (If mameID = "MAME" ? romName : mameID . param1 . param2 . param3 . param4 . param5 . param6) . fullscreenParam . cheatEnabled . volume . mameRomPaths . sysStaticParams . romParams, winstate,,,,1) ; wrap quotes around exe
1468 } Else {
1469 RLLog.Info("Module - Running MAME in non-legacy mode")
1470 ; If (networkPlayers = 1 || !linkEnabledGame) {
1471 If !networkSession {
1472 RLLog.Info("Module - SinglePlayer session")
1473 errLvl := primaryExe.Run(" " . (If mameID = "MAME" ? romName : mameID . param1 . param2 . param3 . param4 . param5 . param6 ) . ctrlrFile . mameRomPaths . sysStaticParams . romParams . fullscreenParam . hlsl . glsl . cheatEnabled . volume . inipath . hashpath . verticalRotationMode . videomode . artworkCrop . useBezels . useOverlays . useBackdrops . useCpanels . useMarquees . autosave . bootscript . bilinearEnabled . " -skip_gameinfo", winstate,,,,1) ; wrap quotes around exe
1474 } Else { ; multiplayer game run
1475 RLLog.Info("Module - Network/MultiPlayer session")
1476 BuildNVRAMObject() ; build nvram object
1477 ;screen positions
1478 screenPos := []
1479 screenPos := SplitScreenPos(networkPlayers,splitScreen2PlayersMode,splitScreen3PlayersMode,maxPlayersPerMonitor)
1480 If (networkType="localLink")
1481 globalInputs := " -global_inputs" ; tell mame to accept inputs when its window is not focused
1482 Loop % networkPlayers
1483 {
1484 currentPlayer := A_Index
1485 ; Update NVRAM setting(s)
1486 If (enableNVRAMAutomation = "true") {
1487 If nvramSettings[romName]["Settings"]["Credit"]["Position"].MaxIndex() { ; If nvram settings exist for this game
1488 NVRamFile%currentPlayer% := new File(emuPath . "\nvram" . (If currentPlayer = 1 ? "" : currentPlayer) . "\" . romName . "\" . nvramSettings[romName]["Settings"]["NVRAM"]["File"][1])
1489 If NVRamFile%currentPlayer%.Exist() {
1490 RLLog.Info("Module - Checking nvram file(s) for required changes")
1491 If (networkType = "localLink") { ; only local link is supported for now
1492 ; Parse through each setting of each player and lookup the position to write new setting to the nvram file
1493 for playerOptionLabel, selectedPlayerOption in nvramSettings[romName]["Player"][currentPlayer] ;looping on each player selected options
1494 for index, setting in nvramSettings[romName]["Settings"][playerOptionLabel]["Position"] ;Looping through hex values of the current option
1495 HexCompareWrite(NVRamFile%currentPlayer%.FileFullPath,nvramSettings[romName]["Settings"][playerOptionLabel]["Position"][index],nvramSettings[romName]["Settings"][playerOptionLabel]["Option"][selectedPlayerOption][index])
1496 for index, playerCRC in nvramSettings[romName]["CRC"]["Player"][currentPlayer] ;looping on each player selected options
1497 HexCompareWrite(NVRamFile%currentPlayer%.FileFullPath,nvramSettings[romName]["Settings"]["CRC"]["Position"][index],nvramSettings[romName]["CRC"]["Player"][currentPlayer][index])
1498 } Else If (networkType = "Server") {
1499 RLLog.Info("Module - Converting this nvram to ""Master"" in: " . NVRamFile%currentPlayer%.FileFullPath)
1500 ; RLLog.Info("Module - NVRAM automation for ""Server"" not supported at this time") ; only idea to get this to work is to duplicate nvram edit code from local link here but only set player 1
1501 HexCompareWrite(NVRamFile%currentPlayer%.FileFullPath,nvramSettings[romName]["Settings"]["Link"]["Position"][1],nvramSettings[romName]["Settings"]["Link"]["Option"]["Master"][1])
1502 } Else If (networkType = "Client") {
1503 RLLog.Info("Module - Converting this nvram to ""Slave"" in: " . NVRamFile%currentPlayer%.FileFullPath)
1504 ; RLLog.Info("Module - NVRAM automation for ""Client"" not supported at this time") ; only idea to get this to work is to duplicate nvram edit code from local link here but only set player 2
1505 HexCompareWrite(NVRamFile%currentPlayer%.FileFullPath,nvramSettings[romName]["Settings"]["Link"]["Position"][1],nvramSettings[romName]["Settings"]["Link"]["Option"]["Slave"][1])
1506 }
1507 } Else
1508 RLLog.Info("Module - Did not find an NVRAM file to update for player " . currentPlayer . " (Ignore this if this is the first time you are launching this rom): " . NVRamFile%currentPlayer%.FileFullPath)
1509 } Else
1510 RLLog.Info("Module - This rom does not contain an entry in the NVRAM object")
1511 }
1512 ;;Run Line for each of the multiplayer MAME instances using the nvramPath and cfgPath variables to the extra mames
1513 MameMultiPlayer%currentPlayer%Exe := new Process(emuPath . "\" . executable) ; instantiate a new process for each player
1514 errLvl := MameMultiPlayer%currentPlayer%Exe.Run(" " . (If mameID = "MAME" ? romName : mameID . param1 . param2 . param3 . param4 . param5 . param6) . ctrlrFile . mameRomPaths . multiPlayerObj[currentPlayer]["CfgDir"] . multiPlayerObj[currentPlayer]["NvramDir"] . globalInputs . multiPlayerObj[currentPlayer]["LocalHost"] . multiPlayerObj[currentPlayer]["LocalPort"] . multiPlayerObj[currentPlayer]["RemoteHost"] . multiPlayerObj[currentPlayer]["RemotePort"] . sysStaticParams . romParams . fullscreenParam . hlsl . glsl . cheatEnabled . volume . inipath . hashpath . verticalRotationMode . videomode . artworkCrop . useBezels . useOverlays . useBackdrops . useCpanels . useMarquees . autosave . bootscript . bilinearEnabled . " -skip_gameinfo", winstate,,,,1) ; wrap quotes around exe
1515 MameMultiPlayer%currentPlayer%Exe.Process("Exist") ; get PID
1516 MameMultiPlayer%currentPlayer%Window := new Window(new WindowTitle(,,,,MameMultiPlayer%currentPlayer%Exe.PID))
1517 MameMultiPlayer%currentPlayer%Window.ExcludeTitle := "MAMEOutput" ; ignore the mame debug window
1518 MameMultiPlayer%currentPlayer%Window.Wait()
1519 }
1520
1521 Loop % networkPlayers
1522 {
1523 MameMultiPlayer%A_Index%Window.Get("ID")
1524 MameMultiPlayer%A_Index%Window.RemoveTitlebar()
1525 MameMultiPlayer%A_Index%Window.ToggleMenu()
1526 MameMultiPlayer%A_Index%Window.RemoveBorder()
1527 MameMultiPlayer%A_Index%Window.Move(screenPos[A_Index].X, screenPos[A_Index].Y, screenPos[A_Index].W, screenPos[A_Index].H)
1528 TimerUtils.Sleep(50)
1529 }
1530 }
1531 }
1532
1533 If errLvl {
1534 If (errLvl = 1)
1535 Error := "Failed Validity"
1536 Else If(errLvl = 2)
1537 Error := "Missing Files"
1538 Else If(errLvl = 3)
1539 Error := "Fatal Error"
1540 Else If(errLvl = 4)
1541 Error := "Device Error"
1542 Else If(errLvl = 5)
1543 Error := "Game Does Not Exist"
1544 Else If(errLvl = 6)
1545 Error := "Invalid Config"
1546 Else If StringUtils.Contains(errLvl,"7|8|9")
1547 Error := "Identification Error"
1548 Else
1549 Error := "MAME Error"
1550 RLLog.Error("MAME Error - " . Error)
1551 }
1552
1553 emuPrimaryWindow.Wait()
1554 emuPrimaryWindow.WaitActive()
1555
1556 If (mameID = "ti99_4a") ; Texas Instruments TI 99-4A
1557 {
1558 KeyUtils.SendCommand("X",1000) ; To bypass the first screen
1559 If (Command)
1560 KeyUtils.SendCommand(Command,,,,,,CommandWaitOffset) ; Send command affect it with an offset if needed
1561 }
1562
1563 ; Close the debugger window if exists
1564 If (closeDebugWindow = "true") {
1565 emuDebugWindow.Wait(2)
1566 emuDebugWindow.Close()
1567 }
1568
1569 BezelDraw()
1570 HideAppEnd(hideEmuObj,hideEmu)
1571
1572 If (networkPlayers = 1 || !linkEnabledGame) {
1573 emuPrimaryWindow.Show() ; Show the emulator
1574 } Else {
1575 Loop % networkPlayers
1576 MameMultiPlayer%A_Index%Window.Show() ; Show the emulator
1577 MameMultiPlayer1Window.Activate() ; Activate first player window so that first player can use keyboard instead of last player
1578 }
1579
1580 FadeInExit()
1581 primaryExe.Process("WaitClose")
1582 7zCleanUp()
1583 BezelExit()
1584
1585 If fileRenamed { ; Rename file back to alternate name for next launch
1586 errLvl := MameRomCustomFile.Move(MameRomOriginalFile.FileFullPath) ; Put original name back
1587 If errLvl ; If rename was successful, set var so we know to move it back later
1588 ScriptError("There was a problem renaming " . MameRomCustomFile.FileName . " back to " . MameRomOriginalFile.FileName)
1589 }
1590
1591 FadeOutExit()
1592 ExitModule()
1593
1594
1595 ListXMLInfo(rom){ ; Returns MAME info about parent rom, orientation angle, resolution
1596 Global emuFullPath,emuPath,RLLog
1597 ListXMLObject := Object()
1598 listXMLVarLog := ""
1599 ComSpecProcess := new Process(ComSpec) ; instantiate cmd.exe process
1600 ComSpecProcess.RunDirect(comspec . " /c " . """" . emuFullPath . """" . " -listxml " . rom . " > tempBezel.txt", emuPath, "Hide", 1) ; Run from emu's folder
1601 TempBezelFile := new File(emuPath . "\tempBezel.txt")
1602 TempBezelFile.Read()
1603 StringUtils.RegExMatch(TempBezelFile.Text, "s)<(machine|game).*name=" . """" . rom . """" . ".*" . "cloneof=" . """" . "[^""""]*", parent)
1604 StringUtils.RegExMatch(parent,"cloneof=" . """" . ".*", parent)
1605 StringUtils.RegExMatch(parent,"""" . ".*", parent)
1606 parent := StringUtils.TrimLeft(parent, 1)
1607 StringUtils.RegExMatch(TempBezelFile.Text, "s)<display.*rotate=" . """" . "[0-9]+" . """", angle)
1608 StringUtils.RegExMatch(angle,"[0-9]+", angle, "-6")
1609 StringUtils.RegExMatch(TempBezelFile.Text, "s)<display.*width=" . """" . "[0-9]+" . """", width)
1610 StringUtils.RegExMatch(width,"[0-9]+", width, "-6")
1611 StringUtils.RegExMatch(TempBezelFile.Text, "s)<display.*height=" . """" . "[0-9]+" . """", Height)
1612 StringUtils.RegExMatch(Height,"[0-9]+", Height, "-6")
1613 StringUtils.RegExMatch(TempBezelFile.Text, "s)<control.*ways=" . """" . "[0-9]+" . """", Ways)
1614 StringUtils.RegExMatch(Ways,"[0-9]+", Ways, "-6")
1615 logVars := "Parent|Angle|Height|Width|Ways"
1616 Loop, Parse, logVars, |
1617 {
1618 currentobj := {}
1619 currentobj.Label := A_Loopfield
1620 currentobj.Value := %A_Loopfield%
1621 ListXMLObject.Insert(currentobj["Label"], currentobj)
1622 listXMLLog .= "`r`n`t`t`t`t`t" . currentobj["Label"] . " = " . currentobj["Value"]
1623 }
1624 RLLog.Info("Module - MAME ListXML values: " . listXMLLog)
1625 If (ListXMLObject["Height"].Value > ListXMLObject["Width"].Value) {
1626 ListXMLObject["Angle"].Value := true
1627 RLLog.Info("Module - This game's height is greater than its width, forcing vertical mode")
1628 }
1629 TempBezelFile.Delete()
1630 Return ListXMLObject
1631 }
1632
1633 GenerateSoftResetScript(){ ; Generates a lua script to send a soft reset to MAME
1634 Global emuPath
1635
1636 SoftScriptFile := new File(emuPath . "\soft_reset.lua")
1637 ScriptFileName := emuPath . "\soft_reset.lua"
1638 SoftScriptFile.Delete()
1639
1640 AppendTxt :="
1641 (
1642 -- This script will reset the machine
1643 local function reset_machine()
1644 if resetcounter == nil then
1645 manager:machine():soft_reset();
1646 resetcounter = 1;
1647 end
1648 end
1649 if resetcounter == nil then
1650 emu.wait(1);
1651 reset_machine();
1652 end
1653 )"
1654 SoftScriptFile.Append(AppendTxt)
1655 Return SoftScriptFile.FileFullPath
1656 }
1657
1658 GeneratePressButtonScript(button1,button2=""){ ; Generates a lua script to send a soft reset to MAME
1659 Global emuPath
1660
1661 PressScriptFile := new File(emuPath . "\press_button.lua")
1662 PressScriptFile.Delete()
1663 If (button2) {
1664 button2str := "`n`t`temu.wait(1);`n`t`tioport[""" . button2 . """]:write(1);`n`t`temu.wait(1);`n`t`tioport[""" . button2 . """]:write(0);"
1665 }
1666
1667 AppendTxt :="
1668 (
1669 local function press_button()
1670 if resetcounter == nil then
1671 ioport[""" . button1 . """]:write(1);
1672 emu.wait(1);
1673 ioport[""" . button1 . """]:write(0);
1674 resetcounter = 1;" . button2str . "
1675 end
1676 end
1677 if resetcounter == nil then
1678 emu.wait(1);
1679 press_button();
1680 end
1681 )"
1682 PressScriptFile.Append(AppendTxt)
1683 Return PressScriptFile.FileFullPath
1684 }
1685
1686 BuildNVRAMObject() {
1687 Global nvramSettings,RLLog
1688 RLLog.Info("BuildNVRAMObject - Started")
1689
1690 nvramSettings := {}
1691
1692 nvramSettings["vr"] := {}
1693 nvramSettings["vr"]["Settings"] := {"BiosCounter":{"Position":["248"], "Option":{0:["00"], 1:["01"], 2:["02"], 3:["03"]}}, "Cabinet":{"Position":["52"], "Option":{"Special":["00"], "Standard":["01"], "Upright":["02"], "2PLink":["03"]}}, "Color":{"Position":["68"], "Option":{"Red":["00"], "Blue":["01"], "Yellow":["02"], "Green":["03"], "Black":["04"], "Pink":["05"], "SkyBlue":["06"], "Orange":["07"]}}, "Country":{"Position":["54"], "Option":{"Japan":["00"], "USA":["01"], "Export":["02"]}}, "Course":{"Position":["66"], "Option":{"Vote":["00"], "Beginner":["01"], "Middle":["02"], "Expert":["03"]}}, "CRC":{"Position":["16","18"]}, "Credit":{"Position":["32","40"], "Option":{"1":["00","00"], "Freeplay":["1A","01"]}}, "Difficulty":{"Position":["64"], "Option":{"Easy":["00"], "Normal":["01"], "Hard":["02"], "Hardest":["03"]}}, "Link":{"Position":["24"], "Option":{"None":["00"], "Master":["01"], "Slave":["02"], "Live":["03"]}}, "Monitor":{"Position":["22"], "Option":{"Standard":["00"], "Wide":["01"]}}, "NVRAM":{"File":["nvram"]}, "Race":{"Position":["70"], "Option":{"Normal":["00"], "Grandprix":["01"]}}, "StartCoin":{"Position":["42"], "Option":{1:["01"], 2:["02"], 3:["03"], 4:["04"], 5:["05"]}}}
1694
1695 nvramSettings["vr"]["Player"] := {}
1696 nvramSettings["vr"]["Player"].Insert(1, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Red", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Master", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1697 nvramSettings["vr"]["Player"].Insert(2, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Blue", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1698 nvramSettings["vr"]["Player"].Insert(3, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Yellow", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1699 nvramSettings["vr"]["Player"].Insert(4, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Green", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1700 nvramSettings["vr"]["Player"].Insert(5, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Black", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1701 nvramSettings["vr"]["Player"].Insert(6, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Pink", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1702 nvramSettings["vr"]["Player"].Insert(7, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"SkyBlue", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1703 nvramSettings["vr"]["Player"].Insert(8, {"BiosCounter":"3", "Cabinet":"Standard", "Color":"Orange", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Monitor":"Wide", "Race":"Normal", "StartCoin":"1"})
1704 nvramSettings["vr"]["CRC"] := {"Player":{1:["06","21"], 2:["3C","C7"], 3:["0E","5F"], 4:["FF","D8"], 5:["4B","7F"], 6:["BA","F8"], 7:["88","60"], 8:["79","E7"]}}
1705
1706 nvramSettings["vformula"] := {}
1707 nvramSettings["vformula"]["Settings"] := {"BiosCounter":{"Position":["248"], "Option":{0:["00"], 1:["01"], 2:["02"], 3:["03"]}}, "Color":{"Position":["68"], "Option":{"Red":["00"], "Blue":["01"], "Yellow":["02"], "Green":["03"], "Black":["04"], "Pink":["05"], "SkyBlue":["06"], "Orange":["07"]}}, "Country":{"Position":["54"], "Option":{"Japan":["00"], "USA":["01"], "Export":["02"]}}, "Course":{"Position":["66"], "Option":{"Vote":["00"], "Beginner":["01"], "Middle":["02"], "Expert":["03"]}}, "CRC":{"Position":["16","18"]}, "Credit":{"Position":["32","40"], "Option":{"1":["00","00"], "Freeplay":["1A","01"]}}, "Difficulty":{"Position":["64"], "Option":{"Easy":["00"], "Normal":["01"], "Hard":["02"], "Hardest":["03"]}}, "Link":{"Position":["24"], "Option":{"None":["00"], "Master":["01"], "Slave":["02"], "Live":["03"]}}, "NVRAM":{"File":["nvram"]}, "Race":{"Position":["70"], "Option":{"Normal":["00"], "Grandprix":["01"]}}, "Sound":{"Position":["22"], "Option":{"On":["00"], "Off":["01"]}}, "StartCoin":{"Position":["42"], "Option":{1:["01"], 2:["02"], 3:["03"], 4:["04"], 5:["05"]}}}
1708
1709 nvramSettings["vformula"]["Player"] := {}
1710 nvramSettings["vformula"]["Player"].Insert(1, {"BiosCounter":"1", "Color":"Red", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Master", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1711 nvramSettings["vformula"]["Player"].Insert(2, {"BiosCounter":"1", "Color":"Blue", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1712 nvramSettings["vformula"]["Player"].Insert(3, {"BiosCounter":"1", "Color":"Yellow", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1713 nvramSettings["vformula"]["Player"].Insert(4, {"BiosCounter":"1", "Color":"Green", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1714 nvramSettings["vformula"]["Player"].Insert(5, {"BiosCounter":"1", "Color":"Black", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1715 nvramSettings["vformula"]["Player"].Insert(6, {"BiosCounter":"1", "Color":"Pink", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1716 nvramSettings["vformula"]["Player"].Insert(7, {"BiosCounter":"1", "Color":"SkyBlue", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1717 nvramSettings["vformula"]["Player"].Insert(8, {"BiosCounter":"1", "Color":"Orange", "Country":"USA", "Course":"Vote", "Credit":"Freeplay", "Difficulty":"Normal", "Link":"Slave", "Race":"Normal", "Sound":"On", "StartCoin":"1"})
1718 nvramSettings["vformula"]["CRC"] := {"Player":{1:["F2","EB"], 2:["C8","0D"], 3:["FA","95"], 4:["0B","12"], 5:["BF","B5"], 6:["4E","32"], 7:["7C","AA"], 8:["8D","2D"]}}
1719
1720 RLLog.Info("BuildNVRAMObject - Ended")
1721 }
1722
1723 BezelLabel:
1724 emuConsoleWindow.Set("Transparent",0)
1725 Return
1726
1727 HaltEmu:
1728 If (pauseMethod = 1)
1729 { disableSuspendEmu := "true"
1730 disableRestoreEmu := "true"
1731 emuPrimaryWindow.PostMessage("0x211",1)
1732 } Else If (pauseMethod = 2)
1733 { disableSuspendEmu := "true"
1734 emuPrimaryWindow.PostMessage("0x211",1)
1735 } Else If (pauseMethod = 3)
1736 { disableSuspendEmu := "true"
1737 disableRestoreEmu := "true"
1738 emuPrimaryWindow.PostMessage(0x0400+6,1)
1739 } Else If (pauseMethod = 4)
1740 { disableSuspendEmu := "true"
1741 emuPrimaryWindow.PostMessage(0x0400+6,1)
1742 } Else If (pauseMethod = 5)
1743 { disableSuspendEmu := "true"
1744 KeyUtils.Send("{P down}")
1745 TimerUtils.Sleep(1000)
1746 KeyUtils.Send("{P up} ")
1747 }
1748 Return
1749 RestoreEmu:
1750 If (pauseMethod = 1)
1751 emuPrimaryWindow.PostMessage("0x212",1)
1752 Else If (pauseMethod = 2)
1753 emuPrimaryWindow.PostMessage("0x212",1)
1754 Else If (pauseMethod = 3)
1755 emuPrimaryWindow.PostMessage(0x0400+6,0)
1756 Else If (pauseMethod = 4)
1757 emuPrimaryWindow.PostMessage(0x0400+6,0)
1758 Else If (pauseMethod = 5) {
1759 disableSuspendEmu := "true"
1760 KeyUtils.Send("{P down}")
1761 TimerUtils.Sleep(1000)
1762 KeyUtils.Send("{P up} ")
1763 }
1764 emuPrimaryWindow.Activate()
1765 Return
1766
1767 CloseProcess:
1768 FadeOutStart()
1769 If (networkSession && networkPlayers > 1) {
1770 Loop % networkPlayers {
1771 MameMultiPlayer%A_Index%Window.Close()
1772 MameMultiPlayer%A_Index%Window.WaitClose()
1773 }
1774 } Else
1775 emuPrimaryWindow.Close()
1776 Return
1777
177800:10:41:577 | RL | INFO | +16 | BuildScript - Loaded Multi-Player scripts
177900:10:41:577 | RL | INFO | +0 | BuildScript - Loaded Statistics.ahk script
178000:10:41:577 | RL | WARNING | +0 | BuildScript - "D:\RocketLauncher\Lib\User Functions\Global.ahk" not found
178100:10:41:577 | RL | WARNING | +0 | BuildScript - "D:\RocketLauncher\Lib\User Functions\MAME.ahk" not found
178200:10:41:577 | RL | WARNING | +0 | BuildScript - "D:\RocketLauncher\Lib\User Functions\Emulators\MAME.ahk" not found
178300:10:41:577 | RL | WARNING | +0 | BuildScript - "D:\RocketLauncher\Lib\User Functions\MAME\Emulators\MAME.ahk" not found
178400:10:41:577 | RL | WARNING | +0 | BuildScript - "D:\RocketLauncher\Lib\User Functions\MAME\kinstb.ahk" not found
178500:10:41:577 | RL | INFO | +0 | BuildScript - Finished injecting functions into module
178600:10:41:577 | RL | INFO | +0 | Main - Module is built
178700:10:41:577 | RL | INFO | +0 | CheckFile - Checking if D:\RocketLauncher\AutoHotkey.dll exists
178800:10:41:581 | RL | INFO | +0 | Main - Running module
178900:10:41:754 | MD | INFO | +N/A | Module initialized
179000:10:41:755 | MD | INFO | +0 | StartModule - Started
179100:10:41:755 | MD | INFO | +0 | StartModule - MEmu: MAME
1792 MEmuV: v0.166
1793 MURL:
1794 MAuthor:
1795 MVersion: 2.3.8
1796 MCRC: 6A458F17
1797 iCRC: 25E2CCF
1798 MID:
1799 MSystem:
180000:10:41:755 | MD | WARNING | +0 | StartModule - You have an unsupported System Name for this module: "MAME". Only the following System Names are suppported: ""
180100:10:41:756 | MD | INFO | +0 | PluginInit - Started
180200:10:41:756 | MD | INFO | +0 | CheckFile - Checking if D:\HyperSpin\Databases\MAME\MAME.xml exists
180300:10:41:764 | MD | INFO | +0 | BuildAssetsTable - Started - Building Table for: Game Logo|System Logo
180400:10:41:764 | MD | INFO | +0 | BuildAssetsTable - Ended
180500:10:41:764 | MD | INFO | +0 | BuildAssetsTable - Started - Building Table for: Artwork1|Box Art|Cartridge|Flyers|Letters|Other
180600:10:41:818 | MD | INFO | +62 | BuildAssetsTable - Ended
180700:10:41:818 | MD | INFO | +0 | BuildAssetsTable - Started - Building Table for: Game Video|System Video
180800:10:41:819 | MD | INFO | +0 | BuildAssetsTable - Ended
180900:10:41:819 | MD | INFO | +0 | PluginInit - Ended
181000:10:41:821 | MD | INFO | +0 | StartModule - Ended
181100:10:41:821 | MD | INFO | +0 | i18n - Started
181200:10:41:821 | MD | INFO | +0 | i18n - Ended, using "Open" for "dialog.open"
181300:10:41:822 | MD | WARNING | +0 | Module - "MAME" is not a known console or computer system. Defaulting to MAME's Arcade mode for the remainder of this MAME module.
181400:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module - Fullscreen: true (DEFAULT)
181500:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module - LegacyMode: false (DEFAULT)
181600:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module - MAME_BIOS_Path: D:\HyperSpin\Emulators\MAME\roms (DEFAULT)
181700:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module - Videomode: d3d (DEFAULT)
181800:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module - PauseMethod: 1 (DEFAULT)
181900:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module {SystemModuleIni} - [Settings] - BilinearFilter: true
182000:10:41:822 | MD | INFO | +0 | RIniFile.Read - Module {SystemModuleIni} - [Settings] - HLSL: true
182100:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - GLSL: false (DEFAULT)
182200:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - BezelMode: layout (DEFAULT)
182300:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - VerticalRotationMode: none (DEFAULT)
182400:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - CheatMode: false (DEFAULT)
182500:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - CheatModeKey: (NO VALUE)
182600:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - UseSoftwareList: false (DEFAULT)
182700:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - StaticParameters: (NO VALUE)
182800:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - Parameters: (NO VALUE)
182900:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - Parameters: (NO VALUE)
183000:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - MameRomName: (NO VALUE)
183100:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - Autosave: false (DEFAULT)
183200:10:41:823 | MD | INFO | +0 | RIniFile.Read - Module - Volume: (NO VALUE)
183300:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - Artwork_Crop: true (DEFAULT)
183400:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - Use_Bezels: false (DEFAULT)
183500:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - Use_Overlays: true (DEFAULT)
183600:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - Use_Backdrops: true (DEFAULT)
183700:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - Use_Cpanels: false (DEFAULT)
183800:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - Use_Marquees: false (DEFAULT)
183900:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - IniPath: (NO VALUE)
184000:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - HashPath: (NO VALUE)
184100:10:41:824 | MD | INFO | +0 | RIniFile.Read - Module - UseControllerRemap: true (DEFAULT)
184200:10:41:825 | MD | INFO | +0 | RIniFile.Read - Module - ControllerRemapPath: D:\HyperSpin\Emulators\MAME\ControllerRemap\ControllerRemap.exe (DEFAULT)
184300:10:41:825 | MD | INFO | +0 | RIniFile.Read - Module - ControllerRemapConfigPath: D:\HyperSpin\Emulators\MAME\ControllerRemap\ctrlr\ (DEFAULT)
184400:10:41:825 | MD | INFO | +0 | RIniFile.Read - Module - MAMECtrlrPath: D:\HyperSpin\Emulators\MAME\ctrlr (DEFAULT)
184500:10:41:825 | MD | INFO | +0 | RIniFile.Read - Module - Enable_Link_Play: false (DEFAULT)
184600:10:41:826 | MD | INFO | +0 | GetFadePicFile - Randomized images and Fade will use D:\RocketLauncher\Media\Fade\MAME\_Default\Layer 1.png
184700:10:42:110 | MD | INFO | +297 | DefaultAnimateFadeIn - Started, direction is: in
184800:10:42:110 | MD | INFO | +0 | DefaultAnimateFadeIn - Drawing First FadeIn Image.
184900:10:42:611 | MD | INFO | +500 | DefaultAnimateFadeIn - Ended
185000:10:42:623 | MD | INFO | +0 | DefaultFadeAnimation - Started
185100:10:42:623 | MD | INFO | +0 | GetFadePicFile - Randomized images and Fade will use D:\RocketLauncher\Media\Fade\MAME\_Default\Layer 3.png
185200:10:42:746 | MD | INFO | +125 | BuildAssetsTable - Started - Building Table for: Genre Logo|Rating Logo|Developer Logo|Publisher Logo|Year Logo
185300:10:42:765 | MD | INFO | +31 | BuildAssetsTable - Ended
185400:10:42:765 | MD | INFO | +0 | BuildAssetsTable - Started - Building Table for: System Logo|Game Logo|Game Logo
185500:10:42:766 | MD | INFO | +0 | BuildAssetsTable - Ended
185600:10:42:947 | MD | INFO | +172 | DefaultFadeAnimation - Ended
185700:10:42:947 | MD | INFO | +0 | DxwndUpdateIniPath - DxwndIni set to D:\RocketLauncher\Module Extensions\dxwnd\dxwnd.ini
185800:10:43:008 | MD | INFO | +63 | DefaultFadeAnimationLoop - percentage
185900:10:43:068 | MD | INFO | +62 | DefaultFadeAnimationLoop - percentage8
186000:10:43:136 | MD | INFO | +63 | DefaultFadeAnimationLoop - percentage17
186100:10:43:191 | MD | INFO | +62 | DefaultFadeAnimationLoop - percentage25
186200:10:43:256 | MD | INFO | +63 | DefaultFadeAnimationLoop - percentage33
186300:10:43:319 | MD | INFO | +62 | DefaultFadeAnimationLoop - percentage42
186400:10:43:346 | MD | INFO | +31 | Module - MAME ListXML values:
1865 Parent =
1866 Angle = 0
1867 Height = 225
1868 Width = 256
1869 Ways = 8
187000:10:43:346 | MD | INFO | +0 | Controller Remap: Start
187100:10:43:347 | MD | INFO | +0 | Controller Remap: ControllerRemapConfigPath: D:\HyperSpin\Emulators\MAME\ControllerRemap\ctrlr\
187200:10:43:347 | MD | INFO | +0 | Controller Remap: No Controller config file found.
187300:10:43:347 | MD | INFO | +0 | Controller Remap: End
187400:10:43:347 | MD | INFO | +0 | Module - Detected MAME Product Version from 'D:\HyperSpin\Emulators\MAME\mame64.exe' is 161
187500:10:43:347 | MD | INFO | +0 | Module - Running MAME in non-legacy mode
187600:10:43:347 | MD | INFO | +0 | Module - SinglePlayer session
187700:10:43:347 | MD | INFO | +0 | Process.Run - Running: "D:\HyperSpin\Emulators\MAME\mame64.exe" kinstb -rompath "D:\ROMS\MAME;D:\HyperSpin\Emulators\MAME\roms" -nowindow -hlsl_enable -nogl_glsl -video d3d -artwork_crop -nouse_bezels -use_overlays -use_backdrops -nouse_cpanels -nouse_marquees -filter -skip_gameinfo
187800:10:43:410 | MD | INFO | +63 | DefaultFadeAnimationLoop - percentage50
187900:10:43:444 | MD | INFO | +31 | Window.Wait - Waiting for window "ahk_class MAME"
188000:10:43:454 | MD | INFO | +16 | DefaultFadeAnimationLoop - percentage63
188100:10:43:521 | MD | INFO | +62 | DefaultFadeAnimationLoop - percentage69
188200:10:43:578 | MD | INFO | +63 | DefaultFadeAnimationLoop - percentage77
188300:10:43:589 | MD | INFO | +0 | Window.WaitActive - Waiting for "ahk_class MAME"
188400:10:43:644 | MD | INFO | +62 | DefaultFadeAnimationLoop - percentage85
188500:10:43:721 | MD | INFO | +78 | DefaultFadeAnimationLoop - percentage94
188600:10:43:767 | MD | INFO | +47 | DefaultFadeAnimationLoop - percentage100
188700:10:44:988 | MD | INFO | +1219 | DefaultFadeAnimationLoop - percentage100
188800:10:45:847 | MD | INFO | +859 | DefaultAnimateFadeIn - Started, direction is: out
188900:10:46:390 | MD | INFO | +547 | DefaultAnimateFadeIn - Ended
189000:10:46:492 | MD | INFO | +94 | Process.Process - "WaitClose" "mame64.exe"
189100:14:23:357 | MD | INFO | +216859 | CloseProcess - Started, user requested to end launched application
189200:14:23:391 | MD | INFO | +47 | DefaultAnimateFadeOut - Started, direction is: in
189300:14:23:938 | MD | INFO | +547 | DefaultAnimateFadeOut - Ended
189400:14:24:212 | MD | INFO | +266 | CloseProcess - Ended
189500:14:24:214 | MD | INFO | +0 | DefaultAnimateFadeOut - Started, direction is: out
189600:14:24:707 | MD | INFO | +500 | DefaultAnimateFadeOut - Ended
189700:14:24:734 | MD | INFO | +31 | ExitModule - Started
189800:14:24:734 | MD | INFO | +0 | UpdateStatistics - Starting Updating Statistics
189900:14:24:801 | MD | INFO | +63 | UpdateStatistics - Game section statistics updated.
190000:14:24:801 | MD | INFO | +0 | ExitModule - Ended
1901End of Module Logs
190200:14:24:911 | RL | INFO | +223328 | Main - Module ended, exiting RocketLauncher normally
190300:14:24:911 | RL | INFO | +0 | ExitScript - Started
190400:14:24:915 | RL | INFO | +0 | ExitScript - Checking what application is currently in focus.
190500:14:24:915 | RL | INFO | +0 | ExitScript - HyperSpin is currently active. Proceeding with exit
190600:14:24:925 | RL | INFO | +16 | SystemCursor - Restoring mouse cursor
190700:14:24:936 | RL | INFO | +0 | ExitScript - Restored cursor
190800:14:24:936 | RL | INFO | +0 | ExitScript - Ended
1909[/code]