Trying to add Commodore 64 emulation through RetroArch

Questions about arcade game emulation support on the ARpiCADE (MAME, DAPHNE, Picodrive, etc...)

Moderator: dee2eR

Phones
Community Member
Community Member
Posts: 11
Joined: Mon Oct 16, 2017 12:01 pm

Trying to add Commodore 64 emulation through RetroArch

Post by Phones » Tue Aug 14, 2018 8:50 pm

So I'm trying to add Commodore 64 support through RetroArch but I'm kind of stumbling in the dark.

I downloaded the commodore64 Vice librertro core from https://buildbot.libretro.com/nightly/l ... 64/latest/ and placed it next to the other cores in /home/pi/.config/retroarch/cores/lr-vice/vice_x64_librertro.so

Then I copied the home/pi/.attract/emulators/atari2600.cfg and renamed it to commodore64.cfg and made changes to the following lines:
executable /boot/launchers/commodore64.sh
romext .d64,.x64;t64;.zip

I then copied /boot/launchers/atari2600.sh and renamed it commodore64.sh and did the following change:
/home/pi/.config/retroarch/bin/retroarch -L /home/pi/.config/retroarch/cores/lr-vice/vice_x64_libretro.so --config /home/pi/.config/retroarch/stella_libretro.cfg --appendconfig /home/pi/.config/retroarch/aconfig/$aconfig.cfg /boot/roms/consoles/commodore64/"$*”
(kept the stella_librertro.cfg file since it seemed rather generic and not referencing any stella stuff but of course this could be terribly wrong and would be changed if I got it working).

I also added some .t64 files to roms/consoles/commdore64 folder.

Fired up ARPiCade and could find the commodore64 emulator in the attract-menu and also made a scan that showed up the .t64 files but then when trying to run the game - nothing... I'm just sent back to the menu.

I realize that this is very hackish and not very likely to work but I'm having trouble finding instructions on how to add emulators to RetroArch. Any help on how to continue would be greatly appreciated! :)

dee2eR
Inventor
Inventor
Posts: 977
Joined: Tue Aug 22, 2017 2:07 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by dee2eR » Tue Aug 14, 2018 11:58 pm

Hard to be certain but if this:
romext .d64,.x64;t64;.zip
looks like that in file home/pi/.attract/emulators/commodore64.cfg the typos may be your problem. t64 has no . in front of the extension. Also you have mixed commas and semi colons as delimiter. Assuming everything else works and the config file you used will work with the C64 emulator that will be the problem.

It would also be best to make a new copy of the Stella config file to be used with c64 as otherwise the c64 emulator could add stuff to the file or otherwise break it for the Atari stuff it was there for in the first place. (doing it as you had could also work fine, it will depend on the 2 emulators)

hopefully the issue is just a rom extension mashup.

Phones
Community Member
Community Member
Posts: 11
Joined: Mon Oct 16, 2017 12:01 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by Phones » Wed Aug 15, 2018 4:09 pm

Thanks for responding so quickly :)

I had a typo regarding the .t64 file type. Fixed that and also made a commodore copy of the stella.cfg file. Unfortunately still not working :(

Do you know if it's possible to log what's happening in arpicade to file so I can go back and see what really happens?

How did you go about adding those other retroarch emulators? What steps did you take? Where did you find information about configuration files and so on?

Also, does this look like the correct core to you? - buildbot.libretro.com/nightly/linux/x86_64/latest/... Is it the correct architecture (x86_64) for the raspberry pi?

Thank you for all your work put into ARpiCADE, having lots of fun with it! :)

Phones
Community Member
Community Member
Posts: 11
Joined: Mon Oct 16, 2017 12:01 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by Phones » Wed Aug 15, 2018 8:21 pm

Got it working!

I had the wrong build of the vice core. Found RPi compiled cores here https://github.com/bite-your-idols/Game ... -cores-RPi. Replaced the wrong one with this and it worked :)

Phones
Community Member
Community Member
Posts: 11
Joined: Mon Oct 16, 2017 12:01 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by Phones » Fri Dec 21, 2018 11:52 pm

