Ira Goldklang's TRS-80 Revived Site

Software Modifications/Patches

       



         Program Modifications and Patches - Menu
  • Putting and Running RESCUE AT RIGEL under Disk BASIC
  • Copying Copy-Protected VISICALC and SCRIPSIT
  • Copying Copy-Protected SUPER UTILITY PLUS to a CMD file
  • Converting Superscripsit to LDOS
  • Converting Model I to Model III

  •          Putting and Running RESCUE AT RIGEL under Disk BASIC
    RESCUE AT RIGEL is from the same stable as TEMPLE OF APSHAI. Many copies of the cassette version were sold in Australia & although not as cumbersome to load as TEMPLE,it does have some incompatibilities with Disk BASIC. The following modifications are not enhancements they simply allow the game to be saved to disk and to be played under a 48K Disk BASIC environment.
    There are two separate modules on the tape: The RESCUE module (i.e., the actual game in BASIC) and the DATA module (for the graphics).
    Step 1   Under Disk BASIC, CLOAD the RESCUE module. For the TRS-80 Model III, make sure you have the cassette baud rate set to L. (or POKE&H4211,0 from BASIC). Make the following changes:
    Add line 6, 'POKE &H40B1,&HC0 : POKE&H40B2,&HFA'
    From line 10, delete the expression ':ON ERROR GOTO 11'
    Delete line 11 entirely
    In line 16 change 'KA=31485' to 'KA=&HFAFD'
    Delete line 1100 entirely
    Change line 1610 to
    1610 OPEN"I",1,"RESCUE/DAT":K=0:FORI=1TO5:A$="" :INPUT#1,A$ :GOSUB1950
    
    Delete line 1660 entirely
    Change line 1960 to
    1960 MC!=USR0(KA+K)
    
    Step 2 Save the modified RESCUE module as "RESCUE/BAS:dn1".
    Step 3 Type in, save then run the following program. In response to 'Filespec...?', reply 'RESCUE/DAT:dn1'
    1 'Data transfer routine for RESCUE AT RIGEL
    2 'by Leonard J. Yates, 25 October 1984
    10 CLS : CLEAR 1000 : ON ERROR GOTO 160
    100 PRINT"Data transfer routine for RESCUE AT RIGEL"
    110 PRINT"Place cassette in player, cue and press 'PLAY'"
    120 LINE INPUT"Filespec for disk file (incl. drive no.):";FS$
    130 OPEN"O",1,FS$: FOR I=1 TO 5: PRINT@256,"Reading data #";I
    140 INPUT#-1,A$: IF LEN(A$)<>249 PRINT@256,"Data read error"
    150 PRINT@256,"Printing data #";I : PRINT#1,A$ : NEXT I
    160 CLOSE 1: PRINT"Data transfer complete" : PRINT : PRINT
    
    Step 4 On the disk,you should now have two files: RESCUE/BAS and RESCUE/DAT.To run the program, type RUN"RESCUE/BAS" under Disk BASIC. Unlike the cassette version, there is no need to set memory size and the game will load and run in a matter of seconds.

    Top of Page




             Copying Copy-Protected VISICALC and SCRIPSIT
    To make multiple copies of protected VISICALC and SCRIPSIT programs on a Model III:
    1.Make 2 backup copies as recommended in owner's manual.
    2.Insert one of the backup copies, without write protection, into drive 0 and press RESET.
    3.Enter BASIC and press ENTER for FILES and SIZE questions.
    4.Enter the following program exactly:
        10  Z=0: FOR X=28672 TO 28808: READ A: POKE X,A: Z=Z+A: NEXT
        60  IF Z=12099 THEN 70 ELSE PRINT "ERROR - CHECK DATA NUMBERS": END
        70  DEFUSRR0=&H7000: X=USR(0)
        90  DATA 49,240,111,33,136,0,229,241,33,0,64,229,253,225
        100 DATA 1,20,1,17,105,112,213,221,225,33,120,112,245,197
        110 DATA 213,229,205,66,68,5,5,5,5,205,54,68,17,48,0,33
        120 DATA 137,112,1,0,5,126,254,126,204,101,112,254,94,204
        130 DATA 101,112,25,16,242,1,0,5,17,47,1,33,153,112,54,239
        140 DATA 35,54,92,25,16,248,58,115,112,61,50,115,112,225
        150 DATA 209,193,241,205,66,68,5,205,60,68,195,45,64,62
        160 DATA 16,119,201,128,104,0,137,112,0,0,8,0,0,21,1,32,3
        170 DATA 0,31,32,0,16,31,64,0,32,31,96,0,48,31,128,0,64,31
    
    5.Type SAVE "SUPER" and press ENTER. Then RUN the program.
    6.The program will take 5 seconds to run, then will return to TRSDOS. You can now copy or backup VISICALC or SCRIPSIT.

    Top of Page




             Copying Copy-Protected SUPER UTILITY PLUS to a CMD file
    To make a CMD file of a copy-protected Super Utility Plus Disk:
    1.Start by booting SUPER UTILITY PLUS.
    2.Remove the disk and replace it with a SYSTEM disk with at least 29 free grans.
    3.Configure the utility to your system.
    4.Enter the memory utility by typing a 7.
    5.Enter the memory display by typing a 1.
    6.At the prompt enter EB00H for the address, H for hex entry mode and a M for modify, then place the cursor over EB01.
    7.Enter the following hex code.
    F3 21 00 60 11 00 40 01 00 8B ED B0 31 4C 41 ED 56 C3 15 40
    F3 21 00 CB 11 00 EB 01 01 8B ED B8 76 C7 00 4B 34 4B 41 4A
    
    8.Hit ENTER then BREAK.
    9.Jump to memory by entering 8 and at the prompt for the address enter EB15H.
    10.The system should boot to DOS.
    11.Dump memory from 6000H to EB28H with an entry point of EB01H.
    12.With NEWDOS/80 it would look like this.
    DUMP SUPLUS/CMD 6000H,EB28H,EB01H



             Converting Superscripsit to LDOS
    The TRS-80 Model III version of Superscripsit can now be patched to operate on the Model III version of LDOS. The latest version of Superscripsit (version 1.2.01) includes a Job Control Language (JCL) file called HARDDISK/JCL which contains all the patches to allow Superscripsit to operate under the LDOS system.
    The procedure to transfer Superscripsit to LDOS and apply the patches is as follows:
    1) Make up a LDOS system disk which includes SYS files 0,1,2,3,4,6,7,8,10,11 and 12. Also include the FORMAT/CMD, PATCH/CMD, CONV/CMD and BACKUP/CMD utilities. Use the following syntax: "BACKUP :0 :1 (Q=Y)"
    2) Place this LDOS system disk in drive:0 and a BACKUP COPY of TRSDOS 1.3 Superscripsit version 1.2.01 in drive:1.
    3) Under LDOS perform a CONV :1 :0 transferring only those files pertaining to Superscripsit. Transfer SCRIPSIT/CMD, S/CTL, SYSTEM/CTL, HELP/CTL, ERRORS/CTL, all SCRxx/CTL files and the required printer driver files (ie. LP8/CTL, DW2/CTL etc). Do not transfer the TRSDOS utilities MEMTEST/CMD, HERTZ50/CMD, BASIC/CMD, CDNVERT/CMD, XFERSYS/CMD or LPC/CMD.
    4) Remove the TRSDOS Superscripsit disk from drive:1.
    5) Apply the patches to the Superscripsit files by typing "DO=HARDDISK/JCL". The screen will display the file patches as they are applied. When the patches have been completed the screen should display the message:
         "Patch(s) successfully installed"
         "Job done."
    
    After the file patches have been applied you may purge SYS 11 and the HARDDISK/JCL files from the LDOS Superscripsit disk if you require more space on the disk.
    Backups of the new LDOS Superscripsit disk should be made immediately the conversion has been completed.



             Converting Model I to Model III
    Like many Model III owners who also own a Model I, I have been impressed with the capabilities of the Model III and dismayed at the lack of software currently available for the Model III. Most basic programs for the Model I which don't use peeks or pokes to 'undocumented' memory locations will work pretty well on the Model III, but many machine language programs, especially those which use undocumented DOS calls or direct I/O to Model I memory mapped locations will not function well, if at all. THIS Articles will deal with conversion of Model I software to the Model III. Most of the information will relate to disk versions of the Model I and Model III, although some of the general guidelines will also be applicable to cassette as well.
    First, let's look at some important address changes:
    1.4049H - in the Model I, this is where the top of available memory is stored (TOP$). Disk BASIC and many other programs like SCRIPSIT, EDTASM (Apparat's) and MNET-80'S lower case driver, look at this address in order to set up memory protection or to determine the amount of available buffer space. in the Model III. This has been changed to 4411H and it is used in exactly the same way.
    2.4467H - This is the address of an 'undocumented' Model I dos call which was used to display a message pointed to by the HL register. it doesn't exist in the Model III TRSDOS, but is now available in the Model III rom at 021BH. One important Model I utility which uses 4467H is Apparat's LMOFFSET/CMD. It will work just fine by changing all of the 4467H calls to 021BH.
    3.37E8H - This is the Model I'S memory-mapped parallel printer address. SCRIPSIT, RSM-2D and many other programs use this to output directly to the parallel printer. in the Model III, 37E8H can be 'read' or peeked to determine printer status, but not written to. In the Model III the parallel printer port is Z-80 port 0F8H.
    4.37ECH THRU 37EFH - In the Model I, these four addresses along with 37E0H-37E1H are memory-mapped to access the disk controller (see Bill Barden's disk interfacing guide for details). THese addresses don't exist in the Model III at all. Instead, ports 0F0H thru 0F3H are used, with port 0F4H as the drive select latch. Even knowing this, conversion will not be a simple matter, owing to the double density used in the Model III which makes timing very critical indeed.
    So far, I have found that the most useful utility in making conversions from the Model I to the Model III is Small System Software's RSM-2D. It allows the user to search for particular addresses in a machine language program and its disassembler is extremely valuable in checking how things work. Most of RSM-2D's features will work as is on the Model III and a simple patch (given below) will fix it to output to the parallel printer. I have not yet been able to fix it so that the disk sector read and write functions will work, due to the changes noted in 4. above.
    A patch to enable the printing function for RSM-2D. This applies to the 32k version and the 16K and 48K version can be patched by subtracting or adding 4000H to the addresses given here.
    Use the Model III's PATCH command to make the following four patches:
    PATCH RSM32/CMD (ADD=0CA0F,FIND=00000000,CHG=CD08ADCB)
    PATCH RSM32/CMD (ADD=0AC13,FIND=00000000,CHG=7E20F9C9)
    PATCH RSM32/CMD (ADD=0B067,FIND=CD08ADCB7E,CHG=CD0FAC0000)
    PATCH RSM32/CMD (ADD=0B06C,FIND=20F9F177F5,CHG=00F1D3F8F5)
    
    That's it and now RSM-2D's printing function will work as advertised.
    This article will describe the patches for a number of the Model I useful utility programs to allow their use on the Model III. These are all disk-based and the assumption is that they have been transferred over to a disk-based Model III with at least 32K of RAM, Using the Model III's convert utility. the TRSDOS currently in use on the Model III is version 1.1 (more on that later). Since all of the changes are in the form of patch commands to be executed from the dos level, an easy way would be to combine the ones you want into a 'do' file using the 'build' command and execute them all at once.
    1. LMOFFSET/CMD (FROM APPARAT'S NEWDOS80)
    PATCH LMOFFSET/CMD (ADD=566C,FIND=4940,CHG=1144)
    PATCH LMOFFSET/CMD (ADD=558F,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5711,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5774,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5783,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5791,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=579F,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=57C7,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5941,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5947,FIND=6744,CHG=1B02)
    PATCH LMOFFSET/CMD (ADD=5953,FIND=6744,CHG=1B02)
    
    2. EDTASM/CMD (FROM APPARAT'S NEWDOS80)
    PATCH EDTASM/CMD (ADD=589D,FIND=4940,CHG=1144)
    
    3. DISASSEM/CMD (FROM APPARAT'S NEWDOS80)
    PATCH DISASSEM/CMD (ADD=6021,FIND=4940,CHG=1144)
    
    4. SCRIPSIT/LC (RADIO SHACK's standard disk version)
    PATCH SCRIPSIT/LC (ADD=5244,FIND=32E837,CHG=D3F800)
    PATCH SCRIPSIT/LC (ADD=665E,FIND=32E837,CHG=D3F800)
    PATCH SCRIPSIT/LC (ADD=6722,FIND=32E837,CHG=D3F800)
    PATCH SCRIPSIT/LC (ADD=7A97,FIND=32E837,CHG=D3F800)
    PATCH SCRIPSIT/LC (ADD=7A9E,FIND=32E837,CHG=D3F800)
    
    Comments: The patches given here allow SCRIPSIT to output to the parallel printer. I don't have a serial printer, but since both Model I and Model III use the same RS-232 port assignments, serial printing should be ok. Be sure to use setcom to set up the parameters for your particular printer before going to scripsit. You'll have to experiment to find out whether the 'WAIT' or 'NOWAIT' option should be used. these patches work for TRSDOS 1.1. I Understand you may have trouble with text file loads and saves under version 1.2. Radio Shack is fixing this, but for now, keep your patched SCRIPSIT on a 1.1 Diskette. I'll try to update this whenever i get a copy of 1.2.
    5. MNEXEC/CMD (CIS'S MICRONET EXECUTIVE, DISK VERSION)
    PATCH MNEXEC/CMD (ADD=F3C2,FIND=4940,CHG=1144)
    
    Comments: Obviously, this patch is for the 48K version. For the 32K version, the address should probably be B3C2. This patch is an absolute must to keep basic from clobbering the MNEXEC program.
    6. SCRIPSIT
    For the Model I has a serial driver which reads the DIP switches and programs the RS-232-C card to drive a serial printer. To fix this for Model III use, the block of code from 661AH to 662FH must be zeroed. The following five patches will accomplish this:
    PATCH SCRIPSIT/LC (ADD=661A,FIND=DBE9E6F8,CHG=00000000)
    PATCH SCRIPSIT/LC (ADD=661E,FIND=F604D3EA,CHG=00000000)
    PATCH SCRIPSIT/LC (ADD=6622,FIND=DBE9E607,CHG=00000000)
    PATCH SCRIPSIT/LC (ADD=6626,FIND=210F6B0600,CHG=0000000000)
    PATCH SCRIPSIT/LC (ADD=662B,FIND=4F097ED3E9,CHG=0000000000)
    
    Before executing SCRIPSIT, use setcom to set the interface to the parameters required by your particular serial printer. then when printing, use SCRIPSIT's 'P,S' command to output the text to the printer. Incidentally, if you don't want to use these patches, the same result can be obtained by using the TRSDOS ROUTE command:
    ROUTE (SOURCE=PR,DESTIN=RO)
    
    Then, all output which normally would go to the parallel printer will go to the serial output. In this case, you would use scripsit's normal 'P' command for printing.