Jump to content
IGNORED

TI Basic + sprite games


ramidavis

Recommended Posts

This method will only works with a TI-99/4A and a Recorder. so, a TI BASIC Standard TI-99/4A without expansions or cartridges connected is needed.
Emulators might not work.
if you have a Mini Memory Cartridge, for example, will be not needed all these steps to do but will be enough the instruction:
CALL PEEKV(-753,X)
inserted before to start the TI-BASIC program or starting to develope something for using the new VDP map.


The method explained on the magazine tell that for modify the VDP in TI BASIC we need to write on the TI99 the first program named"GENERATORE FILES PER MODIFICARE I REGISTRI VDP":
attachicon.gif1a.JPG
This program will allow us to generate a record with a false header.
after the RUN it will ask (by the line 110) to insert the values of the VDP registers but we can be able to use only the number 5.
the seconde value to specify that the character map to be used will be 144 to 159. So the value that we will insert in the input will be 5,15.

after this the computer will ask to save the program into a cassette tape and we have to do it (i used an empty tape of course :) )


************************************************************************************************************
This is what I don't understand. What is this false header and how does it modify the vdp register?

 

the program showed in 1a.jpg permit, after the RUN, to save on a cassette tape, the first part of the program needed to change the VDP.
into the magazine this part of program is described like a "false header". You have to load it from the cassette tape after record.
the program in the image 1a.jpg will only be used one time, for create the "false header" record. next times it will be enough to load the "false header" program directly.
and it will need Load the program before you start programming anything with the Sprites in TI-BASIC.
I think that for understand well how it works you need to use a real unexpanded TI99 with a recorder and follow all the step explained :P
i could try to do a video on these steps if it could help.

 

If you're talking false headers, and the like, I'd try doing something with this;
http://nivelleringslikaren.eu/ti994a_basic/

With that website, you can write a TI program and save it to a disk image. The point I'm making is; you can write things that would never be passed by the parser, save it as an image, and literally ram it into classic99 or js99er (or mess?)

Now, I don't know what I'm doing, but I know others do and I bet at least one person's brain just lit up. All I've ever done is make it crash upon loading illegal instructions/words. A cleverer person or someone more knowledgeable might be able to take advantage of this.

 

I do not think that it could work because the "false header" program can't be saved on disk from a real TI-99/4A but only on cassette tape.
Maybe some one could find today a new solution in TI-BASIC or otherwise with MiniMemory there is the instruction written above.

Edited by ti99iuc
  • Like 1
Link to comment
Share on other sites

I do not think that it could work because the "false header" program can't be saved on disk from a real TI-99/4A but only on cassette tape.

Maybe some one could find today a new solution in TI-BASIC or otherwise with MiniMemory there is the instruction written above.

 

Here is the wav file of the false header program.

false.wav

Link to comment
Share on other sites

Last night I tested a method that works in emulation. It does not use expansion memory, uses nothing but TI BASIC statements and uses no embedded code. I will come up with a short demo and post tonight. I will also try method I mentioned earlier for having auto sprite motion, but this may not be useful.

  • Like 6
Link to comment
Share on other sites

Is this the way it is meant to be? (Run in MAME)

 

http://www.mizapf.eu/files/tisprites.webm

That looks about right.

Then you would type new <enter> and proceed with loading the main game from tape.

 

Last night I tested a method that works in emulation. It does not use expansion memory, uses nothing but TI BASIC statements and uses no embedded code. I will come up with a short demo and post tonight. I will also try method I mentioned earlier for having auto sprite motion, but this may not be useful.

Sounds interesting. Can not wait to see what you've come up with. :)

Edited by notwhoyouthink
Link to comment
Share on other sites

Is this the way it is meant to be? (Run in MAME)

 

http://www.mizapf.eu/files/tisprites.webm

in true it seems to be a bit different from the one on the real computer

check it:

http://www.ti99iuc.it/web/___SCAMBIO___/falseheader.mpg

 

It seems that you will load two small programs instead of just one, i can hear two time the starting whistle in your video, and also the glitches before of the MemoryFull message are different.

anyway, could you try to write an example like in my video please ?

 

 

 

Here is the wav file of the false header program.

thanks for the .Wav interesting

 

I must absolutely install a complete MESS into my PC and learn to use :P

  • Like 1
Link to comment
Share on other sites

Ooops, sorry, I forgot there is a simple issue: The tape support is stereo in MAME, which does not make sense for a mono recorder, and to make things more confusing, the channel 1 plays about 9 seconds early from the channel 0 if there is no stereo signal. It does not affect loading, however, since only channel 0 is read.

 

So in fact, there is only one small program, not two. If you listen to the wav file, there is indeed only one.

  • Like 1
Link to comment
Share on other sites

gallery_34177_1071_157140.gif

Here is a different method for using sprites in TI BASIC that does not use the "false header" method. This works fine in emulation, both on Classic99 and Win994a. The programs below can be pasted into Classic99:

