Author Topic: Lock programs with Axe?  (Read 8289 times)

0 Members and 1 Guest are viewing this topic.

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Lock programs with Axe?
« Reply #15 on: October 20, 2010, 02:44:06 pm »
ok, you have String A that looks like $4F,$01,$02,$04,$05 and String B which looks like $05,$04,$02,$01 and you want your output to look like $01,$02,$04,$05 right?  So what's the advantage of using String B?
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Lock programs with Axe?
« Reply #16 on: October 20, 2010, 04:02:07 pm »
I use just Str9. The name I need to store into Str9 is [Pointer - 7] until [Pointer - 6 - Name lenght] .
But I think I found a solution already. Thanks anyway. :)
« Last Edit: October 21, 2010, 05:41:23 pm by Aichi »

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: Lock programs with Axe?
« Reply #17 on: October 20, 2010, 04:35:41 pm »
It is redundant to get the NAME of the entry and then search the symbol table again to find the entry with that name using GetCalc()

The data pointer can be found at {entry-4}rr.  You can then add 2 to that pointer to skip over the size bytes in the data to mimic how the getcalc() works.
« Last Edit: October 20, 2010, 04:36:21 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Lock programs with Axe?
« Reply #18 on: October 21, 2010, 05:29:28 pm »
Ok, Ill use the VAT data pointer instead of Getcalc( .
I am having still trouble by outputting an Appvar Entry with the small font.
I thought this is possible:
Code: [Select]
.VAT2STR

{e9830}r -> P . VAT start Pointer

Repeat getkey(15)

ClrDraw
""[CE]"       "->Str9 . [CE] is the "..." Character for representing loading, then Space character by seven times

If {P}=21 . If current entry has type 'appvar'

For(X,0,{P-6}-1)
{P-7-X}->{Str9+X} . This doesnt work. :/ It should copy the entry name into Str9
End

Else . If the type isnt 'appvar' then Str9 is still "..."

P-{P-6}-7-> P . Go to the next entry

End

If getkey(3) and (P>=VAT end
P-{P-6}-7-> P
End

Fix 5
Text(1,1,Str9) . Str9 is always "..."

Dispgraph

End . Loop End

Fix 4
Return
« Last Edit: October 21, 2010, 09:50:23 pm by Aichi »

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Lock programs with Axe?
« Reply #19 on: October 21, 2010, 08:44:37 pm »
first, I notice "{P-7-X+1}->{Str9+X}" should be "{P-7-X}->{Str9+X}" since P-7 is the first entry, not P-6, which is what yyou got by adding 1 back at the end... I'll go over it more later when I have time to see what els...
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Lock programs with Axe?
« Reply #20 on: October 21, 2010, 09:53:27 pm »
first, I notice "{P-7-X+1}->{Str9+X}" should be "{P-7-X}->{Str9+X}" since P-7 is the first entry, not P-6, which is what yyou got by adding 1 back at the end...
Youre right. I removed the mistakes from the code in the last post.
Here is a screenshot showing what happens if I output appvar names character by character with 4 pxl gaps.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Lock programs with Axe?
« Reply #21 on: October 21, 2010, 10:04:01 pm »
first, I notice "{P-7-X+1}->{Str9+X}" should be "{P-7-X}->{Str9+X}" since P-7 is the first entry, not P-6, which is what yyou got by adding 1 back at the end...
Youre right. I removed the mistakes from the code in the last post.
Here is a screenshot showing what happens if I output appvar names character by character with 4 pxl gaps.

Why do it character by character? Didn't you just have code for storing it and displaying it as a string?

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Lock programs with Axe?
« Reply #22 on: October 21, 2010, 10:10:08 pm »
@ Runer
Yes, thats what Im trying to do, but currently Im having trouble by copying the entry name into a string.

Code: [Select]
For(X,0,{P-6}-1)
{P-7-X}->{Str9+X} . This doesnt work. :/ It should copy the entry name into Str9
End

Seems like this code does nothing.
« Last Edit: October 21, 2010, 10:11:17 pm by Aichi »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Lock programs with Axe?
« Reply #23 on: October 21, 2010, 10:19:08 pm »
Well your code has no errors, but the problem is that your program is compiled as an application. Apps exist in ROM so they can't use self-modifying code, which is what storing to internal pointers like Str9 really is, so that's why that does nothing. What you need to do is instead allocate a section of safe RAM to hold the string and copy and display the string from there.
« Last Edit: October 21, 2010, 10:21:16 pm by Runer112 »

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Lock programs with Axe?
« Reply #24 on: October 21, 2010, 11:10:20 pm »
Ooh, yep, that's exactly it!  Good job Runner! :P
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Lock programs with Axe?
« Reply #25 on: October 21, 2010, 11:17:24 pm »
Oh, I see. I will probably go back to use programs for storing level data like I did at the start of this topic.
Thank you, Runer.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Lock programs with Axe?
« Reply #26 on: October 21, 2010, 11:24:09 pm »
Wait, why are you going back to using programs? This isn't a problem inherent in the fact that level data is stored in appvars, it's a problem inherent in the fact that your main program is compiled as an application.

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Lock programs with Axe?
« Reply #27 on: October 21, 2010, 11:26:55 pm »
Or more specifically, trying to change a string while compiling to an application...
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Lock programs with Axe?
« Reply #28 on: October 21, 2010, 11:36:46 pm »
Wait, why are you going back to using programs? This isn't a problem inherent in the fact that level data is stored in appvars, it's a problem inherent in the fact that your main program is compiled as an application.
I wanted to output the entry name as a string to dont get pen moving problems like in the screenshot.
Program names are just Uppercase, so all font sprites would be have a defined width of 4pxl, so I could
output program names char by char without having to use strings. I think everything else would be not as efficient as this way, especially because I have to take a look on my remaining memory size.
« Last Edit: October 21, 2010, 11:40:41 pm by Aichi »

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: Lock programs with Axe?
« Reply #29 on: October 21, 2010, 11:49:17 pm »
Simply replace "Str9" with "L1" or some other free ram.  Then you can call "Disp L1" later.  Don't forget to add the null character at the end of the string.
___Axe_Parser___
Today the calculator, tomorrow the world!