Jump to content
IGNORED

TurboForth How-to Videos


Willsy

Recommended Posts

Would there be any interest in a series of "how-to" videos showing how to do various things in TurboForth?

 

If so please say so here and give an idea of the topics you'd like to see covered and I'll see what I can do.

 

If anyone else wants to make some videos, of TurboForth, fbForth, or Camel 99 Forth please go right ahead. I'd love to get more TIers at least having a dabble with Forth!

Link to comment
Share on other sites

I like the idea Mark.

 

I am moving house but once we get settled I could help with editing and audio. I have a home studio. Well I did ... and will make a new one.

 

Send me an email if you want to collaborate

Link to comment
Share on other sites

I would like to see a video on the basics of making a video game. It doesn't need to be very complex - even something like Pong would do. But basically how you build the sprites and then the basic engine of moving the ball and taking inputs.

 

So I can give a little context for my situation I had grown up with the TRS-80 Color Computer and recently decided to get back into it; however for that system because of the high prices of everything I'm thinking of sticking with Emulators for that and purchasing the physical TI/99/4A hardware instead since (currently) it seems more reasonable.

 

I just need time to figure out all of what I need to buy. I've been keeping an eye on Ebay for TurboForth cartridges but haven't seen any recently.

 

My primary motivation would be for learning Forth and developing games for personal enrichment - not necessarily to use the TI as a game playing device if that makes any sense.

Link to comment
Share on other sites

I like the idea Mark.

 

I am moving house but once we get settled I could help with editing and audio. I have a home studio. Well I did ... and will make a new one.

 

Send me an email if you want to collaborate

Wow that would be great! I have a little 16 track studio here but i'm not planning on using it for how-to's. It's in a room with 20 Stratocasters, Telecasters, and Les Paul's :-)

 

I'm just thinking screen-capturing software and a headset!

Edited by Willsy
Link to comment
Share on other sites

Yes that makes perfect sense to me. Don't worry about a TF cart. I can sort you out with one of those. I have about 100 cart boards in my garage that need soldering up!

 

Which country are you in?

 

TF (and all the Forths) are very convenient in emulation also as you can develop your code in a modern editor and paste it into the emulator.

Link to comment
Share on other sites

I am from the US.

 

I'm less hesitant to buy TI hardware as the prices are lower, systems are more plentiful, and they seem to be more reliable than say a Commodore 64.

 

Do you have any favorite Forth books for getting started?

 

Do you have a favorite emulator / editor?

Edited by courtesi96
Link to comment
Share on other sites

My favourite emulator for windows is Classic99. My favourite text editor is notepad++ YMMV and the usual cavity apply :-)

 

Start with the "about forth" page on turboforth.net:

 

http://turboforth.net/about_forth.html

 

That is (in my opinion) an excellent introduction to the first concepts of Forth. There again, I wrote it, so I would say that :-)

 

Then have a look at the tutorials on the website.

 

Ask questions along the way here on atariage.

 

Have fun! Hobby programming is all about having fun!

Link to comment
Share on other sites

I downloaded Classic99 last night and started messing with Forth. Very interesting! Although I agree using a PC Editor to enter code and then copy/paste is probably a good way to go - I think in the beginning it's better to stick to interactive mode to get a feel for the language.

 

I suppose the hardest part of Forth for someone like myself with no experience is how you create a full application with it. I understand the need to "pay your dues" with learning how the stack works; but taking all of that and building an application that uses words, takes input, etc. is the baffling part to me right now. I'm sure in time it will come.

Link to comment
Share on other sites

Try writing an outline for the game like you would for an essay.

 

The titles of the outline are the word names for the big blocks of the game.

 

The names in the bullet points become the internal routine names.

 

In other words design top down ...

 

Then figure out how to build it Bottom up, testing your words as you build.

 

Try the outline and post it here and we can give you support.

Link to comment
Share on other sites

I suppose the hardest part of Forth for someone like myself with no experience is how you create a full application with it. I understand the need to "pay your dues" with learning how the stack works; but taking all of that and building an application that uses words, takes input, etc. is the baffling part to me right now. I'm sure in time it will come.

Another way to go is to create a set of words that emulate the functionality of TI-BASIC to give you some higher level building blocks.

Turbo Forth already has many of them already.

 

For example:

