Sunday, January 17, 2021

How to Build Vice 3.5 (x64sc, etc.) on Raspberry Pi 400

Raspberry Pi 400


The Raspberry Pi 400 invokes a sense of nostalgia back to the all-in-one systems of the past, such as those commonly available in the 80's (about 40 years ago!) of having the keyboard and computer all in one, with connections at the back of the enclosure, and expansion at the back of the enclosure.

My favorite system released January 1982 was the Commodore 64.

So why not have both?  With emulation, let the Raspberry Pi 400 become a Commodore 64 as well.

Vice 3.5 built, running on Raspian

One way to do this, is using Vice (the Versatile Commodore emulator).  Of course you can use a prepackaged solution like Retropie and Emulation Station.  But since it is open source, you can also just download and build the source yourself.

As vice 3.5 was just released Christmas Eve, 2020, it makes a lot of sense to build yourself, so you can have the latest build relatively easily.  Just think of all those new features!!!

I've attempted this myself on my Raspberry Pi 400 (and expect should work on others fine too) with Raspian.  I've tested with both the latest 32-bit ARM, and beta 64-bit ARM builds.

Following are the steps I took to accomplish building the default configuration.  I followed the basic instructions, and when configuration or build failed due to a dependency, researched the dependencies necessary (thanks Google and all those who have built before me and posted their solutions).  

Grab yourself your favorite beverage, power up your Pi, and get building!   And once you're done, feel free to test my hires.d64 image.  Maybe even pick up some keyboard stickers.   And also can run Pet, Vic-20, Commodore 128, etc.

Summary

  1. Install dependency packages
  2. Download three archives from web: vice 3.5, SDL2, SDL2_image
  3. extract the archives to their respective directories
  4. configure, build, and install each iteratively in the order: SDL2, SDL2_image, vice 3.5
Full Steps (note versions may change, these were the ones available January 2021):

  • sudo apt-get install flex bison xa65 libgtk2.0-dev texinfo libxxf86vm-dev dos2unix libpulse-dev libasound2-dev
  • sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra 




17 comments:

  1. Not sure what ./configureVersitile is but it gave me an error. After thinking about it a minute I assumed it was a mistake and just went with ./configure and it ripped right on through. It works like a charm, thanks for the article!

    ReplyDelete
    Replies
    1. Yeah, that was a typo. Fixing it. Thanks for the feedback!

      Delete
  2. Nice one Dave! Neatly layed out and easy to follow.

    ReplyDelete
  3. What configuration settings in Vice did you compile/select to address the constant "warning: sync is far too late" messages? I've compiled Vice on my Pi 400, linked to SDL2, and launch Vice from the default Raspberry PI OS desktop.

    ReplyDelete
    Replies
    1. I get those errors too. So I did nothing to address.

      Delete
  4. Was not able to get this running. First off, could not grab the libgtk2.0-dev as it was bring back a 404 message. Then, I got throguh the rest of the instructions, but trying to run any of the emulators results in a pulse error (pulse is apparently not installed, and I can't install it- somewhere in the chain of dependant packages, one of those is marked not-current and can't install.. Good times!

    ReplyDelete
    Replies
    1. If anyone else has this issue, I figured out the fix: 1) run sudo apt-get update --allow-releaseinfo-change
      2) run sudo apt-get install libgtk2.0-dev
      3) run sudo apt-get reinstall pulseaudio
      4) reboot. Now vice works!

      Delete
  5. Okay, now I have a C64-pi400, how do I load and store C64 software?
    Is there a specific folder it goes to? or do I use a thumb drive? or, what?

    ReplyDelete
    Replies
    1. Did anyone ever answer you? I was wondering the same thing

      Delete
    2. VICE instructions are available at SourceForge. And YouTube demos should be available. Hints are to look for defining peripheral options, and for attaching disks.

      Delete
  6. all installed ok - no errors following above, but how do i run it please?

    ReplyDelete
  7. Hi, are you sure about all these dependencies? (and isn't there an official documentation where they are stated?) one of them specifically,"texlive-fonts-extra", is 1.8GB! That definitely cannot be right and required...

    ReplyDelete
  8. I prefer having all the shortcuts and menus available with the emulator:
    # apt install libgtk2.0-dev libgtk-3-dev libglew-dev
    $ ./configure --enable-desktop-files --enable-native-gtk3ui --enable-sdlui
    and I am not that patient, so prefer compiling on all available cores:
    $ make -n 4

    Though I am not sure if sdlui option and libgtk2.0 package are necessary - but like I said - I am not that patient to check :)

    ReplyDelete
    Replies
    1. Thanks for the feedback! Good to learn every day.

      Delete