View Single Post
  #16    
Old August 7th, 2010 (10:14 AM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 669
Quote originally posted by colcolstyles:
Oh wow. When I looked at your routines earlier, I just skimmed over them real briefly and then pointed out the first error that I saw. There are a bunch more too.

First of all, the first routine does absolutely nothing. It loads a byte from some address, subtracts one from it... and then restores the previous condition without changing anything. As for the second routine, if all you're trying to do is store '0x01' at '0x02024284', then all you need is the following (excluding push and pop):
Code:
ldr r0, .POKE_DATA
mov r1, #0x01
strb r1, [r0, #0x00]
Before, you weren't actually writing to the POKE_DATA. That's why you didn't notice any change.

Also, it was my understanding that a Pokémon was deemed an egg by setting one of the top two bits in the IV word. I could be mistaken, though.
Well, yeah, I did mention that I'm an ASM-newb, right?

But no, I'm not storing 0x0 at that offset. That's only the beginning of the offset for the first Pokemon's data. I need to store it where the sanity byte is, which is (if I'm understanding correctly) 19 bytes (13 in hex) after that, which is why I had "ldrb r0, [r0, #0x13]" there.
__________________
Reply With Quote