comprehensive SMB1 disassembly

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Last edited by loopy on Wed Aug 20, 2008 11:12 am, edited 1 time in total.
CKY-2K/Clay Man
Posts: 214
Joined: Sun Apr 01, 2007 2:10 pm

Post by CKY-2K/Clay Man »

So this is compatable with Pocketnes, and the world select thing and plant bug is now fixed?
Image
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

If it works in Nintendulator, then the defect is in PocketNES.

Now is there a way that I can take the original .fds file and turn it into the MMC3 version?
User avatar
beneficii
Posts: 127
Joined: Tue Jul 12, 2005 4:37 pm

Post by beneficii »

tepples,

Did you not see loopy's page?

loopy,

One other problem that I noticed (I couldn't notice any others) that's really minor: That jumpsprings in worlds that allow very high jumping are green, not red. In this NES port, they are red in all cases. I'm still trying to figure out exactly how the FDS version turns them green in the first place, and why it doesn't work in the NES port. (It's probably the same as the pirhana plant problem, and issue with writing to PRG-RAM, which doesn't exist on the NES except for the pseudo PRG-RAM at $6000-$7fff set up by this port.
CKY-2K/Clay Man
Posts: 214
Joined: Sun Apr 01, 2007 2:10 pm

Post by CKY-2K/Clay Man »

On loopy's new SMB2J thing, does it give you those stars for each time you beat the game without warping like on the FDS version?

Where if you have 8 you can access world A-D I think?

Also would it be possible to add that triangle wave skidding sound to the original SMB?
Image
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
RICKY
Posts: 1
Joined: Fri Jun 08, 2007 1:45 am

Post by RICKY »

How many bytes of code are there in SMB ?
That will give me an idea about the amount of work needed to disassemble (and comment) Super Mario Kart (SNES) :

Code : 68867 bytes : 13.1 %
Data : 437495 bytes : 83.4 %
Mixed : 1830 bytes : 0.3 %
Unknown : 16096 bytes : 3.1 %

Total : 524288 bytes : 100.0 %
CKY-2K/Clay Man
Posts: 214
Joined: Sun Apr 01, 2007 2:10 pm

Post by CKY-2K/Clay Man »

HEY does anyone know where the address is to change the duration of what a second is in the timer?
Image
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

The relevant RAM location:

Code: Select all

GameTimerCtrlTimer    = $0787
The code that writes a value to it:

Code: Select all

ResGTCtrl: lda #$18                   ;reset game timer control
           sta GameTimerCtrlTimer
So put a watch on $0787 to find code like this.
User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

Two ASM questions:

How do you make the Goomba use 2 animation frames?

and

How can you make Mario use extended animation frames while running?(like Sonic the Hedgehog)
CKY-2K/Clay Man
Posts: 214
Joined: Sun Apr 01, 2007 2:10 pm

Post by CKY-2K/Clay Man »

I ment the HEX address of the file. I found it though. I wanted to correct the timer to an actual second.

If you wanna know what it is search the value 18 thoughout the file.
It's over the 1000th address I know for sure.

But now another question, how could I make the second digit loop back to the number 5 instead of 9?
Image
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
doppelganger
Posts: 183
Joined: Tue Apr 05, 2005 7:30 pm

Post by doppelganger »

CKY-2K/Clay Man wrote:I ment the HEX address of the file. I found it though. I wanted to correct the timer to an actual second.

If you wanna know what it is search the value 18 thoughout the file.
It's over the 1000th address I know for sure.

But now another question, how could I make the second digit loop back to the number 5 instead of 9?
I suppose you could check to see if, before subtracting 1 from the game timer, the second and last digits of the game timer are set to 0. If they are, you'd have to set the digit modifiers to subtract 4 from the second digit and 1 from the last digit, thus making it 59 instead of 99.

I'll leave it up to you to figure out how to make room for that.
Be whatever the situation demands.
doppelganger
Posts: 183
Joined: Tue Apr 05, 2005 7:30 pm

Post by doppelganger »

CKY-2K/Clay Man wrote: Also would it be possible to add that triangle wave skidding sound to the original SMB?
Anything is possible if you have room for it, if you catch my drift.

Seriously though, if you consider adding the triangle wave skidding sound to SMB, I would suggest adding it to the third sfx engine (the one that handles noise channel sfx), and putting a JSR in between the conditional check for the skidding sound and the noise bit checking, so they work autonomously.
Be whatever the situation demands.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

And you have room for anything if you're willing to expand SMB1 to UNROM. Heck, that way, you could probably put SMB1 and the Lost Levels into one huge 20-world adventure.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

That would rock.
CKY-2K/Clay Man
Posts: 214
Joined: Sun Apr 01, 2007 2:10 pm

Post by CKY-2K/Clay Man »

I need help with the PlayerEndLevel branch.

I want it to skip the stuff that checks if your player collided with the castle brick and the part that makes mario behind the background, but instead start doing the score time total as soon as you leave the flag, so it appears that you are walking to the next level.
Image
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Post Reply