Theory of Operation - Hardware

The Problems

As I mentioned at the start Donkey Kong doesn't have any socketed RAM and also only uses 2114 RAM ( 4kBit - 1024x4bit ).  To add some  non-volatile storage would mean a plug in board, similar to Galaga, but this would still mean de-soldering and adding sockets for the RAM. The second solution would be some kind of plug in for the CPU socket, this would mean a lot more work and make the project more complex than I wanted.  

Non-volatile Memory

So what's the solution, for a low impact memory device something simple like a serial EEPROM was the best bet,  these are easy to work with and I've used them a few times in the past. To operate you need several control and data lines, this results in an additional I/O latch would need to be added to control and read/write the device.

Unused Output Ports

This is where some luck comes into the picture, Donkey Kong has a number of unused outputs from two addressable latches ( 74LS259 ). The latches are used to trigger sounds in the discrete sounds generator but not ever control line is used. The unconnected outputs are PERFECT for controlling the serial EEPROM,  see the schematics below.  There are exactly enough unused output lines, so I assume the designers of the hardware must have known that 20+ years into the future Iíd be needing this feature.

Serial EEPROMs

My original design used an I2C protocol  24c16  serial EEPROM, this forced the addition of an extra IC into the mix which I later rejected as the idea was to keep it  as simple as possible adding as few parts as possible, although I do have a DK boardset which is probably the only one in the world that talksto a serial memory using the I2C protocol.

Easier to implement than an I2C device is a microwire bus 93C56 serial EEPROM, it also helped that I had a few of these left over from another project.  This is a 256x8 serial EEPROM which requires 2 control inputs, chip select & clock, plus one serial data-input and serial data output. Itís important to say at this point that the device to use is a ST microelectronics 93C56, a Microchip 93LC56a will also work. Whatever device is used it MUST be the 256x8 variety, the 256x16bit device would not work !!

Memory Control 

Refering back to the schematics it can be seen that DK has exactly 3 unused output on the two latches at 5H & 6H, so that covers the 3 required inputs to the EEPROM ie. Data-in, chip select and clock.

Thatís the output and controls, what about the data output from the memory ?  This part was very simple, DK does not use every control input line so I just picked a convenient one that's not hooked up to anything and the EEPROM outputs data there. It is worth noting that the boardset inverts this input through I.C.  2P, a 74LS240. So data read in needs to be inverted to be valid.  

A quick overview of how the device works, the serial data is clocked into the EEPROM one bit at a time. The device is selected by  I.C.  5H output Q1 going high,   the data for the  device is output to I.C. 6H Q6 and the serial clock, 6H Q7,  being strobed low to  high to low. Commands to read from or write to the device along with the data are, during the write cycle, the data-output from the EEPROM goes low. This can be read by the software and the next write held until the device has finished the write. Device reads are read in one bit at a time through 2P, bit 7 of this input port contains the inverted output from the EEPROM, the read device command being sent along with the address to read, and the data clocked out by 6H Q7 being strobed low to high to low.


EEPROM Clock, Data & Select

The Donkey Kong boardset contains two bit addressable latches at location 5H & 6H these are used to trigger the in game sound effects.

However not all the latches are used, a total of 3 latches are UNUSED which is perfect for driving a serial EEPROM of the 93c variety.

Two control lines are required for Clock and Data Input and one control for Chip Select.

EEPROM Data Output

From the schematics it can be seen that there are a number of unused control input. So one of these is fed the serial data output from the EEPROM.