Jump to content

Photo

fbForth—TI Forth with File-based Block I/O [Post #1 UPDATED: 11/10/2017]

fbForth Forth TI Forth

1447 replies to this topic

#1426 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Tue Dec 5, 2017 10:20 AM

Looks like it's just you and me for awhile, Bob!

 

I think I have all known bugs fixed and all changes working, but I should probably post a beta version for the usual suspects to test.  I said, “all bugs fixed”, but I have yet to check that all of my additions of “B  @BKLINK” are not buggy.  When I am done with that and after a stint on the beach,  :P I can post a beta version here, if anyone is interested in testing.  :waving:

 

To review, I have

  • Fixed all (most?) bugs caused by my adding “B  @BKLINK” calls;
  • Added BYE as a synonym for MON (exit to the Monitor, AKA system reset);
  • Set up PLAY to mute all four sound generators for option 1 before playing the requested sound table (This was a problem when a second sound table was invoked with option 1, if the interrupted (read, “cancelled”) table used a sound channel not used by the interrupting sound table.);
  • If either sound table #1 or #2 is playing, set up option 0 of PLAY to push the new sound table’s address to a sound stack that grows up towards the return stack in low RAM (This will play any and all sound lists invoked with option 0 in the order added (FIFO stack) and does not pause other Forth code, which could happen in a loop with a PLAYING? test.);
  • Changed the ?TERMINAL system routine to call the relevant console routine to check for FCTN+4 and for debouncing if FCTN+4 is detected;
  • Modified FBLOCKS a little.  :grin:

Whew!  :-o  I think that is everything...

 

...lee



#1427 atrax27407 ONLINE  

atrax27407

    Dragonstomper

  • 802 posts

Posted Tue Dec 5, 2017 11:59 AM

I'm waiting for the upload. Hopefully, you didn't change the entry point.



#1428 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Tue Dec 5, 2017 12:53 PM

I'm waiting for the upload. Hopefully, you didn't change the entry point.

 

Nope.  Entry point is the same.  You just won't be able to run old BSAVEd images.  They will need to be BESAVEd from the new build.  I will post a beta sometime later today.   Right now I'm on the beach! 

 

...lee



#1429 RickyDean OFFLINE  

RickyDean

    Dragonstomper

  • 695 posts

Posted Tue Dec 5, 2017 2:29 PM

 

Nope.  Entry point is the same.  You just won't be able to run old BSAVEd images.  They will need to be BESAVEd from the new build.  I will post a beta sometime later today.   Right now I'm on the beach! 

 

...lee

Go Forth and be a beach bum ;)



#1430 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Tue Dec 5, 2017 7:15 PM

Here is the fbForth 2.0:11 beta for testing:

Attached File  fbForth2.0_11_beta.zip   85.42KB   6 downloads

 

It only contains the following files (all binaries are in inverted format):

  • fbForth200_9.bin  (32 KiB binary image for Classic99 or burning to EPROM)
  • fbForth200.rpk    (32 KiB binary image for MAME)
  • fbForth2001.bin   (Bank 0--8 KiB binary image)
  • fbForth2002.bin   (Bank 1--8 KiB binary image)
  • fbForth2003.bin   (Bank 2--8 KiB binary image)
  • fbForth2004.bin   (Bank 3--8 KiB binary image)
  • FBLOCKS           (System Blocks file)
  • TESTBLKS          (Blocks file with sound tables for testing)

You can use TEXTBLKS for testing PLAY .  The sounds ( CHIME CRASH INFLIGHTSND GROUNDBURSTSND AIRBURSTSND ) can be loaded as follows:

 

USEBFL DSK1.TESTBLKS

2 LOAD

 

Review PLAY in the Glossary (Appendix D) and Chapter 17 in fbForth 2.0 A File-Based Cartridge Implementation of TI Forth for its usage.

 

Please, let me know if you encounter any problems or if you need assistance setting up testing or understanding something.  Barring any trouble, I will post it officially in a few days.

 

...lee



#1431 atrax27407 ONLINE  

atrax27407

    Dragonstomper

  • 802 posts

Posted Tue Dec 5, 2017 10:23 PM

Downloaded, installed, minor editing for my personal tastes and it appears to be working as it should!!!



#1432 atrax27407 ONLINE  

atrax27407

    Dragonstomper

  • 802 posts

Posted Wed Dec 6, 2017 7:08 AM

I right-justified the info in Block 1 and added "First available Page:". I stuck in an extra CR or two. I used my 2-column MENU and it appears to be complete and working fine.



#1433 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Wed Dec 6, 2017 10:17 AM

I right-justified the info in Block 1 and added "First available Page:". I stuck in an extra CR or two. I used my 2-column MENU and it appears to be complete and working fine.

 

