Jump to content
NHL'94 Forums

HOW TO: Player Portraits


smozoma

Recommended Posts

I've been making some progress on the player portraits in NHL '94.

NOTE: I am using a headerless ROM. This means the first 512 bytes ($200 in hex) have been deleted from the ROM, since the debugger emulator doesn't work with them. If you are using a ROM with a header (such as the default ROM), then add $200 onto offsets to translate to headerless. (Don't add to pointers, just offsets, which I mark with an @ symbol). Eg: headerless: @EC200. header: @EC400)

Player-to-Portrait pointer table

In the SNES version of the game, each team has 26 picture pointers allocated to it. This means each team can have up to 26 players with portraits. In the original NHL 94 ROM, only 6 players on each team (the starting lineup) actually have portraits, so their pointers point to their portraits, and the remaining pointers point to generic pictures. The exception to this is the All Star teams, which use most of their pointers, since most of the players are starting players on their normal teams.

Within each team, the pointers go in the same order as the team roster data (goalies, then forwards, then defensemen). If the team doesn't have 26 players (none do, actually), then extra pointers still point to generic pictures.

Starting at @0ecd53, there is a massive pointer table with 26 pointers for 28 teams. That's 728 pointers!

As a pointer is 4 bytes and each team has 26 pointers, this means the start of each team is separated by 104 bytes ($68 bytes).

@0ECD53 - ANA (1st: Hebert, 4th: Loney, 6th: Yake, 8th: Semenov 12th: Kasatonov, 14th: Ladouceur)

@0ECDBB - BOS

@0ECE23 - BUF

@0ECE8B - CGY

@0ECEF3 - CHI

@0ECF5B - DAL

@0ECFC3 - DET

@0ED02B - EDM

@0ED093 - FLA

@0ED0FB - HFD

@0ED163 - L.A

@0ED1CB - MTL

@0ED233 - N.J

@0ED29B - NYI

@0ED303 - NYR

@0ED36B - OTT

@0ED3D3 - PHI

@0ED43B - PIT

@0ED4A3 - QUE

@0ED50B - S.J

@0ED573 - STL

@0ED5DB - T.B

@0ED643 - TOR

@0ED6AB - VAN

@0ED713 - WSH

@0ED77B - WPG

@0ED7E3 - ASE

@0ED84B - ASW

For example, if you go to @0ecd53 in the ROM (Anaheim) (remember my offsets are headless! Add $200 if you have a header), the first pointer is $36ac9900. In data bank notation: $0099:ac36. Rom offset: @0cac36. So, Hebert's picture is stored at @0cac36. Now I just need to figure out how it decompresses the picture...

The next pointer is $4EC69900. If you skip ahead $68 bytes (104 decimal), you'll see that the same pointer appears again. This is the generic goalie picture that the backup goalies use. A few teams don't have backups (NYI, NYR, to name two).

I'll come up with an excel sheet with all the picture pointers some time.

Palettes

Immediately following the player portrait pointers section are the palettes.

Each team gets its own palette. The palette is applied to any portrait loaded for that team, including the generic pictures.

post-253-1270677952_thumb.png

