* 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 216 times)

0 Members and 1 Guest are viewing this topic.

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 31
  • Post Rating Ratio: +0/-0
    • View Profile
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

  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 876
  • Post Rating Ratio: +7/-2
  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    • View Profile
  • 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 ;)
??? ??? ???
C'est une signature

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 31
  • Post Rating Ratio: +0/-0
    • View Profile
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

  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 876
  • Post Rating Ratio: +7/-2
  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    • View Profile
  • 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?
??? ??? ???
C'est une signature

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 31
  • Post Rating Ratio: +0/-0
    • View Profile
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

  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 876
  • Post Rating Ratio: +7/-2
  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    • View Profile
  • 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 :)
??? ??? ???
C'est une signature

Offline Switchblade

  • Full User
  • Join Date: Mar 2017
  • Location:
  • Posts: 31
  • Post Rating Ratio: +0/-0
    • View Profile
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

  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 876
  • Post Rating Ratio: +7/-2
  • ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    • View Profile
  • 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.
??? ??? ???
C'est une signature

Offline Switchblade

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

 


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