• Axe Q&A 5 5
Currently:  

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

0 Members and 1 Guest are viewing this topic.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Axe Q&A
« Reply #1875 on: May 14, 2015, 09:47:00 pm »
There's no simple way to produce "nice" audio. At least, not without heavy, very specialized assembly code that would only run on the 84+. Such code doesn't really fit into Axe as a built-in, and that's not even considering the fact that "nice" audio has only ever been implemented by a few people.

If one such individual knows what they're doing, they could theoretically make an Axiom/library for it.

No one has made an Axiom for that? That's surprising.
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1876 on: May 14, 2015, 09:51:10 pm »
It's pretty unsurprising, really. Only a few people have the existing knowledge of how to make a good audio engine, Axiom development isn't exactly very popular, and the Axiom system is better suited for simple commands that user code calls when needed rather than orchestrating a whole engine that has to run in parallel with user code.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1877 on: May 27, 2015, 07:17:02 pm »
If i do something like foo->{L1}^r, will the low byte of foo be stored to L2 or L2+1?
-German Kuznetsov
The impossible chemical compound.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1878 on: May 27, 2015, 07:25:04 pm »
The low byte is stored to the pointer and the high byte is stored to the pointer plus one. (This data ordering in memory is formally known as little-endian)

Offline coops

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +3/-0
    • View Profile
Re: Axe Q&A
« Reply #1879 on: June 25, 2015, 11:16:51 am »
Is there a way to flip masked sprites? When I try to flip something ( Pt-Mask(x,y,flipV(Pic0)) ) it comes out wrong.


Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1880 on: June 25, 2015, 11:37:33 am »
Is there a way to flip masked sprites? When I try to flip something ( Pt-Mask(x,y,flipV(Pic0)) ) it comes out wrong.
 
The problem is that maked sprites have two layers, each 8 bytes. FlipV() can only flip one layer. You will have to flip each layer individually, storing the output to a buffer and then doing Pt-mask on that buffer. The code will be something like this:
Code: [Select]
Copy(flipV(pic0),L1,8) .flip layer 1 and copy to buffer L1
Copy(flipV(pic0+8),L1+8,8) .flip layer 2 and copy to buffer L1+8
Pt-Mask(x,y,L1)
Note that this will overwrite any data you may be storing in L1 throu L1+16
-German Kuznetsov
The impossible chemical compound.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Axe Q&A
« Reply #1881 on: July 16, 2015, 12:39:49 am »
There's no simple way to produce "nice" audio. At least, not without heavy, very specialized assembly code that would only run on the 84+. Such code doesn't really fit into Axe as a built-in, and that's not even considering the fact that "nice" audio has only ever been implemented by a few people.

If one such individual knows what they're doing, they could theoretically make an Axiom/library for it.

No one has made an Axiom for that? That's surprising.

I know this response is a bit late, but sound has a pretty small userbase in programs. Most people will never use it even if it is possible.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1882 on: August 15, 2015, 02:52:05 pm »
I must axe you a question  ;D does the increment operated follow the left to right order of ops exactly? I mean will something like if foo=x++ increment x first and then compare, or the opposite? (In my case foo is a number of arithmetics)
-German Kuznetsov
The impossible chemical compound.

Offline Haobo

  • LV2 Member (Next: 40)
  • **
  • Posts: 27
  • Rating: +4/-0
    • View Profile
Re: Axe Q&A
« Reply #1883 on: August 16, 2015, 08:43:51 am »
I must axe you a question  ;D does the increment operated follow the left to right order of ops exactly? I mean will something like if foo=x++ increment x first and then compare, or the opposite? (In my case foo is a number of arithmetics)


In most of axe, since there is not exact documentation and that it does not follow order of operations, most things you just need to test to see if it works or not. (Btw, it wouldn't even compile, just throw an invalid token error)
Projects:
Star Cats
Five Nights at Freddy's
Phoenix Wright

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1884 on: August 16, 2015, 11:22:30 am »
I must axe you a question  ;D does the increment operated follow the left to right order of ops exactly? I mean will something like if foo=x++ increment x first and then compare, or the opposite? (In my case foo is a number of arithmetics)


In most of axe, since there is not exact documentation and that it does not follow order of operations, most things you just need to test to see if it works or not. (Btw, it wouldn't even compile, just throw an invalid token error)

"(foo=x)++ will make no sense, so ++ has to happen first" -runer112 over irc. it does seems to work ;)
-German Kuznetsov
The impossible chemical compound.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Axe Q&A
« Reply #1885 on: October 27, 2015, 07:04:13 pm »
On a different subject, I noticed that the Text( command behaved weirdly when performed off screen.
Could this just be my bad code or is it something else?

Also, what exactly does #Relloc( do? (I know it moves the location of something, but why would you want to do that?)
« Last Edit: October 27, 2015, 07:32:25 pm by E37 »
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1886 on: October 27, 2015, 08:07:07 pm »
On a different subject, I noticed that the Text( command behaved weirdly when performed off screen.
Could this just be my bad code or is it something else?

You noticed correctly. Text printing is handled by the OS, which may freak out when attempting to print text offscreen. It's up to the programmer to make sure that the text they print is not offscreen.

Also, what exactly does #Relloc( do? (I know it moves the location of something, but why would you want to do that?)

It redefines the address at which the automatically-defined A-θ variables exist in memory. It's only rarely useful to advanced programmers who need to use the variable's default location in memory for something else, as this allows them to move the variables somewhere else that they know is free.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1887 on: October 28, 2015, 04:02:17 am »
Now that I think of it. I never used #Realloc because I use custom variables (and because before that, I was a noob) but would Realloc also move a custom variable if it is defined from a default one ? I mean something like °A→°Custom, then #Realloc(L3), would this make °Custom equal to L3 from now on ?
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 #1888 on: October 28, 2015, 09:10:27 am »
Now that I think of it. I never used #Realloc because I use custom variables (and because before that, I was a noob) but would Realloc also move a custom variable if it is defined from a default one ? I mean something like °A→°Custom, then #Realloc(L3), would this make °Custom equal to L3 from now on ?

No. Constant assignments are strict, not lazy, meaning they're resolved to a value immediately.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1889 on: October 30, 2015, 06:22:38 pm »
You noticed correctly. Text printing is handled by the OS, which may freak out when attempting to print text offscreen. It's up to the programmer to make sure that the text they print is not offscreen.
I hate that. It would be much easier if the OS handled the screen text itself, and IMO, much more optimized to. (Compare the OS having some code like If((x=(x+char.length))>=screen.width) return; vs the programer having to come up with some hacky code :P
Furthermore, (at least according to tom scott), no proper text culling caused a security flaw where one could crash someone else's iOS device by sending arabic chars.
-German Kuznetsov
The impossible chemical compound.