SMB Lives Counter Fix

Hack of Super Mario Bros.

Title screenHack Information
Released By7729
CategoryImprovement
PlatformNES
LicenseN/A
Patching InformationNo Special Requirements
GenreAction > Platformer
ModsL, T
Game DateSep 13 1985
Patch Version1.0
Release DateMay 15 2023
ReadmeNo
Last ModifiedMay 15 2023
Game Description:
Super Mario Bros. is a platforming game for the Nintendo Entertainment System released in 1985. When Bowser invades the Mushroom Kingdom, it's up to Mario to stop him and save the Princess.
Hack Description:
The lives display in Super Mario Bros. is of a quite crude design: if you have 1 to 9 lives it displays them as you'd expect, but if you have 10 or more, it handles that by adding a crown tile in front of the ones digit, while cases for more than 19 lives are unhandled. While this is fine for the original Mario 1, where it's unlikely you'd get more than 9 or 10 lives, many people want to make lives more plentiful in their hacks, and the lives display just sticks out and looks weird.

That is primarily why this patch was created, for ROMhackers as a simple way to get a better lives counter that can properly display up to 99 lives.

Part of the enemy data of the underwater bonus area found in 5-2 and 6-2 was hijacked to make this work. Four bytes of valid enemy data were left in, three bytes for a room change and one for the terminator. Unfortunately, this sub-area appears in two levels in different worlds, so one room change wouldn't be enough for it to work in both. So the sub-area only works in world 5, and it was removed it from world 6, as it'd result in a softlock. As this was primarily intended for people making hacks, this doesn't seem like a big issue.

The only downside to this counter is that it will display a leading zero for numbers of lives lover than 10 (e.g. 05 instead of 5). Not ideal, but still intelligible, unlike crown-zero! This could've been patched too, but then even more ROM space would need to be hijacked.

For anyone looking for more info on how the new (and old) lives display works, an explanation text file is provided with the patch which describes in detail how it was implemented.

The patched ROM works with SMB utilities such as SMButil, Graphics Workshop etc. They will not break it.

Hopefully you will find this useful!
ROM / ISO Information:
Database match: Super Mario Bros. (World)
Database: No-Intro: Nintendo Entertainment System (v. 20210216-231042)
File SHA-1: EA343F4E445A9050D4B4FBAC2C77D0693B1D0922
File CRC32: 3337EC46
ROM SHA-1: FACEE9C577A5262DBE33AC4930BB0B58C8C037F7
ROM CRC32: D445F698
Files:
  • Patch File
Screenshots:
All titles, characters, and logos are property of their respective owners.