I recently was able to acquire a nice piece of my childhood, namely a 1983 "breadbox" Commodore 64. I used to have one as a kid. It was the very first computer I ever touched, and was basically responsible for getting me into the IT field and programming in the first place. Then my Mom gave it and all our games away to a friend while we were at summer camp, thinking we wouldn't mind since by then we were all up into Super Nintendo and such. Having the highest number of sales (and a 40% market share) of any single model home computer of all time you would think they would be a piece of cake to find. They seem to always be kicking around EBay, but the last one I bid on ended up going for WAY over what I was willing to spend. I think it was around $350 for the main unit and a tape drive, no cables. Ouch.

Last week, I got lucky. An internet forum acquaintance had a VIC-1541 disk drive kicking around in his attic. He offered it up if I was interested, so I had it shipped. I then started poking around EBay again, and ended up winning this unit for just over $12, condition unknown. There seem to be a lot of "parts" C64s on the market, so I wasn't expecting much. Boy did I get lucky. A few more good bids later, and I'm in business.

First thing first: I needed a power supply. The C64 uses a 7-pin DIN connector to provide both +5VDC and 9VAC to the mainboard. I guess the original power supplies were notorious for the regulators burning out, and taking chips with them. Since this fact troubled me (and was basically moot since I had no cables), I looked up the pinout and built my own. A trip to Fry's netted an 8-pin DIN for about $0.59, and the center pin was easily removed with a bit of violence. I had plenty of decently beefy 5VDC wall warts lying around, and DigiKey had a 9VAC one for about $7 after shipping. A bit of heat shrink and some soldering, and I was ready to test the unit out. To connect to the one TV I had with a standard antenna A/V connection, I used the same setup I usually run my Nintendo on. Cross fingers, throw switch.

'Tis the perfect amount of bytes. This means the RAM is most likely still good, so yay on that front!

Trying the keyboard out, I noted many of the keys didn't work most of the time, and when they did there was terrible debounce. So in I want with the screwdriver to see what I could do! I met with a dire warning from beyond time:

Oh man, there goes my 30 year old warranty...

They keyboard is just a bunch of simple conductive pads, similar to a TV remote. A bit of a scrub with a pencil eraser and some alcohol and they shined right up.

Popping the unit back together, I gave it a go with some quick BASIC commands. Flawless!

Next I was dying to test out the SID, Commodores legendary audio chip. These things are crazy hard to find these days. Folks use them in synths and other audio devices, and the demo scene is still going after all these years. Unfortunately, they burn out rather easily. Since there's no real way to make more of these babys every burned out chip is another chip less to go 'round. I found a nice 1 line BASIC audio demo and typed it in. Nothing. Damnit. Luck for me a batch of 10 happened to be found on a warehouse shelf, never before placed into any unit, and tested by the seller. I picked up two.

While I wait for a replacement SID, I decided to clean up the entire unit (full of dust bunnies) and see what I could do to extend the life of the other chips.

So far all I have done was verify voltages with a multimeter, re-check the SID output with a scope just in case it was my TV or something, and added some old heat sinks I had lying around to try to keep this old stuff cooler.

I plan to salvage or fabricate a few more heatsinks for the ROM, RAM, and kernal chips. I would like to make an s-video cable to clear up that picture a bit. I have also begun to work on an Arduino/Rasperry Pi solution to emulate the 1541 disk drive I have, but allow me to read in images off USB or an SD card. More on that to come. Right now I am pretty stoked to be at this point.

I've been playing around with a few tiling window manager options in the last few months to help my workflow on my development laptop. Out of the few I tried, I've gravitated back to the simplicity of configuration in the AwesomeWM. I'm still not convinced I have the most efficient use of workspaces and tiling set up just yet, but I'm getting there. With the baby happily toddling around taking up a majority of my home time these days (has it been that long? Jeebus...) I don't spend nearly as much time hacking on any projects as I used to, but i guess that's the beauty of being able to hop into a config file and poke around when I have a few minutes here and there.

