<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


YouTube Videos

TurboForth has a growing collection of videos on YouTube, demonstrating various features, or just having fun.

More videos will be added over the coming months, mostly concentrating on Forth programming techniques.

Stay tuned!


TurboForth Presentation

TI-99/4A Treff, Nottingham, UK: A 5 part presentation discussing TurboForth.


Chicago Faire 2011 Presentation

A presentation of TurboForth given in Chicago at the Annual TI-99/4A Faire.


CREATE DOES> Test

Early video showing TF running CREATE DOES> - It's interesting to see how much TF has changed since then! (Note how much memory was available then, and how much is available now!)


Sprite Demo

No assembly tricks in this demo. It's not even using interrupts.

 


80-Column Showcase

With the appropriate hardware, TurboForth can operate in 80 column text mode. The editor re-configures itself (no windowing) in 80 column mode. Here's a demo.


Silly Colour Demo

Another early video showing how fast you can cycle the colours. If you want to!


Using Block Files in TurboForth

A demo of the editor, and some very simple programming techniques. Shows the auto-boot feature (which has been enhanced further since this video was made).


TurboForth and Extended Basic Head-to-Head

A program written in Extended Basic to produce some pretty multi-coloured blocks, and the equivalent program written in TurboForth. No assembly language is used in the TurboForth version; it's just Forth.


Fast Character Movement Without Using Sprites

Source Code:

--BLOCK-00050---------
1 GMODE HEX
: SOLID DATA 4 FFFF FFFF FFFF FFFF ;
: FACE DATA 10 030F 1F1F 310E 6FAE B19F 9B8C 4702 020E
C0F0 F8F8 8C70 F675 8DF9 D931 E240 4070 ;
SOLID 28 DCHAR SOLID 30 DCHAR FACE 38 DCHAR
5 3 0 COLOR 6 0D 0 COLOR DECIMAL

12 6 40 20 HCHAR 13 4 48 24 HCHAR
14 2 40 28 HCHAR 15 0 48 32 HCHAR ;
FORGET SOLID ( delete SOLID and everything after it)

10 VALUE X 10 VALUE Y

: EUGENE X Y GOTOXY ." 8:" X Y 1+ GOTOXY ." 9;" ;
: ERASE X Y GOTOXY ." " X Y 1+ GOTOXY ." " ;
-->

--BLOCK-00051---------
: MOVE KEY?
  CASE
    ASCII Z OF
      ERASE -1 +TO X X 0< IF 30 TO X THEN EUGENE
    ENDOF
    ASCII X OF
      ERASE 1 +TO X X 30 > IF 0 TO X THEN EUGENE
   ENDOF
  ENDCASE ;

: FLASH1 5 3 0 COLOR 6 13 0 COLOR ;
: FLASH2 5 13 0 COLOR 6 3 0 COLOR ;

: MAIN-LOOP
  EUGENE
  BEGIN
    FLASH1 MOVE FLASH2 MOVE
  AGAIN ;

MAIN-LOOP


Manic Miner - Work in Progress

Forth is great for Domain Specific Languages. Writing your own language is easy in Forth. This program uses a DSL to describe the level. The level data is essentially a script, like a batch file, which triggers already compiled code in the program to draw the screen. Next step is to work on the animation. I only work on it when the fancy takes me, and when I have time to concentrate on it.


Quick Game Idea

It's very quick to demonstrate proof of concepts in Forth. Code can flow very easily. This took about 5 minutes to put together, and worked first time!

Source Code:

  13 VALUE X \ man x coordinate
   9 VALUE Y \ man y coordinate 
   0 VALUE XT \ temp x
   0 VALUE YT \ temp y
   0 VALUE MOVES \ number of moves ;-)
   
: DrawScreen ( --)
  1 GMODE \ 32 column graphics mode
  1 SCREEN \ black screen
  DATA 4 $FF00 $FF00 $FF00 $FF00  96 DCHAR
  DATA 4 $1818 $3CE7 $E73C $1818 104 DCHAR
  DATA 4 $0000 $0018 $1800 $0000 105 DCHAR
  DATA 4 $3C42 $8199 $9981 $423C 112 DCHAR
  12 6 8 COLOR 13 11 0 COLOR 14 3 0 COLOR
   2 8 96 16 HCHAR   3 23 96 11 VCHAR
  14 8 96 16 HCHAR   3  8 96 11 VCHAR
   5 11 96 1 HCHAR   6 22 96  1 HCHAR
  12 12 96 1 HCHAR  11 19 112 1 HCHAR
  13 TO X   9 TO Y   X Y 104 1 HCHAR 
;
: CheckPos ( x y -- flag)
   XT YT GCHAR \ read screen at xt,yt
   CASE 
      96 OF 1 ( hit wall) ENDOF 
     112 OF 2 ( allow loop to exit) ENDOF 
     \ othwerwise...
     X Y 105 1 HCHAR       \ draw trail
     XT TO X YT TO Y       \ update x & y to new position
     X Y 104 1 HCHAR       \ draw man in new position
     MOVES 1+ TO MOVES     \ increase moves counter
     0                     \ push 0 flag (prevent loop from ending)
   ENDCASE
;
: Game ( --)
   DrawScreen 0 TO MOVES
   BEGIN
     0 JOYST \ scan joystick #1
     CASE
       2 OF ( left)  Y 1- TO YT   X TO XT   CheckPos ENDOF
       4 OF ( right) Y 1+ TO YT   X TO XT   CheckPos ENDOF
       8 OF ( down)  X 1+ TO XT   Y TO YT   CheckPos ENDOF
      16 OF ( up)    X 1- TO XT   Y TO YT   CheckPos ENDOF
       0 \ default case (joystick in centre position)
     ENDCASE
   2 = UNTIL       \ loop until CheckPos returns 2 on the stack
   ." HURRAH! IN " MOVES U. ." MOVES!" CR
;

Dark Star

A demo game in TurboForth. All Forth code. The source code is also available.


<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>