Mario RPG SA1 Coding
I finally tracked down the area in ROM that controls the distance yoshi runs once fed a cookie. I ended up stepping through rom until the address was initially loaded with the value used, and had SA1 logging on to get the info(but I also had to run through pointless CPU code a lot to see that it had nothing to do with writing the value). I used the addresses referenced to make a non-dangerous code to allow yoshi to win races with 1 cookie.
Someone else may also have a use for this information, either directly, or for information on how things get stored to memory by the SA1 in this game, so I'm posting the relavent information I found.
$C0:CA56 F0 33 BEQ $33 [$CA8B] A:0017 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envMxdizC HC:502 VC:019
$C0:CA58 C2 20 REP #$20 A:0017 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envMxdizC HC:502 VC:019
-----Start Value Loading Code-----
$C0:CA5A A5 74 LDA $74 [$00:0074] A:0017 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envmxdizC HC:532 VC:019
$C0:CA5C 95 2A STA $2A,x [$00:602A] A:0300 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envmxdizC HC:532 VC:019
-----End Value Loading Code-----
$C0:CA5E A5 76 LDA $76 [$00:0076] A:0300 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envmxdizC HC:532 VC:019
$C0:CA60 95 2C STA $2C,x [$00:602C] A:0002 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envmxdizC HC:562 VC:019
$C0:CA62 A5 78 LDA $78 [$00:0078] A:0002 X:6000 Y:5F88 D:0000 DB:00 S:07F9 P:envmxdizC HC:562 VC:019
--------------------
I searched for the $75 address in my log file, and found the following:
$C0:CE4F C8 INY A:00AE X:00AE Y:5F86 D:0000 DB:E1 S:07F6 P:envMxdizc HC:046 VC:019
$C0:CE50 7C B1 EE JMP ($EEB1,x)[$C0:D99B] A:00AE X:00AE Y:5F87 D:0000 DB:E1 S:07F6 P:envMxdizc HC:046 VC:019
-----Start $74 Value Loading Code-----
$C0:D99B B9 00 00 LDA $0000,y[$E1:5F87] A:00AE X:00AE Y:5F87 D:0000 DB:E1 S:07F6 P:envMxdizc HC:076 VC:019
$C0:D99E C8 INY A:0003 X:00AE Y:5F87 D:0000 DB:E1 S:07F6 P:envMxdizc HC:076 VC:019
$C0:D99F 80 04 BRA $04 [$D9A5] A:0003 X:00AE Y:5F88 D:0000 DB:E1 S:07F6 P:envMxdizc HC:076 VC:019
$C0:D9A5 85 75 STA $75 [$00:0075] A:0003 X:00AE Y:5F88 D:0000 DB:E1 S:07F6 P:envMxdizc HC:106 VC:019
$C0:D9A7 64 74 STZ $74 [$00:0074] A:0003 X:00AE Y:5F88 D:0000 DB:E1 S:07F6 P:envMxdizc HC:106 VC:019
-----End $74 Value Loading Code-----
$C0:D9A9 80 21 BRA $21 [$D9CC] A:0003 X:00AE Y:5F88 D:0000 DB:E1 S:07F6 P:envMxdizc HC:106 VC:019
$C0:D9CC A6 7E LDX $7E [$00:007E] A:0003 X:00AE Y:5F88 D:0000 DB:E1 S:07F6 P:envMxdizc HC:136 VC:019
$C0:D9CE A5 70 LDA $70 [$00:0070] A:0003 X:6000 Y:5F88 D:0000 DB:E1 S:07F6 P:envMxdizc HC:136 VC:019
--------------------
All of this effort led to me finding the following address in the code noted above:
E15F8713:Always Speed to Finish Line with 1 Cookie
The 13 value is a trial-and-error value I found that lets you win from the starting line. You can also safely use it if you're right before the finish line.
Also, when it writes to address $00:602A, the data modified is at 40202A. This makes it so one could possibly use SA1 logging to capture a large amount of operations, and search for a relative value that gets written.
This reality is mine. Go hallucinate your own.