Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 08-08-2005, 03:38 AM   #1
Glass
Regular Member
 
Join Date: Apr 2004
Posts: 42
Default DTE on NES help.

I stumbled upon KingMike's DTE tutorial in that other thread and thought I might try to apply the technizques in it onto Fire Emblem 1. Anyways, I got hung up at this part:

"We are going to want to look for a large chunk of empty RAM space, specifically about 300 bytes or more (about a page and a half or more of 00s or FFs are usually a good clue). We see some around 9650 to 9DFF. We could relative search a string of hexadecimal numbers nearby to find that bank in the ROM, but we also know that this is the same RAM bank we're in already (8000 to BFFF is a bank in this game), so we know it's 28000+(9650-8000=1600) or 29650. So, let's make a jump from the original code to here."

Now, I've found my swatch of empty RAM at $B6D0, but I am unable to find the appropriate ROM equivalent using those methods. Relative searching brings up no results, and I'm not quite sure where those numbers from the formula are being pulled from. Can anyone help me?
Glass is offline   Reply With Quote
Old 08-08-2005, 04:03 AM   #2
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: DTE on NES help.

> Now, I've found my swatch of empty RAM at $B6D0,

You must mean ROM -- as RAM lies within $0000-$07FF and sometimes $6000-$7FFF [img]/wwwthreads/images/icons/tongue.gif[/img]

But I'm just being anal

> but I am unable to find the appropriate ROM equivalent using those
> methods.

Save yourself a headache -- get FCEUXD, use the built in hex editor. When you find that area at $B6D0 in NES addressing space, right click on it in the hex editor and select "Go here in ROM file" -- it'll jump to it in the ROM and you can get the offset that way.
Disch is offline   Reply With Quote
Old 08-08-2005, 05:40 AM   #3
Glass
Regular Member
 
Join Date: Apr 2004
Posts: 42
Default Re: DTE on NES help.

> You must mean ROM -- as RAM lies within $0000-$07FF and
> sometimes $6000-$7FFF
I was phrasing it differently. :/

> Save yourself a headache -- get FCEUXD, use the built in hex
> editor. When you find that area at $B6D0 in NES addressing
> space, right click on it in the hex editor and select "Go
> here in ROM file" -- it'll jump to it in the ROM and you can
> get the offset that way.
I didn't knoew FCEUXD had that function... thanks.
Glass is offline   Reply With Quote
Old 08-08-2005, 04:40 PM   #4
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: DTE on NES help.

> I was phrasing it differently. :/

I saw it written that way in that doc too -- pretty yukky. ROM != RAM, he shouldn't refer to it as though the terms are interchangable, they're two distinctly different things.

But like I said I was just being anal. You knew what you were talking about.
Disch is offline   Reply With Quote
Old 08-08-2005, 04:52 PM   #5
Gil-Galad
Senior Member
 
Gil-Galad's Avatar
 
Join Date: Aug 2000
Posts: 658
Default Re: DTE on NES help.

King Mike is also working on Fire Emblem 1. He may not have it on his site but he was asking for translators at the whirpool.
Gil-Galad is offline   Reply With Quote
Old 08-09-2005, 02:48 AM   #6
KingMike
Regular Member
 
Join Date: Aug 2005
Posts: 41
Default Re: DTE on NES help.

> Now, I've found my swatch of empty RAM at $B6D0, but I am
> unable to find the appropriate ROM equivalent using those
> methods. Relative searching brings up no results, and I'm
> not quite sure where those numbers from the formula are
> being pulled from. Can anyone help me?
>

I'm still working on FE1, though I'm waiting for translated scripts to insert.
In my case, I just expanded the ROM, and edited the text loading functions to load from expanded portions of the ROM, then swapped the original back in after an end-of-string code is detected.
I wouldn't recommend DTE as it's described in that doc on FE1, though. FE1 reads the text directly into a buffer, then later goes back and prints the buffer to the screen. It would be better to hack the buffered read.
Also, FE1 uses a seperate function for each block (if memory serves right) to load the text from ROM to the buffer. Meaning you'd have to hack a lot of routines.
A DTE may work if you hacked the routine that copies the buffer to the screen. But I suppose that's a step up in complexity.
But, to answer how those numbers came about. That section of the doc now sounds kinda unnecessary. You got the RAM address, but more so, the data. Try looking at the last line of data before the empty space, and searching for the data in the ROM. You should find the same data in ROM, with a similar chunk of empty space at something ending in 6E0 (we added 10 to the last 3 digits because of the ROM header). Did you find the original text routine like I said in the doc? That's the other thing you need to know.
I got the numbers because:
1650 (1600 was a typo) = how far from the start of the current bank our empty space starts. (9650 = RAM position of empty space, 8000 = start of RAM bank, I just subtract the two)
28000 (I figured this out, because 28000 was the nearest multiple of $4000 (that game's ROM bank size) to the original text offset).
KingMike is offline   Reply With Quote
Old 08-09-2005, 02:56 AM   #7
KingMike
Regular Member
 
Join Date: Aug 2005
Posts: 41
Default Re: DTE on NES help.

> > I was phrasing it differently. :/
>
> I saw it written that way in that doc too -- pretty yukky.
> ROM != RAM, he shouldn't refer to it as though the terms are
> interchangable, they're two distinctly different things.
>
Sorry, that probably seemed the easiest way of writing at the time.
Just trying to show as it appears among the memory viewer, used RAM for lack of a better term. (Addressable space?)
KingMike is offline   Reply With Quote
Old 08-09-2005, 03:31 AM   #8
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: DTE on NES help.

> Just trying to show as it appears among the memory viewer,
> used RAM for lack of a better term. (Addressable space?)

Easiest way to explain does not equate to the best way to explain, imo. It's great teaching people stuff, but teaching them wrong might be worse than not teaching them at all (not that I'm accusing you of that -- I mean this detail was so minor.. I didn't mean to make such a big deal out of it ^^)

but yeah I call it "Addressing Space", or "CPU Space"... or hell "PRG" or "PRG space" would do. But calling it RAM is inaccurate --- it isn't RAM.
Disch is offline   Reply With Quote
Old 08-09-2005, 03:08 PM   #9
Glass
Regular Member
 
Join Date: Apr 2004
Posts: 42
Default Re: DTE on NES help.

> Also, FE1 uses a seperate function for each block (if memory
> serves right) to load the text from ROM to the buffer.
> Meaning you'd have to hack a lot of routines.
Yes, I realized that after soon after I tried the text replace code. I was only looking for another game to apply your tutorial to, but as it seems FE1 isn't so good a game to use it on ^_^;;
Glass is offline   Reply With Quote
Old 08-10-2005, 03:58 AM   #10
Glass
Regular Member
 
Join Date: Apr 2004
Posts: 42
Default Re: DTE on NES help.

> I'm still working on FE1, though I'm waiting for translated
> scripts to insert.
Anyways, the FE board I frequent has had someone trying to translate the game as well, but he's only done it up to chapter 4. I'm not sure whether he's babeling it or using actual translations either. Hmm.
Glass is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:36 AM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.