welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

VICE - A ‘Beginners Guide’ to Compiling and Using

Wed Feb 12, 2014 8:09 pm

THE COMMODORE 64 (A.K.A C64) A BRIEF HISTORY
The biggest selling Personal Computer of all time (22 Million Units) and along with Atari’s Pac-Man/E.T (VCS/2600) debatably responsible for the 1983 Video Game Crash in the US.
After the success of the inexpensive but underpowered VIC-20* (the first Computer to sell 1 Million Units), Commodore looked to compete with market leaders, the Atari 800 and Apple II.
Released in the US in 1982 at an unprecedented $595 (£395 UK), the Atari 800 was $300 more expensive and the Apple II double the price, with the C64 arguably more powerful than either due to its custom VIC-II GPU (MOS 6567), SID SPU (MOS 6581**) and a ‘Massive’ 64K of RAM*** (Most Personal Computers at the time shipped with only 16K).
Aggressively marketed under the company mantra “Computers for the Masses, not the Classes”, within a matter of months the price was precipitously reduced to $299, confounding many of the existing, established computer manufactures. Texas Instruments (TI-99/4A) left the market completely with others cutting the price of their Hardware in a forlorn effort to compete, often selling at below production cost, which was obviously unsustainable and a contributing factor to the Video Game Crash.
Party, this was possible due to Commodore’s legendary founder and CEO Jack Tramiel’s questionable business practices e.g. ordering huge quantities of components from suppliers, not paying for them, then buying the company when it was forced into bankruptcy, but mostly due to the astute purchase of MOS Technology in 1976.
MOS Technology manufactured (amongst other IC’s) the 6502 Microprocessor, which along with its derivatives were at the heart of many Personal Computers (and Consoles) at this time including the C64 (MOS 6510), Atari 800 (MOS 6502B) and Apple II (MOS 6502). This permitted Commodore to use the business model of ‘Vertical Integration’ i.e. effectively acquire ring the Chips ‘At Cost’ whereas its competitors paid market rate for MOS purchased components.
Unlike the Atari 800 and Apple II the Commodore 64 was also a hugely successful in the UK and Europe in addition to the US, it was finally discontinued in 1994 giving the machine an incredible 12 year lifespan.

* The VIC-20’s advertising campaign was fronted by none other than Captain James T Kirk himself!
Link - http://www.youtube.com/watch?v=kVOTi6PPKyg

** The SID Chip is still used today in a Synthesizer, the Elektron SidStation. Acts that use the device include: Daft Punk, The Prodigy, Timberland, Depeche Mode, Linkin Park and 8 Bit Weapon.

*** I recall reading a review of the C64 in Personal Computer World where it was remarked ‘Who on earth needs 64K of RAM!?’. How times change...

