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

Author Topic: Help with translation "Daisenryaku Expert" / "Great Strategy Expert" SNES  (Read 2843 times)

gc8tech

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Hello All,

Been working on my 2nd translation of "Daisenryaku Expert" for the SNES.

I can find the menu and dialog text uncompressed in VRAM....





BUT its compressed in the ROM.

Dialog text is compressed some were in 016C00 to 017BFF..

Menu ONLY text is around 014C00 TO 0167FF..

But i have no idea with what.. I thought it might be LZSS.... But i can't get it to decompress with some of the utils i found. I still might be doing it wrong and using the wrong starting address.

I know the text is in there... When i 00 it all out.. the text disappears in the game... but the game runs OK.

I'm guessing i need a utill that will uncompress the images, allow them to be edited.. and compressed back into the ROM.
That's were I'm stuck with.... Can anyone lend a hand??

D.


zhade

  • Full Member
  • ***
  • Posts: 193
    • View Profile
    • zhaDe's stuff
Re: Help with translation "Daisenryaku Expert" / "Great Strategy Expert" SNES
« Reply #1 on: September 18, 2015, 02:10:49 pm »
Do you mean that the characters are compressed in the ROM or the text ? Based on your images im guessing you meant the characters.
I know nothing about compression but you could try to avoid it by expanding the rom, putting uncompressed graphics there and find the routine that loads the compressed graphics in the VRAM and make it branch to a new routine that will overwrite the VRAM where the characters are with your uncompressed graphics. Altho its kind of cheating, it could be easier than to find the compression algorithm if its not a common one.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7061
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Help with translation "Daisenryaku Expert" / "Great Strategy Expert" SNES
« Reply #2 on: September 18, 2015, 08:42:56 pm »
Although LZSS compression is very common on the SNES, there are numerous variants that I don't think there would be a good tool for it.
(I've been using one I wrote but heavily modified for every game)
Differences such as:
-is the image size stored the compressed or uncompressed size
-is a 0 bit a compressed or uncompressed flag?
-what direction to read the bits representing the compression flags (bits stored right-to-left or left-to-right)
-size of LSZZ flag values (most are 1 byte, or 8 flags per loop, but 16 can be done and I might've even seen it before)
-LZSS read buffer size
-the bit order of LZSS read codes
-which also affects the maximum size of an LZSS run. Most often it's 4 bits length (possible range 3-18 bytes) and 12 bits offset (buffer size 4KB) but games can shift that bit distribution (such as I know I've seen at least one go 5/11)
-are LZSS read buffer pointers absolute or relative
-is LSZZ buffer initalized before use?
-the initial write offset in the LZSS buffer (often 0, but I've seen 0xFEE more than once)
-plus also Jelly Boy 2's decompression function had a bug detecting bank boundaries so any data that crossed an address 0x?7FFF would continue 32KB later in the ROM. So I had to modify my decompressor to emulate that bug once I figured it out (as it affected one graphic that needed localization).

And that's not counting finding pointers to said data.

On GBA/NDS there are tools because the BIOS have a built-in decompressor, as such the exact "standard" format has defined all those details. Whereas SNES has not.
I'm assuming GBA/NDS games using BIOS decompression would have some sort of standard code to call that function that tools can sniff for to find code.
« Last Edit: September 18, 2015, 08:48:05 pm by KingMike »
"My watch says 30 chickens" Google, 2018

gc8tech

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Help with translation "Daisenryaku Expert" / "Great Strategy Expert" SNES
« Reply #3 on: September 19, 2015, 07:12:22 am »
Thats were i'm stuck. I'm not a programmer.. So would never be able to write my own tool to decompress or edit and compress back to the rom'

I also haven't found were the routine for un-compressing is... BUT i know that the VRAM does not alway have the menu letters decompressed in the VRAM... They are only there when the menus are about to be displayed. EG the main title menu does not have them.. so they are not un-compressed in the VRAM.. BUT when in a battle screen.. They are in VRAM. Cos you need the menus to tell your units what to do...

I'm guessing doing a course on ASM is probibly the way forward from here...

D.

zhade

  • Full Member
  • ***
  • Posts: 193
    • View Profile
    • zhaDe's stuff
Re: Help with translation "Daisenryaku Expert" / "Great Strategy Expert" SNES
« Reply #4 on: September 21, 2015, 03:21:16 am »
Good luck ! there is some good asm tutorials and reference docs on snesdev. ASM is not as complicated as it might seems when you first look at it, perssonally I tried to learn it years ago but I thought it was too complicated and gave up but later, once I used geiger's snes9X debugger, it all made sense pretty quickly since you can use breakpoints and follow the code as it is beign executed. Atho personally I was used to "normal" programming before learning it.
Working with VRAM might not be the best place to start to understand ASM, I would suggest trying to do something else first but if your project is what drives you and you become OCD like me until it works, go ahead !

When I started learning, people on the romhacking.net IRC chat were kind enough to answer my noob question and/or direct me to documents that would answer them, so feel free to ask there if you need information.

This game looks fun, I hope you manage to translate it.


The game most likely re-use the VRAM adresses that are needed for the characters for other things when characters are not needed, you would need to find where the routine that loads the characters graphics into the VRAM is located, so you can know where the compressed graphics are located in the ROM and try to understand how the compression works or modify the routine that loads the graphics into the VRAM so that it loads your custom uncompressed graphics instead.

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Help with translation "Daisenryaku Expert" / "Great Strategy Expert" SNES
« Reply #5 on: September 21, 2015, 03:47:25 pm »
Thats were i'm stuck. I'm not a programmer.. So would never be able to write my own tool to decompress or edit and compress back to the rom'

I also haven't found were the routine for un-compressing is... BUT i know that the VRAM does not alway have the menu letters decompressed in the VRAM... They are only there when the menus are about to be displayed. EG the main title menu does not have them.. so they are not un-compressed in the VRAM.. BUT when in a battle screen.. They are in VRAM. Cos you need the menus to tell your units what to do...

I'm guessing doing a course on ASM is probibly the way forward from here...

Actually, I have to disagree with that statement. If this is indeed LZSS, all you need is a good mind, time and very basic programming skills in a language of your choice. (Java, C, C++,C#, Ruby, Python - each person will give you his or her advice for this. I'd just say the first 3-4 rock, the rest is up to you!) Just focus on files & numbers. ;)

gc8tech

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Well i have started work on the DE WWII version first. Not all the txt is compressed. I have been slowly changing the menus to english. There is still some compressed stuff that i can't find.. yet. Just trying to do the stuff i can do.. then maybe get help latter??

I have only "Move" and "Info" done on the ingame menu.. But its a start. I want to build another DEV cart for SA1 so i can play it on a real SNES system!

D.

PS Here is a pic of the menu... I have done a bit more....



October 04, 2015, 07:48:03 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Now that this project is making progress... Should i do a post in the "Personal Projects" section now??

D.
« Last Edit: October 04, 2015, 07:48:04 am by gc8tech »