sparkdrummer Posted September 20, 2019 Share Posted September 20, 2019 I have discovered an odd problem using BOOT with different flavors of XB like RXB and MECHATRONICS for examples. Using RalphB's excellent FinalGrom I have loaded up RXB and selected an Extended basic program from my my Boot menu - after doing so BOOT complains No Ex-Basic, press any key. Same thing happens when trying the Mechatronics version. Others may as well? Super Extended Basic works fine, as well as TI's v110. Is BOOT looking for a specific version of XB? I am using V 12/13/89 version of BOOT. Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted September 20, 2019 Share Posted September 20, 2019 Are you using the original version of Mechatronics XB or are you using the II Plus version? The earlier one should respond like the normal XB (or the Exceltek or MicroPAL versions, as all were licensed copies of TI XB). You might want to try the Winkler XB3 and Tony's XB 2.7 as well. There aren't a lot of compatibility issues between older programs and different flavors of XB, but we definitely need to document them when they do show up. Quote Link to comment Share on other sites More sharing options...
sparkdrummer Posted September 20, 2019 Author Share Posted September 20, 2019 I am using the XB variants as supplied on the FINALGROM package. Quote Link to comment Share on other sites More sharing options...
RXB Posted September 20, 2019 Share Posted September 20, 2019 (edited) 1 hour ago, sparkdrummer said: I have discovered an odd problem using BOOT with different flavors of XB like RXB and MECHATRONICS for examples. Using RalphB's excellent FinalGrom I have loaded up RXB and selected an Extended basic program from my my Boot menu - after doing so BOOT complains No Ex-Basic, press any key. Same thing happens when trying the Mechatronics version. Others may as well? Super Extended Basic works fine, as well as TI's v110. Is BOOT looking for a specific version of XB? I am using V 12/13/89 version of BOOT. Older versions of RXB have a different address that Boot goes to that was modified for RXB. BOOT just took for granted every XB version would have ZERO CHANGES. Instead of using the GROM header for what address to start at, BOOT screwed the pooch and just jumps to a oddball address. It is like not expecting any changes to all XB versions and should always remain the same, also why some XB fail to boot properly. What every program like BOOT or FW should do is look at the GROM header and use that address, THAT IS THE REASON FOR THE HEADER IN THE FIRST PLACE!! I would like everyone to remember way back in 1996 I proposed a standard for GROM access and everyone ignored me at that standards meeting. Guess they should have listened to me. Edited September 20, 2019 by RXB Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted September 20, 2019 Share Posted September 20, 2019 Based on what I know from my work with BOOT and MENU, you cannot use the GROM header to execute the steps necessary to intercept the "DSK1.LOAD" process. BOOT does use the header address to start the cartridge normally. Don't conflate the two processes as they take different paths to starting XB. A 'simple' test might be to sector edit BOOT, replacing the standard XB address with the modified RXB address. (I won't argue the merits of expecting XB to remain the same; it is just as perilous as similar arguments about ignoring or changing the rules for DSR access, hardware conventions, etc. ) Quote Link to comment Share on other sites More sharing options...
RXB Posted September 21, 2019 Share Posted September 21, 2019 9 hours ago, InsaneMultitasker said: Based on what I know from my work with BOOT and MENU, you cannot use the GROM header to execute the steps necessary to intercept the "DSK1.LOAD" process. BOOT does use the header address to start the cartridge normally. Don't conflate the two processes as they take different paths to starting XB. A 'simple' test might be to sector edit BOOT, replacing the standard XB address with the modified RXB address. (I won't argue the merits of expecting XB to remain the same; it is just as perilous as similar arguments about ignoring or changing the rules for DSR access, hardware conventions, etc. ) What would be the point of upgrades if everything has to remain exactly the same? What actually could be upgraded? As for the GROM header you have to access GROM to execute XB so that routine is already there they are just to lazy to look. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted September 21, 2019 Share Posted September 21, 2019 5 hours ago, RXB said: As for the GROM header you have to access GROM to execute XB so that routine is already there they are just to lazy to look. No, this is not about laziness. There are TWO DIFFERENT processes involved. The process BOOT uses to 'trick' XB into loading a program via the "DSK1.LOAD" mechanism does NOT follow the same execution path. 5 hours ago, RXB said: What would be the point of upgrades if everything has to remain exactly the same? What actually could be upgraded? I did not say everything has to remain exactly the same. Please re-read my original post. Here is the basic routine from MENU. Location >63D1 is expected to contain a 'GOSUB' to >64DE. If not found, menu (or boot) tells the user there is no (compatible) XB cartridge. BL @GRMCUR Get current Grom address MOV R1,R4 Save it LI R1,>63D1 We want to see if at Grom >63D1 there is a GOSUB @>64DE BL @GRMADR So, set Grom Address at >63D1 BL @GETGRM Read 2 bytes at Grom >63D1 CI R1,>648E Is there a GOSUB @>64DE? JEQ MYINT1 Yes, jump MOV R4,R1 No, restore old Grom address and exit JMP MYINT2 (Edit: Added cartridge address test for completeness) XBPROG LI R1,>6372 C R1,@CARTAD JEQ RUNXB Quote Link to comment Share on other sites More sharing options...
sparkdrummer Posted September 21, 2019 Author Share Posted September 21, 2019 I don’t suppose there is an easy “patch” to have the other flavors of XB to work? Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted September 21, 2019 Share Posted September 21, 2019 Thinking about this a bit more... Even though the menu load routine doesn't rely upon the GROM header address, Rich is right about there being a hard-coded address problem. The GROM header startup address is hardcoded in MENU (and presumably BOOT), which in turn is used to detect the XB cartridge BEFORE the load is attempted. (This was implemented to stop users from mistakenly trying to load an XB program when the cartridge wasn't selected/inserted.) RXB and other variants may have different and/or additional menu selections and corresponding different startup addresses. There are a few ways to get around this. The first would be to disable the GROM header test; if the user tries to load an XB program with the wrong cart, let the crash happen. Another option would be to tailor BOOT to look for your chosen cartridge. RXB 2015E (in Classic99) appears to use a startup address of 7EA3 for the first menu selection. XB uses 6372. If you search the BOOT program for 6372 and replace it with 7ea3, conceivably BOOT will load the XB program. 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted September 21, 2019 Share Posted September 21, 2019 4 hours ago, InsaneMultitasker said: No, this is not about laziness. There are TWO DIFFERENT processes involved. The process BOOT uses to 'trick' XB into loading a program via the "DSK1.LOAD" mechanism does NOT follow the same execution path. I did not say everything has to remain exactly the same. Please re-read my original post. Here is the basic routine from MENU. Location >63D1 is expected to contain a 'GOSUB' to >64DE. If not found, menu (or boot) tells the user there is no (compatible) XB cartridge. BL @GRMCUR Get current Grom address MOV R1,R4 Save it LI R1,>63D1 We want to see if at Grom >63D1 there is a GOSUB @>64DE BL @GRMADR So, set Grom Address at >63D1 BL @GETGRM Read 2 bytes at Grom >63D1 CI R1,>648E Is there a GOSUB @>64DE? JEQ MYINT1 Yes, jump MOV R4,R1 No, restore old Grom address and exit JMP MYINT2 (Edit: Added cartridge address test for completeness) XBPROG LI R1,>6372 C R1,@CARTAD JEQ RUNXB Quote Link to comment Share on other sites More sharing options...
RXB Posted September 21, 2019 Share Posted September 21, 2019 (edited) OK LOOK THERE IS NO GPL COMMAND AT >64D1 that is the wrong address. This is a case of someone that does not know crap about the GPL code at all. There is a GPL line at >64D0 i.e. <0356> 64D0 06,80,24 CALL G8024 Is it? But that is just >8024 so why not just go to >8024 instead of using >64D1? WTF is going on here? You are talking to a guy that bought and owns the original XB 110 GPL source code since 1991 Also there is no command a >64DE so look at the original code for XB 110? i.e. <0368> 64ED 44,F9 BR G64F9 <0369> 64EF 0F,83 ILLST XML SCROLL Scroll the screen for message Again someone that has no freaking clue about GPL they just randomly picked address to use. This is just picking bytes out of thin air not knowing what they do and expecting them to never change. All of RXB source code has been posted since 2001 and I kept all the original Texas Instruments sections and commented them. Nothing has been erased or is missing in RXB I just added * PATCH CODE * in the comments to show where this is done. Here is most of the RUN command in GROM 3: <0190> 6372 86,A3,70 TOPLEV CLR V@>0370 Initialize temp area <0191> 6375 35,00,4D MOVE 77,V@>0370,V@>0371 6378 A3,71,A3 637B 70 <0192> * RXB MODULE PATCH CODE FOR RXB MODULE ******************** <0193> * ST 5,@KEYBD Select full keyboard <0194> * SCAN <0195> * CZ @KEYBD <0196> * BR G6388 99/4A Console? <0197> 637C 06,7E,5C CALL CART * RXB PATCH CODE FOR CARTRIDE <0198> 637F BE,A3,BB ST >01,V@CONFLG Select 99/4A console 6382 01 <0199> 6383 86,74 G6388 CLR @KEYBD <0200> * RXB MODULE PATCH CODE FOR RXB MODULE ******************** <0201> * DST NLNADD,V@BUFSRT Initialize edit-buffer start <0202> * DST NLNADD,V@BUFEND Initialize edit-buffer end <0203> 6385 31,00,02 MOVE 2,G@ATNZZ,@INTRIN Get address of ATNZZ 6388 38,00,32 <0204> 638B B2,38,1F AND >1F,@INTRIN Throw away the BR opcode <0205> 638E A3,38,00 DADD >5B,@INTRIN Address of polynomial constan 6391 5B <0206> * RXB PATCH CODE ************* <0207> 6392 BE,A3,71 ST >31,V@LODFLG indicate try auto-boot 6395 31 <0208> 6396 43,A5 BR SZNEW <0209> <0210> AORG >03A5 <0211> *---------------------------------------------------------- <0212> * Add the following line for fixing "MEMORY FULL" error <0213> * occurring during MERGE execution will leave the file open <0214> * to disk DSR bug, 5/19/81 <0215> 63A5 86,A3,9E SZNEW CLR V@MRGPAB Initialize merged temporary * Warning - Address not even in 0215 <0216> * for PAB pointer <0217> *---------------------------------------------------------- <0218> 63A8 BE,73,88 ST RSTK,@SUBSTK Load base of subroutine stack <0219> 63AB 06,69,17 CALL CHRTA2 Load character table <0220> 63AE 86,45 CLR @FLAG Initialize flag byte <0221> 63B0 87,46 DCLR @BUFLEV Initialize crunch buffer leve <0222> 63B2 06,80,12 CALL CLSALL Close all open files <0223> 63B5 86,34 CLR @DATA Initialize READ/DATA pointer <0224> 63B7 BF,6E,09 DST VRAMVS,@VSPTR Initialize base of value stac 63BA 58 <0225> 63BB BD,24,6E DST @VSPTR,@STVSPT Save in permanent base <0226> 63BE BD,A3,88 DST @VSPTR,V@SAVEVP 63C1 6E <0227> 63C2 06,68,C3 CALL INITPG Initialize program & s.t. <0228> 63C5 06,A0,18 CALL INTRND Initialize random number <0229> 63C8 8E,A3,71 CZ V@LODFLG <0230> 63CB 63,D3 BS TOPL02 If need auto-boot <0231> * RXB PATCH CODE ************* <0232> * CLR V@LODFLG Won't ever need to do again <0233> 63CD 43,D0 BR G63D0 <0234> <0235> * RXB PATCH CODE ****************************************** <0236> AORG >03D0 <0237> <0238> 63D0 06,64,8E G63D0 CALL AUTOLD Attempt an auto-boot 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0015 EDIT-359 <0239> * Label TOPL02 is used by auto-boot in detection of err <0240> 63D3 ERRRDY EQU $ <0241> 63D3 06,6A,84 TOPL02 CALL G6A84 Say READY <0242> 63D6 00 BYTE 0 * returns to TOPL15 <0243> 63D7 06,68,C3 TOPL05 CALL INITPG Initialize program space <0244> 63DA 06,68,DC TOPL10 CALL KILSYM Kill the symbol table <0245> * RXB PATCH CODE ************* <0246> * TOPL15 AND >F7,@FLAG If error in UDF execution <0247> 63DD 05,7E,14 TOPL15 B MYSRCH <0248> 63E0 BE,74,05 G63E0 ST 5,@KEYBD Select full keyboard <0249> 63E3 03 SCAN <0250> 63E4 86,74 CLR @KEYBD <0251> 63E6 BE,73,88 TOPL20 ST RSTK,@SUBSTK Initialize subroutine stack <0252> 63E9 BF,20,02 TOPL25 DST NLNADD,@VARW Screen addr = lower left corn 63EC E2 <0253> 63ED 86,80,89 CLR @RAMFLG Clear the RAMFLG <0254> 63F0 86,44 CLR @PRGFLG Make sure not in program mode <0255> * Check for auto-num mode <0256> 63F2 DA,45,01 CLOG >01,@FLAG If auto-num on <0257> 63F5 64,1E BS TOPL35 <0258> 63F7 A1,14,0E DADD @CURINC,@CURLIN Generate new line number <0259> 63FA D2,14,00 CGE 0,@CURLIN >32767? <0260> 63FD 64,05 BS TOPL30 <0261> 63FF B2,45,FE AND >FE,@FLAG If out of range->exit auto-nu <0262> 6402 05,64,1E B TOPL35 Merge in below <0263> * Must be a long branch!! <0264> 6405 D5,30,32 TOPL30 DCEQ @ENLN,@STLN Line might exist <0265> 6408 64,12 BS G6412 <0266> 640A BD,4A,14 DST @CURLIN,@FAC Ready for program search <0267> 640D 0F,7E XML SPEED <0268> 640F 03 BYTE SEETWO * Search for existence of line <0269> 6410 65,1D BS EDTZ05 COND set = line found <0270> 6412 0F,83 G6412 XML SCROLL Scroll to the next line <0271> 6414 BD,5E,14 DST @CURLIN,@ARG2 New line # <0272> 6417 06,6F,BA CALL DISO Display the line number <0273> 641A 91,20 DINC @VARW Following by a space <0274> 641C 44,20 BR G6420 <0275> 641E 0F,83 TOPL35 XML SCROLL Scroll the screen <0276> 6420 BE,A2,E1 G6420 ST >9E,V@NLNADD-1 Display the prompt character 6423 9E <0277> 6424 06,6A,76 CALL G6A76 Read in a line <0278> 6427 06,D0,AF CALL SAVLIN Save input line for recall <0279> * Crunch the input line <0280> 642A 86,22 CLR @ERRCOD Assume no-error return <0281> 642C BF,0A,08 DST CRNBUF,@RAMPTR Initialize crunch pointer 642F 20 <0282> 6430 0F,7F XML CRUNCH CRUNCH the input line <0283> 6432 00 BYTE 0 * Normal crunch mode <0284> 6433 8A,23 TOPL42 CASE @ERRCOD+1 <0285> 6435 44,45 BR TOPL45 No error detected <0286> 6437 49,7C BR ERRSYN *SYNTAX ERROR <0287> 6439 49,90 BR ERRBLN *BAD LINE NUMBER <0288> 643B 49,94 BR ERRLTL *LINE TOO LONG <0289> 643D 49,86 BR ERRNTL *NAME TOO LONG <0290> 643F 49,80 BR ERRNQS *UNMATCHED QUOTES <0291> 6441 49,9A BR ERRCIP *COMMAND ILLEGAL IN PROGRAM <0292> 6443 49,A4 BR ERRIVN *UNRECOGNIZED CHARACTER <0293> 6445 8F,4A TOPL45 DCZ @FAC Line # present <0294> 6447 64,62 BS TOPL55 <0295> 6449 DA,45,01 CLOG >01,@FLAG Not AUTONUM <0296> 644C 44,5B BR G645B <0297> 644E D6,75,0D CEQ >0D,@RKEY Must be up or down <0298> 6451 64,5B BS G645B <0299> 6453 D6,42,01 CEQ >01,@CHAT Start EDIT mode 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0016 EDIT-359 <0300> 6456 44,5B BR G645B <0301> 6458 05,D0,00 B EDTZZ0 <0302> 645B 06,66,CF G645B CALL EDITLN EDIT the line into the progra <0303> 645E 63,E9 BS TOPL25 If didn't change the line <0304> 6460 43,DA BR TOPL10 <0305> * Jump always <0306> 6462 D6,42,01 TOPL55 CEQ >01,@CHAT If blank line - ignore <0307> 6465 63,E9 BS TOPL25 <0308> 6467 D6,A8,20 CEQ >EB,V@CRNBUF 646A EB <0309> 646B 65,C9 BS SZSIZE <0310> 646D C6,A8,20 CH >08,V@CRNBUF If imperative 6470 08 <0311> * GKXB Branch code for new commands DEL, COPY, and MOVE. <0312> 6471 77,59 BS NEWCMD Go here to test for new <0313> * keywords <0314> 6473 BF,2C,08 DST CRNBUF+1,@PGMPTR Anticipate usage of PGMCHR 6476 21 <0315> 6477 0F,79 XML PGMCHR Prepare CHAT for OLD and SAVE <0316> 6479 8A,A8,20 CASE V@CRNBUF Select the keyword <0317> 647C 43,A5 BR SZNEW NEW 0 <0318> 647E 45,20 BR SZCONT CONTINUE 1 <0319> 6480 45,BE BR SZLIST LIST 2 <0320> 6482 45,BA BR SZBYE BYE 3 <0321> 6484 45,60 BR SZNUM NUMBER 4 <0322> 6486 45,B7 BR SZOLD OLD 5 <0323> 6488 46,25 BR SZRES RESEQUENCE 6 <0324> 648A 45,AF BR SZSAVE SAVE 7 <0325> 648C 45,C6 BR SZMERG MERGE 8 <0326> * AUTO-BOOT - attempt a ----> RUN "DSK1.LOAD" <0327> 648E 31,00,0B AUTOLD MOVE 11,G@DSCLOD,V@CRNBUF 6491 A8,20,63 6494 51 <0328> 6495 BF,2C,08 DST CRNBUF,@PGMPTR DSK1.LOAD is in crunch buffer 6498 20 <0329> * RXB PATCH CODE ************* <0330> * BR SZRUNL Go to the RUN "NAME" CODE <0331> 6499 5A,97 BR MYRUN <0332> ********************************* RUN ********************* <0333> 649B D6,42,C7 SZRUN CEQ >C7,@CHAT Ready for 'RUN "NAME" ---- <0334> 649E 44,BF BR G64BF <0335> 64A0 BD,58,2C SZRUNL DST @PGMPTR,@FAC14 Save pointer to name <0336> 64A3 0F,79 XML PGMCHR Get the length of the string <0337> 64A5 BC,57,42 ST @CHAT,@FAC13 Put it in FAC13 <0338> 64A8 86,56 CLR @FAC12 Make it a double byte <0339> 64AA A1,2C,56 DADD @FAC12,@PGMPTR Skip the string <0340> 64AD 0F,79 XML PGMCHR To see there is line no. ahea <0341> 64AF 06,80,24 CALL G8024 Only RUN "NAME" ? <0342> 64B2 49,7C BR ERRSYN No - junk on end so error <0343> 64B4 BE,42,C7 ST STRINZ,@CHAT Prepare for LOAD routine <0344> 64B7 BD,2C,58 DST @FAC14,@PGMPTR Restore the saved PGMPTR <0345> 64BA 06,80,26 CALL OLD1 Load the program <0346> 64BD 44,DA BR SZRUN0 Go ahead from here <0347> * No RUN "NAME" : just run the <0348> * current program in memory <0349> 64BF D6,42,C9 G64BF CEQ >C9,@CHAT Is there a line # after RUN? <0350> 64C2 44,D5 BR G64D5 <0351> 64C4 0F,79 XML PGMCHR Get the line number <0352> 64C6 BC,4A,42 ST @CHAT,@FAC Put it in FAC for SEETWO <0353> 64C9 0F,79 XML PGMCHR <0354> 64CB BC,4B,42 ST @CHAT,@FAC1 <0355> 64CE 0F,79 XML PGMCHR Should be EOS now <0356> 64D0 06,80,24 CALL G8024 Is it? <0357> 64D3 64,EA BS SZRUN2 Yes - Go ahead from here 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0017 EDIT-359 <0358> * Just 'RUN' <0359> 64D5 06,80,24 G64D5 CALL G8024 Should be EOS now <0360> 64D8 49,7C BR ERRSYN No-SYNTAX ERROR <0361> 64DA D5,30,32 SZRUN0 DCEQ @ENLN,@STLN Refuse without program <0362> 64DD 64,EF BS ILLST <0363> 64DF BD,A3,72 DST @ENLN,V@START Defualt to beginning 64E2 32 <0364> 64E3 A7,A3,72 DSUB 3,V@START Offset into the table 64E6 00,03 <0365> 64E8 45,02 BR SZRUN1 Merge in below <0366> * Jump always <0367> 64EA D5,30,32 SZRUN2 DCEQ @ENLN,@STLN Refuse without program <0368> 64ED 44,F9 BR G64F9 <0369> 64EF 0F,83 ILLST XML SCROLL Scroll the screen for message <0370> 64F1 86,44 CLR @PRGFLG Prevent line # printing <0371> 64F3 06,6A,82 WRNNPP CALL G6A82 <0372> 64F6 1D BYTE 29 * NO PROGRAM PRESENT <0373> 64F7 43,DD BR TOPL15 <0374> * Condition can never be set since line 0 is prohibited <0375> 64F9 0F,7E G64F9 XML SPEED <0376> 64FB 03 BYTE SEETWO * Find the line in the program <0377> 64FC 49,8C BR ERRLNF * LINE NOT FOUND <0378> 64FE BD,A3,72 DST @EXTRAM,V@START Program run starts here 6501 2E <0379> * GKXB RUN code for color change. <0380> 6502 57,74 SZRUN1 BR RUNPAT Change colors. <0381> 6504 06,80,12 G6504 CALL CLSALL Close any open files <0382> 6507 92,44 DEC @PRGFLG Put it back in execution <0383> 6509 BC,80,89 ST @RAMTOP+1,@RAMFLG Set/reset RAMFLG flag -- when 650C 80,85 <0384> 650E 87,A3,86 DCLR V@SEXTRM in program mode & ERAM exist <0385> 6511 87,A3,8A DCLR V@ERRLN Disallow CONTINUE after RUN <0386> 6514 06,68,DC CALL KILSYM Reset ERR handling to defualt <0387> 6517 BE,73,88 ST RSTK,@SUBSTK Set the stack empty <0388> * RXB PATCH CODE ************ Turn off DSK#.LOAD search <0389> * SZRUN4 B G6A70 <0390> 651A 05,7E,24 SZRUN4 B SCHOFF Turn off search first then G6 <0391> 651D 05,D0,0D EDTZ05 B EDTZ00 <0392> **************************** CONTINUE ********************* Edited September 21, 2019 by RXB Add comments Quote Link to comment Share on other sites More sharing options...
RXB Posted September 21, 2019 Share Posted September 21, 2019 I should add that FW fixed this issue later but BOOT or MENU never did fix this issue. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted September 21, 2019 Share Posted September 21, 2019 The address is 63D1, not 64d1. BOOT checks this address for the gosub/branch to the autoload routine via 648e.(the comment is misleading). A special interrupt routine handles updating the load filename. I'm pretty sure the person who provided the XB loader routine, Paolo Bagnaresi, knew a bit about GPL and XB. 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.