11 March 2016 - Forum Rules

Main Menu

SMB1 Title Screen help

Started by JonGandee, January 12, 2021, 10:16:59 AM

Previous topic - Next topic


Ok, this is my title screen. But I have two problems.
How can I remove the select icon for 2 players? (The arrow and the blank space)
How can I remove the top score display on the title screen?

Quick Curly

Just as a heads up, if you have anymore Super Mario Bros. related questions, it's probably best to keep them all in one thread. Keeps things more organized for everyone (including people who are willing to try to help and would like to know what information has already been covered) and doesn't take over the whole board with multiple threads for a single project.

Assuming that you are familiar with using emulators with special tools and features like FCEUX and Mesen, using the Name Table Viewer, you can hover over locations on the screen to find out the PPU addresses for specific tiles. With that information, you can set write breakpoints in the Debugger to find when the tile values are drawn, so that hopefully you can track down where they're coming from.

The pointer is a background tile instead of a sprite, at PPU address $2249, with a tile ID of CE. I set a write breakpoint for PPU address $2249, reset, and followed the writes until I found the one that we're looking for. The data was coming from the beginning of the $0300 page in RAM. So, I set write breakpoints for this range, and kept searching. Turned out that the relevant code was at $8325, or 0x00335 in the ROM file.

The string "07 22 49 83 CE 24 24 00" is what gets stored at $0300-$0307. By looking over the code, if a 2 player game is selected, $0304 and $0306 will get overwritten with a blank tile and the pointer to display the pointer at the bottom spot.

Depending on the tile IDs of your ground graphics, replace CE 24 24 at 0x00331-0x00333 in the ROM file with the appropriate values so that the ground is displayed there for you instead. In addition, replace 24 at 0x00346 and CE at 0x0034B with appropriate matching values as well. Really, you shouldn't have to worry about those values, since the previous modification in your other thread to prevent a 2 player game from being selected should also prevent those values from ever replacing the values displayed for a 1 player game, but this would just be to try to account for all relevant data and code for the original game as it applies to your modified title screen.

It seems that the "TOP-" part of the high score display near the bottom of the title screen, starting at PPU address $22EC, is part of the actual title screen data, so it's already taken care of on your modified title screen. However, for the numerical score display itself, it seems that there is a bit of code involved with it. The blank tile between the location "TOP-" was originally displayed and the score tiles is at PPU address $22F0. The 6-digit score is the range of PPU address $22F1-$22F6. Once again, it seems that the data comes from the $0300 page in CPU memory.

The code starting at $8F28 appears to be reused multiple times for title screen related displays, so we can't really try to overwrite or erase it to be done with it and move on. However, after setting an execute breakpoint for $8F26, I found that the "LDA #$22" line only gets used once when preparing the PPU address $22F0 for the high score display.

So, I made the following modifications:

0x00F04: Change F0 to 62.
0x00F37: Change 22 to 20.

This is a cheap workaround I decided to make since there is also a score displayed under the "MARIO" tiles at the top of the screen, at PPU address $2063. I changed 0x00F04 to 62 rather than 63 to account for the blank tile that is added to the score. Otherwise, the "0" tile at PPU address $2063 would be overwritten with a blank tile, resulting in a 5-digit score under the "MARIO" tiles, but after the demo played and the score was affected, the original 6 digits would be restored. As usual, this isn't the only way you could probably go about this. This approach doesn't seem to break anything through the quick testing I performed, though it doesn't account for any additional changes you've made or will make, or a high score following a game over, so keep that in mind.

For the original game, PPU address $22F6 was still displaying a fixed "0" tile for the score, so I also had to change 00 to 24 at 0x09FED in the ROM file. Tile ID 00 was the fixed 0 tile, and 24 is a blank tile.

As already covered, your title screen is no longer displaying "TOP-". However, for anyone in the future who hasn't modified their title screen yet, the relevant data for the "TOP-" display is at 0x9FE3-0x9FE9 (0x7 bytes) in the ROM file. "22 EC 04 1D 18 19 28" represents PPU address $22EC, and 4 tile values, "1D 18 19 28", are used to display "TOP-".

Now, in addition for your title screen, I would like to point out a couple more things.

It's your choice, but there might be some people out there who feel like the one cloud to the left of "MARIO" that is cut off maybe takes away from the overall appearance. However, I know nothing about what it takes to make anything appealing, so perhaps I'm wrong to try to assume other people's opinions without asking for them. Either way, just thought that I would bring it up.

The palette attribute data is at 0x9FEE-0xA000 (0x13 bytes in hex with 0xA000 as the 00 terminator byte). One of your trees and the ground are displayed with a part of the palette that I don't believe you intended for it to be. You would have to modify the attribute byte(s) accordingly. If you need help with this, please provide the PPU addresses for the tiles that are affected, so that the correct attribute byte(s) that need(s) to be modified can be identified. There is documentation on attributes if you feel that you can figure this out on your own.

As always, best of luck.


Thanks. My hack is in a beta so you could probably tell why the title screen has some errors.