home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / articles / archives / limanews.exe / EPROMMER.TXT < prev    next >
Text File  |  2006-10-19  |  11KB  |  232 lines

  1. ORIGINALLY PUBLISHED IN LIMA NEWSLETTER OCTOBER 1993
  2.  
  3.                             TO EPROM OR NOT TO EPROM? 
  4.                                  By Bob Carmany 
  5.                               Lima Ohio User Group 
  6.  
  7.      In 1987, the Hunter Valley (Australia) UG printed the plans for a
  8. "home-brew" eprommer in their August newsletter.  It was a rather cumbersome
  9. device as it was originally developed but, nevertheless, very interesting idea.
  10. It wasn't until 1990 that I finally got around to serious consideration of
  11. adding one to my system.  The rationale was to use the eprommer to replace any
  12. aging and failed DSR ROMs in my peripheral devices.  The Hunter Valley unit and
  13. accompanying software would do everything that I needed --and much more.  It
  14. would read eproms from any device, save the code to back to disk, allow for the
  15. alteration of the code, and check eprom chips for erasure as well as verify the
  16. completed eprom.  Since the eprom type was selected by means of a wired
  17. "personality plug", the list of eproms acceptable was quite impressive.  The
  18. final modification was the addition of a toggle switch on the power supply to
  19. allow the use of both 12.5V and 21/25V chips to be used.  It was early 1990
  20. that I finally made the arrangements with Ron Kleinschafer to have one shipped
  21. to me.  The hardware and software were developed by Ron Kleinschafer of the
  22. Hunter Valley 99'ers. 
  23.      One of the first projects that I used it for was the duplication of a set
  24. of GRAFTRAX chips for a friend who was concerned about the availability of
  25. replacements should the ones in his EPSON printer fail.  The chips were
  26. socketed 2716 eproms and all that was required was to take each of them out of
  27. the sockets in turn and read the contents into memory with the Eprommer
  28. software and save the lot to disk for later programming.  Nothing spectacular
  29. but it did impress my friend and give hime the peace of mind knowing that his
  30. investment was covered against possible future failure. 
  31.      The 2716 eproms are 2K chips that are commonly used in printers to store
  32. the operating systems or to enhance the basic system supplied with the stock
  33. over-the-counter model.  That is exactly what GRAFTRAX was designed to do.  The
  34. three 2716 chips gave the EPSON printers enhanced graphics and additional font
  35. capabilities and were available as an add-on for awhile before they went out of
  36. production. 
  37.      With that project out of the way, I quickly set to work duplicating the
  38. eproms in my STAR STX-80 thermal printer and my STAR NX-1000.  The versatility
  39. of the HV99 Eprommer and the software had already paid for the investment in
  40. time and eprom chips. 
  41.      Perhaps the most versatile eprom chip is the TMS2532.  It can be used as a
  42. direct replacement for the ROM chips in most of the peripheral devices for the
  43. TI.  The ROM chips in the RS232 and Disk Controller are good examples as well
  44. as the even and odd byte console ROMs.  A TMS2532 can be programmed to replace
  45. any of these should they fail.  In fact, the recent modifications to the RS232
  46. code and the Disk Controller were done on these chips.  The only problem is
  47. getting the code from the DSR ROM into memory and then onto a disk.  There are
  48. a couple of ways it can be accomplished. 
  49.      The code can be moved from its normal address at >4000 to another memory
  50. address with a program like SBUG and then saved to disk with the HV99 (or
  51. other) eprom device.  The second (and much easier) way is to use the program at
  52. the end of this article developed in about 30 minutes by Tony McGovern.  All
  53. that is required is to enter the CRU address of the peripheral and then edit
  54. the file to the correct length when you are done. 
  55.  
  56.  
  57. *  Program to dump SINGLE 8K ROM DSRs to disk
  58. *--------------------------------------------
  59. *  By PA McGovern
  60. *  Object file is auto-run out of F'WEB only
  61. *  Raw dump - no EA 6 word file header
  62. *  Change DSRLEN EQU as needed eg >1000 for 4K
  63. *  Change CRU address as needed       <<<<<<<<<<<<<
  64. *  Then reassemble
  65.  
  66. *  FUNNELWEB EQUS
  67. DSRLNK EQU  >FFD4
  68. FILENT EQU  >FFCC
  69. FWREGS EQU  >FF7C
  70. CMSRET EQU  >FF5C
  71. HEXDIG EQU  >FF24
  72. VDPPAB EQU  >1000
  73. VDPBUF EQU  >1050
  74. *  Set length of DSR to be saved
  75. DSRLEN EQU  >2000             For full 8K DSR
  76. *  Use FW workspace
  77.        AORG >A050             Avoid F'WEB mailbox
  78. START  EQU  $
  79.        LWPI FWREGS
  80.        LI   R0,>2000
  81.        BLWP *R8
  82.        DATA 0,>300
  83.        BLWP *R9
  84.        DATA >64
  85.        DATA QUERY,QUELEN
  86.        BLWP *R9
  87.        DATA >A4
  88.        DATA PROMPT,PRMLEN
  89. *  Set CRU base
  90.        SETO @@HEXDIG           Allow only hex dihits
  91.        BLWP @@FILENT
  92.        DATA >A4+2,1
  93.        CLR  R12
  94.        MOVB @@>8322,R12        >8322 is first byte of FILENT buffer
  95.        ORI  R12,>1000            (else use VMBR from screen)
  96. *  Get dump file name
  97. DDNAM  EQU  >144
  98.        BLWP *R9
  99.        DATA >104
  100.        DATA DSAVN,DSAVL
  101.        BLWP *R9
  102.        DATA DDNAM
  103.        DATA DNAME,12
  104.        BLWP @@FILENT
  105.        DATA DDNAM+3,1
  106.        MOVB @@>8322,@@DNAME+3
  107.        BLWP @@FILENT
  108.        DATA DDNAM+11,1
  109.        MOVB @@>8322,@@DNAME+11
  110. *  Dump DSR to VDP     <<<<<<<<<<<<<<<<<<<
  111.        LI   R0,>0100          >0001 for 16 bit HRDs   >0100 for 8
  112.        LDCR R0,8              <<<<<<<<<<<<<<   8 or 0 for 16
  113.        BLWP *R9               VMBWD
  114.        DATA VDPBUF
  115.        DATA >4000,DSRLEN      Assume no problems in reading memory mapped adr
  116.        CLR  R0
  117.        LDCR R0,8              <<<<<<<<<<<<<<   8 or 0 for 16
  118. *  Save file to disk
  119. *------------------------------
  120. *  Error return to title screen
  121.        LI   R0,DSRLEN
  122.        MOV  R0,@@FILLEN
  123.        BLWP *R9               Load PAB data to VDP
  124.        DATA VDPPAB
  125.        DATA PABDAT,PABLEN
  126.        LI   R0,VDPPAB+9       Set SCNAME pointer
  127.        MOV  R0,@@>8356
  128.        BLWP @@DSRLNK           FW DSRLNK (no data)
  129.        JEQ  ERROR             Immediate error
  130.        MOV  @@CMSRET,R11       Fetch FW central menu return
  131.        RT
  132. ERROR  BLWP @@>0
  133. *  Various PAB data
  134. PABDAT DATA >0600,VDPBUF,>0
  135. FILLEN DATA >2000
  136.        DATA >0C
  137. DNAME  TEXT 'DSK5.DSRDMP1'
  138. NXFILE EQU  $-1
  139. PABLEN EQU  $-PABDAT
  140. QUERY  TEXT 'Which DSR CRU-base ?'
  141. QUELEN EQU  $-QUERY
  142. PROMPT TEXT '>1000'
  143. PRMLEN EQU  $-PROMPT
  144. DSAVN  TEXT 'Dump to file'
  145. DSAVL  EQU  $-DSAVN
  146.        EVEN
  147.        END  START
  148.  
  149.      Let's stop and catch our breath for a minute or two before we go ahead
  150. with the second part of this article. 
  151.      Since we have gotten to the point where the facility is in place to
  152. retrieve DSRs from various peripheral devices.  Where do we go from there? One
  153. of the more novel uses of an eprom device is for the creation and production of
  154. custom cartridges for your system.  How about ARCHIVER in a cartridge? or
  155. F'WEB? Or maybe even an A/L program that you wrote yourself.  Let's look at
  156. that aspect of epromming. 
  157.      Eprom cartridges can be created by using an appropriate PC cartridge board
  158. and either a 2764 (8K) or 27128 (16K) eprom chip.  TI made several boards that
  159. are suitable for this purpose but one of the easiest to use has the TI logo and
  160. serial # SK800805.  The cartridge boards are scarce but TI might have some of
  161. them left.  Call 1-800-TI-CARES or write to check on current availability and
  162. price.  There are several traces to be cut, a couple of jumper wires, a 28-pin
  163. socket and a 1K resistor to be added and you are in business.  The job takes
  164. about 20 minutes from start to finish and that includes letting the soldering
  165. iron warm up!  I will be happy to help anyone who has the cartridge boards and
  166. wants to go from here.  Just write. 
  167.      Another interesting modification is to add a toggle switch that brings
  168. pins 27 and 28 to ground to create a double cartridge with the 16K 27128 chip.
  169. Then, if you simultaneously reset the console and flip the switch, you can
  170. select the second 8K of the cartridge.  The net result is that you could have,
  171. for example, F'WEB and ARCHIVER in a single cartridge.  The first 8K of code is
  172. programmed into the eprom and then the second by stepping over the first lot
  173. with the appropriate starting address.  It works great!! 
  174.      All that you need to get started is a bit of source code to create a GPL
  175. header for your program.  Once again, Ron Kleinschafer came up with one that
  176. does the job very neatly -- all in the space of 34 bytes! 
  177.  
  178.  
  179. * GPL header for eprommed Quest
  180. * By Ron Kleinschafer
  181. * Change program name, name length and program length for other programs
  182.  
  183.        AORG >6000                       AORG at cartridge address
  184.        DATA >AA01                       Validation and Version
  185.        DATA 0
  186.        DATA 0
  187.        DATA LINK                        GPL link
  188.        DATA 0
  189.        DATA 0
  190. LINK   DATA 0                           No more progs
  191.        DATA PROG                        Point to program
  192.        BYTE 13                          Length of display name
  193.        TEXT 'QUEST MANAGER'             Display name
  194. PROG   LWPI >8300                       Use fast w/space
  195.        LI   R1,>1C58                    Length of QUEST (or other program)
  196. LOOP   MOV  @@HERE-2(R1),@@>A050-2(R1)    Move it out to RAM (backwards)
  197.        DECT R1                          DEC word move
  198.        JNE  LOOP                        Loop it all out
  199.        B    @@>A922                      Run QUEST. bypass 0460 >A922 at >A050
  200. HERE   EQU  $                           QUEST must start here in eprom (or RAM)
  201.        END
  202.  
  203.      This is a GPL header program for the Hunter Valley UG eprommer.  Here are
  204. the specific changes that have to be made for other programs. 
  205.  
  206.        BYTE 13      Change this to the length in characters that you want to
  207.                     appear on the menu -- remember to count the spaces in the
  208.                     title as characters. 
  209.  
  210.        TEXT 'QUEST MANAGER' The actual screen title. 
  211.  
  212.        LI R1,>1C58  Change >1C58 to the length of the program as indicated when
  213.                     EPROM loads it. 
  214.  
  215.        B  @@>A922   Change this to the entry point of your program 
  216.  
  217.  
  218.      That is really all there is to it.  These few modifications will allow you
  219. to program virtually any program under 8K in length into a 2764 eprom and plug
  220. it into your console.
  221.      The possibilities for creating your own utility or game cartridges is
  222. limited only by your imagination.  It certainly gives you something to do on a
  223. cold, rainy evening. 
  224.      Although these two articles were written from my experience with the
  225. Hunter Valley Eprommer, there are a couple of others that could be used.
  226. Mechatronic produced one and there might be some other non-commercial ones
  227. floating around out there.  The only limitations are those imposed by the
  228. software that comes with the eprommer.  An eprommer isn't for everyone but
  229. there is no reason why a Users Group shouldn't have access to at least one.  It
  230. would certainly go far to protect the members' equipment.  It is something to
  231. think seriously about. 
  232.