Posts with «retrocomputing» label

Star Fox Comes To Arduboy

The original Star Fox for the SNES was a landmark game. With the Super FX chip built into the cartridge, it presented the first 3D accelerated home console experience. The series has spanned several consoles and over two decades. Now, it’s getting an (albeit unofficial) port to the Arduboy, thanks to [Stephane Hockenhull].

Impressively, the game fits in under 28KB, and [Stephane] hasn’t skimped on the development details. The process begun with setting up a basic 3D engine on the Arduboy, followed by some tests of various gameplay ideas. The final implementation bears a strong similarity to the original SNES gameplay. At this point, work moved out of the Arduino IDE into [Stephane]’s custom development environment to speed things along. A PC port was used to save time programming the flash every iteration.

The tricks used to pull this off are many and varied. There are neat hacks used to optimise the storage of the 3D model data, implement lightweight collision detection, and generate random levels. Everything was done in order to make the game fit into the smallest space possible.

Running smooth 3D graphics on a 16MHz 8-bit microcontroller is an impressive feat, and a testament to [Stephane]’s coding abilities. We can’t wait to see more 3D development on the platform. Meanwhile, if the Arduboy doesn’t quite have the look you want, there’s a solution for that too. Video after the break.

Core Memory Upgrade for Arduino

Linux programs, when they misbehave, produce core dumps. The reason they have that name is that magnetic core memory was the primary storage for computers back in the old days and many of us still refer to a computer’s main memory as “core.” If you ever wanted to have a computer with real core memory you can get a board that plugs into an Arduino and provides it with a 32-bit core storage. Of course, the Arduino can’t directly run programs out of the memory and as designer [Jussi Kilpeläinen] mentions, it is “hilariously impractical.” The board has been around a little while, but a recent video shined a spotlight on this retro design.

Impractical or not, there’s something charming about having real magnetic core memory on a modern CPU. The core plane isn’t as dense as the old commercial offerings that could fit 32 kilobits (not bytes) into only a cubic foot. We’ll leave the math about how much your 8-gigabyte laptop would have to grow to use core memory to you.

Honestly, this is purely a novelty, but we do miss core memory somewhat. It was inherently nonvolatile. You could turn the computer off, turn it back on, and everything was just how you left it. Sure, it was peculiar that reading a bit also destroyed it, but many of the old computers had the write after read cycle built into the CPU architecture so that it wasn’t a big deal.

If you want to look at how it was to repair a big core system, we looked at that earlier. Surprisingly, though, this isn’t the first Arduino core memory rig we’ve seen.

Using an Arduino to Re-Create a Computer’s Keyboard Decoder

[Max Breedon] found an old Apple IIe clone twenty years ago. He recently dug this Epson AP-200 out of the salvage heap and quickly discovered that the keyboard decoder chip was fried. The old chip was way too obscure to source a replacement — and soon this post will be the top Google result for the string, ‘C35224E’ — so he busted out his trusty UNO and created a replacement keyboard decoder.

Unlike the Apple II, where all the keyboard decoding happens on the keyboard, this clone used a dedicated chip on the main board. Although it’s a rare part that’s virtually ungoogleable, this chip’s architecture and pinout can be figured out by testing out every trace for continuity. After locating what looked like four data pins, he had the Arduino send signals onto the clone to see what characters popped up. That didn’t work, but it led him to idea that two of the wires were clock and data, and after a bit of experimenting figured out that the third pin was a latch enable of some sort that sent the character.

So, [Max] created an Arduino rig to do the same thing. The Arduino uses a shift register to interact with the keyboard’s 8×10 matrix, and the sketch translates any serial data it receives into the keypresses the clone is expecting. After prototyping with the UNO, [Max] hardwired an Arduino Nano (as well as the shift register) into a daughter board with pins extending into the old chip’s sockets. A permanent solution!

