MEmu = Higan
MEmuV = v0.97
MURL = http://byuu.org/higan/
MAuthor = djvj
MVersion = 2.0.5
MCRC =
iCRC =
MID =
MSystem = "Nintendo Entertainment System","Nintendo Famicom","Nintendo Game Boy","Nintendo Game Boy Color","Nintendo Satellaview","Nintendo Super Famicom","Super Nintendo Entertainment System"
;----------------------------------------------------------------------------
; Notes:
; You can set your Exit key in the emu by going to Settings->Configuration Settings->Input->Hotkeys->Exit Emulator (not needed for this script)
; If you want to use xpadder, or joy2key, goto Settings->Advanced Settings and change Input to DirectInput
; Fullscreen is controlled via GUi when running the module directly
; Sram Support is controlled via GUi when running the module directly - If true, the module will backup srm files into a backup folder and copy them back to the 7z_Extract_Path so higan can load them upon launch. You really only need this if you use 7z support (and 7z_Delete_Temp is true) or your romPath is read-only.
; If you use 7z support, the games that require special roms (dsp/cx4), the roms needs to be inside the 7z with the game. Otherwise you will get an error about the missing rom.
; You can find the dsp roms needed for some games here: http://www.caitsith2.com/snes/dsp/ and a list of what games use what chip here: http://wiki.pocketheaven.com/index.php?title=SNES_games_with_special_chips
; Bezels require fixedresmode, so set the scale you want in the emu which will control the size of the bezels.
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()
settingsFile := modulePath . "\" . moduleName . ".ini"
fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
sramSupport := IniReadCheck(settingsFile, "Settings", "SRAM_Support","true",,1)
bezelTopOffset := IniReadCheck(settingsFile, "Settings", "bezelTopOffset","51",,1)
bezelBottomOffset := IniReadCheck(settingsFile, "Settings", "bezelBottomOffset","31",,1)
bezelLeftOffset := IniReadCheck(settingsFile, "Settings", "bezelLeftOffset","7",,1)
bezelRightOffset := IniReadCheck(settingsFile, "Settings", "bezelRightOffset","7",,1)
BezelStart("FixResMode")
hideEmuObj := Object("ahk_class hiroWindow",1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
7z(romPath, romName, romExtension, sevenZExtractPath)
If (bezelEnabled = "true") {
higanFile := CheckFile(emuPath . "\settings.bml")
FileRead, higanCfg, %higanFile%
currentStatusBar := InStr(higanCfg, "ShowStatusBar:true") ? "true" : "false"
If (currentStatusBar = "true") {
StringReplace, higanCfg, higanCfg, ShowStatusBar:true, ShowStatusBar:false
SaveFile(higanCfg, higanFile)
} Else If (currentStatusBar = "false") {
StringReplace, higanCfg, higanCfg, ShowStatusBar:false, ShowStatusBar:true
SaveFile(higanCfg, higanFile)
}
}
If (Fullscreen = "true")
params := " --fullscreen"
; copy backed-up srm files to folder where rom is located
If (sramSupport = "true")
If FileExist(emuPath . "\srm\" . romName . ".srm")
FileCopy, %emuPath%\srm\%romName%.srm, %romPath%, 1 ; overwriting existing srm with backup if it exists in destination folder
HideEmuStart()
Run(executable . params . " """ . romPath . "\" . romName . romExtension . """", emuPath)
WinWait("higan ahk_class hiroWindow")
WinWaitActive("higan ahk_class hiroWindow")
BezelDraw()
HideEmuEnd()
FadeInExit()
; WinMove, 0, 0 ; when going from fullscreen to window, higan still has its menubar hidden, uncomment this to access it
; WinMenuSelectItem,ahk_class phoenix_window,,Super Famicom, Port 2, Justifier
; WinMenuSelectItem,ahk_class hiroWindow,,Super Famicom, Port 2, Justifier
Process("WaitClose", executable)1
; Back up srm file so it is available for next launch
If (sramSupport = "true")
{ If !FileExist(emuPath . "\srm\")
FileCreateDir, %emuPath%\srm\ ; create srm folder if it doesn't exist
FileCopy, %romPath%\%romName%.srm, %emuPath%\srm\, 1
}
7zCleanUp()
BezelExit()
FadeOutExit()
ExitModule()
SaveFile(text,file) {
FileDelete, %file%
FileAppend, %text%, %file%
}
BezelLabel:
disableHideTitleBar := "true"
disableHideToggleMenu := "true"
disableHideBorder := "true"
Return
CloseProcess:
FadeOutStart()
WinClose("ahk_class hiroWindow")
; WinClose("ahk_class phoenix_window")
Return
Comments