Thread: [Tutorial] HackMew's Knowledge
View Single Post
Old July 28th, 2010 (10:53 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
  • Crystal Tier
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,590
Originally Posted by FlameShocker View Post
I was wondering, is the
     .word 0x020270B6 + (0x800D * 2)
in the ASM code in lesson 1 for the buffer part of the script? I don't know since I'm still new to assembly and scripting. The main reason I'm asking is because I'd like to know how I can modify the .word portion. Additionally, what is the
+ (0x800D * 2)

Edit: One thing I forgot to mention: I'm hacking Fire Red.

I found out that 0x800D is the buffer (yay, scripting tutorials), but what's the times 2 thing for?

Also, what does address 0x020270B6 do (in Fire Red)?
That is the address of the variable '0x800D' (more commonly known as 'LASTRESULT') in the WRAM. The reason that "+ (0x800D * 2)" is appended to the main '0x020270B6' part is that if you multiply 0x800D by 2 and then add it to the main part, you get '0x020370D0' which is the actual address of '0x800D'. HackMew formatted it that way for convenience. If you wanted to use variable '0x8004' instead, all you have to do is change '0x800D' to '0x8004'. Otherwise, you'd have to calculate what address '0x8004' is at and that's just no fun.

Brother of Vrai
Reply With Quote