In addition to a weird keyboard controller that has been lost to the sands of time, this Apple IIe clone features a few more parts that are downright weird. There are two chips that are found in a few other Apple clones labeled STK 65301 and STK 65371, used as ASICs, MMUs, or a 20-IC expression of Wozzian brilliance condensed into custom silicon. There’s another weird chip in this clone, a 27c32 ROM loaded up with repetitive bits. There is no obvious 6502 code or strings in this ROM, so if anyone has an idea what this chip does, send [Max] a note.


Filed under: repair hacks

An Apple ][ emulator on an Arduino Uno

April Fools’ Day may have passed, but we really had to check the calendar on this hack. [Damian Peckett] has implemented an Apple ][, its 6502 processor, and a cassette port, all on an Arduino Uno. If that wasn’t enough, he also uses a PS/2 keyboard for input and outputs analog VGA. [Damian] is doing all this with very few additional components. A couple of resistors, a capacitor and some very clever hacking were all [Damian] needed to convince an Arduino Uno that it was an Apple.

Making all this work boiled down to a case of resource management. The original Apple ][ had 4KB of RAM and 8KB of ROM. The ATmega328 has only 2KB of RAM, but 32KB of Flash. The only way to make this hack work would be to keep as much of the emulation and other routines in Flash, using as little RAM as possible.

The core of this hack starts with the MOS 6502, the processor used in the Apple. [Damian] wrote a simple assembler which translates the 6502 opcodes and address modes to instructions which can be executed by the Arduino’s ATmega328. To keep everything in ROM and make the emulator portable, [Damian] used two large switch statements. One for address modes, and a 352 line switch statement for the opcodes themselves.

A CPU alone is not an Apple though. [Damian] still needed input, output, and the ROM which made the Apple so special. Input was through a PS/2 keyboard. The PS/2 synchronous serial clock is easy to interface with an Arduino. Output was through a custom VGA implementation, which is a hack all its own. [Damian] used the lowly ATmega16u2 to generate the video timing. The 16u2 is normally used as the Arduino Uno’s USB interface. The only external hardware needed is a single 120 ohm resistor.

The original Apples had cassette and speaker interfaces. So does this emulated Apple. [Woz’s] original cassette and speaker interface accurate loops to generate and measure frequencies. One of the trade-offs [Damian] accepted in his 6502 was cycle accuracy, so he couldn’t use the original routines. Not a problem though, as he was able to write simple functions to replace these routines and drop them in place of the Apple’s own ROM calls.

The Apple ][ ROM itself is handled as one giant character array. This includes the system monitor, Mini-Assembler, Sweet-16, and [Woz’s] own Integer Basic. [Damian] caps off this incredible project by booting his new computer, loading a  Mandelbrot set program from cassette -or in this case an audio file stored on his cell phone, and running it. The well-known fractal is displayed in all its glory on a modern LCD monitor, driven by a microcontroller, emulating a computer from nearly 40 years ago.

Thanks for the tip [Bill]!

Apple II Image by RAMA, [CC BY-SA 2.0], via Wikimedia Commons


Filed under: Arduino Hacks

The KIM-1 Computer Minified

The KIM-1 wasn’t the firs microcomputer available to computer hobbyists and other electron aficionados, but it was the first one that was cheap. It was also exceedingly simple, with just a 6502 CPU, a little more than 1k of RAM, 2k of ROM, a hexadecimal keypad and a few seven-segment displays. Still, a lot of software was written for this machine, and one of these boards can be found in every computer history museum.

[Oscar] thought the KIM-1 was far too cool to be relegated to the history books so he made his own. It’s not a direct copy – this one uses an Arduino for the brains, only breaking out some buttons, a pair of four-digit seven-segment displays, and the I2C and SPI pins on the ‘duino. The KIM-1 is emulated by the Arduino, allowing for the same interface as an original connected up to an old teletype, and [Oscar] got his hands on the original code for Microchess and the first 6502 disassembler from [Woz] and [Baum].

[Oscar] put the schematics for his version of the KIM-1 up, and has the PCBs up on SeeedStudio. If you’re looking for an awesome replica of a vintage computer and a nice weekend project, here ‘ya go.


Filed under: classic hacks