So you want to make a hex edit, but oh no! Your hex editor doesn't support these new addresses in the ROM map! What to do?
Well, probably the best solution is to use patches. You could use Lunar Address to convert the SNES ROM addresses to PC and edit with a hex editor as you usually would, but using patches is easier and more convenient! For instance, if you ever need to port to a new ROM, you don't need to remember all the hex edits you did and do them one by one - just run Asar and they're all instantly in!
Now, let's dive in. This is the basic format:
The SNES address should replace the X, while the byte you're replacing it with will be Y.
So let's say we want to change how many lives the player starts with from 5 to 10. Simple; the address is $009E25 and the byte we want is 09. So:
It's that simple!
But what if you have several consecutive bytes you want to change? Let's grab another example.
The obvious solution would be a long string of orgs and dbs, but you can also do this:
And there you go!
And, as a final point, you can add comments that won't affect the edits themselves. Simply add a semicolon (;) at the end of a line and type away. For instance:
And that's it! It's not terribly difficult once you get the hang of it, and can end up saving you a lot of time if you ever need to port to a new ROM. And once you get really good at it, it can even save time compared to using a hex editor at all!
If I'm unclear at any point in this post, or if i made a mistake, or if anything else - just post here! I'll get it fixed ASAP.
Well, probably the best solution is to use patches. You could use Lunar Address to convert the SNES ROM addresses to PC and edit with a hex editor as you usually would, but using patches is easier and more convenient! For instance, if you ever need to port to a new ROM, you don't need to remember all the hex edits you did and do them one by one - just run Asar and they're all instantly in!
Now, let's dive in. This is the basic format:
Code
org $XXXXXX db $YY
The SNES address should replace the X, while the byte you're replacing it with will be Y.
So let's say we want to change how many lives the player starts with from 5 to 10. Simple; the address is $009E25 and the byte we want is 09. So:
Code
org $009E25 db $09
It's that simple!
But what if you have several consecutive bytes you want to change? Let's grab another example.
Quote
$029347 3 bytes ASM Change to [20 E2 FF], and change $02FFE2 from FF FF FF FF FF to A9 02 4C BA 91, to fix the glitch where placing a coin above a ? block or turn block will cause the coin to leave behind an invisible solid block if the block below is hit.
The obvious solution would be a long string of orgs and dbs, but you can also do this:
Code
org $029347 db $20,$E2,$FF org $02FFE2 db $A9,$02,$4C,$BA,$91
And there you go!
And, as a final point, you can add comments that won't affect the edits themselves. Simply add a semicolon (;) at the end of a line and type away. For instance:
Code
org $009E25 db $09 ;start with 10 lives
And that's it! It's not terribly difficult once you get the hang of it, and can end up saving you a lot of time if you ever need to port to a new ROM. And once you get really good at it, it can even save time compared to using a hex editor at all!
If I'm unclear at any point in this post, or if i made a mistake, or if anything else - just post here! I'll get it fixed ASAP.