News:

11 March 2016 - Forum Rules

Main Menu

Fire Emblem 1 (NES) Romhacking Documentation

Started by Quantam, June 27, 2022, 04:14:25 AM

Previous topic - Next topic

Quantam

To whom it might concern:

I'm currently reverse-engineering Fire Emblem: Shadow Dragon and the Blade of Light (NES). I don't know if I'll ever get around to writing formal documentation at some point (I'm still a ways off from even answering that question), but I'm making my testbed program I use to test discoveries available to the public, in case anyone is interested in hacking the game. While it should be equally applicable to any of the versions based on the Japanese version, I use this translation.

https://github.com/TheRealQuantam/fe1dump

This is still under active reverse-engineering, and I intend several more major features to be added eventually. At present the tool generates map images, including map objects, and portrait images; what I'm currently working on is figuring out the dialog scripting system. If you are interested, watch that repository, as I probably won't update this thread every time I implement a new feature of the game.

Polinym

#1
Hi there! Nice work on that FE1 stuff already. I should let you know that there are a few subtle differences between my translation and the original Japanese version internally, mostly the new item equipment table, dictionary, omission of unused text, and relocating of text data. The game should play the same as the original otherwise (bugs aside).

Quote from: Quantam on June 27, 2022, 04:14:25 AM
what I'm currently working on is figuring out the dialog scripting system.

The scripting system is pretty straightforward with a few quirks. The first line in a dialogue sequence must contain some control codes that set up the windows on the screen for text and portraits. I can give you all the specific details if you need them. Lines can either by followed by an [END] (0xFF) or one of two [JUMP] control codes to start another line. One version of [JUMP] expects control codes at the start, while the other doesn't. The second byte in the sequence of a [JUMP] is the bank to switch to, only the game LSR's the bits four times to get that value. The third byte is the line number. There are a few other control codes to change music, turn of portrait mouth movements, preserve music after an item menu messages. Also, if two portraits have been called in a dialogue, [JUMP]ing to another line will switch who's talking without the need of a control code.

Edit: Oh yeah! And I should also mention that bytes 0x8f and 0x8e are control codes to insert Dictionary entries, with the following byte being the entry number. Dictionary #1's at the bottom of the fixed bank, and Dictionary #2's near the bottom of the first bank.
"Where are you going, soldier? Get back to the battle!" - Some Battlefront Clone
My YouTube Channel: https://www.youtube.com/channel/UCJqSB4xw29TTKlia5E0NYtQ

Quantam

I figured the text stuff would probably be translation specific, since the Japanese version didn't even have lowercase letters in its character set.

And yeah, I'd figured out most of the stuff you mentioned about the scripts, and started implementing a script decoder last night. I still have a number of unidentified opcodes, but finding where those opcodes are even used will help with that.

Quantam

What I could use, if anybody knows of any, is "movies" (TAS-style input captures) of Fire Emblem 1, either in English or Japanese.

Polinym

I don't have anything like that, but I have a ton of documentation, notes, and knowledge about the game that I've gathered when I made my own FE1 editor. If you want to know how to set up any scenario, I can tell you how.
"Where are you going, soldier? Get back to the battle!" - Some Battlefront Clone
My YouTube Channel: https://www.youtube.com/channel/UCJqSB4xw29TTKlia5E0NYtQ

Quantam

Quote from: Polinym on June 27, 2022, 09:30:06 PMI don't have anything like that, but I have a ton of documentation, notes, and knowledge about the game that I've gathered when I made my own FE1 editor. If you want to know how to set up any scenario, I can tell you how.
You made an FE1 editor? Where?

MKnightDH

Hello there. I assume you'd be heading this project. If so, I had made a hack that modified doubling thresholds to be more player phase friendly. I showed it off here:
I would be up for knowing what you think.

Polinym

Quote from: Quantam on June 27, 2022, 11:40:33 PMYou made an FE1 editor? Where?
It's something I've used privately to make my own FE1 hack Time For Tom and fix up the translation. I talk a bit about it here: https://forums.serenesforest.net/index.php?/topic/96110-fe1-project-war-of-darkness-enhancements-and-randomizer-open-beta/&tab=comments#comment-5930033. Not sure on whether I want to release anything to the public, though. I'm happy to use it to make edits for people though! (Except make a "localization" with NoA's revisionist names :P)

I'm still up to share all the FE1 knowledge I know, though. I found this FE1 Public Document (https://www.dropbox.com/sh/pr9roh0rriuckc2/AAAiLr76X7PIVGRHz0rF6muAa?dl=0) by Darmann to be immensly helpful too.

Quote from: MKnightDH on June 28, 2022, 12:17:58 AMHello there. I assume you'd be heading this project. If so, I had made a hack that modified doubling thresholds to be more player phase friendly. I showed it off here:
I would be up for knowing what you think.

Changing how doubleing works sounds like a cool idea! Personally, though, after making many tweaks like that to the base game (see first link), I've decided that there's no real point to making further improvements to the base game. I could see a doubling hack as a neat additional to another original hack like Time For Tom should I ever get around to doing another. I've got a lot of projects to work on, but I've also got an itch to make more Fire Emblem levels!
"Where are you going, soldier? Get back to the battle!" - Some Battlefront Clone
My YouTube Channel: https://www.youtube.com/channel/UCJqSB4xw29TTKlia5E0NYtQ

Quantam

Quote from: Polinym on June 27, 2022, 12:35:08 PM...

Oh my. I just realized the entire lower-level (but not upper level) dialog compression system was something you made.

Polinym

Yup, both dictionaries were added by me so I could have a completely unabridged script. There's enough space to where I could add even more dictionaries if I wanted to. I also added an item-type table and two promotion tables that allow you to add more weapons/promotions into the game.
"Where are you going, soldier? Get back to the battle!" - Some Battlefront Clone
My YouTube Channel: https://www.youtube.com/channel/UCJqSB4xw29TTKlia5E0NYtQ

Darrman

Hi, I'm an FE1 guy. Polinym already linked my documentation, so I don't see any need to link it again. There is already a disassembly by StanHash (StanH on Fire Emblem Universe): https://github.com/StanHash/fe1
Good luck with your reverse-engineering.

Quantam

Polinym: I (just now) see you released hack version 1.3 about 15 hours after I made this thread. Are there any changes I should be concerned with?

Polinym

I fixed a bug with all the village music and with the shops. All the pointers, code, and such you'd be concerned with should be untouched, with a minuscule chance of a line of text or two having slightly changed positions.
"Where are you going, soldier? Get back to the battle!" - Some Battlefront Clone
My YouTube Channel: https://www.youtube.com/channel/UCJqSB4xw29TTKlia5E0NYtQ