-
Posts
79 -
Joined
-
Last visited
-
Days Won
28
Content Type
Profiles
Forums
Events
Everything posted by McMarkis
-
NHL '94: Wide Display Mode (“widescreen”) Hack v2.0
McMarkis replied to AdamCatalyst's topic in Sega Hacking Projects
In your Wide Mode ROM @ Location 1601A if you modify 54 40 to 56 40, this will move the ref window to the right. The original 68k instruction is adding decimal value 2 to the D0 register. So changing the 54 to 56 adds #3 to D0 etc. add #2,d0 I think the text overlay may be a little more tricky. Still looking into that. For reference, if anyone else comes across this, the routine is located in the 92 source code under showref, which is part of video.asm @chaos -
NHL '94: Wide Display Mode (“widescreen”) Hack v2.0
McMarkis replied to AdamCatalyst's topic in Sega Hacking Projects
In your Wide Mode ROM at location FB5E, the instruction currently sets the X position for when the faceoff window is on the left side. The current calculation is #8 + 46, d0 (Left side). By changing 70 36 to 70 40, it modifies the calculation to #8 + 46 + 10, which moves the window 10 units to the right. Similarly, at location FB68, the X position is set for when the faceoff window is on the right side. The current calculation is #(18 * 8 ) + 46, d0 (Right side). Changing 303C 00BE to 303C 00B4 adjusts the calculation to #(18 * 8 ) + 46 - 10, shifting the window 10 units to the left. That should allow you to move the window around anywhere you want in any direction. For reference, if anyone else comes across this, the routine is located in the 92 source code under puckfaceoff2, which is part of logic.asm -
NHL '94: Wide Display Mode (“widescreen”) Hack v2.0
McMarkis replied to AdamCatalyst's topic in Sega Hacking Projects
I found it in the 92 code, I can move the whole faceoff window over. The bad news is it just adds to x, so it will always push it right. Is that what you wanted? I still have to map it to the 94 code where its happening. But progress -
NHL '94: Wide Display Mode (“widescreen”) Hack v2.0
McMarkis replied to AdamCatalyst's topic in Sega Hacking Projects
For item 2: Medium Priority. Face-Off overlay (right side) appears in the wrong spot. Could you point out where in the code you think this is happening? I can then review the '92 source code, make some adjustments, and test how they affect it, with the goal of mapping it to '94 so you can fix this. -
NHL '94: Wide Display Mode (“widescreen”) Hack v2.0
McMarkis replied to AdamCatalyst's topic in Sega Hacking Projects
Looks good, you hijack the original code, point to new code, run the original code + the hack. Looks like the hack is setting the VDP to change the screen resolution. I'm no expert either, just started picking on the gens side of things. 33FC 8C00 00C0 0004 4EF9 0001 20D6 4E75 -
NHL '94: Wide Display Mode (“widescreen”) Hack v2.0
McMarkis replied to AdamCatalyst's topic in Sega Hacking Projects
Can you help me find where the Penalty Call Sideboards view is initiated? Try location 120C8 in your Wide mode rom. I know this line of code calls the Set Horizontal method when a penalty is called. Feel free to message me on discord as well to discuss. -Mark. -
Compiling 'NHL Hockey' Source Code Happy to share that the 'NHL Hockey' (92) source code now compiles successfully. The code is available on my GitHub repository—enjoy exploring and building upon it! Community discoveries and tools are welcome and will be added to the repository for everyone’s benefit. Please feel free to share suggestions, report issues, or submit pull requests! For convenience, you can simply download the zip file and run the included build.bat file. Technical Info For those interested, below is some more detailed info on what was needed to get the code compiling. The original compiler used to build the source code was not included, so a different compiler ASM68k was used to compile the source. Each compiler is different and makes decisions / optimizations based on the opcode. IE move vs moveq vs move.l specific changes were needed. The included Macros needed to be written differently to work with this compiler. Custom Hex Macro needed to be written. Math: Power of 2 was not supported and needed to be re-written. RSSET was needed to create symbol definitions without generating data. DS. vs RS. Globals weren't needed Parent labels were needed in some instances were calculations were being performed on local labels Used the original symbols file and bin file to compare opcodes and ram locations. 99.91% match now Findings From Source TBD - Will update with info as it comes in. Such as file formats etc.
-
HOW TO: Save + Show Body Checks Per Player [SNES]
McMarkis replied to McMarkis's topic in How-To & Reference
NERD Notes: Had to steal some RAM from the Penalty Summary Ram Map. Left enough room for 20 penalties. Highest ever recorded was 14 penalties. There is a "Checks For" RAM Map of 52 bytes starting at Wram address 168E. First 26 bytes for home team, next 26 bytes for away team. Each byte is associated with the Roster Index # for the player. IE: If Chicago was the home team; 168E = Belfour, 168F = Waite, 1690 = Roenick... If Pittsburgh was the away team. 16A8 = Barrasso 16A9 = Wregget 16AA = Lemieux. There is a "Checks Against" RAM Map of 52 bytes starting at Wram address 16C2. First 26 bytes for home team, next 26 bytes for away team. Each byte is associated with the Roster Index # for the player. IE: If Chicago was the home team; 16C2 = Belfour, 16C3= Waite, 16C4 = Roenick... If Pittsburgh was the away team. 16DC= Barrasso 16DD = Wregget 16DE = Lemieux. {$13c3+[$95]} = Jersey# of Player doing the hit {$12a3+[$95]} = Player Roster Index -1 of player doing the hit [0 based that's why] {$13c3+[$91]} = Jersey# of Player being hit {$12a3+[$91]} = Player Roster Index -1 of player being hit [0 based that's why] Detailed info can be found in Dev Notes RetroArch SAVE STATE Info: offset = 65430 decimal for RetroArch 1.17 Snes 9x ================================= // Home Player Stats // Checks fseek($fr, 8864 + $offset + $i); $Chksfor = hexdec(bin2hex(fread($fr, 1))); fseek($fr, 8916+ $offset + $i); 8854 $ChksA = hexdec(bin2hex(fread($fr, 1))); ================================= // Away Player Stats //Checks fseek ($fr,8890+ $offset + $i); 8828 $Chksfor = hexdec(bin2hex(fread($fr, 1))); fseek ($fr,8942+ $offset + $i); $ChksA = hexdec(bin2hex(fread($fr, 1))); -
Problem: GENS was tracking Body Checks per player in the game as a hidden stat, while the SNES version was not. We would like to record Checks For and Against in the SNES version as a stat so it can be extracted from the save state and used on the website. Technical Details: When a Body Check is recorded in the game, also record who performed the check and the player that was checked, similar to the other Player Stats (G, A, Sh) This can now be extracted from the save state with all the other stats. Plus you can also choose to show the Checks For, in the Player Stats Screen. Patch: Download the patch tool to patch an existing ROM, or create a new one. Hex Version: Replace old hex values with new hex values. (Just use the patch tool, its easier)
-
HOW TO: Fix Missing Extra Attacker Bug [SNES]
McMarkis replied to McMarkis's topic in How-To & Reference
Just released it, I really want to start up the Pond Hockey 3v3 proper with 1 Defense and 2 Forwards. This allows us to do that now. -
Have you ever wanted to put Ray Bourque as a forward? This hack enables the option in Edit Lines to assign forwards and defensemen to any position Technical Details: The SNES code was performing very specific checks to prevent Forwards and Defense from swapping positions. I wrote new code that displays all forwards and defense in Edit Lines. I combined this code with the Missing Extra Attacker Bug Fix, to allow the swapping of forwards and defense. Patch: Download the patch tool to patch an existing ROM, or create a new one. Hex Version: 1) Replace old hex values with new hex values. (Just use the patch tool, its easier) =========================== Headerless ROM (.SFC) =========================== ROM Offsets: (hex) D8C96 Old: C9 01 00 New: 20 78 CE ROM Offsets: (hex) D8E1A Old: 10 21 22 00 93 9B New: EA EA EA 4C BA CE ROM Offsets: (hex) DCE78 Old: FF New: 48 A5 A5 18 6D 9F 1D 85 95 AE 9F 1D E8 A5 95 20 72 8D CF 8F 1D 9F F0 07 C6 95 CA D0 F0 80 1E CA A5 A5 18 6D 9F 1D ED 8B 1D 85 95 20 72 8D 48 A5 A5 86 AF 18 6D AF 00 85 95 68 20 7C 8D 68 C9 01 00 60 22 00 93 9B 8D A3 1D 22 00 D3 9E A5 A5 8D AB 1D 22 DC 92 9B 18 6D A3 1D 8D A3 1D AD AB 1D 4C 3B 8E =========================== Headered ROM (.SMC) =========================== ROM Offsets: (hex) D8E96 Old: C9 01 00 New: 20 78 CE ROM Offsets: (hex) D901A Old: 10 21 22 00 93 9B New: EA EA EA 4C BA CE ROM Offsets: (hex) DD078 Old: FF New: 48 A5 A5 18 6D 9F 1D 85 95 AE 9F 1D E8 A5 95 20 72 8D CF 8F 1D 9F F0 07 C6 95 CA D0 F0 80 1E CA A5 A5 18 6D 9F 1D ED 8B 1D 85 95 20 72 8D 48 A5 A5 86 AF 18 6D AF 00 85 95 68 20 7C 8D 68 C9 01 00 60 22 00 93 9B 8D A3 1D 22 00 D3 9E A5 A5 8D AB 1D 22 DC 92 9B 18 6D A3 1D 8D A3 1D AD AB 1D 4C 3B 8E
- 1 reply
-
- 1
-
Problem: There is a bug in the SNES version that prevents the extra attacker from coming on the ice if he is currently in the lineup. As a result, the extra attacker never comes on the ice when the goalie is pulled or when the other team gets a penalty. Example: Carson is the extra attacker for L.A. If you replace Robitaille with Carson and pull the goalie, you are left with 5 skaters and no Goalie. Solution: On the GENS side, when editing lines, if you insert the extra attacker into your lineup, the replaced player will automatically become the new extra attacker. Example: Carson is the extra attacker for L.A. If you replace Robitaille with Carson, Robitaille now becomes the Extra Attacker. Technical Details: The SNES code was performing very specific checks to prevent Forwards and Defense from swapping positions. The GENS code didn't care, so I ported a version of the GENS code to SNES. New Code: See uploaded image at the end of the post, if interested. Patch: Download the patch tool to patch an existing ROM, or create a new one. Hex Version: 1) Replace old hex values with new hex values. =========================== Headerless ROM (.SFC) =========================== ROM Offsets: (hex) D8C96 Old: C9 01 00 New: 20 78 CE ROM Offsets: (hex) DCE78 Old: FF New: 48 A5 A5 18 6D 9F 1D 85 95 AE 9F 1D E8 A5 95 20 72 8D CF 8F 1D 9F F0 07 C6 95 CA D0 F0 80 1E CA A5 A5 18 6D 9F 1D ED 8B 1D 85 95 20 72 8D 48 A5 A5 86 AF 18 6D AF 00 85 95 68 20 7C 8D 68 C9 01 00 60 =========================== Headered ROM (.SMC) =========================== ROM Offsets: (hex) D8E96 Old: C9 01 00 New: 20 78 CE ROM Offsets: (hex) DD078 Old: FF New: 48 A5 A5 18 6D 9F 1D 85 95 AE 9F 1D E8 A5 95 20 72 8D CF 8F 1D 9F F0 07 C6 95 CA D0 F0 80 1E CA A5 A5 18 6D 9F 1D ED 8B 1D 85 95 20 72 8D 48 A5 A5 86 AF 18 6D AF 00 85 95 68 20 7C 8D 68 C9 01 00 60
-
Problem: There is a bug in the SNES code responsible for calculating the Hot/Cold Bonus for every player attribute (Speed, Agility, etc.). As a result, no attribute receives a negative bonus; instead, the attribute is consistently given the maximum boost (15) if the bonus was negative. An unsigned division error caused the bug, the details can be found here. Solution: Fix the division error if the Boost is negative, preventing the Max Boost from being applied. This limits the Boost from (-3 to +3) per attribute as intended. Technical Details: We convert the negative number to positive for the division, then revert it to negative and apply the bonus. If the number was already positive, no changes are required. New Code: Special thanks to @chaos for helping with the assembly and providing GENS documentation on player attributes, bonuses etc. Patch: Download the patch tool to create your own ROM or patch an existing ROM. Hex Version: 1) Replace old hex value with new hex value. =========================== Headerless ROM (.SFC) =========================== ROM Offsets: (hex) FD224 Old: B9 12 1A 4A 4A New: 20 32 FB EA EA ROM Offsets: (hex) FFB32 Old: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF New: B9 12 1A 10 09 49 FF 1A 4A 4A 49 FF 1A 60 4A 4A 60 =========================== Headered ROM (.SMC) =========================== ROM Offsets: (hex) FD434 Old: B9 12 1A 4A 4A New: 20 32 FB EA EA ROM Offsets: (hex) FFD32 Old: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF New: B9 12 1A 10 09 49 FF 1A 4A 4A 49 FF 1A 60 4A 4A 60 NHL '94 (USA)_Hot_Cold_Patched.zip
- 1 reply
-
- 4
-
I have documented all the Player Attributes + Team Bonuses + Hot/Cold Code in the SNES rom. Below are the details. Overall very similar except for the rescaled attribute values and the HUGE Hot/Cold bug on the SNES side. Genesis / SNES Comparison: Player Attribute Details: Bonuses / Disadvantages: · PP + : Positive (0 to +3) Applied to the team on the PP · PK - : Negative (-3 to 0) Applied to the team on the PK · Home/Away +/-: Negative or Positive (-3 to +3) based on your teams Home/Road · Rubber Band +: Positive +2 applied when losing or tied early in the third or in OT Goalies: Do not get Bonuses / Disadvantages applied to their attributes, only Hot/Cold. Hot/Cold function: 1) Takes a random number (-12 to +10) divides by 2 then divides by 2 again. 2) Adds this number back to the rescaled value. 3) Constraints the attribute to stay within the 0 to 15 range. Hot/Cold Bug: A division error on the (-12 to +10) causes HUGE fluctuations in SNES, often resulting in large positive jumps. I would say this is similar to the GENS weight bug, in terms of being a coding error Example of the Bug: 1.Starting Values: - Benoit Brunet's agility was originally 2 out of 6. - This value was rescaled to 5 out of 15. No bonuses were applied. 2.Random Number Impact: - A random number of $F5 (-11 in decimal) was generated to adjust agility due to "Hot/Cold" status. - This number should be halved (divided by 2) twice in the calculation. 3. First Division by 2: - Instead of correctly calculating -11 ÷ 2 = -5, the instruction treats the number as if it’s positive (unsigned), which gives a wrong result of 245 ÷ 2 = 122. 4.Second Division by 2: - The incorrect value 122 is halved again to get 61. - This should have instead halved -5 to get -2. 5.Adding the Original Agility Value: - The program adds the original rescaled value of 5 to the incorrect 61, resulting in 66. - The correct calculation should have been 5 + (-2) = 3. 6.Capping the Result: - Since 66 is greater than the maximum allowed agility of 15, the value is capped at 15. - In the correct calculation, the final agility value would have been 3, which is already under the cap. **Summary:** Due to the bug, Benoit Brunet's agility incorrectly increases to the maximum value (15) instead of decreasing to (3) as it should, because the negative number was mistakenly treated as a positive number during the calculations.
-
HOW TO: Skip EA + Flying Pucks Intro [SNES]
McMarkis replied to McMarkis's topic in How-To & Reference
20 Seconds of our life back each time we play 😂 -
Skip EA + Flying Pucks Intro Screens Problem: It takes forever [24 Seconds] before you get to the "Game Setup" screen on the SNES version of 94. We would like to speed this up similar to the GENS version [4 Seconds]. Solution: Simply skip the code that loads the EA Sports Screen, and the Flying Pucks Screen. This now takes less than 4 seconds to get to the "Game Setup" Screen Technical Details: The code below is executed when the ROM starts up. Code: Change the JSL (Jump Sub-Routine) to NOP (No Operation) to skip the EA Intro Change the JSL (Jump Sub-Routine) to NOP (No Operation) to skip the Flying Pucks Intro New Code: Download the patch tool to create your own ROM or patch an existing ROM. Hex Version: 1) Replace old hex value with new hex value. Headerless ROM (.SFC) ROM Offsets: (hex) F8289 Old: 22 36 F4 9F New: EA EA EA EA ROM Offsets: (hex) F82C0 Old: 22 18 B1 9D New: EA EA EA EA Headered ROM (.SMC) ROM Offsets: (hex) F8489 Old: 22 36 F4 9F New: EA EA EA EA ROM Offsets: (hex) F84C0 Old: 22 18 B1 9D New: EA EA EA EA
-
Fix Y Button Bug Allowing Checked Players to Instantly Stand Up Problem: When a player is knocked down, pressing the Y button causes them to get up instantly. This behavior doesn't occur on GENS or the previous version, NHLPA 93. The knocked down player should stay down for 3 seconds as intended. Solution: The Y button performs a 'Hook / Hold' animation when you don't have the puck. The existing code already prevents "Hook/Hold" if your player is "Speed Boosting" To improve this, we add an additional check when the Y button is pressed to determine if the controlled player's animation is in the 'Knocked Down' position. If the player is knocked down, exit the routine without performing the "Hook / Hold" animation similar to "Speed Boosting" code. Technical Details: The code below is executed when the Y button is pressed without the puck. Code: Load the selected player animation/action, 0 = Standing, 1 = Knocked Down or Passing, 8 = Slapshot, F342 = Speed Boost Check if the player is knocked down If the player is knocked down then branch to RTL (Exit). If the Player is NOT knocked down then continue back to the original code. New Code: Download the patch tool to create your own ROM or patch an existing ROM. Hex Version: 1) Replace old hex value with new hex value. Headerless ROM (.SFC) ROM Offsets: (hex) F2251 Old: BD E3 14 New: 4C C5 FB ROM Offsets: (hex) F7BC5 Old: FF FF FF FF FF FF FF FF FF FF FF FF New: BD E3 14 C9 01 00 F0 03 4C 56 A2 6B Headered ROM (.SMC) ROM Offsets: (hex) F2451 Old: BD E3 14 New: 4C C5 FB ROM Offsets: (hex) F7DC5 Old: FF FF FF FF FF FF FF FF FF FF FF FF New: BD E3 14 C9 01 00 F0 03 4C 56 A2 6B
-
How To: Disable/Reduce Puck Hitting Goal Posts [SNES]
McMarkis replied to McMarkis's topic in How-To & Reference
Unfortunately no, this logic happens after the game has decided the puck is going in the net. I still have to find the code for shooting and goalie save logic. But anything that was going to hit the post will now be a goal. -
Disable / Reduce frequency of the puck hitting the posts Problem: Reduce the Insane amount of times the puck hits the post in SNES. Solution: There are a few things you can do: Remove the check to see if the puck hits the cross bar or post, this results in a goal when it normally would hit the post. Keep the check but make the cross bar height higher and or the side posts further out. Keep the Crossbar check but skip the posts check. This would probably be the best balance if you still want some posts in the game. Technical Details: The code below is executed when the puck is about to go into the net. As mentioned above there are a few hacks you can apply. Code: Hijacking the code at this location; we can jump to the goal logic (jmpToGoalLogic) and skip all the post checks. (Always a goal, no post) Changing this value from #$000D to a larger hex value (000F) will make the crossbar height higher (Not visually just in code) Changing this value from #$0012 to a larger hex value (0014) should make one side of the net wider (Not visually just in code) Changing this value from #$FFEF to a smaller hex value (FFEB) should make the other side of the net wider (Not visually just in code) New Code: I simply chose option 1; to skip all the logic that checks if the post was hit, and always jump to the Goal Logic. I have included that patch in the tool and the Hex example below. Download the patch tool to create your own ROM or patch an existing ROM. https://github.com/Mhopkinsinc/NHL94SNESVault/releases Hex Version: 1) Replace old hex value with new hex value. Headerless ROM (.SFC) ROM Offsets: (hex) F1230 Old: AD F9 0D New: 4C 0F 92 Headered ROM (.SMC) ROM Offsets: (hex) F1430 Old: AD F9 0D New: 4C 0F 92
-
If I recall, this code only runs during breakaways, separate from regular penalty logic. Would have to see what the logic after setting the penalty shot flag is doing, and see if it can be called from regular penalty logic.
-
Disable Penalty Shots Problem: Request for the option to turn off Penalty Shots. Solution: This hack allows you to disable Penalty Shots regardless if Penalties are On or Off. Technical Details: The change is simple but finding it was tricky. We just have to branch to the code that signals no penalty shot. Old Code: 1) Checks if the BreakAwayActive flag is set and if it is, Branches to 9EC068, this code sets up a flag to call a penalty shot. 2) The code at 9EC068 Sets a flag to call a penalty shot by setting the value to #$FFFF New Code: 1) Still checks if the BreakAwayActive flag is set but now it Branches to 9EC06D instead of the 9EC068 2) The code at 9EC06D sets a flag to signal NO penalty shot by setting the value to #$0000 Download the patch tool to create your own ROM or patch an existing ROM https://github.com/Mhopkinsinc/NHL94SNESVault/releases Hex Version: 1) Replace old hex value with new hex value. Headerless ROM (.SFC) ROM Offsets: (hex) F4064 Old: 03 New: 08 Headered ROM (.SMC) ROM Offsets: (hex) F4264 Old: 03 New: 08
-
Disable Interference Penalty With Penalties ON Problem: Request to disable Interference penalties as certain individuals despise it, and feel it is called too often in SNES. Solution: This hack allows you to disable the Interference Penalty while still keeping all other penalties ON. Technical Details: This one was simple, we just have to prevent the check to assess goalie interference by skipping. Old Code: Modified Code: Change the BMI (Branch If Minus) to BRA (Branch Always) Download the patch tool to create your own ROM or patch an existing ROM https://github.com/Mhopkinsinc/NHL94SNESVault/releases Hex Version: 1) Replace old hex value with new hex value. Headerless ROM (.SFC) ROM Offsets: (hex) F3AA8 Old: 30 New: 80 Headered ROM (.SMC) ROM Offsets: (hex) F3CA8 Old: 30 New: 80
-
Pull Goalie with L+R Trigger Problem: Pausing the game to pull the goalie kills game flow. Solution: This hack allows you to pull / insert the goalie by pressing L+R trigger buttons. Also plays the beep SFX to notify users of the action. Technical Details: Similar to the "Defense Ctrl" code injection method, we have to swap out some of the existing code and insert a jump to new code that we create. This new code will be placed in the free space at the end of the 9E bank. Old Code: Hijack Instruction LDY.B and LDA.W and JSR (Jump) to the new code we wrote. Run new code that checks if the goalie is in net and if L+R are pressed for player 1 or 2. I have included the rom to play around with or compare for differences if interested. Or you can download the tool and create your own ROM. https://github.com/Mhopkinsinc/NHL94SNESVault/releases nhl94.sfc Hex Version: 1) Hijack old code and point to the new code Headerless ROM (.SFC) ROM Offsets: (hex) F50BF-F50C3 Old: A4 91 B9 AA 17 New: 20 6E FB EA EA Headered ROM (.SMC) ROM Offsets: (hex) F52BF-F52C3 Old: A4 91 B9 AA 17 New: 20 6E FB EA EA 2) Insert new code that allows you to pull goalie with L+R Trigger Headerless ROM (.SFC) ROM Offsets: (hex) F7B6E-F7BC4 OLD: FF's NEW: A2 00 00 AC 91 00 B9 AA 17 C9 00 FF D0 01 60 B9 C1 FB DD 84 1C F0 09 E8 E8 E0 04 00 D0 F1 80 2D BD 76 07 29 FF 00 C9 30 00 D0 22 B9 AA 17 F0 07 C9 FF FF F0 02 80 16 49 FF FF 99 AA 17 22 07 D4 9F A9 00 70 85 64 A9 05 00 22 7D A1 80 A4 91 B9 AA 17 60 01 00 02 00 Headered ROM (.SMC) ROM Offsets: (hex) F7D6E-F7DC4 OLD: FF's NEW: A2 00 00 AC 91 00 B9 AA 17 C9 00 FF D0 01 60 B9 C1 FB DD 84 1C F0 09 E8 E8 E0 04 00 D0 F1 80 2D BD 76 07 29 FF 00 C9 30 00 D0 22 B9 AA 17 F0 07 C9 FF FF F0 02 80 16 49 FF FF 99 AA 17 22 07 D4 9F A9 00 70 85 64 A9 05 00 22 7D A1 80 A4 91 B9 AA 17 60 01 00 02 00 Limitations: This only works for Player 1 and Player 2, if both players are on the same team, Player 1 gets control of this option. Only works during game play, you can't pull / insert your goalie in between whistles.
- 1 reply
-
- 5
-
Updated with Hex values so it can be done manually.
-
Trace Logging In this tutorial we will be taking the RAM values we found in the finding RAM values tutorial , and tracing where the code in the ROM, is writing to that RAM value. Confused? Basically we are tracing whenever the Away teams goalie (CPU) is being pulled because of a powerplay, or in the 3rd period when the CPU is losing by 1 or 2 goals. Setup emulator and launch the game: This builds on the first tutorial, so I assume you already have the MESEN2 emulator installed and know how to launch the rom. Get the game to a position where you are winning by 1 or 2 goals in the third period with close to 1:20 minutes left. Then make a save state and pause the game. File ==>Save State ==>Select an empty slot Launch the Trace Logger: Now were going to add a trace condition to Log writes for the Away Goalies Ram Address $17AC Click Debug ==> Trace Logger This looks confusing, but the only thing you really need to understand here is the trace condition. #1 in the screen shot (Condtion) needs to copied from here and pasted in. IsWrite && MemAddress >= $017AC && MemAddress <=$017AD What this is doing is anytime a write (IsWrite) is happening to RAM (MemAddress) greater than or equal to (>=) $017AC and (&&) less than (<=) $017AD; log it to the trace window. $017AC + $017AB contains the Away teams goalie. #2 in the screen shot (Clear log) needs to be pressed to clear the log before you start the game again. #3 allows you to save the log file to your computer if you want. (Not required for this example) Now we are going to play the game again and make sure the CPU has the puck and is over the center ice line with less than 1 minute left. This will cause the CPU to pull its goalie and we should see a trace in the log appear. If everything goes according to plan, you should see some traces show in the Trace log window when the goalie gets pulled. #1 in the screen shot is the RAM value for the away goalie we were talking about $17AC #2 in the screen shot is the new value it was set to FF 00; this means Pulled goalie in the game. #3 in the screen shot is the location in the ROM .sfc file that code executed to set the RAM value. This one is a little tricker to understand. We can now look at the decompiled rom and see exactly what game code was running that sets this value. We will cover this in a more advanced topic. Homework: You now have the general knowledge to find RAM values in the emulator and then trace them to find the exact location in the ROM where that logic is. Use what you have learned to try and find other RAM values that you may be interested in. Maybe try and find the game clock ticking down in RAM. If this didn't work for you, just restore the save state and try again.
- 1 reply
-
- 3