C64 emulator


99 posts   Page 1 of 4   1, 2, 3, 4
by Frank Buss » Wed Apr 04, 2012 5:03 pm
I've created a page in the wiki how to install and run the C64 emulator VICE on the RPi:

http://elinux.org/RPi_VICE_C64_Emulator

Tested in the VM, would be cool if someone with the real hardware could test it.
User avatar
Posts: 92
Joined: Fri Jan 06, 2012 4:39 pm
by gerkenz » Wed Apr 18, 2012 7:07 am
Hi,

thanks! Helped me to get it started on my RPi with neu debian "squeeze" image.

Raspberry Pi C64 Vice

just little changes to your wiki needed:

- most commands have to be executed with "sudo"

- edit of /etc/apt/sources.list could be done with: "sudo pico /etc/apt/sources.list" a nice   little editor ( installed already )

- for d64 images you need to copy all "DEVICES" from "vice-1.5-roms/data/", too.

Sound and Competition Pro doesn't work so far...but that should be no problem I hope. :-)
Posts: 10
Joined: Wed Apr 18, 2012 5:29 am
by TonyD » Thu Apr 19, 2012 12:29 pm
Thanks for the tips.

We got Vice working on our RPi and we even managed a face-off with a real C64 :-)

Pictures coming soon…
Tony
User avatar
Posts: 343
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
by lb » Thu Apr 19, 2012 12:52 pm
Does Vice actually run usably, i.e. with true drive emulation and ReSID enabled? I doubt that.
Posts: 193
Joined: Sat Jan 28, 2012 8:07 pm
by gerkenz » Fri Apr 20, 2012 8:38 am
I'll test it these days. for now it runs in double sized window with 50fps without game running. :-)
Posts: 10
Joined: Wed Apr 18, 2012 5:29 am
by TonyD » Fri Apr 20, 2012 1:32 pm
TonyD said:

We got Vice working on our RPi and we even managed a face-off with a real C64 :-)


Pictures here:

http://zuzebox.wordpress.com/2.....-face-off/
Tony
User avatar
Posts: 343
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
by Helpme1986 » Fri Apr 20, 2012 1:55 pm
Added to Tutorial list for now (http://elinux.org/RPi_Tutorial.....rials_List) Though this will probably get reorganised as more and more software install guides come along.

Looking forward to trying this one! thanks for the share
Posts: 121
Joined: Tue Jan 03, 2012 3:48 pm
by Helpme1986 » Sun Apr 22, 2012 2:14 pm
NOOB question, it doesnt reconise sb2 as a command, do I need to install Scratchbox2 first, if so how? (ill then update the wiki once ive figured it out)

Debian Squeeeze 19/4/12
Posts: 121
Joined: Tue Jan 03, 2012 3:48 pm
by gerkenz » Sun Apr 22, 2012 2:24 pm
on RPi you don"t have to enter the first command of the tutorial. :-)
Posts: 10
Joined: Wed Apr 18, 2012 5:29 am
by Helpme1986 » Sun Apr 22, 2012 5:28 pm
Thanks, had issues with amending the line using VIM as it doesnt say how to edit the file (press i, edit the line, press escape then :wp)

Other than that works a treat and got it running no problem
Posts: 121
Joined: Tue Jan 03, 2012 3:48 pm
by gerkenz » Mon Apr 23, 2012 8:31 am
The new debian squeeze image has "Dom’s ALSA driver". Hope that fixes the sound for the emulator. I will try it these days. :-)

Does someone has a hint about STRETCHED fullscreen VICE on RPi?