(Edmonton's portrait palette)

They're 16 colours, 32 bytes ($20 bytes)

Colour 0: usually magenta (31/0/31), used as the transparent colour *

Colours 1-12: skin and hair tones.

Colours 13-15: sweater and helmet colours. Sometimes used for black hair if the sweater has black. The fact that the player's hair and helmet will use the sweater colours will probably cause problems moving players between teams.

* there are a couple teams that don't use magenta, they just use the grey/green background colour. Someone messed up! :anger:

There are 25 palettes in one big group, and then the ones for Boston and Anaheim are crammed in elsewhere.

The All Star teams each use the same palette (located between FLA and HFD for some reason), so there are 27 palettes in total.

Palette locations:

@0D747C - ANA

@02FFDF - BOS

@0D6A5C - BUF

@0D6A7C - CGY

@0D6A9C - CHI

@0D6ABC - DAL

@0D6ADC - DET

@0D6AFC - EDM

@0D6B1C - FLA

@0D6B3C - ASE & ASW

@0D6B5C - HFD

@0D6B7C - L.A

@0D6B9C - MTL

@0D6BBC - N.J

@0D6BDC - NYI

@0D6BFC - NYR

@0D6C1C - OTT

@0D6C3C - PHI

@0D6C5C - PIT

@0D6C7C - QUE

@0D6C9C - S.J

@0D6CBC - STL

@0D6CDC - T.B

@0D6CFC - TOR

@0D6D1C - VAN

@0D6D3C - WSH

@0D6D5C - WPG

Sometimes the sweater colours get used in the players' helmets and hair, so if you change them, you have to watch out that a player doesn't end up with blue hair or a yellow helmet...

There is a pointer table for these palettes at $ED8B3. The pointers are in alphabetical order (ANA-WPG), and then the two All Star teams at the end.

Edited by smozoma
Link to comment
Share on other sites

I think I found the decompression routine.

It's at @04373 (headerless) ($80/C373 in a trace).

I'll see if I can use what I learned in finding this in order to find the graphics for for the 94 logos and the 93 banners. Once I find where those graphics are, I hope to be able to cut out the decompression routine and simply load the graphics straight from the expanded databank area of the ROMs.

TODO: also figure out how it finds the palettes; there must be palette pointers associated with each team.

Edited by smozoma
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Any luck on finding where the logos are? I'm just started out hacking nhl94 and we're making an own team.

Haven't looked into this in quite a while, probably won't until much closer to the end of the year

Link to comment
Share on other sites

  • 2 weeks later...

Awesome finds, smozoma! This info will be very useful. It is a tad unfortunate to see that ASE and ASW have the same palette (which does make sense for reasons of reducing redundancy). With these location, I could have the pictures on new roms to be all generic pictures with a more accurate palette.

Link to comment
Share on other sites

  • 8 months later...

bumping this, as I need to learn to deal with these things, especially if I want to finish the Genesis project I put on hold about a year ago. is my SNES ROM headered or headerless? I don't really get that part, either. I would appreciate a quote or screenshot of the hex data for an example player. I think I'll practice with Recchi. I'll try to move his picture onto the current Bruins roster. after that, I'd likely do the remaining ninety flow-ers and set the rest to generic lefties, righties and goaltenders (are there generics for both hands of them, too?). I just need a bit more instruction, I think. this is the next step in my development as a ROM hacker, but I am a bit intimidated.

Link to comment
Share on other sites

  • 2 weeks later...

bumping this, as I need to learn to deal with these things, especially if I want to finish the Genesis project I put on hold about a year ago. is my SNES ROM headered or headerless? I don't really get that part, either. I would appreciate a quote or screenshot of the hex data for an example player. I think I'll practice with Recchi. I'll try to move his picture onto the current Bruins roster. after that, I'd likely do the remaining ninety flow-ers and set the rest to generic lefties, righties and goaltenders (are there generics for both hands of them, too?). I just need a bit more instruction, I think. this is the next step in my development as a ROM hacker, but I am a bit intimidated.

To see if your ROM has a header, open it up in a hex editor, and if the first 200(hex) bytes are mostly 00, then it has a header. In all likelihood it has a header.

Link to comment
Share on other sites

  • 5 months later...

I'm starting to figure this out, but why are the images mirrors of what they should be? I see that it was always like that, but does anybody know how to fix it to match the in-game handedness?

Link to comment
Share on other sites

Timmy and Tuukka are both lefties and I used 4E C6 99 00 for both, but Timmy shows up correctly and Tuukka shows mirrored like most others do. how do I fix this?

edit: same with Miller and Enroth and many others. I'm not sure why this is like this....

and I see that Northstar had the same issue, so I guess I direct these questions generally to anybody and specifically to Smoz, who I feel would be the most likely to know.

Edited by trudatman
Link to comment
Share on other sites

aargh! flip flops like Romney in the sand.

picture12iv.png

picture14eo.png

picture13ug.png

Jaro didn't turn out like I'd hoped, but I'm not sure it's worth flipping the colors... any thoughts?

Edited by trudatman
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...