AMS-RXB

Rev. 9/26/01
by Rich Gilbertson
The AMS presently comes in a 256K model and is the same type as used by RXB development. The AMS memory card does lnot have a DSR (Device Service Routine) like other TI cards. It is more like a 32K card then a RS232 card or Disk controller Card. So when I first received the AMS card I discovered the design is almost totally incompatible with Extended Basic.
Lets explain this reasoning. In order to change a page of AMS memory the program that does it MUST not be in that page. With XB that means the upper 24K must stay unused. Why? Well how do you know where the program line is that switched the page.
Now what about the lower 8K of assembly support. Well once again if the program resides in the lower 8K that switches the lower 8K then of course it is assumed the program has a copy of itself in all pages. Or in only the lower half of the lower 8K.
How about an Einstein method to explain our dilema. Imagine you have 49 buckets of water and these buckets of water will represent AMS memory pages. Now one empty bucket represents the program that will switch all the AMS memory pages. Ok pick up two buckets in the two arms you have.
Now put one of the 47 buckets of water into the empty bucket and you CAN NOT put down either of the buckets in either hand, nor can you put two buckets into one hand.
Can't be done! You are right. This is the reason the AMS is not compatible with XB. Now the ONLY programs developed for XB with the AMS are AMS-TEST (reports size of AMS), and XBPACKER (turns the AMS into a RAMDISK ). Proof enough?
If the AMS had a DSR from the beginning there would be tons of software for the AMS. In this case hardware considerations fully outweighed software concerns. Thus no software produced.
From this dismal beginning lets see what can be done from good old GPL (Graphics Programming Language). GPL is half of the operating system of the TI and resides in all TI-99/4A's. GPL also offers full interrogation with all devices, matter of fact all devices for the TI are designed to work with GPL.
RXB is written entirely in GPL with some imbedded assembly language also. So working with the AMS and GPL produced results in several days while years went by with no results from XB.
Six commands in RXB exist for the AMS and that was all that was needed to fully control the AMS from XB.
AMSPASS that puts the AMS into it's normal mode as only a 32K card. Makes the AMS invisible to the TI. Think of it as taking a disk out of a drive.
AMSMAP turns on the mapping registers of the AMS. Nothing is changed except the DSR space now contains the mapper registers. Think of it like putting a empty disk in a drive.
AMSOFF turns off the read and write lines. Think of it as a protect notch on a disk being covered.
AMSON turns on the read and write lines. That means that unless AMSON is called a CALL PEEK or CALL Load to read or write the mapper registers will not work. Think of it as a protect notch on a disk being uncovered.
AMSINIT turns on the mapping registers and turns off the read and write lines. Think of it as FORMAT a disk.
AMSBANK loads the lower 8K half with a 4K passage and also the upper 8K half with a 4K page. Think of it as sectors on a disk and each sector is numbered.
IN PASS mode the mapper register setup is equivalent to:
mapper.address.mapper.page.num
___________________________
..HEX .....Dec........ ....HEX Dec memory area
>4004 = 16388 is MR02 = >02 = 02 points to >2000 - >2FFF range.
>4006 = 16390 is MR03 = >03 = 03 points to >3000 - >3FFF range.
>4014 = 16404 is MR10 = >0A = 10 points to >A000 - >AFFF range.
>4016 = 16406 is MR11 = >0B = 11 points to >B000 - >BFFF range.
>4014 = 16404 is MR10 = >0A = 10 points to >A000 - >AFFF range.
>4016 = 16406 is MR11 = >0B = 11 points to >B000 - >BFFF range.
>4018 = 16408 is MR12 = >0C = 12 points to >C000 - >CFFF range.
>401A = 16410 is MR13 = >0D = 13 points to >D000 - >DFFF range.
>401C = 16412 is MR14 = >0E = 14 points to >E000 - >EFFF range.
>401E = 16414 is MR15 = >0F = 15 points to >F000 - >FFFF range.
(MR=Mapper Register)
In MAP mode the mapper register setup is equivalent to: EXAMPLE1
mapper address mapper page num
________________________________
....HEX.....Dec.......................HEX...Dec................memory area
>4004 = 16388 is MR02 = >10 = 16 points to >2000 - >2FFF range.
>4006 = 16390 is MR03 = >11 = 17 points to >3000 - >3FFF range.
>4014 = 16404 is MR10 = >12 = 18 points to >A000 - >AFFF range.
>4016 = 16406 is MR11 = >13 = 19 points to >B000 - >BFFF range.
>4018 = 16408 is MR12 = >14 = 20 points to >C000 - >CFFF range.
>401A = 16410 is MR13 = >15 = 21 points to >D000 - >DFFF range.
>401C = 16412 is MR14 = >16 = 22 points to >E000 - >EFFF range.
>401E = 16414 is MR15 = >17 = 23 points to >F000 - >FFFF range.
(MR=Mapper Register)
In MAP mode the mapper register setup is equivalent to: EXAMPLE2
mapper address mapper page num
________________________________
HEX..........Dec.......................Hex Dec ...............memory Area
________________________________________________
>4004 = 16388 is MR02 = >19 = 31 points to >2000 - >2FFF range.
>4006 = 16390 is MR03 = >01 = 01 points to >3000 - >3FFF range.
>4014 = 16404 is MR10 = >09 = 09 points to > A000 - .AFFF range.
>4016 = 16406 is MR11 = >00 = 00 points to >B000 - >BFFF range.
>4018 = 16408 is MR12 = >07 = 07 points to >C000 - >CFFF range.
>401A = 16410 is MR13 = >18 = 30 points to >D000 - >DFFF range.
>401C = 16412 is MR14 = >05 = 05 points to >E000 - >EFFF range.
>401E = 16414 is MR15 = >04 = 04 points to >F000 - >FFFF range.
(MR=Mapper Register)
As you can see you can switch pages around all you want.
But of course not in XB as previously shown. So what can RXB do instead? Well RXB switches the lower 8K of assembly support two 4K pages at a time. Remember the buckets, well GPL acts as a DSR for the AMS. Because the control of the AMS is in GPL it can switch pages without affecting XB.
If you look at the previous page you see >2000 - >2FFF range, this is the lower half of 8K support and >3000 - >3FFF range is the upper half of 8 K support.
The >4004 and >4006 mapper registers are the two halves of the 8K support for assembly. This is where you place the pages numbers to control what memory is where. Confusing as this sounds RXB has a simpler method to work with. Fool proof access.
RXB is set up to use pages that will not conflict with overall performance of SB. A 256K AMS has 32K used for PASS mode, so this is your normal 32K memory. Hence 256 - 32 = 224K left. But 32K is also ignored as future applications will need a 32K operating system. So 224 - 32 = 192K left for RXB. I selected to save 64K of the AMS for present and future use.
With 192K left of assembly support for RXB I don't think this will be leaving anyone high and dry. The biggest assembly program I have ever seen was never released and was only 72K in size. That is less then half of 192K.
There is also the option which I selected. I have a 512K chip in my AMS and plan to buy another one to get to 1 Meg. I have seen TEXCOMP's 1 Meg board for the AMS and it is cheaper then my two 512K chips. (It uses 128K chips on a daughter board).
Another program I ran into with the AMS was loading the pages with software from XB. CALL AMSBANK would switch banks of the lower 8K for more loading, but CALL LOAD was absolutely to slow that filling 48 banks of 4K even at two banks at a time took 4 hours. Heck this example took 4 minutes.
EXAMPLE: CALL INIT
.......................CALL AMSBANK(0.1)
.......................CALL LOAD)"DSK1.SCREENDUMP")
.......................CALL AMSBANK(2,3)
.......................CALL LOAD("DSK1.XB-PLOT")
Well the result was the creation of CALL BLOAD and CALL BSAVE as this method uses only program image format. Yet even these subprograms will take 2 minutes to do the above example. But from RAMDISK it took 7 seconds. To load 48 banks with BLOAD from RAMDISK took 50 seconds, but used 1587 sectors. So the cost of BLOAD and BSAVE is 33 sector files. Though 48x4=192K being loaded into a TI in 59 seconds seems pretty fast from XB.
In order to load a 1 Meg AMS would require 120 files of 33 sectors or 3 DSQD drives of 48 banks each. Thus you would need 3 RAMDISKS of DSQD or a single Hard drive with 120 files.
This makes it easy to see why IBM had to get faster Hard drives. And why they are now required for a TI.
We have another article called RXB. If you would like to see that article: click here.
If you would like to go back to the PUNN menu: click here.
If you would like to go back to the opening menu: click here.
  • any Comments, Questions, or Inquiries: E-Mail is-w7wwg@jps.net
  • 6/8/98