Jump to content

Photo

GRAM & BASIC & VDP


59 replies to this topic

#1 Opry99er ONLINE  

Opry99er

    Quadrunner

  • 8,810 posts
  • Location:Hustisford, WI

Posted Tue Jan 30, 2018 9:28 PM

The GRAM Kracker manual states that you can store BASIC programs *up to 40k* in the Module space using MSAVE6.

According to the docs, MSAVE6 utilizes a feature built in to the BASIC interpreter which allows you to run pure BASIC code from the module space. This is different than having a BASIC program stored on a cartridge and then copying it to the VDP to run. This would allow a giant 40k BASIC program to run from the module space without storing the code in VDP. I could finish up Jedi Gauntlet with 20 levels and have headroom to spare.

I would like to know how this is achieved. Since I am sans-Kracker right now, Im trying to find some additional documentation on this feature of the interpreter which is more specific than the GK manual.

Thanks!

#2 RXB OFFLINE  

RXB

    River Patroller

  • 2,908 posts
  • Location:Vancouver, Washington, USA

Posted Wed Jan 31, 2018 3:08 AM

It used the GRAM as a fake storage device. RAMIT and GRAMIT were routines that used the header and GROM 0 to access it.

 

How it works is you set up a header in GRAM:

*                        GROM HEADER
***********************************************************
       GROM >6000
       AORG 0
       DATA >AA0F      * VALID GROM / VERSION
       DATA >0100      * (FUTURE EXPANSION)
       DATA >0000      * POWERUP
       DATA XBCART     * PROGRAMS
       DATA VEIW40     * DSR *** PUT YOUR FAKE DEVICE HERE (VIEW40)
       DATA LINK1      * CALL
       DATA >0000      * INTERUPT
       DATA >0000      * BASIC CALL
***********VEIW40 DATA EADSR             * Viewer 40 Column
       DATA MV40
       STRI 'V40'
*******************************
MV40   DST  @>8356,@>8358
       DSUB @>8354,@>8358
       MOVE 10,V@-10(@>8358),@FAC
       AND  >1F,V@-9(@>8358)
       CH   >04,@FAC
       BS   DSREXT
       CASE @FAC
       BR   VOPEN         * OPEN
       BR   VCLOSE        * CLOSE
       BR   DSREXT        * READ
       MOVE 880,V@80,V@0  * WRITE
       MOVE 80,V*FAC2,V@880
       SCAN
       BR   DSREXT
FREEZE SCAN
       BR   FREEZE
       BR   DSREXT
VOPEN  MOVE 128,V@>0380,V@-128(@>8370)
       ST   >F0,@FAC
       MOVE 1,@FAC,#1
       ST   >F0,@>83D4
       ST   >20,V@0
       MOVE 959,V@0,V@1
DSREXT CALL RETURN
VCLOSE SCAN
       BR   VCLOSE
       MOVE 128,V@-128(@>8370),V@>0380
       ST   >E0,@>8300
       MOVE 1,@>8300,#1
       ST   >E0,@>83D4
       BR   DSREXT
************************************************************************************

The above is a similar device I installed into RXB 2001 that allowed you to view DV80 files in on screen and scroll through them.

You could do the same thing using TI BASIC SAVE or OLD for storage space up to 40K.

At one time RXB had a GRAMIT routine that would save to GROM into the TI Basic space of the GRAM KRACKER or GRAMULATOR.

(Of course rending TI Basic useless but RXB runs all TI Basic programs fine so no real loss there.)



#3 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 8:54 AM

Thanks.

I guess my question is, does the GK modify the console in some way to allow it to run BASIC code from the module space, or could a large cartridge contain BASIC code and run from the module space without the need for GRAMs?

#4 --- Ω --- OFFLINE  

--- Ω ---

    오메가

  • 11,165 posts
  • Location:워싱턴 주

Posted Wed Jan 31, 2018 8:58 AM

It used the GRAM as a fake storage device. RAMIT and GRAMIT were routines that used the header and GROM 0 to access it.

 

 

IIRC RAMIT was also used with the old, but now outdated Super Cartridge.



#5 acadiel ONLINE  

acadiel

    Stargunner

  • 1,153 posts
  • www.hexbus.com
  • Location:USA

Posted Wed Jan 31, 2018 9:17 AM

Well, Klaus did talk a little about this in his thread:

 

http://atariage.com/...ridge-binaries/

 

Wasn't there a BASIC support module or some other thing discussed at one time?



#6 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 9:55 AM

Interesting stuff in that thread. Thanks for posting!

Im actually pretty jazzed because i am in *Final-Details* mode on acquiring my old GRAM Kracker back after all these years. I am hoping to develop a large TI BASIC program using the GRAM in the module space, or at least developing it in emulation and then testing it on the GK. Details will have to be worked out on how to achieve the transfer, but the prospect of being able to create a pure BASIC cartridge is very intriguing. Very intriguing indeed.

