Welcome to the Gamebase 64 forums.                 An attempt to document ALL Commodore 64 gameware before it's too late!

Adding a new emulator (Retroarch)

Are you having problems setting up GB64 on your machine? Ask your questions in here!

Moderator: Jimbo

extracampine
New Member
Posts: 5
Joined: Fri Apr 23, 2021 9:13 am

Adding a new emulator (Retroarch)

Tue Apr 27, 2021 9:04 am

Hi,

First of all, thanks to all involved in this project - it's amazing. I've just installed Gamebase and GB64 and it seems to be up and running fine.

I would like to add an emulator - Retroarch - as that is the one I use which outputs to my CRT. Retroarch works with my C64 games, but I'm not sure how to tell Gamebase to launch a rom with Retroarch. I have set the path to Retroarch when adding it as an emulator, but I don't know about the other stuff like scripts.

Any help would be hugely appreciated!
User avatar
.mad.
Respected Member
Respected Member
Location: Lancashire
Posts: 2078
Joined: Sun Jun 19, 2005 3:30 pm

Re: Adding a new emulator (Retroarch)

Tue Apr 27, 2021 12:52 pm

Retroarch is using a VICE core DLL for it's Commodore 64 emulator.
so you only need to find the correct version of VICE for your CRT monitor (384x272) setup.
:idea: SDL2VICE
This would make the GameBase experience more enjoyable with the current script options.

This very basic script will run the C64 Games in RetroArch VICEx64 from GameBase.
All keymaps, joystick options need to be configured and saved Via RetroArch.

Emulators.ini

Code: Select all

1=RetroArch

[RetroArch]
UseShortFilenames=1
SupportedTypes=CRT;REU;G64;D64;TAP;T64;P00;PRG
EmulatorPathFile=C:\RetroArch-Win32\retroarch.exe
ScriptFile=retroarch.txt
UseDefaultTypes=0
WaitFinish=1
1=
Retroarch >GameBase script

Code: Select all

;*********************
;* RetroArch VICEx64 *
;* GameBase64 Script *
;*    .mad. 2021     *
;*********************
ADD_CLP( -L %emupath%\cores\vice_x64_libretro.dll %gamepathfile%)
Run_Emulator()
extracampine
New Member
Posts: 5
Joined: Fri Apr 23, 2021 9:13 am

Re: Adding a new emulator (Retroarch)

Wed Apr 28, 2021 10:02 pm

Thanks for the tips .mad. I used your code but couldn't get it to work. I had to change a couple of things e.g. filepaths. The code that I tried:

In Emulators.ini:

[Emulators]
1=Retroarch CRT
2=CCS64 v3.9.2 R2
3=CCS64 v3.9.2 R2 (Win9x)
4=Hoxs64 v1.0.21.2 (x86)
etc

[Retroarch CRT]
UseShortFilenames=1
SupportedTypes=ZIP;CRT;REU;G64;D64;TAP;T64;P00;PRG
EmulatorPathFile=E:\RetroArch CRT TV\retroarch.exe
ScriptFile=Retroarch CRT.txt
UseDefaultTypes=0
WaitFinish=1
1=

And the Retroarch CRT.txt file in the GBC_v16 Scripts folder:

;*********************
;* RetroArch VICEx64 *
;* GameBase64 Script *
;* .mad. 2021 *
;*********************
ADD_CLP( -L %emupath%\cores\vice_x64_libretro.dll %gamepathfile%)
Run_Emulator()

But when I launch a game, nothing seems to happen.
User avatar
.mad.
Respected Member
Respected Member
Location: Lancashire
Posts: 2078
Joined: Sun Jun 19, 2005 3:30 pm

Re: Adding a new emulator (Retroarch)

Thu Apr 29, 2021 7:33 am

extracampine wrote:
Wed Apr 28, 2021 10:02 pm
I had to change a couple of things e.g. filepaths. The code that I tried:
But when I launch a game, nothing seems to happen.
In Emulators.ini:
SupportedTypes=ZIP;CRT;REU;G64;D64;TAP;T64;P00;PRG

Adding ZIP to the supported types, takes control away from GameBase.
You need to remove it so GameBase unzips the C64 image before attaching it to the emulator.

Also try renaming the retroarch folder removing the spaces.
it might be breaking the commandline.
e:\retroarch\
e:\retroarch-crt-tv\

i can confirm the above code 100% works for me at those paths.
extracampine
New Member
Posts: 5
Joined: Fri Apr 23, 2021 9:13 am

Re: Adding a new emulator (Retroarch)

Thu Apr 29, 2021 9:02 am

Yes, changing both of those things works, thanks! Just removing the zip extension didn't work.

However, changing the Retroarch directory breaks some other frontends that I have linking to it. Is it possible to have Gamebase access the directory name when it has the spaces somehow?

Edit - no worries, I've changed the path in the other frontends and everything works fine :D
User avatar
.mad.
Respected Member
Respected Member
Location: Lancashire
Posts: 2078
Joined: Sun Jun 19, 2005 3:30 pm

Re: Adding a new emulator (Retroarch)

Thu Apr 29, 2021 10:30 am

extracampine wrote:
Thu Apr 29, 2021 9:02 am
Is it possible to have Gamebase access the directory name when it has the spaces somehow?
No, not with the current Official GameBase Install.
You need to use a modified GEMUS.DLL with a newer 7z.exe and 7z.DLL by Anselm and myself.

The editied DLL encases all commands and paths in quotes, so it unzips and runs anywhere.

You now know how to use RA in all compatible GameBases!.
just by changing the core.dll name in the script. :wink:

Return to “GB64 Help!”

Who is online

Users browsing this forum: No registered users and 5 guests