Jump to content

looking into SNES TSB3 & ZSNES


SLFC

Recommended Posts

So far I think I've found season stats in the SRAM (.srm) file and preseason game stats in the ZSNES save state (.zst) file.

In each case each team's player stats are 485 bytes long.

Season Stats

Jim Kelly (BUF QB1) is at hex offset 0x11C1

IND QB1 Craig Erickson is at 0x13A6 (previous offset + 485)

and so on. All 30 teams are together.

The order is the same as the team order when switching teams in the Team Data screen, or viewing empty standings:

BUF, IND, MIA, NE, JETS

CIN, CLE, HOU, JAC, PIT

DEN, KC, RAI, SD, SEA

ARI, DAL, GIA, PHI, WAS

CHI, DET, GB, MIN, TB

ATL, CAR, NO, RAMS, SF

I'm pretty sure it is followed by the Free Agents. The All-Time Greats and Superstar Editor players are probably after that but I don't know.

I noticed even if a player is traded or moves to a different team through free agency, his stats remain at the same address. Jim Kelly will always be at 0x11C1 no matter what team he's on in your season.

This leads me to believe that somewhere in the SRAM there are probably pointers to players so the game can list team rosters with changes.

I haven't fully examined the individual bytes of each player's stats yet.

QBs are at least 12 bytes long

After I simmed one week Craig Erickson's stats were

22 att, 12 comp, 2 TD, 1 INT, 158 pass yds, 1 rush, 10 yds, 0 rush TD

The first twelve bytes at 0x13A6 are

02 16 00 01 0C 00 9E 00 00 01 00 0A

1. 02 - 2 passing TD

2. 16 - 22 pass attempts

3. 00 - ?

4. 01 - 1 INT

5. 0C - 12 completions

6. 00 - ?

7. 9E - 158 passing yards

8. 00 - ?

9. 00 - ?

10. 01 - 1 rushing attempt

11. 00 - ?

12. 0A - 10 rushing yards

Kickers have 4 bytes

IND K Mike Cofer's stats are 1/2 XP, 2/4 FG

His bytes are at 0x1584: 01 02 02 04

It's XP Made, XP Att, FG Made, FG Att

Punters have 3 bytes and follow the kicker

IND P Chris Gardocki's stats are 5 punts for 219 yards

His bytes are at 0x1588: 05 DB 00

1. 05 - 5 punts

2. DB - 219 yards

3. 00 - punting yards multiplier

This is exactly like punting stats in NES TSB.

Punting yards = (256 * multiplier) + second byte

I don't know where the win-loss records or player conditions are stored.

Preseason Game Stats

These are in the save state, the .zst file.

Player 2's QB1 is at 0x9C78

Player 1's QB1 is at 0x9F78

The passing stats look like they have the same layout as in the season stats.

If everything is the same and each team is 485 bytes then

Team 1 is 0x9F78-0xA15C

Team 2 is 0x9C78-0x9E5C

Link to comment
Share on other sites

Preseason Game Stats

These are in the save state, the .zst file.

Player 2's QB1 is at 0x9C78

Player 1's QB1 is at 0x9F78

The passing stats look like they have the same layout as in the season stats.

If everything is the same and each team is 485 bytes then

Team 1 is 0x9F78-0xA15C

Team 2 is 0x9C78-0x9E5C

Hmm, the teams switched during the middle of the game! Now team 1 is before team 2. I don't know why it did that.

Link to comment
Share on other sites

Yeah, that has to be it. I never noticed before that at the halftime summary player 1's team is on the right side, but is on the left side after the game ends.

I found team win-loss records, points for, and points against in the save state.

Buffalo, the first team, is at 0x4AE

Each team is 101 bytes long, although I only know what 7 of them are so far.

In my season the Bills went 7-9, scored 249 points and gave up 282 points.

First seven bytes starting at 0x4AE: 07 09 00 F9 00 1A 01

07 - 7 wins

09 - 9 losses

00 - 0 ties

F9 - points for

00 - multiplier

1A - points against

01 - multiplier

Points for = points for + (256 * multiplier) = 249 + 0 = 249

Points against = points against + (256 * multiplier) = 26 + 256 = 282

That leaves 94 bytes unaccounted for. I'm taking a guess, I think player conditions are in there. The team schedule results might be too. Those aren't always accurate, btw. On Washington's schedule it said they lost to Seattle, and Seattle's schedule said they lost to Washington.

Link to comment
Share on other sites

  • 7 months later...

First off: thanx SLFC for isolating where the season stats are housed...

Here's the specific breakdown for offensive stats and kicker-punter stats.

OFFENSE

QBs (13 bytes each QB; 26 total)

Byte 1 - Passing TDs

Bytes 2, 3 - Passing Attempts (2nd byte is multiplier)

Byte 4 - Passes Intercepted

Bytes 5, 6 - Passing Completions (2nd byte multiplier)

Bytes 7, 8 - Passing Yardage (2nd byte multiplier)

Byte 9 - Rushing TDs

Bytes 10, 11 - Rushing Attempts (2nd byte multiplier)

Bytes 12, 13 - Rushing Yardage (2nd byte multiplier)

RBs-WRs-TEs (22 bytes each; 220 total)

Byte 1 - Receiving TDs

Bytes 2, 3 - # of Receptions (2nd byte multiplier)

Bytes 4, 5 - Receiving Yardage (2nd byte multiplier)

Byte 6 - Rushing TDS

Bytes 7, 8 - Rushing Attempts (2nd byte multiplier)

Bytes 9, 10 - Rushing Yardage (2nd byte multiplier)

Byte 11 - Longest Reception

Byte 12 - Longest Rush

Byte 13 - KR TDs

Byte 14 - # of KRs