Cool beans!

 

For those who might be interested, here is the unmodified start-up for fbForth 2.0:11 with FBLOCKS dated 05DEC2017:

 

Attached File  fbForth_startup20171205.gif   476.41KB   0 downloads

 

...lee



#1434 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Wed Dec 6, 2017 12:39 PM

OK...Now for the game that started me down the path to fbForth 2.0:11 (see post #1421):  I now have a working port of J. Volk's conversion from XB to TI Forth of BattleStar.  I fixed some bugs and replaced the honk with an explosion sound when the BattleStar blows up.  It could use some other sound effects for shooting and hitting ships, but I have not been able to find any suitable sound tables and it is a little daunting to compose my own.  It could stand some other improvements as well.  I have not looked very diligently for the original XB game for comparison, but anyway, here is the code if you want to have a go at it:

 

Spoiler

 

...lee

 

[EDIT:  See post #1438 for BattleStar with Parsec sounds.]



#1435 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Wed Dec 6, 2017 4:54 PM

One interesting statistic comparing builds 10 and 11 is that available low RAM is exactly the same—this with gaining 28 bytes from changing the system code for ?TERMINAL as mentioned in the post at the top of this page and elsewhere.  Obviously, my changes to the fbForth ISR to service a sound table stack required exactly 28 bytes!

 

...lee



#1436 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 403 posts
  • Location:The Great White North

Posted Wed Dec 6, 2017 6:00 PM

I knew you would do something good with those extra bytes!

#1437 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 403 posts
  • Location:The Great White North

Posted Wed Dec 6, 2017 7:47 PM

OK...Now for the game that started me down the path to fbForth 2.0:11 (see post #1421):  I now have a working port of J. Volk's conversion from XB to TI Forth of BattleStar.  I fixed some bugs and replaced the honk with an explosion sound when the BattleStar blows up.  It could use some other sound effects for shooting and hitting ships, but I have not been able to find any suitable sound tables and it is a little daunting to compose my own.  It could stand some other improvements as well.  I have not looked very diligently for the original XB game for comparison, but anyway, here is the code if you want to have a go at it:

 

Spoiler

 

...lee

This is fun.  I have been playing with sound lists and the 9919.  Maybe I can come up with a sound or 2 for you.



#1438 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Wed Dec 6, 2017 8:25 PM

This is fun.  I have been playing with sound lists and the 9919.  Maybe I can come up with a sound or 2 for you.

 

Actually, you did!  I was reviisiting your sound list player thread and picked up the Parsec sounds from you.  Here it is with those incorporated:

 

Spoiler

 

I also changed EXPLODE to the Parsec EXPLODE .

 

...lee



#1439 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 403 posts
  • Location:The Great White North

Posted Wed Dec 6, 2017 10:11 PM

Hi Lee,

 

Here is a shooter sound and an explosion.

They are in my (new) format but not to hard for you to change them to FB Forth

The explosion is a variation on the Parsec explosion but is slips through three

"bandwidths" of white noise starting with the highest frequency one and going down.

Parsec stays on the same one and just ramps the decay down.

 

I used my SOUND words to make sound and also print out the hex code at the same time as you can see in the jpeg.

Makes an pretty nice tool for exploring.

HEX
CREATE LASER \ 420 hz
       BYTE 4 9F BF DF FF 0
       BYTE 8 8A 10 C2 1 DF 92 E3 F0 5
       BYTE 4 8F 10 92 F1 10
       BYTE 2 94 F2 20
       BYTE 2 96 F3 20
       BYTE 4 8E 11 97 F4 15
       BYTE 2 9A F9 35
       BYTE 2 9F FF 1

/END


CREATE EXPLODE
       BYTE 7 9F BF DF E5 F0 C0 07 5
       BYTE 1 F1 6
       BYTE 1 F2 7
       BYTE 1 F3 8
       BYTE 1 F4 9
       BYTE 2 E6 F5 10
       BYTE 1 F6 11
       BYTE 1 F7 12
       BYTE 1 F8 13
       BYTE 2 E7 F9 14
       BYTE 1 FA 15
       BYTE 1 FB 16
       BYTE 1 FC 17
       BYTE 1 FD 18
       BYTE 1 FE 30
       BYTE 1 FF 0
/END

Attached Files



#1440 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 403 posts
  • Location:The Great White North

Posted Wed Dec 6, 2017 10:16 PM

 

Actually, you did!  I was reviisiting your sound list player thread and picked up the Parsec sounds from you.  Here it is with those incorporated:

 

Spoiler

 

I also changed EXPLODE to the Parsec EXPLODE .

 

...lee

That's pretty cool.

 

When you get some time try the other sounds just to say we didn't completely plagiarize. :)

 

So the big question is ... Which source code is easier to understand. BASIC or Forth?

 

B



#1441 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Sat Dec 9, 2017 6:55 PM

OK...So far no one has found any bugs in the fbForth 2.0:11 beta.  Actually, I am not sure anyone but Yours Truly has been doing any testing—I really would like some testing by others—but I know we Forthers are few.  You know that it is hardest to find the mistakes you know you did not make—so, let us test!

 

In the interim, I have decided to

  • Add CMOVE> and ABORT"
  • Not save memory by having MOVE jump into CMOVE
  • Not make MOVE and CMOVE overlap safe

This brings the available ROM space to

      Bytes
Bank  Left
----  -----
 0      34
 1     170
 2     156
 3      50 

Here is another beta with the above additions:

 

Attached File  fbForth2.0_11_beta2.zip   85.56KB   4 downloads

 

Have at it!

 

...lee



#1442 atrax27407 ONLINE  

atrax27407

    Dragonstomper

  • 802 posts

Posted Sun Dec 10, 2017 6:50 AM

Downloaded, installed, and appears to be working normally without problems.



#1443 AMenard OFFLINE  

AMenard

    Chopper Commander

  • 209 posts
  • Location:Beauharnois, Qc, Canada

Posted Sun Dec 10, 2017 7:34 AM

Give me the chance to finish my TI setup and learn Forth first... :-)

Edited by AMenard, Sun Dec 10, 2017 7:34 AM.


#1444 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Sun Dec 10, 2017 12:04 PM


HEX
CREATE LASER \ 420 hz
       BYTE 4 9F BF DF FF 0
       BYTE 8 8A 10 C2 1 DF 92 E3 F0 5
       BYTE 4 8F 10 92 F1 10
       BYTE 2 94 F2 20
       BYTE 2 96 F3 20
       BYTE 4 8E 11 97 F4 15
       BYTE 2 9A F9 35
       BYTE 2 9F FF 1

/END

 

LASER does not play as written because there is a 0 duration byte for the first sound list, which turns off sound not only initially but also for the rest of that sound table for the fbForth 2.0 ISR.  I think the console ISR handles sound tables that way as well.  Turning off all sound generators at the beginning is not a bad practice, but it needs to have a duration byte of at least 1 for playing to continue through the remainder of the sound table.

 

By the way, the fbForth 2.0 ISR turns off all sound generators before it starts processing a sound table.  Maybe that is too presumptive on my part, but I digress.

 

Now, if I change that first duration byte to 1, the ISR plays the sound table, but it does not stop there because there is a duration byte of 1 at the end.  The upshot is that the ISR continues playing whatever it finds in memory until there is either a duration byte of 0 or a load-number-of-bytes byte of 0.  This process is unlikely to turn off all sound channels.

 

The solution to the runaway sound table is either to change that last duration byte to 0 or add a zero byte after it to indicate no bytes to load, which also stops sound table processing.

 

Presuming that the sound table is correct otherwise, the laser sound seems too slow to me.  Perhaps it is, in fact, mistyped.  What up?  :ponder:

 

...lee



#1445 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 403 posts
  • Location:The Great White North

Posted Sun Dec 10, 2017 6:10 PM

Well I am using my own player so it interprets this differently.

I will fix it with your game so we are on the same page.

 

Standby...



#1446 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Sun Dec 10, 2017 6:24 PM

Well I am using my own player so it interprets this differently.

I will fix it with your game so we are on the same page.

 

Standby...

 

Oops!  The problem at the end of the sound table is my problem!  You put a zero word at the end of each table with /END , which I had intended to include, but obviously forgot.  The 0 duration byte , though, is till a problem for me when it is not the last one in the sound table.

 

...lee



#1447 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • Topic Starter
  • 3,436 posts
  • Location:Silver Run, Maryland

Posted Sun Dec 10, 2017 6:51 PM

OK....Here is Battlestar in a BLOCKS file in FIAD mode as well as on a 90-KiB disk image:

 

Attached File  BATTLESTAR.zip   5.42KB   3 downloads

 

...lee



#1448 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 403 posts
  • Location:The Great White North

Posted Sun Dec 10, 2017 7:03 PM

So... I had been playing with a playback speed variable and changed it without knowing it  so that is why the durations are all wrong.

This is the sound I was playing with.  Sounds kind of wimpy to me now. :-)

 

Gotta leave for a while.  Star trek is on :-)

: FIRESND   ( from Parsec )
   DATA[
        088A 10C2 01DF 92E3 F007
        048F 1092 F102
        0294 F203
        0296 F303
        048E 1197 F403
        029A F503
        038F 9FFF 0100
   ]DATA  DROP  ;







Also tagged with one or more of these keywords: fbForth, Forth, TI Forth

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users