That's because that address is temporary, it is only in the NES memory (it's not called RAM, thanks Disch
), not the ROM. You need to scroll on the debugger and see where it passed the value in the ROM to memory address $0736.
Or better yet, do this: reset the game, go to the title screen and set a breakpoint looking for writes
to $0736. Then press start. You will maybe come accross a LDA instruction that gets a value from ROM and loads to the accumulator, and then on the next line it stores that value to the memory address you've found (using STA). Then you right click on the left to the debugger (there's an empty column on the left that doesn't look like much) at the line that loads it and edit the value in the hex editor that will pop up (in this case it would be two bytes A9 03 if it's 3 lives). Make sure to only edit the 03 as the A9 is the LDA instruction. Then reset the game again, turn off the breakpoint, press start and see if it changed it. That is assuming this is how the game does it, I'm just guessing.
edit: I tested it here. The method works, but it passes the 04 lives when you turn on the game, not when you press start. So set the breakpoint, hit reset. First it writes 00 to it twice, so you click "run" to see the next write. Sure enough, the third write is it. Rom address $308E1.
0C:A8D0:A9 04 LDA #$04
0C:A8D2:8D 36 07 STA $0736 = #$00
#$00 shows the value currently in $0736. If you click "step into" it will execute the line and it will show = #$04 there.
You will notice that values bigger than $63 are reset to $63 in the game. That's because the game has logic to not allow more than 99 lives.
Something that is not really clear is that the first time you open the hex editor in fceux it is showing only Nes memory
. You need to click view and change it to ROM. Only edits to the ROM are permanent.