Code:
MEmu = WinViceGB
MEmuV = v2.0.a18
MURL =
MAuthor = horse
MVersion = 2.0
MCRC =
iCRC =
MID =
MSystem = "Commodore 64"
;------------------------------------------------------------------------
; Notes:
;------------------------------------------------------------------------
;-------------------------Hotkeys--------------------------------------------
Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1) ; If true, the module governs if the emulator launches fullscreen or not. Set to false when troubleshooting a module for launching problems.
WarpKey := IniReadCheck(settingsFile, "Settings", "WarpKey","F9",,1) ; toggle warp speed
JoySwapKey := IniReadCheck(settingsFile, "Settings", "JoySwapKey","F10",,1) ; swap joystick port
WarpKey := xHotKeyVarEdit(WarpKey,"WarpKey","~","Add")
JoySwapKey := xHotKeyVarEdit(JoySwapKey,"JoySwapKey","~","Add")
xHotKeywrapper(WarpKey,"Warp")
xHotKeywrapper(JoySwapKey,"JoySwap")
SaveDir = c:\hyperspin\hyperLaunch\Media\Saved Games\Commodore 64
StartModule()
FadeInStart()
StartModule()
BezelGUI()
FadeInStart()
BezelStart()
params = db=GBC_v11
Run(executable . " " . params . " fn=""" . romName . """", emuPath)
WinWait("ahk_class VICE")
WinWaitActive("ahk_class VICE")
Send !{enter}
BezelDraw()
FadeInExit()
Process("WaitClose","x64.exe")
7zCleanUp()
BezelExit()
FadeOutExit()
ExitModule()
CloseProcess:
FadeOutStart()
WinClose("ahk_class VICE")
Return
SaveStateSlot1:
gosub SaveStateFunction
Clipboard = %romName%-1.vsf
Send ^v{50}
Send, {enter}{50}{Left}{enter}
Send !{enter}
Sleep,2000
Return
SaveStateFunction:
Sleep, 100
Send !{enter}
Send !p{20}p
WinWait("ahk_class #32770")
WinWaitActive("ahk_class #32770")
Sleep, 500
Return
LoadStateSlot1:
gosub LoadStateFunction
Clipboard = %romName%-1.vsf
Send ^v{150}
Sleep, 100
Send, {enter}
Return
LoadStateFunction:
Sleep, 100
Clipboard = %SaveDir%
Send !p{20}{enter}
WinWait("ahk_class #32770")
WinWaitActive("ahk_class #32770")
Sleep, 1000
ControlClick, ToolbarWindow323, ahk_class #32770,,,, NA x192 x0
Sleep 250
Send ^v{150}
Send {Enter}
ControlClick, Edit1, ahk_class #32770
Sleep, 500
Return
BezelLabel:
disableHideTitleBar := false
disableHideToggleMenu := false
disableHideBorder := false
disableWinMove := false
return
;-------------------Re-Maps----------------------------------------------------------
Warp:
Send !w
Return
JoySwap:
Send !j
Return
;------------------added-by-dougan78----------------------------------------------------------
StartTape:
Send !{F7}
Return
StopTape:
Send !{F8}
Return
RunTape:
SetKeyDelay, 50
Loop, parse, Command
Send, {%A_LoopField% down}{%A_LoopField% up}
Send, {ENTER down}{ENTER up}
Return
HaltEmu:
If (Fullscreen = "true")
Send !{Enter}
Return
MultiGame:
Log("MultiGame Label was run!")
If romExtension in .d64,.d71,.d80,.d81,.d82,.g64,.g41,.x64,.prg,.zip
{ Send !8 ; swaps a Disk
wvTitle:="Attach disk image ahk_class #32770"
} Else If romExtension in .t64,.tap
{ Send !t ; swaps a Tape
wvTitle:="Attach tape image ahk_class #32770"
} Else
{
ScriptError(romExtension . " is an invalid multi-game extension")
}
WinWait(wvTitle)
WinWaitActive(wvTitle)
If ( SelectGameMode = 1 ) {
Loop {
ControlGetText, edit1Text, Edit1, %wvTitle%
If ( edit1Text = selectedRom )
Break
Sleep, 100
ControlSetText, Edit1, %selectedRom%, %wvTitle%
}
ControlSend, Button1, {Enter}, ahk_class #32770 ; Select Open
} Else If ( SelectGameMode = 2 ) {
Clipboard := selectedRom
Send, ^v{Enter}
} Else
ScriptError("You did not choose a valid SelectGameMode.`nOpen the module and set the mode at the top.")
Log("Module - WinWaitActive`, ahk_class VICE`, `, 5")
WinWaitActive("ahk_class VICE",,5)
WinActivate, ahk_class VICE
Return
RestoreEmu:
If (Fullscreen = "true")
Send !{Enter}
Return
This is the gamebase 64 module I got from HorseyHorsey which works pretty well. Would it be hard to make it work properly with hyperpause and multigame? I have tested playing around with it however I am no AHK expert. Would it be easier to modify the existing winvice module instead and get that to work for gamebase? I am not looking for the mouse support, tape support, etc. Just looking for commodore 64, disks/tapes, joystick swap, hyperpause, multigame. I think that would cover the bases. Any help would be appreciated.