Jump to content
SteveB

Introducing Structured Extended BASIC and TiCodEd

Recommended Posts

Wouldn't it be nice to have modern, structured Extended Basic on your TI? No need for GOTO's anymore? Using a Windows PC Editor and save your work directly to a FIAD Disk, ready to use from an emulator? 

 

Well, here it is. I am happy to present you TiCodEd. It offers:

  • Modern Basic without line numbers
  • Translation to Standard Extended Basic
  • Saving of files in tokenized format in FIAD
  • Simply one EXE file, no run-time or installation required

You can have much more comfort in editing your source, enjoy a good readable format with indentions and without line numbers, but structured elements like REPEAT-UNTIL and WHILE-ENDWHILE, in addition to labels. With one click this can not only be converted to Standard Extended Basic, but also written to TIFILES in tokinized format to be directly used by an emulator like Classic99 using OLD DSKx.yourfile.

 

Your program is working perfect? TiCodEd can also write the program in MERGE format for direct use in ISABELLA to be compiled.

 

TiCodEd is available with Lazarus Source for Windows 64 and 32 bit here.

 

Edited by SteveB
  • Like 14

Share this post


Link to post
Share on other sites

Could you add some files to see in your software?

Like:
10 print "something..."
20 goto 10

 

and then more and more advanced?

Like the setup with all in one tool.

Share this post


Link to post
Share on other sites

Thanks Steve, I was able to get this up and running with Classic99 in about five minutes, without reading the docs, or any head scratching.

 

I'm halfway through the docs and they are very good also, Lazarus Pascal is nice. Full screen editing and any help with syntax highlighting is an enormous improvement over line by line editing.

 

Thank you much for this package, now I might have to see if I can figure out Isabella! 😃

  • Like 1

Share this post


Link to post
Share on other sites

Hi Lee,

17 minutes ago, Lee Stewart said:

Though, by your description, TiCodEd looks to be more extensive and certainly a welcome addition to our TI-99/4A tools, are you aware of ’s TIdBit Basic/XB Translator?

 

...lee

 

I started out with TIdBit, in the Export-Menu you can see the Pascal-Port of it and Matthew even supported me by mail. TiCodEd does not offer much totally new stuff, but I try to make it a more convinent tool to use. I enjoy writing my code, press Ctrl-B to build it, switch to Classic99 and directly run it. The structured elements with REPEAT and WHILE loops is new, but otherwise it tries to be most convinient to use. No PHP or Python required, no plugin for other editors. And a direct toolchain towards ISABELLA with the export of MERGE files. Have a look at the manual and tell me what you think. It works well for me for some months now and I have some plans, but love to hear suggestions from the community.

 

Steve

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, oddemann said:

Could you add some files to see in your software?

Like:
10 print "something..."
20 goto 10

 

and then more and more advanced?

Like the setup with all in one tool.

Hi oddemann,

 

there is a little example game "speedy.sxb" included, but I will also include it here for the rest to see without the need to download it first:

// SPEEDY
// A demo of "Structured Extended Basic" by Stefan Bauch

REPEAT
  GOSUB initialize
  REPEAT
     CALL KEY(0,K,S) :: B=B+(K=65)/4-(K=76)/4 :: B1=B-INT(B) :: Q=Q-(B1=.75)+(B1=.25) :: W=W-(B1=.5)+(B1=0)
     CALL GCHAR(Q,W,E) :: SC=SC+1 :: CALL VCHAR(Q,W,130)
  UNTIL e<>32
  CALL SAY("GAMES OVER")
  DISPLAY AT(24,2):"GAME OVER     SCORE :";SC
  WHILE S=0
    CALL KEY(0,K,S)
  WEND
UNTIL K=78
END


initialize:
  CALL CHAR(130,"")
  Q=23 :: W=16 :: B=100.25 :: SC=0
  CALL CLEAR :: CALL VCHAR(1,1,130,23) :: CALL VCHAR(1,32,130,23) :: CALL HCHAR(1,1,130,32) :: CALL HCHAR(23,1,130,32)
  FOR I=6 TO 18 STEP 6 :: CALL VCHAR(I,10,130) :: CALL VCHAR(I,17,130) :: CALL VCHAR(I,24,130) :: NEXT I
  CALL CHAR(130,"FFFFFFFFFFFFFFFF")
RETURN    

 

Edited by SteveB

Share this post


Link to post
Share on other sites
2 minutes ago, SteveB said:

Have a look at the manual and tell me what you think.

 

I surely will. I am a little distracted at the moment, so it may be awhile. 🙂

 

...lee

Share this post


Link to post
Share on other sites

