SMB 2p Co-op: TI - CorpseGrinder - Reverse Engineering Mod

Started by segwayspeedracer, October 20, 2018, 07:47:18 PM

Previous topic - Next topic

segwayspeedracer

I have been using Mari0 and SMBx programs for some time because I love the idea of simultaneous multiplayer. Great news is that CorpseGrinder and Ti have produced the first ever simultaneous SMB mod.

I intend on building off of their work as a template for bringing my mario mods to have simultaneous multiplayer. The hack has most of the original information in the same order but in different locations. This post is to document the addresses where information is located, and to explore options for bringing in some new features into the game that most smb hacks have (reverse red piranha plants, for example).

Feel free to contribute - I find it useful documenting my notes online for my own benefit to pick up the project later if I need to temporarily suspend it.

x8e77 - Change Mario's starting lives. 02 is default (3 lives). 7F is max (128 lives).
x8053 - Change Luigi's starting lives. (credit to Corpsegrinder)
x844D - Change Mario's palette colors. In different order than normal.

x6182 - Change Luigi's palette assignment.

xF240 - Change Fiery Luigi's palette assignment

Luigi shares the palette with Green Enemies (normal) and Red Enemies (fiery)... so technically he will have different colors in every level type. Bowser's axe color will override any sprites that use the Green Koopa palette.. so far bowser's color is set to identical to the Green Koopa palette.

00 (same as Mario), 01 (Green Koopa), 02 (Red Koopa), 03 (Goomba) are the options. The number you pick is for normal Luigi. When Luigi becomes Fiery, it will add +1 to the palette. So if normal Luigi is pal 02, when he is fiery he will be pal 03. I think xF240 overwrites this.

xA471 - w1-l1 level data

NesDraug

Great idea!

I have a big collection of my favorite SMB Hacks and it would be so awesome if one could patch all these hacks with the Two Player Hack. – I guess there's no easy way of doing that? Do I have to find that information in every single romhack?

I'm fairly (very) new to the romhacking scene, so bear with me.

- I just tried to patch some of the hacked roms with the "Super Mario Bros. (Two Players Hack).xdelta" patch file using MultiPatch. Naturally with no success since it needs the original rom.

- So I tried Lunar IPS. I made a new IPS using the original "Super Mario Bros. (W) [!].nes" and the patched "Super Mario Bros. (Two Players Hack).nes".
I then tried to patch my favorite romhacks with the newly created "Super Mario Bros. (Two Players Hack).ips" Still no success.


For example: If I would like to play "Extra Mario Bros." in co-op mode, what do I do?
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

Jorpho

Quote from: NesDraug on November 27, 2018, 06:25:17 AM- I just tried to patch some of the hacked roms with the "Super Mario Bros. (Two Players Hack).xdelta" patch file using MultiPatch. Naturally with no success since it needs the original rom.

- So I tried Lunar IPS. I made a new IPS using the original "Super Mario Bros. (W) [!].nes" and the patched "Super Mario Bros. (Two Players Hack).nes".
I then tried to patch my favorite romhacks with the newly created "Super Mario Bros. (Two Players Hack).ips" Still no success.
I suppose that might work with simple graphics hacks that don't change the ROM much, but Extra Mario Bros. is very heavily modified.

As suggested by the OP, you'd have to look at what changes the Two Player Hack makes to the ROM, and see if the same changes can still be made.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

segwayspeedracer

Quote from: NesDraug on November 27, 2018, 06:25:17 AM
Great idea!

I have a big collection of my favorite SMB Hacks and it would be so awesome if one could patch all these hacks with the Two Player Hack.

For example: If I would like to play "Extra Mario Bros." in co-op mode, what do I do?

Truth is... the best that I, or any general trial-and-error hacker, can do, is to learn exactly how the level and sprite data are arranged in the original SMB. Then, assuming that all of the raw level and sprite data in SMB2P Mod is exactly the same as the original SMB, simply put those changes in their new locations. For example, if the original walking Mario frame one sprite hex data is:

