--- title: "EPROM Programmer, Part II: Fixing Your Home ROM" type: "article" slug: "eprom-programmer-part-ii-fixing-your-home-rom" url: "http://localhost/article/eprom-programmer-part-ii-fixing-your-home-rom/" markdown_url: "http://localhost/article/eprom-programmer-part-ii-fixing-your-home-rom.md" published_at: "2020-10-27T17:09:31+00:00" modified_at: "2026-07-15T00:21:31+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "The programs of listings 1 and 2 in Part 1 got you programming 27128's on the standard TS2068 computer with the supplied home ROM (U16). There IS, however, another way to get around the problem which is much better in the long run, it you plan on programming very many 27128 EPROMs. And what is…" category: - name: "SyncWare News" slug: "syncware-news" taxonomy: "category" url: "http://localhost/category/periodicals/syncware-news/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - name: "Hardware project" slug: "hardware-project" taxonomy: "post_tag" url: "http://localhost/tag/hardware-project/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "John Oliger" slug: "john-oliger" taxonomy: "indiv" url: "http://localhost/indiv/john-oliger/" publication: "SyncWare News" publication_r: id: 10245 title: "SyncWare News" type: "periodical" url: "http://localhost/periodical/syncware-news/" authors: "John Oliger" authors_r: - name: "John Oliger" slug: "john-oliger" taxonomy: "indiv" url: "http://localhost/indiv/john-oliger/" volume: "2" issue: "5" issues_articles: - id: 26684 title: "SyncWare News v2 n5" type: "issue" url: "http://localhost/issue/syncware-news-v2-n5/" pages: "14-15" pubdate: "May/June 1985" archive_link: false volumeissue: "v2n5" --- # EPROM Programmer, Part II: Fixing Your Home ROM The programs of listings 1 and 2 in Part 1 got you programming 27128’s on the standard TS2068 computer with the supplied home ROM (U16). There IS, however, another way to get around the problem which is much better in the long run, it you plan on programming very many 27128 EPROMs. And what is that? Why, correct the home ROM by transferring it into RAM, changing the code, and then programming a 27128 to replace It! How do you change It? Use Hot Z 2068. What are the required changes? They are listed below: ``` 002B 84 DATA ; This is a little table added 002C 87 DATA 002D 8B DATA 002E 8D DATA 002F 92 DATA 006D 2801 JR Z,0070 ; This is a correction to an NMI bug 37B8 D9 EXX ; Get exchange registers 37B9 212B00 LD HL,002B ; Form pointer into 37BC 85 ADD A,L ; the new table in the 37BD 6F LD HL,A ; HL register pair 37BE 6E LD L,(HL) ; Get low byte of desired constant address 37BF 2636 LD H,36 ; High byte of constant address is 36h 37C1 D9 EXX ; Return it in HL' 37C2 AF XOR A ; Let A=0 & clear carry flag 37C3 C9 RET ; Done, so return 37C4 00 NOP ; Extra byte ``` The above subroutine does the same thing that the routine it replaces did, but it does it without writing garbage to itself, and even does it more efficiently. If you run the benchmark speed tests given in recent issues of Creative Computing both before and after these changes, you will find that the 2068 gains 5 seconds with these changes. Not enough to lie awake at night about, but faster nonetheless. Also, the changes listed above correct an old error in the NMI handler in the Sinclair Spectrum. [The NMI line is used by peripherals like disc drives, etc., in order to run efficiently. – ed.] With this change, If you know any m/c, you can examine the NMI routine and, I am sure, find out how to use it. (How would you like to add a break key that could stop ANYTHING, including non-breakable programs and run-away machine code!) Now, getting back to the changes necessary to make these corrections to the home ROM. Can you simply mount the new 27128 EPROM in the home ROM’s socket without any hardware changes? No, I’m afraid not, Can you simply make the trace cuts and wire jumps listed in the TS2068 Technical Manual? You can, BUT If you do your 2068 EPROM programmer will no longer work correctly, because this will take away the RD NOT decoding required for the programmer. So, here’s what you do to mount this EPROM in the U16 socket and STILL be able to use the 2068 Programmer. You simply use that extra gate we left open for this purpose in a previous episode. Remove all screws from the bottom of the computer case and lift the case top from the computer, carefully unplugging the keyboard cable while doing so. Find jumper resistors W1 and W2 near the center of the board and clip both of these from the board. Now, using wire wrap wire and small gauge solder, connections make the following connections to and from this chip. Any pin number not listed is left unconnected. - Pin 1 to left W1 pad. - Pin 2 to left W2 pad. (as per instructions in SWN 2:3, Pg. 19) - Pin 3 to right W1 pad. - Pin 14 to right W2 pad (AND Vcc +5V as in SWN 2:3; a good place to get this is pin 9 of U13.) - Pin 7 to U12 pin 18. (ground) When soldering these wire-wrap wires to the wide part of the LS/HC32 chip, solder quickly to avoid damage to the chip. The EPROM mod is now done. You can now install your 27128 in the U16 socket. (And you didn’t even have to make a trace cut!) If you desire to install a 2764 in the EXROM (U20) socket, you CAN do it the way Timex says in the Tech manual without any conflicts. But a better way is to use the same socket as was used for Spectrum compatibility in Issue 2:4 of SyneWare News. Cut off pin 1 and pin 27 of the EPROM socket, and solder small jumper wires from pin 28 to the bases of each pin (1 and 27). This way, you again, don’t have to make any trace cuts! Plug your keyboard cable back in and reassemble your case and you’re ready to go. With these changes made, and the EPROM safely inside your TS2068, you no longer have to use those special programs when programming 27128 EPROMs. You can now use a simple FOR/NEXT loop as shown for the 2764, with the base programmer address changed and the capability of 16K storage instead of just 8K. ### Verify Your EPROMS Because the address space used by this programmer is shared with the 2068 home ROM, and to keep both the hardware and software involved as simple as possible, this programmer does NOT include verify circuitry. To verify an EPROM you must either run a checksum on the data to be stored and run the same checksum routine on the EPROM after programming, (Hot Z 2068’s VERIFY function is good for this), or store the data on tape to be loaded in later for a direct comparison with the programmed EPROM in a User Cartridge board, An example of this follows: You have programmed a 27128 EPROM with data that was stored in RAM from 49152 to 65535 (top of memory). You have saved this data to tape with a ‹SAVE “data” CODE 49152, 16384> statement. Install the programmed EPROM in the cartridge board, mapped from 32-48K via diodes to the decoder’s “32” and “40” outputs. Clear out the top 32K of memory with a command, then load the data back into the top of memory with . Now key in the following comparison/verification program: ``` 10 OUT 244,48 20 LET x=49152:FOR n=32768 to 49151 30 IF PEEK x<>PEEK x THEN PRINT n;"=";PEEK n,x;"="; PEEK x 40 LET x=x+1: NEXT n ``` If the little program finishes with a clear screen, then the EPROM is veritied as being 100% exactly like the data. If there is something on the screen, then you will see what is, and what should have been on the EPROM, and where. There is really not much need to verify a BASIC program stored on EPROM. If the program RUNs correctly without errors, then you can be certain it is ok. You will find that the only times an EPROM will not verify correctly are when: 1. There was an error made in keying in the burner program itself. (Usually resulting in EVERYTHING being wrong.) 2. The EPROM is defective. (Lots of times a single bit of all locations will not program.) 3. The EPROM was not completely erased. You can verify that an EPROM has been erased with the following routine (for 27128): ``` 10 OUT 244,48 20 FOR n=32768 TO 49151 30 IF PEEK n<>255 THEN PRINT n 40 NEXT n ``` It is not a bad idea to do this to all erased EPROMs. #### Programmer Theory Note: It is certainly not necessary to understand the following details on how this circuit works to bulld and use this programmer, If, when reading the text below, you find yourselt “lost,” there is no need at all to be concerned. But, if you find yourself understanding part or all of it, then so much the better! Generally speaking, the more you understand of the workings of a piece of hardware the more likely you are to be able to use it to its fullest potential. NOR gate U1 and miniature switch SW1 form an address decoder for the address range from 0 to 16383 (with SW1 in Its “128” position) or from 8192 to 16383 (when SW1 is in its “64” position). It MREQ NOT, WR NOT, A15, and A14 are all logie low, and (with SWI in the “128” position) A13 is a logic high, an active high signal is generated at U1 pin 5. With SW1 in Its “128” position, A13 is ignored, making this high pulse appear regardless of A13’s state. (I.e., we don’t care, in the “128” position, if the memory write is write is to the 0-8191 chunk or the 8192- 16383 chunk.) This active high pulse is applied to both U2 pin 16, and U3, U4 and U5 pin 11. [Note: The first installment had a typo for this, in the section “The Smoke Test,” line 9. This should read, .. while of U3….” monitoring pin 11 of U3….”, not pin 1, ed.l The rising edge of this pulse on U3-U5’s pins 11 causes these flip-flops to transfer and hold the current of data and address state of their inputs to their outputs. These outputs are applied to the EPROM being programmed, and will remain in this “frozen” state until another write (POKE) to this decoded address space is performed. Meanwhile, that active high pulse from U1 pin 5 has also been applied to the 555 timer U2 at pin 6. This timer (if you are familiar with the typical wiring of the 555 as a one-shot), is wired somewhat unconventionally so as to respond to an active high trigger pulse and output an active low timed pulse. D1 was added as part of this unconventional wiring, and the timing components (C1 and R1) have been adjusted in value for the correct 50 ms. pulse. Note that the normally-wired one-shot’s equation for this IC (T=1,1*R*C) is no longer accurate. After the triggering pulse is applied to U2’s input at pin 6, there is a typical delay of 100 ns before the IC’s output at pin 3 goes active low. This delay easily satisfies the EPROM’s stable address/data line requirements before allowing its PGM NOT Input to go active. This timed, 50 ms pulse from U2 pin 3 is applied to the EPROM’s PGM NOT pin 27. Now the EPROM will take the state of the latched data inputs on its pins 11-19 and store it permanently at the location within/itself, pointed to by its latched address inputs if: 1. The EPROM’s Vpp has 21 VDC applied to it via an external power supply such as the Oliger Vpp Supply set at “Vpp” and “21.” 2. The data and address lines are stable for the duration of the 50 ms pulse, plus a little more time for the chip to respond to the pulse going inactive. This is accomplished via the latches and the PAUSE 3 BASIC statement in the burner program which keeps the loop from POKEing this address space for 50 ms plus the time used by BASIC in executing the program itself. The programmer is then ready to accept another byte, and the process continues until the EPROM has been fully burned.