* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: TI 83 plus Axe Appvars  (Read 886 times)

0 Members and 1 Guest are viewing this topic.

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 38
  • Post Rating Ratio: +1/-0
TI 83 plus Axe Appvars
« on: April 06, 2017, 09:41:23 pm »
I am working on a Axe rpg, and need to move the map to an appvar.  It is a 72 * 32 matrix stored in GDB1.  I made the appvar with the map in in using TokensIDE, but I do not know how to incorporate in into my programs. Could someone give me a hand? :)



Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1020
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #1 on: April 06, 2017, 09:52:54 pm »
Well, you probably don't need to move the matrix to an appvar, you want it to start out in the appvar! To get create an appvar with your matrix, use something like this:
Code: [Select]
.A
[YOUR MATRIX HERE]->Str1
72 * 32 -> S
Copy(Str1,GetCalc("appvNAME",S),S)
Compile and run the above program, it will create an appvar with your matrix.

Then, to use your matrix in your program, insert this line near the beginning: GetCalc("appvNAME")->X where X is a variable of your choice. Now, to access your matrix, simply use X in the same way as you would GDB1


Sidenote: your matrix is not "stored" in GDB1, GDB1 simply "points" to a memory location where the matrix is located ;)

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 38
  • Post Rating Ratio: +1/-0
Re: TI 83 plus Axe Appvars
« Reply #2 on: April 06, 2017, 09:55:12 pm »
Thanks!

Oh, yeah, since I have learned ASM, I realize that GDB1 is only a pointer.  I said so for clarification purposes.

EDIT:

I can't seem to get this to work.  Here is exactly what I did.

I entered the map I wanted in TokensIDE like this:
The I obviously used a much larger map. This is hexadecimal, so each two numbers stands for one hexadecimal nibble, if I am correct.

.Map

[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]
[404040404040404040404040404040404040404040404040]

Next, using TokensIDE, it tokenized this as an appvar.

I sent the appvar to my calculator, and added this code to my program.

GetCalc("vmaps")->M

This is my tilemap routine:  Before I entered the maps into the actual program and pointed to them using GDB1, it actually worked.  In this code I replaced GDB1 with M.

For(A,0,11)
For(B,0,7)
If {V+B*72+A+H+M}->theta
Pt-Off(A*8,B*8,theta+Pic2-16)
End
End
End

This however, only gives me a bunch of trash on the screen.
« Last Edit: April 06, 2017, 10:05:44 pm by Switchblade »

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1020
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #3 on: April 07, 2017, 12:14:34 am »
The I obviously used a much larger map. This is hexadecimal, so each two numbers stands for one hexadecimal nibble, if I am correct.
Two symbols in hexadecimal = one byte.

Quote
Next, using TokensIDE, it tokenized this as an appvar.
Tokenizing as an appvar will simply get you the string ".Map \n [40..." into your appvar instead of the actual *value* "[40..." stands for.
Just try compiling and running this axe program:
Code: [Select]
.A
[YOUR MATRIX HERE]->Str1
72 * 32 -> S
Copy(Str1,GetCalc("appvVMAPS",S),S)

ALso, i have no idea what Pic2 is in your render code. Could you explain?

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 38
  • Post Rating Ratio: +1/-0
Re: TI 83 plus Axe Appvars
« Reply #4 on: April 07, 2017, 01:49:13 am »
Pic2 is the pointer for the sprites.

EDIT:
 :D  :w00t: :ninja: :love: It works! You are awesome!
« Last Edit: April 07, 2017, 01:53:09 am by Switchblade »

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1020
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #5 on: April 07, 2017, 01:53:11 am »
Pic2 is the pointer for the sprites.
Makes sense :)

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 38
  • Post Rating Ratio: +1/-0
Re: TI 83 plus Axe Appvars
« Reply #6 on: April 08, 2017, 10:38:35 pm »
How can I keep the appvars in archive without unarchiving and archiving them each time?

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1020
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #7 on: April 08, 2017, 10:45:00 pm »
Axe can read appvars in archive without you unarchiving them. IIRC, you do: GetCalc("appvMYVAR",Y1) where Y1 is the function token. Then, {Y1} will point to then point to the first byte of the file, {Y1+1} the second, and so on. Remember that you cant write to an archived file, only read.

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 38
  • Post Rating Ratio: +1/-0
Re: TI 83 plus Axe Appvars
« Reply #8 on: April 08, 2017, 10:48:33 pm »
Ok, I will try that

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 38
  • Post Rating Ratio: +1/-0
Re: TI 83 plus Axe Appvars
« Reply #9 on: May 08, 2017, 05:17:55 pm »
I know its been a long time since my last question, and I think I know how to do this already, but I am just double checking.  How do I copy a set amount of bytes from an appvar into L1 in Axe.  I know what L1 is, don't worry  ;)

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2300
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #10 on: May 08, 2017, 08:42:25 pm »
*insert super long L1 explanation*

I thing yo uhave to loop through the memory area and copy the content piece by piece, unless there's a method to copy a large memory part which I know nothing about.
Buuut I haven't really "used" axe on a high lever in a long time, so <ou probably shouldn't listen to me anyways...
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1020
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #11 on: May 08, 2017, 09:10:57 pm »
Copy(From,To,Size)

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2300
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: TI 83 plus Axe Appvars
« Reply #12 on: May 08, 2017, 09:25:42 pm »
ok, now it's official, don't listen to anything I say >.<
* p2 hides in shame
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games