News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Help removing 2 player from Super Mario Bros  (Read 1369 times)

JonGandee

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Help removing 2 player from Super Mario Bros
« on: December 23, 2020, 03:23:32 pm »
I have seen rom hacks that remove 2 player mode. I want to do the same but I don't know how. I try to look up a tutorial on how to do it, but the only type of results I get is the 2 player co-op rom hack where both players get to play together instead of taking turns. Can somebody help me? It's really annoying.

Quick Curly

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: Help removing 2 player from Super Mario Bros
« Reply #1 on: December 24, 2020, 02:18:20 pm »
There's a disassembly for the game that should help, but I went searching in FCEUX on my own to see what I could hopefully find.

Switching between 1 and 2 players on the title screen/menu affected $077A in memory, so I set read and write breakpoints for that address in CPU memory in the FCEUX debugger. After pressing the Select button on the title screen again, the debugger came up at the line of code at $828E, or 0x0029E in the ROM file.



Depending on who you ask, there are really countless ways you could go about this, some more efficient than others. For instance, when you account for CPU cycles, instructions, free space in the ROM, etc.

The code that switches between 1 and 2 players are those 3 lines of code, 8 bytes in length. Simply using the "EA" opcode, No Operation, will overwrite it so that it never does what it currently does again.



Testing it out, pressing the Select button doesn't affect $077A any longer, and a 2 player game couldn't be selected. However, it still resets the counter used for the game to begin the demo (at $07A2). So, again, depending on the depths of your intended changes, you may need to look at other lines of code as well.

In addition, how *deep* do you mean to "remove 2 player mode"? Depending on that, any RAM addresses originally used as variables for Luigi, i.e. the second player, if you want to free those up for an advanced 1 player only game, again, you would have a lot more of the original game to look through and possibly reorganize so that you could effectively make use of all the space that you have to work with, without potentially changing the mapper and expanding the ROM through more advanced means.

I've never made a hack of this game, but considering that there is a disassembly for it, and many SMB hackers who are still around, hopefully if you're planning to make a hack of this game, you should be able to find the guidance and resources that you need.

Best of luck! You can do it!

JonGandee

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Help removing 2 player from Super Mario Bros
« Reply #2 on: January 12, 2021, 10:05:34 am »
Thanks.