The hardware

For your information: the device we're trying to emulate has to be able to run the CP/M operating system. The minimum specs for CP/M are: 20K of RAM, an 8080-type processor and some kind of storage, for example a floppy diskette drive. As said before: all that's needed to emulate a certain machine is a Turing-complete device with enough storage. The role of the Turing-complete machine, in this case, is fulfilled by an ATMega88, an AVR with 8K of flash and a bit more than 1K of SRAM. 1K isn't enough for the emulated machine by a long shot, so I chose an antique GM71C4256A 128KB, 4bit DRAM chip to do that bit. The AVR doesn't have a DRAM-controller on board, but that can be emulated too. The 128K the chip can store is more than enough for CPM to run in: the 8080 can't address more than 64K without bank-switching schemes anyway. In theory, this setup could already emulate the desired machine, but a bit of non-volatile storage would be nice too. Floppy-disks are a bit out-of-date, so a MMC/SD-card got to stand in for that. CP/M only needs a character-based terminal as its input and output, so I decided I'd just use the built-in UART for that and be done with it. In theory, I could've chosen a bigger AVR and emulate a video card and keyboard controller too, though.

All in all, I arrived at this schematic. The chips run at 3.3V: this way no level-shifters are needed to talk to the SD-card. The downside is that both the DRAM and the ATMega88 are running out-of-spec (they'd need 5V) but in practice, both handle the lowered voltage without giving trouble.

Thanks to Peter Sieg for correcting a few mistakes in the schematic. The one above now should work.
As you can see, the wiring all is fairly standard: the RAM is controlled via I/O-pins, which are partially shared with the MMC which is controlled over the built-in SPI hardware. I connected the RxD/TxD-pins to a FT232-board, but you could use a MAX3232-like device too. Everything you see here is DIP (apart from the SD-card-socket) so I could build everything quick&dirty on a piece of prototyping board:

« Prev 2 Next »

© 2006-2013 Sprite_tm - Contact