EMULATION
I have noticed here on the Forum although most of the SD Card Images include C64 emulation (generally employing VICE) there is currently no ‘Stand Alone’ solution.
Having previously used AdvanceMESS to emulate the C64 (and posting a Guide - http://www.raspberrypi.org/phpBB3/viewt ... 78&t=23113) I have recently converted to VICE which has the advantage of being able to ‘Auto Boot’ Games Images, load Tape Images (AdvMESS doesn’t) as well as Floppy Disc’s and has generally improved Image compatibility.
The latest revision of VICE uses an SDL rendered GUI, the previous one was GTK making it unusable in Console and laborious to use via Command Line for the uninitiated/inexperienced.

VICE
The current version of VICE emulates the entire range of Commodore’s 8Bit computers, C64, C64DTV, C128, VIC20, almost all PET models, PLUS4 and CBM-II (aka C610).
Home Page - http://vice-emu.sourceforge.net/
Source Code - vice-2.4
Download Link - http://sourceforge.net/projects/vice-em ... z/download
Operating System - Raspbian Wheezy (If using NOOBS see post from necromancyr below)
Dependencies - sdl1.2-dev
Over Clock - As with all emulators it is advisable to run your Raspberry Pi at the highest overclock setting that is stable on your system
Additional Files Required - Game Images (uncompressed)
Console or XWindows? - Either (Full Screen/Full Speed in Console at 'Medium' 900MHz O/C)

Turn your Raspberry Pi on and from Console
Type: startx (to open X Windows)
Download the Source Code, open the File Manager and put it in the /home/pi Directory and extract it (uncompress) by right clicking on your mouse and select ‘extract here’
Make an appropriately named folder (I called mine C64 Images) and put any Game Images you have in it and uncompress them
NB - If you are using a fresh Raspbian Image you must update the package list first
Open a Terminal
Then Type: sudo apt-get update
Now you are going to need the Dependencies to build it
Type: sudo apt-get install libsdl1.2-dev
Once completed
CD (Change Directory) into the VICE folder
Type: cd vice-2.4
Then Type: ./configure --enable-sdlui --without-pulse (enables the SDL GUI and disables Pulse Audio)
When completed
Type: make
It will take approximately 60 minutes to compile the Source Code (depending on your 'Overclock' setting)
When completed
Type: sudo make install
Congratulations, you have now configured, compiled and installed the emulator!
To run the VICE C64 Binary
Type: x64 -sdlbitdepth 8 (enables 8 bit colour depth, once your settings are saved x64 is sufficient)

MENU
Pressing F12 opens the GUI: Load Images (navigate to your Images folder and select one), Sound Settings, Graphics Settings, Joystick/Keyboard Control Settings, PAL/NTSC Output (set to PAL by default) and many other Options.

NB: The default Sound Drivers in VICE are SDL, although functional, performance is greatly enhanced by changing to native ALSA
Select - Sound Settings> Output Driver > ALSA

OTHER COMMODORE HARDWARE
The instructions above install the Full Suite of emulated machines (See VICE above), they can be run in the same manner e.g.
xvic -sdlbitdepth 8 (VIC-20)
x128 -sdlbitdepth 8 (C128)
e.t.c
See the Directory /usr/local/bin which contains all the Binary Executables

SOME PERSONAL C64 FAVOURITE/LANDMARK TITLES
Ballblazer: Lucasfilm Games second release, a One-on-One futuristic Sports Game. The accompanying music is algorithmically generated ‘On the Fly’, always changing, never repeating.
Beach-Head: Bruce Carver’s multi levelled War Actioner. While researching this article I discovered he had died in 2005. Bruce also programmed Leader Board, every Golf game since has in some way copied his innovative control/layout design, RIP.
Crazy Comets: Mad Planets clone programmed by Simon Nicol with music by legendary SID composer Rob Hubbard, covered by 8 Bit Weapon.
Link - http://www.youtube.com/watch?v=EOVf3eaqbYg
Dropzone: Archer MacLean's Defender Clone/Homage.
Encounter: Paul Woakes First Person 3-D Shooter.
Ghostbusters: Atari VCS/2600 programming luminary David Crane’s first C64 Title, one of the very few excellent Film Licences on ANY System. "Who you gonna call? Ghostbusters!"
Impossible Mission: Platform/Puzzle Game with ‘Rotoscoped’ animated character.
Mercenary - Escape From Targ: Paul Woakes’s seminal ‘Open Ended’ 3-D Space Adventure Game.
Pitstop II: Dennis Caswell and Stephen Landrum racing game, it was the first 3-D racer to implement a split-screen two player dynamic.
Rescue on Fractalus: Lucasfilm Games first release, a Space Rescue/Shooter. The fractal landscape code was written by Loren Carpenter, who also programmed the ‘Genesis Effect’ CGI sequence from Star Trek II - The Wrath of Khan.
Spy vs Spy: Nick Scarim’s innovative split-screen ‘Trap Em Up’ based on MAD Magazine's famous characters.
Uridium: Andrew Braybrook’s ‘Arcade Quality’ Shooter.
Last edited by welshy on Mon Feb 17, 2014 9:54 am, edited 10 times in total.
"The list of things I have heard now contains everything!"

necromancyr
Posts: 2
Joined: Thu Feb 13, 2014 10:50 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Thu Feb 13, 2014 10:53 pm

Nice guide!

I had some issues with this from a fresh NOOBS Raspbian install and found that doing the SDL setup detailed here ( http://www.raspberrypi.org/phpBB3/viewt ... 31&t=48859) first - from CLI without going into the GUI - solved the issue I was having when trying to install the SDL dev package.

welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Feb 14, 2014 9:13 am

necromancyr wrote:Nice guide!
Thank you and welcome to the Forum! I have just added a Binary (for those who don't wish to Build it themselves, but with a 'nudge' for them to attempt it!), which only contains the C64 Emulator. My thinking being that's the Hardware most users would want, because, lets be honest, who wants a Commodore PET Emulator? PLUS4 anyone? Anyone!? lol

Link - http://www.raspberrypi.org/forums/viewt ... 78&t=69420

As for NOOBS, personally I'm not a fan (as I don't believe its Model is correct for those wishing to learn computing), so haven't tested the instructions against the Image, but thanks for the heads up though, it may be the 'sudo apt-get update' (which updates the package list) was missed, if not, no doubt others will benefit from your observation/issue. Its nice to see users actually compile their own Binaries from my 'Guides', I notice the Binary Thread has been viewed almost as many times as this one in less than half the time! If you would like to try more there are quite a few listed in the Emulation on the Raspberry Pi Thread under SOURCE CODE - Compile Your Own Binaries.

Here - http://www.raspberrypi.org/forums/viewt ... 78&t=54357
"The list of things I have heard now contains everything!"

AmigaGamer
Posts: 90
Joined: Sat Feb 01, 2014 9:02 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Feb 13, 2015 12:14 pm

Latest development release 2015-02-02 2.4.16 is building fine on the raspberry pi 2.

http://sourceforge.net/projects/vice-em ... -releases/

im setting compiler flags in /home/pi/.bashrc as follows

Code: Select all

CFLAGS="-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -O2"
export CFLAGS

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 10:12 am

I have built Vice 2.4 with sdlgui (no other configure/make option used) on the rpi1 but I have a strange problem.
scrolling is not as smooth as it is with vice from the retropi images. I copied the settings and still, horizontal and vertical scrolling "flickers" somehow, if my screen moves.

does someone have any idea on how to solve this? did I miss some options?
any hints?

thanks!

welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 11:59 am

muelli
The standard VICE build uses SDL rendering, it does have a a tendency to 'Tear' (as you decribed) and is getting no assistance from the GPU. RetroPie uses the RetroArch version of VICE, it uses GLES rendering which doesn't (Tear that is), and is also receiving assistance from the GPU, ergo; smoother scrolling/no tearing. There may now be an option to build/change in the Options within VICE force/use GLES, I haven't checked in a while. Hope that answers you inquiry!
Last edited by welshy on Fri Dec 11, 2015 12:05 pm, edited 1 time in total.
"The list of things I have heard now contains everything!"

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 12:03 pm

Thanks!
That sounds as if I have to get the retroarch version and compile this. Any idea where to get it?
So far I could not find it....

welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 12:28 pm

Muelli
RetroArch and the requisite Cores (Emulators) are stored at GitHub

Link - https://github.com/libretro

Vanfanel has previously written a Tutorial

Here - viewtopic.php?f=78&t=56070&hilit=retroarch
"The list of things I have heard now contains everything!"

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 12:34 pm

Thanks, I got that far but could not find anything relating to vice or the x64 version used in RetroPi.
I found a recent info (03/2015) about libretro only being able to run C64 games via MESS:
http://libretro.com/forums/showthread.php?t=2188

So I think that excludes RetroArch and libretro from the problem. RetroPi clearly uses Vice, as one can see by pressing F12 and finding the Vice config menu during a game.
I inserted my RetroPi SD and copied the Vice binaries to the other SD card with the same result. Still tearing.
Both Vice versions seem to be the same and in fact using SDL, at least this is shown during startup auf x64.
There must be another secret....

welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 3:18 pm

muelli
To be honest I've not noticed any 'Tearing' in VICE even with SDL! I did write a 'Guide' for MESS, a link can be found at the Emulation Thread, it also runs well although I have yet to run it on the Pi2. Pehaps it's an issue with the Monitor your using? Did you also try the VICE Binary I posted? (Again, there's a Link in the Emulation Thread).

Link - viewtopic.php?f=78&t=54357
Last edited by welshy on Fri Dec 11, 2015 3:22 pm, edited 1 time in total.
"The list of things I have heard now contains everything!"

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Dec 11, 2015 3:20 pm

Hm, what should I say, it is there with the own compiled version + retropi version on a standard wheezy but NOT in the retripo image.
There must be something different there...
Right now I am compiling again with some modifications mentioned in
viewtopic.php?f=41&t=4581

edit:
after fiddling around with emulationstation I found out, that indeed the x64 version is the same on RetroPi, but somehow they call the binary x64 via/with support of dispmanx, which seems to be a low level GPU api.
So far I have not been able to find out, how these guys do this.
When I exit emualtionstation and start x64 manually, I get the same tearing problem.

welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Sat Dec 12, 2015 5:20 am

muelli
Mmm, I've not noticed any 'Tearing' even using SDL rendering, your correct in your assumption, dispmanx is an API that improves rendering so it sounds like you may be a Monitor issue. Usually it only effects input Lag, but does you TV/Monitor have a 'GAME' Mode? If so, that may help!

PS Did you try my Binary? Does it have the same 'Tearing' issue?
"The list of things I have heard now contains everything!"

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Sat Dec 12, 2015 10:34 am

>>Mmm, I've not noticed any 'Tearing' even using SDL rendering, your correct in your assumption, dispmanx is an API that improves rendering so it sounds like you may be a Monitor issue. Usually it only effects input Lag, but does you TV/Monitor have a 'GAME' Mode? If so, that may help!

dispmanx does change the way x64 is shown on the monitor. Per default I have an underscan on my plasma (ES, console, etc) but dispmanx resizes to the full screen despite all over-/underscan settings in bootconfig.
I am not aware of a game mode.....

>>PS Did you try my Binary? Does it have the same 'Tearing' issue?

Ooops, did somehow skip that info, will try asap! :)

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Sat Dec 12, 2015 5:16 pm

OK, tried your binary. Same problem.
With all tried binaries it does not matter if I use double size/scan or the tiny window, always the tearing effect.

welshy
Posts: 1660
Joined: Mon Oct 29, 2012 2:07 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Sun Dec 13, 2015 9:00 am

muelli
Sound like it COULD be a TV/Monitor issue and/or HDMI lead issue, do you have another device on which to connect your Pi? At least that would eliminate them being the problem!
"The list of things I have heard now contains everything!"

muelli
Posts: 56
Joined: Sat Jul 21, 2012 12:16 pm

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Sun Dec 13, 2015 3:49 pm

I replaced the plasma and HDMI cable with a HDMI->VGA adapter and my trusty 24" TFT.
Same result, still tearing. So display hardware can be ruled out I think.

edit: I replaced the complete chain (Raspberry, SD Card, Powersupply) with the devices from a friend, same result.
At his home he sees the same problems. So there is something wrong either with both our setups or Vice.

Until now I have not received an answer in the RetroPi forum on how they call x64 with dispmanx support.... :(

Gortek
Posts: 1
Joined: Fri Jan 15, 2016 11:19 am

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Fri Jan 15, 2016 11:30 am

Hi,

Just checking - have you tried setting the Pi video output to 50hz for the VICE emulator? I had horrible juddery scrolling on VICE until I changed that. Don't remember seeing any tearing though. Good luck!

Haemogoblin
Posts: 145
Joined: Mon Sep 24, 2012 12:13 pm
Location: United Kingdom
Contact: Website

Re: VICE - A ‘Beginners Guide’ to Compiling and Using

Tue May 17, 2016 1:51 pm

Hi there


Just downloaded the binary and tried it out. For some reason F12 is not bringing up the config screen when I press it.
Blackadder: Right Baldrick, let's try again, shall we? This is called adding. If I have two beans, and then I add two more, what do I have?
Baldrick: Some beans

Return to “Gaming”

Who is online

Users browsing this forum: rpiMike and 18 guests