Thank you for taking the time to review my code, I saw you helped another member to get his code right on Mother 3
Q:I don't see you are using 068F in your code, so why bother with it having 00?
A: I am not changing this value I saw that this ram address change to 00 whenever the bug
is triggered, on its normal state it should only store the player facing value
Q: Why are you comparing 05A6 to FF if 55 is null?
A: Sorry, this ram address null value is FF not 55 I will modify my post
UPDATED see modified OP post
Q: Why at 8D0A and 8D13 are you branching only 2 bytes ahead? And I'm pretty sure these
branches conditions should be reversed
A: Because I didn't wrote the full code, only the part that the debugger executed if I
pressed Start button and the conditions were met, but the full code contains a jump to
the end of the custom routine in both places if both checks failed
UPDATED see modified OP post
Q: Is there a reason you are not showing us instructions at 8D0C and 8D15?
A: Not really, I will modify my post to contain those jumps to better illustrate the code,
I was being lazy, sorry, because it was 2am here
UPDATED see modified OP post
Q: Why do you think you need to spam start button to execute your code?
A: Its a fail safe check, on ideal circumstances the code shouldn't be executed if the
running state is set, I guess I need some check somewhere to made the code jump to the
end if set but I tried CMP for 8A to ram address 0132 but it didn't work
Q: Can you show more of original code around 8D01?
A: Sure:
...
$00/8B51 95 00 STA $00,x [$00:0000] A:0030 X:0000 Y:00FF P:envmxdIzC
$00/8B53 CA DEX A:0030 X:0000 Y:00FF P:envmxdIzC
$00/8B54 CA DEX A:0030 X:FFFF Y:00FF P:eNvmxdIzC
$00/8B55 10 F9 BPL $F9 [$8B50] A:0030 X:FFFE Y:00FF P:eNvmxdIzC
$00/8B57 C2 30 REP #$30 A:0030 X:FFFE Y:00FF P:eNvmxdIzC
$00/8B59 AB PLB A:0030 X:FFFE Y:00FF P:eNvmxdIzC
$00/8B5A 2B PLD A:0030 X:FFFE Y:00FF P:envmxdIZC
$00/8B5B 7A PLY A:0030 X:FFFE Y:00FF P:envmxdIZC
$00/8B5C FA PLX A:0030 X:FFFE Y:00AC P:envmxdIzC
$00/8B5D 68 PLA A:0030 X:00FF Y:00AC P:envmxdIzC
$00/8B5E 28 PLP A:0080 X:00FF Y:00AC P:envmxdIzC
$00/8B5F 40 RTI A:0080 X:00FF Y:00AC P:eNvMXdIzc
$00/8CF4 30 FC BMI $FC [$8CF2] A:0080 X:00FF Y:00AC P:eNvMXdizc
$00/8CF2 24 5E BIT $5E [$00:005E] A:0080 X:00FF Y:00AC P:eNvMXdizc
$00/8CF4 30 FC BMI $FC [$8CF2] A:0080 X:00FF Y:00AC P:envMXdiZc
$00/8CF6 64 5C STZ $5C [$00:005C] A:0080 X:00FF Y:00AC P:envMXdiZc
$00/8CF8 A5 94 LDA $94 [$00:0094] A:0080 X:00FF Y:00AC P:envMXdiZc
$00/8CFA 29 08 AND #$08 A:0000 X:00FF Y:00AC P:envMXdiZc
$00/8CFC D0 39 BNE $39 [$8D37] A:0000 X:00FF Y:00AC P:envMXdiZc
$00/8CFE AD B5 1E LDA $1EB5 [$00:1EB5] A:0000 X:00FF Y:00AC P:envMXdiZc
$00/8D01 29 10 AND #$10 A:0000 X:00FF Y:00AC P:envMXdiZc
$00/8D03 F0 32 BEQ $32 [$8D37] A:0000 X:00FF Y:00AC P:envMXdiZc
--- I NOPed this section and replaced with my custom code, original code contains the routine to show the Pause screen, but in this example this section is skipped because I didn't pressed Start ---
$00/8D37 22 93 8D 1E JSL $1E8D93[$1E:8D93] A:0000 X:00FF Y:00AC P:envMXdiZc
This is the default routine as if Start hasn't been press