This will switch the player from Mario to Luigi and back when Pressing the R button on the overworld during a Single Player game while leaving the 2 Player option intact.
It will take Mario's Score, Bonus Stars, Powerups, Yoshi's, overworld position and completely allows you to swap players without any odd behaviors like some of the other versions of "Switch Characters" blocks or patches.
This will work with Smallhacker's Separate Player graphics patch to give Luigi separate graphics from Mario. Instructions in the uberasm
Note: Does require a patch for asar that is included. It fixes the lives system so that you won't get weird behaviors when you get a game over as Luigi.
Also included a patch that maps player 1 and player 2 to the same controller.
* Made necessary changes mentioned in the removal log.
Now allows the user to undo changes made in the attached asm asar patch files by setting the value to 0.
Note: Included is a line of code to add to the separate luigi gfx patch V2 or below but this is not necessary for the uberasm to work properly. It is only a suggestion and only fixes an issue that the original patch had that I was able to find a fix for. If the V3 update I submitted is approved for the separate luigi gfx patch than there is no need to make any changes and again does not need to be done at all if the user does not wish to bother with it.
The "3rd Player" and onwards does work to an extent, however, you're going to have to find a way to either reload P1 or P2 upon clearing a level because the OW will freak out; there is no register for P3 or onwards, so if you're in a submap, you won't load into the proper submap and otherwise.
The UberASM code works as intended. Two suggestions:
Allow controller 2 to be enabled in two player mode and consider cleaning the freespace code if you revert lives.asm. It's technically a revert patch but it's better to just remove the hijack altogether than run the hijacked code in freespace. Reverting a freespace jump is a bit difficult but it looks like this:
if read1($00A0BF) == $5C ; Or $22 for JSL
The Separate OW Luigi graphics patch with Sa-1 support is in the files of Bensalot
It should be noted the separate ow luigi gfx patch you are referring to has a lot of flaws and requires a fair bit of work around. There is still an issue that scrambles up the ow when transitioning maps for example. I didnt realize the file was still there, if you want to use it I won't stop you, but use at your own risk.