RXB Posted October 27, 2016 Author Share Posted October 27, 2016 (edited) Ok made some progress I save the Program Line Pointer to Start (>8330) and End (>8332) at VDP address (>3EEF) and so far it works I can make programs in both page 24K and it switches fine. I do not see a problem so far using the VDP Address >3EEF as it was a 6 byte address only used by the TI99 and not used in the TI99/4A. What I do is copy the Start and End line pointer before I switch upper 24K and load the previous values. Now there is a issue if you want to use numeric variables not defined in the other 24K as but was to be expected as after all you now have 24K more space for those now. P.S. Note that Numeric Variable in each 24K can have the same name but each Page of 24K have different values. Edited October 27, 2016 by RXB 2 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted October 27, 2016 Share Posted October 27, 2016 Ok made some progress I save the Program Line Pointer to Start (>8330) and End (>8332) at VDP address (>3EEF) and so far it works I can make programs in both page 24K and it switches fine. I do not see a problem so far using the VDP Address >3EEF as it was a 6 byte address only used by the TI99 and not used in the TI99/4A. What I do is copy the Start and End line pointer before I switch upper 24K and load the previous values. Now there is a issue if you want to use numeric variables not defined in the other 24K as but was to be expected as after all you now have 24K more space for those now. P.S. Note that Numeric Variable in each 24K can have the same name but each Page of 24K have different values. If I think about this question enough it sounds stupid and I think I know the answer but if I'm wrong and don't ask, I'll never know. Can you pass arguments and values between the two banks? I imagine you would need a staging area clear of the switch to do so, like what you're using the VDP ram for; storing the previous values. How much more "safe" ram is there for these kinds of functions? Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted October 27, 2016 Share Posted October 27, 2016 Sounds nice for quick switching back and forth between two separate programs, but for a mega program a way to share the variables between the two would be nice. Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted October 27, 2016 Share Posted October 27, 2016 Sounds nice for quick switching back and forth between two separate programs, but for a mega program a way to share the variables between the two would be nice. Or the ability to exclude certain banks from switching effectively giving you that common area to play with subprograms getting switched back and forth as needed with effecting the reserve banks. Does that make sense? Quote Link to comment Share on other sites More sharing options...
RXB Posted October 27, 2016 Author Share Posted October 27, 2016 If I think about this question enough it sounds stupid and I think I know the answer but if I'm wrong and don't ask, I'll never know. Can you pass arguments and values between the two banks? I imagine you would need a staging area clear of the switch to do so, like what you're using the VDP ram for; storing the previous values. How much more "safe" ram is there for these kinds of functions? Yes but only in String Values not Numeric values. EXAMPLE: Page 0 = N, X, Y, J variables Page 1 = N, R, V, B, A variables but N is not the same as in Page 0 think of it like a Subprogram Variable but unshareable. If you want to share a variable then use a String Variable. EXAMPLE: In Page 0 you have N$=STR$(N) and in the Page 1 you would have to use N=VAL(N$) There is no way to fix this as with two 24K Pages the numeric variables are not in same locations to find and not same values. 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted October 27, 2016 Author Share Posted October 27, 2016 (edited) Sounds nice for quick switching back and forth between two separate programs, but for a mega program a way to share the variables between the two would be nice. You can share strings as those are the same in both but you could run out of string space quickly if you do not conserve VDP memory. As explained before how would you share Numeric Variables as they occupy the same exact RAM space as the other page? >A000 to >FFFF are the address of the Upper 24K's so you can not pass as where would you have room to pass ? -------------------------------------------- >0000 OS ROM >1FFF -------------------------------------------- >2000 Lower 8K Assembly space >3FFF -------------------------------------------- >4000 DSR space for Devices >5FFF ------------------------------------------- >6000 Cartridge ROM/RAM >7FFF ------------------------------------------------------------------------------------- >A000 Upper 24K XB Programs : >A000 Upper 24K XB Programs >FFFF : >FFFF ------------------------------------------------------------------------------------- See where would you save this transfer? Edited October 27, 2016 by RXB 1 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted October 27, 2016 Share Posted October 27, 2016 (edited) Thanks for clarifying all of this. Makes sense now. Except no matter, I don't know how to identify a safe place.I would like to ask one more question. What about partial bank switching? Say anywhere from >A000 through about 8k reserved as locked and not switchable? And using the rest as switchable space? Or is that not how the hardware is designed to work as in, it's all or nothing? Or is that accomplished by making the first 8k identical in both banks? Edited October 27, 2016 by Sinphaltimus 1 Quote Link to comment Share on other sites More sharing options...
atrax27407 Posted October 27, 2016 Share Posted October 27, 2016 I have never been able to get RXB2015 to work satisfactorily on my system. We'll see what RXB2016 does. Quote Link to comment Share on other sites More sharing options...
Airshack Posted October 28, 2016 Share Posted October 28, 2016 Can it be compiled? Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted October 28, 2016 Share Posted October 28, 2016 You can share strings as those are the same in both... If I'm not mistaken, the UberGROM has 15K of GRAM space available, (like where Gazoo stuffed the BOOT menu loader. Is that also in use by RXB or in the list above? If not... As a last resort, what about diskette? Unless you are tracking hundreds of variables and strings, it would probably be a rather small file, so should not take forever. Quote Link to comment Share on other sites More sharing options...
RXB Posted October 28, 2016 Author Share Posted October 28, 2016 Thanks for clarifying all of this. Makes sense now. Except no matter, I don't know how to identify a safe place. I would like to ask one more question. What about partial bank switching? Say anywhere from >A000 through about 8k reserved as locked and not switchable? And using the rest as switchable space? Or is that not how the hardware is designed to work as in, it's all or nothing? Or is that accomplished by making the first 8k identical in both banks? No even now you can using RXB commands to experiment all you want to do this as I have built in commands to do this. Keep in mind that in RXB when I say AMS it means SAMS as they are interchangeable. 10 CALL AMSINIT ! This initialized the AMS by mapping the 4K banks 16 to 255 available for the command CALL AMSBANK(lowbank,highbank) 20 CALL AMSMAP ! This puts AMS in Map Mode. 30 CALL AMSON ! This turns on the Read Write Registers in the AMS at >4000 to >5FFF 40 CALL AMSOFF ! This turns off the Read Write Registers in the AMS at >4000 to >5FFF 50 CALL AMSPASS ! This puts the AMS in Pass Mode. 60 CALL AMSBANK(low 4K, high 4K) ! This swaps out the two 4K banks you want in lower 8K memory for Assembly with 240 banks. 70 CALL PEEK(16388,X) ! This peeks the Mapper Register at >2000 for what value is there. 80 CALL PEEK(16390,Y) ! this peeks the Mapper Register at >3000 for what value is there. 90 CALL LOAD(16388,85,203) ! This would load bank 85 at >2000 and bank 203 at >3000 Now you can just use CALL LOAD(16404,#whatever) to load your own value here, but of course from a running XB program it would crash. So if you want to see how this is done go look at the source code for my RXB GAME USING SAMS called IN THE DARK Quote Link to comment Share on other sites More sharing options...
RXB Posted October 28, 2016 Author Share Posted October 28, 2016 Can it be compiled? No RXB is not normal XB by a mile. RXB is exactly like normal XB but with my own enhancements and routines. Also RXB will run TI BASIC programs as long as you do not required Assembly Support. Quote Link to comment Share on other sites More sharing options...
RXB Posted October 28, 2016 Author Share Posted October 28, 2016 (edited) If I'm not mistaken, the UberGROM has 15K of GRAM space available, (like where Gazoo stuffed the BOOT menu loader. Is that also in use by RXB or in the list above? If not... As a last resort, what about diskette? Unless you are tracking hundreds of variables and strings, it would probably be a rather small file, so should not take forever. Hmm that is not how XB works. XB has a thing that is like C language MALLOC memory recovery but in the XB GPL source code is called CLEAN that uses a ROM routine in XB ROMs. If you ever seen a XB or Basic program freeze for a second that is when it engages and depending on memory usage happens as often as needed. So how you would do that and not also mess up String Space would be be quite a task. As the only GPL XB Source code programmer I can state that would be a huge amount of work. I have been doing this since 1989 as a sole project. Also you now have 24K more XB space why not take advantage of this and use Temporary Strings. Not to mention you still have in RXB 960K of SAMS still unused! Edited October 28, 2016 by RXB Quote Link to comment Share on other sites More sharing options...
kl99 Posted October 28, 2016 Share Posted October 28, 2016 Did you ever find the XB-Sourcecode again that was lost in a harddisk crash? Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted October 28, 2016 Share Posted October 28, 2016 Just a thought: has anyone asked Winfried Winkler if he has it? He was working with XB on this level when he rewrote a lot of routines for his XB3 software. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted October 29, 2016 Share Posted October 29, 2016 Ok made some progress I save the Program Line Pointer to Start (>8330) and End (>8332) at VDP address (>3EEF) and so far it works I can make programs in both page 24K and it switches fine. I do not see a problem so far using the VDP Address >3EEF as it was a 6 byte address only used by the TI99 and not used in the TI99/4A. The 0x3EEF area is not static, meaning peripherals and controller cards can request VDP memory, modify 0x8370 (pointer), and force that "unused" range lower in memory. I would exercise caution here. Some programs, like FunnelWeb and the Horizon ROS, detect the controller peripheral for this very reason. Quote Link to comment Share on other sites More sharing options...
RXB Posted October 29, 2016 Author Share Posted October 29, 2016 Did you ever find the XB-Sourcecode again that was lost in a harddisk crash? I have the GPL XB Source code, what was lost was the XB ROMs Assembly Source Code. Quote Link to comment Share on other sites More sharing options...
RXB Posted October 29, 2016 Author Share Posted October 29, 2016 Just a thought: has anyone asked Winfried Winkler if he has it? He was working with XB on this level when he rewrote a lot of routines for his XB3 software. You know I sent out copies to people that requested them, put a copy on WHT FTP and sent a copy to Charlie Good too. No one yet has said they have a copy that I sent out. Quote Link to comment Share on other sites More sharing options...
RXB Posted October 29, 2016 Author Share Posted October 29, 2016 The 0x3EEF area is not static, meaning peripherals and controller cards can request VDP memory, modify 0x8370 (pointer), and force that "unused" range lower in memory. I would exercise caution here. Some programs, like FunnelWeb and the Horizon ROS, detect the controller peripheral for this very reason. So far I have not see anything affect that address at all unless the TI is turned off and on. (It was only used by the TI99 and never used by TI99/4A.) Of course using Class99 this has been the case as hard to check VDP address while loading programs to test. Quote Link to comment Share on other sites More sharing options...
RXB Posted November 3, 2016 Author Share Posted November 3, 2016 OMG well finally figures out why at times my CALL AMS24K would crash and other times worked. Start & END MEMORY ADDRESS IN UPPER 24k FOR BOTH PAGES OF 24K HAVE TO BE SAVED. Will have to fix this issue. Quote Link to comment Share on other sites More sharing options...
RXB Posted November 4, 2016 Author Share Posted November 4, 2016 (edited) Ok I can find no where in the TI99/4A has 8 BYTES I can save the START (>8330) and END (>8332) PROGRAM TABLE LINE POINTERS. (Note: 4 bytes for Page 0 and 4 bytes for Page 1) As horrid as this sounds I have to use the last 16K of SAMS memory to save just 8 bytes of memory for the AMS24K switch to work. But this new concept will work thus expanding from 24K XB program space to 48K XB program space in the RXB Cartridge only. What kind of new programs could you write with 48K of XB program space and yet all 960K of Assembly space too? Edited November 4, 2016 by RXB 2 Quote Link to comment Share on other sites More sharing options...
RXB Posted November 20, 2016 Author Share Posted November 20, 2016 Well changes for RXB 2016 will be CALL AMSINIT is removed as no longer needed. When RXB 2016 starts it will switch from AMS PASS MODE to AMS MAP MODE and turn on AMS Read/Write lines with banks set same as PASS MODE: AMS BANK : Memory Location >0A = >A000 >0B = >B000 >0C = >C000 >0D = >D000 >0E = >E000 >0F = >F000 Also Lower 8K will be left as is, this allows anything running in Lower 8K does not interfere with XB or any Assembly that may be running with interrupts on. Thus you could restart XB with a RXB command CALL XB and not have to worry about locking up your Assembly program. Quote Link to comment Share on other sites More sharing options...
RXB Posted December 5, 2016 Author Share Posted December 5, 2016 Ok I need some Assembly help: When I use my RXB command CALL AMS2 GOTO 100 It switches to SAMS bank like it supposed to and starts the correct line but errors out with Subprogram not found As long as not in Program mode it works like a charm but in Program it will crash with this error? Classic99 does not have the tools to find the issue as it does not report what SAMS page it is in or can it show what GPL address it crashed at. Quote Link to comment Share on other sites More sharing options...
RXB Posted January 9, 2017 Author Share Posted January 9, 2017 Update RXB SAMS 24K works great! Problem now is it switches banks and line numbers fine, but PRESCAN presents a problem: Example: DIM A(10),X$(122) See X$(122) is stored in VDP Memory but A(10) is assigned in UPPER 24K and of course when you switch from SAMS 24K page 1 to SAMS 24K page 2 poof all of A(10) array is in page 1.......CRASH So need to figure out how to Prescan both SAMS 24K pages. After all if you need a array of variables but not accessible to other page this is going to present a problem. Not possible to put DIM in both banks as the address are not the same in each bank and numeric variable search will crash. Quote Link to comment Share on other sites More sharing options...
RXB Posted January 16, 2017 Author Share Posted January 16, 2017 (edited) Hey well here is the result of a problem that is really at the core of XB and using the SAMS to expand the XB Program Space. I can get it to switch and run but the delay between 24K Pages is insane, almost 2 full seconds to switch and here is the reason why: ******************************************************************** * CALL SAMS GOTO line-number * CALL SAMS AMS24 DATA CHRALL STRI 'SAMS' DATA $+2 CZ @PRGFLG Program mode? BS AMSSWT No line# swap 24k PAGE CEQ GOTOZ,@CHAT GOTO? BR ERRSYN SYNTAX ERROR XML PGMCHR Skip USING CEQ LNZ,@CHAT Line# token? BR ERRLNF ERROR LINE NOT FOUND XML PGMCHR Skip line# Token ST @CHAT,@FAC Store high byte line# XML PGMCHR Skip high byte line# ST @CHAT,@FAC1 Store low byte line# XML PGMCHR Skip low byte line# AMSSWT CALLL AMSMAP Set MAP mode CALL AMSON Turn on Read/Write CEQ >0A,@>4014 Bank >0A? BR AMSPG0 Yes, go Page >10 * Pages upper SAMS SET BANK 2 ST >FA,@>4014 >A000 ST >FB,@>4016 >B000 ST >FC,@>4018 >C000 ST >FD,@>401A >D000 ST >FE,@>401C >E000 ST >FF,@>401E >F000 * Save values BANK 2 to SAMS MOVE 4,@>8384,@>A000 Save Highest Addrs/Highest Free Addrs MOVE 8,@>8318,@>A004 Save Str space STR/END/TEMP/STATEMENT MOVE 6,@>8324,@>A00C Save ValueStackPTR/ASM RTN/NUD TABLE MOVE 6,@>832E,@>A012 Save PTR current LN#/SRT LN#/END LN# MOVE 2,@>833A,@>A018 Save SUBPGM Symbol Table PTR MOVE 4,@>833E,@>A01A Save Symbol Table PTR/VDPFreespace PTR MOVE 252,V@>3DEF,@>A01E Save VDP STACK MOVE 11888,V@>0958,@>A120 Save VDP Strings/Symbols * Pages upper SAMS SET BANK 1 ST >F4,@>4014 >A000 ST >F5,@>4016 >B000 ST >F6,@>4018 >C000 ST >F7,@>401A >D000 ST >F8,@>401C >E000 ST >F9,@>401E >F000 * Load values BANK 1 from SAMS MOVE 4,@>A000,@>8384 Load Highest Addr/Highest Free Addrs MOVE 8,@>A004,@>8318 Load Scratch Pad PTRs MOVE 6,@>A00C,@>8324 Load VAlueStackPTR/ASM RTN/NUD TABLE MOVE 6,@>A012,@>832E Load PTR current LN#/SRT LN#/END LN# MOVE 2,@>A018,@>833A Load SUBPGM Symbol Table PTR MOVE 4,@>A01A,@>833E Load Symbol Table PTR/VDPFreespace PTR MOVE 252,@>A01E,V@>3DEF Load VDP STACK MOVE 11888,@>A120,V@>0958 Load VDP Strings/Symbols * Load Page Bank upper memory for XB ST >04,@>4014 >A000 ST >05,@>4016 >B000 ST >06,@>4018 >C000 ST >07,@>401A >D000 ST >08,@>401C >E000 ST >09,@>401E >F000 BR AMSPG1 Go check if edit mode or line# AMSPG0 CEQ >04,@>4014 Bank >04? BR AMSPG0 LOOP FOREVER!!!!!!!!!!! * Pages upper SAMS SET BANK 1 ST >F4,@>4014 >A000 ST >F5,@>4016 >B000 ST >F6,@>4018 >C000 ST >F7,@>401A >D000 ST >F8,@>401C >E000 ST >F9,@>401E >F000 * Save values BANK 1 to SAMS MOVE 4,@>8384,@>A000 Save Highest Addrs/Highest Free Addrs MOVE 8,@>8318,@>A004 Save Str space STR/END/TEMP/STATEMENT MOVE 6,@>8324,@>A00C Save ValueStackPTR/ASM RTN/NUD TABLE MOVE 6,@>832E,@>A012 Save PTR current LN#/SRT LN#/END LN# MOVE 2,@>833A,@>A018 Save SUBPGM Symbol Table PTR MOVE 4,@>833E,@>A01A Save Symbol Table PTR/VDPFreespace PTR MOVE 252,V@>3DEF,@>A01E Save VDP STACK MOVE 11888,V@>0958,@>A120 Save VDP Strings/Symbols * Pages upper SAMS SET BANK 2 ST >FA,@>4014 >A000 ST >FB,@>4016 >B000 ST >FC,@>4018 >C000 ST >FD,@>401A >D000 ST >FE,@>401C >E000 ST >FF,@>401E >F000 * Load values BANK 1 to SAMS MOVE 4,@>A000,@>8384 Load Highest Addr/Highest Free Addrs MOVE 8,@>A004,@>8318 Load Scratch Pad PTRs MOVE 6,@>A00C,@>8324 Load VAlueStackPTR/ASM RTN/NUD TABLE MOVE 6,@>A012,@>832E Load PTR current LN#/SRT LN#/END LN# MOVE 2,@>A018,@>833A Load SUBPGM Symbol Table PTR MOVE 4,@>A01A,@>833E Load Symbol Table PTR/VDPFreespace PTR MOVE 252,@>A01E,V@>3DEF Load VDP STACK * Get line number and set up line number AMSPG1 CZ @PRGFLG Program mode? BS AMSPGE Yes, Exit to XB DST @ENLN,@FAC2 Get last address DSUB 3,@FAC2 Point to first LINE# AMSPG2 CALL GRSUB3 Read from VDP/RAM BYTE FAC2 DCEQ @EEE1,@FAC Same? BS AMSPG3 Yes, found line# DCH @STLN,@FAC2 No line# left? BR ERRLNF ERROR LINE NOT FOUND DSUB 4,@FAC2 Next LINE# BR AMSPG2 Loop AMSPG3 DST @FAC2,@EXTRAM Get LINE# DADD 4,@EXTRAM Point to begging of line DINCT @EXTRAM Point to ADDRESS DST @EXTRAM,@PGMPTR Set pointer to line to run DINCT @PGMPTR Point to Tokens AMSPGE CALL RETURN Return to XB ********************************************************* I have to copy the XB String and Symbol Table area of VDP Memory into SAMS (12K two copies) and have two copies of upper 24K for XB Program and Numeric Variable space. So I am using 72K of SAMS pages to adding 24K XB program and numeric space, also have two copies of VDP String and Symbol space. I could write a subprogram to exchange variables between them but that does not improve the speed of switching, even Assembly would not be that much better. This is not even addressing if Interrupts are being run at the time. Suggestion putting VDP in SAMS: VDP DATA STACK would be in SAMS RAM VDP SUBSTACK would be in SAMS RAM VDP Rollout Buffer would be in SAMS RAM VDP VALUE STACK would be in SAMS RAM (Instead of 12K of String and Symbol space it could be 64K of RAM SPACE) So maybe I need a TI group effort of help to DISASSEMBLE THE XB ROM's and could write a new RXB that would use SAMS instead of VDP RAM for Strings and Symbols? (The insane speed of this version of XB would be considerable as RAM is way much faster access and read/write then VDP) Edited January 16, 2017 by RXB 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.