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

Author Topic: DS Editing Resources for Lunar: Dragon Song  (Read 2080 times)

GhaleonUnlimited

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • Phantasy Star Generation 4 + "Found in Fanslation" Podcast
DS Editing Resources for Lunar: Dragon Song
« on: December 15, 2020, 12:35:37 pm »
I'm between projects, and reading a Let's Play of Lunar DS reminded me of how unbelievably awful the game was, and how soul-crushing it was for Lunar fans.

Are there any editing tools out there for DS games? I see RHDN has a number of DS hacks, although no retranslations, it looks like.

I can work with disassemblies, but if I had a place to start, I have some programmer friends who might be able to assist with me on this.

I relocalized and enhanced Phantasy Star IV with help and using translation notes on TCRF, and for Lunar DS I'd do similar: naturalize the script and make it fit more with the other games, use original production notes, change story points that make absolutely no sense, and work in the original Japanese meaning where possible.

And secondarily I'd see among all the awful game mechanics what could be fixed.

If anyone has a good place to start on DS games or has any help or direction in general, that'd be cool.

Thanks!

Edit: There are a few DS RHDN utilities, 2 with GUIs: DSLazy and dsbuff. They both unpacked the ROM, and there's a script.dat, but it's not readable by Notepad++ or a hex editor or anything.

Also, there's the doc on RHDN regarding DS file formats, but I'm unsure how it relates to editing the game data: https://www.romhacking.net/documents/%5b469%5dnds_formats.htm

Maybe use DSDecmp on the script file using the different compression options and see if one makes an editable file?

Also found this tool, but it's beyond my skills:

Data Processing: (say you want to decompress and move a BMP bitmap from EWRAM -> VRAM):
https://bitbucket.org/Coto88/toolchaingenericds/src/9aa4027703e76d2ef37eca92c74d85e4ed1dd6ad/src/common/arm_driver_shared/utilsTGDS.c#lines-606
« Last Edit: December 15, 2020, 02:30:38 pm by GhaleonUnlimited »
Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast
http://PSIV.GamesDoneLegit.com

FAST6191

  • Hero Member
  • *****
  • Posts: 3100
    • View Profile
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #1 on: December 15, 2020, 02:30:22 pm »
Personally I wrote this game off as beyond any kind of saving but if you must.

dsbuff and dslazy are just frontends to ndstool. There are plenty of other, arguably better, methods of pulling apart games.

That link covers some of the older versions of formats, a few of them got updated as time went on. As it is an early game though then if they used any it should work. There are tools to manipulate them -- most would probably start with Tinke, though Crystaltile2 is not without scope for something fun.


Assembly wise then the arm9.bin and things in the overlay folder are what you will want to be looking at. It might be compressed (and binaries use a different type of compression that I don't think dsdecmp supports, https://www.romhacking.net/utilities/826/ should though.
There are various disassemblers out there. Assemblers are fewer in number (I tend to use a cut down version of arm-eabi but that might not not be where most go).

I do have a guide to GBA and DS ROM hacking too
http://www.romhacking.net/forum/index.php?topic=14708

GhaleonUnlimited

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • Phantasy Star Generation 4 + "Found in Fanslation" Podcast
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #2 on: December 15, 2020, 02:35:57 pm »
Awesome, thanks so much for the help and the tools, and for creating that guide!

And no, I def cannot save Lunar:DS, haha, but for any Lunar completionist (like me -- I begrudgingly played through it all at release) I can try to take it from an F- to a D+.

And apparently Ubisoft was soliciting feedback from a few Lunar.net superfans in development, and they've posted some of their notes on what was supposed to be in the game. (Let's Play I just read through has them at the end comments: https://lparchive.org/Lunar-Dragon-Song/

Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast
http://PSIV.GamesDoneLegit.com

Jorpho

  • Hero Member
  • *****
  • Posts: 4781
  • The cat screams with the voice of a man.
    • View Profile
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #3 on: December 15, 2020, 04:37:36 pm »
Seems to me the best way to go would be to extract all the assets and write a mostly-new engine.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

PowerPanda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #4 on: December 16, 2020, 09:12:59 am »
Seems to me the best way to go would be to extract all the assets and write a mostly-new engine.

I honestly think that this is a better path. Use something like RPGMaker to completely redo the game.

Fun story: this was my very first DS game. I had finally bought a DS post-college, when I was taking public transportation for about an hour per day. Bad as this game was, I really TRIED to play it, but it had the boneheadedly stupid design decision to make yelling into the DS's microphone the trigger for running from battle. I learned that to a cheap DS mic, the bus accelerating sounded remarkably like "rrrruuuunnnn, rrrrruuuuuuuunnnnnn". So I literally couldn't play it.

GhaleonUnlimited

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • Phantasy Star Generation 4 + "Found in Fanslation" Podcast
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #5 on: December 16, 2020, 11:37:05 am »

Assembly wise then the arm9.bin and things in the overlay folder are what you will want to be looking at.

I do have a guide to GBA and DS ROM hacking too
http://www.romhacking.net/forum/index.php?topic=14708

The guide's been very helpful, lots of tools I've gotten.

So in the DS tools you linked, I tried using each command-line decompression on script.dat and the arm7 and 9, and none of them say it's using that kind of compression. :(

Script.dat within the ROM starts at 00DFA400 - 00DFA470, and CrystalTile2 also doesn't pick up any LZ77 or Huffman compression in the script part.



and this is the location of script.dat in CT2 in the ASM viewer:



The overlay folder is empty.

Is it possible this game using its own weird compression? Any ideas on what to try next? I mostly want to get to the script to edit, but yeah being able to get at anything would be a start. Thx!

I have the file of everything the Disassembler spit out as asm text but it won't let me post it here as spoiler text, being too long.

If someone wanted to remake this, I'd help with the writing/editing ;)
Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast
http://PSIV.GamesDoneLegit.com

FAST6191

  • Hero Member
  • *****
  • Posts: 3100
    • View Profile
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #6 on: December 16, 2020, 12:34:33 pm »
Heh. Not used to games not having overlays, but if it is that early on then within reason.

If it does not appear to have compression then chances are it does not (you can try compressing it with one of said same tools and seeing what size differences happen -- a compressed file tends not to compress again. Not all games used such things -- the DS uses fairly slow clunky memory that was cheap even at the time and a few kilobytes did not make a lot of odds.

script.dat in the assembly viewer is very unlikely to yield anything useful.

In the hex window the numbers at the start when flipped 0041, 0204, 0303, 0517, 0620,....) look to be counting upwards and keeping reasonably low in number, which says maybe that is file level pointers of some form (for that kind of length probably paragraph or section if that is indeed the game's text -- script.dat is by no means a sacred name or anything and could be whatever the devs wanted, or even nothing at all). Equally that many runs of 0000 would be something I expect compression algos to make very short work of which is another in the "not compressed" camp.


Anyway text script wise if you are editing an English language game then I would probably bust out the relative search tool ( https://www.romhacking.net/utilities/513/ ) and use that on the ROM to search for either a line from the game or sometimes I get lazy and do " the " without the quotes as most scripts will feature such a phrase. If it is compressed or non relative then it might not show anything but still worth a try.
If you wanted to scroll down to a bit later in the script.dat file (crystaltile2 will note what file the cursor corresponds to in the bottom status bar) to I am guessing about 0204 in from the start (though could go for 00DFA400 + 0303 and see what is there*) and maybe mess around with the file a bit (swap some values around, overwrite a section with another value you see there) and then run the game to see what changed then that might be an idea (this is a method called corruption wherein you mess up a file and see what happens in the game, whatever changes happened in the game are then a result of your efforts and hopefully you noted where those efforts were or compare between your modded ROM and stock ROM to see)

*it might be nothing, it might be for another file, it might be offset (some things count from the start of the section, not the start of the file) or relative.

GhaleonUnlimited

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • Phantasy Star Generation 4 + "Found in Fanslation" Podcast
Re: DS Editing Resources for Lunar: Dragon Song
« Reply #7 on: December 20, 2020, 01:02:51 pm »
Thanks so much for the help! Over the holiday break here I'm going to try to get more into this, try your ideas, and figure things out.
Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast
http://PSIV.GamesDoneLegit.com