My first iteration was a sort of Deus Ex inspired gold on black thing, but leaning toward readability of very small fonts. It worked out OK, and I may utilize aspects in the future, especially my Conky config.

I'm currently using a TRON inspired blue on black layout, with the gold conky config from earlier. It's working out well so far if I do say so myself. Vim is still just the Mustang theme from deviantArt.

Having 4 seperate workspace configurations available to switch between with a simple two key shortcut to switch to any of them is great. I can use nothing but the command line 99% of the time to access anything I ever need, and almost never touch my trackpad these days. It's quite lovely.

I'm close. So close. Last night I managed to get functional code working. He could roll around the arena, turn around if he hit the line around the edge, and charge if he saw a target. Phase 1 complete.

The bot was still pretty dumb at that point though. There was a noticeable lag in reaction time when he needed to turn from the edge, and that sometimes led to partial out of bounds. Not good. Also, it only sensed objects directly ahead.

So today, I refined the existing code. I have the old stuff to fall back on, so I almost started with a total re-design. The sonar sensor was mounted lower on the servo, since I expect my opponents to be a bit shorter then me. I also have it sweeping around successfully, and steering the bot in the general direction of a detection, solving (kind of) the "tunnel vision" issue.

When I tested the newest code out tonight, I realized another issue. If an object (target!) was within an inch or two of the sonar, such as when in a charge, it could loose track of them, and the bot would turn away to look again. So I did what I swore I wouldn't do until after the competition: I added MORE SENSORS!

The large plate I was planning to use as a pusher/armor in the front still hadn't been mounted. I have decided I'm going to add a pair of small pushbuttons behind the plate, and if either is pressed, the bot will forgo all other activities, and push as fast as it can straight ahead until it sees the line or the button is released. I tested this with a crappy bench rig, and wrote some code. I think it'll work pretty well. The plate also provides the advantage of keeping the optical sensors in a consistent light. That should help keep the readings steadier in varying conditions this weekend.

He looks angry. Probably because I'm rushing so much of this build. Although I have to say, I'm pretty proud of myself so far. I'm not normally this productive in this short a time. I guess it's good to have a goal.

Got the Ping))) finished and working tonight. It turns out that back in the day when I received this Dorkboard, I had powered it up with a straight 9V battery like an idiot, because I was used to these kinds of boards having some kind of regulation built on them. Since the Dorkboard takes the minimalist approach to microcontroller design, it does not, in fact, include this feature. I noticed what I had done when I touched the top of the chip, and nearly lost my fingerprints. Whoops.

Well, back to my point here. It turns out that I have at least one bad digital pin on this chip now. I know this because I fought for almost an hour like an idiot trying to figure out why the Ping wouldn't ping. I hope that's the only issue I have...

I also got the optical sensors wired and mounted tonight. They seem to work alright as long as I incorporate some input smoothing across the readings. If I don't, they seem to pick up every little piece of dust and crap on the bench. I'll try them out with some black and white paint lines later this week.

So now, it's pretty much up to coding. Which sucks, because that happens to be my weakest area right now. Nothing like crunch time for inspiration!

Dozer has become more like a bot then most of my previous projects. I actually managed to fix several issues I've always had with some of my tools and materials, and that's really helped. So the chain of design now is mainly: SketchUp + table saw + scroll saw + 800 trips to Lowe's for screws = bot.

I decided since the competition limited the bot size to a rough 6" x 6" square, I'd want to maximize my entry to take advantage of as much pushing surface as I could manage. I ended up with a 6" circle, with the tires silightly inset to help fit. I ended up around 6 1/4" across. Not to shabby for roughing much of it with hot glue and some bolts.

I'm still working on the sensor code, but I do have much of the physical issues under control. Here's a few progress pics and a short video of the lil' guy running around my carpets on a random pattern. Mostly 'cause he's blind at that point.

Update: Turns out that Facebook strips YouTube videos out of blogs it imports for some reason. If you're looking at this from there, and want to see the vid, head on over to www.hometownhacker.com and get the REAL stories!