Close

Adding a 32K RAM chip

A project log for ZX81 hi-res graphics board G007

By Gary Keall. 256x192 pixels. Patches BASIC so you can PLOT(n,x,y) instead of USR(addr) calls.

keithKeith 08/31/2023 at 00:510 Comments

Edge connectors should not be used as the sole means of supporting a board, especially cheap ones without gold-plating.#

This is exactly what Sinclair did with the ZX81, rendering it completely unreliable.

The G007 can't avoid the connector between it and the ZX81. To avoid the connection between it and the 16K RAM pack I added a 32K RAM chip, piggy-backed over the G007 EPROM (with which it shares many pins in the same places. I did this ages ago,

2023-09-02

I gathered my Sinclair related kit: a ZX81, a five-inch monochrome telly and a matching 12V 1A wall-wart power supply. Those seem to work fine.

2023-09-03

My ZX80 clone seems okay but my ZX81 is not. So I'll work with the ZX80 for now. Both have 32K RAM fitted.

Neither work with my G007 with a 32K RAM chip. I checked the wiring. I noticed /OE and /CS were joined, as I have seen done for read-only memories. I guess I had been hacking it to carry a ROM. So I modified RAM /OE to go to /RD. The /CS pin can be driven by A14 NANDed with MREQ, as shown in the image below:

The RAM piggy-backed over 4K EPROM signals are mostly in the same place.

Notes:

  1. 24-pin ROM pin 21 is tied high for a 2716, A12 for a 2732, and A11 for larger chips.
  2. G007 board joins ROM /CE and /OE. It could be changed to /RD.
  3. 32K RAM pin 1 is connected to A14 but the ZX81 normally only selects it when A14 is high.
  4. RAM D6 and D7 must go to the edge connector side of the G007 board, so they can be isolated during pixel graphics.
  5. RAM /RD must go to the edge connector side of the G007 board, if using the Maplin circuit.

If there is a 32k RAM on the ZX80 and the G007, the G007 logic will only select parts of it.

I then realised there was a sneaky problem with the patching method. The firmware copies pages from 0000h and 0200h in ROM to 2000h and 2200h in RAM, makes a few mods, then enables RAM at the lower pages, replacing the ROM. If the on-board RAM is bigger than 8K, the higher pages of RAM will not be aliased at the lower pages. Instead, you will get pages of uninitialised RAM, and the system will fail.

So I replaced the 32k chips with 8k chips. The ZX80 clone still works. It says 256*PEEK 16889 - 16384 is 8192 without the G007 and 16384 with the G007. The latter is correct because only half the chip is being used at the moment.

There is a similar aliasing problem if you try to fit the ZX81 BASIC and G007 in a single 16k ROM. The aliasing won't work. It will need A13 to be forced high when accessing page 0Cxx in order to select page 2Cxx in graphics mode.

The system is not implementing G007 graphics commands at the moment. I don't know why, right now. I'd like to try it with my external 16K DRAM pack, but this is lacking a chip (I suspect an LS32). I must have borrowed that for another project but I can't recall where. 

2023-09-05

The 16K DRAM pack worked after fitting a 74LS32. Either if fitted alone, with or without RAM on the ZX80, or the G007 board without RAM. BASIC did not have new G007 commands, the ZX81 ROM was not being patched because a link was missing. When I fitted that link, it crashed the system. 

2023-09-17

Today I wondered if I could create a single unified ROM to replace the ZX81 and G007 ROMs. I think it might be possible but the would have to be on the ZX81 board so that it can work as the character font ROM.

Meanwhile I feel I should try getting my G007 back to working before trying anything new.

Discussions