A low-cost EPROMer to put your ZX81 to use.

EPROMS are powerful, inexpensive and familiar components that are found in many circuits popular today. A stand-alone programmer can cost over $1000. A card for your fruit is cheaper, but then you must have a machine to put that card in. Stop using your ZX-81 as a doorstop and cash in on its hidden potential; build this “full-feature” EPROMer and enjoy freedom over EPROMs. The circuit described here will program the popular 2764 type EPROMs; these are under $10 and store 8K, making them a good choice for many applications. Some uses of this device could be:
1. Program any compatible EPROM.(i.e., 2716).
2. Read any ROM, PROM, or EPROM.
3. Static RAM in any unoccupied memory block.
4. A games cartridge system for the ZX-81.
5. An EPROM copier.
How It Works
While we will be looking at programming the 2764, the theory of operation is much the same for other types. It is well worth your while to consult the proper manual before trying a different memory chip. The programming voltages, for example, vary from type to type. When programming the 2764 it needs:
1. Stable data and address lines for the duration of the write.
2. A stable 21 voltsat 50mA at the Vpp pin.
3. The PGM and CS held low for 50mS after 1 and 2 are met.
The OE pin can be tied to CS to allow for verification of each write. Vpp can be either 5 or 21 volts while reading; PGM should be held high when reading. In this circuit we are slipping our 8K EPROM into the memory map in the “never bothered by BASIC” 8-16K block. As such, PEEK and POKE can give us direct access to all locations. This means that all software can be written in slow but friendly BASIC.
IC 1 is a block decoder. It looks at the top three address lines and decodes all memory requests into 8K wide Block Selects (8 outputs x 8K = 64K). The Y0 BS de-echoes the ROM (familiar ZX stuff) while its neighbour Y1 delivers the BS where our EPROM lives.
IC 2 is the trap circuit. If BS is low and RD is high (this can only mean a write to the EPROM) and if the timer output is high, then a WAIT is issued to the Z80. This has the unadvertised effect of freezing the Z80’s lines until released. The WAIT is also inverted and after a slight delay (C3) passed to the first timer’s +ve trigger. Each timer has two outputs, Qbar and +Q. Because the 2764 is programmed with a high-low-high sequence PGM is connected to Qbar. The Q output is applied to the second timer’s -ve trigger. After 50 milliseconds these outputs both flip, thus ending the programming and triggering the second timer. The second timer prevents the LS10 from retrapping this same write. But what about REFRESHing the dynamic RAMs? Even though D-RAM is usually REFRESHed every few milliseconds, experience has shown that good data integrity is maintained with occasional periods much longer than 50mS.
2764 PIN CONFIGURATION Vpp 1 | | 28 Vcc A12 2 | | 27 P̅G̅M̅ A7 3 | | 26 N.C [1] A6 4 | | 25 A8 A5 5 | | 24 A9 A4 6 | | 23 A11 A3 7 | | 22 O̅E̅ A2 8 | | 21 A10 A1 9 | | 20 C̅E̅ A0 10 | | 19 O7 O0 11 | | 18 O6 O1 12 | | 17 O5 O2 13 | | 16 O4 GND 14 | | 15 O3

Hooking’er Up
This project is fairly straightforward and does not require a printed circuit board. Veroboard is a good choice for most projects like this. Connecting the veroboard to a ZX-connect with coloured ribbon cable will keep wiring simple. As a bonus, not every edge-connect line has to be brought out to the board.
A ZX-connect can be made by cutting a 50 pin 1/10 inch standard edge-connect to length. The key-way tab is made from veroboard. The expansion strip can also be made from two pieces of veroboard sanded to half thickness and glued back to back. An easier approach is to cut the strip from an existing circuit board. Our strip came from Zebra systems but we have seen many ideal bits of fibreglass in our favorite surplus store. The 1/10 inch spacing is very common.
All this is necessary because the EPROMer must be the first device plugged into the expansion port. The Memory Packs alter the high order address lines (to be stackable) and this definitely won’t do. Many peripherals are memory mapped in the 8-16 K range and as such are not compatible with this gadget. To be able to use a 64K pack with the EPROMer you must be able to de-select the 8-16 K range. Most have this feature. Any I/O mapped device (e.g., the ZX printer) is cool.
If the expansion strip is not possible for some reason then bring any altered address line (typically A14) directly from inside the computer to IC1. This is low-tech and not too neat, but will still do the trick.
Personality
The use of several IC sockets as “personality” strips is recommended but not vital. The idea here is to be able to make modifications to control hookups without soldering. A look at the pinouts for most popular ICs reveals that many lines always connect to the same pins while others change from type to type. Having the top few address lines and most of the control lines jumpered through a row of IC sockets will allow a lot of scope for testing, adjustment and hacking.
The Data lines and A0 to A10 are wired directly to the socket. Solder the control lines as the circuit comes together. WAIT, RD, MREQ go directly from the circuit to the ZX-connect. A good “personality” candidate is WR . While not used in the circuit, it allows the use of static RAMs in the socket.
It is worth noting that no points are awarded for a cramped, tiny board. While keeping all wire lengths as short as possible is always a good idea, never paint yourself into a corner when building around a flexible circuit like this.

