Jump to content
NHL'94 Forums

SNES ROM Stat Extract Info


chaos

Recommended Posts

Most (almost all) of this was pulled from the Extracting Stats topic in the General Questions and Discussion forum. A very special thanks to Xstioph for finding these (back in 2007!).

A reminder: SNES uses Little Endian format. So any stat that uses 2 offsets (like Attack Zone for example), the most significant byte is the second one, and the least significant byte is the first one. Also, all values stored are in HEX, not Decimal.

Example: Attack Zone for Home is located at offsets 9061 and 9062. Lets say 9061 contains 15 (256 in decimal) and 9062 contains 01 (21 in decimal). Normally, in Big Endian (used in Genesis), this is read as 1501 (9061, then 9062), and you would calculate the attack zone by converting 1501 to decimal, but in Little Endian (used in SNES), it would be read 0115 (9062, then 9061). 0115 would then be converted into decimal and minutes and seconds could then be calculated.

Conversion (use a calculator or do it like this):

1st position (farthest on the right): 5 x 1 = 5
                        2nd position: 1 x 16 = 16
                        3rd position: 1 x 256 = 256
                        4th position: 0 x 4096 = 0

256 + 16 + 5 =  277 seconds or 4 minutes 37 seconds

---------------------------------------------------------------------

Game Stats:

HOME

Offset (decimal)
9121: Score
9101: Shots
9173: Breakaways
9177: Breakaway goals
9193: One Timers
9197: One Timer Goals
9181: Penalty Shots
9185: Penalty Shot Goals
9125: Faceoffs Won
9161: Body Checks
9169: Passes
9165: Passes Recived
9061+9062: Attack Zone

-
9049: Power Play
9045: Power Play Goals
9069: Power Play Shots
9077: Shorthanded Goals
9053: Penalties
9057: Penalty time
9065+9066: Power Play Time

-
9085: Period 1 Shots
9089: Period 2 Shots
9093: Period 3 Shots
9097: Overtime Shots
-
9105: Period 1 Goals
9109: Period 2 Goals
9113: Period 3 Goals
9117: Overtime Goals


AWAY

9123: Score
9103: Shots
9175: Breakaways
9179: Breakaway goals
9195: One Timers
9199: One Timer Goals
9183: Penalty Shots
9187: Penalty Shot Goals
9127: Faceoffs Won
9163: Body Checks
9171: Passes
9167: Passes recived
9063+9064: Attack Zone

-
9051: Power Play
9047: Power Play Goals
9071: Power Play Shots
9079: Shorthanded Goals
9055: Penalties
9059: Penalty time
9067+9068: Power Play Time

-
9087: Period 1 Shots
9091: Period 2 Shots
9095: Period 3 Shots
9099: Overtime Shots

-
9107: Period 1 Goals
9111: Period 2 Goals
9115: Period 3 Goals
9119: Overtime Goals

---------------------------------------------------------------------

Player Stats:
Home Team:

Goals
9473: xx : # of goals scored for the 1st player in the team roster (if player)
: xx : # of goals conceded for the 1st player in the team roster (if/when goalie)
9474: xx : # of goals scored for the 2nd player in the team roster (if player)
: xx : # of goals conceded for the 2nd player in the team roster (if/when goalie)
9475: xx : # of goals scored for the 3rd player in the team roster (if player)
: xx : # of goals conceded for the 3rd player in the team roster (if/when goalie)
9476-9497: xx : # of goals scored for the 4th-25th player on the team roster (each byte is for 1 player)
Assists

9525: xx : # of assists for the 1st player in the team roster (goalies too)
9526: xx : # of assists for the 2nd player in the team roster (goalies too)
9527: xx : # of assists for the 3rd player in the team roster (goalies too)
9528-9549: xx : # of assists for the 4-25th player in the team roster (each byte is for 1 player)

