Changing Memory Items

I working on the Shining Force 3 translation and I need to know how to change the memory items I'm finding in the game files.

For instance, the character and enemy names in the game all point to the same line, which contains a memory item.

So apparently, I need the ability to change the output of that memory slot.

Can anyone point me in the right direction?

Thanks in advance for any help!

legalize freedom!
 
If you are not familiar with SF3...The files from SF3 that contain the text for the game are broken down into lines (or areas, I'll call them lines). The program then accesses these lines when it needs some text. In a menu, or conversation for example.

Usually these lines contain the exact text that the game needs. Like a conversation that has each persons dialog line on a separate line in the game file.

But sometimes memory items are substituted for actual text when there are varible things to say. Like "You found a (memory item)" so the game can use the same line for finding anything. Then it will fill in the memory item from ram.

One of the biggest uses of this is the names of the characters (friend and foe). They are all pointing to one line which contains only one memory block. So you have one status screen with many characters that can be shown.

I would like to know where does the ram get these values and how to change them at their source.

I should mention that I am using custom made software (specifically developed for this translation project) to change the normal text.

I appoligize if I am not telling you what you need to know. I am not a programmer, so please fogive my terminology.

I'm just trying to get this game translated!

Thanks for replying and thanks for your help!

legalize freedom!

Originally posted by ExCyber@Mon, 2006-07-17 @ 07:47 AM

I'm not sure what you want to do. Can you elaborate a bit?

[post=147095]Quoted post[/post]​

 
Yeah, I see what you mean. I can't supply any details about how SF3 does it, but normally how this is done is to have a "formatting sequence" (in the case of the standard C printf function, these would be strings like %d, %s, %x, etc., but SF3 is almost certainly using something else) in the string, and extra parameters passed to the display routine that supply the address or value of the thing to substitute for the formatting sequence. In the case of a string, it would be passing the memory address and possibly the length of the string to substitute (item/character/spell name). Probably what happens is something like this:

- Player triggers a "get item" event

- Game calls the "get item" subroutine with the reference number for the particular item obtained - for the sake of illustration I'll say it's item #42

- The subroutine does any checking and sorting necessary to add one of item #42 to the inventory

- The subroutine loads the 42nd entry in a table of string addresses for item names, and passes this address and the address of the common string to a display routine

Unless you're going to somehow manage to replace all of these strings with ones of equal length, you'll need to know the location and format of this table so that you can generate a new one pointing to the proper addresses for your translated strings. There are several possible approaches to finding it. One is to locate the subroutine in question and find the address of the table there. Another would be to run the game in an emulator, do a RAM dump, find the actual strings, then search for the offsets where each string begins in order to find the table.

I've never looked at SF3's code, but the situation is probably at least similar to what I've described. If you're not comfortable looking at code then you'll have to talk to somebody who will hack it for you. If you want to give it a shot yourself I'd be happy to answer any other questions you have.
 
What emulator should I use for this and what can I expect for output?

Is this the same memory dump as the action replay features? I can get codes with cassini, using the memory dump (CSS action replay.exe)... I know which memory slot it is (12)... but somehow I don't think this is what your talking about... sounds as if your expecting different output.

I suppose I will have to do it (qualified or not). What I would really like is someone who really knows how this machine works to join the translation team (even if only as a consultant). We number at least a dozen and are making excellent progress. (close to half finished with scenario 2). Just thought I'd throw that out there if anyone here is interested and qualified. You can check our message board at Shining Force Central.

I really appreciate your help ExCyber. I feel like I only have a couple of tasks I need to figure out to take this project to completion. If you can point me to the software I need to accomplish this, I will be half way there.

One more thing please. How do you get the LBA table off of the game cd?

EDIT:

These problems have been solved due to a little help from my friends. Turns out the game stores these memory items when you start a new game and then they are saved with the save game file. So I had to start a new game for the changes to become apparent.

legalize freedom!
 
Back
Top