A Portable KIM-1

The KIM-1 was the first computer to use the 6502, a CPU that would later be found in the Apple, Ataris, Commodores, and the Nintendo Entertainment System. Being the first, the KIM-1 didn’t actually do a whole lot with only 1k of ROM and a bit more than 1k of RAM. This is great news for anyone with an Arduino; you can easily replicate an entire KIM-1, with a keypad and 7-segment display. That’s what [Scott] did, and he put it in an enclosure that would look right at home in a late 70s engineering lab.

The impetus for this build was [Scott]’s discovery of the KIM-Uno, a kit clone of the KIM-1 using an Arduino Pro Mini. The kit should arrive in a few weeks, so until then he decided to see if he could cobble one together with parts he had sitting around.

Inside a handheld industrial enclosure is an Arduino Uno, with a protoshield connecting the keypad and display. The display is an 11-digit, seven-segment display [Scott] picked up at a surplus shop, and the metal dome keypad came from a hamfest.

Getting the software working took a bit of work, but the most important parts are just modifications to the standard Arduino libraries.

Now that [Scott] has a KIM-1 replica, he can program this virtual 6502 one hex digit at a time, run Microchess, or use the entire thing as a programmable calculator.

26 thoughts on “A Portable KIM-1

      1. For future readers … not quite correct. You need 6532 RIOT chips, not 6522 VIAs.A lot of overlap between those two chips aside from the RAM/ROM, but the registers aren’t compatible.

      1. That would make sense if Address and Data busses were out of date.

        Morons use Arduinos for everything, even the simplest shit that could be done with a 555.
        I play with electronics to learn, all you’re learning with an arduino is their bastardised C.

        1. Morons? You don’t play well with others. Most people don’t care about address and data busses. They have a task they want to do and use the fastest/easiest solution.

          A prewired board is easier than wiring a PCB for your 555. A program is much easier to change than unsoldering a capacitor/resistor pair to change the timing on a 555.

          You can continue to do things the hard way. No one is stopping you. The people that just want to get a project finished will use Arduinos. You aren’t stopping them. You are just showing that you aren’t a very nice person.

    1. I couldn’t disagree more. Things like this are getting people (like myself) into learning these old architectures. (I’ve been a Z80 guy since the late 90s, this has been the tipping point to draw me into the world of 6502.) The obvious progression from here is to build my own 6502 or other single board computer… if i had infinite time and money, that’d be perfect. But I do not. I’ve spent more time in the past two weeks learning the KIM architecture, and really any 6502 stuff, than in the many years previous…

      This gets me (and ostensibly, others as well) excited about coding something so bare-metal in such a portable form factor that you can somewhat build yourself. Yes. I agree that it’s not the same as wiring all of the latches, the 24 lines for data and address busses, burning roms, spending weeks debugging the hardware because it’s the first handbuilt computer… and it obscures/obfuscates all of that, and I think that’s completely fine. If anything, this “quick success” will reinforce to hobbyists that this is a fun thing to do, without getting discouraged by hardware debugging failures and frustration.

      I can’t imagine that the availability of cheap arduinos has made people less interested in programming. In that respect, I think that Arduino is one of the best things out there for getting more developers and ideas into the world… not to mention that it’s brought down the prices of all of the other platforms. Gone are the days of the $90 SiLabs dev boards, $75 BASIC Stamp… here are the days of $25 multicore Propeller boards…

  1. I am sad… I freely admit it… first thing I did when I saw that was think to myself… that display is all wrong, too many digits.. Sadder still I was correct… http://en.wikipedia.org/wiki/File:Kim-1-computer.jpg … saddest of all… I might just build one.. just for old time’s sake… A 6502 emulator on a ‘duino sounds like a good way to waste an afternoon… beats the heck out of doing all the odd jobs round the house, obviously it might not increase the matrimonial harmony quite as much… or I could of course go for one of these little numbers instead… http://www.brielcomputers.com/wordpress/?cat=24

    What I really want is someone to donate me an old Commodore PET 32, but having that old tank sitting round the house might just be a step too far in the matrimonial stakes. I can get away with an original iMac gathering dust, ‘cos it looks nice, but the PET, you can bet, looks too ugly and takes up too much room. If I win the lottery (no chance ‘cos I dont do it), I would probably have rooms full of obscure hardware, in the same way that some people collect old cars. As I said… I’m sad and I freely admit it.

    1. I have a Kim-1 but what I like about this one and the one that inspired it (http://obsolescence.wix.com/obsolescence#!kim-uno-summary/c1uuh) is that it is more convenient to play with than the original. If you want to relive the old days of writing 6502 machine language, you just turn it on, goto 0200 and start writing code. If you want to write ASM, there’s a built in editor and you can connect to a computer with Putty or Teraterm via USB. The Kim UNO even has an I/O port to if you want to mess around with hardware. The 9v battery should last a good long time.

    2. The great thing about this version is that you can throw it together pretty darn quickly and cheaply. the kit is $10 in parts, or really you could scrounge to use things you may already have, like I did. Sure, you could get an authentic board, going rate about $500 nowadays, or you could build one using proper parts, 6502, IO chips, roms, etc and spend the next month wiring it all up…

      There’s nothing saying you can’t do the cheap/quick version (like i did) and then progress to one of the others in the future as well… (or do what I’m doing, and stick with this because $$$ and time are scarce commodities for me, and it’s good enough to have some fun with. ;)

  2. Hi all. Sorry to chime in here on this a week after the post. I missed the post when it was new…

    I have to give complete credit to Oscar Vermeulen. Kim-Uno is his project at heart. I just did a “quick and dirty” implementation of it all while I wait to receive his kit. I’ve been a Z80 guy ever since the late 90s, and this has completely sucked me in to wanting to work on 6502 projects… and THAT is exactly what this work-in-progress project is about.

    Yes, the display is all wrong. I don’t care. It’s what I had around, and I didn’t feel like hand-wiring 6 seven segment displays when this was all ready to use. (I only use seven of the 11 digits in it.) (If I could have my way, I’d throw 1″ tall digits on there) And for that matter, the keypad is all wrong too. It’s what I had on my workbench.

    Yes, more powerful micros are capable of emulating the system with more ram, or with a full external ram/rom databus. That’s not what this project is about. I love the idea of emulating a (almost full) computer on a cheap little avr… and the thought of expanding the host via I2C appeals to me. It’s been years since I touched I2C (back on the SiLabs parts)

    Yes, it’s *yet another Arduino*. You know what, I don’t care either. I have them, they’re trivial to get going. Sure, I could lay out a board, or just hand wire one, with a socketed AVR or whatever on there, but as mentioned earlier, that’s not what this project was about. Remember… “hack” not “sellable consumer device”.

    Many of you here seem to think that because a project makes it to HAD, that it’s complete, and the ultimate idealized version of a project, and for the most part that’s simply not true. This was a quick hack I threw together in a couple nights. Can I do it better? of course. Are there better ways to do it? Definitely. Are there better micros for the project? completely. But I went from “Oh, this project looks neat” to “I’m ordering a kit” to “I have my own hacked version in my hand” in about two days. There’s a lot to be said about that.

    I have forked his code on github (like you do) and am working on making some changes for my own use. (I’ve discussed it with Oscar, and he was totally cool about it). I’m removing the calculator, and the floating point library, making the serial simulation mode more user friendly, and making it much easier to add/remove/reconfigure ROMs with the device.

    If any of this piques your interest, I completely recommend checking out Oscar’s project, KIM-1 and 6502 stuff.

  3. I normally avoid the comment section because of the acid spread by trolls. But I got to chime in with Bluellama here. Like we discussed in a couple of emails amongst ourselves, the whole idea was to tinker with this approach. Or rather, tinker with the very cool 6502 emulator from Mike Chambers, which only needs a couple hundred bytes. And see where it leads.

    Like bluellama shows, turns out you can morph the KIM Uno code to hook up some things from the bottom of the parts box – a common cathode calculator display and a differently wired keyboard. Change the code and get it working in a couple of hours. That’s the fun of the emulation-in-an-microcontroller approach.

    Sure you can build a KIM-1 clone using authentic vintage NMOS, it’s nice and has been done very very well by Vince Briel. Just not for the price of $1.97 (which is what Arduinos go for these days) and a couple of bits you find at the bottom of your parts box.

    Oh – and the “meh, Arduino” type of response: the Arduino is just a microcontroller. Like the many others, just commonly available – which doesn’t make it worse. Maybe some people feel better when it’s called atMega328P. Even then, sure, there’s better MCUs. So what. It does the job perfectly here. Doing this on some ARM MCU would actually be boring, like using a shotgun to swat a fly.

    Oscar.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.