Gaming Need Help With AR Code Making

  • Thread starter Thread starter blaytn
  • Start date Start date
  • Views Views 1,399
  • Replies Replies 7

blaytn

Member
Newcomer
Joined
May 6, 2009
Messages
7
Reaction score
0
Trophies
1
XP
22
Country
United States
Hey, I'm a newb with GBAtemp and IDK if the thread will get shut down, but I need help with AR code making. I know the basics from Curley's thread, but I need to know more. I especially need to know about pointers.
 
double thread?? -.-
ANOTHER EXAMPLE - POINTER

Here is a pointer example. The game that we will be using for this example will be Giana Sisters DS. What we will be doing here is that we will fill the "Red Crystals" that we currently have, to their total ( the total crystals address), without overfilling. Of course we could just find the current crystals address and input 999, but that would look weird (999/3 etc.).

First off, we will need to; find the addresses of the current and total crystals. Open up EMUCheat or whatever you use.

For the current address, you can simply input the number of crystals you currently have collected, and then collect more and search again etc. for example; if you have 1 crystal, search 1, when you get another, search 2, and so on, until you only get a few addresses, and then test them. If you did it correctly, you should have come up with (02)0A3012. For the total, you can just get onto a level, search the total number of crystals you need (3 etc.), jump onto another level with a higher or lower total (2 etc.) and search that, and then repeat until you get a few addresses. Alternatively, you could have just looked at the addresses when you were looking for the current crystals variable, and just changed one of them to change the total variable (which means they are right beside each other in memory). You should have came up with (02)0A3010.

Now that we've found those, we will start to build the code.

We need to set the offset value to our total crystals address, which means we will use the D3 code type. This will set the total crystals address as the internal "pointer" register.

D3000000 XXXXXXXX , XX being the address.

Next, we will need to copy memory (bytes), using the 0F code type, which works in conjunction with the code types (D3, DC or B) to set the offset beforehand. Doing this will copy the bytes specified, from the internal pointer register (0A3010 or the first line), to our current crystals address (0A3012).

FXXXXXXX YYYYYYYY , XX being the address (current crystals), and YY being the number of bytes to copy. We'll do only 1 byte, so 00000001.

And then, we finish off with the terminator D2000000 00000000, which clears AR's internal registers. If you followed correctly, the code should be:

D3000000 020A3010
F20A3012 00000001
D2000000 00000000

This means that it will copy only the total to the current variable, no more, no less. Test that out on hardware. Remember that no$gba isn't a proper AR, so it will not work there (will bring up a ?)

-anandjones
this one?
 
My Bad, I refreshed the page
rolleyes.gif
 

Site & Scene News

Popular threads in this forum