Jump to content
IGNORED

This Newbie is *finally* starting to understand a bit about the 99!


smp

Recommended Posts

Good morning all.  Many, many thanks for all the knowledge and experiences that you all have posted here.

 

While I was heavily involved in the so-called personal computer revolution, so long ago, and I remain an avid user of several vintage systems, only recently did I acquire my first TI-99/4A.

 

My only other system that uses cartridges is my beloved Tandy Color Computer.  Between this and all the other disk-oriented systems I have and have been playing with for years, I was in for quite the surprise when I finally gave in to my curiosity about the 99.  Wow!

 

I have now acquired a TIPI-32K Combo, and I have that running.  This morning, I placed an order for a BackBit, and hopefully that will solve my need for storing G/ROMs.

 

So, I could say that I am "getting into it."  BUT...  I started by being frustrated by the lack of OS tools like there are available in all my other systems.  I continue to be amazed (and not always in a good way) about the internal architecture of the 99.  For a machine that I spent $50 to acquire, I've now spent several times that in all the modern accessories, books and manuals that I also "needed."  Note, that "need" *always* grips me with any new system, so I guess that is always part of the fun.

 

Now that I may be hitting a plateau and shortly will be able to really get going with this system, it *finally* dawned on me this morning that this system is not like any other vintage system that I have.  I finally am coming to understand that in this cartridge-oriented system, the cartridges own the storage, not so much the user.  It is like my iPad, where the apps deal with their storage behind the scene and I don't have to worry so much about it.  WHEW!

 

Yes, since we are now in modern times, and acquiring modern accessories for the 99, I am being exposed to more of the "guts" that users were back 40 years ago.  That, along with all my experiences with a variety of other vintage systems, is probably the root of my confusion and frustration.  Getting into position to start using this system as it was originally intended  will start to show how I don't need to be worrying about storage so much like in other systems.

 

Anyway, here I am and this can be used as my introduction here.  Hopefully I will be getting much more comfortable with using this interesting system as time goes on.

 

Thanks for listening, and many thanks for offering all your expertise and experience here!

 

smp

  • Like 2
Link to comment
Share on other sites

You might already have this but here is a little DIR program that let's you see what's on your disk.

I spent quite a while using BASIC before I learned you could do this! 🙂

 

100 CALL CLEAR
110 DIM TYPE$(5)
120 TYPE$(1)="DIS/FIX"
130 TYPE$(2)="DIS/VAR"
140 TYPE$(3)="INT/FIX"
150 TYPE$(4)="INT/VAR"
160 TYPE$(5)="PROGRAM"
170 DISPLAY "DIRECTORY DISPLAY": : :
180 INPUT "MASTER DISK[1-3]?":M
190 M=INT(M)
200 IF M<1 THEN 180
210 IF M>3 THEN 180
220 OPEN #1:"DSK"&STR$(M)&".",INPUT ,RELATIVE,INTERNAL
230 INPUT #1:A$,A,J,K
240 DISPLAY "DSK";STR$(M);"-DISKNAME=";A$:"AVAILABLE=";K;"USED=";J-K: :
250 DISPLAY " FILENAME  SIZE    TYPE    P"
260 DISPLAY "---------- ---- ---------- -"
270 FOR LOOP=1 TO 127
280 INPUT #1:A$,A,J,K
290 IF LEN(A$)=0 THEN 370
300 DISPLAY :A$;TAB(12);J;TAB(17);TYPE$(ABS(A));
310 IF ABS(A)=5 THEN 340
320 B$=" "&STR$(K)
330 DISPLAY SEG$(B$,LEN(B$)-2,3);
340 IF A>0 THEN 360
350 DISPLAY TAB(28);"Y";
360 NEXT LOOP
370 CLOSE #1
380 END

 

Edited by TheBF
typo
  • Like 3
Link to comment
Share on other sites

Thanks very much, BF!

Yes, I've been scouring this forums here and I did pick up that code - it helps to see what BASIC programs are on my BASIC disk so I can OLD the correct name.

Better than that, though, is the WiFi interface I have to my TIPI.  Now I can manage my DSKs from there.

 

smp

  • Like 1
Link to comment
Share on other sites

Yes Camel99 Forth is my personal hobby/obsession these days.

