View Full Version : SMB1 Program Code on Paper
ColecoFan1981
04-06-2015, 11:46 PM
I wonder if anyone would happen to know if there is original paper documentation of the original program code for Super Mario Bros. (for the Nintendo Entertainment System) dating from 1985, with all the 6502 instructions included?
I'm asking this because I wonder if the Spiny Egg behavior was written incorrectly here, too, as it was in the game's ROM.
~Ben
Guntz
04-07-2015, 12:41 AM
No, but there is source code created by someone who reverse engineered the SMB1 ROM by hand.
Jorpho
04-07-2015, 10:28 AM
I wonder if anyone would happen to know if there is original paper documentation of the original program code for Super Mario Bros. (for the Nintendo Entertainment System) dating from 1985, with all the 6502 instructions included?
I'm asking this because I wonder if the Spiny Egg behavior was written incorrectly here, too, as it was in the game's ROM.The question is unclear. How are you expecting "original paper documentation of the original program code, with all the 6502 instructions included" to differ from what is in the game's ROM?
The Adventurer
04-07-2015, 11:35 AM
The question is unclear. How are you expecting "original paper documentation of the original program code, with all the 6502 instructions included" to differ from what is in the game's ROM?
Game Roms don't include game code. What you get in the cart is compiled game data. Not the code syntax.
davidbrit2
04-07-2015, 04:55 PM
Nor do you get comments or other programmers' notes, which would be useful here.
Jorpho
04-07-2015, 10:12 PM
The question is unclear. How are you expecting "original paper documentation of the original program code, with all the 6502 instructions included" to differ from what is in the game's ROM?Game Roms don't include game code. What you get in the cart is compiled game data. Not the code syntax.But the "compiled game data" consists of 6502 instructions. It seems highly unlikely that something as old as SMB was written in some high-level language that was subsequently compiled rather than being written in 6502 assembly directly.
I guess the question is whether there is commented assembly code that the original programmers used to produce the game, equivalent to the disassembled game data that has been commented by amateurs (which is why we know about the Spiny Egg behavior in the first place). I would be surprised if there was such documentation available for any commercially released NES game, let alone one from Nintendo.
The Adventurer
04-07-2015, 11:25 PM
That is true. I briefly tried programming for NES, and it was some form of Assembly.
CastlevaniaDude
04-08-2015, 09:49 AM
You know, I never really thought about how interesting that would be to look at until I read this thread.
SparTonberry
04-08-2015, 12:22 PM
I would be surprised if there was such documentation available for any commercially released NES game, let alone one from Nintendo.
I think one of the Color Dreams people released the source code to a few games, permitting freeware use of the game engines I think (but forbidding unauthorized reuse of the graphics, sound, etc.)
ColecoFan1981
04-08-2015, 09:15 PM
But the "compiled game data" consists of 6502 instructions. It seems highly unlikely that something as old as SMB was written in some high-level language that was subsequently compiled rather than being written in 6502 assembly directly.
I guess the question is whether there is commented assembly code that the original programmers used to produce the game, equivalent to the disassembled game data that has been commented by amateurs (which is why we know about the Spiny Egg behavior in the first place). I would be surprised if there was such documentation available for any commercially released NES game, let alone one from Nintendo.
Exactly. My intent of this thread was to find out whether or not people like Shigeru Miyamoto and Koji Kondo would have any rough drafts and final drafts of the SMB game code on paper prior to being programmed.
I'm beginning to wonder if the Spiny Egg straight throwdowns aren't really an error. . . ???
~Ben
davidbrit2
04-09-2015, 08:18 AM
If they had intended the eggs to drop straight down all along, then there's a lot of completely pointless code in that routine, and that would be a lot harder to explain. I think it's pretty obvious from looking at the commented disassembly that the original intent was for angled throws, but whether it was changed to straight throws accidentally or intentionally is difficult to guess. The code certainly looks like accidental temporal coupling overwriting the register with the X velocity, but I can't imagine they wouldn't have seen that and fixed it in testing if it were unintentional.
ColecoFan1981
04-10-2015, 12:38 AM
If they had intended the eggs to drop straight down all along, then there's a lot of completely pointless code in that routine, and that would be a lot harder to explain. I think it's pretty obvious from looking at the commented disassembly that the original intent was for angled throws, but whether it was changed to straight throws accidentally or intentionally is difficult to guess. The code certainly looks like accidental temporal coupling overwriting the register with the X velocity, but I can't imagine they wouldn't have seen that and fixed it in testing if it were unintentional.
Again, (I think) only "Dr." Miyamoto would know for sure. . .
~Ben
TheRedEye
04-17-2015, 04:33 PM
Exactly. My intent of this thread was to find out whether or not people like Shigeru Miyamoto and Koji Kondo would have any rough drafts and final drafts of the SMB game code on paper prior to being programmed.
Miyamoto and Kondo aren't coders. The programming for Super Mario Bros. was farmed out to a contract studio.
Peonpiate
04-21-2015, 08:29 PM
The youtube videos that show the "original" behavior look much more difficult than the retail version. I wouldnt be surprised if they saw the bug and said keep it as it is.