\ CALL clear in CAMEL99 Forth (Consult Turbo Forth docs for equivalent words)
DECIMAL
: CLEAR  ( -- )  PAGE   0 23 AT-XY  ;   ( just because you love it )

\ make an input buffer
CREATE BUF$  80 ALLOT

: INPUT$ ( -- BUF$)  PAD DUP 80 ACCEPT  BUF$ PLACE ; 

: INPUT# ( -- number) INPUT$  BUF$ ?NUMBER 0= ABORT" not a number" ;

Warning CAMEL99 Forth "tries" to keep to Forth 94 standard. TF is Forth 83 Standard so there are some differences, but Willsy can give us the translations.

Edited by TheBF
Link to comment
Share on other sites

Would there be any interest in a series of "how-to" videos showing how to do various things in TurboForth?

Yes! I'd like to see some sort of TI version of this:

 

http://64bites.com/

 

"If so please say so here and give an idea of the topics you'd like to see covered and I'll see what I can do."

 

An introduction to include workflow and supporting software: editor, emulator, etc. it doesn't have to be ultra professional, just informative. The following example was made with an iPhone in just 30 minutes and one take:

 

Example: https://youtu.be/YwQL1-CZGO8

 

^^^Includes the all-important "how-to" on getting code written and imported into the emulator, and then exported to the TI itself. Ideal for beginners new to the TI Cult.

 

"If anyone else wants to make some videos, of TurboForth, fbForth, or Camel 99 Forth please go right ahead. I'd love to get more TIers at least having a dabble with Forth!"

 

It'd be nice to have a pinned thread to go to or an agreed upon YouTube central channel.

Edited by Airshack
  • Like 1
Link to comment
Share on other sites

I downloaded Classic99 last night and started messing with Forth. Very interesting! Although I agree using a PC Editor to enter code and then copy/paste is probably a good way to go - I think in the beginning it's better to stick to interactive mode to get a feel for the language.

 

I suppose the hardest part of Forth for someone like myself with no experience is how you create a full application with it. I understand the need to "pay your dues" with learning how the stack works; but taking all of that and building an application that uses words, takes input, etc. is the baffling part to me right now. I'm sure in time it will come.

Not sure if this gives you a little help, but it's an illustration in a manual I am working on.

 

 

The Forth Programming Pyramid

You program in Forth by adding functionality to the Forth system itself. Your WORDs are added to the system word by word and you can test each word as you go. This makes your pyramid of code very solid and reliable.

· Assembler CODE words are the foundation of the language that control the computer hardware

· The Forth language is normally written using a mix of those Assembler words and Forth

· Your program’s words are just more words added to the system. No different than the Language itself.

· All of this culminates in creating the final word that starts the entire program running which you can call anything you like. RUN is as good as any other.

​The word "RUN" in the pyramid could be anything, but it shows the last word (sub-routine) you create kicks off your entire program.

post-50750-0-41432100-1498450089.jpg

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

I like the pyramid with one comment

shouldn't Forth Language Words and Your Program's words be on the same level?

Yes and no! The dictionary in Forth is essentially flat; any word can call any word. Physically speaking, the Assembler Code Words, Forth words, and application words are all at the same level (they are a linked list). Conceptually though, (and actually) a program is made of words which use words which use words, so there is a kind of hierarchy. Because the dictionary (where all Forth's words live, regardless of their type) is a simple linked list, a word must exist before it can be referenced.

 

For example (read from the bottom, up):

 

: add + ;

: two 2 add ;

: one 1 two ;

: sum one ;

 

Sum uses one, one uses two, two uses add, add uses an assembler primitive.

 

If you think about it, it's only the assembler code words that really only do any useful work. The "high level" words all (eventually) call the lower-level (assembler) words and that's when something actually happens.

 

We're getting a bit philosophical though! ;)

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

Well I made a start on an "essance of forth" video last night but my twelve year old win 7 laptop really struggles running classic 99 and the screen capturing software at the same time.

 

I'll have another go tonight but I might have to wait and use a new computer. I already have a brand new 64 bit Lenovo laptop sealed in the box. Have owned it for about a month but I haven't opened it yet as I have absolutely no appetite whatsoever for windows 10. I was going to nuke it (or replace the hard drive with an SSD) and put Linux Mint on it.

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