Project to modify MDOS to make GPL resident ------------------------------------------- Tony Knerr August-October 2010 -------------------------------- 1. INITGPL INITGPL is a modified version of GPL. It is run once after MDOS has booted to load the TI ROM and GROM files and make the necessary patches for use with the Geneve. It also loads the program GPL Cheater into page >31 for instant access with the MDOS command GPL. It sets the GPL loaded flag in MDOS. After running, it restarts MDOS. 2. GPLTEST GPLTEST is a program that reads the GPL (previously TIMODE) flag in MDOS to determine whether INITGPL has been previously run. The flag is on memory page >00 at offset >0126. GPLTEST will return a "Y" into the %1 variable if that lcation contains the value >FFFF. The code "IF %1==Y goto xxxx" is used as the next line in Autoexec where "xxxx" is a point where the loading of INITGPL can be skipped. 3. TILINK TILINK is the special linker for producing the GPL or GPLCHEATER files. It normally produces a protected file with a load address of >0401. The protection scheme has been removed so that a version of GPLCHEATER can be produced which can be stored and run from memory page >31. When producing the file GPL, the first byte of the file header must be manually changed to >FF in order to load the subsequent GPM, GPN, GPo, & GPP files. 4. MDOS MDOS has been modified in several ways. The command "GPL" has been added. GPL instantly activates the program GPL CHEATER by Tim Tesch stored in page >31 by the INITGPL program. The GPL command will also load a cartridge from the command line if the filename is typed after the command on the same line. Example: "GPL HDS1.XB", without the quotes. The TIMODE flag is now used to determine whether GPL has been pre-loaded. TIMODE has been made permanent. Changes documented as follows: \HEAD\BATCMDS * Comment out or delete all lines between "AUTTIM MOV R11,R10" and "B *R10" (line "B *R10" is right before "TIMPAG BYTE >3F,>3E,>3D,>3C") \HEAD\HCLIS * Comment out or remove line "CLR @GPLPAR" \HEAD\HPAGES * Insert the following lines after the line "BYTE P_RESV BWM 8.24.92 FOR TIMODE PERM FIX" BYTE >3F,>3E,>3D,>3C BYTE >3B,>3A,>39,>38 BYTE >37,>36,>35,>34 BYTE >33 BYTE >EC,>ED,>EE,>EF BYTE >28,>29,>2A,>2B BYTE >2C,>2D,>2E,>2F \HEAD\OSTASK * Change the data in line "GPLPAR DATA 0 STRING TO CONTROL SPEED OF GPL INTERPRETER" from 0 to >FFFF \HEAD\OSHEAD1S * Change the data in line "GPLPAR DATA 0 STRING TO CONTROL SPEED OF GPL INTERPRETER" from 0 to >FFFF \HEAD\TASKHEADS * Change the data in line "GPLPAR DATA 0 STRING TO CONTROL SPEED OF GPL INTERPRETER" from 0 to >FFFF 5. GPL, GPLCHEATER, and EXEC These 3 programs have been modified to restart MDOS when exiting. MDOS does not allow them to continue in a batch file that they are run from, so this is the next best alternative. The following code replaces the normal "BLWP @>0000" code for exiting: * RSTART LWPI >F000 LI R14,CODSTR LI R15,>F020 LOOPZZ MOV *R14+,*R15+ CI R14,CODEND JNE LOOPZZ B @>F020 CODSTR LIMI 0 CLR @>F110 BLWP @0 CODEND DATA >0000 * 6. TI GROM0 file The TI GROM0 file, normally named GPN,(or INITGPN in the INITGPL series of files) has been modified to add an additional menu entry. "1 FOR RETURN TO MDOS" is now the first menu entry. This provides a quick and easy return to MDOS. You can also type "CALL MDOS" from TI BASIC or any of the Extended Basics to return to MDOS. 7. CLEARGPL The program CLEARGPL is used for testing purposes. It clears the GPL LOADED flag in MDOS.