If the GK can run BASIC from the cartridge space, we should be able to do it using a cartridge board, no? Unless the GK has some magic trickery up its sleeve, that is.

Fun stuff to think about. :)

#7 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 10:11 AM

I wonder if the FinalGROM will play well with the GK?

#8 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,967 posts
  • HarmlessLion
  • Location:BUR

Posted Wed Jan 31, 2018 4:10 PM

IIRC the BASIC interpreter doesn't mind running BASIC programs from GROM, but that doesn't entirely help you because I don't know of any way to create that 40KB BASIC program....?



#9 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 4:19 PM

True. It can be created using the GRAM Kracker, if I am reading the docs correctly. If that is the case, I would imagine it could be emulated in MESS. Or maybe I could convince you to hack something up to allow a 40k listing in Classic99. :D

Honestly, I dont know any other way than to do it on hardware with the GRAM Kracker, save the final module to disk, then transfer the saved module to the PC. Would suck royally, but I think it is possible. Ill be getting my GK back next month and I will do some work.

#10 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,894 posts
  • Location:Germany

Posted Wed Jan 31, 2018 4:57 PM

The GK is fully emulated in MAME (including these nasty switches). I don't have the manual right here to test it.

 

[Edit: I say "nasty" because it is virtually impossible to operate that device correctly without looking into the manual... :) ]


Edited by mizapf, Wed Jan 31, 2018 5:26 PM.


#11 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,967 posts
  • HarmlessLion
  • Location:BUR

Posted Wed Jan 31, 2018 5:20 PM

True. It can be created using the GRAM Kracker, if I am reading the docs correctly. If that is the case, I would imagine it could be emulated in MESS. Or maybe I could convince you to hack something up to allow a 40k listing in Classic99. :D

Honestly, I dont know any other way than to do it on hardware with the GRAM Kracker, save the final module to disk, then transfer the saved module to the PC. Would suck royally, but I think it is possible. Ill be getting my GK back next month and I will do some work.

 

No, the GRAM Kracker can /convert/ it. But you still need a working program to start from. And Classic99 doesn't need to emulate "those nasty switches". ;) How are you going to create that 40k BASIC listing in the first place?

 

Unless I've completely missed something. :)



#12 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 5:30 PM

I was under the impression that you could write, load, and save BASIC programs to/from the module space with the GK, with the GRAM acting as the storage medium. Perhaps it is I who completely missed something.

#13 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,894 posts
  • Location:Germany

Posted Wed Jan 31, 2018 6:20 PM

The GK is mainly used to store a cartridge and/or the console GROMs, and to allow for changing the contents. It overrides the console GROMs so you can effectively patch the GROMs. I don't know if there is a way to store a BASIC program in GROM. It would not be impossible, but it requires another tool for that. And then the program is in the GK's GROM space, and I guess you'd like to use it elsewhere.



#14 acadiel ONLINE  

acadiel

    Stargunner

  • 1,153 posts
  • www.hexbus.com
  • Location:USA

Posted Wed Jan 31, 2018 6:38 PM

The GK is fully emulated in MAME (including these nasty switches). I don't have the manual right here to test it.
 
[Edit: I say "nasty" because it is virtually impossible to operate that device correctly without looking into the manual... :) ]


Yep, remember helping you with it. I have the ROM on my hard drive somewhere. :)

#15 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 7:10 PM

Im going to re-read the docs again, but if Im not mistaken, the BASIC program resides in the GK module space, and can be loaded, edited, and saved there. So, (and I may be entirely wrong) it should be possible to write a BASIC program, MSAVE6 It to the GK, re-load, edit, etc., all the way up to 40K.

#16 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 7:20 PM

According to the docs, GRAMs 3-7 are set aside for BASIC code. The TI GROMs are 6k in size but reside in 8k boundaries... meaning the additional 2K are basically garbage. You can write over these with your own BASIC code. That gives a total of 40k of space.

It does not specify the maximum size of a single program, but I think it is implied.

#17 Casey ONLINE  

Casey

    Chopper Commander

  • 195 posts

Posted Wed Jan 31, 2018 8:23 PM

I'm not sure if this is apropos to your project, but Thierry's site mentions that there is a bug in the TI BASIC interpreter related to the RESTORE command used with DATA statements.   RESTORE only works if your program is running from VDP RAM and not GRAM/GROM:

 

http://www.unige.ch/...ugs.htm#Restore

 

Something to keep in mind if you are pursuing this and need to use RESTORE - you may have issues. 



#18 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 8:45 PM

10-4. When I began working on Jedi Gauntlet, I made the decision early on to not use restore commands, so Im good there.

