ORIGINALLY PUBLISHED IN LIMA NEWSLETTER OCTOBER 1993 TO EPROM OR NOT TO EPROM? By Bob Carmany Lima Ohio User Group In 1987, the Hunter Valley (Australia) UG printed the plans for a "home-brew" eprommer in their August newsletter. It was a rather cumbersome device as it was originally developed but, nevertheless, very interesting idea. It wasn't until 1990 that I finally got around to serious consideration of adding one to my system. The rationale was to use the eprommer to replace any aging and failed DSR ROMs in my peripheral devices. The Hunter Valley unit and accompanying software would do everything that I needed --and much more. It would read eproms from any device, save the code to back to disk, allow for the alteration of the code, and check eprom chips for erasure as well as verify the completed eprom. Since the eprom type was selected by means of a wired "personality plug", the list of eproms acceptable was quite impressive. The final modification was the addition of a toggle switch on the power supply to allow the use of both 12.5V and 21/25V chips to be used. It was early 1990 that I finally made the arrangements with Ron Kleinschafer to have one shipped to me. The hardware and software were developed by Ron Kleinschafer of the Hunter Valley 99'ers. One of the first projects that I used it for was the duplication of a set of GRAFTRAX chips for a friend who was concerned about the availability of replacements should the ones in his EPSON printer fail. The chips were socketed 2716 eproms and all that was required was to take each of them out of the sockets in turn and read the contents into memory with the Eprommer software and save the lot to disk for later programming. Nothing spectacular but it did impress my friend and give hime the peace of mind knowing that his investment was covered against possible future failure. The 2716 eproms are 2K chips that are commonly used in printers to store the operating systems or to enhance the basic system supplied with the stock over-the-counter model. That is exactly what GRAFTRAX was designed to do. The three 2716 chips gave the EPSON printers enhanced graphics and additional font capabilities and were available as an add-on for awhile before they went out of production. With that project out of the way, I quickly set to work duplicating the eproms in my STAR STX-80 thermal printer and my STAR NX-1000. The versatility of the HV99 Eprommer and the software had already paid for the investment in time and eprom chips. Perhaps the most versatile eprom chip is the TMS2532. It can be used as a direct replacement for the ROM chips in most of the peripheral devices for the TI. The ROM chips in the RS232 and Disk Controller are good examples as well as the even and odd byte console ROMs. A TMS2532 can be programmed to replace any of these should they fail. In fact, the recent modifications to the RS232 code and the Disk Controller were done on these chips. The only problem is getting the code from the DSR ROM into memory and then onto a disk. There are a couple of ways it can be accomplished. The code can be moved from its normal address at >4000 to another memory address with a program like SBUG and then saved to disk with the HV99 (or other) eprom device. The second (and much easier) way is to use the program at the end of this article developed in about 30 minutes by Tony McGovern. All that is required is to enter the CRU address of the peripheral and then edit the file to the correct length when you are done. * Program to dump SINGLE 8K ROM DSRs to disk *-------------------------------------------- * By PA McGovern * Object file is auto-run out of F'WEB only * Raw dump - no EA 6 word file header * Change DSRLEN EQU as needed eg >1000 for 4K * Change CRU address as needed <<<<<<<<<<<<< * Then reassemble * FUNNELWEB EQUS DSRLNK EQU >FFD4 FILENT EQU >FFCC FWREGS EQU >FF7C CMSRET EQU >FF5C HEXDIG EQU >FF24 VDPPAB EQU >1000 VDPBUF EQU >1050 * Set length of DSR to be saved DSRLEN EQU >2000 For full 8K DSR * Use FW workspace AORG >A050 Avoid F'WEB mailbox START EQU $ LWPI FWREGS LI R0,>2000 BLWP *R8 DATA 0,>300 BLWP *R9 DATA >64 DATA QUERY,QUELEN BLWP *R9 DATA >A4 DATA PROMPT,PRMLEN * Set CRU base SETO @@HEXDIG Allow only hex dihits BLWP @@FILENT DATA >A4+2,1 CLR R12 MOVB @@>8322,R12 >8322 is first byte of FILENT buffer ORI R12,>1000 (else use VMBR from screen) * Get dump file name DDNAM EQU >144 BLWP *R9 DATA >104 DATA DSAVN,DSAVL BLWP *R9 DATA DDNAM DATA DNAME,12 BLWP @@FILENT DATA DDNAM+3,1 MOVB @@>8322,@@DNAME+3 BLWP @@FILENT DATA DDNAM+11,1 MOVB @@>8322,@@DNAME+11 * Dump DSR to VDP <<<<<<<<<<<<<<<<<<< LI R0,>0100 >0001 for 16 bit HRDs >0100 for 8 LDCR R0,8 <<<<<<<<<<<<<< 8 or 0 for 16 BLWP *R9 VMBWD DATA VDPBUF DATA >4000,DSRLEN Assume no problems in reading memory mapped adr CLR R0 LDCR R0,8 <<<<<<<<<<<<<< 8 or 0 for 16 * Save file to disk *------------------------------ * Error return to title screen LI R0,DSRLEN MOV R0,@@FILLEN BLWP *R9 Load PAB data to VDP DATA VDPPAB DATA PABDAT,PABLEN LI R0,VDPPAB+9 Set SCNAME pointer MOV R0,@@>8356 BLWP @@DSRLNK FW DSRLNK (no data) JEQ ERROR Immediate error MOV @@CMSRET,R11 Fetch FW central menu return RT ERROR BLWP @@>0 * Various PAB data PABDAT DATA >0600,VDPBUF,>0 FILLEN DATA >2000 DATA >0C DNAME TEXT 'DSK5.DSRDMP1' NXFILE EQU $-1 PABLEN EQU $-PABDAT QUERY TEXT 'Which DSR CRU-base ?' QUELEN EQU $-QUERY PROMPT TEXT '>1000' PRMLEN EQU $-PROMPT DSAVN TEXT 'Dump to file' DSAVL EQU $-DSAVN EVEN END START Let's stop and catch our breath for a minute or two before we go ahead with the second part of this article. Since we have gotten to the point where the facility is in place to retrieve DSRs from various peripheral devices. Where do we go from there? One of the more novel uses of an eprom device is for the creation and production of custom cartridges for your system. How about ARCHIVER in a cartridge? or F'WEB? Or maybe even an A/L program that you wrote yourself. Let's look at that aspect of epromming. Eprom cartridges can be created by using an appropriate PC cartridge board and either a 2764 (8K) or 27128 (16K) eprom chip. TI made several boards that are suitable for this purpose but one of the easiest to use has the TI logo and serial # SK800805. The cartridge boards are scarce but TI might have some of them left. Call 1-800-TI-CARES or write to check on current availability and price. There are several traces to be cut, a couple of jumper wires, a 28-pin socket and a 1K resistor to be added and you are in business. The job takes about 20 minutes from start to finish and that includes letting the soldering iron warm up! I will be happy to help anyone who has the cartridge boards and wants to go from here. Just write. Another interesting modification is to add a toggle switch that brings pins 27 and 28 to ground to create a double cartridge with the 16K 27128 chip. Then, if you simultaneously reset the console and flip the switch, you can select the second 8K of the cartridge. The net result is that you could have, for example, F'WEB and ARCHIVER in a single cartridge. The first 8K of code is programmed into the eprom and then the second by stepping over the first lot with the appropriate starting address. It works great!! All that you need to get started is a bit of source code to create a GPL header for your program. Once again, Ron Kleinschafer came up with one that does the job very neatly -- all in the space of 34 bytes! * GPL header for eprommed Quest * By Ron Kleinschafer * Change program name, name length and program length for other programs AORG >6000 AORG at cartridge address DATA >AA01 Validation and Version DATA 0 DATA 0 DATA LINK GPL link DATA 0 DATA 0 LINK DATA 0 No more progs DATA PROG Point to program BYTE 13 Length of display name TEXT 'QUEST MANAGER' Display name PROG LWPI >8300 Use fast w/space LI R1,>1C58 Length of QUEST (or other program) LOOP MOV @@HERE-2(R1),@@>A050-2(R1) Move it out to RAM (backwards) DECT R1 DEC word move JNE LOOP Loop it all out B @@>A922 Run QUEST. bypass 0460 >A922 at >A050 HERE EQU $ QUEST must start here in eprom (or RAM) END This is a GPL header program for the Hunter Valley UG eprommer. Here are the specific changes that have to be made for other programs. BYTE 13 Change this to the length in characters that you want to appear on the menu -- remember to count the spaces in the title as characters. TEXT 'QUEST MANAGER' The actual screen title. LI R1,>1C58 Change >1C58 to the length of the program as indicated when EPROM loads it. B @@>A922 Change this to the entry point of your program That is really all there is to it. These few modifications will allow you to program virtually any program under 8K in length into a 2764 eprom and plug it into your console. The possibilities for creating your own utility or game cartridges is limited only by your imagination. It certainly gives you something to do on a cold, rainy evening. Although these two articles were written from my experience with the Hunter Valley Eprommer, there are a couple of others that could be used. Mechatronic produced one and there might be some other non-commercial ones floating around out there. The only limitations are those imposed by the software that comes with the eprommer. An eprommer isn't for everyone but there is no reason why a Users Group shouldn't have access to at least one. It would certainly go far to protect the members' equipment. It is something to think seriously about.