First is the program I call SETREGS in the video. You can change the first number in line 140 to use different magnifications. 224=magnify(1); 225=magnify(2) 226=magnify(3); 227=magnify(4). In the video I chose magnify(2). This program sets VDP register 5 so that characters 144-159 will define sprites. This should be compatible with Morphy and the other games that use the false header method. These methods only work because BASIC does not reset the registers because it thinks you are unable to change them.

10 FOR I=1 TO 128
20 READ X
30 F$=F$&CHR$(X)
40 NEXT I
50 OPEN #1:F$
100 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,248
110 DATA 55,215,158,200,0,255,0,0,0,0,0,159,34,0,0,0,33,111,0,0,0,0,0,0
120 DATA 32,0,33,224,42,93,3,179,216,32,131,186,131,212,215,224,131,189,215,224,131,188
130 DATA 215,224,131,191,215,224,131,190,4,224,131,196,216,32,131,187,140,0,4,91,0,0,0,0,0,0,0,0
140 DATA 227,208,133,15,71,128,53,103,0,0,131,144,0,0,33,111
145 REM  224=magnify(1),227=magnify(4) 

The next program is called BXSPRITES in the video. Sprites are defined with CALL CHAR statements starting at 144. For example: 10 CALL CHAR(144,"0000A1010020A202") will create 2 sprites; the first at row 0 and column 0 using character A1 which is an "A" >41+>60(basic offset)=>A1 and color >01 which is black . The second sprite is at row 0 column 20 using a "B" and color is medium green. If you want to kill the sprites, CALL CHAR(144,"D0") will do the trick. Also, you should turn off the rest of the sprites using "D0" as in line 22 below.

1 CALL SCREEN(16)
2 CALL CLEAR
10 CALL CHAR(144,"0000A1010020A202")
11 CALL CHAR(145,"0040A3030060A404")
12 CALL CHAR(146,"2000A5052020A606")
13 CALL CHAR(147,"2040A7072060A808")
14 CALL CHAR(148,"4000A9094020AA0A")
15 CALL CHAR(149,"4040AB0B4060AC0C")
16 CALL CHAR(150,"6000AD0D6020AE0E")
17 CALL CHAR(151,"6040AF016060B002")
18 CALL CHAR(152,"8000B1038020B204")
19 CALL CHAR(153,"8040B3058060B406")
20 CALL CHAR(154,"A000B507A020B608")
21 CALL CHAR(155,"A040B709A060B80A")
22 CALL CHAR(156,"D0")
100 X=X+1
110 PRINT TAB(16);SQR(X)
120 GOTO 100
Edited by senior_falcon
  • Like 8
Link to comment
Share on other sites

It is a "normal" BASIC program so there should be no reason it should not be compatible with cassette, although I didn't try it. I should mention that if you want to run programs that used the false header method, then the first number in line 140 should be 224 for normal size sprites.

 

Also, it is not difficult to change setregs for much faster loading. Using XB:

 

Store the numbers in the DATA statements in a convenient location. Change the program to something like this:

10 CALL INIT

20 FOR I=10000 TO 10127::READ X::CALL LOAD(I,X)::NEXT I

100 THE DATA STATEMENTS...

 

NEW, then make this program:

10 OPEN #1:"BEGINNING and enough characters to make a 128 byte long string"

Using the debugger in Classic99 find the address of "BEGINNING..." It should be at -153 in decimal (FF67 in hex)

 

From the immediate mode:

FOR I=10000 TO 10127::CALL PEEK(I,X)::CALL LOAD(I-10153,X)::NEXT I

 

Now you can save the program and it will work just like the one with the data statements. Go back to TI BASIC to test it out.

  • Like 3
Link to comment
Share on other sites

Here is a different method for using sprites in TI BASIC that does not use the "false header" method. This works fine in emulation, both on Classic99 and Win994a. The programs below can be pasted into Classic99:

First is the program I call SETREGS in the video. You can change the first number in line 140 to use different magnifications. 224=magnify(1); 225=magnify(2) 226=magnify(3); 227=magnify(4). In the video I chose magnify(2). This program sets VDP register 5 so that characters 144-159 will define sprites. This should be compatible with Morphy and the other games that use the false header method. These methods only work because BASIC does not reset the registers because it thinks you are unable to change them.

 

 

The next program is called BXSPRITES in the video. Sprites are defined with CALL CHAR statements starting at 144. For example: 10 CALL CHAR(144,"0000A1010020A202") will create 2 sprites; the first at row 0 and column 0 using character A1 which is an "A" >41+>60(basic offset)=>A1 and color >01 which is black . The second sprite is at row 0 column 20 using a "B" and color is medium green. If you want to kill the sprites, CALL CHAR(144,"D0") will do the trick. Also, you should turn off the rest of the sprites using "D0" as in line 22 below.

Ok, i had finally a bit of time to do some trials on real machine.

