News:

11 March 2016 - Forum Rules

Main Menu

Lagrange point text tile editing

Started by Drakon, January 27, 2013, 01:30:45 PM

Previous topic - Next topic

Drakon

I've been interested in learning how to hack a rom from japanese to english.  I decided to learn on lagrange point since it's a great game that I'd love to see in english.  I learned how to make tables and find japanese text in the rom and change it into other japanese text.  I'm trying to change the text graphic tiles from hiragana into english but all tile editing programs I tried don't display the tiles from lagrange point properly.  They work with other nes roms but not this one.  Is there something I need to do to make it work?

Gideon Zhi

Lagrange Point's data, both graphical and text, is compressed. You're not going to be able to get at either without special hand-rolled tools and a hefty amount of assembly-level reverse engineering. It's definitely not a beginner project.

Drakon

#2
Quote from: Gideon Zhi on January 27, 2013, 02:01:21 PM
Lagrange Point's data, both graphical and text, is compressed. You're not going to be able to get at either without special hand-rolled tools and a hefty amount of assembly-level reverse engineering. It's definitely not a beginner project.

Yikes.  I found the text and managed to edit that so that's interesting.  I don't suppose you have a version kicking around where you changed the japanese text tiles into english.  I noticed lagrange point hasn't had any progress in a long time, is the compression the reason why?  Also does the game use standard compression or something special?

*edit*

Methinks this's what I need:



http://www.romhacking.net/utilities/554/

I downloaded python but I'm having trouble getting it to work how I want it to.  Yowza.  It runs, it decompresses, but the decompressed file is only 1-2k size and it's not giving me nes tiles yet.  Either I'm doing something wrong or this program uses a different compression format.  Anyway I found this classic post by you:

http://forums.nesdev.com/viewtopic.php?t=3344

So you've broken the compression.  The type of compression isn't posted, I'd love to work on this game for fun, but I guess it's above me, darn.

Gideon Zhi

Quote from: Drakon on January 27, 2013, 02:34:01 PM
I noticed lagrange point hasn't had any progress in a long time, is the compression the reason why?

No. The original compression's been broken, and has been replaced with something slightly more powerful. Part of the problem is that the text still doesn't fit, so there's been a slow and arduous editing process to get it rewritten to a point that is both concise AND highly representative of the original meaning. Another part of the problem is that the game crashes when you level up. *Another* part of the problem is that there are a whole lot of interfaces that still need work, and stuff is broken all over the place as a result of having strings longer than the game's original max length needing places to go on-screen. A bunch of them have been fixed up, but a bunch are still broken.

There are other reasons too. But those are the technical ones.

Bregalad

Have you tried to process the script with my CompressTools, which has about 10 different compression shemes, all of them being simple enough to be implemented on the NES, while minimizing additional ROM/RAM usage ?

Drakon

#5
Quote from: Gideon Zhi on January 27, 2013, 04:05:09 PM
No. The original compression's been broken, and has been replaced with something slightly more powerful. Part of the problem is that the text still doesn't fit, so there's been a slow and arduous editing process to get it rewritten to a point that is both concise AND highly representative of the original meaning. Another part of the problem is that the game crashes when you level up. *Another* part of the problem is that there are a whole lot of interfaces that still need work, and stuff is broken all over the place as a result of having strings longer than the game's original max length needing places to go on-screen. A bunch of them have been fixed up, but a bunch are still broken.

There are other reasons too. But those are the technical ones.

Haha.  I like how you list a bunch of technical stuff and then end it with "there's other reasons but they're technical".  So is it currently crashing only because the file is too big?  I'm really interested in this project but I read on your website that you dislike update questions and whatnot so I didn't want to bug you about it.

Quote from: Bregalad on January 27, 2013, 04:09:38 PM
Have you tried to process the script with my CompressTools, which has about 10 different compression shemes, all of them being simple enough to be implemented on the NES, while minimizing additional ROM/RAM usage ?

Thanks.  Since gideon says he "broke" the compression I'm thinking maybe it's not a standard type?  I'll try this but I'm not getting my hopes too high haha.

*edit*

Can't even get these to run after installing java, oh well.