Bytes 15, 16 - KR Yardage (2nd byte multiplier)

Byte 17 - PR TDs

Byte 18 - # of PRs

Bytes 19, 20 - PR Yardage (2nd byte multiplier)

Byte 21 - Longest KR

Byte 22 - Longest PR

Kicker-Punter NOTE: these are the last 7 bytes in each teamset, before the QB1 stats for the following team begins... SLFC already got these above...

Kicker

Byte 1 - XP Made

Byte 2 - XP Attempted

Byte 3 - FG Made

Byte 4 - FG Attempted

Punter

Byte 1 - # of Punts

Bytes 2, 3 - Punting Yardage (2nd byte multiplier)

I'll post up the defensive stats breakdown later.

AM Rush

Link to comment
Share on other sites

Here's the breakdown for defensive stats. DL1 starts right after TE2...

DEFENSE

DLs-LBs (9 bytes each; 99 total)

Byte 1 - # of Sacks

Byte 2 - NO IDEA...they all seem to be 00

Byte 3 - # of INTs

Byte 4 - INTs for TDs

Bytes 5, 6 - INT Yardage (2nd byte is multiplier)

Bytes 7, 8 - # of Tackles

Byte 9 - Forced Fumbles

DBs (19 bytes each; 133 total)

Byte 1 - # of Sacks

Byte 2 - NO IDEA...they all seem to be 00

Byte 3 - # of INTs

Byte 4 - INTs for TDs

Bytes 5, 6 - INT Yardage (2nd byte is multiplier)

Bytes 7, 8 - # of Tackles

Byte 9 - Forced Fumbles

Byte 10 - KR TDs

Byte 11 - # of KRs

Bytes 12, 13 - KR Yardage (2nd byte multiplier)

Byte 14 - PR TDs

Byte 15 - # of PRs

Bytes 16, 17 - PR Yardage (2nd byte multiplier)

Byte 18 - Longest KR

Byte 19 - Longest PR

OK, so hopefully someone (like the folks associated with Emuware) can take all this information and develop some kind of a stats dump program for TSB3. :)

AM Rush

PS: The only speculation I have about 'Byte 2' for all the defenders is that it would be a tally for other TDs (fum recoveries), or maybe safeties, but I can't make it out...

Link to comment
Share on other sites

Some further research on SLFC's .SRM findings revealed the following:

The 101-byte team blocs that contain W-L records and points for & against actually begin at offset x457. Here's how they breakdown:

Bytes 1-74 - These are 2 byte sets, 37 in all. The front end of each set indicates a player. The back end of each set indicates that player's condition (in Reg Season mode).

*30 = Excellent

*20 = Good

*10 = Average

*00 = Bad

*40 = Injured

The byte sets run in the sequence of the players as they're displayed in the Team Data roster screen. I think those condition values are consistent with those found by someone else here at Knobbe in the TSB version of the game

Bytes 75, 76 - I have no idea what these bytes are at present, and they're probably important since they sit between two lengthier blocs of related bytes. I did about a half-hours' worth of value comparisons among these bytes and got nowhere...

Byte 77 - # of season wins (as SLFC found)

Byte 78 - # of season losses

Byte 79 - # of season ties

Bytes 80, 81 - season points scored (2nd byte is multiplier)

Bytes 82, 83 - season points allowed (2nd byte multiplier)

Bytes 84, 85 & 86, 87 - Initially I thought these two 2-byte sets (w/multiplers) were passing yards allowed and rushing yards allowed, respectively, but I've since found that this is not the case. It's probably a ydg stat of some sort...

Bytes 88 & 89 - Throughout my testing these bytes always remained at 00 00 for all 30 teams. They never seem to change...

Bytes 90-97 - These bytes are populated with seemingly arbitrary values at the start of the season, and they don't change during the course of a season. All 8 bytes seem to be their own independent value; in other words, none of the 8 bytes are multipliers. I don't know what any of them represent...

Bytes 98, 99 - Passing yardage gained (2nd byte multiplier)

Bytes 100, 101 - Rushing yardage gained (2nd byte multiplier)

So I'm guessing that bytes 75-76 and 90-97 are fairly important to how the game runs/sims on some level, but they're probably going to take considerable testing to unlock their meanings.

AM Rush

Link to comment
Share on other sites

Bytes 1-74 - These are 2 byte sets, 37 in all. The front end of each set indicates a player. The back end of each set indicates that player's condition (in Reg Season mode).

*30 = Excellent

*20 = Good

*10 = Average

*00 = Bad

*40 = Injured

The byte sets run in the sequence of the players as they're displayed in the Team Data roster screen. I think those condition values are consistent with those found by someone else here at Knobbe in the TSB version of the game

AM Rush

I suspected those might be conditions since it was the same number of players on a team. Man, that was way back in January.. :)

Awesome work on finding all this!

Link to comment
Share on other sites

  • 3 months later...

A follow-up on my last post in this thread:

In the 101-byte team blocs:

Bytes 84, 85 - passing yardage allowed (2nd byte is multiplier)

Bytes 86, 87 - rushing yardage allowed (2nd byte multiplier)

*Not sure why I missed this the first time around...

Bytes 90-97 - These are the 16 plays in each team's playbook. 1 bit (nibble...whatever) per play.

*Note that the PERMANENT playbooks are located at offset xE5D26 in the main ROM that the SRM is attached to.

AM Rush

Link to comment
Share on other sites

  • 1 year later...
Bytes 75, 76 - I have no idea what these bytes are at present, and they're probably important since they sit between two lengthier blocs of related bytes. I did about a half-hours' worth of value comparisons among these bytes and got nowhere...

I just stumbled into the realization that byte 75 is the hex ID for the Kick Returner, and byte 76 is the hex ID for the Punt Returner.

amrush

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