Recorded it on cassette tape i can tell that your method is very nice too... i tried the Magnifications that in the Tesioware software can't work of course.

I'd really like to be able to understand better the use of the DATA values to arrive to this nice result but I think it is too much for me :P

I noted also that the instruction needed to cancel the sprite could be the same: CALL CHAR (144,"D") is working on both methods.

 

Unfortunately, however, I have to say that with your method the game MORPHY does not work, a message of MEMORY FULL after the RUN is showed on the screen, maybe it could be why your SETREG take up more memory than tesioware's method ?

 

The nice thing is that your SETREG is easily working also on all emulators also because it is not needed of a .wav file for them :P

Link to comment
Share on other sites

Yes, it works great with cassette.

 

Here's a video of it in action on my real 99/4A.

I like the video online but i suggest to add some description on this method that explain it is an improved method developed by Senior Falcon started from the Tesioware's one (Corrado and Riccardo Tesio from Italy).

My thought is that Credits are always important. People that "DO" have to be mentioned and grateful. also for preservation of memories in future.

  • Like 2
Link to comment
Share on other sites

I like the video online but i suggest to add some description on this method that explain it is an improved method developed by Senior Falcon started from the Tesioware's one (Corrado and Riccardo Tesio from Italy).

My thought is that Credits are always important. People that "DO" have to be mentioned and grateful. also for preservation of memories in future.

I really only posted it so that people could see how it worked with cassette on real hardware, given the context of this thread. I think it's pretty obvious in this context where and who it came from. I've decided to remove the video from youtube - I'm just not that invested in it to go to the trouble.

Link to comment
Share on other sites

Unfortunately, however, I have to say that with your method the game MORPHY does not work, a message of MEMORY FULL after the RUN is showed on the screen, maybe it could be why your SETREG take up more memory than tesioware's method ?

 

The nice thing is that your SETREG is easily working also on all emulators also because it is not needed of a .wav file for them :P

When you run what I posted the buffers are preserved for 3 disk files. This makes for compatibility with the disk drive but reduces the amount of memory available to a program. You can make a simple change to the program so the disk buffers are not reserved. Once you get the REGSET program loaded but before you run try this:

110 DATA 55,215,158,200...... Change the 55,215 to 63,255 and then SAVE CS1. I believe that will fix this issue.

  • Like 2
Link to comment
Share on other sites

I really only posted it so that people could see how it worked with cassette on real hardware, given the context of this thread. I think it's pretty obvious in this context where and who it came from. I've decided to remove the video from youtube - I'm just not that invested in it to go to the trouble.

I'm shocked to see how easy it is to offend a person with a simple suggestion. :(
It wasn't my intention... I was very happy that the video was online... I have a Youtube channel too and publishing videos from time to time and i know how much is appreciated read complete details in the description... I only asked if you could be able to add details in the description so that anyone who was a 99er enthusiast and watched the video already had all informations.
I did not seem to have been offensive or attacked someone.
Link to comment
Share on other sites

When you run what I posted the buffers are preserved for 3 disk files. This makes for compatibility with the disk drive but reduces the amount of memory available to a program. You can make a simple change to the program so the disk buffers are not reserved. Once you get the REGSET program loaded but before you run try this:

110 DATA 55,215,158,200...... Change the 55,215 to 63,255 and then SAVE CS1. I believe that will fix this issue.

 

Oh, nice and interesting info... i will try as soon as possible :) thanks.

  • Like 1
Link to comment
Share on other sites

It wasn't offensive. I just didn't feel like going to the effort to put in credits, and descriptions, and everything else, since 1) I don't understand the technique other than what is stated already in this thread (I certainly have no idea how or why it works), and 2) to have come across the video, you'd have had to have been in this thread and read the conversation which already contains all that information. At the same time, I didn't want to be accused of stealing someone's work and having to mess with all that drama, so the easiest thing to do was just remove the video.

Link to comment
Share on other sites

I just tested Morphy on Win994a and it works fine. Be sure to make these two changes to the SETREGS:

110 DATA 63,255,......rest of line....

140 DATA 224,....rest of line.....

Save to casette, then save Morphy after it.

I'm not sure what this would do to disk access after running, so it is probably best to quit and restart BASIC.

I have to say that this seems to be a very well done game. I will be testing it out if I ever get any time!

 

Now as far as giving credit is concerned, if I were to credit everyone who contributed to this, a partial list would be:

Tursi for the Classic99 emulator which lets me look inside the TI to see what is going on.

Corey Burr for the Win994a emulator which lets me test a bare TI with no memory and using a cassette player.

James Abatiello for the ideas that led to the playground loader.

Corrado and Riccardo Tesio for writing Morphy

TI99IUC for bringing it to my attention

ramidavis for bringing it to my attention a second time.

And probably others...

You can see that it is possible to get a little carried away with this.

So to Casey, put that video back up please! I take exactly zero offense if you omitted my name.

(Now if there are sales involved, that is another story!)

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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