Jump to content

TI-99 40 column text game using T40XB


hloberg

884 views

I have been going through my Atari 8-bit games and looking to translate them into TI-99 games, mostly BASIC. The games I wrote in Atari MSBASIC are fairly straight forward translations. Atari BASIC has the issue of strings being completely different but can be got around.
One thing that both Atari BASICs have in common is the Atari uses 40 column text. This can be a tedious issue to fix when translating to TI99 32 column text. You have to go through each line check, recheck, reformat recheck again etc...
It would be nice if the TI99 had a 40 column text mode... oh wait, it does it's just not easily accessible in XB. But some nice people, much smarter then I in all thing TI99, have addressed this deficiency. Enter the 'Senior Falcon' (Harry Wilhelm) with a wonderful little utility called T40XB which makes the 40 column mode usable from XB.
For more on it read this thread: http://atariage.com/forums/topic/289953-40-column-routine-or-early-version-of-xb24-for-xb/
Simply you use CALL LINK routines to call the T40 and use the 40 column routines in it's own screen.
Here is the file: T40XB1.zip
the ZIP file has a very nice booklet with it.

Now to the game.
To test this 40 column routine I chose the simple game 'Civil War'. It's from David Ahl 'BASIC computer games book'. Here's a copy of the book online:
https://www.atariarchives.org/basicgames/

How I got this game from the Atari to the TI99 was thus:
1.) load the game in Atari Altirra emulator.
2.) print the game to text.
3.) do global REM of lines that the TI99 won't understand (such as POP)
4.) global replace PRINT with CALL PR(..
5.) create CALL routine:
CALL PR(A$)
CALL LINK ("PRINT",25,1,A$)
SUBCALL
6.) Now go through the program and change other things such as INPUT and replace multiple PRINTs with SCROLL
7.) start classic99 and paste in the code and save, test, save, test .....

All in all this conversion didn't take that long since string use was minimal and I didn't have to go line by line reformatting.

The T40XB does eat into the stack area in the VDP so you will have about 2k less memory for created CALLS and string arrays. It doesn't use any main memory though.
It does, currently, have an issue with classic99 sometimes locking up the emulator but Tursi is looking into that.
Here is the game disk: T40XB1.zip
from the menu press 2. It starts the T40XB package which calls the civil war game.

now lets look at some of the commands of T40XB:
First off the 40 column mode is one color; that is one fore and one background color. Also you have no sprites. This is a limitation of the TI99.
You must load in the T40XB using the loader program, DSKn.TX40XB.
Afterwards CALL LINK("T40") to turns it on. You must have this as the 1st line before you do anything T40 related in your program. All the T40XB text lives in it's own memory area so when the program ends or you jump back to the 32 column mode using CALL LINK("G32") your T40 text will disappear.
CALL LINK("COLOR”,foreground-color,background-color) this changes the fore and background colors. Standard TI99 won't work.
CALL LINK("CHAR”,character-code,pattern-identifier[,...]) this is CALL CHAR for T40. You get a separate character set for T40. Harry has already supplied a nice character set with true lower case.
CALL LINK("INVERT”,row,column,length[,...]) this gets you inverse text much like the Atari has (nice touch). a lot of the other commands also have an inverse mode.
CALL LINK(“SCROLL”[,repeats]) this will scroll the page up 1 to [repeats] lines.
CALL LINK(“CLS”) this does a CALL CLEAR
CALL LINK(“HCHAR”,row,col,character-code[repeats,.....]) & "VCHAR" same as TI CALL HCHAR & VCHAR.
CALL LINK(“PRINT”,row,col,string or number[,length,.....]) this is the meat of the program. It is a combination DISPLAY AT & PRINT. If you specify the row & column it will display at that row & column. Put 25 in the row and it will print at the bottom of the page and scroll everything up just like print. Note: you must have a properly formatted string to display. Errors might crash the TI99.
CALL LINK(“INPUT”,row,col,string-or-numeric-variable[,length,prompt-string]) this is INPUT AT or just INPUT like the TI99. Refer to the manual for lots of features.
One nice thing is that if you crash or exit the program the T40 routine exits gracefully. Good programming.
Not many commands but it gets the job done without not much overhead. Very nice.
Well, that's it for now. HLO



 

XBGames1.dsk

  • Like 1

2 Comments


Recommended Comments

I downloaded the game disk listed above but it appears to be the exact same file as the T40XB file earlier in your post. I don't know if this happened because of the forum update that happened earlier this year, but just wanted to let you know, as I wanted to get a feel for how it actually works.

Link to comment
Guest
Add a comment...

×   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...