bcrt2000 Posted May 9 Report Posted May 9 (edited) Hey folks. I just released a tool which allows the extracting of .ANIM sprite files (which are included in the source code for NHL92 and also embedded into the ROM-- for convenience they are in the repo). The Readme.md also includes a detailed description of the file format. You can use the default Palette that is embedded in the .ANIM file, or pass in a custom team's palette (also included in the repo for convenience). https://github.com/abdulahmad/EA-NHL-Tools/tree/main/ANIM-To-BMP Special thanks to @chaos & @McMarkis on collaborating to figure out the file format. We've been looking at these in an effort to understand the NHL94 animation format better so that chaos can add the fighting sprites to his fighting mod for NHL 94. Now I'm going to see if I can get this going for NHL93 & 94 sprites. Edited June 1 by bcrt2000 1 Quote
AdamCatalyst Posted May 9 Report Posted May 9 Holy frack!!!! This is amazing! I would love to know more about the underlying logic, if you were willing to share. Quote
bcrt2000 Posted May 9 Author Report Posted May 9 1 hour ago, AdamCatalyst said: Holy frack!!!! This is amazing! I would love to know more about the underlying logic, if you were willing to share. I will see if I get time. I’m so jazzed about figuring out 93/94 that it’s hard to stop. Did you read the readme.md in the repo? It has the full detailed description of the data structure. also, hot tip— you can copy and paste the code from animToBmp.js into something like Grok and ask it to explain the code to you… I extensively used grok to read the NHL92 source code and figure out the finer details of the file format Quote
AdamCatalyst Posted May 9 Report Posted May 9 No no, haven't downloaded. If there is an MD, that will probably be enough. Thanks! Been using Claude myself, want to try the latest Grok and Gemini. Thanks again for this. 1 Quote
chaos Posted May 10 Report Posted May 10 On 5/9/2025 at 9:41 AM, AdamCatalyst said: Holy frack!!!! This is amazing! I would love to know more about the underlying logic, if you were willing to share. I plan to write a post this week describing exactly what's going on. The gist: Each "action" is an animation. These animations are based on an action the player is doing (i.e. shooting, skating, skating with puck, checking, etc). There is a list of each frame in the animation and a timer based on how long to display that frame. This is also based on direction the player is facing (i.e. different animation frames if they are skating up compared to skating to the right). Each frame has data associated with it. This data includes the "hot spot" X and Y (center of the hit box), and the number of sprites in the frame. Each sprite will have their own data, which provides the tile size (1x1, 2x4, etc), the offset of the sprite from the player's XY position on the ice (used for aligning the sprites together), the offset to the tile used for the sprite, and information regarding the palette and H/V flip priority. This is the same as what you found for your crowd animation sprites. The layout of all this data in 92 is a bit different than 94. But both 93 and 94 use the same format. We've figured out both sets. 1 Quote
bcrt2000 Posted May 12 Author Report Posted May 12 (edited) 93/94 Extractor has been released: https://github.com/abdulahmad/EA-NHL-Tools/tree/main/ANIM94-To-BMP Thank you to @chaos & @McMarkis for helping make this happen. NHLPA93 Sprites example: NHL 94 sprites example: I haven't added the 93/94 palettes to the repo. When I get some time I'll do that. It still has the 92 palettes for convenience though. One thing I should note is that unlike '92, the default .anim palette doesn't seem to work with all of the sprites-- as you can see for example, blood is not coloured correctly with the '93 sprites. And if you don't pass in a custom palette for 93/94, the player sprites have kind of wild colors (although it's possible it was the palette that was used for player sprite creation). Edited May 12 by bcrt2000 1 1 Quote
bcrt2000 Posted May 15 Author Report Posted May 15 (edited) A few notes I wanted to add, mainly because I’ve been having so much fun getting back into hacking/reverse engineering the games, and have been thinking about this stuff a lot. 1. I think I will update the exporter at some point to use the correct palette for blood and other non-player sprites. Again, I think the palette that they used in the .anim file is invalid, so it’s kind of a hack 2. I eventually will revise the export tool to generate a reversible export, and also create an import tool, and also create an NHL92 -> 93/94 anim converter and 93/94 -> 92 anim converter 3. But first I am looking into creating a buildable disassembly of 93/94. I think that’s where I want things to be— I don’t want to have to deal with manually adjusting addresses in roms when adding new sprites/tiles. You should just be able to drop in new sprites and build. And the baby steps of this are me just getting better at the process of working with disassembly tools and doing something a little easier— making the NHL92 source code bitwise perfect with the retail version. I’ve made good progress so far. I’m hoping can get it done by this weekend. 4. I also want to get 92 to the point where it’s fully ripped apart— I want to disassemble hockey.snd & ealogo.bin, figure out the fm/sfx formats. And then also maybe build .map/jim export/import tools along side the .anim export/import. Then theoretically you could go from full source code + raw image/sound assets to a built rom. 5a. I’ve started to get ideas on how to improve jerseys on Genesis and get them to look as good as the PC version (or better). I have a couple of ideas. The more basic one is just adding the crest as an additional sprite to each player “frame”. We would just need some logic which could select the right tile based on the team when the code is grabbing tile data. 5b. The more advanced ideas for improved jerseys involve rendering the 256 color pc sprites either into 16 color set templates or 16 color team jersey sets. The latter idea would be huge size wise and likely would require bank switching. Maybe we could save space in either case by excluding tiles that are identical across template sets/jersey sets. Edited May 15 by bcrt2000 1 1 Quote
AdamCatalyst Posted May 15 Report Posted May 15 @bcrt2000 Re: #5. Another thing you may want to consider, is that the game uses the same Sprites for all teams, which requires many inauthentic compromises where two elements have to share the same colour, even if in real life they are coloured differently. If the game was able to choose from multiple different sprite sets, it could look much more authentic. This wouldn't even require any new drawing, just different sprite sets where the colours have been applied differently to the uniforms. If you did this in '94, I could help a bit, as I have a few different uniform options already done. Re: #2. I will wait with the anticipation at the idea of being able to export, revise, and re-import into '94. I'm so glad you are doing this! 1 Quote
bcrt2000 Posted May 15 Author Report Posted May 15 (edited) 37 minutes ago, AdamCatalyst said: @bcrt2000 Re: #5. Another thing you may want to consider, is that the game uses the same Sprites for all teams, which requires many inauthentic compromises where two elements have to share the same colour, even if in real life they are coloured differently. If the game was able to choose from multiple different sprite sets, it could look much more authentic. This wouldn't even require any new drawing, just different sprite sets where the colours have been applied differently to the uniforms. If you did this in '94, I could help a bit, as I have a few different uniform options already done. Re: #2. I will wait with the anticipation at the idea of being able to export, revise, and re-import into '94. I'm so glad you are doing this! Yeah on #5– totally with you there. I actually edited my post and gave more details on what I was thinking, and that’s one of my ideas. Either render out multiple jersey templates that can be more accurate, or go all the way and just literally render out a sprite set per jersey (which is insane from the space side of things but I have a couple of ideas in my head to achieve said space— either bank switching or sega cd storage/program Ram— or a combination of both). The ultimate idea in my head is taking the pc sprites and expanding the color zones to be per pixel… so that you can essentially use textures at that point to create a fully accurate jersey (or render out any sort of template you want), no compromises. Could also be expanded for proper gloves, goalie masks, pads, etc. Would be pretty intense to touch up every sprite to this level though. Edited May 15 by bcrt2000 1 Quote
chaos Posted May 21 Report Posted May 21 Can you explain how to download your files? There's no Code dropdown for some reason on your repositories. Quote
bcrt2000 Posted May 21 Author Report Posted May 21 (edited) Here is the repo: https://github.com/abdulahmad/EA-NHL-Tools I have been linking to subfolders with the specific tools which is why they don’t have the code checkout prompt. I need to do a round of cleanups to the documentation, and do a proper new release. Coming shortly. At the same time, haven’t wanted to stop my momentum. The partially developed JIM tools are there— extracting and rebuilding the JIM works perfectly, but the tool which color reduces an image and outputs something that can be imported into a Jim file is not done yet. And there is no documentation yet (other than what the CLI will tell you). That, and I need to do a release of the cleaned up NHL92 source with options to build the retail or rev a build. Once I finish fixing the Jim tool bug I’ll release all this and put up some posts. And then next on my list: - SND extractor/builder - ANIM importer - start of 93/94 buildable disassembly Edited May 21 by bcrt2000 1 Quote
smozoma Posted May 28 Report Posted May 28 On 5/21/2025 at 10:18 AM, chaos said: Can you explain how to download your files? There's no Code dropdown for some reason on your repositories. Shortcut for downloading the repo as a .zip: https://github.com/abdulahmad/EA-NHL-Tools/zipball/main/ Quote
bcrt2000 Posted May 28 Author Report Posted May 28 (edited) https://github.com/abdulahmad/EA-NHL-Tools/releases/tag/0.7c new version of EA NHL tools officially released. First release of JIM-Tools (Import & Export images from .jim files), clean up on documentation for various tools, added command line usage info to all of the tools, tools (outside of the ones that use gfxpak) are now mac/linux compatible, support for batch export of NHL 95 PC sprites with specific team palette NOTE: I know these multi-palette examples aren't super impressive-- its a little quick and dirty for this post, but earlier in my testing I came up with some better looking examples with some more time & tweaking JIM Tools: [bmp3bitConverter.js] - Convert 24-bit BMP to Genesis color space. Original image: Converted to 3bit with no dithering: Converted into 3bit with diffusion dithering (strength = 1): Converted into 3bit with diffusion dithering (strength = 0.4): [genesis-color-reduce.js]- Reduce BMP (can go directly from 24-bit or use genesis color reduced) to up to 4 palettes of 16 colors. Reserves transparent color in Palette 1,2,3. Can choose which palettes to use for image (for example, can decide to only use Palette 0,1,2 for title screen in NHL 92 as palette 3 is reserved for something else). Can also feed in palettes to force for each of the 4 palettes. Original 24-bit bmp to 16 colors (balance=importance, diffusion strength=0.4): Original 24-bit bmp to palettes 0,1,2 (balance=importance, diffusion strength=0.4, image split into 9 sections): pre-reduced to 3-bit w/0.4 strength diffusion bmp to to palettes 0,1,2 (balance=importance, diffusion strength=0.4, image split into 9 sections): [reduced-to-exJim.js] - Convert reduced image to exploded JIM format [exJim-to-jim.js] - Rebuild JIM file from exploded format -- ready to import into nhl 92 example of a jim image I created (not any of these examples) that was imported into nhl 92 via using an updated version of McMarkis' NHL92 buildable source code repo (will release the updated version soon!-- is bitwise perfect with retail version): [extract-jim.js] - Extract JIM file to exploded JIM format Examples of extracted images: Edited May 29 by bcrt2000 Quote
bcrt2000 Posted May 28 Author Report Posted May 28 (edited) Updated release: https://github.com/abdulahmad/EA-NHL-Tools/releases/tag/0.7b Fixed 4 section mode. Here is an example of the image pre-tweaked to be only 48 colors, and the background colors slightly flattened: genesis color reduce with default settings (no dither), using 4 section mode, all 4 palettes: By the way— sometimes a source image will just blow up the algorithm or do something weird like produce an image that’s flipped upside down. Also, I know in some of the examples, you can see the section splits clearly by differences in color palette. I think these can probably be tweaked to be less visible, but you’ll need to edit the .act palettes in the folder for it to reflect in the built Jim file, or you can try running it through the genesis-color-reduce file again after tweaking the palette in the .bmp. i do think if you spent more time hand tweaking the colours to make this look better, you’d end up with an image which looks closer to the original 92 title screen, which looks a little bit more cartoonish/stylzied. Edited May 28 by bcrt2000 Quote
bcrt2000 Posted May 29 Author Report Posted May 29 https://github.com/abdulahmad/EA-NHL-Tools/releases/tag/0.7c I fixed a bug where the ANIM94 script wasn't exporting BMPs, and I also fixed the frame index so that frames start at 1 just like they do in the source code instead of at 0. Also, I added support for extracting sprite metadata for NHL95/96 for Genesis. Unfortunately there's something off with the tile index values, so the sprite bmps have garbage data in them Quote
bcrt2000 Posted June 1 Author Report Posted June 1 (edited) NEW RELEASE! NHL 95-97 extraction support https://github.com/abdulahmad/EA-NHL-Tools/releases/tag/0.8 Release Notes: First release of ANIM95-To-BMP - Extracts sprites from NHL95-97 on genesis First release of Asset-Extractor - Extracts Assets from various EA NHL rom files Thank you to: @chaos for clarifying some things for me for 95's sprite data format. I think I needed to talk to someone as after working on 3 different games with very slightly different sprite formats I started to get confused between the games. Thank you to @kingraph for providing palette addresses for NHL 95. That's right! NHL92-97 sprites are now all extractable as well as the sprites from NHL95 PC. To commemorate this release, I decide to put together a comparison of similar sprites across games, and a little bit of analysis of them... honestly, I wanted to see what made the original sprites so timeless. NHL 92-94 Genesis - NHL 94/95 PC - NHL 95 Genesis - NHL 96-98 Genesis On this one, 95 Genesis seems to lose some personality-- no eyes at all. On 96-98, annoyingly you can't actually lay out someone, it is part of this animation where they fall on their hands/knees. I think thats one of many things that has changed over the years that made the newer games feel not as good. I like how the palette seems to be a little cleaned up on the PC version here. It looks alright on 95 Genesis too, although the mask makes the goalie look a little bit like a cyclops. on 96-98 they went for a real old school look to the mask for some reason. Annoyingly, 96-98 Genesis doesn't have straight on frames for this celebration, and the player does this jumping animation that kinda ruins the feel of authenticity I felt like the series was going for up to that point. on 95 Genesis, the player kind of spreading his legs also is weird. The original sprites (92-94 Genesis, 94-95 PC) just look right here The leg spreading on 95 Genesis here looks even worse, lol. I always felt like the skate strides in the later games looked weird. By the way-- I do feel sad now looking at all the effort that went into the later games. One detail here you can see on 95 is how they dithered the shadows such that when displayed on composite on a CRT there was a darker shadow area, and then a lighter transparent shadow area. The frame count of the games dramatically increased as well. It went from 844 in 94 Genesis, to 1056 in 95 Genesis, to 1426 in 96 Genesis (albeit theres maybe 100 or so empty frames), to 2026 in 97 Genesis (haven't had a chance to analyze how many empty frames there are, but I've seen some of the sections that were empty in 96 were filled in in 97-- maybe these were features that just didn't make the cut for 96). By the way, its interesting that while many of the PC sprites are almost pixel perfect with console, not everything is. They had to draw over the sprites when they were increasing the palette, and I guess maybe some decisions now making more of the jersey design details visible informed the changes. One more thing I do want to mention is the checking-- I'm running out of time for this post right now so I don't have any examples, but the checking frames were super simple in 92-94, literally just one frame of animation. In later games they added "boost" animation frames, but again, those just did not feel right IMO. OK! That's it for now. I think the next things I'll be working on are: ANIM Importer SND Extractor/Builder Cataloging asset addresses across the 93-95 rom files in preparation of making a buildable disassembly for each of the games I also want to sprinkle in some smaller scale things. I've been thinking maybe I'll do some mini-hackathon streams on the discord (if people are interested). The things I've been thinking about working on: Designing and creating an anti-piracy splash screen patch for NHL94 Creating a patch that adds Sega CD music to the cartridge version of NHL94 Edited June 1 by bcrt2000 1 1 1 Quote
bcrt2000 Posted June 4 Author Report Posted June 4 I created a tool which helps me scan rom files for .map.jim files. And it turns out most of the images in NHL94 are in the .map.jim format. Its not perfect, the logo files it overshoots the end by 52 bytes. And there's a few files that don't properly extract at all. I guess there's some slight variations to the .map.jim format in NHL94 that I need to figure out. Haven't gone through the whole file yet, but it's getting there. Also noticed something funny-- and this is probably already known by those who edit the game, but I didn't-- I assumed the reverse camera angle was using the same tiles, just configured differently, but no, EA included two rinks lol. Quote
AdamCatalyst Posted June 5 Report Posted June 5 This is great!!! I have current need to extract the Sideboards referee animation tiles… is that something that might be possible? Quote
bcrt2000 Posted June 5 Author Report Posted June 5 (edited) 12 hours ago, AdamCatalyst said: This is great!!! I have current need to extract the Sideboards referee animation tiles… is that something that might be possible? OK, so .map.jim files with tiles that are uncompressed-- like anything that is visible in TM, this can currently do. I did a quick pass of the rom and didn't see the sideboard referee animation tiles, so I'm assuming these might be compressed? The good news is that I started working on figuring out how to decompress compressed tiles. I have an example of the same image (Ron Barr) in both compressed and uncompressed forms, and generally understand how the compression routine works. There's basically 9 compression commands-- I think I have maybe 3 or 4 of them implemented (and get a somewhat visible but still garbled image currently), I need to implement the rest. Edited June 5 by bcrt2000 Quote
chaos Posted June 5 Report Posted June 5 4 minutes ago, bcrt2000 said: OK, so .map.jim files with tiles that are uncompressed-- like anything that is visible in TM, this can currently do. I did a quick pass of the rom and didn't see the sideboard referee animation tiles, so I'm assuming these might be compressed? The good news is that I started working on figuring out how to decompress compressed tiles. I have an example of the same image (Ron Barr) in both compressed and uncompressed forms, and generally understand how the compression routine works. There's basically 9 compression commands-- I think I have maybe 3 or 4 of them implemented (and get a somewhat visible but still garbled image currently), I need to implement the rest. You should look at the decompressed ROM, as most of these ROM hacks will be using those. Here's the 30 team ROM - I don't know a good example for a 32 team ROM. Maybe @AdamCatalyst can give you one. Quote
AdamCatalyst Posted June 5 Report Posted June 5 Yeah, they are compressed. And their tiny size makes them like hunting for a needle in a haystack. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.