00, 01, 02, 03, 04, 05, 06, 07

then I would need to find where that string is in the SMB2p MOD using a hex editor.

If we wanted to mod 2p mods where we can simply have a rom with 2 patches, it would have to be a lot of legwork by the developers. I'm willing to bet my job that won't happen.

Sorry this post is in the morgue.... my job goes into huge upswings of activity and its hard for me to make time for this... I will make updates to the original post when I can. Please forgive if this is classified as an unnecessary bump.

Eden.GT

Yeah, you'll definitely need to contact the authors of the hack instead of working on it alone. Especially if you don't have experience in 6502 ASM which will make the process tougher.
There's hope since this hack is rather recent and not ten years ago- Corpse Grinder has a Youtube channel so you might as well go ahead and ask him for the source code.
Is the pool clean?

segwayspeedracer

This project will not be too difficult, because all of the general mario data, such as level arrangement, sprites arrangements are all the same. I am lacking in time more than anything.

More complex things such as how to change enemies palette assignments, or how to install the Lakitu Spiny horizontal momentum patch will require his support.

NesDraug

Did you get anywhere with this?

I'm gonna try to make some new levels. A SMB two player puzzle solver would be awesome! I have found a lot of palettes and sprites and Ithink I'll be able to insert new level data as well.
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug

Quote from: NesDraug on July 26, 2019, 05:10:47 PM
Did you get anywhere with this?

I'm gonna try to make some new levels. A SMB two player puzzle solver would be awesome! I have found a lot of palettes and sprites and Ithink I'll be able to insert new level data as well.

Well, I've asked CorpseGrinder twice for the source code. But this is what I have found out during my work with Mario's Keep Co-Op. https://www.romhacking.net/hacks/5903/ Also I'm working on something that's probably going to be Mario's Keep 2.

Anyways here are my notes. In no particular order.


The Twoplayer hack is often HEX +8085 from original smb

87DE - Middle of Horizontal rope meta tiles
87A2 - Mushroom Platform meta tiles

8B30 - a lot of palettes start here!
8B35 - Water color
8BB5 - Toad colors
8B2D - underwater bush color


Tiles 
8796 - Edge of tree?
0B78 - Edge of tree platfrom
8862 - castle tile metatile
87C6 - Underwater bush metatile   6DA46E79
8B31 - underwater ground
8776 - small Tree Metatile

F071 - Mario small legs
F06F - Mario small head

8A5A - Hit Brick overworld tile
8A5E - Hit brick underworld tile
EDCF - Underside of brick while hit underworld tile
EE03 - Overside of brick while hi underworld tile
EE02 - Change from a9 to a8 to avoid brick glitch - perhaps dont touch?

8749 - small bush tile
8752 - big bush tile


8e77 - Change Mario's starting lives. 02 is default (3 lives). 7F is max (128 lives).
8053 - Change Luigi's starting lives. (credit to Corpsegrinder)
844C - Change Mario's palette colors. In different order than normal.



6182 - Change Luigi's palette assignment.??????
8BAD - Change Luigi's palette (i swear it was here before!)
8B65 - Luigis palette changes?!?!
8B89 - Luigi's palette in black and blocks during hit color
F240 - Change Fiery Luigi's palette assignment
8BB1 - fire Luigi underground in castle
8B45  - fire Luigi in  and powerup mushroom underwater castle
8B8D - Fire Luigi and powerup mushroom in undergroun
8B6D - Goombas and blocks Overworld colors start here
8bd5 - BOWSER PALETTE
8B31 - Underwater castle block background
8B81 - colors on intermediate screen
8B41 - Luigi Underwater colors
0844F - MARIO FIRE color
8BCC - SKY COLOR   
8BB1 - Green Enemies in Castle colors


343e - Jumping phys
90 90 0A 09 FC FC FC FB
60 60 0A 09 FC FC FC FB


8ED5: NO CASTLE MUSIC:  change CA 10 EC 60 02 01 04 08 into  CA 10 EC 60 02 01 04 01
X DEACTIVATE CASTLE MUSIC   TWOPLAYERHACK: 008EDC 01 WAS 08