40 years ago when I bought a copy of TI-Forth I wanted to learn more about how  Forth was created and operated "behind the curtain".

Finally got around to it with a home-brew cross-compiler that generates the Camel99 Forth 8K kernel.

After that you can build whatever you need or load library files.

 

Lee took a different approach and reviewed/fixed/rewrote/improved TI Forth including making a cartridge and thoroughly documenting the system.

It is professional work. You won't be disappointed. It is what TI-Forth should have become. 

 

 

  • Like 6
Link to comment
Share on other sites

28 minutes ago, Reciprocating Bill said:

Be sure to purchase or access Lee's FBForth manual, as well, also thoroughly and professionally produced. 

Yes!  I've already purchased and received it from Amazon!  Amazing documentation.  I've never seen documentation this great for Forth before.

 

smp

  • Like 2
Link to comment
Share on other sites

4 hours ago, smp said:

Yes!  I've already purchased and received it from Amazon!  Amazing documentation.  I've never seen documentation this great for Forth before.

 

smp

What did I tell ya. :)

The Doc don't mess around.

 

Have you written much Forth code in the past?

  • Like 1
Link to comment
Share on other sites

17 hours ago, TheBF said:

Have you written much Forth code in the past?

Well, In a Programming Languages class I took long ago for my MS, the Final was to implement a program that would take a number made up of several digits, and then output the number in words (like 143 -> one hundred forty three) in three different languages.  When I contacted the professor with a question about one of my languages, I told him what my three languages were.  His response was something like, "FORTH!  You did this in FORTH?  That deserves an 'A' all by itself!"

 

My most major efforts over the years was primarily getting fig-FORTH to work on any machine that I obtained.  I have it working on my CP/M machines, I got it assembled and installed on a PDP-11 I had at one time, I got it working (with a bunch of help) on the modern SWTPC clone machine from Corsham Technologies.  My best challenge was to take the cartridge code from Talbot Color Forth (basically figFORTH for the 6809) and get it working out of RAM, deleting the cassette I/O routines and adding support for disk files On the Color Computer 3 or any other Color Computer with 64K RAM.  Once I got them working I usually benchmark the general performance of FORTH against BASIC on that machine and compare to the others.  I can already see that fbForth looks like it will probably be something like 20x the performance of TI BASIC, but I haven't done the details on that yet.  

 

So, I guess that I've spent most of my time with the innards of figFORTH on a few different processors.

 

Interestingly, the TI seems to be the most comfortable machine for me to work on so far, believe it or not.  Perhaps I'll get into some more significant programming finally.

 

smp

  • Like 4
Link to comment
Share on other sites

1 hour ago, smp said:

Interestingly, the TI seems to be the most comfortable machine for me to work on so far, believe it or not.  Perhaps I'll get into some more significant programming finally.

 

smp

Oh man there goes the neighborhood. Another FORTH guy moved in. :)

 

Welcome aboard. Your 20X factor might even be conservative. 

In my manual I mention that Camell99's DO/LOOP is 36 times faster than TI BASIC's FOR/NEXT loop. 

 

Your cartridge to RAM port sounds like you are a master. 

Did you have source code? 

 

Forth on the TI-99 seems to fit very well.

The instruction set is something I really enjoy using.

 

