Jump to content
NHL'94 Forums

REFERENCE: 2nd Splash Screen (High Score Productions)


kingraph

Recommended Posts

This post will give you more information than you ever wanted to know about the 2nd splash screen ("High Score Productions") in the original NHL'94 ROM.  It's a little more unique that it appears, and I'll also explain what @wboy did to make this particular image much easier to modify.

The first thing to note is that the original splash is actually two images that are overlayed on top of a background.  Image 1 is the High Score Logo (this is the exact image ripped from the ROM):

orig_hiscore_recreate.png

And the 2nd image is "Mark Lesser Presents"

orig_hiscore_recreate_lesser.png

You'd never really notice because the images don't actually overlap and the background used is black.

Location

The location of the first image is at offset: F4378.  This is the header.  The header is 10 bytes long, and the tiles will start right after.  

01hex.png

The first part is the header in green. The values are 00000DEA 00000E6A 006F.  

I will start with the right 2 bytes.  006F is the number of tiles (in hex) that will be loaded for the graphic, not necessarily how many will be used.  It turns out all the tiles in this splash screen are used, but I mention this because that is sometimes not the case with other graphics.  006F is 111 tiles.  The purple section (which I truncated), is the image data for those 111 tiles.  This is much better seen in Tile Molester.  Here is the graphic tiles (purple section) represented in Tile Molester. 

I added the red numbers as those are how the tiles are numbered in hex, and that will be referenced later.  I will also explain how I got that palette information.   

01_TM_first.png

 

Back to the header.  The first 4 bytes provide an relative offset from the header to where the palette is located.  The value "0DEA" in hex is 3,562 in decimal.  This is how many bytes from the header to where you'd find the palette offset.  Adding ODEA (3,562) to F4378 (1000312 in decimal) gives you F5162 (1003874).  That's the starting location of the palette, which I highlighted in that greyish tone. 

For some reason in Tile Molester v0.16 you need to input the palette offset in decimal.  In later versions like v20 you can just use the hex offset.

So now we have the palette used in these graphics:

02_palettes.png

Quick note on data length.  One graphic tile uses up 32 bytes of data.  So when you have 111 tiles, as we do above, that equates to 3,552 bytes of data.  Adding 10 for the header to that number and we get 3,562, or 0DEA in hex, our first value in our header.

The second value in our header is 00000E6A.  This is the relative offset to get to the size of the image in width x length.  The value is 128 bytes more than the first value, which is the length of our palette.  

The location is F51E2, you can do the same math if you like above.  The size will be 2 bytes for width and 2 bytes for length.  I highlighted this in orange, and the value is 000D 000D, which is 13x13.  

So now we know we have a 13x13 image (169 tiles) that will be filled up with the 111 tiles that are loaded.  The next part of the data is the layout of those tiles.  That's the part that I highlighted in blue.  

While you don't necessarily need to read this for this post, @AdamCatalyst did a wonderful job explaining tile layout code here: Understanding How Layouts Are Specified

Fortunately this layout is very simple and I will explain the basics.  The first digit in the tile layout tells us what palette color the tile will be colored in.  

0 = Palette 01
2 = Palette 02
4 = Palette 03
6 = Palette 04

The next 3 digits will be the tile number in the selected graphic in hex.  The TM screenshot I have above has the red hex value of the tiles overlayed as a reference.  Note that the last actual tile is 6E (111th tile, we start at 00).

I put the layout in a 13x13 spreadsheet to help visualize it a bit:

layout.png

So the first two tiles are "000" and they are using palette 01, so that's "0000".  This is just a black tile and you can see that's the one most frequently repeated.  In fact, that's the only repeated tile in this example.  The next set of tiles used is actually a pretty clean row of tiles 01 through 08.  Note the first digit is 4, which means we use palette 03 for all 8 of those tiles.  4001 - 4008.png, followed by three more black tiles ("0000").

The second row is actually pretty similar, two black tiles with a set of 8 tiles (09-10) in palette 3 4009 - 4010.png, followed by 3 black.  

The 3rd row is where it gets  more complicated.  The first three tiles now start with 6, which is palette 4, and that is tiles 11-13 (6011 6012 6013).  Then there is one tile using palette 3 again (4014), followed by 3 tiles using palette 4 (6015, 6016, 6017), two tiles using palette 2 (2018, 2019) and finishing with 4 tiles back to palette 4 (601A - 601D)!!!

You can read through the rest and notice that this image is actually referencing all 4 palettes!!!

When you put this all together you'll get this image:

orig_hiscore_recreate.png

I recreated this tile by tile, so here are the tiles for anyone interested: High_Score_Tiles.zip

The second image follows the same process and the information immediately follows the first image.  I.e. the header of the 2nd image begins where the tile layout of the first image ends (F5338):

orig_hiscore_recreate_lesser.png

lesser_tiles.zip

How many actual colors are used?

I don't quite understand why this splash is using all 4 palettes.  My guess is this is a leftover from the previous ROMs, but that's just a hunch.  Here's some more information on the colors/palettes:

The 4 palettes (16 x 4 = 64 colors) have 33 unique colors between them.  The image itself uses 28 distinct colors.  Here's the pixel count of the 241 tiles (13x13 and 9x8)

pixelcount.png

I am guessing it's possible to recreate this image using 2 palettes, but perhaps not?  Also, others have recreated a single palette 16 color version that is virtually indistinguishable from the original given how close the color variations actually are.

What about the rest of the screen?

You may have noticed that the two images are not big enough to fit the entire screen!  The splash screen is 40x28 tiles, and these two images are 13x13 and 9x8, which don't fit the entire screen.  Here's how this splash screen actually works.  

The entire background is filled with the first tile, in the first palette "0000".  If you alter that tile, like putting a smiley face, you can see the impact here:

first_tile_background.png

You will also notice that the background becomes the first layer.  The high score and the mark lesser images lay on top of the background.  

How are the images positioned?

Each image has a pointer that also includes an x,y offset position for the image.  

The pointer for the first image is located at FEDCE.  The value you will find is BE0E 0300 247C 000F 4378.  

The right side is 000F4378, which is the location of our header!  247C is the instruction code the game uses, no need to get into that now.  

The two values after BE -- 0E and 03 are the x,y values where the image starts.  So the High Score starts at 14 (0E in decimal) tiles from the left and 3 tiles from the top.  You can count the happy faces from the left and top to confirm :)

The other pointer is located at FEDFC and has a value of BE10 1000 247C 000F 5338

I moved both images to the left (0) and overlapped them.   What's interesting is you'll notice that the Mark Lesser sits on top of the first image.


xy_test.png

So to summarize, the original 2nd splash has apparently 3 layers:

Layer 1 - Single tile repeating in background (black)
Layer 2 - High Score Image
Layer 3 - Mark Lesser Presents Image
 

How did @wboy "decompress" this screen?

The first thing wboy did was to change the size of the High Score image to 1 tile.  He actually left the original palette and tiles in the same location, but instead of loading 111 tiles, the game loads just 1 black tile, with one tile layout.  Now for the 2nd image, he changed the pointer from the Mark Lesser Presents graphic to a new 40x28 graphic that starts in the top left corner.  So the new pointer at FEDFC (the 2nd image)

BE00 0000 247C 0010 902E

Notice the 00 00 location and the pointer now has an offset to 0010902E.  That's the location of the new header for the large 40x28 image.  That location doesn't exist in the original because the original ROM is only 1MB.  This location is in the expanded 2MB section.

So what is really happening is the new 40x28 image is sitting in top of the 1 tile image, and on top of the background!

 

So there you have it!  More than you ever wanted to know about this 2nd splash screen :)

 

 

 

 

  • Thanks 1
  • Like 1
  • Wow 1
Link to comment
Share on other sites

On 1/14/2024 at 5:36 PM, kingraph said:

I am guessing it's possible to recreate this image using 2 palettes, but perhaps not?  Also, others have recreated a single palette 16 color version that is virtually indistinguishable from the original given how close the color variations actually are.

I struggled to figure out how to get it down from nearly four full palettes to three. I did everything but bash my head against a wall to get it down to three palettes, and even then I cheated by changing that one, single use coloured pixel. If anyone can figure out how to get this down to two palettes, I would *LOVE* to see how!
 


As a random aside, I changed the colour of two pixels in my personal version (not the one I posted) because I believe they were mistakes. I instead used the colours that I believe the original author intended. Later on, I went back and converted both my revision and the original to grayscale, and ran a comparison. The two pixels that I changed were 100% identical in grayscale / tonal value to the colour included in the original. And I mean that literally, mathematically, 100% identical in tone. I believe that an automated tool was used to break up larger images into tiles, that sometimes mismatched across tiles, by only, or weighting tonal values over hue. I recall having similar issues when using tools to compress graphics in the mid to late 90's, where available algorithms didn't always maintain global palette values correctly when breaking an image into tiles and reducing it's palette. And because this image has numerous unused colours in its palette, it makes me wonder if it was initially too complex, and had its palette reduced while in production. I have seen similar "errors" in the ROM where I believe that an algorithm incorrectly converted a colour to mismatch the same colour in a related tile. Of course, I can't prove this, but that pattern I've noticed is that:

  • It seems to happen more often in low tonal value (darker) colours.
     
  • When it happens with medium or higher tonal value (lighter) colours, it is almost always in a very low frequency colour, like the single pixel that uses it's own colour in the High Score Production image.

In case anyone is still reading, here is what I mean…

1. Check the bottom right area of the sphere. There are two blue/purple pixels that seem out of place. The excerpt on the right depicts four tiles. The "issue" is right near the middle, which is actually the first and second pixel in that particular tile.

NHL 94 - Title - High Score Productions - 1994.png image.png


2. Based on the tonal value of those pixels, it would have been more likely that the artist intended the light blue to be yellow, and the purple to be the medium brown colour, as below.

image.png NHL 94 - Title - High Score Productions - 2024 01 14 -AC copy.png


3. Now if we take both of those excerpts, and convert them to grayscale, which approximates how an algorithm would assess the colours tonal value, we get this:

NHL 94 - Title - High Score Productions - 1994 copy.png NHL 94 - Title - High Score Productions - 2024 01 14 -AC copy.png


4. They look 100% identical in that area. If we run it through comparison software below, it confirms that the original and my revision are 100% identical in numeric values in that area. (I purposely left an error in the bottom right area of the image, so you could see that my software picked up the false positive.)

Screenshot 2024-01-15 at 11.15.30 AM copy-AC.png

 

Of course, I might be wrong. Perhaps all this is a post-hoc rationalization for a mental disorder where I felt the need to change two pixels on a title screen that no-one really looks at, in an old game with a niche audience, and then write about it publicly. I am open to your diagnosis.

 

Edited by AdamCatalyst
grammar police
  • Like 3
  • Haha 1
Link to comment
Share on other sites

Only because it is a comparison piece, I did do as you mused @AdamCatalyst and... kind of took a lazy approach and went with a one palette version [that I also modified for lore reasons] This one was used for both the '94 and '95 editions of my IIHF series. Which I can safely say now that I did before I really knew what I was doing. I even kept the weird square on the top left of the sphere, as well as those two mis-coloured pixels on the bottom right. For historical accuracy...

If I were to go back, I would probably separate of the middle globe bit and make it a two palette image to increase the detail a bit, but I can't say anyone has ever mentioned the splash screens to me if that's any indication.

image.png

Edited by von Ozbourne
words are hard
  • Like 1
Link to comment
Share on other sites

On 1/16/2024 at 7:22 AM, AdamCatalyst said:

… what? the suspense is killing me!

....

Did you make it?

 

As I don't want this thread to be used as evidence in my possible future homicide case, the missing word was...

 

*mentioned

  • Like 1
Link to comment
Share on other sites

1 hour ago, von Ozbourne said:

....

Did you make it?

 

As I don't want this thread to be used as evidence in my possible future homicide case, the missing word was...

 

*mentioned

I will sleep easier tonight. Thank-you.

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