00DB74  - Bounce off enemies  change FC into F6
00DB21  - Bullet bill bounce change FD into F6
008526 change F005AD6307 into - EAEAA901EA  NO INTERMISSION SCREEN:   was
00808A change F049 into EAEA   - world select
0080A1 change 108D into 0B8D   - world select

>>Changing the tune played for one type of area
Go to the bytes at $10F7-$10FC.
$10F7: BGM played at Underwater levels(Default: $02=Underwater)
$10F8: ...Overworld levels(Default: $01=Overworld)
$10F9: Underground(Default: Similar...)
$10FA: Castle   CA 10 EC 60 02 01 04 08
$10FB: Cloud
$1OFC: Pipe Intro


Most useful of all is this program that imports levels (I can't remember where I found it) :
SMB1to2P.exe
https://www.dropbox.com/s/fqknp1sb669o0u8/SMB1to2P.exe?dl=1
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug

Some more addreses for Two Player Hack:

8BF4 - Thank you "DUDES" text Dudes start here
D3BB - timescore value
E898 - Coinbick score metatile1
E89D - Coinbick score metatile2
8323 - Enemy score
8333 - Shell score
832C - Koopa score
DAD6 - Hammerbro score
DAD4 - Blooper score
D343 - Fireworks score value
BE5F - Brick score value
BE5F - Time score value  did not work
BBDA - Coin coincount value
BBFF - Coin score value
8328 - Mushroom score
8592 - last digit of Mario score
85AF - last digit of Luigi score
8595 - Mario coin icon
85B2 - Luigi coin icon
BDDC - Change function of question blocks  was 0c change into 00
BDDE - Change funtion of coin blocks   was 0c change into 00
--




Make more hidden 1ups always appear
98F3 - change AD 5D 07 into EA A9 01

9009  - Unlimited lives change into AD
E020 - Function of coins - dont touch
E025 - Function of coins - dont touch
97E5 - Function of coins - and look? 575757 just stars!
                           6D6D6D ball climb
                           5F5F5F hidden blocks
                           
BE21 - function of 1up
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug

97F2 - chain height
97F1 - axe height
97F3 - bridge height
97F4 - assign axe object's metatiles
97F5 - assign chain object's metatiles
9805 - It does something with the rows and platform hight
8C2A - Your quest is over
8BB5 - princess color
8BB1 - castle lift colors
884E - 10coin tile

8BDC -  Thank you text starts here
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug

✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

starlightbotanist

Excellent stuff NesDraug!

Have you ever looked at CorpseGrinder's SMB 1/3 2 player hack? It's currently only available on a discord.  It's incredible but could really benefit from an infinite lives hack.  I think that's a very important thing for these 2 player games, especially if the two players have staggered skill levels.

I have tried a few different things myself and have been unable to get it working.  The V1.1 of SMB 1/3 is what I have been working with.

NesDraug

Quote from: starlightbotanist on May 17, 2022, 02:10:22 PM
Excellent stuff NesDraug!

Have you ever looked at CorpseGrinder's SMB 1/3 2 player hack? It's currently only available on a discord.  It's incredible but could really benefit from an infinite lives hack.  I think that's a very important thing for these 2 player games, especially if the two players have staggered skill levels.

I have tried a few different things myself and have been unable to get it working.  The V1.1 of SMB 1/3 is what I have been working with.
SMB 1/3
I've played it. And it's amazing for being it's own thing but because you actually need a modded version of Fcuex to even play it I consider it off limits. That's all Corpsegrinder wizardry that I can't touch.

In other news:

The two player hack lacks two things:
- A+Start after game over won't send you to the world you died on
- You can't store a jump like in the original game by jumping again after getting a powerup
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug


I got my hands on an uncommented disassembly of the two player hack.

What routine makes it possible to store a jump during taking a power up?

And why is this not implemented in the twoplayer hack?! I wonder what it takes to put it in.
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg