News
Welcome to NeoRHDN! This place is still a work-in-progress, so pardon the construction...

Site registration now fixed. Oops!
Views: 434,523
Sections: Documents | Utilities | ROM Hacks | Games | Translations | Homebrew | Fonts
Site: Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users
09-19-24 11:56 PM
Guest: Register | Login

0 users currently in Hacking Discussion | 1 guest | 17 bots

Main - Hacking Discussion - Super Mario Bros. Fixes (1)

Pages: 1 2

ShaneM
Posted on 09-12-24 12:42 AM, in (rev. 10 of 09-12-24 03:34 PM by ShaneM) Link | ID: 790
Newcomer

Level: 3

Posts: 7/8
EXP: 123
Next: 5

Since: 08-21-24

Last post: 4 days
Last view: 1 hour
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
Posted on 09-12-24 03:39 PM, in (rev. 3 of 09-12-24 03:41 PM by SMB2J-2Q) Link | ID: 794

Goomba

Level: 5

Posts: 18/21
EXP: 526
Next: 3

Since: 08-21-24
From: Oak Grove, OR

Last post: 1 day
Last view: 4 hours
Posted by ShaneM
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.

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
Posted on 09-15-24 01:52 AM, in (rev. 7 of 09-15-24 02:32 AM by SMB2J-2Q) Link | ID: 819

Goomba

Level: 5

Posts: 19/21
EXP: 526
Next: 3

Since: 08-21-24
From: Oak Grove, OR

Last post: 1 day
Last view: 4 hours
Hi Shane,

I am curious as to the ChkGERtn routine:

ChkGERtn: lda GameEngineSubroutine ;get number of game engine routine running
cmp #$07
beq ExCSM ;if running player entrance routine or
cmp #$08 ;player control routine, go ahead and branch to leave
bne ExCSM
lda #$02
sta GameEngineSubroutine ;otherwise set sideways pipe entry routine to run
rts ;and leave

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
Posted on 09-15-24 04:45 PM, in (rev. 5 of 09-15-24 05:06 PM by ShaneM) Link | ID: 830
Newcomer

Level: 3

Posts: 8/8
EXP: 123
Next: 5

Since: 08-21-24

Last post: 4 days
Last view: 1 hour
Posted by SMB2J-2Q
Hi Shane,

I am curious as to the ChkGERtn routine:

ChkGERtn: lda GameEngineSubroutine ;get number of game engine routine running
cmp #$07
beq ExCSM ;if running player entrance routine or
cmp #$08 ;player control routine, go ahead and branch to leave
bne ExCSM
lda #$02
sta GameEngineSubroutine ;otherwise set sideways pipe entry routine to run
rts ;and leave

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


I optimized it and commented it anew. Use this one and credit me if borrowed.


ChkGERtn: lda GameEngineSubroutine ;load number of game engine routine running
cmp #$08 ;compare against the player control routine
bne ExChkGERtn ;if any other routine, branch to leave
lda #$02 ;otherwise load value to
sta GameEngineSubroutine ;set sideways pipe entry routine to run
ExChkGERtn:rts ;leave


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
Posted on 09-15-24 05:43 PM, in (rev. 2 of 09-15-24 05:47 PM by SMB2J-2Q) Link | ID: 831

Goomba

Level: 5

Posts: 20/21
EXP: 526
Next: 3

Since: 08-21-24
From: Oak Grove, OR

Last post: 1 day
Last view: 4 hours
Posted by ShaneM
Posted by SMB2J-2Q
Hi Shane,

I am curious as to the ChkGERtn routine:

ChkGERtn: lda GameEngineSubroutine ;get number of game engine routine running
cmp #$07
beq ExCSM ;if running player entrance routine or
cmp #$08 ;player control routine, go ahead and branch to leave
bne ExCSM
lda #$02
sta GameEngineSubroutine ;otherwise set sideways pipe entry routine to run
rts ;and leave

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


I optimized it and commented it anew. Use this one and credit me if borrowed.


ChkGERtn: lda GameEngineSubroutine ;load number of game engine routine running
cmp #$08 ;compare against the player control routine
bne ExChkGERtn ;if any other routine, branch to leave
lda #$02 ;otherwise load value to
sta GameEngineSubroutine ;set sideways pipe entry routine to run
ExChkGERtn:rts ;leave


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




Sorry about that.

I will try your optimized fix.

~Ben

SMB2J-2Q
Posted on 09-18-24 12:04 AM, in (rev. 2 of 09-18-24 12:06 AM by SMB2J-2Q) Link | ID: 862

Goomba

Level: 5

Posts: 21/21
EXP: 526
Next: 3

Since: 08-21-24
From: Oak Grove, OR

Last post: 1 day
Last view: 4 hours
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)
Pages: 1 2


Main - Hacking Discussion - Super Mario Bros. Fixes (1)


Acmlmboard v2.5.6+neo (2024-08-13)
© 2005-2024 Acmlm, Emuz, NinCollin, et al.

Page rendered in 0.068 seconds. (810KB of memory used)
MySQL - queries: 69, rows: 441/450, time: 0.058 seconds.