Gideon Zhi

Quote from: Drakon on January 27, 2013, 04:20:11 PM
Haha.  I like how you list a bunch of technical stuff and then end it with "there's other reasons but they're technical".  So is it currently crashing only because the file is too big?  I'm really interested in this project but I read on your website that you dislike update questions and whatnot so I didn't want to bug you about it.

Thanks.  Since gideon says he "broke" the compression I'm thinking maybe it's not a standard type?  I'll try this but I'm not getting my hopes too high haha.

Nono, you misunderstand. There are other non-techincal reasons which I can't get into right now, but the ones I listed are the technical ones. And I'm not sure why level-ups are crashing. But yeah, it's also crashing because the file is too big, and some strings (item names and the like) are overflowing their on-screen window space, which looks really nasty even if it doesn't straight-out crash the game.

And there's really no such thing as "standard" compression. Even something simple like lempel ziv can be implemented in dozens of different ways. When I say that I "broke" the compression I mean that I've rewritten the game so it uses a different scheme than it was originally programmed for. In most cases when I "break" compression it means I'm streaming uncompressed text data directly from the ROM. In LP's case there isn't really enough space for that, so it just means that the game is now using a different, more efficient compression scheme.

From a technical standpoint, there are upsides and downsides to working on NES games. The good news is that FCEU X is an extraordinarily powerful debugger, and with it an accomplished hacker can perform complex hacks in a fraction of the time it'd take to do the same hack on the SNES with its comparatively stone-age tools. On the other hand, it's notoriously difficult to expand NES games. This makes finding space for translated text a gigantic headache, as English scripts generally require double the space of their equivalent Japanese counterparts, whereas expansion and text relocation on the SNES is usually trivial. I've gotten to the point where the technical stuff on the SNES is much easier to solve than the text crunch on the NES, and as such I personally generally prefer to work on SNES games. Just saying.

Pennywise

QuoteOn the other hand, it's notoriously difficult to expand NES games.

That's a myth my friend. The problem with the Lagrange Point is that the mapper doesn't support PRG-ROM sizes of anything over 512kb and if we could expand the ROM to 1MB, it would be incredibly easy to make the game access the free space. Now, you could probably still expand the game to 1MB and create a custom mapper, but as far as I know any existing physical board would never be able to support it, including the original game board.

Gideon Zhi

Quote from: Pennywise on January 27, 2013, 07:09:43 PM
That's a myth my friend. The problem with the Lagrange Point is that the mapper doesn't support PRG-ROM sizes of anything over 512kb and if we could expand the ROM to 1MB, it would be incredibly easy to make the game access the free space. Now, you could probably still expand the game to 1MB and create a custom mapper, but as far as I know any existing physical board would never be able to support it, including the original game board.

Which is a problem: it'd be incompatible with most emulators as well as the original hardware. What we'd be creating would no longer be an NES game, as it would conform to no existing hardware standard. That's not a step I'm willing to take.

Pennywise

#9
Right, this kind of problem only exists for ~5% of Famicom games (excluding stuff like CNROM). Pretty much the majority of all games never utilized the maximum ROM sizes a mapper supported and therefore can be expanded pretty easily. I think a good chunk of the non-expandable ones are the Konami VRC games, but I've actually expanded two Konami VRC variants, so some are expandable.

Oh, yeah. The NES could support a 1MB Lagrange Point ROM, but someone would have to make a flashcart/new board that could run the ROM properly. So technically it's within the realm of possibilities. If only there were something like a SD2NES...

Drakon

#10
Wait...do you have to re-write the rom code to support the new type of compression?

Quote from: Pennywise on January 27, 2013, 07:43:00 PM
Right, this kind of problem only exists for ~5% of Famicom games (excluding stuff like CNROM). Pretty much the majority of all games never utilized the maximum ROM sizes a mapper supported and therefore can be expanded pretty easily. I think a good chunk of the non-expandable ones are the Konami VRC games, but I've actually expanded two Konami VRC variants, so some are expandable.

Oh, yeah. The NES could support a 1MB Lagrange Point ROM, but someone would have to make a flashcart/new board that could run the ROM properly. So technically it's within the realm of possibilities. If only there were something like a SD2NES...

