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

0 Members and 3 Guests are viewing this topic.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1410 on: March 11, 2012, 08:35:42 pm »
I'm using a custom-named variable as a pointer.  In my experience I haven't had to put curly brackets around it like you have to do with normal variables.
How do I modify what part of the ram it points to?  Not the byte itself but the location of it.

Also is it possible to have one-byte custom variables, and if there's a way then putting r after it all the time then how?
Vy'o'us pleorsdti thl'e gjaemue

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1411 on: March 11, 2012, 08:41:13 pm »
As far as I know, if you use a custom named variable, it is impossible to modify the location it points to, as it is treated as a constant pointer.  It is also impossible to have only a single byte custom variable as far as I know.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1412 on: March 11, 2012, 08:43:31 pm »
Would it work to modify the pointer itself then?
(ie if I did L1→oName would modifying {L1}r work)
Vy'o'us pleorsdti thl'e gjaemue

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1413 on: March 11, 2012, 08:46:41 pm »
That wouldn't be modifying the pointer, you would be modifying the byte at L1.  Like I said, custom variables are treated like precompiled constants, so their location is hardcoded into your program and not modifiable.  If you want a pointer that can be moved to point to many different locations, you will have to use a variable as a pointer.

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Axe Q&A
« Reply #1414 on: March 12, 2012, 10:18:57 pm »
Why does sin(1) return 3 and sin(3) return 11?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #1415 on: March 12, 2012, 10:19:55 pm »
base 4? :P
at least, it looks like it.
« Last Edit: March 12, 2012, 10:20:06 pm by TBO_Yeong »
Sig wipe!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #1416 on: March 12, 2012, 10:39:06 pm »
Why does sin(1) return 3 and sin(3) return 11?
What should it return? Remember period is 256 and range is [-127,127].




Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Axe Q&A
« Reply #1417 on: March 12, 2012, 11:49:11 pm »
Why does sin(1) return 3 and sin(3) return 11?
Axe doesn't use the standard degrees system - it returns a value between -127 and 127.
In-progress: Graviter (...)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #1418 on: March 13, 2012, 07:57:35 am »
you got ninja'd
I'm not a nerd but I pretend:

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1419 on: March 13, 2012, 09:56:03 pm »
I went into Essence's source code, and found the part that doesn't work right at 15mHz.
Spoiler For ZSHOOT:
Quote from: code
..
C=2 or or(C=6)?0→E,1→E
{C+GDB0BA}→A

 // Suspecting this line..
!If (getKey(30)+(getKey(31))+(getKey(32))+(getKey(38))+(getKey(40))+(getKey(46))+(getKey(47))+(getKey(48))-1)

U*10+Bul→r1
{C+GDB0BQ}→Q
E*8+X→{r1}r
.X+(8*(C!=2))->{r1}^^r
E*8+Y→{r1+2}r
.Y+(8*(C!=2))->{r1+2}^^r

 // ...or these
getKey(32)*2+(getKey(30)*2)-(getKey(48)*2)-(getKey(46)*2)+(getKey(31)*3)-(getKey(47)*3)→F*A→{r1+4}r
getKey(30)*2+(getKey(46)*2)-(getKey(32)*2)-(getKey(48)*2)+(getKey(38)*3)-(getKey(40)*3)→G*A→{r1+6}r

If Opt
If {Opt}
!If (C=1)+(C=5)
rand^3-1*8+{r1}r→{r1}r
rand^3-1*8+{r1+2}r→{r1+2}r
.SWITCHED^
F*4+{r1+4}r→{r1+4}r
G*4+{r1+6}r→{r1+6}r
End
Else
C!=1*S+{r1+4}r+(rand^3)-1→{r1+4}r
C!=1*T+{r1+6}r+(rand^3)-1→{r1+6}r
End
End
C→{r1+8}
{C+GDB0XP}→{r1+9}
!If C-6
F*9+{r1}r→{r1}r
G*9+{r1+2}r→{r1+2}r
End
!If C-1
{r1+4}r*6+{r1}r→{r1}r
{r1+6}r*6+{r1+2}r→{r1+2}r
End
U++
End
Would there be a way to make this work at Full speed, and keep it somewhat as-is?  (or some more-optimized way :P)
« Last Edit: March 13, 2012, 10:19:15 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #1420 on: March 15, 2012, 04:24:55 am »
What is going wrong?
I'm not a nerd but I pretend:

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1421 on: March 15, 2012, 10:40:01 am »
When that code is ran at 15mHz, the keys in some part or another don't detect properly and/or get mixed around.  I've been suspecting key delays, but I'm also told that getKey always goes in 6mHz :/  At 6 it runs fine, but I'll end up using the Full speed.
Also I can't use getKey=# , that messes up when you press an arrow key.

I'm seeing some possible optimizations in the code, but I'm wondering if I'll have to slow it down rather than speed it up to get it to work...
Vy'o'us pleorsdti thl'e gjaemue

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #1422 on: March 16, 2012, 11:08:05 am »
Just try to run the getkey code in 6mhz and see if that works
I'm not a nerd but I pretend:

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1423 on: March 16, 2012, 06:30:43 pm »
I've tried that..the keys sort of work but there's some mix-ups between the keys, or the calc thinking there's other keys pressed aside from the normal problems. (ie pressing [sin] and nothing else makes the calc think both [sin] and [^] are pressed)

Is there some operation that can be done inline to slow it down, maybe allow for the delay to do its job (better at least :P)?
« Last Edit: March 16, 2012, 06:30:59 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #1424 on: March 17, 2012, 10:27:57 am »
Idk, it has to do with reading the port.
I'm not a nerd but I pretend: