Author Topic: A little help  (Read 27729 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
A little help
« on: April 07, 2010, 12:07:25 pm »
I am redesigning my Pokemon battle simulator, using Axe. So I have a few questions.

1. How do I use commands like GridOff and AxesOff in Axe.

2. Once I create an AppVar, how do I store data into it? And how do I recall data from it?

3. And are screen parameter vars, like Xmax supported?

And I may have more as I go on.
« Last Edit: April 07, 2010, 12:09:03 pm by ACagliano »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A little help
« Reply #1 on: April 07, 2010, 12:14:17 pm »
I haven't messed with 2, but for 1 and 3, you don't need to change Windows settings at all. Axe doesn't use them to draw graphics. Everything is pixel by pixel. Like when using xLIB, you would just need to erase the graph buffer then update the LCD content through Axe commands.

ClrDraw
DispGraph
« Last Edit: April 07, 2010, 12:14:44 pm by DJ Omnimaga »

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A little help
« Reply #2 on: April 07, 2010, 12:17:35 pm »
Ok. Fair enough. And what about text commands. If I wanted to display simple text on the homescreen, how would i do it.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: A little help
« Reply #3 on: April 07, 2010, 12:19:00 pm »
Ok. Fair enough. And what about text commands. If I wanted to display simple text on the homescreen, how would i do it.
I'm pretty sure this info is in the Axe documentation
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A little help
« Reply #4 on: April 07, 2010, 12:20:05 pm »
I didnt understand it, but never mind.





What about storing and recalling to and from appvars. The documentation tells u how to create/remove/select/ and archive/dearchive but i dont believe how to actually store data to them.

And I'm having problems: here is my test code.

ClrHome
Fix 4
Output(1,1,POKEMON
Pause 1000

When I compile this, it displays nothing.

EDIT by DJ Omnimaga: merged close double-posts (there were under 6 hours)
« Last Edit: April 07, 2010, 12:42:16 pm by DJ Omnimaga »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A little help
« Reply #5 on: April 07, 2010, 12:44:03 pm »
I'm not too sure if Output can be used this way. If I remember, you had to store the text to a pointer like Str1 then do Output(1,1,Str1. Also I am not sure if Fix works with Output. I think it was just Text (graph screen).

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A little help
« Reply #6 on: April 07, 2010, 12:48:12 pm »
This worked...

Output(0,0,"Pokemon
With no closing Quote (Err: Bad Symbol) or Closing Parenthasis (the parenthasis is displayed)


Can an Axe Parser program archive itself?
« Last Edit: April 07, 2010, 01:05:42 pm by ACagliano »

SirCmpwn

  • Guest
Re: A little help
« Reply #7 on: April 07, 2010, 01:09:19 pm »
Can an Axe Parser program archive itself?

Yes.  Technically, it is not running the actual program, but a copy of the actual program, so you can archive it.  You just need assembly routines.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A little help
« Reply #8 on: April 07, 2010, 01:13:40 pm »
Now, I am trying to test for the presence of the program's storing appvar (POKE). Now, the documentation says GetCalc() returns 0 if not found OR Archived. How do I determine which so the program can enter install if not found, or just unarchive if archived.

And how do I store data to the appvar and recall it later.
« Last Edit: April 07, 2010, 01:30:42 pm by ACagliano »

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: A little help
« Reply #9 on: April 07, 2010, 02:11:55 pm »
After you select the name of the appvar, immediately unarchive it.  Then, when you try to do getCalc() you're sure that if it existed, its definitely in RAM and so it only returns 0 if it doesn't exist.

To write data, you have to store the pointer that is returned by getCalc() either into a variable or in RAM.  Then you read and write to that location as if it were any other RAM location.  The same way you would do 100->{L1+6}  You can do 100->{A+6} if you stored the appvar pointer to A.
« Last Edit: April 07, 2010, 02:14:18 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A little help
« Reply #10 on: April 07, 2010, 02:15:04 pm »
After you select the name of the appvar, immediately unarchive it.  Then, when you try to do getCalc() you're sure that if it existed, its definitely in RAM and so it only returns 0 if it doesn't exist.

To write data, you have to store the pointer that is returned by getCalc() either in a variable or in RAM.  Then you read and write to that location as if it were any other RAM location.  The same way you would do 100->{L1+6}  You can do 100->{A+6} if you stored the appvar pointer to A.

Thank you. So much. I was having a migraine. But, if I run unarchive on an Appvar, it wont throw an error if it doesnt exist?

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: A little help
« Reply #11 on: April 07, 2010, 02:18:32 pm »
Nope.  Just nothing happens.

Oh wait a minute!  I forgot to document that!  The Archive/Unarchive command returns 1 if it actually performed an unarchive/archive and 0 otherwise.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: A little help
« Reply #12 on: April 07, 2010, 02:21:39 pm »
Ok. Cool. I should be pretty set now, outside of a few questions about sprites:

Is it possible to do a larger than an 8x8 sprite, using the current commands?

And, if I need to write data to a memory location where the integer is larger than 255, it gets more complex. What is the procedure for that?

Edit: And What are the getKey codes Axe uses.
« Last Edit: April 07, 2010, 02:47:21 pm by ACagliano »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A little help
« Reply #13 on: April 07, 2010, 02:53:58 pm »
Can an Axe Parser program archive itself?

Yes.  Technically, it is not running the actual program, but a copy of the actual program, so you can archive it.  You just need assembly routines.
I assume to do this Axe uses some of the hidden 8 KB of RAM on the 83+, right? (The calc has 32 KB of RAM but only 24 is avaliable to the user)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: A little help
« Reply #14 on: April 07, 2010, 05:35:17 pm »
I believe to do anything larger than 8x8 sprites (up to 16x16, I think) you have to use routines which there is one provided by Quigibo and one other person who's name escapes me, I'll find those in a second. But I'm fairly sure there is no command supporting larger than 8x8 (I may be wrong though).

As for the getKey commands, I'm pretty sure they are the same as xLib. DJ posted something I think, I'll find that too.


Ok, so I searched and found the two routines showing how to display larger sprites (Up to 16x16, I think. I don't know exactly the size limit) by Quigibo here and LordConiupiter here (the post that actually shows it though this one that DJ posted; LordConiupiter's post just provides the download)

In regards of the getKey commands. I was correct in saying they are the same as xLib. Here is the post DJ made about them.
« Last Edit: April 07, 2010, 05:50:55 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)