|
||||||
Views:
752,439 |
Sections: Documents
| Utilities
| ROM Hacks
| Games
| Translations
| Homebrew
| Fonts
| Community
Site: Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users |
11-21-24 12:09 PM |
||||
Guest: Register | Login |
0 users currently in Hacking Discussion | 4 bots |
Main - Hacking Discussion - Super Mario Bros. Fixes (3) |
SMB2J-2Q |
| |||
Red Goomba Level: 9 Posts: 30/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
Posted by ShaneM Hi Shane, Awesome fixes! ~Ben (SMB2J-2Q) |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 15/19 EXP: 796 Next: 111 Since: 08-21-24 Last post: 24 days Last view: 24 days |
Posted by SMB2J-2Q Thanks. I tried to make it more dynamic than SMAS. It should be more responsive and better coded than that version. If you try it out do share your thoughts. EDIT: I revised the play pipe down SFX routine because A is immediately ORA'd by #$20 and stored as the new player sprite attribute. This sets the background priority bit and whatever else was previously loaded. The new fix corrects any data previously loaded in A to Player_SprAttrib:
-ShaneM |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 16/19 EXP: 796 Next: 111 Since: 08-21-24 Last post: 24 days Last view: 24 days |
Posted by SMB2J-2Q It would be more efficient to just use Y register like this:
But to answer your question, yes - it is safe to remove the LDA #$00. INC affects incrementing memory (RAM), not an immediate value loaded into the accumulator. That instruction also affects the negative and zero flag. INY and INX affects said registers directly though. -ShaneM |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 31/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
Posted by ShaneMPosted by SMB2J-2Q Shane, Thank you again; much appreciated! ~Ben |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 33/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
In SMAS, there are two chunks of code dealing with the floatey numbers routine...
The first one, at 03:E084, is used in most cases...
But, a similar chunk of code at address 03:E04F is used for the floatey numbers when a power-up is collected. This address is only ever used within the HandlePowerUpCollision routine.
Why was it done this way for the power-up collection, and how effective was it? As far as I know, in the original floatey number code at 03:E084, there is one instance of the Y offset being used and also both the X and Y registers being stored to the stack (the Y register was never used in the original NES code), but for the same code at 03:E04F the X offset is always used (the X register is also stored to the stack). Because of how similar these code chunks are, I wonder if the original NES SMB floatey number code can be tweaked for when dealing with power-ups being collected? ~Ben |
ShaneM |
| ||||||
Micro-Goomba Level: 6 Posts: 17/19 EXP: 796 Next: 111 Since: 08-21-24 Last post: 24 days Last view: 24 days |
Posted by SMB2J-2QPosted by ShaneM Actually, your code is inaccurate. The SNES version actually adds more code at the end to check Podoboo's vertical position to determine if to launch him anew. Also, SNES Podoboo jumps up inside the status bar at times and has SFX. I wrote this code from scratch to emluate SMAS' behavior on this 6502 program, credit me if borrowed:
That's all that needs to be changed. Nothing in "InitPodoboo:" Posted by SMB2J-2Q Change the ldx #$04 to ldx #$05 to get your outcome. I wouldn't recommend it unless you do more ASM work because powerups, vine and flagpole flag share the sixth slot on vanilla SMB1/2J:
-ShaneM |
SMB2J-2Q |
| |||||||
Red Goomba Level: 9 Posts: 34/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
Posted by ShaneMPosted by SMB2J-2QPosted by ShaneM Shane, Thank you for the heads-up on the Podoboo and Piranha Plant slot check. I will likely leave these bits of code alone. I also wanted to let you know that in SMAS, when you die via falling down a hole, the player's size and status are also reset, and inline with your suggested changes of using the Y register in both ContinueGame and Shroom_Flower_PUp, I added these here.
Thank you, Ben (SMB2J-2Q) |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 18/19 EXP: 796 Next: 111 Since: 08-21-24 Last post: 24 days Last view: 24 days |
Posted by SMB2J-2Q On NES, Player size and status are changed during the lives screen. It does nothing game-wise adding that code there. Sure, it resets the values but the player is already offscreen, hence it makes no difference. SNES must be set up differently to need it for some reason. I would say it's a waste of space and resources, unless you can pinpoint a certain function adding that would do. |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 35/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
Posted by ShaneMPosted by SMB2J-2Q Shane, Thank you again for the heads-up; I will remove that code, then. I tried your new Podoboo fix and it works perfectly! New question: how were you able to resolve the five-enemy onscreen limit for your SMB1 and SMB2J builds? For example, (1) some enemies not appearing when they really should, or (2) Piranha Plants that disappear when you hit a nearby power-up block? ~Ben (SMB2J-2Q) |
ShaneM |
| ||
Micro-Goomba Level: 6 Posts: 19/19 EXP: 796 Next: 111 Since: 08-21-24 Last post: 24 days Last view: 24 days |
Posted by SMB2J-2Q The following is with SMB2J in mind. It wasn't one thing in particular but many: 1) I changed how powerups are loaded in the enemy slot from always being in slot 6 to using the first available slot but still preferring slot 6. This is in line with SMB Deluxe GBC and SMB Special. This makes it so multiple powerups can be on screen at once which also fixes disappearing powerups. Reference posts #112 & #113 on the old thread on RHDN (page 6) to see how this was done. 2) I simply moved some enemies over one spot, which isn't noticeable. 3) I did some ASM stuff with springboards to get them to load in the sixth slot at times or specifially an always-free slot on worlds A-D. A-3 was coded differently. Here's what I added in SM2DATA4 with a jump from SM2MAIN:
4. I hardcoded how Piranha Plants are loaded in certain stages because sometimes it would be impossible even in the sixth slot to load them all. This took a lot of space and is in my current build. 5. Certain levels like 1-2 and 3-1 I had to hardcode because there's a spot on 1-2 for example with 4 powerups, a vine and platforms (treated as enemies) on the same screen and I had to make them all load a specific way. As you can see, gameplay-wise it's nice, but took a lot of work. And also keep in mind this is SMB2J. I hope it helps. It would probably be easier to wait for a more finalized version to be released when I do. -ShaneM |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 36/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
Posted by ShaneMPosted by SMB2J-2Q Hi Shane, I am working on incorporating your revised code for power-ups, and I want to know if what I did for the separate Mushroom and Fire Flower power-ups is correct? See below.
Thank you, Ben (SMB2J-2Q) |
SMB2J-2Q |
| ||
Red Goomba Level: 9 Posts: 38/38 EXP: 2251 Next: 911 Since: 08-21-24 From: Oak Grove, OR Last post: 7 days Last view: 5 days |
In SMAS, a new check was added to the FloateyNumbersRoutine routine, to make earning 1-UPs easier. But it also has a flaw: the StompChainCounter does not have the values 5000 and 8000 when doing turtle-tipping, going straight from 4000 to 1-UP.
What this new check does is that it checks if Mario does a shell chain reaction by kicking a Koopa shell toward other enemies and then gets 1-UPs after the shell hits the 9th enemy. It also compares X to the power-up object state, so if Mario happens to get a 1-UP Mushroom, the stomp chain counter will not be incremented. If the stomp or shell chain is successful, if Mario jumps on that same shell or kicks it after initially breaking the chain (i.e. if the shell ricochets against a pipe or stair), another 1-UP is earned. ~Ben |
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: 90, rows: 454/462, time: 0.084 seconds. |