Jump to content

Problems with Fusion ahk - Savegames are not kept after exiting


lassic

Recommended Posts

Posted

Hi!

 

I have a problem with my fusion ahk.

all is working fine - just my savegames in f.e. role-playing games are gone after exiting the game as always by pressing ESC.

Savegames stay when i exit the fusion emulator manually over the emu-menu.

so there has to be a small error in the module.

I use an older version of HS and i would be really happy if someone can ease my pain =)

 

THX for help!

 

here s the AHK i am using:

 

;----------------------------------------------------------------------------
; Sega Genesis
; Fusion v3.64
; by djvj
; 1.2
;
; Notes:
; Don't forget to setup your bios or you might just get a black screen.
; Set your fullscreen resolution by going to Video->Full Screen Resolution
; Fusion only supports 4 different windowed resolutions. If you don't use fullscreen, set the one you want by going to Video->Window Size
;----------------------------------------------------------------------------
Fullscreen = true
hideTitleBar = true        ; Removes the border, titlebar, menubar, and centers the emu on your screen. Only need this is fullscreen is false
;----------------------------------------------------------------------------

fusionFile := CheckFile(emuPath . "\fusion.ini")
FileRead, fusionIni, %fusionFile%

GUI_ID := FadeInStart()

7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)

; Setting Fullscreen setting in cfg if it doesn't match what user wants above
currentFullScreen := (InStr(fusionIni, "FullScreen=1") ? ("true") : ("false"))
If ( Fullscreen != "true" And currentFullScreen = "true" ) {
        StringReplace, fusionIni, fusionIni, FullScreen=1, FullScreen=0
        SaveFile(fusionIni, fusionFile)
    } Else If ( Fullscreen = "true" And currentFullScreen = "false" ) {
        StringReplace, fusionIni, fusionIni, FullScreen=0, FullScreen=1
        SaveFile(fusionIni, fusionFile)
    }

hideEmu := (If Fullscreen = "true" ? ("Hide") : (""))

; This allows us to send variables, that when empty, are not sent to the Run command
RunEmu(executable, "-auto", "-gen", romPath . romName . romExtension, emuPath, hideEmu)

WinWait, Fusion ahk_class KegaClass
WinWaitActive, Fusion ahk_class KegaClass

Loop { ; looping until Fusion is done loading game
        Sleep, 200
        WinGetTitle, winTitle, Fusion ahk_class KegaClass
        StringSplit, T, winTitle, %A_Space%
        If ( T3 = "-" )
            Break
    }

If ( hideTitleBar = "true" ) {
        WinSet, Style, -0x40000, Fusion ahk_class KegaClass ; Removes the border of the game window
        WinSet, Style, -0xC00000, Fusion ahk_class KegaClass ; Removes the TitleBar
        DllCall("SetMenu", uint, WinActive( "A" ), uint, 0) ; Removes the MenuBar
        Center(Fusion ahk_class KegaClass)
    }

GUI_ID2 := FadeInExit()

Process, WaitClose, %executable%

7z2 := 7zCleanUp()

GUI_ID4 := FadeOutExit()

WinActivate, Hyperspin

ExitApp


RunEmu(exe,param1=0,param2=0,rom=0,relativepath=0, option=0) {
        Run, %exe% %param1% %param2% "%rom%", %relativepath%, %option%
    }

Center(title) {
        WinGetPos, X, Y, width, height, %title%
        x := ( A_ScreenWidth / 2 ) - ( width / 2 )
        y := ( A_ScreenHeight / 2 ) - ( height / 2 )
        WinMove, %title%, , x, y
    }

SaveFile(text,file) {
        FileDelete, %file%
        FileAppend, %text%, %file%
    }

CloseProcess:
    GUI_ID3 := FadeOutStart()
    WinClose, Fusion ahk_class KegaClass
Return
 

Posted

In roleplaying games there is originally a save game option (saved by a battery). this functions well with fusion if you exit the emulator on the normal way (not pressing ESC).

Then the save-game is kept when you start the game next time. By using the Fusion over HS the save-game is gone after exiting the game pressing ESC.

I don t use the Save-Status within Fusion.

Posted

Just a thought but you could try changing the exit command from the usual escape key to something more windows friendly like "alt+f4" or "alt+f+x". One of these just may save correctly instead of just closing the program immediatly like pressing escape does.

Sent from my SGH-I337M using Tapatalk

Posted

That could be a good idea. Do you know how i can change that?

Best would be to kind of remap the ESC button to Alt+F4 just for Fusion.

Posted

^^ yep... I am away from my pc so I can't test it out right now. I am also on latest HS and RocketLauncher... I also use joytokey. Do you use a keymapper?

Sent from my SGH-I337M using Tapatalk

Posted

This seems like an issue with the config from Fusion rather than the ahk file. Did you set up all the paths in fusion beforehand? I don't know on which system you have these issues but you need to set the following paths for battery save states.

 

SMS/GG: SxM files

Genesis: SRM files

Sega CD: BRM files

Posted

This seems like an issue with the config from Fusion rather than the ahk file. Did you set up all the paths in fusion beforehand? I don't know on which system you have these issues but you need to set the following paths for battery save states.

 

SMS/GG: SxM files

Genesis: SRM files

Sega CD: BRM files

 

He has stated that it saves correctly when exiting via the menu bar so I assume these are set correctly.

Posted
Thank you all guys for your help in this case. jeremy is right. it has to be the way the ahk closes the emulator.

If only djvj, the author of that fusion ahk, could read that topic. But i don t dare to bother him by private message with this one.

I use Genesis with this ahk.

i am sure there has to be a small change in the ahk for a correct exit.

 

 
Posted

Thank you all guys for your help in this case. jeremy is right. it has to be the way the ahk closes the emulator.

If only djvj, the author of that fusion ahk, could read that topic. But i don t dare to bother him by private message with this one.

I use Genesis with this ahk.

i am sure there has to be a small change in the ahk for a correct exit.

 

 

 

 

If you believe this is a module issue then make a post on the Rlauncher forum. Although devs from Rlaucher do visit these forums from time to time they can't possible read all of the posts.

Posted

He's running an older HS... so probably HL not RL. Which means the module is probably old anyway. He should probably try to update.

Sent from my SGH-I337M using Tapatalk

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...