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

Author Topic: Seiken Densetsu 3 decompression (source code here)  (Read 5836 times)

giangurgolo

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
    • giangurgolo rom hacking page
Seiken Densetsu 3 decompression (source code here)
« on: March 16, 2011, 01:33:34 am »
I wrote a .NET program which draws and displays the levels in Seiken Densetsu 3. It's a WIP build, and unstable so don't try to edit anything. You can move between level indexes with no problems, though. All 1114 levels draw flawlessly as far as I know, and you can export all levels as images too. I'm only releasing this if anyone out there is willing to reverse engineer the decompression code and make recompressing and saving maps possible. If it never happens, no big deal. In case anyone can expand on this, they're welcome. I'm probably not going to work on this anymore because it's just way too much work, way more than I should be willing to invest time in (more than I already have, at least).

Here is the ROM map. Almost all offsets documented are level-related.
Here is the build: http://home.comcast.net/~giangurgolo/MAPJESTER.zip
Here is the source (the reason for this thread): http://home.comcast.net/~giangurgolo/MAPJESTER_v1.0_20110316_001131.rar

Note that this is a WIP build, not even a beta, so it is not capable of saving. I put an architecture exporting feature which lets you export all the elements of a map into a single file and import it into another game. Lazy Shell v3.5 has the import option available (not released to public yet). Video demonstration of architecture porting.

The decompression is in the Comp.cs file (in the Static folder). SD3 has at least FOUR different compression formats (one each for level graphics, tilesets, solidity, and tilemaps), and possibly more but only these four are used in levels. Ignore the compression code at the beginning of the file (it's for FF5); the 4 SD3 decomp functions are obvious (marked by _SD3). Commented lines are the ASM addresses converted into C#; some functions are named based on the offset of subroutines used by the 4 decomp functions. DP_## variables are named based on the direct page registers in the 65816 asm. The buffer array is where the decompressed data is stored and used by the program. I tried simplifying the code from the ASM to C# conversion as much as possible.

obscurumlux01

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #1 on: March 19, 2011, 11:53:18 pm »
DeJap Translations did the English translation for this game.  If they're still around, might wanna talk to them, as they'd know all about the compression used for SD3.  Even with 'text only' translations, they often figure out the graphics part as well, if only to edit the title screen (like in Tales of Phantasia).

As for how to get in touch with them, I really don't know for certain, google is your friend.

Azkadellia

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 868
  • 提交向你的情妇!
    • View Profile
    • Princess Translations
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #2 on: March 20, 2011, 12:02:53 am »
Unfortunately, DeJap translations is dead. This post explains everything: http://board.zsnes.com/phpBB3/viewtopic.php?f=7&t=2010
Current Projects: On hold indefinitely.
I do the Twitter thing now: https://twitter.com/MistressSaeko (expect lots of game streaming announcements)
Mistress of the RHDN Discord server.

Lilinda

  • Hero Member
  • *****
  • Posts: 4538
    • View Profile
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #3 on: March 20, 2011, 10:24:54 am »
Also, DeJap did not translate this. >_>
Retired moderator/staff member as of July 14th 2016

Azkadellia

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 868
  • 提交向你的情妇!
    • View Profile
    • Princess Translations
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #4 on: March 20, 2011, 04:59:09 pm »
Right. Neill Corlett hacked it and SoM2Freak, Lina`chan, and Nuku-nuku translated.
Current Projects: On hold indefinitely.
I do the Twitter thing now: https://twitter.com/MistressSaeko (expect lots of game streaming announcements)
Mistress of the RHDN Discord server.

obscurumlux01

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #5 on: March 20, 2011, 11:21:05 pm »
Forgive me for the misinformation then, I didn't realize that DeJap was gone.  I also didn't realize that SD3 was done by another team.  >_<
Anyhoo, contact those guys who did SD3 and ask em, if they're still around.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7003
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #6 on: March 20, 2011, 11:28:54 pm »
Here's his homepage. Hasn't been updated since last year, but it seems he only updates every couple of years anyways. :D
"My watch says 30 chickens" Google, 2018

magno

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Traducciones Magno
Re: Seiken Densetsu 3 decompression (source code here)
« Reply #7 on: April 16, 2011, 03:44:11 pm »
Really interesting!! I donwloaded the app to test it.

I also translated the game into Spanish and did my own tool to recompress graphics, move data blocks, recode the Huffman tree and some other issues which make the tool specially suitable for translating the game into other languages (in fact, some translations are currently being done with my tool: german, russian, swedish...)

I had to code routines to compress and decompress graphics (for the 4 compression schemes), and I could send them to you is you are interested on them. They were wrote in C.