lr-vice and Vic-20, Plus/4, C128, and Commodore Pet

 

I just got Vic-20 & Plus/4 working with lr-vice, and am in the midst of compiling C128 and expect it to work too.

git clone https://github.com/libretro/vice-libretro.git

followed by

make EMUTYPE=xvic
make clean
make EMUTYPE=xplus4

did the trick to get the cores, then I copied them to lr-vice alongside the C64 core, added /vic20 and /plus4 folders, edited emulators.cfg for each, and so on, the usual emu add process, and both of them booted right up.

Seems like it’d be easy to add Plus/4, Vic-20, and I expect, C128 to RetroPie in the experimental section. Or (probably better) have them be installed by lr-vice’s scriptmodule. That would give substantially the same behavior as standalone Vice in RetroPie, I think.

vice_x128_libretro.so also compiled and booted just fine.

I got the Commodore PET working. It involved source code work to support it as a libretro core, though.

My fork of lr-vice with support for PET is here: https://github.com/raphkoster/vice-libretro. These changes were rolled into the upstream builds a while back, but last I checked, Retropie does not install these additional platforms for you. There is a patch here that can do it: https://retropie.org.uk/forum/post/197059

To compile it yourself from source:

make clean
make EMUTYPE=xpet
sudo cp vice_xpet_libretro.so /opt/retropie/libretrocores/lr-vice

Then add it to es_systems.cfg:

  <system>
    <name>pet</name>
    <fullname>Commodore Pet</fullname>
    <path>/home/pi/RetroPie/roms/pet</path>
    <extension>.crt .d64 .g64 .prg .t64 .tap .x64 .zip .vsf .CRT .D64 .G64 .PRG .T64 .TAP .X64 .ZIP .VSF .p00 .P00</extension>
    <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ pet %ROM%</command>
    <platform>pet</platform>
    <theme>pet</theme>
  </system>

then create /opt/retropie/configs/pet, (I just copied the c64 folder) and put this in emulators.cfg:

lr-xpet = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-vice/vice_xpet_libretro.so --config /opt/retropie/configs/pet/retroarch.cfg %ROM%"
default = "lr-xpet"

I haven’t figured out controls or anything, but games boot. Keyboard seems rather wonky — punctuation is all weird. Might just be a default setting to a different language. I don’t want to submit an upstream pull request until it gets banged on some more, though. Maybe someday we can have C128, Vic-20, Plus/4, and PET as full installs in RetroPie. 🙂

Turns out that the original PET keyboard doesn’t have numbers on the top row! Only the numbers on the numpad work. That explains what I was seeing.

e73111b3-9823-4043-a5ef-f470fa7ce89f-image.png

There are some models that used the “business keyboard”; 4032B is one example that does have number keys, though much of the punctuation is in different places. I bet the B models specifically mean that keyboard.

Also, the later models seem to default to 80 column; you probably don’t want to use them for games for that reason.