Having fought with converting unstructured ASM and BASIC programs into structured Forth I would like to be a fly on the wall to hear the cuss words spoken as people work on converting their favourite XB games to structured BASIC. :) 

But congrats @SteveB.  This looks like a really great system.

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

Why, not matter what it is, do I not align with people's pronunciations of these TI mash-ups.  Like "TIPI": I have heard it "tee-pee" or "tip-ee," but I think and say "T-I Pie."

 

Now this:

TiCodEd (say it like 'decoded', only with a 't' in the beginning: 'TEE-coded')

 

When it is clearly "T-I Coded."

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
Just now, TheBF said:

converting their favourite XB games to structured BASIC. :) 

This is an activity for the insane*, while the more sane would start from scratch using the old program as a guide.  Nonetheless, should make for some giggles as there are plenty of insane folk around these here parts.

 

* Speaking from experience: I started along the path of converting my games from BASIC to TIdBiT but abandoned that in favor of splitting out the routines and writing the more "structured" bits from the ground up.

  • Like 5

Share this post


Link to post
Share on other sites
2 hours ago, SteveB said:

Hi oddemann,

 

there is a little example game "speedy.sxb" included, but I will also include it here for the rest to see without the need to download it first:

// SPEEDY
// A demo of "Structured Extended Basic" by Stefan Bauch

REPEAT
  GOSUB initialize
  REPEAT
     CALL KEY(0,K,S) :: B=B+(K=65)/4-(K=76)/4 :: B1=B-INT(B) :: Q=Q-(B1=.75)+(B1=.25) :: W=W-(B1=.5)+(B1=0)
     CALL GCHAR(Q,W,E) :: SC=SC+1 :: CALL VCHAR(Q,W,130)
  UNTIL e<>32
  CALL SAY("GAMES OVER")
  DISPLAY AT(24,2):"GAME OVER     SCORE :";SC
  WHILE S=0
    CALL KEY(0,K,S)
  WEND
UNTIL K=78
END


initialize:
  CALL CHAR(130,"")
  Q=23 :: W=16 :: B=100.25 :: SC=0
  CALL CLEAR :: CALL VCHAR(1,1,130,23) :: CALL VCHAR(1,32,130,23) :: CALL HCHAR(1,1,130,32) :: CALL HCHAR(23,1,130,32)
  FOR I=6 TO 18 STEP 6 :: CALL VCHAR(I,10,130) :: CALL VCHAR(I,17,130) :: CALL VCHAR(I,24,130) :: NEXT I
  CALL CHAR(130,"FFFFFFFFFFFFFFFF")
RETURN    

 

So this translated to:

 

100 GOSUB 210
110 CALL KEY(0,K,S) :: B=B+(K=65)/4-(K=76)/4 :: B1=B-INT(B) :: Q=Q-(B1=.75)+(B1=.25) :: W=W-(B1=.5)+(B1=0)
120 CALL GCHAR(Q,W,E) :: SC=SC+1 :: CALL VCHAR(Q,W,130)
130 IF NOT (e<>32) THEN GOTO 110
140 CALL SAY("GAMES OVER")
150 DISPLAY AT(24,2):"GAME OVER     SCORE :";SC
160 IF NOT (S=0) THEN GOTO 190
170 CALL KEY(0,K,S)
180 GOTO 160
190 IF NOT (K=78) THEN GOTO 100
200 END
210 CALL CHAR(130,"")
220 Q=23 :: W=16 :: B=100.25 :: SC=0
230 CALL CLEAR :: CALL VCHAR(1,1,130,23) :: CALL VCHAR(1,32,130,23) :: CALL HCHAR(1,1,130,32) :: CALL HCHAR(23,1,130,32)
240 FOR I=6 TO 18 STEP 6 :: CALL VCHAR(I,10,130) :: CALL VCHAR(I,17,130) :: CALL VCHAR(I,24,130) :: NEXT I
250 CALL CHAR(130,"FFFFFFFFFFFFFFFF")
260 RETURN

Not bad at all.

I really like that project. Everything in one place and super easy to use. Even includes a character definition utility!

Well done. I will definitely be using this.

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, OLD CS1 said:

Why, not matter what it is, do I not align with people's pronunciations of these TI mash-ups.  Like "TIPI": I have heard it "tee-pee" or "tip-ee," but I think and say "T-I Pie."

 

Now this:

 

 

 

When it is clearly "T-I Coded."

I agree (and am guilty) that we are venturing into complete disregard for English, and probably all other languages on these pronunciations... 

 

 

  • Like 2

Share this post


Link to post
Share on other sites

The manual references tidbit, but not being a practiced user, I am curious how divergent this is from Tidbit? A super set? Or some more complex overlap?

Share this post


Link to post
Share on other sites
28 minutes ago, jedimatt42 said:

The manual references tidbit, but not being a practiced user, I am curious how divergent this is from Tidbit? A super set? Or some more complex overlap?

It is supposed to be a superset, but has not been tested in all thinkable ways. I tried to mimic the label-handling of TIdBit, so most TIdBit programs should work. My Pascal port of TIdBit is included (use Export/TIdBit) and when you look at the source you'll see that the tidbit.pas includes the original PHP source as comments. I found no good way to extend this with the REPEAT/WHILE stuff, so I started from scratch with the things I learned by porting TIdBit. 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, OLD CS1 said:

This is an activity for the insane*, while the more sane would start from scratch using the old program as a guide.  Nonetheless, should make for some giggles as there are plenty of insane folk around these here parts.

 

* Speaking from experience: I started along the path of converting my games from BASIC to TIdBiT but abandoned that in favor of splitting out the routines and writing the more "structured" bits from the ground up.

I agree ... I started the whole project because I wanted to finish some games I started in 1984 and abandoned them as XB was too slow to be fun to play. ISABELLA changed this, but my XB code is gibberish now. I changed all jump-destinations to labels and removed the line-numbers. The GOTO-mess remained. So yes, TiCodEd is a good way to conclude old developments, with large a screen and syntax-highlighting, but nice code requires a full re-write. My speedy.sbx example is also a port of 1983 TI Basic program, but it is small enough to be easily refactored. The WHILE would normaly also been a REPEAT loop, but I wanted to have both shown in the demo.

From another game that was far less completed I will do a full SXB-rewrite, re-use only graphics and some few transformed functions. This might become a complex demo to be included someday.

 

Share this post


Link to post
Share on other sites

Three upgrades that immediate popup in my little brain:

 1) Help - about, version, author.

 2) Syntax help

        Click on For, and then a popup with complete syntax for for next file.

          If you built in the capability - you could leave the file blank for others to fill in?

 3) Statistics - like how much stack space is used, how much program space -

             Even back of the napkin type calculations might be helpful.

  And a possible 4th:

 4) Also for longer programs another tab maybe showing what chars had been redefined and what variables would be created, maybe with a mark for variables, defined but never used - as they usually helps people pickup brain malfunctions like calling something windspeed here and wspeed some place else.

 

  • Like 1

Share this post


Link to post
Share on other sites

I find myself toggling between Assy and Forth, and I think I've got enough on my mind to keep me busy for ions.

But this product is something to admire.

 

 

 

 

Edited by GDMike
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, sometimes99er said:

FYI

  Reveal hidden contents

image.png.3094becc59ab119738f4ecfde9b7ead9.png

And 1 hour later.
image.png.102834e09c9add0fd78087c38ccd2b81.png

 

This is CyberCapture blocking an unknown program (might be unsigned.)  Go to Menu > Settings > Basic Protection and under Detections set CyberCapture to "Ask..."

 

Clipboard01.thumb.png.37c03ed365dbc3c2f9a72c084c423ed7.png

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, OLD CS1 said:

This is CyberCapture blocking an unknown program (might be unsigned.)  Go to Menu > Settings > Basic Protection and under Detections set CyberCapture to "Ask..."

 

Clipboard01.thumb.png.37c03ed365dbc3c2f9a72c084c423ed7.png

Oh, have had AVG for ages, and never got a "We need to take a closer look". Thanks.

Share this post


Link to post
Share on other sites
On 12/12/2020 at 7:22 AM, SteveB said:

Hi oddemann,

 

there is a little example game "speedy.sxb" included, but I will also include it here for the rest to see without the need to download it first:

// SPEEDY
// A demo of "Structured Extended Basic" by Stefan Bauch

REPEAT
  GOSUB initialize
  REPEAT
     CALL KEY(0,K,S) :: B=B+(K=65)/4-(K=76)/4 :: B1=B-INT(B) :: Q=Q-(B1=.75)+(B1=.25) :: W=W-(B1=.5)+(B1=0)
     CALL GCHAR(Q,W,E) :: SC=SC+1 :: CALL VCHAR(Q,W,130)
  UNTIL e<>32
  CALL SAY("GAMES OVER")
  DISPLAY AT(24,2):"GAME OVER     SCORE :";SC
  WHILE S=0
    CALL KEY(0,K,S)
  WEND
UNTIL K=78
END


initialize:
  CALL CHAR(130,"")
  Q=23 :: W=16 :: B=100.25 :: SC=0
  CALL CLEAR :: CALL VCHAR(1,1,130,23) :: CALL VCHAR(1,32,130,23) :: CALL HCHAR(1,1,130,32) :: CALL HCHAR(23,1,130,32)
  FOR I=6 TO 18 STEP 6 :: CALL VCHAR(I,10,130) :: CALL VCHAR(I,17,130) :: CALL VCHAR(I,24,130) :: NEXT I
  CALL CHAR(130,"FFFFFFFFFFFFFFFF")
RETURN    

 

Hmm you could copy some of RXB routines to make a better version of XB like I have.

Example:

CALL KEY("YN",3,K,S) ! In RXB does exactly what your routine WHILE S=0 CALL KEY(0,K,S) WEND does

Any single command that does exactly the same thing is better.

RXB version even is better as it locks out all keys but the ones you want in this case Y and N

Another Example: 

CALL VCHAR(1,1,130,23,1,32,130,23) :: CALL HCHAR(1,1,130,32,23,1,130,32) ! In RXB if you include the number of characters a comma starts the same statement

This is also true of many other XB commands in RXB like even CALL MAGNIFY(1,2,1) that can make a sprite flash larger then return to smaller.

Also for CALL GCHAR(1,7,X,2,7,Y) that you see avoids that dreaded double colon curse in XB.

 

Just pointing out if you want to make a much better XB I have paved the way.

 

Share this post


Link to post
Share on other sites

Hi all,

thank you for your positive responses. Until yesterday I was just programming for my own needs, so I adjusted the font for my needs and skipped the help menu. Now I know that there are more people interested I will add this in version 1.1. 

 

@sometimes99er I have no security infrastructure, so neither my website has an SSL certificate nor can I sign my programs digitally.

 

@dhe Syntax highlighting, -help and code completion is available in the used SynEdit component, but I do not want to spent time there at the moment. If someone builds a Lazarus component I would be happy to include it. I may include some basic statistics in the project page if this is helpful. My code does not build any syntax graph or something, it does only context-insesitive text manipulations. Therefore I do not have any parsing in place for the used variables, sorry. But I am not quite happy with the Char editor. I think I will re-write it as a Charset editor one day.

 

@RXB As long as RXB uses the same tokens it might work without any changes. The subroutine name is an unquoted string and all parameters are just translated to tokens, not interpreted in any way.

 

Steve

Share this post


Link to post
Share on other sites
2 hours ago, SteveB said:

Hi all,

thank you for your positive responses. Until yesterday I was just programming for my own needs, so I adjusted the font for my needs and skipped the help menu. Now I know that there are more people interested I will add this in version 1.1. 

 

@sometimes99er I have no security infrastructure, so neither my website has an SSL certificate nor can I sign my programs digitally.

 

@dhe Syntax highlighting, -help and code completion is available in the used SynEdit component, but I do not want to spent time there at the moment. If someone builds a Lazarus component I would be happy to include it. I may include some basic statistics in the project page if this is helpful. My code does not build any syntax graph or something, it does only context-insesitive text manipulations. Therefore I do not have any parsing in place for the used variables, sorry. But I am not quite happy with the Char editor. I think I will re-write it as a Charset editor one day.

 

@RXB As long as RXB uses the same tokens it might work without any changes. The subroutine name is an unquoted string and all parameters are just translated to tokens, not interpreted in any way.

 

Steve

Hmm Tokens in RXB are exactly the same as XB and RXB can run TI Basic too.

  • Like 2

Share this post


Link to post
Share on other sites
On 12/13/2020 at 10:01 PM, RXB said:

Hmm Tokens in RXB are exactly the same as XB and RXB can run TI Basic too.

I was curious ... here is SPEEDY.SXB in the RXB version ... works as expected out of the box.

// SPEEDY
// A demo of "Structured Extended Basic" by Stefan Bauch

REPEAT
  GOSUB initialize
  REPEAT
     CALL KEY(0,K,S) :: B=B+(K=65)/4-(K=76)/4 :: B1=B-INT(B) :: Q=Q-(B1=.75)+(B1=.25) :: W=W-(B1=.5)+(B1=0)
     CALL GCHAR(Q,W,E) :: SC=SC+1 :: CALL VCHAR(Q,W,130)
  UNTIL e<>32
  CALL SAY("GAMES OVER")
  DISPLAY AT(24,2):"GAME OVER     SCORE :";SC
  CALL KEY("YN",3,K,S)
UNTIL K=78
END


initialize:
  CALL CHAR(130,"")
  Q=23 :: W=16 :: B=100.25 :: SC=0
  CALL CLEAR :: CALL VCHAR(1,1,130,23,1,32,130,23) :: CALL HCHAR(1,1,130,32,23,1,130,32)
  FOR I=6 TO 18 STEP 6 :: CALL VCHAR(I,10,130,1,I,17,130,1,I,24,130,1) :: NEXT I
  CALL CHAR(130,"FFFFFFFFFFFFFFFF")
RETURN 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
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...