Before you can write an editor to hack a ROM, you must first know how to hack a ROM yourself. I would suggest you figure out how to do this by hand (with a hex editor) first. Then once you can do it that way, it should be obvious how to write an editor to do it.
Do you mean the number of lives the player starts with?
IIRC you start that game with 5 lives. This means that more than likely, there is a '05' byte that exists in the ROM to determine the number of starting lives. You'd need to figure out which byte that is. This can be done several different ways.
- Use a file corruption tool to change all '05's in a portion of the ROM to some other value, then run the game to see if the number of lives changes. Then narrow the range down appropriately until you figure out exactly which byte determines how many lives you start with.
- Do a CPU trace and examine the in-game code to find out where/how the program is setting the starting lives (I don't recommend this as it's probably overkill for this small hack -- and would be particularly difficult for a newbie)
- Since everything about SMW is pretty much already discovered, look at an existing source (like this page: http://www.smwcentral.net/?p=map&type=rom
) to find that the starting lives is at offset 0x02025 in a headered ROM.
Once you find this value... changing it "by hand" means getting a hex editor (I really like HxD: http://mh-nexus.de/en/hxd/
), going to the desired offset, and changing the value.
Making an editor that changes this value involves opening the file (as binary, not as text), seeking to the desired offset, reading the byte (if you want to display it's original value), or writing it (if you want to change it), then closing the file.