Jump to content
oddemann

HELP - I AM STUCK! - TI EXtended BASIC

Recommended Posts

4 hours ago, GDMike said:

Not an xb issue, but programming in general.

 I just spent 3 hours trying to figure out why my simple routine  in assembly was putting data from the previous Register line into my current register and I found out I had Rem'd out my new register on accident with * LI R1,LIB4 and this created a headache because I didn't notice it and the previous line said, LI R1,LIB3

So I kept getting my old data showing up..

Stupid eyeballs!!!

Sometimes one can't see the forest for the trees - or can't see the tree for the forest.

The problem you're describing is relatively simple. It's not a logical problem on a scale, where you have to setup different circumstances to analyze. From my viewpoint, all you had to do was, slowly single-step through the code in a debugger (I use Classic99) - and to your surprise you'll see that the LI R1,LIB4 doesn't execute, but rather the next instruction in your program executes. That should quickly lead to the Aha! moment. Of course set a breakpoint just before the mysterious code.

The disadvantage compared with modern programming is, that you have to have the source code side-by-side (with the debugger). Nobody said it was going to be easy.

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, GDMike said:

Yes, but I can't stand using the PC or laptop. 

So I suffer

Ok, have it your way. There's debuggers for the TI (as I understand Millers Graphics has one) - never used them so I can't help you.

 

  • Thanks 1

Share this post


Link to post
Share on other sites
34 minutes ago, GDMike said:

Yes, but I can't stand using the PC or laptop. 

So I suffer

 

Trying to find and solve a bug in assembly language is a mission impossible without a proper debugger I would say.

If you insist on debugging on the TI-99/4a itself, then the best debugger to use is Miller Graphics Explorer. 

It’s basically an TI-99/4a emulator running on the TI-99/4a itself. It allows you to single-step trough your assembly code and watch registers and memory, including VDP registers & memory as it happens. Very cool!

 

Look for it in the development forum here, there is even an updated version of last year.

  • Like 1

Share this post


Link to post
Share on other sites

Here’s the thread. There is a cartridge image and an updated version for loading from disk (check all posts in thread):

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Well, a timely thread, as stuck I am, at the moment. 

 

What I'm interested in doing, is using the routines from the Text-to-Speech disk (SPEAK and XLAT, but really just SPEAK for present purposes) under XB256. 

 

Now, they work fine via standard XB, via the straightforward setup:

CALL INIT :: CALL LOAD("DSKl.SETUP","DSKl.XLAT","DSKl.SPEAK")

And if going in to standard XB via the XB256 menu, that'll still work as long as I don't CALL INIT.

 

But in XB256, I get "* MEMORY FULL" when attempting to load any of these (on all of MAME, Classic99 and real iron). 

 

Is it possible, do you think, for these two packages to be made to coexist? 

 

Or is this truly just a case of two sets of libraries that want too much low memory to themselves. 

Share this post


Link to post
Share on other sites

While I don't think I can answer your question, I did a lot of work (that I need to go finish) with reversing the XB text to speech code. It pretty much fills the low 8K RAM, and I believe that XB256 /also/ loads assembly there. (It actually loads 4496 bytes into low memory -- then loads another 12k into high memory for the database).

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
9 hours ago, retroclouds said:

Here’s the thread. There is a cartridge image and an updated version for loading from disk (check all posts in thread):

 

 

If you want to use the MG Explorer on old iron to help troubleshoot XB code let me know.  I will post a version that loads into the lower part of upper memory specifically for use with XB.  Also, I would selfishly recommend the Paisley version of the MG Explorer.  It is a slightly smaller code version that fits into two ROM banks with a loader; adds help screens and a few other additions for GRAM devices and memory mapped devices.  One way you can use it is to load it into memory then set a breakpoint in your code to branch to >A000 or, launch it and then point to your code in memory to start step-by-step execution.

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)
6 hours ago, Tursi said:

While I don't think I can answer your question, I did a lot of work (that I need to go finish) with reversing the XB text to speech code. It pretty much fills the low 8K RAM, and I believe that XB256 /also/ loads assembly there. (It actually loads 4496 bytes into low memory -- then loads another 12k into high memory for the database).

 

Thanks.  Alas, that probably addresses that then.  If the text-to-speech disk pretty much fills the low 8K.  Too bad.  If it were possible, they'd be a killer solution for timed and tone and slope adjusted speech with music (i.e., the TI-99 "singing" in time and in tune) since XB256 provides a solution for loop timing and creation and use of of compressed/assembled sound lists independent/simultaneous with execution of XB code, and the text-to-speech disk provides a solution for playing allophone speech from XB. 

 

So at present, I can get speech from within an XB program that is simultaneously playing music (using XB256), and which even handles timing of loops involving speech events

 

And I can get tone and slope adjusted speech from within XB (using the Text-to-Speech disk). 

 

But the dream would be to do both those things at once. 

 

Perhaps my quest continues.  To make my TI-99/4A (LPC) sing to its own (PSG) music from within XB. 

 

But that would have been a sweet combo to make it happen. 

Edited by pixelpedant

Share this post


Link to post
Share on other sites
Posted (edited)

Well, considering this problem at length, I concluded that while I had not initially found myself solution there, Harry Wilhelm was still probably the solution to all the problems in the XB universe (or at least those not addressed by RXB). 

 

So I dug through the TML 2.0 documentation and used HMLOADER, provided and documented there, to embed and run the text-to-speech routines from high memory, with XB256 loaded in low memory. 

 

This worked, and constitutes a solution, it would seem, to the desire to use the text-to-speech routines (well, I don't actually care about text-to-speech per se - really just allophone to LPC translation) in XB256, with its timing and sound features.

 

Edited by pixelpedant
  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

Using explorer in assembly to troubleshoot is definitely a good thing, as if I really had trouble I'd go to it. But this year building my program, I've usually worked out my issues, and I'll tell ya, 99.5 percent have always been, for me, my own stupid fault, misspelled words, using CI instead of C, marking * in the beginning of my useful code instead of just below it or above my code. Just stupid stuff. Its not happening a lot, but I have found this as my #1 issue.

 

Edited by GDMike

Share this post


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

Using explorer in assembly to troubleshoot is definitely a good thing, as if I really had trouble I'd go to it. But this year building my program, I've usually worked out my issues, and I'll tell ya, 99.5 percent have always been, for me, my own stupid fault, misspelled words, using CI instead of C, marking * in the beginning of my useful code instead of just below it or above my code. Just stupid stuff. Its not happening a lot, but I have found this as my #1 issue.

You learn from your mistakes. But using 3 hours to find you Rem'd the line ... :skull:

 

  • Like 1

Share this post


Link to post
Share on other sites

Two days... Two days! Yikes!

 

I implemented a Bresenham algorithm as part of a (starting) library of bitmap subroutines in Assembler. That d**n thing drove me crazy. Either it drew 2 pixels and stopped or drew one pixel to the left where it should head right and all other sorts of effect, including overwriting part of the color table.

 

It was a relatively simple C program (Wikipedia, last example) to be converted, really. And I read it row by row comparing with my Assembler translation, over and over. I didn't see any error. Then suddenly yesterday evening...

 

JLE is not "jump less / equal"!!! And... Exactly this is stated in the E/A manual, too, as an extra hint! *facepalm*

 

Using JLT and JEQ in 2 consecutive lines did the job.

 

Michael

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Yes because I kept ignoring to read anything with * and my label that was Rem'd out looked like this

*LIB3

Lib3 MOV ...

*LIB4 MOV

           LI R0,960

And because this was a BL routine that was being called by another routine in another file, I kept thinking the data in the calling routine was correct and so I kept troubleshooting the calling program down deeper because I couldn't see the actual data.

Now with that said, I'm also on real HW and if I were in classic99 with a debugger open I could have seen the data. But this program hasn't needed extensive debugging of code because it's so straightforward and not really complicated, but not knowing what the data was forced me to create a simple routine in my calling program that shows the data from the sub IF I unrem those* to allow it to run when needed. 

Oh, I'll know if it's unrem'd btw.

But yes, I gotta hold on it again..

I learned a lesson

 

 

 

  • Like 2

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