I remember Bill Sullivan chronicling this bug somewhere with much chagrin.

My structure is currently as such that it will work from the module space. I am actually excited to learn the details and try the Jedi demo running pure BASIC code from the cart slot. As everyone knows, Im no genius on CPU and VDP architecture, but the prospect of a 40k BASIC program running from the module space is enough to get me digging into data sheets.

#19 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,967 posts
  • HarmlessLion
  • Location:BUR

Posted Wed Jan 31, 2018 11:02 PM

Im going to re-read the docs again, but if Im not mistaken, the BASIC program resides in the GK module space, and can be loaded, edited, and saved there. So, (and I may be entirely wrong) it should be possible to write a BASIC program, MSAVE6 It to the GK, re-load, edit, etc., all the way up to 40K.


This is the point that I think is incorrect, I didn't think the BASIC immediate mode could write to the GROM. But Mizapf is right, maybe the GRAM Kracker has a hacked BIOS.

It should just work in Classic99, I will see if I can find the Kracker's software. :)

#20 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Wed Jan 31, 2018 11:10 PM

Very cool.

 

And yea, the GK manual isn't super specific on this point either.  I will have the GK back next month, so I will be able to test... for now, I'm formulating my plan based on a potentially flawed understanding of the hardware.



#21 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,967 posts
  • HarmlessLion
  • Location:BUR

Posted Wed Jan 31, 2018 11:14 PM

Well, I found the manual. It does say "MSAVE6 loads into GRAM3 so it can use all of the module Gram space for BASIC programs that you write (up to 40K)".

But the instructions note: "Once the file is loaded you can go into TI BASIC and load or write a Basic program and then type in CALL MSAVE and follow the instructions on the screen. This routine moves your Basic program out to Gram, sets up a proper line number table in Gram and sets up a header for it on the menu so that it can be directly executed by pressing a key."

To me that says it is only a utility to move an existing TI BASIC program, which is by definition restricted to under 16k. But I guess all you can do is try it.

#22 Opry99er ONLINE  

Opry99er

    Quadrunner

  • Topic Starter
  • 8,810 posts
  • Location:Hustisford, WI

Posted Thu Feb 1, 2018 12:15 AM

Yes, I'd had that thought too... But I sort of read it as: By "pressing a key" it functions as "RUN BASICGRAMCOPY", almost as if it were an XB autoload program...

 

If that is the case, then you should be able to break out and edit while the program still resides in GRAM, since it has a pre-set-up line number table in GRAM... That was my thought process.  Unless, of course, it disables FCTN+4 somehow, but if so--that's undocumented.

 

Additionally, if the "proper line number table in GRAM" is set in stone, one would not be able to edit the module in GRAM... as you suggest.

 

 

Anyone have a GK on hand?  Care to run a test or two for me?  :)



#23 RXB OFFLINE  

RXB

    River Patroller

  • 2,908 posts
  • Location:Vancouver, Washington, USA

Posted Thu Feb 1, 2018 4:28 AM

 

 

IIRC RAMIT was also used with the old, but now outdated Super Cartridge.

I used it with RXB SAMS demo running 46K of Assembly out of SAMS using this so saying outdated is rather funny.\

 

I did do this demo years ago but no reason a updated version could not be done on SAMS for 32K chunks (8K assembly & 24K XB program)

 

 

 

 

P.S. Originally this was in RXB 5.55 in 1993 up to RXB 2001


Edited by RXB, Thu Feb 1, 2018 4:29 AM.


#24 RickyDean OFFLINE  

RickyDean

    Dragonstomper

  • 732 posts

Posted Thu Feb 1, 2018 6:50 AM

Yes, I'd had that thought too... But I sort of read it as: By "pressing a key" it functions as "RUN BASICGRAMCOPY", almost as if it were an XB autoload program...

 

If that is the case, then you should be able to break out and edit while the program still resides in GRAM, since it has a pre-set-up line number table in GRAM... That was my thought process.  Unless, of course, it disables FCTN+4 somehow, but if so--that's undocumented.

 

Additionally, if the "proper line number table in GRAM" is set in stone, one would not be able to edit the module in GRAM... as you suggest.

 

 

Anyone have a GK on hand?  Care to run a test or two for me?  :)

I have a working GK. If it doesn't involve using 5.1/4 inch floppies, I could possibly help this evening and take pictures.



#25 --- Ω --- OFFLINE  

--- Ω ---

    오메가

  • 11,165 posts
  • Location:워싱턴 주

Posted Thu Feb 1, 2018 7:35 AM

I used it with RXB SAMS demo running 46K of Assembly out of SAMS using this so saying outdated is rather funny.\

 

Hi  Rich,

   I was referring to the Supercart as being out of date, not the program.  


  • RXB likes this




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users