Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - FinaleTI

Pages: 1 ... 60 61 [62] 63 64 ... 126
916
Ooh, I didn't know that one.

I like Ctrl+Shift+I, because it auto-indents your code, which can be really helpful sometimes.

917
Other Calculators / Re: What do you prefer to program in on z80 calcs?
« on: December 13, 2010, 07:15:34 pm »
Hybrid BASIC and Axe for me. I'm pretty good with Pure BASIC, but I just love Hybrid.

918
I don't even know how to put graphic on java...
 :(
Me too.
I'd appreciate the example as well.

I'm using BlueJ too, but that's because what my AP Comp Sci class has to use. It really annoys me at times, though it's much less annoying since I figured out the keyboard shortcut for auto-indenting your class.

919
TI Z80 / Re: PapiJump
« on: December 13, 2010, 04:22:24 pm »
Sooo Addicting...

Anyway, this was a pretty fun game. Actually, I got bored at one point and tried to go up as far as I could only holding the right key.
I got a score of 5420 doing so, and I've scored >9000! a few times as well (playing normally).

920
Axe / Re: External Vars Tutorial
« on: December 12, 2010, 12:01:25 pm »
Does it show up properly now?

1) Appvars and Programs
Spoiler For Spoiler:
Appvars and programs have just about the same structure when accessed through Axe. They can have names up to 8 characters in length, that do not start with a number. Appvars can contain lowercase letters in their name, and while programs can, it is more common practice for them to have all uppercase names. This is because if a program contains lowercase letters in its name, it cannot be run from the homescreen.

To access an appvar:
Code: [Select]
GetCalc("appvAPPVAR")→PointerWhere 'APPVAR' is to be substituted with the name of the appvar you want to access, and Pointer is where you want the data to point to.
For example:
Code: [Select]
GetCalc("appvAPPVAR")→AThis stores the location in RAM of the appvar APPVAR to the pointer A. You can then access data in the appvar by using pointers as you normally would.
Code: [Select]
GetCalc("appvAPPVAR")→A
1→{A}
The code above would store 1 to the first byte of the appvar APPVAR.
The code above will only work if the appvar exists and is in the RAM.

Now, if your appvar doesn't exist, you can easily create it by adding a second argument to your GetCalc() command.
Code: [Select]
GetCalc("appvAPPVAR",Size)→PointerWhere Size is the size in bytes of the appvar you want to create.

If the appvar exists, but is in the archive, there are a number of things you can do.
You could unarchive it, but if you are only going to read data from it, this is not the best way to do it.
Code: [Select]
UnArchive "appvAPPVAR"Most of the time if you do this, you'll have to end up archiving it when you're done with it.
Code: [Select]
Archive "appvAPPVAR"This can take more and more time if you haven't GarbageCollected recently, though. However, this does allow you to save your data in the archive.

If you simply want to read data from an appvar, then you could copy it to a file.
Code: [Select]
GetCalc("appvAPPVAR",File)Where File is the token for a Y-Var (Y0-Y9).
as of Axe 0.4.6 using files is a little limited, but they are supposed to become more flexible in future versions.
Once the appvar is copied to a file, you can read from it like a pointer.
Code: [Select]
GetCalc("appvAPPVAR",Y0)
{Y0}→A
This would store the first byte of your appvar to the pointer A.

Once you no longer need an appvar, you can simply delete it.
Code: [Select]
DelVar "appvAPPVAR"This will only work if the appvar is in the RAM. If you copied your appvar to a file, you don't need to worry about deleting a file, as ending the program will take care of clearing the file for you. In addition, you can copy an appvar to a file that you previously used with no adverse effects.
Code: [Select]
GetCalc("appvAPPVAR",Y0)
GetCalc("appvAPPVAR2",Y0)
This would copy the appvar APPVAR to file Y0, then copy the appvar APPVAR2 to file Y0. Accessing file Y0 would then allow you to access the data in APPVAR2.

Please note that data cannot be stored to files, merely read from files.


Programs can be accessed exactly the same way as appvars, except that you use the 'prgm' token instead of the 'v' you get from [2nd]+[8] (which becomes 'appv' with the Axe Tokens).

2) Real Variables
Spoiler For Spoiler:
Accessing real vars is fairly easy to do, actually.
First, getting the pointer to a real var is:
Code: [Select]
GetCalc("varA")→PointerWhere A can be substituted with any real var, A-θ, and Pointer is the where you want the data to point to.

Now, the tricky part is accessing the data in a real var. Simply doing:
Code: [Select]
GetCalc("varA")→P
1→float{P}
will not give you proper results. In fact, it will render the variable A invalid until you overwrite it properly, whether inside or outside the Axe program.

The correct offset for accessing a real var is Pointer-2.
Code: [Select]
GetCalc("varA")→P
1→float{P-2}
This code will store one to the real var A, and you can see that now outside of the Axe program. You can store 0-65535 to real vars using Axe, as Axe only supports two byte numbers. Note: You don't need to put a r after the float command if you are storing a two byte number.
The 'var' token is the 'u' you get from [2nd]+[7] (it becomes 'var' with the Axe tokens).

921
Axe / External Vars Tutorial
« on: December 12, 2010, 11:25:22 am »

1) Appvars and Programs

Appvars and programs have just about the same structure when accessed through Axe. They can have names up to 8 characters in length, that do not start with a number. Appvars can contain lowercase letters in their name, and while programs can, it is more common practice for them to have all uppercase names. This is because if a program contains lowercase letters in its name, it cannot be run from the homescreen.

To access an appvar:

GetCalc("appvAPPVAR")→Pointer

Where 'APPVAR' is to be substituted with the name of the appvar you want to access, and Pointer is where you want the data to point to.
For example:

GetCalc("appvAPPVAR")→A

This stores the location in RAM of the appvar APPVAR to the pointer A. You can then access data in the appvar by using pointers as you normally would.

GetCalc("appvAPPVAR")→A
1→{A}


The code above would store 1 to the first byte of the appvar APPVAR.
The code above will only work if the appvar exists and is in the RAM.

Now, if your appvar doesn't exist, you can easily create it by adding a second argument to your GetCalc() command.

GetCalc("appvAPPVAR",Size)→Pointer

Where Size is the size in bytes of the appvar you want to create.

If the appvar exists, but is in the archive, there are a number of things you can do.
You could unarchive it, but if you are only going to read data from it, this is not the best way to do it.

UnArchive "appvAPPVAR"

Most of the time if you do this, you'll have to end up archiving it when you're done with it.

Archive "appvAPPVAR"

This can take more and more time if you haven't GarbageCollected recently, though. However, this does allow you to save your data in the archive.

If you simply want to read data from an archived appvar, then you could copy it to a file.

GetCalc("appvAPPVAR",File)

Where File is the token for a Y-Var (Y0-Y9).

Once the appvar is copied to a file, you can read from it like a pointer.

GetCalc("appvAPPVAR",Y0)
{Y0}→A


This would store the first byte of your appvar to the pointer A.

Once you no longer need an appvar, you can simply delete it.

DelVar "appvAPPVAR"

This will only work if the appvar is in the RAM. If you copied your appvar to a file, you don't need to worry about deleting a file, as ending the program will take care of clearing the file for you. In addition, you can copy an appvar to a file that you previously used with no adverse effects.

GetCalc("appvAPPVAR",Y0)
GetCalc("appvAPPVAR2",Y0)


This would copy the appvar APPVAR to file Y0, then copy the appvar APPVAR2 to file Y0. Accessing file Y0 would then allow you to access the data in APPVAR2.

Please note that data cannot be stored to files, merely read from files.


Programs can be accessed exactly the same way as appvars, except that you use the 'prgm' token instead of the 'v' you get from [2nd]+[8] (which becomes 'appv' with the Axe Tokens).




2) Real Variables

Accessing real vars is fairly easy to do, actually.
First, getting the pointer to a real var is:

GetCalc("varA")→Pointer

Where A can be substituted with any real var, A-θ, and Pointer is the where you want the data to point to.

Note: If you are using an older version of Axe (pre 0.5.3), then please read the below message. Otherwise, skip it, since it no longer applies, and real vars function like any other external var, pointer-wise.
Now, the tricky part is accessing the data in a real var. Simply doing:

GetCalc("varA")→P
1→float{P}


will not give you proper results. In fact, it will render the variable A invalid until you overwrite it properly, whether inside or outside the Axe program.

The correct offset for accessing a real var is Pointer-2. This is because currently (as of Axe 0.5.2) GetCalc() accounts for the size bytes of a variable, but real vars have no size bytes. Thus, the pointer is offset by 2. This may be fixed in future versions, but until that is stated, stick with Pointer-2 for real vars.

GetCalc("varA")→P
1→float{P-2}

End Note

For Axe 0.5.3 and later, the bug with size bytes always being accounted for no longer exists, so the following is the code you should use:

GetCalc("varA")→P
1→float{P}


This code will store one to the real var A, and you can see that now outside of the Axe program. You can store integers from 0-65535 to real vars using Axe, as Axe only supports two byte numbers. Note: You don't need to put a r after the float command if you are storing a two byte number.
The 'var' token is the 'u' you get from [2nd]+[7] (it becomes 'var' with the Axe tokens).




3) Strings

Strings are actually dealt with in the same way as programs and appvars, storage-wise. The only difference is how you access them.

If you want to use Str0-Str9, you simply use:

GetCalc("StrX")→Pointer

Where StrX is any token from Str0 to Str9. You can also create a string of a certain size by doing:

GetCalc("StrX", Size)→Pointer

Pretty simple, right?




4) Hacked variables

Now here's the fun begins. Say you don't want to touch Str0-Str9, but you need a String for whatever reason. Why not use a hacked variable? For those who don't know what a hacked variable is, the OS only includes the tokens for X amounts of vars, like 10 pictures, or 10 strings. But it actually supports up to 255 different pictures, strings, or whatever other var! These don't have tokens like Str99, so they will show up as a seemingly random token, that may look exactly like another token, but they serve a very different function. These hacked tokens function exactly the same as the normal ones. In Hybrid BASIC games, using hacked pictures is actually a fairly common procedure, since it allows for more graphics easily.

In order to use a hacked variable, it's not as straight forward as a normal one, but it's not really that difficult either. Just different.

For the purposes of this lesson, we'll be using Str1 as a static pointer for our hacked names, but you can just as easily place the data in the GetCalc() statement.

For example, the lesson will present the data like this:
[015D]"M"→Str1
GetCalc(Str1)→P


But you can just as easily do this:
GetCalc([015D]"M")→P
and it should still work correctly.

I've broken down the next section based on what type of var you're looking to use, so find it and read the section.

Hacked Pictures

So you wanna use a hacked picture? That's simple enough.
[0760]Data(#,0)→Str1
# here represents the number of the picture you want to use. Keep in mind that 0 is Pic1, 1 is Pic2, etc., with 10 being Pic0. 11 and up are the hacked pics, and they will use odd tokens to represent themselves in the memory menu.
Once you have your name, getting a pointer is as simple as:
GetCalc(Str1)→Pointer

And creating the picture is as simple as:
GetCalc(Str1, Size)→Pointer


Hacked Strings

Coming soon...






5) Accessing Arbitrary Variables (courtesy of squidgetx)

Copy("HI",L1+1,2)
0->{L1+3}
E15->{L1}
GetCalc(L1)->A

It does the same thing as GetCalc("appvHI")->A, but I'm sure you can think of many applications of this method instead (shells and mem readers come to mind). You can use 05 to get a program or 06 to get a protected program (instead of $15). Other prefixes you may be able to use are (taken from the SDK. also I haven't tested all of these and would be wary if you tried GetCalc'ing an application for example)
Data Types:
00h Real
01h List
02h Matrix
03h Equation
04h String
05h Program
06h Protected Program
07h Picture
08h Graph Database
0Bh New EQU  
0Ch Complex
0Dh Complex
14h Application
15h AppVar
17h Group

