Another update: all user variable tokens and statistics tokens are now supported.

Unfortunately, I've discovered a bug- if you have more than 15 tokens on a line, the program freezes after execution. (I assume this occurs with the currently posted version too). Tested only in TiEmu thus far, but I'd guess it happens on-calc as well.

I'm not sure why, or even what kind of problems could cause this, but I'll fix it before I release 0.2.
That sounds like a suspiciously power-of-two number to me. Good luck tracking down the bug. Smile
I fixed it!

The problem was pretty simple (although difficult to trace)- I wasn't allocating enough memory to the array containing the tokenized line. Or, rather, I allocated enough for the line itself... but not enough for the hard return token afterwards too.

So I was overwriting some memory on the calculator, hence a corrupt heap (what KerNO, once I put it on the emulator, was reporting).

This means there should be a v0.2 released pretty soon.
Most awesome, I love when debugging a confusion issue leads to a relatively easy fix, even if I'm frustrated that I had to find something that turned out to be trivial. Smile Cheers, looking forward to v0.2. Will you be publishing a beta to the Cemetech Archives here?
KermMartian wrote:
Most awesome, I love when debugging a confusion issue leads to a relatively easy fix, even if I'm frustrated that I had to find something that turned out to be trivial. Smile Cheers, looking forward to v0.2. Will you be publishing a beta to the Cemetech Archives here?


Yes, I will be. I'll have to upload it to TI-89 Programs though since there's no 89 Assembly folder. Razz Unless I should use the Beta Programs folder?

I'll upload the beta as soon as I make sure the current version works on my actual calculator and not just TiEmu.
Either way. If you'd prefer, I can make an 89 Assembly folder. Smile If you'd prefer to use the Beta folder, that's fine too. Good luck on the oncalc testing.
KermMartian wrote:
Either way. If you'd prefer, I can make an 89 Assembly folder. Smile If you'd prefer to use the Beta folder, that's fine too. Good luck on the oncalc testing.


Hmm, I think an assembly folder would be better- even though this is still a beta, it would be available for other 68k assembly/C programs in the future (assuming there are any...).
TC01 wrote:
KermMartian wrote:
Either way. If you'd prefer, I can make an 89 Assembly folder. Smile If you'd prefer to use the Beta folder, that's fine too. Good luck on the oncalc testing.


Hmm, I think an assembly folder would be better- even though this is still a beta, it would be available for other 68k assembly/C programs in the future (assuming there are any...).
89 Assembly folder created; hope you get a chance to use it now or another time in the future. Smile

Edit:
http://www.cemetech.net/programs/index.php?mode=file&path=/89/asm/Solar89_SDK.zip

TC01, I changed the name to have an underscore instead of a space; my webseerver and scripts like that a lot better. Smile
KermMartian wrote:
Edit:
http://www.cemetech.net/programs/index.php?mode=file&path=/89/asm/Solar89_SDK.zip

TC01, I changed the name to have an underscore instead of a space; my webseerver and scripts like that a lot better. Smile

That's fine- I should have thought of that before.

Anyway, in addition to the other stuff I've mentioned, here are the other changes in 0.2:

-I modified BinPac8x to make *.85p files (changed the file and variable type)

-I added some error handling code in make8xp; it prints a message explaining that the file path and/or name is incorrect and then waits for a keypress, rather than just printing the Python exception and exiting (especially important if running by double-clicking rather than the command-line).

-I fixed another bug where all tokens starting with a space ended up with an extra space at the front of the name
Very nice! Would you mind passing me along your .85p changes to BinPac8x so I can include them in the version I'll be releasing in a few days or two?
KermMartian wrote:
Very nice! Would you mind passing me along your .85p changes to BinPac8x so I can include them in the version I'll be releasing in a few days or two?


Sure; all I did was change the string in this block of code to "85p":


Code:
         elif calctype=="5":
            fnameout = fnamein[:fnamein.find(".")+1] + "85s"       #Changed to 85p


And then change the bytearray in the third line in this block of code to "18" instead of "12":


Code:
   elif calctype=="5":
      fho.write(mybytearray([headersize-2,0]))         #byte 55, length 02
      fho.write(mybytearray([bsize_lb,bsize_hb]))      #byte 57, length 02
      fho.write(mybytearray([12]))                  #byte 59, length 0             (changed to 18)
      fho.write(mybytearray([len(oncalcname)]))         #byte 60, length 01
      fho.write((mybytes(oncalcname, encoding='ascii'))) #byte 61, length varies
      fho.write(mybytearray([bsize_lb,bsize_hb]))      #byte 62-69, length 02


But I thought TI-85 assembly programs were saved in *.85s files? Would you add an additional option to make an *.85p file?
That's exactly what I would do. Smile I'm a bit vague on the difference between 85s and 85p files; I'd appreciate some feedback from any of the seasoned TI-85 users. Razz
After some time (during which I've been busy, primarily with getting back to school...), another update. Window, finance, and graph format tokens have now been added. I just need to add the miscellaneous and the TI-84+ tokens (again, as defined by TI|BD, and then I'll release 0.3, which I plan on posting on ticalc.org as well.

Unfortunately, with such a large token file, the program will continue to get slower, which is why my goal for the version after that is to perform some optimizations. Slowness will be a result of three things:

-Parsing the token file (dependent on size of token file)
-My reverse-substring process to parse the input file (not dependent on token file size)
-Searching for a token in the collection of token infos (dependent on token file size).

I know I can make the first somewhat faster. The other two probably can be made faster, but I lack the knowledge to do it.

I've also decided I would like to eventually have the option to detokenize, to convert an *.8xp file into an *.89z file that can then be detokenized on the calculator. That gave me the idea for another project... with the assistance of X-Link and a z80 assembly program on the other end, it would become possible to use a 68k calculator to transfer z80 programs around! I don't think anything like this already exists- X-Link is the closest to it that I know of.
Now I cant wait to get that TI-89T
Hey, I love the idea of using an 89 as an intermediary for transferring z80 programs around! Way to think outside the box. Smile
KermMartian wrote:
Hey, I love the idea of using an 89 as an intermediary for transferring z80 programs around! Way to think outside the box. Smile

Then would you be okay if I used BinPac8x as a template (In that I would go through and just change how and what things are written to the file) for a Python script to package the programs? I thought maybe I could add an option to build an .89y file, but the formats are so different it isn't worth the trouble.
TC01 wrote:
KermMartian wrote:
Hey, I love the idea of using an 89 as an intermediary for transferring z80 programs around! Way to think outside the box. Smile

Then would you be okay if I used BinPac8x as a template (In that I would go through and just change how and what things are written to the file) for a Python script to package the programs? I thought maybe I could add an option to build an .89y file, but the formats are so different it isn't worth the trouble.
Package the programs as .89y? Sure, as long as I get a little credit somewhere, but I trust you. Smile I'm glad that my code is helpful to you.
I've uploaded 0.21 to Cemetech and ticalc.org. This does not add the miscellaneous or the TI-84+ only tokens yet... I really didn't feel like doing that. And I realized that it made no sense to keep bloating the size of the token file before I did some optimizations, otherwise things would get really slow. I just wanted to release a version on ticalc.org, and decided to include what I had so far.

Won't be able to download until it goes through, of course, so here's a link to a copy on Omnimaga: [link removed, see below]
Here's the version in the archives:

http://www.cemetech.net/programs/index.php?mode=file&path=/89/asm/Solar89.zip
KermMartian wrote:


Thanks Kerm!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement