Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: yunhua98 on May 20, 2011, 11:19:26 pm

Title: Appvar Detection Question
Post by: yunhua98 on May 20, 2011, 11:19:26 pm
If I had a level editor and it generated appvar levels of any name, how would I detect which ones are levels for my game and which ones aren't?

I was thinking putting some sort of code at the RAM location, but how would I check through all the appvars on my calculator?
Title: Re: Appvar Detection Question
Post by: Michael_Lee on May 20, 2011, 11:48:06 pm
Try using Memkit?  (Give each level appvar the same constant value at the front to identify it?)

Create one master appvar (that has a constant name), and every time you create an appvar, put it's name in it, then recalling appvars, reference only the names you have stored away?
Title: Re: Appvar Detection Question
Post by: yunhua98 on May 20, 2011, 11:50:12 pm
well, that's assuming I'm making them all.  This is for a level editor, and I want the people making the levels to have whatever name they want.  I could just make all the levels myself, but I don't want to have to update the program to support the new level pack each time, I want to just be able to release an appvar, and have it work with the game.
Title: Re: Appvar Detection Question
Post by: thepenguin77 on May 21, 2011, 12:08:13 am
I don't know how to do it in Axe, but what you want to do is exactly what Micheal_Lee said, make all your appvars start the same way.

So for example, make all of your appVars start with Yunhua98 or something. In memory it would look like this:

Y, u, n, h, u, a, 9, 8, <level data>.

Then, using some unknown Axe command, you would search through all the appVars and look for appVars that start in that way. Those would be your levels and you would display those names.
Title: Re: Appvar Detection Question
Post by: Michael_Lee on May 21, 2011, 12:36:28 am
well, that's assuming I'm making them all.  This is for a level editor, and I want the people making the levels to have whatever name they want.  I could just make all the levels myself, but I don't want to have to update the program to support the new level pack each time, I want to just be able to release an appvar, and have it work with the game.

You wouldn't edit the master appvar -- the level editor would.  In theory, running either the level editor or the game would create a master appvar, if there isn't one already, and every time somebody uses the editor, the master appvar is automatically edited.

But that wouldn't support importing external levels, so I think using Memkit with thepenguin77's method is best, imo.
Title: Re: Appvar Detection Question
Post by: squidgetx on May 22, 2011, 12:13:19 pm
I did it without memkit for the Psyche's level system using penguin's method, except I just headed everything with $1337 lol. link to dl in sig.
Title: Re: Appvar Detection Question
Post by: yunhua98 on May 22, 2011, 07:00:21 pm
how is the Print Command used?  that is, how do you specify which name(s) to copy?

@squidgetx: how?
Title: Re: Appvar Detection Question
Post by: thepenguin77 on May 22, 2011, 08:15:20 pm
I did it without memkit for the Psyche's level system using penguin's method, except I just headed everything with $1337 lol. link to dl in sig.

That seems a bit risky. I'm sure your not the first person to head files with $1337. ;) Oh well though, if someone happens to ever have a conflict, I'm sure the results will be amusing.
Title: Re: Appvar Detection Question
Post by: yunhua98 on May 23, 2011, 12:20:57 pm
how would you search through the headers though?

i.e. where are the appvar names located in RAM?
Title: Re: Appvar Detection Question
Post by: Builderboy on May 23, 2011, 12:55:01 pm
You would have to search through the VAT yourself, which isn't that hard, but you would have to ask someone more knowledgable than me, I don't remember the memory locations and all that jazz
Title: Re: Appvar Detection Question
Post by: aeTIos on May 23, 2011, 01:04:46 pm
Memkit? Memkit!
Title: Re: Appvar Detection Question
Post by: ztrumpet on May 23, 2011, 05:40:34 pm
Here's some interesting and relavent information: http://eeezor.ec3club.tk/Files/Resources/Tutorials/ASMin28Days/lesson/day21.html
Note that pTemp is 982Eh and progPtr is 9830h. :)