I can't change the C64 screen to full HD resolution so far. VICE had a command line option "-stretched" but the actual version hasn't. :-(
Posts: 10
Joined: Wed Apr 18, 2012 5:29 am
by gerkenz » Tue Apr 24, 2012 6:39 am
With debian6-19-04-2012 and the modprobe command the sound is enabled, but every keybord or mouseclick will result in little audio cracks ( it's alpha and will hopefully be fixed soon. ;-) ).

But the emulator runs IK+ ( 80% up tp 105% C64-speed ) with 8-10 fps only! RPi CPU usage is 95%!

fps seems a litte to low, right?
Posts: 10
Joined: Wed Apr 18, 2012 5:29 am
by Frank Buss » Mon May 07, 2012 11:06 am
Feel free to change the Wiki, maybe better not to use VIM :-) I've got my Raspberry Pi now, too, you can avoid the audio cracks by changing the audio buffer size, Settings->Sound Settings->Sound Buffer size. 100 ms works good.

But maybe it is a problem with the firmware. I've used this script to update the Debian image to the latest firmware (with "rpi-update 192" )

https://github.com/Hexxeh/rpi-update

I don't know about the stretch mode, but you could change the native resolution of the Raspberry Pi by setting it to /boot/cmdline.txt, e.g.:

bcm2708_fb.fbwidth=800 bcm2708_fb.fbheight=600 dwc_otg.lpm_enable=0 console=tty
AMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

Then set Scale2x in VICE and you'll have a nice fullscreen C64.

For the audio I've added this lines to the /etc/rc.local script:

modprobe snd-bcm2835
amixer cset numid=3 1

The amixer call selects the audio jack, because I don't have audio on my HDMI display.
User avatar
Posts: 92
Joined: Fri Jan 06, 2012 4:39 pm
by carl_retrotext » Wed May 09, 2012 5:10 pm
Hi,Thanks with you help, I have started to fit my Pi to a C64

I have managed to get the joysticks working today too.

The screen stretch is a problem for me as VIC II controls make double size too big for my monitor!

What needs to happen to get the sound working?

Commodore Pi 64
User avatar
Posts: 78
Joined: Sun May 06, 2012 1:05 pm
Location: essex
by Frank Buss » Wed May 09, 2012 9:20 pm
Awesome, a Pi in a C64 case!

For sound you have to install ALSA:

apt-get install alsa

The on booting, activate the driver, e.g. automaticly in /etc/rc.local:

modprobe snd-bcm2835

And if you want to use the audio jack instead of HDMI as the sound output, add this line in rc.local:

amixer cset numid=3 1

In the #raspberrypi IRC channel someone wrote, that sound is possible with the 19-04 Debian image, but I've updated to the latest firmware, Linux kernel and drivers with https://github.com/Hexxeh/rpi-update and "rpi-update 192", because there were some bugfixes for ALSA.
User avatar
Posts: 92
Joined: Fri Jan 06, 2012 4:39 pm
by stevepdp » Thu May 10, 2012 11:32 am
Thanks for the tutorial Frank. Here"s mine running Dizzy DTR.
I'm not a part of the Raspberry Pi Foundation, I'm just an enthusiastic fan.
User avatar
Forum Moderator
Forum Moderator
Posts: 285
Joined: Fri Oct 28, 2011 7:41 am
Location: Norfolk, UK
by carl_retrotext » Tue Jul 17, 2012 2:55 pm
I have posted my emulator running in this post,

viewtopic.php?f=40&t=10352&p=116696&hilit=vic+314#p116696

I use a separate boot to get the overscan to fit a full screen properly, the sound is working well too, there is a link to the blog post and a video there too, but I must say thanks again to Frank Buss, who made this easy for me and others to set up on the PI.
User avatar
Posts: 78
Joined: Sun May 06, 2012 1:05 pm
Location: essex
by berry » Mon Jul 30, 2012 12:00 pm
I am also starting my C64π project... i just got the parts in, ready to dremel!

But first proof of concept.
Posts: 5
Joined: Fri Jul 20, 2012 4:08 pm
by pe7er » Fri Aug 03, 2012 4:20 pm
carl_retrotext wrote:Hi,Thanks with you help, I have started to fit my Pi to a C64

I was thinking about doing the same... Nice!

carl_retrotext wrote:I have managed to get the joysticks working today too.

How did you manage to get your joysticks working?

Is it possible to connect the old C64 joystick with an USB to Serial RS-232 DB9 Adapter like this?
db9-to-usb.jpg
db9-to-usb.jpg (31.72 KiB) Viewed 25935 times
Peter Martin
OS: Debian, Raspbian | Devices: Raspberry Pi, SheevaPlug
User avatar
Posts: 10
Joined: Wed Jun 20, 2012 9:39 am
Location: Nijmegen, Netherlands
by Frank Buss » Fri Aug 03, 2012 10:40 pm
pe7er wrote:Is it possible to connect the old C64 joystick with an USB to Serial RS-232 DB9 Adapter like this?


No, you can't use a serial to USB adapter. Carl used this one: http://www.vesalia.de/d_keyrah.htm But should be easy to patch VICE to use the GPIO pins, then you could solder just some wires to s subd connector.

Another idea is to use a joystick adapter for the USB port, which sends keyboard events for VICE, as I've done:

http://www.frank-buss.de/joystickadapter/

Should work on the Raspberry Pi, too.
User avatar
Posts: 92
Joined: Fri Jan 06, 2012 4:39 pm
by carl_retrotext » Sat Aug 04, 2012 1:10 pm
Frank is Correct, I used the Keyrah Interface, the joyports give inputs that can be mapped to the emulator.
http://retrotext.blogspot.co.uk/search/label/VIC%20314

There are only four pins, but it you are unsure you can use the Usb lead and loop it in to the side where the power would normally go.

PS, well done on the retro challenge, you kit looked immense. ;)
User avatar
Posts: 78
Joined: Sun May 06, 2012 1:05 pm
Location: essex
by eharvey » Fri Aug 10, 2012 2:36 am
Hi,

I just received my Raspberry Pi and I'm running raspbian wheezy. I adjusted the sources.list to include the following and was able to install vice from that repository:
Code: Select all
deb http://ftp.uk.debian.org/debian/ wheezy main contrib


With the exception of that adjustment, I followed the rest of the instructions listed here:
http://elinux.org/RPi_VICE_C64_Emulator

When I attempt to run 'x64', I'm getting
'Segmentation Fault'

Any ideas as to how I could resolve this?

Thanks!
Posts: 3
Joined: Fri Aug 10, 2012 2:22 am
by carl_retrotext » Sat Aug 11, 2012 5:01 pm
Thats interesting, I added the repositry from the Elinux site as I did previously, but now I too have debian flavour squeeze and it threw 404 errors at me.

Are you getting missing libs' as you run up x64?
User avatar
Posts: 78
Joined: Sun May 06, 2012 1:05 pm
Location: essex
by eharvey » Sun Aug 12, 2012 12:45 am
Hi retrotext. I'm using raspbian wheezy and did try the squeeze repository but that gave me similar 404 "not found" errors, I believe. I don't remember completely but I just figured it had to do with the differing distros. Either way, If I install using the repository updated to use 'wheezy', Vice installs fine but gives me the seg fault when launching x64. No other errors that I can tell. Where would I look for additional information?
Posts: 3
Joined: Fri Aug 10, 2012 2:22 am
by carl_retrotext » Sun Aug 12, 2012 8:45 am
I experienced similar problems doing it that way, I think its because some extra compiling is needed to get the packaged required to run it.

Frank Buss kindly assited me with an alternative way of installing this on Debian Wheezy though, he has permitted me to share it here.



Code: Select all
wget http://www.frank-buss.de/raspberrypi/vice_2.3.dfsg-4_armhf.deb
dpkg -i vice_2.3.dfsg-4_armhf.deb
wget http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/old/vice-1.5-roms.tar.gz
tar -xvzf vice-1.5-roms.tar.gz
cp -a vice-1.5-roms/data/* /usr/lib/vice/

startx
open a terminal and start "x64"

it will probably fail to run, but the comment in the error asks you to sudo get-apt -f update ( or similar ) do this then 'x64' again and it should run.

I have made some discoveries about the overscan too, for my non hd monitor with 5;3 aspect ratio I comment the framebuffer and give it width 765 and height 585,
then overscan Left 20 right 10 top 10 bottom 10
when you run x64 in fullscreen with no toolbar it gives me a full screen Vice.

hope this helps you out.
User avatar
Posts: 78
Joined: Sun May 06, 2012 1:05 pm
Location: essex