Jump to content
NHL'94 Forums

Editing the Main Menu Background - a WIP


Drezz

Recommended Posts

Hey folks, I've been quietly practicing with my ROM hacking here and there - trying out small hacks on my own, figuring out how things work and delving deeper into more complex things like pointers, tables, decompressing graphics etc.

I finally figured out how to insert an image to take the place of the tiled rink graphic in NHL 94.

Using @clockwise NHL 91 mod as a study guide, notes provided by @wboy and @kingraph 's Decompressing Graphics guide, I muddled my way through several attempts to place a background on the main menu screen until I got to this point.

As you can see in the first image, a full 320x224 background image can be done!

But in the second image, there seems to be an issue when the player cards appear (green circles).

I am going to try a different approach and see if I can push the starting offset of the player cards to a spot after the main menu BG to see if these graphical errors disappear.

 

So far so good - it looks promising. Fingers crossed. I'll update this thread with some more info soon. 

Main-Menu-1.jpg

Main-Menu-2.jpg

Edited by Drezz
  • Love 3
  • Thanks 1
  • Like 3
Link to comment
Share on other sites

Yes - The first image is indicative of how the screen looks before the cards start scrolling. The team logos and all the text is fine. The glitchy graphics only appear when some of the player cards are scrolling by, and you can see pieces of team logos or stray tiles at different locations on the screen as each portrait appears.

I have a feeling it has something to do with the order of each graphic instance that wboy set up, since the portraits are at the very end and all of his full screen background images are near the start of his "reordered" ROM.

Edited by Drezz
Link to comment
Share on other sites

Amazing. Good luck with solving those artifacts!

Does your emulator have a VDP/graphics window where you can visually see what's in the graphics memory? It looks like maybe some memory got overwritten.

Are you able to identify what the artifacts are? Like they look like they're part of some other image.

  • Like 1
Link to comment
Share on other sites

Good question about the potential memory issues. I'm going to backtrack and try it on a clean ROM and I'll get back to you on that.

After checking the VDP in Regen, I don't immediately see the overwritten areas, but it doesn't mean it didn't happen.

EDIT: Still the same errors.

I also tried sending the pointer to a different full screen BG like the startup title screen and the same issues happen with the artifacts.

Edited by Drezz
Link to comment
Share on other sites

Assuming the background image is the same number of tiles as the original, I doubt it would be a VDP memory issue.  If you increased the background image size (increase number of tiles) then perhaps that's it. 

If it's the same size, but you stuck it in another part of the ROM, then I'd agree maybe some player cards were overwritten or something like that.

Link to comment
Share on other sites

So using the decompression method you explained in your thread, I found out where the pointer was for the background graphic and sent it to an unused portion of the ROM (after the roster data/cards).

Then I copied the data for one of wboy's 320x224 intro screens, including the header, graphics, palette, and tile layout and pasted it at the offset I chose.

Ran the game, and the background appeared as shown above - palette was completely off, but that was easily fixable. 

I've isolated it to a layering issue. There's something screwy going on with stray sprite data appearing at random. If I run the game and turn the sprite layer off using the VDP Layer select in Regen, it works perfectly. Turn the sprites back on, and the glitchy graphics appear.

 

Link to comment
Share on other sites

Okay! PROGRESSSSSSS.... I figured out the background issue!

I'm hoping it doesn't cause any "other" problems, but so far it looks pretty good. The artifacts are gone, and everything seems to work as it should. I'm going to test it out a bit further before I give a tutorial on how I did it.

It's actually WAY easier than you'd think.

Main-Menu-3.jpg

Main-Menu4.jpg

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

This is pretty cool. Sign me up for guys that would be interested if you're up for sharing notes.
I've played around with that background for a few mods, but always gone with just editing and reordering the existing background tiles. Totally up for a less fiddly and time consuming option.

  • Love 1
  • Thanks 1
Link to comment
Share on other sites

For those curious - before I post up a fancy tutorial with pics, I'll just explain here quickly.

It's literally four steps.

1) Copy the data from an existing full screen BG that wboy created that appears at the start of the game, and place it after all the data in a location of your choosing.
2) Edit the number of header tiles - there's a slight tweak = I used 480 [1152 tiles] instead of 461.
3) Change the pointer to the new location (search for the offset number for the old rink background header in the code)
4) Insert your image and update your palette.

Once you do it and get it to work, I guarantee you're going to think "Man, I wish I would have thought of that sooner." :lol:

  • Thanks 3
Link to comment
Share on other sites

Very excited to see a full tutorial of how to do this.

My favorite part of this site lately is when the smart people come up with cool ideas so normal people can try them out on their own. Awesome stuff.

  • Thanks 1
Link to comment
Share on other sites

On 12/2/2022 at 7:51 PM, Drezz said:

For those curious - before I post up a fancy tutorial with pics, I'll just explain here quickly.

It's literally four steps.

1) Copy the data from an existing full screen BG that wboy created that appears at the start of the game, and place it after all the data in a location of your choosing.
2) Edit the number of header tiles - there's a slight tweak = I used 480 [1152 tiles] instead of 461.
3) Change the pointer to the new location (search for the offset number for the old rink background header in the code)
4) Insert your image and update your palette.

Once you do it and get it to work, I guarantee you're going to think "Man, I wish I would have thought of that sooner." :lol:

Would be cool if we can do that in 95. @von Ozbourme @kingraph is this something that can be done?

  • Like 1
Link to comment
Share on other sites

6 hours ago, UltraMagnus said:

