Page 4 of 10

Re: short answer

Posted: Mon Apr 16, 2007 6:11 pm
by tokumaru
Bohan wrote:You know MARIO?
Some time ago there was a widely known joke (a retarded one at that) here in Brazil that started with this exact question, but it makes no sense at all in english...

EDIT: Just to stay on topic: I think disassemblies are great to learn from (research), but I don't see the point in recoding the game...

Posted: Mon Apr 16, 2007 6:17 pm
by tepples
The point in recoding the game from scratch piece by piece is to produce a Free game engine on which 100% legal homebrew NES side-scrollers can be built.

Posted: Mon Apr 16, 2007 6:28 pm
by tokumaru
I don't know, maybe it's just me, but I don't believe in the reuse of side-scrolling engines... If a person does not know how to make their own, I doubt they can adapt one. And if they do know how to make one... well... I am against using code that isn't mine, but I guess some people don't mind...

Posted: Mon Apr 16, 2007 6:39 pm
by tepples
tokumaru wrote:I don't know, maybe it's just me, but I don't believe in the reuse of side-scrolling engines... If a person does not know how to make their own, I doubt they can adapt one.
Tell that to Lunar Magic users and their total conversions of Super Mario World.

Posted: Mon Apr 16, 2007 7:51 pm
by doppelganger
To each his own, as I always say. This comprehensive disassembly is only for those who might be interested in how Super Mario Bros. works. It isn't going to create interest in disinterested people, and I don't expect it to. And this modularization effort beneficii has put forth is just one of many possible things that could offshoot from it.

Posted: Tue Apr 17, 2007 9:15 am
by Bregalad
I 100& agree with Tokumaru. I'm against using any code by anyone else if you don't understand it, and if you understand this then make your own because you should be able to do it.
Also, I'm for game engines being optimized to the particular game they're written for. The only reason to re-use a game engine as it would be to make a similar sequel or a different version a game. Quake fans will say the opposite, but since I'm 100% against Quake-like games I'm still coherent in my own ideas.

Posted: Tue Apr 17, 2007 9:17 am
by tepples
Bregalad wrote:I'm against using any code by anyone else if you don't understand it, and if you understand this then make your own because you should be able to do it.
What operating system and what web browser have you written lately?

Posted: Tue Apr 17, 2007 9:22 am
by Bregalad
Stupid joke. I meant using code directly for your own project and without using it for learning purpose.

Posted: Tue Apr 17, 2007 12:44 pm
by tokumaru
Heh, I guess Bregalad and I are a special case of "control freaks"... I'd never be able to call "mine" something I didn't know how it worked bit by bit. It's just not mine then. I'd like to be able to say in the end: "This is 100% mine".

It's like, I don't know, a person who decorates cakes, but can not bake one. If by any chance they are required to make a cake from the start, they'll not be able to. So they can't really say they know how to make cakes, although they may have finished many of them. Same thing happens with games, I guess.

Some people, however, are only interested in finishing games, and don't want to go through all the trouble of coding it all. I guess they are the target audience of such re-usable engines.

I don't think this is a bad thing, it's just not for me.

Posted: Tue Apr 17, 2007 6:21 pm
by CKY-2K/Clay Man
How would I edit it so that the fireflower doesn't use h-flipping for the right half of the sprite?

I really want to know this and I think an example of how to change something would help me a little.

Posted: Tue Apr 17, 2007 11:17 pm
by beneficii
doppelganger wrote:Oh, goddamnit. These things are coming out of the woodwork.

Yeah, I went ahead and fixed that. Then I ran a complete check on every branch and jump in the file, and could find no others. But anyway, thanks again for finding those bugs.

My methodology was simple: I ran a disassembler on the program rom, then started at the beginning (reset vector) and traced out all the code. The first version of this file I uploaded was full of gaping code and data holes.

Anyway, sometimes I would trace out more code, sometimes I would go over the code with both FCEU and my intuition to figure out what the code did, and sometimes I did both at the same time. I was able to expedite the process of figuring out the level data format by comparing notes with others who had done SMB1 hacking in the past, and I was able to actually verify that, for the most part, their own ideas were correct. Some other parts, like enemy data, I had sparse information on. For the rest of the code, however, I was for the most part completely on my own.

It became fully functional (meaning it could be assembled) sometime in February I believe. But although it was filled with comments, it was almost completely devoid of labels. So I went back and replaced all the memory locations with addresses. Some of the values which would have led to confusion I replaced with constants. This was the part I call the clean-up phase. Still, I'm only human, and even I overlooked some of them, apparently.

Anyway, that's pretty much how I did it. It's not something that anyone else with a lot of free time and a shitload of patience couldn't do.
Actually, I'm curious, what did you do to add the labels? Did you just work them in manually, or did you have a program that added as you disassembled the code?

Additionally, what do you think of using a code data logger to help disassemble?

Posted: Wed Apr 18, 2007 8:33 am
by Bregalad
tokumaru wrote:It's like, I don't know, a person who decorates cakes, but can not bake one. If by any chance they are required to make a cake from the start, they'll not be able to. So they can't really say they know how to make cakes, although they may have finished many of them. Same thing happens with games, I guess.
Yeah, but even someone who know to bake cakes needs some prior ingredients such as that poder made from cereals I have no idea how it's called in english, and you don't want to make your own each time you make a cake, because this would need your own field of weater and you'll have to cultivate it just to make poder from it to eventually bake cakes.

Posted: Wed Apr 18, 2007 10:14 am
by tepples
Powder made from grain/cereal is called flour, pronounced like "flower".

Re: short answer

Posted: Wed Apr 18, 2007 12:40 pm
by commodorejohn
tokumaru wrote:
Bohan wrote:You know MARIO?
Some time ago there was a widely known joke (a retarded one at that) here in Brazil that started with this exact question, but it makes no sense at all in english...

EDIT: Just to stay on topic: I think disassemblies are great to learn from (research), but I don't see the point in recoding the game...
Mind repeating it in Portuguese? I'm just curious.

Also, I agree with you about code reuse and calling it your work, although limited code pasting can help for educational purposes (my first NES programs had chunks lifted from the MagicKit demo code, then over time I used that as a reference to figure out how everything worked.)

Re: short answer

Posted: Wed Apr 18, 2007 1:12 pm
by tokumaru
commodorejohn wrote:Mind repeating it in Portuguese? I'm just curious.
It's too stupid... so, I ask that any other brazilian members around forgive me for propagating something so stupid...

It goes something like:
-Conhece o Mario?
-Que Mario?
-Aquele que te comeu atrás do armário!

Which translates to:
-Do you know Mario? (kids used to ask other kids this question)
-What Mario? (this was the most likely answer)
-The one that banged you behind the closet! (the first kid, feeling so smart, replied with this)

It only "makes sense" because "armário" rhymes with "Mario"... Just search Google Images for "Conhece o Mario?" for some graphical renderings of this "joke". Those are somewhat funny.
although limited code pasting can help for educational purposes
Sure, but I think people should understand exactly what goes on with a piece of code that was copied and pasted. If they don't, there might just be a case where this code misbehaves (when compared to their expectations) and they are just buying themselves some nasty bugs, while they could have coded something specifically tailored to their needs, and have no nasty surprises.