Author Topic: TIConvert  (Read 13026 times)

0 Members and 1 Guest are viewing this topic.

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: TIConvert
« Reply #15 on: February 28, 2011, 04:36:49 pm »
Hey I just tried this and it seems to work pretty well, also I'M glad you included the dll file so we don't need to install Python. :D

I tried on some programs and the code seems fine. Here's the source:

Code: [Select]
.DJTUNNEL Axe Parser Tunnel clone
"appvDJTUNNHS"->GDB1
UnArchive GDB1
[80C0E0F0E0C08000->Pic1
"AXE TUNNEL"->Str2
"2010, by DJ Omnimaga"->Str3
"SPEED:"->Str4
0->D->P+1->S+1->Q->K
5->J
8->C+1->R
29->I+1->A
40->W->T
Full
DiagnosticOff
ClrHome
ClrDraw
For(Z,9,21
    Line(0,Z,95,Z
End
Line(0,56,95,56
StorePic
ClrDraw
For(Z,8,22
    Line(0,Z,95,Z
End
For(Z,56,63
    Line(0,Z,95,Z
End
DrawInv
Fix 5
Fix 1
Text(20,12,Str2
Fix 0
Text(14,57,Str3
Fix 3
Text(5,35,Str4
Repeat Z=54
    DS>(K,12)
        DispGraph^^r
    End
    DS>(J,11-(S*2))
        Pt-Change(I,35,Pic1)
        I+1->I
        If I=86
            29->I
        End
    End
    getKey->Z
    If Z=15
        1->S
        Goto GO
    End
    Z=3-(Z=2)+S->S
    If S=6
        5->S
    End
    !If S
        1->S
    End
End
ClrHome
ClrDraw
For(Z,10,50
    Line(0,Z,95,Z)
End
Repeat W=6 or getKey(15)
    P+S->P
    DS>(C,8)
        rand^2*2-1->D
    End
    R+D->R
    !If R
        1->R
    End
    If 62-W<R
        62-W->R
    End
    A-getKey(4)+getKey(1)->A
    Pt-Change(0,A,Pic1)
    Line(95,R,95,R+W)
    DS>(Q,S)
        DispGraph
        If pxl-Test(0,A) or pxl-Test(0,A+6)
            Goto GO
        End
    End
    Pt-Change(0,A,Pic1
    Horizontal -
    DS>(T,99)
        W-1->W
    End
End
Lbl GO
getKey
Fix 4
Fix 2
ClrHome
If P
    Output(0,0,"Score:",P>Dec
End
GetCalc(GDB1)->M
If M
    If P>{S*2+M-2}^^r
        P->{S*2+M-2}^^r
    End
Else
    GetCalc(GDB1,10
    GetCalc(GDB1)->M
    P->{S*2+M-2}^^r
End
Output(0,1,"SPEED HIGHSCORE
For(S,1,5
    Output(0,S+1,S>Dec,"     ",{S*2+M-2}^^r>Dec
End
Output(0,0

Darn this code is ancient...

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #16 on: February 28, 2011, 09:15:38 pm »
It's nice to hear that it works :)


Currently, I'm trying to convert text to 8xp, but it runs outrageously slow and has the most vexing habit of occasionally chopping off characters at the start of a new line. /frustration
« Last Edit: February 28, 2011, 09:16:46 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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: TIConvert
« Reply #17 on: March 03, 2011, 01:09:50 am »
Sorry to hear. Hopefully you can solve the issue soon. It seems like it might be a tedious/hard task because words made of individual letters got to be converted to tokens and it must screw up with games using lowercases X.x

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #18 on: March 07, 2011, 08:32:49 pm »
Update:
I managed to transform a 1 minute tokenizing time to about 5 seconds - hooray!  What I was doing before was reading each line, seeing if it was a token, and if not, taking a character off of the end of the line, seeing if it was a token, etc., ad nauseum...  In retrospect, given that a token can only be about 14 characters long, starting by examining an entire line might not have been the most efficient method X.X

Wabbitemu and my calc both finally accepts the 8xp, but for some reason, the file is either truncated short, or contains loads of garbage characters at the end.  Hopefully, this should be the last thing I have to fix.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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: TIConvert
« Reply #19 on: March 07, 2011, 10:34:36 pm »
Nice to see you got it to be faster. :D I personally had no troubles with the speed, but I got a recent computer so that might be why. I hope you get the bugs fixed without too much hassle.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #20 on: March 07, 2011, 11:46:48 pm »
Nah, I meant the speed for txt to 8xp (which is something I haven't released yet)

I don't foresee any speed problems with 8xp to txt :)
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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: TIConvert
« Reply #21 on: March 07, 2011, 11:48:28 pm »
Oh ok, lol, I was confused. X.x

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: TIConvert
« Reply #22 on: March 08, 2011, 07:55:25 pm »
Can't wait for the txt -> 8xp :D
And when that comes out, would it be okay for me to use this in a text editor made in Python? Specifically for Axe/TIBasic? You would obviously get credit.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #23 on: March 08, 2011, 09:11:33 pm »
Yeah, sure, go ahead.  My projects are open-source unless otherwise noted.

I'm also going to be releasing TI-Basic to 8xp, fyi (although 8xp to TI-Basic would be a little trickier.)
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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: TIConvert
« Reply #24 on: March 09, 2011, 03:32:48 pm »
Cool, are you planning to upload it in the archives and ticalc.org?

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #25 on: March 11, 2011, 08:56:12 pm »
@ DJ: Yep, once I have something that's pretty polished.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #26 on: March 21, 2011, 07:41:51 pm »
Update:  Hooray!  I finally finished txt to 8xp!

Now all I have left is calculating the checksum, which shouldn't be too hard...
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: TIConvert
« Reply #27 on: March 23, 2011, 11:06:33 am »
Update:  Hooray!  I finally finished txt to 8xp!

Now all I have left is calculating the checksum, which shouldn't be too hard...

Here is the Python code I once used to calculate checksum for Assembly programs, not sure if it'll work fine, but you can always give it a try:

Code: [Select]
sumo=0
for i in range(0,len(hexArray[76:len(hexArray)-2])):
sumo += int(str(hexArray[76+i]),16)

I know it lacks stuff, but that's pretty much the way it works, I guess.

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: TIConvert
« Reply #28 on: March 23, 2011, 02:26:24 pm »
Glad to hear. :D Does it detect lowercase strings easily? (Like in Illusiat 12)
« Last Edit: March 23, 2011, 02:26:48 pm by DJ_O »

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: TIConvert
« Reply #29 on: April 23, 2011, 05:11:49 pm »
Bumpity bumpity bump! :D

How's progress? The tokenizer/detokenizer in our project, Axe GUI Library, is a fail, so we're looking for a new one to take its place, and we'd love to use yours! :) Our project is GPL v3, with the exception of the library itself, which is LGPL so those who don't want to release source don't have to.

(Our project website: http://code.google.com/p/axe-gui-libraries/)
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)