Disassembling FF7 NES ROM?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Disassembling FF7 NES ROM?
by on (#113866)
I am wanting to disassemble the FF7 NES ROM, but when I do (with disasm) I get a lot of invalid opcodes. :( Common sense tells me this isn't a good sign, but maybe I'm wrong...

Is it possible to accurately disassemble this ROM?

Thank you very much to anyone who can offer advice and/or point me in the right direction. :)
Re: Disassembling FF7 NES ROM?
by on (#113867)
Disassembly of NES games is a bit complicated because of mappers... Disassemblers never know the size of the banks and where they'll be mapped. Also, the fact that this is a huge ass (2MB?) Chinese pirate game (meaning it probably uses some crazy mapper) doesn't help.

Lots of invalid opcodes often means that data is being interpreted as code. The best way to tell code and data apart is to play the entire game in an emulator with a code/data logger, and then use a disassembler that will take the information in this log into consideration.

Sorry if I can't give more specific information, but I'm not used to disassembling games. Hopefully someone else can suggest some actual tools you can use. I do know it's not gonna be easy... people spend months to make decent disassemblies (i.e. with meaningful labels, comments and can be assembled back into a ROM file) of 32KB games, you can imagine how long it would take to finish a 2MB ROM!

Can I ask why you're trying to do this?
Re: Disassembling FF7 NES ROM?
by on (#113869)
tokumaru wrote:
Disassembly of NES games is a bit complicated because of mappers... Disassemblers never know the size of the banks and where they'll be mapped. Also, the fact that this is a huge ass (2MB?) Chinese pirate game (meaning it probably uses some crazy mapper) doesn't help.

Lots of invalid opcodes often means that data is being interpreted as code. The best way to tell code and data apart is to play the entire game in an emulator with a code/data logger, and then use a disassembler that will take the information in this log into consideration.

Sorry if I can't give more specific information, but I'm not used to disassembling games. Hopefully someone else can suggest some actual tools you can use. I do know it's not gonna be easy... people spend months to make decent disassemblies (i.e. with meaningful labels, comments and can be assembled back into a ROM file) of 32KB games, you can imagine how long it would take to finish a 2MB ROM!

Can I ask why you're trying to do this?

OK, I'll check out the game in a logger/debugger and see what I can find.

Hmm, yeah, it might be unwieldy to use a raw disassembly of the ROM...

I'm toying with the idea of making a Final Fantasy 8 or 9 demake. :) I would prefer to do it for the NES, as it would be a good reason for me to learn assembly, and I think the demake would be more popular if it were a NES ROM than if I did it with a modern game engine or just any modern executable game.
Re: Disassembling FF7 NES ROM?
by on (#113871)
The first toward making a demake is to replicate the battle rules, such as how damage is computed. Then map out all locations and dump all scripts from the original game. Then write an engine around these. You don't necessarily need to start with the engine used for the Chinese FF7 demake, especially given that it's known not to replicate the game balance of FF7 well.

Quote:
I think the demake would be more popular if it were a NES ROM than if I did it with a modern game engine or just any modern executable game.

What you could do is make your demake in a modern environment using NES graphical limits and then port it to the NES. That's how STREEMERZ: Super Strength Emergency Squad Zeta came to be. Mr. Podunkian made it as Flash game with NES-style graphics, and then thefox ported it to NES.
Re: Disassembling FF7 NES ROM?
by on (#113878)
I feel like it would be easier to start coding entirely from scratch than to disassemble and then hack this into an entirely different FF game.
Re: Disassembling FF7 NES ROM?
by on (#113879)
Chinese games aren't well known for their good programming, and that is reflected in the gameplay even, so I too would advise against using the pirate FF7 as a base for your project. Regardless of the quality of the game, disassembling a 2MB ROM into something editable would be a tremendous amount of work.
Re: Disassembling FF7 NES ROM?
by on (#113893)
Why can't people simply leave games on the console they were designed for ?

I mean, seriously...
Re: Disassembling FF7 NES ROM?
by on (#113896)
Bregalad wrote:
Why can't people simply leave games on the console they were designed for ?

Why can't manufacturers simply leave consoles in production?
Re: Disassembling FF7 NES ROM?
by on (#113903)
tepples wrote:
Bregalad wrote:
Why can't people simply leave games on the console they were designed for ?

Why can't manufacturers simply leave consoles in production?

Irrelevant when both consoles are out of production.
Re: Disassembling FF7 NES ROM?
by on (#113904)
Bregalad wrote:
Why can't people simply leave games on the console they were designed for ?

I mean, seriously...

Why can't people freely express themselves and their desires without being judged?

I mean, seriously...
Re: Disassembling FF7 NES ROM?
by on (#113912)
rainwarrior wrote:
tepples wrote:
Bregalad wrote:
Why can't people simply leave games on the console they were designed for ?

Why can't manufacturers simply leave consoles in production?

Irrelevant when both consoles are out of production.

For one thing, one console is far more "out of production" than the other. Sony continues to manufacture PlayStation 3 consoles that use Sony's official emulator to play PlayStation game discs. (It was PS2 compatibility, not PS1 compatibility, that was removed from non-launch PS3s.) Nothing still manufactured by Nintendo plays Famicom cassettes or NES Game Paks.
Re: Disassembling FF7 NES ROM?
by on (#113927)
So "has a CD drive and an emulator" counts as more in-production? This is a strange line to draw. It's true that the CD storage medium isn't completely obsolete like ROM cartridges are now, but that's a rather oblique point to be making. Why does it even matter "how much" out of production something is? The discussion is about porting something to the NES, which is in the opposite direction it would be relevant (i.e. trying to port to something that is still in use). Anyhow, with what we're talking about in this thread, the data storage medium is not really the issue, and emulation is already a given.
Re: Disassembling FF7 NES ROM?
by on (#113929)
You do realize I wouldn't be the first person to do a demake, right? Not even close to being the first...
Re: Disassembling FF7 NES ROM?
by on (#113941)
If you want to work thousands of hours and then receive a C&D letter from Square Enix, putting all your effort to shame, then fine, go ahead.

I'd recommend you to instead develop your own game which does not break any copyright, and that would be "inspired" by the FF series. This way you're guaranteed to have success when it comes out, and to not have any problem.

I'm not saying this to be harsh, just to try give you common sense.

In my opinion the Chinese FF7 pirate just proved that no matter how much crap it is, just putting the "FF7" label on something makes a whole fuss about it. This is a disgrace made to the original FF7.
Re: Disassembling FF7 NES ROM?
by on (#113943)
Bregalad: I agree with you. But I've also seen a bunch of people claim that one can work around Square Enix's habit of sending cease-and-desist letters to fan projects by working in secrecy and not announcing the project to the public until the day of release.

As I suggested earlier: "Change 'Shinra' to 'Square' and rewrite the dialogue to be about Square Enix's fanwork ban."
Re: Disassembling FF7 NES ROM?
by on (#113949)
LMAO, great idea Tepples! I could totally nerd out writing up an FF7 parody script about that.
Re: Disassembling FF7 NES ROM?
by on (#113952)
Bregalad wrote:
If you want to work thousands of hours and then receive a C&D letter from Square Enix, putting all your effort to shame, then fine, go ahead.

Well, at least you get to keep the letter as a souvenir.

Quote:
I'd recommend you to instead develop your own game which does not break any copyright, and that would be "inspired" by the FF series. This way you're guaranteed to have success when it comes out, and to not have any problem.

This is indeed the safest route, but demakes are fun to make, and sometimes that's exactly what we want to make.

Quote:
This is a disgrace made to the original FF7.

Chinese programmers make crappy NES games because of shitty quality control, but they often prove that the hardware can do more than we thought was possible.
Re: Disassembling FF7 NES ROM?
by on (#113955)
I played this ROM hack of the Chinese FF7 for a little while and found it enjoyable (99% thanks to nostalgia about the PSX version), even though it's far from perfect. Looks like they have the engine figured out pretty well, too.