Author Topic: TokenIDE - TI-BASIC IDE  (Read 82944 times)

0 Members and 1 Guest are viewing this topic.

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
TokenIDE - TI-BASIC IDE
« on: August 12, 2010, 12:26:36 am »
I've had an idea for some PC-side calculator related things, so I've been messing around with some ideas. Yesterday I made a "detokenizer", a program that would read in a calc program and give a human-readable version of it. Today I have added the ability to tokenize text. For now the test program is pretty simple, you open a program, and it gives you four text boxes, which are (in order): raw hex, detokenized text, tokenized hex, detokenized text of the tokenized hex. This way you can see that the hex and the text match up.

So here you can see that they match up. Here's a download link if you want to test it out:
http://merthsoft.calcg.org/Tokens.zip
Tomorrow I will be working on taking text that you actually edit yourself and turning it into a program that you can actually put on your calculator.

There are sometimes some inconsistencies, but they tend to be due to ambiguities in the Tokens.xml file, which you're able to edit to suit your needs.

Edit: Updated download link:
http://merthsoft.com/Tokens.zip
« Last Edit: December 06, 2012, 12:00:13 am by merthsoft »
Shaun

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Tokens
« Reply #1 on: August 12, 2010, 12:30:46 am »
Nice!  So it will turn into a kind of On-Computer program editor of sorts?

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #2 on: August 12, 2010, 12:32:41 am »
Nice!  So it will turn into a kind of On-Computer program editor of sorts?
That's the idea. The goal is for this to become a pretty full-featured TI-BASIC IDE, but I'm going one step at a time.
Shaun

SirCmpwn

  • Guest
Re: Tokens
« Reply #3 on: August 12, 2010, 08:53:47 am »
Hey Merth, this looks like .NET, and I know you use C#.  If you like, I can help out a bit.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: Tokens
« Reply #4 on: August 12, 2010, 10:04:44 am »
It seems like everyone's making a TI-Basic IDE/Tokenizer these days- there's Kerm's DoorsCS-based on-calc one, there's Mighty Moose's on-calc one, there's your PC one, and there's mine on-68k-calc one. I guess there will be no shortage of z80 Basic editors/tokenizers in the future...

Nice work so far!



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #5 on: August 12, 2010, 10:48:26 pm »
Hey Merth, this looks like .NET, and I know you use C#.  If you like, I can help out a bit.
I think I'm alright, but I'll keep that in mind.
Shaun

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #6 on: August 14, 2010, 07:31:33 pm »
And here we are, the latest release. You can now open or directly type in programs. Some neat features:
    * DCSB/Celtic III/xLib/LibArc functions, easy to add more (see screenshot, XML driven)
     * Escaping tokens (in case you want "Disp " to be a five character string, instead of the 'Disp ' token, you would do "\Disp ", there are also escape characters, so '\\' becomes the '\' token, and '\~' becomes the '~' token, since '~' is used as negation)
     * Line-by-line byte display
Right now, build only saves the file TEST.8xp as a program called "TEST", that's because this is still all testing stuff for the toolkit.
A lot of it is XML driven, so you can add things function/lib-wise, or adapt it for specific types of development (such as AXE). I'm including the schema in case you want to know how it's formatted.
Here's a screen shot:

Note the "DrawTileMap(" and "DrawSprite(" functions. Those can by typed straight in and run like that.

And the download link:
http://merthsoft.calcg.org/Tokens.zip
Please try and out and let me know how it works for you. It would be nice to know that there is actual interest in a product like this.

For the next step, I'll be switching gears to the map/sprite editors. You'll be able to make a sprite and insert it as hex or into a picture file. You'll be able to make maps and insert them as matrices into a program, or as strings. Basically, anything that has a specific format with these libs you'll be able to create and insert easily. As well as DCS GUI stuff.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tokens
« Reply #7 on: August 17, 2010, 07:59:24 am »
Mhmm, interesting to see the HEX code to the right. Does it means if we copied it on calc and appended an AsmPrgm command at the beginning, it would let us squish the program with AsmComp() and it would let us turn it back into a basic program or something? Not that this would be convenient but I am just curious how that part works.

Also nice to see updates. I'll try this with one of my program when I have some more time.

As for interest I am sure there might be, because some people sometimes asked if there was a BASIC editor other than TI-Graph Link that was reliable and available for use with no internet connection (SourceCoder) and I usually couldn't figure out an answer. However, the majority of the 83+ programmers around here prefer to program on-calc, especially that most have restrictive parents limiting their time allowed on the computer. Plus Cooliojazz was working on a TI-BASIC editor as well a while ago, so you might have some competition. I would like to see this finished, though. Does this works on all versions of Windows, btw?

Also I moved this in calc projects and ideas because it was posted in the wrong sub-forum. (The non-calc computer projects section is for computer projects that absolutely have no relation with calc-related stuff)
« Last Edit: August 17, 2010, 08:01:24 am by DJ Omnimaga »

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #8 on: August 17, 2010, 11:46:55 am »
Mhmm, interesting to see the HEX code to the right. Does it means if we copied it on calc and appended an AsmPrgm command at the beginning, it would let us squish the program with AsmComp() and it would let us turn it back into a basic program or something? Not that this would be convenient but I am just curious how that part works.
I don't think so, since this hex is token data, not opcodes.

As for interest I am sure there might be, because some people sometimes asked if there was a BASIC editor other than TI-Graph Link that was reliable and available for use with no internet connection (SourceCoder) and I usually couldn't figure out an answer. However, the majority of the 83+ programmers around here prefer to program on-calc, especially that most have restrictive parents limiting their time allowed on the computer. Plus Cooliojazz was working on a TI-BASIC editor as well a while ago, so you might have some competition. I would like to see this finished, though. Does this works on all versions of Windows, btw?
I'm alright with competition :) It'll motivate me more. It requires the .Net 4.0 framework, so whatever version of windows that supports, this will run on. It should also run under Linux with Mono, though I haven't tested that myself. I can when I get home.

Also I moved this in calc projects and ideas because it was posted in the wrong sub-forum. (The non-calc computer projects section is for computer projects that absolutely have no relation with calc-related stuff)
Thanks, I wasn't sure which forum this belonged in :)
Shaun

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Tokens
« Reply #9 on: August 17, 2010, 11:51:16 am »
That looks cool!  I have a request:  Can you make an option be to choose if it's an Axe program or not, and if it is show the Axe tokens?
Regardless, it looks neat.  Good luck! ;D

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #10 on: August 17, 2010, 12:13:59 pm »
That looks cool!  I have a request:  Can you make an option be to choose if it's an Axe program or not, and if it is show the Axe tokens?
Regardless, it looks neat.  Good luck! ;D
You'll be able to change the token-set by picking which XML file is used, and if there's one for Axe, you can choose that one. I haven't made on for Axe yet, just DCS (which includes xLib/Celtic III/PicArc), but I plan on making one for Axe, though I don't know enough Axe yet to do that.
Shaun

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tokens
« Reply #11 on: August 17, 2010, 12:47:44 pm »
Mhmm, interesting to see the HEX code to the right. Does it means if we copied it on calc and appended an AsmPrgm command at the beginning, it would let us squish the program with AsmComp() and it would let us turn it back into a basic program or something? Not that this would be convenient but I am just curious how that part works.
I don't think so, since this hex is token data, not opcodes.

As for interest I am sure there might be, because some people sometimes asked if there was a BASIC editor other than TI-Graph Link that was reliable and available for use with no internet connection (SourceCoder) and I usually couldn't figure out an answer. However, the majority of the 83+ programmers around here prefer to program on-calc, especially that most have restrictive parents limiting their time allowed on the computer. Plus Cooliojazz was working on a TI-BASIC editor as well a while ago, so you might have some competition. I would like to see this finished, though. Does this works on all versions of Windows, btw?
I'm alright with competition :) It'll motivate me more. It requires the .Net 4.0 framework, so whatever version of windows that supports, this will run on. It should also run under Linux with Mono, though I haven't tested that myself. I can when I get home.

Also I moved this in calc projects and ideas because it was posted in the wrong sub-forum. (The non-calc computer projects section is for computer projects that absolutely have no relation with calc-related stuff)
Thanks, I wasn't sure which forum this belonged in :)
Aaah ok and no problem ^^, people sometimes confuse both forums, since a calc project may be a computer one and think it might go in non-calc stuff due to being executable on a computer.

For Axe, a few commands use different tokens. For example, in the BASIC editor, Tangent() will become Bitmap() and SinReg will become Freq(. The original token name is given in the command index, for those who don't use a BASIC editor that is Axe-compatible or who are used to certain old tokens.

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #12 on: August 19, 2010, 12:16:54 am »
So I've started working on the sprite/hex editor. It allows you to create/edit/insert a hex sprite. So you can see here that I have a hex sprite highlighted:

And then when I hit Tools->Hex Sprite Editor, I get this:

So that's pretty slick. You can adjust the display options and stuff. You can also edit in that window, both at the pixel-level and the hex-level.
I'm not releasing this one yet for you guys to try, because there's still quite a bit I want to do to it, but that's the progress so far!
This example also does a pretty good job of showing off functions, we've got DetectDCS(, ClearScreen( (note the ',' after it because of the optional parameter), CloseGUIStack(, PushGUIStack(, and GUIMouse( all lookin' sweet :D

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Tokens
« Reply #13 on: August 19, 2010, 01:59:32 am »
Sprite editors are always a welcome addition. That looks very nice! :)

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Tokens
« Reply #14 on: August 19, 2010, 03:46:22 am »
If you need a complete and current list of all Axe token conversions, the "commands.html" file on the left column shows all the tokens that change and what they change to.  Its included in all zip files, but I can send you a better formatted list if you really need one or I can write the XML myself if you have an sdk for it.
___Axe_Parser___
Today the calculator, tomorrow the world!