Page 1 of 13 12311 ... LastLast
Results 1 to 10 of 130

Thread: HOWTO: Compile VICE in Ubuntu

  1. #1

    Talking HOWTO: Compile VICE in Ubuntu


    If this picture hits a warm spot in your heart, this howto is for you!

    If you think this is the way a computer should look when you turn it on, this howto is for you!

    If this was the first program you ever wrote, this howto is for you!

    That's right, friends and neighbors. It's time to stop fragging and start playing. This howto will walk you through compiling VICE -- the Versatile Commodore Emulator -- in current Ubuntu releases. An hour from now, you'll be playing all the old classics, just like you used to in the good old days. Best of all, you can cut load times, bump up the speed and add gobs of memory at no cost. It's the dream C64 you always wanted!

    If you want more information about VICE, how it works or how to contribute, start here. VICE isn't anything new -- C64 emulators on the whole have been around for about a decade or more, in varying forms. VICE is just one of the oldest and well-established.

    By the way, you're not limited to the glory days of the C64. VICE includes emulators for the VIC-20, the C128 and a variety of other Commodore-era hardware. It's like having an entire computer museum at your disposal!

    This howto has been tested on
    • a squeaky-clean Dapper Xubuntu installation on a dual Xeon 2.8Ghz machine,
    • a multitude of Ubuntu installations as far back as 6.06., and all the way to the current release, all on a 1Ghz Pentium III Dell Inspiron 8000,
    • a 32-bit Ubuntu 8.04 installation on a 2.0Ghz AMD64 machine, and
    • a cluttered Edgy Openbox 3.3.1 install on a 1Ghz Pentium III Dell Optiplex.

    It worked perfectly each time, and with some luck it might work on other architectures (I don't have the hardware to be sure; reply here if it works for you, or even if it doesn't).

    (A side note: I tried compiling this from the Xubuntu 7.04 live CD once, and while it probably would have worked fine, I ran out of memory before I could complete checkinstall. If you have more than 512Mb in your machine, you might be able to compile and run VICE from a live CD. I don't know why I mention that, except to suggest that it could possibly be done.)

    I should note that there are VICE packages in the repositories; click here for a list of each version available to each release. But for copyright reasons, they're supplied without the kernel ROMs, which means you'll have to find them, download them and install them from elsewhere. Without those ROMs, the VICE emulators don't work. If you decide to try it anyway, take a look at the readme files that are installed in /usr/lib/vice/docs when you install the VICE package. The ROMs are out there, but the legwork and experimentation is up to you. In the end, it might be easier to just compile.

    (Note: This howto was originally written for version 1.20, but newer versions have since been released. Where you see 1.20 in this howto, please substitute the new version number.)

    What you'll need

    An Internet connection
    The latest source version of VICE
    The build-essential and libxaw7-dev packages

    Quick and dirty: For advanced users

    • Update and upgrade, if you want
    • Download VICE tarball; extract
    • Install build-essential and libxaw7-dev
    • Configure, make, make install (or checkinstall)

    Step-by-step: For beginners

    1. Download some stuff

    There are three things that you'll need before you can get started: The VICE tarball (which is to say, the VICE source code), the build-essential package and the libxaw7-dev package.

    First things first. Go to the VICE home page and download the most recent version.

    Download the "source distribution" to your computer -- the one at the top of the list. Don't try the other releases; they're for other operating systems and other architectures.

    When it's downloaded, open a terminal window. Type this command in the box:

    sudo aptitude install build-essential libxaw7-dev
    That will install the packages you need to compile VICE. The download can take a little while; it's about 15Mb or so (I forget exactly). If you don't get all the packages, or if you skip this step, you end up with errors when you try to compile VICE.

    2. Extract the tarball

    Now navigate to the VICE source package you downloaded. Then type in this command:

    tar -xvf vice*
    If you want, you can add -C directory-where-you-want-to-install-vice. For example, I like to put all my games into a folder called (of all things) "games" inside my home directory. For me, the command is tar -xvf vice* -C ~/games.

    You can also open XArchiver and extract it that way.

    3. Compile

    Next, navigate your terminal window into the VICE folder. The next three steps are short commands that take a long time.

    Now wait. A bunch of stuff will stream by. This took me about four or five minutes on a 1Ghz machine.

    As a side note, it's worth checking the configure options, because they may or may not be useful to you. Try .configure --help | less and see what applies. Some experimentation has given me this, which I find is best for my hardware. If you're new to compiling programs, you should probably stick with the plain ./configure command.

    ./configure --disable-realdevice --enable-ethernet --disable-ipv6 --enable-fullscreen --without-esd --without-oss --without-resid --with-x
    The next step is the actual compilation.

    Now wait. More stuff will stream by. This took close to 10 minutes on a 1Ghz machine.


    sudo make install
    Wait one more time. More stuff will stream by. This took about seven or eight minutes on a 1Ghz machine. We need the sudo command here because it's going to put the final VICE commands in /usr/bin and other directories outside your home folder. For that, we need permission.

    4. Uninstallation

    To remove VICE, return to the directory where you compiled it and give make the uninstall command.
    sudo make uninstall
    Again you need sudo there, because it will remove things from directories elsewhere on the system.

    The End

    Optional Director's Cut Ending

    As lukew suggested below, it might be preferable to use checkinstall over the final step listed above -- sudo make install. The benefit is that checkinstall creates a .deb package, which makes it easier to get rid of VICE if you decide 1980s-era computing wasn't as great as it was cracked up to be, or if something goes wrong and you just want to try it over again.

    checkinstall is in the universe repository, so you'll have to make sure you have that repository enabled. Install it with this command, which you can combine with the installation command listed above, in step 1.

    sudo aptitude install checkinstall
    When you reach the last command listed above -- sudo make install -- use checkinstall instead.

    sudo checkinstall
    The first thing checkinstall will want to know is if you want a default set of package docs.

    Quote Originally Posted by checkinstall
    The package documentation directory ./doc-pak does not exist.
    Should I create a default set of package docs? [y]:
    I answer yes. I see no harm in it.

    Next, checkinstall will ask for a description of the package.

    Quote Originally Posted by checkinstall
    Please write a description for the package.
    End your description with an empty line or EOF.
    You can fill that with whatever you like; I just use ...

    VICE Versatile Commodore Emulator v1.20
    When you're done, enter a blank line.

    After that, there's an array of descriptors for the package.

    Quote Originally Posted by checkinstall
    **** Debian package creation selected ***

    This package will be built according to these values:

    0 - Maintainer: [ kmandla@cc99p01 ]
    1 - Summary: [ VICE Versatile Commodore Emulator v1.20 ]
    2 - Name: [ vice ]
    3 - Version: [ 1.20 ]
    4 - Release: [ 1 ]
    5 - License: [ GPL ]
    6 - Group: [ checkinstall ]
    7 - Architecture: [ i386 ]
    8 - Source location: [ vice-1.20 ]
    9 - Alternate source location: [ ]
    10 - Requires: [ ]

    Enter a number to change any of them or press ENTER to continue:
    You can modify those if you like; I just use the defaults.

    The next step takes a while and a lot of messages will spin by. If all goes well (and it should), the next message will be this one, or one like it:

    Quote Originally Posted by checkinstall
    ************************************************** ********************

    Done. The new package has been installed and saved to


    You can remove it from your system anytime using:

    dpkg -r vice

    ************************************************** ********************
    Checkinstall has finished its work and left you with a .deb file, and installed it for you. If you decide in the future to dump VICE, you can uninstall it with the command you see above -- with a slight addition.

    sudo dpkg -r vice
    It's worth noting that if you don't use checkinstall with sudo, the package creation will continue, but the installation will fail. In that case you can still install VICE with
    sudo dpkg -i vice*.deb
    or by double-clicking on the .deb file. (I used the splat there in case the version number changes, or you're using a different architecture.)

    And that's about it. Unless you ran into compiling errors, you should be able to enter x64 into a terminal window and the VICE C64 emulator will spring into view, like a ninja!

    If you're more interested in the other emulators, take a glance back at the VICE home page to see which machines are represented, and how to invoke them.

    As far as getting games or programs or old disk images, you're on your own. A quick Google search will no doubt turn up hundreds of thousands of pages offering games from 20 and 25 years ago. But since most of that material is still copyrighted, it's not included in this howto.

    Have fun!

    If you really want to wallow in the nostalgia, take a spin past Bo Zimmerman's fantastic Web pages dedicated to the No. 1 home computer of 25 years ago.

    Thread history:

    Edited, 06/10/15: I double-checked, and both build-essential and libxaw7-dev are within the main repositories, so I removed the part about enabling multiverse and universe.

    Edited, 06/12/22: I added the checkinstall method at the suggestion of lukew ... which is really a better way to do it.

    Edited, 07/03/17: VICE is at 1.21 now, and Feisty has 1.20 in the repos. Version 1.21 compiles in the same way as the previous version.

    Edited, 07/04/13: The VICE source code needs a very easy edit to get it to work under the new libx11 packages. I added a link to Compyx's post, which explains the what-where-when-why-how of getting a happy ending.

    Edited, 07/08/16: VICE has updated to 1.22, which fixes the aforementioned incompatibility with libx11. I've removed notes in the howto that talk about editing the source code, since that's no longer necessary.

    Edited, 07/10/26: The tutorial works for 1.22 under Gutsy, so I've edited it to reflect that.

    Edited, 08/01/25: I added notes about uninstalling VICE with make.

    Edited, 08/04/29: The tutorial works for 1.22 under Hardy now.

    Edited, 08/07/29: Version 2.0 of VICE worked for me under 8.04.

    Edited, 08/11/03: The instructions work for version 2.0 of VICE in Ubuntu 8.10.

    Edited, 08/12/25: Updated to the Sourceforge web site, and for the 2.1 release.

    Edited, 09/04/30: The tutorial works fine under Ubuntu 9.04, with or without the Gnome UI.

    Edited, 09/12/31: Updated to Ubuntu 9.10 with version 2.2, and all is working as expected.

    Edited, 10/05/13: Updated to Ubuntu 10.04 with the short fix described here, but otherwise requires nothing different for version 2.2.

    Edited, 10/11/04: Updated to Ubuntu 10.10. The fix mentioned for 10.04 is still needed for 10.10. And occasionally, checkinstall will finish with errors. If that is the case, stay with sudo make install.
    Last edited by K.Mandla; November 4th, 2010 at 02:26 AM. Reason: Updated for Ubuntu 10.10
    Ubuntu user #7247 :: Linux user #409907

  2. #2
    Join Date
    Mar 2006
    Hardy Heron (Ubuntu Development)

    Re: HOWTO: Compile VICE in Dapper and Edgy

    Nicely done.



  3. #3
    Join Date
    May 2006

    Re: HOWTO: Compile VICE in Dapper and Edgy


    matthew@Bob3:~/Downloads/vice-1.20$ x64
    *** VICE Version 1.19 ***

    Welcome to x64, the free portable C64 Emulator.

    Current VICE team members:
    A. Boose, D. Lem, T. Biczo, A. Dehmel, T. Bretz, A. Matthies,
    M. Pottendorfer, M. Brenner, S. Trikaliotis, M. van den Heuvel.

    This is free software with ABSOLUTELY NO WARRANTY.
    See the "About VICE" command for more info.

    X11: Found 24bit/TrueColor visual.
    X11: Using private colormap.
    C64MEM: Error - Couldn't load kernal ROM `kernal'.
    Machine initialization failed.


  4. #4

    Re: HOWTO: Compile VICE in Dapper and Edgy

    Do you have the VICE package from the repositories installed? It looks like you're starting up version 1.19 when you give the x64 command.


    sudo aptitude remove --purge vice
    to get rid of 1.19, then you'll probably have to recompile 1.20. Let us know how it goes.
    Ubuntu user #7247 :: Linux user #409907

  5. #5
    Join Date
    May 2006

    Re: HOWTO: Compile VICE in Dapper and Edgy

    That did it! Thank you!!!

  6. #6
    Join Date
    Oct 2006
    Central Florida
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Compile VICE in Dapper and Edgy

    SWEEEEEEEEET! I can play those games I wrote for Compute!'s Gazette all over again!
    Why can't life have a sudo apt-get install -f command?
    Install VMWare Server 2 on a text-only system
    Need help getting your printer working in Linux?
    It's all about choice, right? Then stop flaming Windows users.

  7. #7
    Join Date
    Oct 2004
    Ubuntu Karmic Koala (testing)

    Wink Re: HOWTO: Compile VICE in Dapper and Edgy

    Cool. I compiled vice 1.20 a little while ago, turns out it has a gnome ui if you'd rather use that than xaw.

    to see the options
    ./configure --help

    for gnome ui
    ./configure --enable-gnomeui

    P.S. The double size thing is an option in ~/.vice/vicerc. Also, audacious has a great sid player (ported from xmms.) Just thought I'd plug my favorite player, since it handles more than mp3 and oggs
    The idea of copyright did not exist in ancient times, when authors frequently copied other authors at length in works of non-fiction. This practice was useful, and is the only way many authors' works have survived even in part. -- Richard Stallman

  8. #8
    Join Date
    May 2005

    Re: HOWTO: Compile VICE in Dapper and Edgy

    Does this emulator have a good fullscreen support yet? I remember trying it a couple of years back and it had dga and x11 modes, but it was difficult getting to to stretch, they definitely weren't using hardware overlay.

    Has it got any better? I checked frodo's site and they announced an sdl version but I think development has ceased.

  9. #9
    Join Date
    Jan 2006

    Re: HOWTO: Compile VICE in Dapper and Edgy

    how to start with gnome-ui??

  10. #10

    Re: HOWTO: Compile VICE in Dapper and Edgy

    Quote Originally Posted by sphere02 View Post
    how to start with gnome-ui??
    You might have to compile it with the gnomeui option to start up with that UI.

    I tried it with the --with-xaw3d UI option, and it's kind of clunky when compared to the standard libxaw7-dev interface. You need the xaw3dg-dev package for that, if you want to try it -- not the libxaw7-dev one.
    Ubuntu user #7247 :: Linux user #409907

Page 1 of 13 12311 ... LastLast


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts