I want to apply the "Enemy Luck", "Status Effect to Weaponry" and "Personal Music" to my hack and my question is: Do these patches overwrite a lot of data? And if they do, in which offsets do they put the data?
Also, is it possible to repoint the offsets to don't overwrite other data and how to do it?
ASM Patches
Started by
Mikey Séregon
, Aug 01 2012 04:25 PM
3 replies to this topic
#1
Posted 01 August 2012 - 04:25 PM
#2
Posted 01 August 2012 - 04:44 PM
i can't tell you about the 'enemy luck' patch since it's in a different format from mine but i'd imagine it's tiny
the other two were made by me and it's pretty easy to figure out both
first of all, asm patches are usually miniscule, since most routines can be fit in less than ~0x180 bytes. secondly, they usually alter existing routines. most of mine, for example, use up little to zero free space.
[edit]
actually some of my patches use negative free space (that is, they're smaller than the original routine)
that being said you get like
0xC (12) bytes out of it so it's not worth much
[/edit]
however, the format of the patch is as follows:
if you use the .dmp versions of the patch, open it up in a hex editor.

that is the entirety of the "status swords" patch. First of all, you can't repoint this without doing some asm fiddling of your own because it overwrites a routine already.
00 00 00 08 9C 93 02 08 00 00 00 00 10 01 00 00
all of the following are in little endian
red: hardware offset - usually always 0x08000000
blue: address to write to - should be in pointer form (in this case it's 0x0802939C, which is the location of the battle routine)
green: size - in this case 0x0110 bytes
the next [size] bytes of the file are the exact hex of the data written; you could in theory do this with a hex editor.
hopefully i've made things clear enough
the other two were made by me and it's pretty easy to figure out both
first of all, asm patches are usually miniscule, since most routines can be fit in less than ~0x180 bytes. secondly, they usually alter existing routines. most of mine, for example, use up little to zero free space.
[edit]
actually some of my patches use negative free space (that is, they're smaller than the original routine)
that being said you get like
0xC (12) bytes out of it so it's not worth much
[/edit]
however, the format of the patch is as follows:
if you use the .dmp versions of the patch, open it up in a hex editor.

that is the entirety of the "status swords" patch. First of all, you can't repoint this without doing some asm fiddling of your own because it overwrites a routine already.
00 00 00 08 9C 93 02 08 00 00 00 00 10 01 00 00
all of the following are in little endian
red: hardware offset - usually always 0x08000000
blue: address to write to - should be in pointer form (in this case it's 0x0802939C, which is the location of the battle routine)
green: size - in this case 0x0110 bytes
the next [size] bytes of the file are the exact hex of the data written; you could in theory do this with a hex editor.
hopefully i've made things clear enough
Edited by CT075, 01 August 2012 - 05:42 PM.
#3
Posted 01 August 2012 - 05:43 PM
Now I know how kinda ASM works... more or less XD, but I thought those patches had data that were placed in somewhere and then it was used by repointing offsets...
I was wrong XD
So, there's no problem in apply them, right?
I was wrong XD
So, there's no problem in apply them, right?
#4
Posted 01 August 2012 - 05:48 PM
that depends
some people prefer to repoint
i generally prefer to just rewrite the original routine entirely
some people prefer to repoint
i generally prefer to just rewrite the original routine entirely
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users