Would be cool if we can do that in 95. @von Ozbourme @kingraph is this something that can be done?

At the very least you can change the background the same way @Drezzmentioned, however increasing tiles is TBD.  It could be possible, but once you increase an image size then you may run into space limitations on the graphics.  

  • Like 1
Link to comment
Share on other sites

15 hours ago, UltraMagnus said:

Would be cool if we can do that in 95. @von Ozbourme @kingraph is this something that can be done?

 

9 hours ago, kingraph said:

At the very least you can change the background the same way @Drezzmentioned, however increasing tiles is TBD.  It could be possible, but once you increase an image size then you may run into space limitations on the graphics.  

I think it could work. In the 30 team 94 ROM, I added it to the tail end of the code and there was still quite a bit of room left over in the 2MB version. I believe you could essentially do the same thing in 95 unless there is some weird issue with available RAM. I had to slightly increase the amount of tiles to accommodate the player cards coming through, so I suspect this would be the case for 95.

Link to comment
Share on other sites

5 hours ago, Drezz said:

 

I think it could work. In the 30 team 94 ROM, I added it to the tail end of the code and there was still quite a bit of room left over in the 2MB version. I believe you could essentially do the same thing in 95 unless there is some weird issue with available RAM. I had to slightly increase the amount of tiles to accommodate the player cards coming through, so I suspect this would be the case for 95.

This issue I was referring to was more the latter -- available graphic RAM at one time.  I ran into this when I was doing my '95 update: https://forum.nhl94.com/index.php?/topic/18130-nhl95-expanded-rom-project/&do=findComment&comment=170815

 

What happened was when I expanded the banner image (banners are actually one giant image), when the playoff screen went up the the available graphic memory ran out and started creeping over the background.

NHL95_34TM_beta_04_000.png

My solution was to make the image of the Stanley Cup smaller by reducing the tiles.  The original '95 game has a spinning cup.  I made it static to reduce the tiles.  Sort of....technically it's still spinning, but it's the same image over and over again :lol:

  • Thanks 1
Link to comment
Share on other sites

Makes sense - the banners + Stanley Cup are probably treated as sprites since they need to change, so you can't make those overly huge. The background image tile (green + beveled line) might be editable to a larger size though.

Not sure if this is common knowledge around here or not, so apologies for the "lesson" if the bigger brains have already explained this previously

Sega graphics have 4 graphic modes in layers
Background A + B
Window
Sprites

I'm sure you know most of the graphics like banners and player photos are treated like sprites. Some of the emulators with debuggers have an option to filter between all the VDP layers. Thats how I found out the buggy areas on my screens above were sprite related. I am still figuring out how the game discerns which layer is which, so you don't have those weird glitchy effects.

 

  • Love 1
Link to comment
Share on other sites

15 hours ago, Drezz said:
On 12/4/2022 at 3:01 PM, UltraMagnus said:

Would be cool if we can do that in 95. @von Ozbourme @kingraph is this something that can be done?

 

On 12/4/2022 at 9:12 PM, kingraph said:

At the very least you can change the background the same way @Drezzmentioned, however increasing tiles is TBD.  It could be possible, but once you increase an image size then you may run into space limitations on the graphics.  

I think it could work. In the 30 team 94 ROM, I added it to the tail end of the code and there was still quite a bit of room left over in the 2MB version. I believe you could essentially do the same thing in 95 unless there is some weird issue with available RAM. I had to slightly increase the amount of tiles to accommodate the player cards coming through, so I suspect this would be the case for 95.

I'm not familiar with trying Drezz's method in '95, but I did notice that there are 727 unique tiles in the ROM data. while the menu background is 40x28=1120 tiles. I was able to use the less intrusive method of reordering them to get some different looks, but I was playing around with the 34-team ROM though and encountering a lot of glitches similar to @kingraph's playoff screen issue any time I tried to get too fancy with that and other assets. Haven't tried using the much-more-stable original 26-team ROM. Might yield better results. [assuming that RAM concern doesn't prove prophetic]

Edited by von Ozbourme
Link to comment
Share on other sites

  • 2 weeks later...

To add to this topic of backgrounds, an 8x8 decompressed graphic to replace the EA Sports one can be done. I did it in the same manner as the I did the background for the main menu.

The limiting issue seems to be graphic memory, so it can't be too complex. Found that out when testing it on the matchups screen and the portraits began cycling through and Ron Barr text was on screen

Link to comment
Share on other sites

1 hour ago, Drezz said:

To add to this topic of backgrounds, an 8x8 decompressed graphic to replace the EA Sports one can be done. I did it in the same manner as the I did the background for the main menu.

The limiting issue seems to be graphic memory, so it can't be too complex. Found that out when testing it on the matchups screen and the portraits began cycling through and Ron Barr text was on screen

Oh. Okay this is a thing that I've been wanting to do for a long time. Hope I don't sound pushy, but I'm more artist than coder, so I still need some step-by-step guides if you find the time to put some together. I will of course be ever grateful and in your debt.

  • Like 2
Link to comment
Share on other sites

Of course! I'm actually working on a tile map to make it easier for visualizing the layout. I still have to finish up the "How To" for the first part of the background art.

It's coming!

  • Love 4
Link to comment
Share on other sites

Okay, check this out. Don't mind the player ratings. I'm working off of a clean 30-team ROM.

Yes that's a vintage Bob Cole from HNIC, and YES, he is on a "separate" palette from the background tile allowing for a proper 14-15 colours for his portrait.

Now I have to figure out the borders, text background and matchups text.

Getting there slowly.

Matchup-Background.jpg

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