Site registration now fixed. Oops! |
||||||
Views:
434,351 |
Sections: Documents
| Utilities
| ROM Hacks
| Games
| Translations
| Homebrew
| Fonts
Site: Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users |
09-19-24 10:44 PM |
||||
Guest: Register | Login |
Main - Posts by ShaneM |
ShaneM |
| ||
Newcomer Level: 3 Posts: 1/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
Cool find, SMB2J-2Q!
Is that limited to SMB1 or The Lost Levels as well? I know the FDS SMB2J has a check for that under "CheckInvalidWorldNum:". On that version, it cannot be done after "FindAreaPointer:" because sm2data4.asm is loaded over that old code be it identical. |
ShaneM |
| ||
Newcomer Level: 3 Posts: 2/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
Posted by SMB2J-2Q Actually, that isn't true. SM2DATA3 does a check in the subroutine "BackToNormal" on which it is commented:
But that comment also isn't completely true. Whenever you complete a castle, one of the 8 bits in "CompletedWorlds" ($07FA) is set. (To make this comment correct just remove the word "backwards" from the cmp #$ff line of doppleganger's disassembly though that isn't really important.) This bit is determined in "SetupVictoryMode" subroutine in SM2MAIN:
The bits in the WorldBits table start with #%00000001 for world 1 and multiplies for each world in table values. So world 8 would set #%10000000. It is ORA'd to save the previous bits hence how "CompletedWorlds" would be #$FF if you complete all 8 worlds. But, the set bits remain set even after taking a warpzone. I'll put it in layman's terms for you: Say you complete worlds 1 and 2, at the start of world 3 "CompletedWorlds" would have bits #%00000011 set. Let's say you take the negative warp zone on 3-1 back to 1-1, those bits aren't reset. Now, let's say after taking the negative warp you take the warp on 1-2 back to world 3. Well, the bits remain set. So you would still get to world 9 while taking these warps because you completed the first two castles (assuming you complete castles 3-8). The same could be said if you complete up to the start of world 8 (#%01111111 set) and on 8-1 take the negative warp zone back to 5-1 and then on 5-2 warp ahead back to 8-1. Well, after completing 8-4 $07FA would still be set to #$FF, hence even taking a possible 4 warp zones (2 regular and 2 negative) you would still end up on world 9. Does that make sense? |
ShaneM |
| ||
Newcomer Level: 3 Posts: 3/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
Posted by SMB2J-2Q X is used as the offset for the player object, it is not "cleared" as in clearing a flag or bit but used as the offset for the player. I'll comment it more clearly for you:
This isn't a bugfix that needs to be ported to the NES/FDS. The display intermediate screen (lives screen) on the SNES SMB1 and TLL is set up differently, with a picture of the current level being displayed before the level starts. The player's bound box is set during this sequence on SNES but not NES/FDS because the routine isn't called during display intermediate on there. I NOP'd it on the SNES to see what would happen and it makes no difference. Perhaps this is quite possibly residual code as it may have been meant to be animated at one point including the player in the level intro picture. So not a bugfix or anything like that. -ShaneM EDIT: Also, the code you posted about castle timer awards has already been in my builds for the past year or so. You're mentioning really old code. I'd prefer you not guessing my code if you don't understand exactly what I did because it's creating false labels or comments to a disassembly that is private. Thanks. |
ShaneM |
| ||
Newcomer Level: 3 Posts: 4/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
So do y’all think this new site will be the “official” successor to the original RHDN? I guess time will tell. |
ShaneM |
| ||
Newcomer Level: 3 Posts: 5/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
@SMB2J-2Q,
In a hex editor, did you try nopping all occurrences of “ AutoCtrlPlyrFlag” on a backup copy? What happened/what changes did you notice when you did? It looks like if the player is being autocontrolled it sets a flag to disable pausing in the check start routine and if you’re manually controlling the player it is cleared. I wouldn’t know exactly for what unless I test it. Edit: If I had to guess that’s what prevents pausing during flagpole slide or castle victory routine. A good way to test it is to NOP it and see if you can pause after touching flagpole, entry to 1-2 or castle victory. Let me know if my guess wasn’t right and I’ll figure it out when I get time if it isn’t. About the RTS thing, Nintendo is known to do branches to not necessarily the closest RTS. It really doesn’t matter which one except farther branching. If I understood what you’re saying correctly. |
ShaneM |
| ||
Newcomer Level: 3 Posts: 6/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
Nop “lda #$01 and sta AutoCtrlPlyrFlag” in AutoControlPlayer and “stz AutoCtrlPlyrFlag” in PlayerControlRoutine and then nop” lda AutoCtrlPlyrFlag bne ExChkStart” in Chkstart. 5 different instructions in total. If not, I’ll get around to it when I can. Thanks. |
ShaneM |
| ||
Newcomer Level: 3 Posts: 7/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
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. |
ShaneM |
| ||
Newcomer Level: 3 Posts: 8/8 EXP: 123 Next: 5 Since: 08-21-24 Last post: 4 days Last view: 38 min. |
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 |
Main - Posts by ShaneM |
Acmlmboard v2.5.6+neo (2024-08-13) © 2005-2024 Acmlm, Emuz, NinCollin, et al. |
MySQL - queries: 62, rows: 408/414, time: 0.053 seconds. |