View Single Post
  #7    
Old August 6th, 2010, 08:16 PM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Well, I know this isn't right, because it didn't work, and I'm still an ASM-newb, but my thinking was that you would load the "sanity byte" of, say, the first Pokemon in your party, and either subtract 1 or add 1 to it. I kind of figured the sanity byte would start at 0x0 or 0x1 and need to have a byte removed or added to make the Pokemon disobey. So I tried a very basic routine, going off of HackMew's Secret ID example in his tutorial:

Code:
.text
.align 2
.thumb
.thumb_func
.global lesson1

main:
	push {r0, lr}
	ldr r0, .POKE_DATA
	ldr r0, [r0]
	ldrb r0, [r0, #0x13]
	sub r0, #0x1
	pop {r0, pc}


.align 2
.POKE_DATA:
	.word 0x02024284
And then I tried this:

Code:
.text
.align 2
.thumb
.thumb_func
.global lesson1

main:
	push {r0-r1, lr}
	ldr r0, .POKE_DATA
	ldr r0, [r0]
	ldrb r0, [r0, #0x13]
	mov r1, #0x1
	strb r1, [r0]
	pop {r0-r1, pc}


.align 2
.POKE_DATA:
	.word 0x02024284
In an attempt to simply change the byte itself to 0x0 or 0x1, but that didn't work either.

I know it's not correct, but any advice on where to go from this, or if I should be going in a completely different direction. I might have to do something a lot more complicated that I'm not capable of yet ...
__________________
Reply With Quote