Monday, March 20, 2017

Building a batch of RetroVGA scanlines generators


While anxiously waiting to get my hands on the recently acquired "real" Commodore 64 before it finally finds its way over to me to Tokyo, I was forced to still make due with emulation. For that I've slapped RetroPie on my aging Raspberry Pi 1 Model B and filled up the SD card with the latest GameBase64 collection which included all the classics I grew up with.

This certainly got me my game fix, but one thing glaringly missing from this retro experience were the distinct scanlines a proper CRT with PAL resolution would display. The games just wouldn't look the same as I remembered.

If you've got some time to spare, read thru this now classic blog post here: Scanlines Demystified

Now, the RetroPie distro comes with all kinds of shaders that try to emulate the picture a real CRT screen would put out and I've played with all of them but the outcome was never good enough. Also, it certainly didn't help that this kind of emulation is very CPU heavy and almost brought my trusty old RPi to its knees every time I turned any of these effects on.

Scouring the interwebs further for a better solution I came across Bruno's excellent blog post: RetroVGA Scanlines Generator. Here he describes a device that does exactly what I want, in hardware, with some cheap TTL logic chips. And he generously released the schematics under the Creative Commons license to boot!

So I downloaded his files and fetched myself a free copy of Autodesk's PCB design software Eagle to view the files, make whatever necessary adjustment and then export the gerber files that PCB manufacturers normally need in order to produce your boards.

To get my boards made a buddy from back home pointed me to DirtyPCBs.com, a very easy to use, cheap, no-nonsense online store that doesn't even require you to export gerber files and directly accepts the Eagle .brd file for uploading. Minimum order is 10 boards and the total with postage to Japan came to $23, not bad at all. Production and shipping was said to take 1-8 weeks but in reality the package arrived after 2 weeks, well within my patience limit :)

This gave me time to also source the rest of the necessary components from AliExpress. Took me quite a while to find the correct parts, so I've created a wishlist to bookmark them. Have at it if you want to build your own device.

Once everything arrived it was time to break out the soldering iron and get cracking:
 


The results where fantastic, scanlines like I remembered them! The 3 potentiometers let you regulate the intensity for each color channel (red, green & blue) and there are toggle switches to turn the scanlines off altogether, to switch from narrow to wide scanlines (draw double scanlines), to flip between drawing them on either even or odd lines and to invert the VSYNC signal, which I never needed to use but Bruno explains that this might be necessary for resolutions other than 640x480@60Hz.


What a happy little project... got me back into using my soldering skills and let me build something that's actually going to be useful.
Of course I won't need all 10 boards, so I ended up keeping 2 for myself. On one I fit on a male VGA plug on the input side so could plug it directly into any VGA graphics card and skip having to plug in an extra cable on this side, but it had to be mounted on the underside of the board for the pins to align. 2 or 3 I gave to buddies of mine who I know are into retro gaming and would appreciate it. And the rest of them I put up on eBay to recuperate some of the expenses.

I threw in free shipping world wide, so I didn't really make any money off of it, but I made some good friends in Australia, German, Finland, etc... seems everyone was happy with this little device and what it can do.


Tuesday, March 7, 2017

Proud new owner of a Breadbin C64 for the first time

The original C64, lovingly referred to as breadbin due to its shape, has always held a special place in my heart. Although I grew up with a C128, I really wanted to own a C64 just for the colorway and shape of the chassis alone. There's something so distinct 80s about it. But also for the older 6851 SID chip, which in my eyes always sounded better.

After months of browsing eBay hoping to get a lucky break and  finding a working C64 for a price I could actually agree with, I had to realize that that won't be a viable option to get my hands on some real Commodore hardware again. Most listings were for "untested" unit, speak broken ones. And the recent retro explosion sure didn't help with the prices either.

Additionally, shipping cost to Japan would normally make even the cheap finds an unfeasible option and most listings where from the states, meaning for NTSC machines. To avoid compatibility issues I really wanted to find a PAL machine like I was used to from my childhood, though.

So, new plan then. Over to Ricardo.ch, the Swiss auction website where people generally go pick up their winnings in person. This would give me some peace of mind, plus I'd avoid the shipping cost... if I can convince my dad back home to actually go pick up the machine I'd bet on and hopefully win.

Sure enough I came across a great listing including a breadbin C64, tested working even, a 1541-II floppy drive, a Quickshot II Turbo and a Quickjoy III joystick, a Final Cartridge III, manuals and a box full of floppies for 180 bucks swiss... not cheap, but in my eyes a great deal no less.

So I've put my bid in, kept my fingers crossed for like 3 days until the auction ran out that nobody would overbid me and sure enough I was the only guy interested in it. And now I'm the proud new owner of a working breadbin Commodore 64 for the first time in my life!