Tuesday 22 July 2014

ZX81 internal 16K RAM

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Here we have a ZX81 with an unusual RAM chip. It is a MK4801AP-5, a 1K static RAM made by Mostek (not to be confused with MOS technology owned by Sinclair's arch rivals Commodore).
Sadly, it's not working, and it appears to be that RAM at fault. The screen is showing what looks like the loading screen on the quiet bits of the tape. It is easy to test this, by plugging in a RAM pack, as this disables the onboard RAM. That works fine, so time to remove the RAM.
In this state, it can be used fine with a RAM pack, and so is an option to leave it like this. However, the ZX81 board has positions for various configurations of RAM, 1K or 2K 24 pin (as fitted) or 28 pin.
There are also spaces for 2x 18pin 2114 SRAMs, as on this other board. I have a supply of spare 2114s, so I was about to fit sockets like this. Then I thought this would be a good opportunity to try out upgrading the onboard RAM. There are various options for this, the chips I have to hand are 32K, and it is possible to add 32K RAM, but this requires some additional logic, see this article for more info. The easier option is just to ignore half of the chip and get 16K RAM. That is fine because most of the software is designed for 16K.
The original chip was 24 pin, the new RAM is 28 pin. There are holes for a 28 pin socket, but there are a few differences between the way that socket is wired, and the pinout of a 62256 32K SRAM.
Pin 21 is set to either VCC or A10 by jumpers L1 and L2, so L2 needs to be fitted to use A10. That leaves 4 pins that need to be changed. Actually it's only three. The chips is 32K, so there is one additional address line that isn't being used and should be tied high or low. Ideally, that would be A14, but with RAM chips it doesn't actually matter what order the address lines are in ,or the data lines for that matter. There are a few options here, I've seen some people do this by bending out the legs of the chips and connecting from the bent leg to an appropriate via on the board. I prefer to leave the legs straight and make the changes on the back of the board.
Pin 2 is a problem as the VCC track goes through the pad for the pin on the top layer, so I've left that one as is, so that leaves three tracks to cut. Pin 26 is connected to VCC on the top AND bottom layer, so both need to be cut, refresh to pin 1 and WE to pin 23 can be cut on the bottom later.
A10 is connected to pin 21 via L2. The remaining pins can then be connected to the next three address lines, A11, A12 and A13. These can be found at the near end of the diodes next to the keyboard connector. D1, D3 and D5. Again the order doesn't matter, so I've gone for the nearest.
I've highlighted the changes above. Doing those changes under the board leaves the top neat and tidy.
The final look is almost as if it was designed to go there.
Once done, time to power up and wait for the K. So far so good. The usual test is to run
  • PRINT PEEK 16388+256*PEEK 16389
This gives 32768, showing the top of the RAM is at 32K. The first 16K is the ROM, so that means it has recognised 16K of RAM. Time for some proper testing, the copy of 3D Monster Maze I've been using to test ZX81's for over 30 years!
And away we go, Rex indeed lies in wait.
Well I did have to test it thoroughly. That all seems to work, and is now less susceptible to RAM pack wobble. The board with 2x 2114 chips draws around 400mA. With a single 4118 RAM chip, the current drawn was around 410mA. With a 16K RAM pack was 540mA. This newly modified board draws only 300mA, so less strain on the 7805 regulator which should now run a bit cooler.
I may have eluded Rex this time, but he is angry and I'll need more luck next time....

UPDATE: I can now offer a fitting service if you have a ZX81 that needs an internal RAM update, or composite video modification, voltage regulator switch mode replacement etc. Contact me if you are interested.

UPDATE 2: Some more photos, this is the memory size check:
The result is 32768 as expected (16K ROM and 16K RAM).

UPDATE 3: See also a version of this mod which does not require tracks to be cut.