Jump to content

Photo

Why does TI basic shift name table values?


8 replies to this topic

#1 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,403 posts
  • Location:Beaverton, OR

Posted Mon Oct 3, 2016 8:22 AM

So I'm playing around in assembly launched from a CALL in a DSR. In the TI BASIC environment, there is some sort of offset for character names. To display the correct character on the screen I have to add 0x60 to the character value.

This doesn't seem to be directly tied to a VDP register. And, it impacts KSCAN as well.

What is this feature? Where is it controlled? And when is it valuable? I can only imagine it helps save vdp ram by overlapping tables...

-M@

#2 Stuart OFFLINE  

Stuart

    Dragonstomper

  • 740 posts
  • Location:Southampton, UK

Posted Mon Oct 3, 2016 9:17 AM

jedimatt42, on 03 Oct 2016 - 3:22 PM, said:

I can only imagine it helps save vdp ram by overlapping tables...
 

 

That's exactly it as far as I recall. One of the VDP tables overlaps the character definition table, so all the character definitions have been shifted up in the table, so to display the pattern for character "A" you need to print the character ASC("A")+>60 (or whatever the offset is).



#3 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,403 posts
  • Location:Beaverton, OR

Posted Mon Oct 3, 2016 9:48 AM

This offset must be stored somewhere in scratchpad too, because after i reset all of the vdp registers, some rom programs display fine, but keyboard input expects the offset: I cannot get it to respond to keypress 1, but if in classic99, I double click the '1' on the screen, it responds.

I swear I have read about this before, just cannot remember where. I want to clear out this behavior.

-M@

Sent from my Nexus 6 using Tapatalk

#4 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,556 posts
  • Location:Silver Run, Maryland

Posted Mon Oct 3, 2016 9:59 AM

Both TI Basic and TI Extended Basic have the overlap, but handle it differently.  See Thierry's VDP RAM page for a pretty good explanation of this.

 

...lee



#5 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,967 posts
  • HarmlessLion
  • Location:BUR

Posted Mon Oct 3, 2016 10:55 AM

I've never seen KSCAN return different values due to the screen offset (you'll also see it called "bias")... the only non-GPL thing I've seen care about it are DSRs (and THAT only used in the cassette DSR).

Your KSCAN effect is being caused by something else. Classic99 sometimes has an issue with not releasing the Alt key when you alt-tab away, could it be that? (Tap alt with focus to clear it).

The character offset is not a function of the VDP at all, it's pure software. Also remember that VDP registers are write-only, therefore NOTHING outside of the VDP can be using the data stored in them for behavior.

The offset isn't configurable in BASIC, either, it's hard-coded. If you have TI Intern you can find it in the GPL disassembly at >239F (for example) being stored to a temporary location in scratchpad to call a print function. It's in many other places (>242f,>2b7d,>2cb4,etcetc). I can't see that it has a fixed scratchpad location. (I thought it did too, but I can't find anything to back that up). Anyway, it's a pure GPL function.

#6 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,403 posts
  • Location:Beaverton, OR

Posted Mon Oct 3, 2016 11:23 AM

Thanks! I'll double check my observations this evening. If it is the sticky alt, that will be hilarious.

-M@

Sent from my Nexus 6 using Tapatalk

#7 RXB ONLINE  

RXB

    River Patroller

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

Posted Mon Oct 10, 2016 7:37 AM

Both TI Basic and TI Extended Basic have the overlap, but handle it differently.  See Thierry's VDP RAM page for a pretty good explanation of this.

 

...lee

Hmm Thierry page does not mention this offset is built into GPL and all the TI BASIC, XB, EA cart, Mini Memory cart,  GROM 0 and all other carts that use GPL have this built into them.

 

It is in the GPL manual and EA Manual also mentions it. Just pointing out a fact that has always existed in GPL even in the TI99 before the TI99/4A.



#8 RXB ONLINE  

RXB

    River Patroller

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

Posted Sat Feb 3, 2018 5:57 AM

You know I am working on making a XB/EA cart hybrid that just moves the Color table and resets 2 VDP Registers then jumps into EA cart.

 

I have no idea why the screen bias even exists in TI Basic and XB? 

(It does save some VDP memory but not enough to warrant the sacrifice that results.)

 

Really the Screen Bias creates many more problems than it helps just for a very small amount of VDP space used.

 

It would make a better XB and faster if the Bias was just not used, so much GPL is used to always deal with this problem.

 

Not to mention the number of XB programs slowed down and crippled by having to add or minus 96 from every character. 

(I think it is one really stupid thing done by Texas Instruments that makes little sense.)



#9 acadiel ONLINE  

acadiel

    Stargunner

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

Posted Mon Feb 5, 2018 7:52 AM

Ah, I remember the BASIC BIAS.  The Gram Kracker even had a toggle so you could offset everything.


  • RXB likes this




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users