Jump to content
IGNORED

RXB - Rich Extended Basic


Bones-69

Recommended Posts

17 hours ago, RXB said:

All Extended Basics do this, all of them start from Lower Address in RAM (32K) and work up from >A040 to >FFEA in RAM.

RAM in lower 8K does same thing starting at lowest address after CALL INIT up to >3FFF

Now in VDP is the exact opposite as Variables and Temp data is from Top of VDP memory below number of Buffers (Normally 3).

Thanks for the explanation.

Since I am cutting my own rug, so to speak, my Memory map is a little different and kind of complicated now that I think about it.

 

I use low RAM is a heap.  It used for temporary buffers with a very simple, single pointer, used to keep track of it.

- It is also used for a single page of SAMS memory from, >3000 to >3FFF, if you load the SAMS code.

The FORTH kernel loads at A000 and is about 8K and the user program grows upward from there. 

The two Forth stacks start at FF7E and grow down. They are pretty small, 64 bytes each.

AT FF00 I put the terminal input buffer which is where text from the Forth console is collected to make a line of commands.

 

The VDP RAM has 2 Forth specific purposes:

1. A stack of PABs that descend from the FILES(3) memory location and a VDP heap that starts at >1000 giving about 10K bytes of space.

  I have methods to use VDP RAM for TI sound lists and also the Forth print word can be changed to use that space if you need a ton of strings in a program like a text based game. There is also methods to create string variables. It's a HEAP so it's flexible.

 

I know you don't need any of this info but there it is anyway. Maybe interesting to see another memory map. :)   

(I will blame my morning coffee for my verbosity)

 

  • Like 3
Link to comment
Share on other sites

20 hours ago, RXB said:

All Extended Basics do this, all of them start from Lower Address in RAM (32K) and work up from >A040 to >FFEA in RAM.

 

This is backwards from how you correctly explained it in post #951.

 

XB programs grow down from >FFE7. >8386 points to the first free RAM after the program in the upper 24 KiB. This is the reason you can load AORGed ALC routines starting at >A000 just as long as they do not run into the XB program.

 

...lee

  • Like 2
Link to comment
Share on other sites

8 hours ago, Lee Stewart said:

 

This is backwards from how you correctly explained it in post #951.

 

XB programs grow down from >FFE7. >8386 points to the first free RAM after the program in the upper 24 KiB. This is the reason you can load AORGed ALC routines starting at >A000 just as long as they do not run into the XB program.

 

...lee

Yea I got them reversed but then I wrote all these new memory pointers and it was late.

You can change locations of VDP STACK, number of File Buffers to even 0 (ZERO) buffers, change RAM size and top of RAM, even only have 8K of upper RAM if you want.

Not to mention a new Program Loader that puts Program Image files into memory ANYWHERE you want.

And ties into using the SAMS or not it can do both.

Example load 4K program image into >E000 and also have XB program in memory at same time and also change VDP stack so you can run Text mode.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Hi do not want a repeat of RXB 2015 where you had Versions 2015A, 2015B, 2015C and finally 2015D as the final fixed version.

So currently working on finishing up RXB 2020 and making some test XB programs.

Here is an example NORMAL XB:

