Jump to content
tmop69

TI BASIC/TI EXTENDED BASIC Games that are worth to be compiled...

Recommended Posts

19 minutes ago, senior_falcon said:

Probably the sounds in the original BASIC version have a negative duration. If so just take out the minus sign.

Yes, I've forgot to convert a couple of CALL SOUNDS. That is fixed now.

Share this post


Link to post
Share on other sites
18 minutes ago, senior_falcon said:

List the BASIC program and give me an idea where the problem lies. I'll take a look.

Ok, I've found the issue. I added a CALL LINK("SYNC") without adding the :: to separate from the following instruction, that is a NEXT. No error messages from the compiler. 

 

So:

4020 FOR A=1 TO 13 :: CALL POSITION(#1,RO,CO) :: CALL LOCATE(#1,RO,CO-8) :: CALL PATTERN(#1,98+AN) :: AN=-(AN=0) ::CALL LINK("SYNC") NEXT A

instead of the correct:

4020 FOR A=1 TO 13 :: CALL POSITION(#1,RO,CO) :: CALL LOCATE(#1,RO,CO-8) :: CALL PATTERN(#1,98+AN) :: AN=-(AN=0) ::CALL LINK("SYNC"):: NEXT A 

 

Do you need the broken code to check or is supposed to be the right behaviour to not signal the syntax error?

 

Share this post


Link to post
Share on other sites
5 minutes ago, tmop69 said:

Ok, I've found the issue. I added a CALL LINK("SYNC") without adding the :: to separate from the following instruction, that is a NEXT. No error messages from the compiler. 

 

So:

4020 FOR A=1 TO 13 :: CALL POSITION(#1,RO,CO) :: CALL LOCATE(#1,RO,CO-8) :: CALL PATTERN(#1,98+AN) :: AN=-(AN=0) ::CALL LINK("SYNC") NEXT A

instead of the correct:

4020 FOR A=1 TO 13 :: CALL POSITION(#1,RO,CO) :: CALL LOCATE(#1,RO,CO-8) :: CALL PATTERN(#1,98+AN) :: AN=-(AN=0) ::CALL LINK("SYNC"):: NEXT A 

 

Do you need the broken code to check or is supposed to be the right behaviour to not signal the syntax error?

 

No error checking is done in the compiled code. This makes the compiled code faster. You should do your debugging in XB.

in your example: CALL LINK("SYNC")NEXT A should give the error message FOR-NEXT NESTING IN 4020

  • Like 1

Share this post


Link to post
Share on other sites
14 minutes ago, senior_falcon said:

No error checking is done in the compiled code. This makes the compiled code faster. You should do your debugging in XB.

in your example: CALL LINK("SYNC")NEXT A should give the error message FOR-NEXT NESTING IN 4020

ok, thanks.

 

I've found another issue with the "Walls and Bridges" program. It was modified with the VDPUTIL2 to be compatible with XB and it's running fine in XB. I've removed the VDPUTIL2 code (basically a SUB VDP routine with some CALL LOAD that do the magic and the initial line that is calling it), saved and compiled. The program hangs after the initial title screen with:

 

Illegal opcode (0331) at address >E41C, Bank >0100, DSR >FFFF
Illegal opcode (0012) at address >06A0, Bank >0100, DSR >FFFF

 

I've checked, but not found anything wrong with the code. In attachment the original file (before the removal of the VDPUTIL2 code) if you want to have a look at it.

 

 

WALLS.zip

Share this post


Link to post
Share on other sites
5 hours ago, Tursi said:

Thanks... I played all the way through this time. I noticed that the death sound and game over sounds are missing their delays and end up basically being a "boop" instead of a falling sound. And the win routine is full of similar tight loops, but it crashes after the very first one. (The character is supposed to run down the ladder, run left to the baddie, punch him, advance to the control board (it's a control board), be confused, punch that, and run back right and up the ladder to the girl). All those steps would also have delay loops. Can't say why it crashes.

 

It's still a good effort, I wouldn't be too worried. 

 

(Simple cheat code - just turn all the enemy sprites transparent. Will still die if you fall or walk off the screen. In the Classic99 debugger, enter "v62e=0000000000000000000000000000000000000000000000000000" (52 zeros)). Makes it easier to get through it all.)

Now it should be all ok (I hope). Tested with the cheat code. 🙂 

 

[GAME] Hero V1.2 (1988)(Mike Brent aka Tursi)[Compiled by TMOP].zip

  • Like 2

Share this post


Link to post
Share on other sites
6 hours ago, tmop69 said:

ok, thanks.

 

I've found another issue with the "Walls and Bridges" program. It was modified with the VDPUTIL2 to be compatible with XB and it's running fine in XB. I've removed the VDPUTIL2 code (basically a SUB VDP routine with some CALL LOAD that do the magic and the initial line that is calling it), saved and compiled. The program hangs after the initial title screen with:

.....

I've checked, but not found anything wrong with the code. In attachment the original file (before the removal of the VDPUTIL2 code) if you want to have a look at it.

 

 

WALLS.zip 7.03 kB · 2 downloads

Once you can take out the VDPUTIL2 code, you can test this in XB by using RXB or XB 2.8 G.E.M. Either one can run TI BASIC programs that use character sets 15 and 16.

You have one error in the code. It is a subtle one which doesn't keep the program from running in XB, but crashes it when compiled.

5040 GOTO 5080

.....

5080 DATA 83,67,79,82,69

 

Compiled code cannot GOTO a DATA statement. Change that line to:

5040 GOTO 5090

 

There is another problem which is a timing issue. In setting up the program it asks for several things and reads the keyboard with CALL KEY.

2810 CALL KEY(3,X,S)
2820 IF S=0 THEN 2810

It is not enough to check that a key is pressed. The compiled code inputs keystrokes too fast. You need to check for a new key. IF S<1 THEN 2810 will do the trick.

There are several other places where you need to do this.

 

  • Like 2

Share this post


Link to post
Share on other sites

B-1 Bomber is one game I've always liked that I thought would be cool compiled and turned into a cartridge BIN, but with its current display output, it would be uninspiring to most people.  I've always had plans to update it, be never seemed to find the time, and or course it would look much better in 80 column format, but T80XB does not yet compile.  Maybe in another 10 years when I retire I'll have the time, and the software to do everything I want will be at hand.  We'll see.

Share this post


Link to post
Share on other sites
8 hours ago, senior_falcon said:

Once you can take out the VDPUTIL2 code, you can test this in XB by using RXB or XB 2.8 G.E.M. Either one can run TI BASIC programs that use character sets 15 and 16.

You have one error in the code. It is a subtle one which doesn't keep the program from running in XB, but crashes it when compiled.

5040 GOTO 5080

.....

5080 DATA 83,67,79,82,69

 

Compiled code cannot GOTO a DATA statement. Change that line to:

5040 GOTO 5090

 

There is another problem which is a timing issue. In setting up the program it asks for several things and reads the keyboard with CALL KEY.

2810 CALL KEY(3,X,S)
2820 IF S=0 THEN 2810

It is not enough to check that a key is pressed. The compiled code inputs keystrokes too fast. You need to check for a new key. IF S<1 THEN 2810 will do the trick.

There are several other places where you need to do this.

 

Many thanks! I'll try again fixing this. Maybe the GOTO to a DATA statement is the same problem that crashed a couple of other games. I'll check an let you know.

 

 

Share this post


Link to post
Share on other sites
15 hours ago, tmop69 said:

Now it should be all ok (I hope). Tested with the cheat code. 🙂 

Haha, looks like it! Thanks ;)

  • Like 1

Share this post


Link to post
Share on other sites

Sorry for the delay- slowly rebuilding the PC and there are gaps when I try to resolve something.

Here is a reworked Zarquon for pure TIB and a reworked ZARQUON/I instruction file.  Quite a hard one- and it is sensitive to the alpha lock key.  It probably needs quite a bit of timing adjustments in places.

  I also added Tickworld to the disk as that is a game I used to play that could do with a bit more speed.

Interesting the compiling is more sensitive to untidy programming than pure basic - it has always been a complaint of basic that it encouraged poor programming habits!  Many TI games suffered from ad hoc code removal to make them fit and code remnants and orphan lines were often left in place.

zarquon.dsk

Edited by blackbox
  • Like 1

Share this post


Link to post
Share on other sites

For what it's worth, you have the ability to use the original runtime routines if you are compiling a TI BASIC program. From page 17 of the manual:

 

USING RUNTIME ROUTINES FROM THE ORIGINAL COMPILER

If your program is written in TI BASIC you can now use the runtime routines that were part of the original TI BASIC compiler. The advantage is that the program created is considerably smaller, plus it may run a bit faster due to less overhead in the interrupt routine. The big disadvantage is that it only supports TI BASIC instructions (with a few additions from XB), and there have been no improvements for many years.

Most users will not want to use this, so it is turned off by default. To enable this option type:
     OLD DSK1.COMPILER
     uncomment line 230
     SAVE DSK1.COMPILER
Now when the compiler runs you can press “Y” when prompted “Use TI BASIC runtime?” Default for this prompt is always “N”.

The procedure for compiling a program is identical to the current version described above and in Using XBGDP. The limitations of this earlier compiler are described below, taken verbatim from the original manual. Do not put the runtime routines in low memory!

  • Like 4

Share this post


Link to post
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.

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