Hi,
The RAM address for the number of lives stored in Double Dragon for the Nintendo NES is at $0043. Using that as a breakpoint, there are two zero-page instructions which point to this RAM address, one after the other:
$E6D1:C6 43 - DEC $43
$E6D3:A5 43 - LDA $43
The LDA address that follows this and which points to the same RAM address as the preceding DEC instruction is a zero-page address. And because it is a zero-page address as opposed to the absolute DEC address that Super Mario Bros. uses to store Mario or Luigi's lives. That code is:
$9068:A9 02 - LDA #$02 (immediate; give each player three lives at start)
$91D9:CE 5A 07 - DEC $075A (take one life away from player if player dies)
To get infinite lives for Super Mario Bros., change the DEC instruction to an absolute LDA instruction (change byte $CE to $AD). But I don't know how to do it for Double Dragon, since both are zero-page instructions, and to have two consecutive zero-page LDA instructions ... well, what do you guys think?
Of course, in the end I may be right on my assertion. The resulting code I got to use with a Game Genie is SXSTPTVG (which is at $E6D1 (or 0x66E1), and replacing bit $C6 with $A5, and using the previous value as a comparison value. Using this code, although your player appears to have two lives in reserve (three total) as normal, when you die, the number of lives doesn't go down, thus infinite lives.
~Ben
The RAM address for the number of lives stored in Double Dragon for the Nintendo NES is at $0043. Using that as a breakpoint, there are two zero-page instructions which point to this RAM address, one after the other:
$E6D1:C6 43 - DEC $43
$E6D3:A5 43 - LDA $43
The LDA address that follows this and which points to the same RAM address as the preceding DEC instruction is a zero-page address. And because it is a zero-page address as opposed to the absolute DEC address that Super Mario Bros. uses to store Mario or Luigi's lives. That code is:
$9068:A9 02 - LDA #$02 (immediate; give each player three lives at start)
$91D9:CE 5A 07 - DEC $075A (take one life away from player if player dies)
To get infinite lives for Super Mario Bros., change the DEC instruction to an absolute LDA instruction (change byte $CE to $AD). But I don't know how to do it for Double Dragon, since both are zero-page instructions, and to have two consecutive zero-page LDA instructions ... well, what do you guys think?
Of course, in the end I may be right on my assertion. The resulting code I got to use with a Game Genie is SXSTPTVG (which is at $E6D1 (or 0x66E1), and replacing bit $C6 with $A5, and using the previous value as a comparison value. Using this code, although your player appears to have two lives in reserve (three total) as normal, when you die, the number of lives doesn't go down, thus infinite lives.
~Ben

Comment