Just wanted to add that if anyone's interested in having a go at this and want more details then read my exhaustive post about it here: https://medium.com/@carlssonsteffo/cons ... 8c9c5fc81a

bravebluerx
Contributing Member
Contributing Member
Posts: 27
Joined: Fri Sep 22, 2017 5:27 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by bravebluerx » Wed Jan 02, 2019 5:49 am

Nice write up thanks for taking the time to go through all your steps

dee2eR
Inventor
Inventor
Posts: 977
Joined: Tue Aug 22, 2017 2:07 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by dee2eR » Fri Apr 19, 2019 3:58 pm

@Phones how did you set the video up on your C64 setup?

I've had a bit of a play with the libretro version of Vice now and am curious how others would set it up. Today I tried running the Pi in 240p@50Hz instead of the usual 60, to closer match the original Commodores 50ish. It looks great and is scanline perfect, the extra 30ish lines discarded from the top and bottom are only solid colour of the outer boarder anyway, but I can't seem to find the perfect refresh rate (maybe original hardware and emulator are slightly off in refresh rate?... no idea). It's not a deal breaker by any means.

I revisited some stuff today and playing C64 games on my 14inch PVM was quite authentic to the experience I had as a kid on a 14inch TV. For a personal build I'd be tempted to put on some sort of filter because the image on the PVM is far sharper than that old TV ever was. Wish I could remember the names of the more obscure stuff (now) that I had back when, all the best of lists etc. seem to have the same games in each video/blog/whatever.

Loading times for (non cart) C64 games are similar to current games on my Xbox One, lol. Admittedly the new stuff loads a lot more information in the same time...

Phones
Community Member
Community Member
Posts: 11
Joined: Mon Oct 16, 2017 12:01 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by Phones » Sun Apr 21, 2019 10:14 pm

First off a confession, I'm a rookie when it comes to monitor types and their internal workings. Please bear with me if I mix things up.

For the best image quality and least flicker on my monitor I run ARpiCADE in '240p only horizontal' mode.

I've attached a picture of my RetroArch/Libretro video settings. I've no idea if these are ideal settings but it looks great on my setup.

Image

What I noticed made quite a big improvement was enabling the 'Integer Scale' option. That one made the, otherwise slightly vertically squashed screen, stretch out into full glory

Please let me know if you want me to provide you with some other information about my setup and once again, thanks for all your work bringing us ARpiCADE! :)

dee2eR
Inventor
Inventor
Posts: 977
Joined: Tue Aug 22, 2017 2:07 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by dee2eR » Mon Apr 22, 2019 6:21 am

Do you get any audio pops? That's what is bugging me, it's most noticeable if you just watch a games otherwise silent attract screen. The picture is fantastic and the scrolling is smooth and I hardly notice the pops while playing but it would be nice to get it that final little bit better.

Except for the refresh rate we've set it up pretty similarly, I may be chasing the impossible dream trying to set it up like real hardware refresh wise. As best I can tell the emulator runs just shy of 50Hz instead of just over 50Hz (50.12) for the real hardware (at least for the Pal spec). Although I'm not certain I actually have the Pi running at 240p@50.12 either... in theory it should be. It's also possible that Vice and/or Retroarch arn't intended to perfectly recreate the original refresh rate, I don't really know. I've had it running with no audio issues running at 49.9 something Hz which even though it shouldn't be correct for the original hardware may be the best option for the emulator.

Phones
Community Member
Community Member
Posts: 11
Joined: Mon Oct 16, 2017 12:01 pm

Re: Trying to add Commodore 64 emulation through RetroArch

Post by Phones » Mon Apr 22, 2019 9:12 pm

Have you seen this article? - https://docs.libretro.com/guides/optimal-vsync/

If I interpret i correctly, what you are after is nearly impossible. Also, it seems that the refresh rate shown when in the RetroArch Video menu is the refresh rate used for the menu screen and not the running emulator itself.

Post Reply