Thread: [Tutorial] HackMew's Knowledge
View Single Post
  #39    
Old July 7th, 2009, 09:15 AM
-DarK-
Hold Your Colour
 
Join Date: Jun 2007
Location: Belgium
Age: 21
Gender: Male
Nature: Brave
Send a message via Windows Live Messenger to -DarK-
Quote:
Originally Posted by HackMew View Post
That's just because you screwed up your ROM. Remember you can't simple insert the new routine pasting it somewhere. That way, you increase the ROM size and screw up all the data after because the pointer will be mostly broken. So, when pasting, make sure to overwrite the right amount of space.
Ah thank you, it worked. I thought bytes were overwrited already when you just pasted it.

EDIT: Ok, I tried something out, but it didn't work:

Spoiler:
.text
.align 2
.thumb
.thumb_func
.global test1

main:
push {r0-r1, lr}
ldr r0, .WILD_NEW
ldr r0, [r0]
ldr r1, .WILD_DATA
ldrh r0, [r0, #0x8]
strh r0, [r1]
pop {r0-r1, pc}

.align 2
.WILD_NEW:
.word 0x00810000
.WILD_DATA:
.word 0x003C8F00



I tried using this to change wild data for Route 1. The first rattata in the list was supposed to be changed to an arbok, but it didn't work, so it seems. I kept encountering the usual pidgey's and rattata's (tried around 20 - 30 encouters, didn't find it).

Here's my script (a simple lvl script):

Code:
#dynamic 0x800000

#org @start
checkflag 0x201
if b_true goto @stop
callasm 0x810009
setflag 0x201
end

#org @stop
end
I'm new to ASM, and I'm not sure what I missed out, so can someone help?

Last edited by -DarK-; July 7th, 2009 at 12:21 PM.