100 REM  TI EXTENDED BASIC
110 CALL CLEAR
120 DISPLAY AT(4,4):"**BALLOONS**" :: DISPLAY AT(7,4):"USE THE ARROW KEYS TO" :: DISPLAY AT(9,4):"MOVE YOUR WHITE SPEAR."
130 DISPLAY AT(12,4):"TRY TO POP ALL THE" :: DISPLAY AT(14,4):"BALLOONS IN AS LITTLE" :: DISPLAY AT(16,4):"TIME AS POSSIBLE."
140 CALL CHAR(96,"3C7EFFFFFFFF7E3C8142183C3C184281") :: CALL CHAR(104,"101038FE38101") :: TS=9999
150 DISPLAY AT(23,4):"PRESS <ENTER> TO START."
160 CALL KEY(0,K,S) :: IF K<>13 THEN 160
170 CALL CLEAR :: DISPLAY AT(1,1):"TIME:" :: T,B,X,Y=0
180 FOR I=2 TO 26 STEP 4
190 RANDOMIZE :: R=INT(RND*12)+3 :: IF R=8 THEN 190
200 CALL SPRITE(#I,96,R,185,I*8+1,-INT(RND*6+1),0) :: NEXT I :: CALL SPRITE(#1,104,16,INT(RND*180+1),233) :: CALL SOUND(150,1497,2)
210 CALL KEY(1,K,S) :: T=T+1 :: DISPLAY AT(1,7):T :: CALL COINC(ALL,C) :: IF C=-1 THEN 290
220 IF(K+1<1)+(K>5)THEN 210
230 ON K+1 GOTO 250,210,260,270,210,240
240 X=-5 :: Y=0 :: GOTO 280
250 X=5 :: Y=0 :: GOTO 280
260 X=0 :: Y=-5 :: GOTO 280
270 X=0 :: Y=5
280 CALL MOTION(#1,X,Y) :: CALL COINC(ALL,C) :: IF C=0 THEN 210
290 CALL SOUND(50,-5,0)
300 FOR I=26 TO 2 STEP-4 :: CALL DISTANCE(#1,#I,D) :: IF D<425 THEN 320
310 NEXT I :: I=2
320 CALL PATTERN(#I,97) :: CALL DELSPRITE(#I) :: B=B+1 :: IF B<7 THEN 210
330 CALL DELSPRITE(ALL) :: IF T<TS THEN TS=T
340 DISPLAY AT(18,4):"FASTEST TIME =";TS :: FOR B=1 TO 15 :: CALL SOUND(100,INT(RND*1000)+500,2) :: NEXT B
350 DISPLAY AT(22,4):"TRY AGAIN? (Y/N)"
360 CALL KEY(0,K,S) :: IF K=89 THEN 170
370 IF K<>78 THEN 360

Now here is the RXB 2020 version:

100 REM  TI EXTENDED BASIC
110 CALL VCHAR(24,32,32,-768)
120 CALL HPUT(4,12,"**BALLOONS**",7,7,"USE THE ARROW KEYS TO",9,7,"MOVE YOUR WHITE SPEAR.")
130 CALL HPUT(12,7,"TRY TO POP ALL THE",14,7,"BALLOONS IN AS LITTLE",16,7,"TIME AS POSSIBLE.")
140 CALL CHAR(96,"3C7EFFFFFFFF7E3C8142183C3C184281",104,"101038FE38101") :: TS=9999
150 CALL HPUT(23,6,"PRESS <ANY KEY> TO START")
160 CALL KEY("",0,K,S)
170 DISPLAY AT(1,1)ERASE ALL:"TIME:" :: T,B,X,Y=0
180 FOR I=2 TO 26 STEP 4
190 RANDOMIZE :: R=INT(RND*12)+3 :: IF R=8 THEN 190
200 CALL SPRITE(#I,96,R,185,I*8+1,-INT(RND*6+1),0) :: NEXT I :: CALL SPRITE(#1,104,16,INT(RND*180+1),233) :: CALL SOUND(150,1497,2)
210 CALL JOYMOTION(1,X,Y,#1,4,4) :: T=T+1 :: DISPLAY AT(1,7):T :: CALL COINC(ALL,C) :: IF C=-1 THEN CALL COINC(ALL,C) :: IF C=-1 THEN 230
220 CALL COINC(ALL,C) :: IF C=0 THEN 210
230 CALL SOUND(50,-5,0)
240 FOR I=26 TO 2 STEP-4 :: CALL DISTANCE(#1,#I,D) :: IF D<425 THEN 260
250 NEXT I :: I=2
260 CALL PATTERN(#I,97) :: CALL DELSPRITE(#I) :: B=B+1 :: IF B<7 THEN 210
270 CALL DELSPRITE(ALL) :: IF T<TS THEN TS=T
280 DISPLAY AT(18,4):"FASTEST TIME =";TS :: FOR B=1 TO 15 :: CALL SOUND(100,INT(RND*1000)+500,2) :: NEXT B
290 CALL HPUT(22,4,"TRY AGAIN? (Y/N)")
300 CALL ONKEY("YN",0,K,S)GOTO 170,320
310 GOTO 300
320 END

Used 126 less bytes and added JOYSTICK MOTION instead of KEYBOARD controls

 

Take a look and see the changes...

Edited by RXB
comment added
  • Like 4
Link to comment
Share on other sites

Well going to a few days delay as found a huge mistake on my part.

Example: I=96 is a variable

CALL CHAR(I+2,"789AC") errors out as RXB thinks I is the symbol for Invert that definition instead of I the Variable.

So to fix this problem I need to make I into the word INVERT thus not to confuse I with variables anymore

CALL CHAR(I+2,"789AC",INVERT,I+2) would work properly sets character definition to "789AC" then inverts the definition of 96+2=98 as I is 96

CALL CHAR(INVERT,65) would make all the dots black into white and all the white dots into black thus invert the definition of A 

 

Now you could use the entire word INVERT or INVert, also have to fix S for SWAP and D for DUPlicate.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
6 hours ago, MikeV said:

Thanks for posting this! A very useful addition and the new SAMS support will be very welcomed. Looks like you have a good start on the user manual too?

Thanks really hoping I can put out entire package this month for everyone to see.

CALL SAMS is the real crazy winner as you can use it to switch multiple programs from Edit Mode, but CALL USER will make it super cool.

Imagine switching from XB program to FW or DiskAssembler or DSKU it as all in memory at same time?

 

 

 

  • Like 2
Link to comment
Share on other sites

Well in RXB 2020 SIZE video the routine did not work properly when I changed SAMS pages.

Turns out it errored out due to checking for SAMS initialized, removed that check and everything works the way it should now.

Next video is going to be fun and exiting.

Link to comment
Share on other sites

Found a error check in SIZE and why last video did not work properly.

Gave up on running multiple XB programs from SAMS as really just makes it a disk drive so you have to load it each time with all XB programs.

What is point with so much other versions like TIPI or FINALGROM.

Anyway other projects on way. Like how big of a XB program can be created?

 

  • Like 1
Link to comment
Share on other sites

On 3/14/2011 at 6:57 AM, RXB said:

Sure glad to now that I am back on a regular basis.

 

Hi, RXB!

 

I just wanted to step in and say Cheers to you. I have read the whole thread and am impressed about the work you did. As a purist using only "stock" MiniMem, E/A and XB I never hassled thinking about "extended" versions for those cartridges that days.

 

But your work reminded me of a (that days large and growing) collection of Assembler subroutines I've written for my convenience. A lot of functionality of your RXB mirrors what I missed in XB and scribbled together getting bloody fingers. ;-)

 

If I see a way to get a cartridge in MAME format and mount it to the TI99_4ev I would really like to have a look at it.

 

BTW: Your knowledge and interpretation of GPL seems very impressive, too. I had a look at GPL, I really tried, but never could get familiar with it at all.

 

Michael

 

  • Like 2
Link to comment
Share on other sites

Well already figured out a command called PRAM that allows changes to END address in upper 24K for XB program space RAM.

Now with some messing around I might be able to change START address in upper 24K for XB programs space RAM.

 

This would mean you can CHANGE WHERE XB LOADS PROGRAMS IN RAM! 

 

Normally that address starts at >FFE7 and goes down to >A040 for XB programs.

With this change you could change them to say >CFE7 and goes down to >B040

Or you can pick your own address you want like say >D123 and goes down to >C456

Very cool is as these are maintained by XB you still get exactly same errors and warnings on programs that are to large or other errors.

 

Here is the code I am looking at and will let you know how it works out.

**************** XB ROM ASSEMBLY CODE *******************************************************************

RAMTOP EQU  >8384 * HIGHEST ADDRESS IN ERAM (If zero No ERAM)

  0246            * Determine if and how much ERAM is present   
  0247 6050 D80B  GDTECT MOVB R11,@PAGE1        First enable page 1 ROM   
       6052 6000  
  0248            *-----------------------------------------------------------
  0249            * Replace following line      6/16/81   
  0250            * (Extended Basic must be made to leave enough space at   
  0251            * top of RAM expansion for the "hooks" left by the 99/4A  
  0252            * for TIBUG.)   
  0253            *      SETO R0                Start at >FFFF  
  0254            * with  
  0255 6054 0200         LI   R0,>FFE7          Start at >FFE7  
       6056 FFE7  
  0256            *-----------------------------------------------------------
  0257 6058 D40B         MOVB R11,*R0           Write a byte of data  
  0258 605A 940B         CB   R11,*R0           Read and compare the data   
  0259 605C 1306         JEQ  DTECT2            If matches-found ERAM top   
  0260            *-----------------------------------------------------------
  0261            * Change the following line   6/16/81   
  0262            *      AI   R0,->2000         Else drop down 8K   
  0263 605E 0200         LI   R0,>DFFF          Else drop down 8K   
       6060 DFFF  
  0264            *-----------------------------------------------------------
  0265 6062 D40B         MOVB R11,*R0           Write a byte of data  
  0266 6064 940B         CB   R11,*R0           Read and compare the data   
  0267 6066 1301         JEQ  DTECT2            If matches-found ERAM top   
  0268 6068 04C0         CLR  R0                No match so no ERAM   
  0269 606A C800  DTECT2 MOV  R0,@RAMTOP        Set the ERAM top  

 99/4 ASSEMBLER
XML359                                                       PAGE 0006
       606C 8384  
  0270 606E 045B         RT                     And return to GPL  

**********************************************************************************************************

************* GPL CODE TO INITIALIZE PROGRAM SPACE IN ERAM/VDP ******************

[1398] 68C3 86,80,89 INITPG CLR  @RAMFLG           Reset RAMFLG
[1399] 68C6 0F,8E           XML  GDTECT            Search for ERAM & select ROM
[1400] 68C8 BD,80,86        DST  @RAMTOP,@RAMFRE   Initialize free pointer
       68CB 80,84
[1401] 68CD BD,30,70        DST  @HIVDP,@STLN      Assume VDP - initialize STLN
[1402] 68D0 8E,80,84        CZ   @RAMTOP           If ERAM is present
[1403] 68D3 68,D9           BS   G68D9

99/4 GPL-ASSEMBLER (Pass 3) correct                                   PAGE 0027 
EDIT-359
[1404] 68D5 BD,30,80        DST  @RAMTOP,@STLN     Initialize STLN for ERAM
       68D8 84
[1405] 68D9 BD,32,30 G68D9  DST  @STLN,@ENLN       Init ENLN based upon STLN
[1406]               * Kill the symbol table
[1407] 68DC BD,40,30 KILSYM DST  @STLN,@FREPTR     Assume VDP and init free poin
[1408] 68DF D5,40,70        DCEQ @HIVDP,@FREPTR
[1409] 68E2 68,E6           BS   G68E6
[1410] 68E4 93,40           DDEC @FREPTR           Back off 1 if program present
[1411] 68E6 8E,80,84 G68E6  CZ   @RAMTOP           If ERAM exists
[1412] 68E9 68,FC           BS   G68FC
[1413] 68EB BD,80,86        DST  @STLN,@RAMFRE     Update the @RAMFRE
       68EE 30
[1414] 68EF D5,80,86        DCEQ @RAMTOP,@RAMFRE
       68F2 80,84
[1415] 68F4 68,F9           BS   G68F9
[1416] 68F6 93,80,86        DDEC @RAMFRE           Back off 1 if program present
[1417] 68F9 BD,40,70 G68F9  DST  @HIVDP,@FREPTR    Initialize VDP free pointer
[1418] 68FC 87,3E    G68FC  DCLR @SYMTAB           Kill symbol table
[1419] 68FE 87,3A           DCLR @SUBTAB           Kill subprogram table
[1420] 6900 BD,18,40        DST  @FREPTR,@STRSP    Initialize string space
[1421] 6903 BD,1A,18        DST  @STRSP,@STREND
[1422] 6906 86,43           CLR  @BASE             Reset OPTION BASE to 0
[1423] 6908 87,A3,86        DCLR V@SEXTRM          Disallow CONTINUE
[1424]               * RXB PATCH CODE MODIFY VDP STACK POINTER
[1425]               *       DST  VRAMVS,@STVSPT * Initialize base of value stac
[1426] 690B BD,24,6E        DST  @>836E,@STVSPT * RXB STORAGE FOR VDP STACK
[1427] 690E BD,6E,24        DST  @STVSPT,@VSPTR * Initialize value stack pointer
[1428] 6911 BD,A3,88        DST  @VSPTR,V@SAVEVP * Initialize pointer in VDP too
       6914 6E
[1429] 6915 00              RTN

Change to CALL PRAM(end-address,start-address) ! cool factor off charts.

Link to comment
Share on other sites

I rarely get giddy but WOW this is just so such a first.

I have a new routine called CALL PRAM(start-XB-program-address,end-XB-program-address)

This works for VDP or RAM and automatically decides which one it uses determined by 32K or just Console only!

 

You can decide how much space is used and where to load every XB Program, with the bonus that you do not need to remember where it loaded or saved.

The start and end address can be in VDP or RAM thus say you want in RAM start address of >FF00 and end address of >E000 of a 2K XB program.

Or load into VDP at say start address of >2400 and end address of >3500 and move a VDP table to where you want with no crash.

 

Demo will be out soon...

  • Like 4
Link to comment
Share on other sites

Crap!

RXB 2020 may not work properly from Console only after all, by allowing changes to XB RAM locations the VDP would require more work then I care to put into it.

 

Worst case RXB 2020 will not work properly in Console only mode with no memory expansion.

It may run with no problems but any memory changes in Console are out of question a problem that will crash.

 

In that case RXB 2015 is your only option.

 

Link to comment
Share on other sites

Hello

Ok I tested CALL PRAM and you can switch to lower 8K to put your XB programs and use the upper 24K for Assembly.

But I do not have enough space in RXB to put the other CALL UINIT (Upper INIT) as it takes to much space in GPL.

 

1268 bytes is just to much space out of RXB 2020 to find.

Was cool to see the LINK names in >FFE6 down to >E000 as you could have 1018 CALL LINK names for XB to do this.

Would have been a cool feature but space is a huge issue already.

 

*NOTE: all XB support routines had to be adjusted to >A040 added to them as an example is 

  0110 A042 C534  FFA    DATA IFFA              FIRST FREE ADDRESS (FFA) POINT
  0111 A044 0000  LFA    DATA ILFA              LAST  FREE ADDRESS (LFA) POINT
  0112            *   
  0113 A046 AA55  HAA    DATA >AA55             CONSTANT TO SIGNAL INITIALIZED
  0114            *   
  0115            *      UTILITY BLWP VECTORS   
  0116            *   
  0117 A048 A09A         DATA   UTILWS,NUMASG   NUMERIC ASSIGNMENT  
       200A A0D6  

 

Edited by RXB
Link to comment
Share on other sites

4 hours ago, MikeV said:

Wow! These are big steps.

 

I hope this new version of RXB will come with a directory of demo examples (as e.g. 2015)? They were very helpful. Thanks for all the work to date.

Yea I have in the package PC Text Source, TI99/4A DV 80 files, GRAM files, XB programs, and even Classic99 package to install unitl Tursi includes it into Classic99

And to top it off a CALL USER demo file that makes a number of XB demo programs.

 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...