• Axe Q&A 5 5
Currently:  

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

0 Members and 1 Guest 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 #75 on: February 18, 2011, 08:35:35 pm »
Question dealing with earlier: the tilemapper I'm making reads from the RAM at random (like, rand→A at the beginning and for the rest of the program it reads from {A}).
Does this mean the width is variable?
If not what would the width be?  I'm thinking 256, but I'm not sure...
« Last Edit: February 18, 2011, 08:36:08 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

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 #76 on: February 18, 2011, 08:36:18 pm »
Depends on how you're storing the width?




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 #77 on: February 18, 2011, 08:42:03 pm »
For this:
Spoiler For optimized:
Here's the most optimized code I could come up with. Only while finding the top left corner does it fully calculate the position. The other corners reuse previously found values and conditionally add to them as necessary. Note that this will only work with the corner locations being calculated in the order below (although code can exist between calculations), and only for the player being at (45,29) due to optimizations tuned specifically to this coordinate.


Code: [Select]
.Top Left
29-Osub(D8)+J*[map_width]+(45-Nsub(D8)+I)+E→r₆
.Top Right
Nsub(O00)→r₅+r₆
.Bottom Left
Osub(O00)*[map_width]+r₆→r₆
.Bottom Right
r₅+r₆

Lbl D8
  /2/2/2
Return

Lbl O00
  //2≠⁻2
Return
Spoiler For unoptimized:
This is effectively what it does, only this is larger and slower.

Code: [Select]
.Top Left
29-O/2/2/2+J*[map_width]+(45-N/2/2/2+I)+E
.Top Right
29-O/2/2/2+J*[map_width]+(51-N/2/2/2+I)+E
.Bottom Left
35-O/2/2/2+J*[map_width]+(45-N/2/2/2+I)+E
.Bottom Right
35-O/2/2/2+J*[map_width]+(51-N/2/2/2+I)+E

Also wow, this topic grew fast...
Vy'o'us pleorsdti thl'e gjaemue

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 #78 on: February 18, 2011, 08:51:51 pm »
Please don't put [code] tags in spoilers. It's tiny in Chrome :(




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 #79 on: February 18, 2011, 08:53:37 pm »
Oh.. :P
For this:
Here's the most optimized code I could come up with. Only while finding the top left corner does it fully calculate the position. The other corners reuse previously found values and conditionally add to them as necessary. Note that this will only work with the corner locations being calculated in the order below (although code can exist between calculations), and only for the player being at (45,29) due to optimizations tuned specifically to this coordinate.


Code: [Select]
.Top Left
29-Osub(D8)+J*[map_width]+(45-Nsub(D8)+I)+E→r₆
.Top Right
Nsub(O00)→r₅+r₆
.Bottom Left
Osub(O00)*[map_width]+r₆→r₆
.Bottom Right
r₅+r₆

Lbl D8
  /2/2/2
Return

Lbl O00
  //2≠⁻2
Return
This is effectively what it does, only this is larger and slower.

Code: [Select]
.Top Left
29-O/2/2/2+J*[map_width]+(45-N/2/2/2+I)+E
.Top Right
29-O/2/2/2+J*[map_width]+(51-N/2/2/2+I)+E
.Bottom Left
35-O/2/2/2+J*[map_width]+(45-N/2/2/2+I)+E
.Bottom Right
35-O/2/2/2+J*[map_width]+(51-N/2/2/2+I)+E

Also wow, this topic grew fast...
Vy'o'us pleorsdti thl'e gjaemue

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 #80 on: February 19, 2011, 04:42:46 am »
Okay, I kind of have the above figured out.
I'm thinking of making my old character explorer thing (here) more useful for two-byte tokens.
One idea is to text the token to the graphscreen.
Does the graphscreen do text wrapping, and if not, is there a way to make it?
« Last Edit: February 19, 2011, 04:42:58 am 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 #81 on: February 19, 2011, 09:39:39 am »
How does the float{} function work? I've tried it, but everything after float{X} returned an error...
« Last Edit: February 19, 2011, 09:39:55 am by aeTIos »
I'm not a nerd but I pretend:

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #82 on: February 19, 2011, 10:33:22 am »
your x has to be a location in the memory.
Such as L1
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

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 #83 on: February 19, 2011, 10:56:11 am »
How does the float{} function work? I've tried it, but everything after float{X} returned an error...

Floating values are always nine bytes. It should be stored somewhere in RAM (such as after doing something like GetCalc("varA")→P). Then float{P} returns the value of the nine bytes pointed to (hence the curly braces after float{).




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 #84 on: February 20, 2011, 01:40:21 am »
Is there a way to make RecallPic and StorePic work in a way so they don't overwrite the buffer being stored to?  So, instead of it working like Pt-Off, it would work like pt-on or pt-change?
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 #85 on: February 20, 2011, 01:42:24 am »
You could do something like this:

Code: [Select]
For(F,0,767
{L3+F} or {L6+F}->{L6+F}
End

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 #86 on: February 20, 2011, 02:16:38 am »
I thought the buffers were in bits though...that would work anyway?
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 #87 on: February 20, 2011, 02:17:17 am »
yep, OR works with the bits for us :)

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 #88 on: February 20, 2011, 02:19:14 am »
Ah cool.
So that does xor, or is it like Pt-on?
« Last Edit: February 20, 2011, 02:19:23 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

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 #89 on: February 20, 2011, 10:51:36 am »
Pt-On is OR, Pt-Change is XOR.

Pt-Off is really a mask, hence why it's so much bigger.
« Last Edit: February 20, 2011, 10:51:54 am by Deep Thought »