News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Legend of Mana - Difficulty finding the executable files on disc.  (Read 2068 times)

MeshGearFox

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
I've been working through a RAM dump of LoM for about a week and I have some assembly fragments I want to drop into the game. Problem is, I can't actually find the executable files I need to modify on the disc.

It has about two megabytes of .bin files, which appear to be executables, however they don't match up with the executable code in the RAM dump. I'm not sure if it uses a non-standard filesystem or if the .bin files are just encrypted. The disc actually looks like it DOES have a standard filesystem for the most part -- it's not like in CC where almost everything's hidden.

Any ideas how I could go about sorting through this? Has anyone worked on this game before?

(SLUS_010.13 is the main executable. It looks like it loads the rest of the executable stuff into memory, and his happens when you select Load or New from the main menu. There's some unused space in this file, and I thought about possible inserting some functions there to change the executable code in RAM after it's already been loaded. I don't know if this works or not, though).

Scio

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: Legend of Mana - Difficulty finding the executable files on disc.
« Reply #1 on: February 06, 2014, 11:37:48 pm »
Did you try this?
http://www.romhacking.net/utilities/920/

Also a document that uses LoM as an example:
http://www.romhacking.net/documents/130/

MeshGearFox

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Legend of Mana - Difficulty finding the executable files on disc.
« Reply #2 on: February 07, 2014, 08:42:45 pm »
That works for decompressing the file but if I re-encode it, the output is incorrect -- decompressing and recompressing FIELD.BIN without making any changes didn't give me the same compressed file I originally had. This is causing a few issues when re-inserting the file into the ISO, especially since it looks like the re-compressed file is bigger than the original.

Any ideas how to address this?

--- edit ---

Nevermind, got it working. I had to truncate the re-compressed file down to the expected size, and then change the last six? bytes back into something that the decompressor could use. Looks like CDMage was truncating those at a weird point, so that the byte indicating that the compressed data was done got lot.
« Last Edit: February 08, 2014, 01:29:03 am by MeshGearFox »

CUE

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Nasío pa'jakear
Re: Legend of Mana - Difficulty finding the executable files on disc.
« Reply #3 on: February 08, 2014, 05:42:07 am »
LoM uses a hidden LBA table in SKCDPOSE.DAT. I have a tiny tool to reinsert the files and update the image file: https://www.mediafire.com/?9q04a6p35h4dxro
Usage: chg isoname filename [filename [...]]

NOTE: Do not use CDMAGE to reinsert the files!!!

MeshGearFox

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Legend of Mana - Difficulty finding the executable files on disc.
« Reply #4 on: February 09, 2014, 10:42:02 am »
Oh hey, thanks a lot! That should things a lot easier going forward.