This could be taken as a little confusing, so let's break this down a little bit.


Copy("HI",L1+1,2)
This line copies the name of the variable (in this case, "HI") to L1+1.

0->{L1+3}
This line adds the null byte or terminating zero to the end of the name string starting at L1+1. Where 3 is would be the length of the variable name + 1.

E15->{L1}
This line stores the type byte of the variable to L1. In this case, it's denotating an appvar. The E means the number that follows is the hexadecimal equivalent, so any of the hex numbers from the above list would work here in place of the 15.

GetCalc(L1)->A
This uses the string you just constructed at the beginning of L1 to create the variable.



922
Ash: Phoenix / Re: Ash: Phoenix
« on: December 12, 2010, 11:11:23 am »
That's gotta suck.
[sarcasm]Rewriting the battle engine is loads of fun. Trust me. It's even more fun than writing it the first time.[/sarcasm]

Seriously though, good luck.

923
TI-BASIC / Re: How does this line of code work?
« on: December 11, 2010, 02:36:25 pm »
A third argument makes it create a list of trials, with the third argument being the dimensions of the list/number of trials.

924
Miscellaneous / Re: What is your avatar?
« on: December 11, 2010, 02:23:20 pm »
Changed. Again.
This time to Master Mage Clef from Magic Knight Rayearth.

925
TI-BASIC / Re: How does this line of code work?
« on: December 11, 2010, 02:00:19 pm »
That's an odd line.
From what I can see, unless Ans is a list, you get an error.
So 3:sum(2(Ans=3)+4(Ans=5) gives me an ERR:DATA TYPE, while {3}:sum(2(Ans=3)+4(Ans=5) gives me 2.
It would seem only the first list entry affects it though, as {3,2}:sum(2(Ans=3)+4(Ans=5) just returns 2.

926
TI Z80 / Re: Axe Raycaster
« on: December 11, 2010, 01:49:31 pm »

927
Gaming Discussion / Re: Professionalism in Calculator Game Playing
« on: December 11, 2010, 01:30:02 pm »
The most professional gaming I have done is explore the start of Rune Factory 1 (NDS) which such a frenzy that I am very close to the humanly possible best start without cheating. Playing it on emulator is better because you don't need to redo many parts.
I have restarted it 2 times but I need a 3rd to optimize some decisions and schedules. And sometimes I forgot to use some tricks like a spell that takes directly home instead of running and at some distances ehen the shortest action is obvious.

I have written all the details about this but never polished and retested for releasing. If someone likes Rune Factory I can post in Omnimaga.

I have done the same for Rune Factory 2 and is already an excellent start.
Now that Rune Factory 3 is out, I might try but some game mechanics changes will hinder the start, might be more challenging to me. And I am also waiting for a request guide that will give me hints about what is best to do first. In Rune Factory 2 I picked as first requests the ones who gave more money for buying seeds.

I have also experimented some TAS in Megaman Zero, it gives impressive movies of reflexes and blink of an eye moves during battles. If you TAS, Megaman Zero is almost a must in my opinion.
Maybe I should try TASing Zero 3, as I've A ranked straight through that game before (which is more than I can say for 1 and 2, which I haven't beat yet).

928
Humour and Jokes / Re: Ashbad Newsletter 1
« on: December 10, 2010, 09:45:36 pm »
T'was pretty lul worthy. I know it's supposed to be comedic, but please check grammar and spelling. Except of course in cases of intentional misspelling/ bad grammar. =)
Ashbad ++ = Ashbad
Ashbad++; || Ashbad += Ashbad;

Huzzah for Java!

929
TI Z80 / Re: Name help
« on: December 10, 2010, 09:42:23 pm »
I dunno.
I still like "The Tale of David's Epic Questing Journey", but that might be a bit too long as well.

930
Miscellaneous / Re: Taking a knowledge-filled leave of absence
« on: December 10, 2010, 09:05:24 pm »
Good luck.
I guess this means the cage match is off?
If not that's fine, but I'd like to know if I should keep Sky's Story on hold or not.

Pages: 1 ... 60 61 [62] 63 64 ... 126