News:

11 March 2016 - Forum Rules

Main Menu

Super Mario Bros Co-Op hacks by NesDraug

Started by NesDraug, March 28, 2022, 05:18:00 PM

Previous topic - Next topic

NesDraug

What's even more frustrating with the twoplayerhack is that A+start does not work so if you get a game over you cant just start at the world you died.

Also power-up jumps are not possible. (Grab a mushroom and jump again i the air)
✍️ Blog: https://www.tumblr.com/blog/nesdraug

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

NesDraug

Quote from: Cyneprepou4uk on September 16, 2022, 12:15:04 PMChange all "lives,X" instructions to just "lives".

There aren't any "lives," instructions.

These are all mentions of "lives" in smb
   Line 238: NumberofLives         = $075a ;used by current player
   Line 249: OffScr_NumberofLives  = $0761 ;used by offscreen player
   Line 1272:                lda #$ff                   ;remove onscreen player's lives
   Line 1273:                sta NumberofLives
   Line 1319:               inc NumberofLives            ;give player one extra life (1-up)
   Line 1423:       sta PlayerStatus         ;the intermediate lives display
   Line 1569:                lda DisableIntermediate      ;if this flag is set, skip intermediate lives display
   Line 1572:                lda #$01                     ;lives display, then output lives display to buffer
   Line 1572:                lda #$01                     ;lives display, then output lives display to buffer
   Line 1665: WorldLivesDisplay:
   Line 1667:   .db $29, $24, $24, $24, $24 ; lives display
   Line 1668:   .db $21, $4b, $09, $20, $18 ; "WORLD  - " used on lives display
   Line 1671:   .db $23, $dc, $01, $ba ; attribute table data for crown if more than 9 lives
   Line 1708:   .db WorldLivesDisplay-GameText, WorldLivesDisplay-GameText
   Line 1708:   .db WorldLivesDisplay-GameText, WorldLivesDisplay-GameText
   Line 1717:                cpy #$04                 ;if set to do top status bar or world/lives display,
   Line 1740:                dex                      ;are we printing the world/lives display?
   Line 1742:                lda NumberofLives        ;otherwise, check number of lives
   Line 1742:                lda NumberofLives        ;otherwise, check number of lives
   Line 1745:                cmp #10                  ;more than 9 lives?
   Line 1746:                bcc PutLives
   Line 1749:                sty VRAM_Buffer1+7       ;the number of lives exceeds 19
   Line 1750: PutLives:      sta VRAM_Buffer1+8
   Line 2741:       sta NumberofLives           ;give each player three lives
   Line 2741:       sta NumberofLives           ;give each player three lives
   Line 2742:       sta OffScr_NumberofLives
   Line 2752:              sta DisableIntermediate   ;clear skip lives display flag
   Line 2931:              dec NumberofLives        ;take one life from player
   Line 2932:              bpl StillInGame          ;if player still has lives, branch
   Line 3027:            lda OffScr_NumberofLives  ;does offscreen player have any lives left?
   Line 3027:            lda OffScr_NumberofLives  ;does offscreen player have any lives left?
   Line 5533:             inc DisableIntermediate   ;set flag to skip world and lives display
   Line 7115:       inc NumberofLives      ;give the player an extra life
   Line 14561:           sta $02,x                      ;appears on world/lives display
✍️ Blog: https://www.tumblr.com/blog/nesdraug

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

Cyneprepou4uk

I was talking about addressing modes for instructions, not about some names of variables in some disassembly.

NesDraug

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

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

Cyneprepou4uk

Don't bother, it was a bit more complicated than that.

Patch this over 2p hack.
Super Mario Bros. (Two Players Hack) sharing lives.ips

Midnight Metronome

Quote from: Cyneprepou4uk on September 18, 2022, 05:48:22 PMDon't bother, it was a bit more complicated than that.

Patch this over 2p hack.
Super Mario Bros. (Two Players Hack) sharing lives.ips


Cyneprepou4uk, you are the GOD of ASM. Thank you!

pleasejust

Since live are shared, how can I increase the lives to 6? Any kind of hex edit?

NesDraug

#27
Quote from: Cyneprepou4uk on September 18, 2022, 05:48:22 PMDon't bother, it was a bit more complicated than that.

Patch this over 2p hack.
Super Mario Bros. (Two Players Hack) sharing lives.ips


Thank you very much! I tried but couldn't figure it out.

Quote from: pleasejust on September 18, 2022, 11:27:12 PMSince live are shared, how can I increase the lives to 6? Any kind of hex edit?

Yes. At this address.

8e77 - Change Mario's starting lives. 02 is default (3 lives). 7F is max (128 lives).

8053 - Change Luigi's starting lives.


... I guess the Luigi adress is not in use any more.
✍️ Blog: https://www.tumblr.com/blog/nesdraug

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

NesDraug

#28
Quote from: NesDraug on September 19, 2022, 05:55:40 AMThank you very much! I tried but couldn't figure it out.

Yes. At this address.

8e77 - Change Mario's starting lives. 02 is default (3 lives). 7F is max (128 lives).

8053 - Change Luigi's starting lives.


... I guess the Luigi adress is not in use any more.


The patch made by Cyneprepou4uk is functional with the original SMB Twoplayerhack but unfortenately not compatible with my Co-Op Coin Challenge hack. I think it's because the new boss fight data is stored in the same place!
✍️ Blog: https://www.tumblr.com/blog/nesdraug

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


pleasejust

Quote from: NesDraug on September 19, 2022, 05:55:40 AMThank you very much! I tried but couldn't figure it out.

Yes. At this address.

8e77 - Change Mario's starting lives. 02 is default (3 lives). 7F is max (128 lives).

8053 - Change Luigi's starting lives.


... I guess the Luigi adress is not in use any more.


I used hex fiend and did a "jump to offset". There is no 8e77. And if 02 = 3 and 7F - 128.... what is 6?..... 02 doesn't even equate to 3 in hex.

NesDraug

Quote from: pleasejust on September 19, 2022, 11:13:38 AMI used hex fiend and did a "jump to offset". There is no 8e77. And if 02 = 3 and 7F - 128.... what is 6?..... 02 doesn't even equate to 3 in hex.

In the twoplayer hack, sure there is. 8e77 is an adress. Well perhaps you need to write it 008e77 im not at my computer right now.

I usually just use FCEUX emulator's hex editor. Bring up the hex editor, make sure you're editing the ROM not the NES MEMORY. Ctrl+G and enter 8e77 and that will bring you to Mario's starting lives. 02= three lives. Because 01 = two lives and 00 = last life.

05 = is six lives.

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

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

Cyneprepou4uk

Quotenot compatible with my Co-Op Coin Challenge hack

There are only a few changes in my patch. You can figure out how to move that subroutine.

NesDraug

I posted Cyneprepou4uk's patch and added in a few edits of my own.

- Start with 15 Lives
- Both players share lives and collect 1ups (cred to Cyneprepou4uk)
- All hidden 1-ups will always spawn
- In air shell kicks = 1up

https://www.romhacking.net/hacks/7166/

I'm however afraid my hacking skills are insufficient to move the code around to enable this in Co-op Coin Challenge.
✍️ 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

NesDraug

Are you saying B0 F5 is the value that points the code to the adress: f5c0?

I need to move it to f600
✍️ Blog: https://www.tumblr.com/blog/nesdraug

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

Cyneprepou4uk

You've been hacking for at least 4 years now, and you still don't know the basics. That's kinda weak.

20 B0 F5 is JSR $F5B0. If ROM 0xF5C0 = CPU $F5B0, then ROM 0xF600 = CPU $????

Do the math.

NesDraug

Quote from: Cyneprepou4uk on September 22, 2022, 11:46:10 AMYou've been hacking for at least 4 years now, and you still don't know the basics. That's kinda weak.

20 B0 F5 is JSR $F5B0. If ROM 0xF5C0 = CPU $F5B0, then ROM 0xF600 = CPU $????

Do the math.

That is true. I've done basic hex stuff since 2019 and only recently looked into asm. Also a lot of focus on music. Stuff takes time when you can only spend so much time in your hobbies.

Well. Thank you for helping the weak. :woot!:  I'll look into it.
✍️ Blog: https://www.tumblr.com/blog/nesdraug

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

pleasejust

Is there a way to make it so the single player game is a normal single player game with 3 lives, but only co-op has a higher amount that is shared?  ;D or is that too much work? I like 6 shared lives because that it's the # of lives Luigi would have that is added to Mario's for a total of 6. 15 seems kind of arbitrary and too high.