Shots
9577: xx : # of shots on goal for the 1st player in the team roster (if player)
: xx : # of shots against for the 1st player in the team roster (if/when goalie)
9578: xx : # of shots on goal for the 2nd player in the team roster (if player)
: xx : # of shots against for the 2nd player in the team roster (if/when goalie)
9579: xx : # of shots on goal for the 3rd player in the team roster (if player)
: xx : # of shots against for the 3rd player in the team roster (if/when goalie)
9580-9601: xx : # of shots on goal for the 4-25th player in the team roster (each byte is for 1 player)
Penalties

9629: xx : # of penalty minutes for the 1st player in the team roster (goalie cannot get penalty)
9630: xx : # of penalty minutes for the 2nd player in the team roster (goalie cannot get penalty)
9631: xx : # of penalty minutes for the 3rd player in the team roster (goalie cannot get penalty)
9632-9653: xx : # of penalty minutes for the 4-25th player in the team roster (each byte is for 1 player)

Away Team:

Goals
9499: xx : # of goals scored for the 1st player in the team roster (if player)
: xx : # of goals conceded for the 1st player in the team roster (if/when goalie)
9500: xx : # of goals scored for the 2nd player in the team roster (if player)
: xx : # of goals conceded for the 2nd player in the team roster (if/when goalie)
9501: xx : # of goals scored for the 3rd player in the team roster (if player)
: xx : # of goals conceded for the 3rd player in the team roster (if/when goalie)


9502-9523: xx : # of goals scored for the 4-25th player in the team roster (each byte is for 1 player)
Assists

9551: xx : # of assists for the 1st player in the team roster (goalies too)
9552: xx : # of assists for the 2nd player in the team roster (goalies too)
9553: xx : # of assists for the 3rd player in the team roster (goalies too)
9554-9575: xx : # of assists for the 4th player in the team roster (each byte is for 1 player)

Shots
9603: xx : # of shots on goal for the 1st player in the team roster (if player)
: xx : # of shots against for the 1st player in the team roster (if/when goalie)
9604: xx : # of shots on goal for the 2nd player in the team roster (if player)
: xx : # of shots against for the 2nd player in the team roster (if/when goalie)
9605: xx : # of shots on goal for the 3rd player in the team roster (if player)
: xx : # of shots against for the 3rd player in the team roster (if/when goalie)
9606-9627: xx : # of shots on goal for the 4th player in the team roster (each byte is for 1 player)

Penalties
9655: xx : # of penalty minutes for the 1st player in the team roster (goalie cannot get penalty)
9656: xx : # of penalty minutes for the 2nd player in the team roster (goalie cannot get penalty)
9657: xx : # of penalty minutes for the 3rd player in the team roster (goalie cannot get penalty)
9658-9679: xx : # of penalty minutes for the 4-25th player in the team roster (each byte is for 1 player)

Link to comment
Share on other sites

Penalty Summary consists of 4 bytes (again, use Little Endian format!).

8783-8784 : # of Penalties (in HEX value). This is something I found, and saves you time knowing how many penalty summaries you have to go through. You can ignore the 8784 byte, since you will never have more than 255 penalties in a game (I hope.....).

So, reading in the 8783 byte and converting it to decimal will give you the number of penalties in a game. For example, if 8783 was 0B, there were 11 penalties in the game, and I will need to check the first 11 penalty summary positions.

Penalty Summary:
8785 : Penalty 1
8789 : Penalty 2
8793 : Penalty 3
8797 : Penalty 4

8798-9041: Penalty 5-65 (each penalty is 4 bytes long)

The 4 bytes are laid out in the following way (Example):

Penalty 1 (starting at 8785 decimal offset):
0C 40 97 1A (remember, it's laid out in Little Endian! The 971A does not need to be swapped, as both bytes are 2 separate things)

Let's read this as 400C 97 1A.

400C: 2nd period, 12 seconds
97: Away Team Player 24
1A: Slashing penalty

Period and Time: (The FIRST and SECOND byte read in, 8785 and 8786 in the example, 0C 40 were the values)

00 00 - FF 3F : 1st Period time in seconds

00 40 - FF 7F : 2nd Period time in seconds

00 80 - FF BF : 3rd period time in seconds

00 C0 - FF FF : OT period time in seconds

Again, remember the values are stored in Little Endian, so when you read in 0C 40 , when converting to decimal, you need to convert it as 40 0C (swap the 2 byte positions).

Player Values: (the THIRD byte in the Penalty Summary when read in: 8787 in the example, 97 is the value)

Home
00 : Player 01 [Goalie]
01 : Player 02 [Goalie/Player]
02 : Player 03 [Goalie/Player]
03 : Player 04
04 : Player 05
05 : Player 06
06 : Player 07
07 : Player 08
08 : Player 09
09 : Player 10
0A : Player 11
0B : Player 12
0C : Player 13
0D : Player 14
0E : Player 15
0F : Player 16

10 : Player 17
11 : Player 18
12 : Player 19
13 : Player 20
14 : Player 21
15 : Player 22
16 : Player 23
17 : Player 24
18 : Player 25

Away
80 : Player 01 [Goalie]
81 : Player 02 [Goalie/Player]
82 : Player 03 [Goalie/Player]
83 : Player 04
84 : Player 05
85 : Player 06
86 : Player 07
87 : Player 08
88 : Player 09
89 : Player 10
8A : Player 11
8B : Player 12
8C : Player 13
8D : Player 14
8E : Player 15
8F : Player 16
90 : Player 17
91 : Player 18
92 : Player 19
93 : Player 20
94 : Player 21
95 : Player 22
96 : Player 23
97 : Player 24
98 : Player 25

The Penalties: (the LAST byte in the Penalty summary when read in: position 8788 in the example, 1A was the value)

14 : Roughing (20 in decimal)
18 : Charging (24 in decimal)
1A : Slashing (26 in decimal)
1C : Roughing (28 in decimal)
1E : Cross Check (30 in decimal)
20 : Hooking (32 in decimal)
22 : Tripping (34 in decimal)
26 : Interference (38 in decimal)
28 : Holding (40 in decimal)

Link to comment
Share on other sites

Scoring summary

15693 and 15694 contain the LENGTH of the Scoring Summary (in total bytes). Again, in Little Endian format. Once again, like the penalty summary, you should not have to worry about reading in 15694, unless there are more than 99 goals scored. Once you know the length, you can figure out how many scoring summaries you need to extract.

Each Summary is 6 bytes long.

Example:

15693 = 24
15694 = 00

0024 = 36 bytes.  

36 bytes / 6 bytes per summary = 6 Goals 

Offsets:

15695 : Goal 1
15701 : Goal 2
15707 : Goal 3
15713 : Goal 4
...

16289 : Goal 100

Starts at: 15695 (decimal offset, 6 bytes per goal)


XX : Time
XX : Period / Time
XX : Goal Type
XX : Goal scorer
XX : Assist 1 (FF, if none)
XX : Assist 2 (FF, if none)

Period and Time: (The FIRST and SECOND byte read in. Here, the bytes are listed in order read.)

00 00 - FF 3F : 1st Period time in seconds

00 40 - FF 7F : 2nd Period time in seconds

00 80 - FF BF : 3rd period time in seconds

00 C0 - FF FF : OT period time in seconds

Team Scored and Goal Type:

These values are given in hex.

Home team goal type (in hex): 00 = SH2, 01 = SH, 02 = EV, 03 = PP, 04 =PP2 (Penalty Shot Goals are considered EV)

Away team goal type (in hex): 80 = SH2, 81 = SH, 82 = EV, 83 = PP, 84 = PP2

Goals and Assists:

Both teams use 00-18 player numbers, in hex, not the same as the penalty summary. 00 is the first roster position (normally a G), 01 is the second (normally a G), 02 is the third, etc. This is used for the Goal scorer and the Assists. If the Assist byte is FF, there was no Assist of that type (first or second assist).

Example:



50 00 02 02 0E FF

Time in Little Endian, 50 00 we switch to 00 50
0 : Period 1
050 : 1:20 

02: Even Strength, Home Team
Goal scorer: 02 (3rd player on Home's roster)
Assist 1: 0E (15th player on Home's roster)
Assist 2: 00 (1st player on Home's roster)
 
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...