( I am pretty sure your prof didn't understand how FORTH could make the numbers to words project easier) ;)

 

  • Like 3
Link to comment
Share on other sites

2 hours ago, TheBF said:

Your cartridge to RAM port sounds like you are a master. 

Did you have source code? 

Yes, I did.  I typed it all in by hand, and then another interested enthusiast double checked it for me, finding only a half dozed errors.  Once assembling clean, I programmed an EPROM and checked it all out as a cartridge, then I was able to go on and move it all down into the lower 32K and make the mods for saving and loading screens to/from disk.  I also added hooks into the code to use the BASIC DIR command, and make a clean exit from Fort back into BASIC.  I released the whole thing into the Color Computer Community back in 2015.  It is currently available on the TRS-80 Color Computer Archive.

 

When I got fig-FORTH running on the SWTPC clone from Corsham Technologies, again with help from another (different) enthusiast, I fixed a few crippling bugs.  Once that was working properly, I released that code back out into the 6800/SWTPC community.  It is currently available as one of the downloads from Corsham Technology.

 

smp

  • Like 5
Link to comment
Share on other sites

So here is my first look at my benchmark program in TI BASIC and fbForth.

 

My benchmark program is a brute force nested do loop program to determine how many ways to make a US dollar from change (pennies, nickels, dimes & quarters).

 

TI BASIC took 15:58.5

fbForth took 1:17.0

 

On this test, that makes fbForth 12.45 times faster than TI BASIC.

 

Actually, neither of those two times are really poor.  Back in 2020 I published an article in the Glenside Color Computer Club Newsletter detailing all my findings to date.  That Newsletter can be seen and downloaded here:

https://www.glensideccc.com/wp-content/uploads/2020/11/coco12340_1.pdf

 

Of course in the following Newsletter there was another article from another person showing all kinds of ways to optimize my brute force method to make it faster on any given computer - BUT that was not my point.  I use my benchmark to have all the computers tested to perform that same laborious task in order to get a general idea of how they match up together for performing that given task.  Then, one can choose which vintage computer might have been "better" than another when running a significantly laborious program.

 

smp

  • Like 3
Link to comment
Share on other sites

You know what's coming next... :)

 

I had to try your benchmark.

 

Just a small change to VARIABLE declarations for for ANS/ISO Forth.

It's very simple but exercises the heck out of some key code primitives, number output and screen I/O

 

By the way with that last name are you from Rhode Island?

(I have a brother-in-law who's a Pereira, from the Azores) 

 

 

Spoiler
\ DOLLAR benchmark by Stephen M. Pereira KB1SXE
\ Minor changes for ANS Forth 

 VARIABLE P
 VARIABLE N
 VARIABLE D
 VARIABLE Q
 VARIABLE C

: DOLLAR
 DECIMAL
 CR 0 C !
 101 0 DO
     I P !
     21 0 DO
        I N !
        11 0 DO
           I D !
           5 0 DO
             I Q !
              P @ N @ 5 * D @ 10 * Q @ 25 * + + + 100 =
              IF
                ." P=" P @ . ." N=" N @ . ." D=" D @ . ." Q=" Q @ . CR
                C @ 1 + C !
              THEN
          LOOP
        LOOP
     LOOP
 5 +LOOP
CR C @ . ." WAYS TO MAKE $1.00"
CR ;

 

 

image.png.717433caf16b4088a236c85fbaf6e6e2.png

Edited by TheBF
typo
  • Like 2
Link to comment
Share on other sites

And for fun I used my inline optimizer on the inner loop computation and that got it to under 29.8 seconds.

 

Spoiler
\ DOLLAR benchmark by Stephen M. Pereira KB1SXE
\ Minor changes for ANS Forth
INCLUDE DSK1.INLINE
INCLUDE DSK1.ELAPSE 

 VARIABLE P
 VARIABLE N
 VARIABLE D
 VARIABLE Q
 VARIABLE C

: DOLLAR
 DECIMAL
 CR 0 C !
 101 0 DO
     I P !
     21 0 DO
        I N !
        11 0 DO
           I D !
           5 0 DO
             INLINE[ I Q ! ]
             INLINE[ P @ N @ 5 * D @ 10 * Q @ 25 * + + + 100 = ]
              IF
                ." P=" P @ . ." N=" N @ . ." D=" D @ . ." Q=" Q @ . CR
                C @ 1 + C !
              THEN
          LOOP
        LOOP
     LOOP
 5 +LOOP
CR C @ . ." WAYS TO MAKE $1.00"
CR ;

 

 

  • Like 2
Link to comment
Share on other sites

11 minutes ago, TheBF said:

By the way with that last name are from Rhode Island?

(I have a brother-in-law who's a Pereira, from the Azores) 

I was born in New Bedford, Massachusetts, close enough to Rhode Island, I guess.  My paternal Grandfather and Grandmother came from the Azores.  On my mother’s side, those Grandmother and Grandfather came from Quebec, Canada.  New Bedford seems to have been somewhat of a melting pot.

 

Yes, lots of Pereira’s in the Azores.  Quite a beautiful place, too.

 

smp

  • Like 2
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...