I'd prefer finding a way to get it to run with the real vrc7.  I find flashcart reproduction of the audio chips in famicom carts are always noticably different than the real thing.  I'd rather make something with a truncated script that'll atleast run on the real thing.  I guess I didn't know what I was getting into with this one, apparently it's quit a difficult game to attempt to fanslate.

Pennywise

QuoteWait...do you have to re-write the rom code to support the new type of compression?

If you mean, does the code currently need to be written for the game, I believe that's already been taken care of. Although the current compression could probably be replaced with something even more powerful like Huffman. Potentially Gideon could get RedComet to do the honors...

Drakon, picking an RPG to learn on for a first project is usually not a good idea unless you have a programming background, and even then it's not the best of ideas. RPG's require the most work and effort and can take really long to finish especially when hacking the code is necessary for a good translation. Picking a smaller game with less text is the best way to learn as there is less stuff to deal with and progress can be measured more easily. It's like comparing a mountain to a hill etc.

Gideon Zhi

Quote from: Pennywise on January 27, 2013, 10:07:10 PM
If you mean, does the code currently need to be written for the game, I believe that's already been taken care of. Although the current compression could probably be replaced with something even more powerful like Huffman. Potentially Gideon could get RedComet to do the honors...

I still don't think it'd be worth it. We already have a good deal more space than we'd have had if we kept the original encoding, and textual limits allowed Gun Hazard to become one of the most well-written projects I've worked on. It can be nice to work without the limits sometimes, but sometimes they're a good thing.

Drakon

Quote from: Pennywise on January 27, 2013, 10:07:10 PM
If you mean, does the code currently need to be written for the game, I believe that's already been taken care of. Although the current compression could probably be replaced with something even more powerful like Huffman. Potentially Gideon could get RedComet to do the honors...

Drakon, picking an RPG to learn on for a first project is usually not a good idea unless you have a programming background, and even then it's not the best of ideas. RPG's require the most work and effort and can take really long to finish especially when hacking the code is necessary for a good translation. Picking a smaller game with less text is the best way to learn as there is less stuff to deal with and progress can be measured more easily. It's like comparing a mountain to a hill etc.

Yeah I wasn't planning on doing the whole game I just wanted to change a few sentences haha.  So someone re-wrote the compression / decompression assembly for this rom?  I didn't realize they used compression in these old games.

RedComet

@Gid: What sort of compression are you using now? I'm curious.
Twilight Translations - More than just Dragonball Z. :P

Gideon Zhi

DTE+Dictionary. We get an extra 44% space, roughly.

Bregalad

Quote from: Drakon on January 27, 2013, 04:20:11 PM
Haha.  I like how you list a bunch of technical stuff and then end it with "there's other reasons but they're technical".  So is it currently crashing only because the file is too big?  I'm really interested in this project but I read on your website that you dislike update questions and whatnot so I didn't want to bug you about it.

Thanks.  Since gideon says he "broke" the compression I'm thinking maybe it's not a standard type?  I'll try this but I'm not getting my hopes too high haha.

*edit*

Can't even get these to run after installing java, oh well.
I was actually addressing to Gideon Zhi, not to you.
Yes you have to run the compress tools from the command line. This is the price to pay for maximum of automation and flexibility.

By the way he's one of the best hackers of RHDN, and if he says this game is a hard one, it is a hard one. I recommend you to use this game to "train yourself for rom hacking", as it seems it was your original goal.
There is literally hundreds of simpler games which does not compress their data, and you should train on those first.

@Gideon Zhi :
Unless you sent me the script so I can test it, what usually works the best for english text is recursive DTE. Usually you can get proficient compression size, with the compressed size less than half of the original text.

DougRPG

Hi Gideon, do you plan to finish this translation? Seems to be a very good game. Send us some hope.......

DarknessSavior

I'm sure he does. Pretty sure Tomato wouldn't like it if he quit. And besides, Gid's got like a billion projects he's workin' on at once.

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

RedComet

Oh, he'll finish it. If not, I'll hunt him down. >:D
Twilight Translations - More than just Dragonball Z. :P