• Axe Q&A 5 5
Currently:

### Author Topic: Axe Q&A  (Read 322498 times)

0 Members and 1 Guest are viewing this topic.

#### Ivoah

• LV6 Super Member (Next: 500)
• Posts: 336
• Rating: +3/-0
##### 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

#### Runer112

• Project Author
• LV11 Super Veteran (Next: 3000)
• Posts: 2289
• Rating: +639/-31
##### 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.

#### c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
##### 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.

#### Runer112

• Project Author
• LV11 Super Veteran (Next: 3000)
• Posts: 2289
• Rating: +639/-31
##### 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)

#### coops

• LV3 Member (Next: 100)
• Posts: 58
• Rating: +3/-0
##### 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.

#### c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
##### 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
Note that this will overwrite any data you may be storing in L1 throu L1+16
-German Kuznetsov
The impossible chemical compound.

#### TIfanx1999

• ಠ_ಠ ( ͡° ͜ʖ ͡°)
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 6173
• Rating: +191/-9
##### 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.

#### c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
##### Re: Axe Q&A
« Reply #1882 on: August 15, 2015, 02:52:05 pm »
I must axe you a question  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.

#### Haobo

• LV2 Member (Next: 40)
• Posts: 27
• Rating: +4/-0
##### Re: Axe Q&A
« Reply #1883 on: August 16, 2015, 08:43:51 am »
I must axe you a question  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

#### c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
##### Re: Axe Q&A
« Reply #1884 on: August 16, 2015, 11:22:30 am »
I must axe you a question  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.

#### E37

• LV6 Super Member (Next: 500)
• Posts: 306
• Rating: +21/-0
• Trial and error is the best teacher
##### 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.

#### Runer112

• Project Author
• LV11 Super Veteran (Next: 3000)
• Posts: 2289
• Rating: +639/-31
##### 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.

#### Hayleia

• Programming Absol
• Coder Of Tomorrow
• LV12 Extreme Poster (Next: 5000)
• Posts: 3367
• Rating: +393/-7
##### 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.

#### Runer112

• Project Author
• LV11 Super Veteran (Next: 3000)
• Posts: 2289
• Rating: +639/-31
##### 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.