Jump to content
NHL'94 Forums

HOW TO: Save + Show Body Checks Per Player [SNES]


Recommended Posts

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.

image.pngimage.png

 

Hex Version:

Replace old hex values with new hex values. (Just use the patch tool, its easier)

image.png

 

 

Edited by McMarkis
Fixed Hex
  • Love 2
  • Thanks 1
  • Wow 1
Link to comment
Share on other sites

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.

 image.png

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.
image.png

{$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)));

Edited by McMarkis
Updated RAM Map
  • Love 2
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...