Tag Archives: Emulation

6502 emulated in microcontroller (Part 1)

I last left off with the makings of an address decoder using a pair of 74hc595 serial to parallel shift registers. I added some LED indicators to the address bus so I can see the activity as I cycled through.

Understand that I am primarily a developer, electronics comes naturally to me, but proficiency comes with experience so forgive any of my “worst practices” that might make an electrical engineer cringe.


This time around I had an old 64kb static ram chip. It was from an old PC secondary cache which were used in banks of 4. I also added LED indicators to the data bus. The main reason was to see if the address bus was iterating through cells in the RAM chip properly. Most memory initializes with alternate pages as all zeroes and either a random or fixed pattern. This allows you to check the ram for bit errors. This worked for me because I tied the enable output line to the clock.


The one thing I was stuck on was the data bus. I didn’t want to use 8 pins for I/O on the Arduino Nano I was testing with. Everything I read was using two shift registers for the data bus. Then I remembered I has a bunch of 74HC299 universal shift registers which allows you to shift data in or out serially, and latch parallel data or set the outputs for the ram to read or write. All done with 5 pins, not much of a savings until you consider you can share every pin as an SPI bus. Since these memory operations are synchronous, you can use the cs on different pins, everything else can share the rest of the bus.

This is still a work in progress for this part so I havent considered what passive components to use for noise isolation or other things. What I am thinking through now is how to tie the ram read with the shift out, and ram write with the shift in.

More to come.

Emulating an Apple //e on an Apple iPhone 4

Okay,  since iDOS has been release and pulled,  I was recently playing with DOSBOX,  I’m a huge vintage computing fan, and I have all of my old PC and Apple hardware,  plus I’ve taken the time to emulate these older systems to show off my older efforts (I was a huge BBS enthusiast when I was younger, since roughly 1982)

I was inspired by someones comments to make a Apple ][ emulator for iOS (which I’d love to see KEGS or something else ported)

What better way to show off a little than to install DosPAD (aka iDOS, based on the DOSBox emulator) on my iPhone.

One really cool thing about DosBOX is the several interesting ways that networking can be emulated.  Being a BBS enthusiast, the way it emulates a modem (and listening on a TCP port, when a connection is detected, it “rings” the modem) led me to set up my older BBS programs that ran under DOS,  MajorBBS, Renegade, Synchronet, all work.

But my enthusiasm started with the Apple ][ and //e computer, and thats where my BBS obscession started.  So I started looking for something along the lines of KEGS or some other apple ][ emulator being ported to Mac osX and perhaps to iOS.  No luck, and I’m not yet proficient enough to port the code myself.

BULB GOES ON..  See if one of the older 16 bit Apple 2 emulators will run in DOSBox!  I started  by getting DOSBox running under my trusty Ubuntu Netbook.  So I gather some of my stuff together, copy APPLEPC to a path and mount it in DOSBox, OOPS! Forgot to get a ROM for my Apple //e.  I find a rom and copy it over.  It boots and hangs, OOPS, need an apple boot disk.  So I created a prodos disk image from one of my original disks.  BINGO it boots!

Yech its kinda slow,  but it worked!

Next step,  copy the files in my APPLEPC directory to the iDOS emulator on my iPhone…..

BINGO! It works!

Its slow,  opening the super serial card actually works (you get a ring, and can type ATA to answer) and Ascii Express (running tardis) worked perfectly.

Stay tuned for my next steps,  to install my old BBS Hard disk image and connecting to it.

More pictures and updates to follow!