Testing and Adjustment
When your board is all assembled and well-checked over for solder bridges, it is time to power it up. Connect it directly to the ZX edge-connect and (with no EPROM) apply the power. If the cursor does not appear re-recheck all wiring.
If it does, try a POKE to anywhere in the block, e.g., POKE 10000,0. A screen flicker at this time tells you that all is well. This is the Z80 “freezing”.
If you are unable to get a screen flicker, test the trap by momentarily grounding 3, 4, and 5 of the LS 10 (disconnect them from LS 138 first). A screen flicker now means that the problem is in the block decoding. If you are still having problems, read the section “Gotcha”.
But you were careful and you got the screen flicker right away. Centre Rl and R2 and enter the program, except for line 120. The idea here is simple: while 50 milliseconds is hard to time with a stopwatch, 50 seconds is pretty easy. Disconnect the LS138 from the LS10 and (no flicker) RUN the program. This is approximately 70 seconds in SLOW mode. Reconnect the LS138 to the LS10 and re-RUN the program. For 1000 loops the “flicker” should add 50 seconds to the “no flicker” RUN time, giving a total time of 120 seconds. Adjust Rl until this is exactly right. Now put a drop of your favourite nail polish on Rl’s arm. By now the use of the “personality” strip should be apparent. Without it this setup stage can be a hassle.
R2 is not too critical. If the system “hangs” on the first write, then increase its value. Add line 120, delete line 30, CLEAR the variable area and SAVE the program to tape. DEST and the number of LOOPs will change for different applications, but the theory of operation and the timing set by Rl will remain the same.
Programming
To simplify programming we will be using BASIC. Because the socket is “memory-mapped”, PEEK and POKE will give us access to the EPROM. PEEK behaves normally, while POKE is extended by the circuit to meet the 50 millisecond requirement. Remember, POKEs are permanent! To erase any one location you must erase the entire EPROM.
The EPROM can be programmed in many ways or in any order. Most assemblers have a Block Transfer or MOVE function, but usually without verification. The easy solution is to move the object code into a string variable and then type in the minimum BASIC program. With 16K of memory there is still ample room for most assemblers (4K-7K), a few lines of BASIC, and 8K of data in a variable.
To copy an existing EPROM, for example, transfer its contents to an array, save everything to tape, power down, install the blank, reload and then program.
The BASIC given here is only to show how simple it is to program an EPROM. Feel free to include Menus, features, bells and whistles if you like. Your program should:
1. Verify that all locations to be programmed are 255 ($FF) before writing. You can make a one into a zero but not vice versa.
2. Verify all start/finish values with the user.
3. Verify that the correct value has been written. If an error occurs it is not likely that the machine can correct itself.
Vpp drifting or poor socket contacts are the initial suspects so STOP if even one write will not verify.
Mods
A look at the pinouts of these common chips reveals how similar they all are. For example, even if we can’t program a 2732 type, it is still possible to READ its contents. The contents of the 2732 can then be put in half of a 2764. When installing the “double 32” connect the highest address line to either 0 or 5 volts depending on which half you want to use. These devices are cheap enough to make this method the easiest way to get around some tricky circuit construction.
Gotcha
The most common problem with project or kit failure is faulty soldering. Before powering up, go over the entire board with a magnifying glass. Tiny wisps of solder, while barely visible to the eye, can cause expensive damage. Going over the board thoroughly is time well spent. If your project will not work, examine each section independently. Remove the other ICs from the board, and using the “How it Works” section, trace the circuit’s operation. With only the LS138 installed, PEEKing 10000 should return 255. Any other result means that the ROM echo is not suppressed; therefore, re-check the 138. The trap and the timer can be checked statically, making them much simpler to debug.
The next most likely trouble source is the ZIF socket. A good socket will cost half of the total cost of the project, and is worth every cent. The cheapies do not guarantee the good connection that must be maintained.
When programming, bear several things in mind. The 21 volts needed to program an EPROM is fatal to all other TTL circuits. If this voltage varies by more than a half a volt either way, the write may not take. It is important that the chosen supply can deliver at least 50mA with good regulation. An on-card 5 volt regulator and a decoupling capacitor across every IC also helps maintain the accuracy needed for programming. These capacitors must not be eliminated or you will be plagued with unpredictable results.
Fig. 3 A simple BASIC listing for programming and compatible EPROM.
5 REM THE ZX EPROMER BY D.TURNER + N.DENNIS
10 REM THIS ASSUMES THAT THE CODE TO BE PROGRAMMED IS ALREADY STORED IN A VARIABLE CALLED D$.
15 REM IT SHOULD TAKE 50 SEC LONGER TO EXECUTE 1000 LOOPS WITH THE EPROMER ACTIVE (SCREEN FLICKER) THEN WITHOUT.
20 REM TYPICAL TIME FOR 1000 LOOPS OF THE PROGRAM IS 70 SECONDS. THIS TIME DOES NOT INCLUDE LINE 120 WHICH WOULD STOP THE TEST.
25 REM LINE 30 IS A DUMMY FOR TESTING ONLY. DELETE IT AFTER TIMING OR IT WILL DESTROY THE DATA IN D$.
30 DIM D$(1000)
50 REM
90 LET DEST=8192
99 SLOW
100 FOR I=1 TO 1000
110 POKE DEST+I,CODE D$(I)
120 IF PEEK (DEST+I)<>CODE D$(I) THEN GOTO 999
150 NEXT I
200 STOP
999 PRINT "VERIFICATION ERROR AT ",I
PARTS LIST
I.C.s I.C.1 ............ 74LS 138 block decoder I.C.2 ............ 74LS 10 triple Nand I.C.3 ............ 74LS 123 dual timer I.C.4 ............ 7805 voltage regulator Resistors, Capacitors R1 ....... 200K 10 turn mini-trim type pot. R2 ....... 22K trim pot. C1 ....... 1.0 uF tantalum cap. C2 ....... 500 pF cap. C3, C4 ... .005 uF cap C5-C9 .... 1 uF (decoupling) Misc. D1, D2 ..... 1N4009 or approx. equivalent diodes ZX edge connect and expansion strip I.C. sockets (4-5 with personality) Veroboard, Ribbon cable A GOOD ZIP (Zero Insertion Force) Socket 21 Volt power supply ......... 2 9 Volt and 2 1.5 Volt (AA) batteries will work just fine if fresh.
Transcription note: Pin 20 is CE in the figure and CS in the article, as printed.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.