Thursday, November 23, 2017

The Pi Lizard's 64 images

I have created a couple of Commodore 64 .img files for the Raspberry Pi 3 which use the VICE emulator to turn the Pi into a C64.

The .img files are identical except one has a familiar looking please wait message when the pi boots up and shuts down, the other simply has a blank screen during these times.

I am putting these files up for download, hoping they will provide enjoyment to other C64 fans.

c64 bootsplash by Pi Lizard.img

c64 silent boot by Pi Lizard.img

Features include:

1- Nice illusion of a real c64. No Raspbian messages flying by during boot-up and shutdown. You just go straight into the vice emulation and when you exit, the pi shuts itself off. Everything you see is c64 fonts and colors, including the bootsplash version. Linux is invisible beneath. Feels like a "modern" C64.

2- Wifi networking is enabled. You can use your favorite term software to log on to a variety of real c64 BBS services, just like the good old days, only through telnet addresses over the internet, rather than the phone line.

3- The screen resolution has been adjusted with care. I use native c64 resolution for the underlying linux operating system as well as the emulator. The result is a clean looking, non-pixelated, non-blocky looking video output. This result is a very natural, easy on the eyes, convincing crisp but not too crisp display.

I hooked up my real c64c to color compare on a video monitor next to my Pi on a 22" 1080p sabre wide flat screen and found I actually preferred the Pi display as it appeared very clean while keeping a native feel. Especially nice for flat screen computer monitors 22" and smaller, but larger screens I have tried it on including a 48" 1080p television and a 55" 4k television look great as well. Try it and see for yourself.

How to use the files-

To burn the .img files to microsd, I can recommend a couple of easy to use programs.

On Windows, I prefer Win32 Disk Imager

https://sourceforge.net/projects/win32diskimager/

On Linux, I prefer Suse studio imagewriter (search engine for installation for your distro. I use antergos/arch and in the repos it is just called "imagewriter"- yaourt imagewriter should do the trick).

On Linux, you can use gparted to expand the filesystem if you have a microsd card larger than mine (mine is only 2gb but still lots of room left over for c64 software). Sorry, I am not a windows person so I don't know how to expand the file system in windows, but if you have a solution, let me know and I'll share it here.

Once burned, open your file manager and go into the card.

1- copy c64 games and software into the /software folder.

2- open /etc/wpa_supplicant/wpa_supplicant.conf in a text editor and enter your wifi name and password in the appropriate locations between the parenthesis.

3- If you are using a setup like mine with an old free to super cheap vga monitor (craigslist in my area often has old dell "square" shaped flatscreen for free to $10) and an hdmi to vga adapter (have seen similar to mine at walmart for $6) and analogue speakers plugged into the Pi's audio jack,  go to the boot partition on the card, rename config.txt to something like hdmiconfig.txt in case you want it later, and rename vgaconfig.txt to config.txt. I have a couple of tweaks in the vgaconfig.txt that I found that optimize things for the adaptor and analogue audio. I prefer this setup as the more square screen fits the image of the c64 without the side bars, making things feel more natural and native. It will still look good on a standard hdmi widescreen though.


That's it. 2 or 3 simple steps and you are on your way. More time and work to describe than to do.

Now safely remove the microsd from the computer, insert into the raspberry pi, plug in the screen, a usb joystick and keyboard and turn things on.

A few random notes to make the most of it-

.5- F12 gets you into the conguration screen in the emulation. Thanks VICE team for making this screen feel native as well.

1- If you mess up the config for VICE, I have a backup copy of mine in the home folder you can load in. To start fresh, just load that config file, and then save config.

2- If you want to change the boot splash, the image location is /opt/splash.png. The one that is there is just the result of turning the screen black on the c64 with a couple of pokes, clearing the text, and typing "please wait ..." turning the cursor black, f12, and take a snapshot of the screen, saving it to that location. I think something like that within the emulation is best if you want to keep things looking and feeling native.

3- You can get usb atari style joysticks that look and feel like the real thing (? I'm not a purist, but they do to me) off of amazon.com or ebay. I got the blue glowing kind. Don't think I'd do that again- the light is distracting in the evenings sometimes.

4- I set my config file up so keys are positional on the keyboard. In other words, if your fingers still remember how to dance to

load"*",8,1

on the native c64, they will find the correct places on the keyboard here as well. To help find things, I searched "commodore keyboard stickers" on ebay  and amazon. For about $3 you can do what I did and cover your pc keyboard so you can find all the things you want to find on the c64. Here is a nice pic with the layout whether you have the stickers or not: http://www.waitingforfriday.com/wp-content/uploads/2017/01/C64Keyboard_VICE_KB.png . The image is from this very interesting project page : http://www.waitingforfriday.com/?p=470 .

5- For BBSing, so far I really enjoy Strike Term 2014 final. You can grab it here: http://csdb.dk/release/?id=130807 . You can also use this to play MUDs (multi-user dungeons) on telnet.  An active BBS list for the c64 can be found here: http://cbbsoutpost.servebbs.com/ .

6- https://www.commodoreserver.com/ Commodore Server. To use, press F12 - machine settings - rs232 settings -userport rs232 host device 3 then esc and do a hard reset before loading the software. Change the setting back to device 4 to use terminal programs again.

Thank you for giving my img files a try.

Special thanks to the VICE team for their emulator used on my .img files and to retropie whose install script I used to install VICE.

Although a couple of ideas on these images are my own, most of my contribution to these has just been bringing a lot of other people's ideas and work into one place. Unfortunately, it took me months of lucky searching to eventually combine these ideas with an idea of my own, and over time I lost track of where the outside ideas came from. The splash screen script also. If you recognize your contribution, let me know and I'll give you full credit.

Meanwhile, I just want to say thanks to the c64 community in general for their efforts which have made life more fun and interesting because of the c64 staying alive in one form or another for all of these years.

The images I have come up with have a nice feel, and for my use are a great substitute for the real c64.

But these can surely be improved. I would love it if you could help me improve it.

In particular, off the top of my head I think it would be great if we could get printer emulation working so it could print on a modern printer, and if the base directory within the emulation could be changed from / to a specific folder for the c64 software.

Tcpser interaction needs to be improved. I have had very bad luck downloading files from a BBS, although everything else on a BBS works great. As far as I am concerned, this problem makes VICE a broken app and this really should have been fixed a long time ago. A hint might be found here: http://roxburysoftware.com/Blog/color64-bbs-in-vice-2-4/ and here: http://roxburysoftware.com/Blog/wp-content/uploads/2014/03/rsuser.c but I am not a competent programmer so I am not sure. But if you are, maybe you could take a look and see if something can be figured out.

Maybe you have other ways to improve things. I would love it if these images became a collaborative effort and improved over time. I have tried to get others involved in the past but have heard crickets thus far. And yet, it seemed a "native" feeling emulation for the Pi that booted without linux showing it's face seems to be a recurring request on various forums, and I couldn't find one that was "plug and play" anywhere else online, so when I made these for myself, I decided to share them here.

Let me know what you think about these images.

Enjoy!