Author Topic: Axe Q&A  (Read 587429 times)

0 Members and 2 Guests are viewing this topic.

Offline BlackCode

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1650 on: August 28, 2013, 08:44:15 pm »
Yes with a For loop.
While I do appreciate any help...I have no idea how a for loop could possibly improve handling of getkey routines.  Could you perhaps elaborate on how to use it?  (Not the for loop, I can use those fine, using it for a better input routine).
-I post from my iPod, so please forgive any funky formatting.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1651 on: August 29, 2013, 03:26:48 am »
Well, since you didn't say what you used the getKey for, we can't really tell how to improve your input. A For loop helps sometimes and doesn't some other times.
For example, if you want F1 to increment {L1+1}, F2 to increment {L1+2}, ... F5 to increment {L1+5}, then you can see the For loop appear by itself.
But if the actions od the keys are really different, maybe using some ElseIf is better. Just learn how to optimize the ElseIf.

If A=0

ElseIf A=1

ElseIf A=2

ElseIf A=3

ElseIf A=4

End


can be optimized as

!If A

Else!If -1

Else!If -1

Else!If -1

Else!If -1

End
« Last Edit: August 29, 2013, 03:27:01 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline BlackCode

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1652 on: September 27, 2013, 10:13:20 pm »
Anyone have any methods for better grayscale?  I'm currently using Hayleia's method, but even after extensive calibration I still get light diagonal lines running down (these are called scanlines right?). The best I've gotten is a loop with Pause(22), but this makes it impossible to do anything else.  Just using four level grayscale.
-I post from my iPod, so please forgive any funky formatting.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1653 on: September 27, 2013, 10:14:19 pm »
* Runer112 points to GrayLib

Offline BlackCode

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1654 on: September 28, 2013, 12:43:51 am »
That was easier than I expected...thank you.
-I post from my iPod, so please forgive any funky formatting.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1655 on: November 02, 2013, 06:09:28 am »
What does inData return (when not 0) ? The position of the first occurrence ? Of the last one ? Of a random one ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1656 on: November 02, 2013, 12:58:48 pm »
Well this is awkward... inData(BYTE,PTR) returns the position of the first occurrence, while the new inData(BYTE,PTR,SIZE) returns the position of the last occurrence. That was done for extreme optimization purposes, and I don't think I ever considered the case where it would be used on data that contains the same byte multiple times... But that case is definitely one that it should handle, and you would then expect it to return the position of the first occurrence, wouldn't you...

Can you get away with it searching backwards for now? I can try to help implement a solution if you want.
« Last Edit: November 02, 2013, 01:01:38 pm by Runer112 »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1657 on: November 02, 2013, 02:04:13 pm »
Lol, I understand your choices but you should add this to the commands.html so people don't think they do the same. And for now, I don't need it to give me the first occurrence nor the last one, but a random one lol. I guess this won't be a feature anytime soon.

Thanks for the reply and for the update anyway :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline ppaannzzeerr

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1658 on: November 25, 2013, 05:51:33 am »
Why can't I find my prgms in Axe? There're a number of prgms in my TI84 SE, but there is nothing shown on the Axe.
Tip:My Axe is 1.2.2

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Axe Q&A
« Reply #1659 on: November 25, 2013, 08:25:04 am »
Did you start your programs with a dot and the name of your executable ?

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Axe Q&A
« Reply #1660 on: November 25, 2013, 11:11:37 am »
The name after the dot also has to start with a capital letter, if it starts with a lowercase or a number it won't show up.
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1661 on: November 27, 2013, 12:58:35 am »
The question was asked on a French forum where people for some reason don't want to come here even though this is where they'll get the most accurate answers about Axe.

So anyway, here is the question: is it possible to change the size of an appvar ?
Note, I assume the answer is "yes" and the real question is "how ?" :P
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1662 on: November 27, 2013, 01:00:38 am »
The answer is probably MemKit.


Quote from: MemKit readme
---------------------------------------------------------------------------------------------
New(PTR,OFS,SIZ)    Arguments: PTR = Pointer to start of program/appvar (from getcalc).
                               OFS = Offset in program to add memory
                               SIZ = Size of memory to insert
                    Returns: 0 if it failed, non-zero if it succeeded.
                    Description: Attempts to inflate the size of a program/appvar
---------------------------------------------------------------------------------------------
Delete(PTR,OFS,SIZ) Arguments: PTR = Pointer to start of program/appvar (from getcalc).
                               OFS = Offset in program to start deleting memory
                               SIZ = Size of memory to delete
                    Returns: 0 if it failed, non-zero if it succeeded.
                    Description: Attempts to shrink the size of a program/appvar
---------------------------------------------------------------------------------------------

« Last Edit: November 27, 2013, 01:01:16 am by Runer112 »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1663 on: November 27, 2013, 01:37:29 am »
Lol weird, I used MemKit before, I remembered that it had this feature, went to the readme before asking you the question but didn't find the answer O.O
I guess I must have read only the first line of each section or something like that -.-

Thanks :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline BlackCode

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1664 on: December 18, 2013, 08:20:50 pm »
More random questions...
What would be the best way to get text() functionality without actually using the command (speed reasons)?  My first thought is to just tilemap the screen and have sprites be letters.  However, depending on how many different characters I use, this could end up being a lot of sprites to define.  Are there any better methods out there?
-I post from my iPod, so please forgive any funky formatting.