Jump to content
IGNORED

What's next for Batari BASIC?


Jess Ragan

Recommended Posts

or can anyone point me to some documentation and/or examples for using the Atarivox with the 2600?

The AtariVox driver pack should tell you everything you need to know.

989789[/snapback]

 

Thank you! I don't know if I'll be able to do anything with it anytime soon-- which would be kind of tough to do, anyway, since I don't have an Atarivox, my 2600 was stolen many years ago, and my 7800 hasn't been able to turn on in years. I'm thinking of buying another 2600 (but I don't have a Cuttle Cart or Krokodile Kart), and/or buying a replacement power supply for the 7800 (which I do have a Cuttle Cart 2 for), so maybe one day soon I'll be able to buy an Atarivox and use it.

 

Anyway, as I tried to say in another thread, some of the things that people are asking batari to add into bB can already be done in bB, by using inline assembly code or by writing custom "include" files. I mean, if it can be done in assembly, then it can be done in bB. So it would be a big help to batari if we would either learn how to do certain things ourselves with inline assembly or custom "include" files (which I realize is hard for some people, because assembly coding can be a bit mindblowing or intimidating to people who are used to BASIC), or if some of us could create custom "include" files that could be posted in this forum for everyone to use. That wouldn't be quite the same as having a simple bB command-- e.g., we'd have to say "gosub avox" or something like that-- but if someone could make an "include" file with the necessary routines, then it would be a lot easier for batari to add a new command into the bB compiler that calls those routines and passes them the necessary information, or however it works (I haven't read up on it yet). So, if someone who knows how could write an "include" for the Atarivox in a hurry, test it, make sure it works, and then send it to batari with explicit instructions and examples on how the routines are to be called, then he might be able to add it into bB for this next release-- or if not that soon, then maybe the one after that. After all (and I'm not trying to be pessimistic, just realistic), major update releases can tend to be a bit buggy, so version 1.1 may be coming out very soon after 1.0 as any bugs get fixed.

 

I'm not trying to pressure batari or anyone into adding Atarivox support to bB, as I currently have no way to benefit from such support right now, anyway. I'm just trying to suggest a possible way that Atarivox support might be able to get added to bB more quickly, for those who would like to use the Atarivox in bB games. It sounds pretty cool (no pun intended), and someday I'd like to own one, be able to use it on a working 2600 or 7800, and program for it in any games that I write.

 

Michael Rideout

Link to comment
Share on other sites

The AtariVox driver pack should tell you everything you need to know.

989789[/snapback]

 

But with one caveat: a branch that crosses a page boundary can cause the speech to become all garbled.

989825[/snapback]

 

Thanks, supercat, I'll make a note of that; these sorts of things are good to know.

 

Michael Rideout

Link to comment
Share on other sites

I didn't actually use the driver pack, since I had already written a serial driver for the 2600 for the cart dumper utility.  Though if I support the serial EEPROM, I will need it.

 

The code that says "batari basic" was written totally in bB and could easily be adapted to say other things.  The final version will probably be a little easier than this (maybe something that will translate the escape codes for you, and maybe talk automatically without needing to set up data tables and send them one char at a time.)

 

I did not, and probably won't need to spend much time on this, so people needn't worry that I will leave out "more important" features in favor of this.  As you can see, there's really nothing to it.

But with one caveat: a branch that crosses a page boundary can cause the speech to become all garbled.

That's a good point - I'll need to be careful where I locate the driver code.

 

Anyway, here's the avox.bas source code:

989903[/snapback]

 

Wow, I didn't realize you'd already written a routine yourself! So it shouldn't be difficult to put it into an "include" file.

 

However, I do have a question about one thing...

 

 dim atarivox=a
 SWACNT=1
 data speak
 0, 170, 138, 192, 152, 128, 5, 170, 154, 187, 129, 7, 22, 4, 197, 255
end
talkloop
 if speak[b]=255 then b=0
 if joy0fire then b=1
 if b<>0 then atarivox=speak[b]:b=b+1:gosub talk

 

In the above snippet of code, you don't initialize b before you drop into the loop. I know that bB initializes page zero anyway, but it made me do a doubletake, and after looking at the code I'm wondering if it might be better to swap the first two lines of talkloop around:

 

 if joy0fire then b=1
 if speak[b]=255 then b=0
 if b<>0 then atarivox=speak[b]:b=b+1:gosub talk

 

For example, I think that might work better in the following situation:

 

 data speak
 0, 255
end

 

Are there any situations in which swapping those two lines as shown above would cause a problem?

 

Michael Rideout

Link to comment
Share on other sites

Are there any situations in which swapping those two lines as shown above would cause a problem?

990035[/snapback]

Yes, because it would never send 255. This tells the Avox to speak the phrase you just sent, but conveniently can serve as an end-of-phrase marker.

 

Although I am certain the code can be improved. It was written quickly as a proof of concept. But if I get a chance, the actual driver will bear little resemblance to this code. I hope to put the Avox driver into the VBLANK area and it will send the phrase automatically over the course of several frames. All you have to to is include the Atarivox library, specify two consecutive variables for the driver to use, then tell it what to say (which will be a special command.)

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