A few years ago I came across this disk of extensions to XB and was intrigued. It had nice high resolution capabilities and some interesting clock functions. I initially did some research and found it was released by Peter Kull in Germany in the 80s and that he has since disappeared from the TI99 scene. Not much more was known about it.
Well, life happened so I put this project aside for a few years.
But recently, having gotten back into the TI99,I pulled the old KXBII disk and decided to finally figure out how to use it with what little info I had. What I did was use the example programs that came on the disk a just test out the functions till I figured them out, or as far as I could figure them out with the information I had.
What is Kull Extended BASIC II programming package. Well the name makes it sound like it's a XB cartridge but in reality it's a series of XB CALL LINKs that add high resolution and clock functions (oddly enough) to Extended BASIC.
The KXBII package is very similar to Harry's Weilheim's TML (TML is much more feature laden). The main difference being that theTML package you live in the TML environment from LOAD. KXBII, on the other hand, once you load the KXBII just lives in the background till the high res graphic are invoked. You actually can run the clock functions without turning on the hi res graphics functions. This is good and bad. Good, you don't have all the memory restrictions of using hi res graphics till you need them. Bad, you have to be a lot more careful with your string and sprite management (see notes in manual).
The program can be a little tricky to use (again see notes in manual) but it looks to be stable if you stay within the bounds. Still, there are some nice features; I especially like the multi colored. And it never hurts to have another tool in you tool belt.
Anyway, here's and exert from the manual I created and attached is a package with the programs for it (V9t9 format). Enjoy.
update the manual. I translated a program from the Atari 8-bit, an Uno program I wrote. Found some issues and some mistakes in the manual. Here is the new manual v2.
* EXT/BASICII *
BY Peter Kull
Extended Basic II or for short KXBII is a series of CALL LINK subroutine functions which add graphics and clock functions (among other things) to TI Extended BASIC.
Use the LOAD program supplied with the disk. It calls the LOADEX program which loads in the extensions to memory.
If you have ever used TML you know of the lack of stack space using high resolution graphics can cause. Same here. You have about 1088 bytes of stack space after you load the high resolution utility package.
From test I found that means about 200+ characters of string space available for strings. But be warned, if you exceed this limit you may not get an out of memory error but just have the upper limit strings corrupted. Be sure to test and check all large strings.
Also dimension string arrays after you load in the graphics package with 'INITG' and 'GRAFIK’. Otherwise it corrupts the strings.
the <Break key>.
The break key will get you out of any blank or gibberish screen created by exiting the high resolution graphics unceremoniously. You may have to hit the break key twice but I found it usually works.
If you put a character on the screen at about column 9, row 6 some partial random garbage will sometimes appear on that character when a CALL LINK(“PRINT”...) command is executed. Not lethal, but annoying.
Sprite commands are, unpredictable. I had all kinds of random errors happen while attempting to use the sprite commands with the high resolution graphics with a limited amount of stack space left. On the other hand, if I used the sprite commands with plenty of stack space left they usually acted fine.
RANDOMIZE will sometimes causes errors with the point graphic commands such as “SET” and “DRAW”. This came up when using the trick RANDOMIZE :: CALL PEEK(-31808,A) to get a fast random number. If I just put RANDOMIZE at the beginning of the program and used RND normally, though, things usually worked as normal.
Not really a bug, just a consideration. There doesn’t seem to be much error checking in the values you can insert into the CALL LINK(“... ) commands. You may not even get an error at all related to the command but instead have a random line give you a SYNTAX ERROR or such.
All commands are CALL LINK(“command”....) functions.
This initially loads the package into memory from the LOAD program. Loading this a 2nd time screws up display.
INITG ("INITG") - initialize high resolution. Always must use before GRAFIK.
GRAFIK (“GRAFIK") - opens the high resolution area for use. also can be used to clear the screen in high resolution.
TEXT "TEXT" - puts you back in the standard text mode.
These command functions DO NOT need 'INITG’ or the ‘GRAFIK’ to work.
TIMER (‘TIMER’,output variable) - A timer that if you divide the output variable by 39 will you roughly give you a one second counter.
TIMSET ('TIMSET') - This resets the TIMER to zero.
STELL ('STELL',hour,minute) - This sets a clock in the upper right of the screen which stays resident.
START (‘START’) - starts on-screen clock.
STOP (‘STOP’) - stops the on-screen clock.
UHRAUS (‘UHRAUS’) - removes the on-screen clock.
UHREIN (‘UHREIN’) - puts the on-screen clock back on the screen.
POKEV ('POKEV',memory location,input variable) - pokes data into the VDP area
PEEKV('PEEKV',memory location,output variable) - peeks at data in the VDP area
These DO need 'INITG' & ‘GRAFIK’ commands before use.
PRINT (“PRINT”,y,x,"string",foreground color,background color)
- this will print a string on a screen at Y,X in whatever color and background color you wish. Probably the most useful function of the utilities.
SET ("SET",y,x,color) - turns a pixel on at Y,X with specified color.
DRAW ("DRAW",y,x,color) - draws a line from last point (SET or DRAW end) to Y,X coordinates.
PAINT ("PAINT",y,x,color) Fill command.
CIRCLE ("CIRCLE",center y,center x,right y,right x,color) - to draw a circle or ellipse.
("CIRCLE",cy,cx,ry,rx,color,begining degree, ending degree) - to draw a partial circle arc or ellipse arc.
Sprite functions (use sparingly they can be kinda buggy).
Normal TIXB sprite functions will corrupt the high resolution screen area so always use these sprite commands when using high resolution screens with ‘INITG’ and ‘GRAFIK’ commands.
SPRITE ('SPRITE',sprite#(1-27),char$ number(32-127),color,Y,X)
- Works like the sprite function in TIXB except you can not define the speed.
CHAR ('CHAR',char$ number(32-127) ,’Char def of sprite’)
- You MUST define each char used for the sprites with this command. They are not the same as the chars defined for the PRINT command.
COINC (sprite#, sprite#, tolerance, output variable ) OR
(sprite-number, dot-row, dot-column, tolerance, output variable)
- works like TIXB sprite coincidence except no ALL command.
DIS ('DIS',sprite#,y,x,output variable) (OR) ('DIS',sprite#,sprite#,output variable)
- works like TIXB sprite DISTANCE command
POS ('POS',sprite#,y,x) - Works like TIXB sprite POSITION command.
DEL ('DEL',sprite#) - removes a sprite from the screen.
LOC ('LOC', sprite#,newy, newx) - relocates a sprite on the screen.
COL ('COL',sprite#, new color) - changes the color of a sprite.
PAT ('PAT',sprite#,new char#) - changes the char pattern of a sprite.
MOTION ('MOTION',sprite#,yspeed,xspeed) - changes the speed of a sprite. same values as TIXB.