[SOLVED] gamebase64 module support

Status
Not open for further replies.

dougan78

Member
RL Member
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.
 

djvj

Administrator
Staff member
Developer
I don't know much about this system so I cannot be of help. You really should be asking horsey for help with that as it is his module. I hate gamebase and never intend to attempt to use it. It's a mess of files with a fancy gui thrown on top.
 

dougan78

Member
RL Member
Based on your response, I get that you do not know much about the system. All it does is launch winvice using the rom name from the gamebase database. So while you may never intend to use it, I found it interesting how much information it has cataloged for the C64. As I am a avid fan of the C64 it is a neat project in my opinion. At any rate, I did check with horsey and he did not know that much about adding support for the stuff that I was looking for (multigame and hyperpause). I just figured if it just launches Winvice how hard can it be to get it to work with the existing winvice module (I have made attempts and have failed). I have also tested just dumping in the multigame parts I found from your Winvice module over to horseys to frakenstein something together to no avail. Alas, I do appreciate the response. I also do not get how the hyperpause stuff works either so that puts me at a deficit. I figured with someone elses AHK/module know how and me testing we might be able to cobble something together. Cheers.
 

djvj

Administrator
Staff member
Developer
Wait, if all it is an FE for winvice, why would you ever use it? Does it also include custom settings for every game that it passes to winvice then? If it does not, I don't see why you would just not launch the roms directly with the winvice module. Also is it including a custom winvice and maybe that's why it's not working like the winvice module? There has to be something different in the environment that would allow the winvice module to work with winvice and not with gamebase's iteration.
 

dougan78

Member
RL Member
Well I do believe it is more than that. If it was as simple as just unzipping the roms and launching I would have it working fine. It must pass additional flags to winvice. I have tested just unzipping the roms, and building my own xml file and just launching them however the traditional Load "*" ,8,1 that hyperlaunch does when launching the game disk image after mounting on the 1541 doesn't load so I believe each rom may have a special Load "Name of Game here",8,1 or something like that that is built in the gamebase frontend based on my testing with Ultima IV. Now I was just thinking that if once it got to Winvice the normal module rules from HL would apply and the gamebase stuff would be no worry as it just launches winvice, loads the game, then HL can do hyperpause, multigame, joyswap, etc. Either way. It is not the end of the world or anything and I can wait for a more comprehensive XML or build my own at somepoint gamebase just had a means to build a quick xml full of a lot of games for me to explore. I just thought if someone on this end had time that would be cool. I know we all are not a vast fountain of time so if time is not abundant I understand. Thanks again conversing on it.
 

dougan78

Member
RL Member
Well, I think in the end it really is not worth have 13k c64 games on the wheel which is what I have now when I pared this list down. So I think I will browse around the collection and add some that are not in the official XML manually. I don't really need/want 13k games on there anyway. I think that would be a more worthwhile effort than working on this. By the time I get to that HS may have the games I am looking for added. That is what this was about more or less, many of my favorites from years past are not on there and I did not know that it had so many games until I found this GB64. It was always about exploring the games I never got to download because 300 baud just wasn't that fast and I only had 1 phone line and z and y modem were not out to restart downloads after your parents picked up the phone and killed your BBS connection. cheers.
 

djvj

Administrator
Staff member
Developer
Yea I remember those days. I'm pretty sure someone was working on a proper db though, it may have at least the game names complete. Hopefully someone can chime in who knows.
 

brolly

Administrator
Developer
MultiGame will never work on this I'm afraid because Gamebase roms naming schema is a mess. MG will only work with No-Intro named roms otherwise it won't be possible to parse the filenames to figure how many disks each game has.
Add to that GB64 in some cases includes more than one version of the same disk for each game so that's really messy.

Some games do require some specific load commands (the vast majority don't need them though), which the current WinVICE module already supports, but you need to configure those yourself of course while Gamebase already has those settings done for you.
Don't see why HyperPause wouldn't work though.

And yeah we already have a pretty much complete database in the HS Project (not 100% finalized yet) which is around 7,000 games I think. Gamebase has a lot of crappy homebrew, type-in or magazine games that are just not worth it.
 

dougan78

Member
RL Member
That is cool. Thanks for the info. My personal 3.5 and 5.25 collection has more than the 525 on the current xml so I can wait until the updated one is released. I actually have been playing games more than anything right now anyway.

Sent from my SCH-I545 using Tapatalk
 
Status
Not open for further replies.
Top