|
||||||
Views:
760,320 |
Sections: Documents
| Utilities
| ROM Hacks
| Games
| Translations
| Homebrew
| Fonts
| Community
Site: Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users |
11-23-24 10:22 AM |
||||
Guest: Register | Login |
0 users currently in Hacking Discussion | 5 bots |
Main - Hacking Discussion - Super Mario Bros. Fixes (3) |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 7/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
I had you NOP the other stuff for neatness. The code is really only used in the conditional statement in ChkStart. It is only set/cleared in the other two routines. It did exactly what I thought it would. There are a few ways to do that. I’ve coded mine a different way.
Also, $0B7A is not a valid flag on SMB1 NES. I’d use a different one. |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 18/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Posted by ShaneM In my case, I did assign it to a different one: $06B7, formerly used by JumpCoinMiscOffset. I will use your version of the code, though, but I was curious as to what it did. ~Ben |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 19/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Hi Shane,
I am curious as to the ChkGERtn routine:
Specifically, this checks the GameEngineSubroutine variable for either routine $07 (for player entrance) or $08 (for player control) in action, and to branch to exit (ExCSM) if so. However, when checking for routine $08 it then says BNE (if not equal) and also leave the routine (to ExCSM), so unless they had intended to add additional code after this, then shouldn't that also be a BEQ or else if it is supposed to be a BNE branch, then shouldn't it be to StopPlayerMove? I am going to try that to see if any anomalies happen during the pipe intro scene. UPDATE: I played the game with the change I applied and so far I have found no outstanding anomalies during Mario's automatic movement during the pipe intro scene. ~Ben |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 8/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
Posted by SMB2J-2Q I optimized it and commented it anew. Use this one and credit me if borrowed.
Also, in the future could you please ask in a more generalized way instead of specifically calling me in every post for an answer? This is a community thread for everyone to participate in not just me. Thanks. LOL |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 20/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Posted by ShaneMPosted by SMB2J-2Q Sorry about that. I will try your optimized fix. ~Ben |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 21/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
I was just told by the person who compiled the SMAS-style level breakdown for SMB that the new $BA RAM flag was a flag created specifically for the underwater scene in world 8-4 in both SMB and SMBLL, which although it has the map type of underwater it keeps the palette and music attributes related to the castle level, hence why we're hearing the castle level music here.
~Ben (SMB2J-2Q) |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 22/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Could anyone please let me know what you think of my new fix for HandlePowerUpCollision?
Here, both the invincibility star and 1-UP are checked first, and if either are found, to bypass playing the power-up grab sound (SMB2USA, SMB3 and SMBDX all have it not play the power-up sound when a Star is collected), otherwise if it's the Super Mushroom or Fire Flower, the power-up sound is played and we then do an unconditional branch (BNE) to the Shroom_Flower_PUp routine. ~Ben |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 9/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
@SMB2J-2Q great find! I didn't realize SMB Deluxe GBC did that. I optimized it for you. My whole routine is different in SMB2J where it does the modern powerdown so if you're fiery you become super and having multiple powerups on screen at once so I did it from scratch from Doppleganger's SMB1 disassembly. Test it and let me know. It doesn't require new space, actually saves 6 bytes and fixes:
*powerup sound playing with 1-UP mushroom *powerup sound playing with Starman *double jump glitch when grabbing a powerup
Credit me if borrowed. -ShaneM EDIT: I was able to save another byte by using Y register in "Shroom_Flower_PUp:". |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 23/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Posted by ShaneM Hi Shane, That is a pretty awesome code fix there! I do think the power-up grab sound should have been part of the Shroom_Flower_PUp routine in the first place. ~Ben (SMB2J-2Q) |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 10/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
@SMB2J-2Q
Replace with “;SM let's use Y register” to get it to assemble. I added that comment last minute. Did you find any more changes from SMB Deluxe or SMAS? |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 24/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Posted by ShaneM Shane, I relocated the power-up grab sound to Shroom_Flower_PUp and the fix worked flawlessly. If I do find anymore changes related to either one of these, as always, I will let you know any time. ~Ben |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 11/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
I was able to optimize the routine even further. Saving yet another byte:
What I did was use the Y register in "UpToSuper" instead. That subroutine is only taken if Y=#0. So I just made it INY STY instead of LDA #$01 STA. Also in "UpToFiery" changed it to "ldy Player_State". I meant to do that but it was a typo. -ShaneM |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 25/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
There is something new I found in SMAS, also: the end-of-level music has been moved out of "PlayerEndLevel" and relocated to "FlagpoleRoutine." SMAS also does away with the initial scroll lock check, just as in the original FDS SMB2J (SMBLL) and ANNSMB, and SMAS also does away with the FlagpoleMusicFlag variable present in both SMB2J and ANNSMB because I looked at the SMAS version of the SMB2J code and it does not have that specific flag (was RAM $07F6) anymore.
For SMB, this change alone saves 5 bytes. Old way (NES):
New way (SMAS):
I wonder why they relocated the end of level music load to after the end of level game routine here? ~Ben |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 12/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
@SMB2J-2Q
I haven’t had time to look into it yet. It doesn’t fix any glitch I’m aware of. I know the music engine is set up differently on SNES. I looked up a Youtube video of the NES version and SNES. I notice that on NES the end of level music doesn’t play until after Mario gets off the flag and there’s a brief sound pause. But on SNES it plays while still on the flag. That lines up with the code’s order. My guess is that is what it does - changes a moment of silence from the NES version to make the transition more fluid. I’ll know more when I test it. Edit: Yeah; that’s exactly what it does. |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 26/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Posted by ShaneM Shane, Yep, I knew that too when I tried it... a reduced delay between the end of the flagpole sound and the beginning of the end-of-level music. ~Ben |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 13/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
SMB2J-2Q,
If you already knew the answer then why did you ask the question? Lol You could have just shared what it did. What the SNES does is run the end level music one frame sooner than the NES version does. I do like that change. Here’s one I noticed: On SNES it just uses big Mario’s jump sound for both size players when jumping. |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 27/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
Posted by ShaneM Hi Shane, They first did that in Super Mario Bros. 3, but they did use the small jump sound for Frog Mario when he hops on dry land. ~Ben (SMB2J-2Q) |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 28/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
In SMAS, the "ContinueGame" routine has been slightly changed to this:
I would like to know if it is safe (because of the INC statement) to remove the LDA #$00 before the TimerControl flag because I placed an LSR before the PlayerStatus flag to change 1 to 0? ~Ben |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 29/38 EXP: 2275 Next: 887 Since: 08-21-24 From: Oak Grove, OR Last post: 9 days Last view: 7 days |
I found SMAS has a new separate enemy slot check just for Piranha Plants, which is a reversed version of the existing FindEmptyEnemySlot routine in that X is loaded with the value pointing to the last enemy slot and is decremented with each loop until it goes to $FF, and also replaces the existing JSR to the FindEmptyEnemySlot routine within the WarpPipe routine.
https://github.com/Maseya/SMAS-Disassembly/blob/master/Assembly/SMB1/code/b03/ParseAreaData.asm Here is that code:
For some reason, it disallows Mario from destroying it with fireballs, so what else should I do to make it work with fireballs again (other than removing this new code)? UPDATE: According to TakuikaNinja at the old RHDN, in the old SMB fixes thread he replied to, he suggested that this new code doesn't have to be used. Instead, under the WarpPipe routine, under the JSR to FindEmptyEnemySlot, let's do this...
~Ben (SMB2J-2Q) |
ShaneM |
| |||
Micro-Goomba Level: 6 Posts: 14/19 EXP: 804 Next: 103 Since: 08-21-24 Last post: 26 days Last view: 26 days |
On the original, when Bowser turns to face the player he flips but in an odd way. It makes him go into the ax at times. SMAS fixes this and SMB Deluxe GBC partially fixes this by making him properly turn. I wrote this code from scratch to fix it, it was made with SMB2J in mind but should work on SMB1; credit me if borrowed:
I also discovered that on 1-2 of SMB2J if you collect the Starman and run to the sideways warp pipe the SFX will not play most of the time if still invincible. SMB Deluxe and SMAS fixes this. I don't know offhand if Starman + sideways pipe ever occurs in the same room on SMB1. I don't think so hence this oversight. My code is from scratch, credit me if borrowed:
Yes, the Bowser fix does take up a lot of space, but it's worth it IMO. -ShaneM |
Main - Hacking Discussion - Super Mario Bros. Fixes (3) |
Acmlmboard v2.5.6+neo (2024-08-13) © 2005-2024 Acmlm, Emuz, NinCollin, et al. |
MySQL - queries: 122, rows: 495/503, time: 0.127 seconds. |