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

Author Topic: Bomberman 5 Menu Translation  (Read 22806 times)

DackR

  • Full Member
  • ***
  • Posts: 130
  • Mo~
    • View Profile
    • Hackaday.io Page
Bomberman 5 Menu Translation
« on: July 05, 2012, 06:29:14 am »
Okay. so I've been messing around with Bomberman 5, and I've finally figured out how text is displayed in the menus. I was able to partially hack the battle menu to display in english, but i'll probably need to do some asm work to fix the broken bits.

Here is a quick preview.

The font is compressed and surprise, surprise- the existing english characters are an incomplete set. (hence: conpig= no "f" yet lol) The small/large font pairing happens because of some funky bank switching.

Ugly, I know-- but better than nothing for now. I'm so damn tired. bah.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #1 on: July 06, 2012, 12:18:09 pm »
Why not overwrite the graphics of the japanese font with an english alphabet??

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7147
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #2 on: July 06, 2012, 12:23:16 pm »
I tried hacking that once, it was a real mess. I forget the details now, though.
All I remember is that if it was easy, I'd probably have put out a patch by now. :)
"My watch says 30 chickens" Google, 2018

reyvgm

  • Hero Member
  • *****
  • Posts: 1238
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #3 on: July 06, 2012, 01:13:30 pm »
To make an F just delete the last line of an E.

burn_654

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #4 on: July 06, 2012, 01:21:46 pm »
I would look to see if the game uses any uncompressed tiles in its code...perhaps you could insert your own uncompressed font?

Space might be a problem (it's always a problem...)

DackR

  • Full Member
  • ***
  • Posts: 130
  • Mo~
    • View Profile
    • Hackaday.io Page
Re: Bomberman 5 Menu Translation
« Reply #5 on: July 07, 2012, 01:34:26 am »
Why not overwrite the graphics of the japanese font with an english alphabet??
:) As KM said, it's a mess. I can not just overwrite the font because I've yet to figure out where it is stored. ...compressed font=wherever it is, it looks like garbage in the ROM.
I only knew that certain letters were missing and how they were arranged by looking at the uncompressed font in a savestate file. Compressing it and reinserting it would be a huge pain because I don't know how it compresses the gfx.

To make an F just delete the last line of an E.
lol... here is the result of that... (only possible because of the way text is stored, but I can use top/bottom halves of different letters) Not a final solution. -_-'


I would look to see if the game uses any uncompressed tiles in its code...perhaps you could insert your own uncompressed font?

Space might be a problem (it's always a problem...)
This could actually be a valid suggestion. If I could find a place to store an uncompressed font, is there anyone who would want to do the ASM work to bypass the compression for the font?? :) Pretty please? I know the sprites for all the different bombers are uncompressed. In fact, they may be the only gfx in the entire ROM that isn't compressed.

I tried hacking that once, it was a real mess. I forget the details now, though.
All I remember is that if it was easy, I'd probably have put out a patch by now. :)
Any chance you would consider a joint hacking venture? I've always wanted to pick your brain about this kinda stuff.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #6 on: July 07, 2012, 02:46:19 am »
Well I think I found the battle option font in the rom.
On the left side you have all the japanese letters and on the right side OFF and MAN can be seen giving you an idea in how it's stored.


I believe a bit below there is the main font for the game but I didn't get to be viewed correctly or almost correctly. Anyway I am not sure if it's a real compression or just a special format of storage.
Looking at some objects in 4bpp mode, they look fine but it's like they have a big shadow with the same shape just below.
Last time i saw something like that, was a font that used what Crystaltile 2 call "GBA3 Xbpp".
You can find how it works HERE
I hope i am correct and my information is usefull.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Bomberman 5 Menu Translation
« Reply #7 on: July 07, 2012, 02:59:13 am »
Yeppers. It looks compressed. Fortunately, it doesn't look like a difficult compression scheme - it's probably some flavor of RLE.

For the record, I wrote a graphics decompressor for Jiro Akagawa's The Sleep of Witches in Python, so if you're familiar with any kind of programming at all, implementing a codec should be trivial.
In the event of a firestorm, the salad bar will remain open.

DackR

  • Full Member
  • ***
  • Posts: 130
  • Mo~
    • View Profile
    • Hackaday.io Page
Re: Bomberman 5 Menu Translation
« Reply #8 on: July 07, 2012, 03:27:03 am »
:) Thanks for responding guys.

Well I think I found the battle option font in the rom.

I believe a bit below there is the main font for the game but I didn't get to be viewed correctly or almost correctly. Anyway I am not sure if it's a real compression or just a special format of storage.
Looking at some objects in 4bpp mode, they look fine but it's like they have a big shadow with the same shape just below.
Last time i saw something like that, was a font that used what Crystaltile 2 call "GBA3 Xbpp".
You can find how it works HERE
I hope i am correct and my information is usefull.
I will take a look at this right now. I've never even heard of the tile editor you are using.  8) Been a while since I did this sort of thing. Since you are using a GBA codec, I think it is possible that it is some form of RLE, LZ77, or Huffman compression as these are pretty common on GBA titles. I shall probably need to study this a bit more. If you have any other finds to share, I appreciate it very much!

Yeppers. It looks compressed. Fortunately, it doesn't look like a difficult compression scheme - it's probably some flavor of RLE.

For the record, I wrote a graphics decompressor for Jiro Akagawa's The Sleep of Witches in Python, so if you're familiar with any kind of programming at all, implementing a codec should be trivial.
OMG. I bet you are right! I would appreciate it very much if you could send me the source code for this. I've not used python much, but I'm used to c++, php, and C#, so if it's similar, I think I can handle it. Thanks so much for your input on this.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Bomberman 5 Menu Translation
« Reply #9 on: July 07, 2012, 03:44:35 am »
Well, the code won't be of much help to you - I'm just saying "you can write a (de)compressor in just about anything." It would have to use the exact same RLE scheme - and for the record, no two RLE implementations I've seen have been exactly alike. If this were a GBA or DS game, it'd be a different story: those systems have LZ decompression algorithms written into the BIOS, so if a game for either one uses compression at all, it'll probably be the scheme that the system has built-in decompression for.

Anyway. RLE is a simple way of encoding graphics - the general idea is that graphics tend to use long strings of the same bytes in sequence (think large areas of solid color or transparency), so they have a mechanism for indicating a byte to write and how many times to write it. Solving a compression scheme like this is a matter of figuring out how the compression scheme differentiates compression codes from "plaintext" (regular bytes to output without modification), and how exactly the compression codes translate to graphics data. Mind, it could also be some form of the aforementioned LZ compression, which is a little more sophisticated: instead of compression codes indicating a byte to write and how many times to write it, they indicate how far back in the plaintext to look for the next sequence of bytes and how long it is. That is, if there's a lot of data being repeated over and over in the uncompressed graphics (also a likely situation), then the compression scheme is designed to replace the repeated instances with a code indicating to copy what comes next from somewhere earlier.

The important thing to keep in mind is that compression is just a code, and it can be cracked - it can be even easier than a newspaper cryptogram as long as you understand what you're looking at, because it gives you a partial solution right off the bat (as you've noticed already, there's easily-visible "plaintext" among the encoded data). A good way to start is, naturally, to compare the compressed and uncompressed data - especially the visible plaintext.

(Oh, and for the record, "plaintext" isn't necessarily text! It's cryptography jargon referring to unencoded data.)
In the event of a firestorm, the salad bar will remain open.

DackR

  • Full Member
  • ***
  • Posts: 130
  • Mo~
    • View Profile
    • Hackaday.io Page
Re: Bomberman 5 Menu Translation
« Reply #10 on: July 07, 2012, 05:37:02 am »
Okay... I've done a little more poking around... Apparently there was another section of the font that I hadn't found before that gets loaded into VRAM in different parts of the menus. These other sections do not make the english font available at all. I'm still able to change them, just not for the purposes of translating... So being able to edit the font is now essential. Damn.  ;)

Well I think I found the battle option font in the rom.
I've tried totally overwriting that section that you found and it doesn't effect anything in the menus. I'm not sure what that font is for yet...

Well, the code won't be of much help to you - I'm just saying "you can write a (de)compressor in just about anything." It would have to use the exact same RLE scheme - and for the record, no two RLE implementations I've seen have been exactly alike. If this were a GBA or DS game, it'd be a different story: those systems have LZ decompression algorithms written into the BIOS, so if a game for either one uses compression at all, it'll probably be the scheme that the system has built-in decompression for.
I wrote a font editor for Little Master back in 2006. I no longer have the source code for that portion of my editor, so my thought was that I could take a look at yours and get reacquainted. No big deal, it's not necessary. Little Master's font was not in a very complicated format (I seem to recall it being in 2bpp 8x16 where one "color" represented the 8x8 top of the tile and another "color" represented the bottom, a third "color" for where each 8x8 had intersecting pixels and the final "color" was the background.) I expect that Bomberman is using some type of LZ compression(judging from your description). I am not all that familiar with these compression techniques.

The important thing to keep in mind is that compression is just a code, and it can be cracked - it can be even easier than a newspaper cryptogram as long as you understand what you're looking at, because it gives you a partial solution right off the bat (as you've noticed already, there's easily-visible "plaintext" among the encoded data). A good way to start is, naturally, to compare the compressed and uncompressed data - especially the visible plaintext.
Thanks for the tip. I appreciate it.

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #11 on: July 07, 2012, 07:19:15 am »
CrystalTile 2 is manly for NDS hacking but I love it and I use it for many systems.

Anyway, here is the part where i believe the actual font starts, you can make out a M, N, Z by scolling around sometimes numbers and naturally many japanese characters:


I don't know if you have tried but there are alot of sprites that can be viewed well with Tilemolester in 4bpp planar, composite (2+2bpp) mode but sadly not the font because I pretty sure it's not a 8x8:

DackR

  • Full Member
  • ***
  • Posts: 130
  • Mo~
    • View Profile
    • Hackaday.io Page
Re: Bomberman 5 Menu Translation
« Reply #12 on: July 07, 2012, 01:11:10 pm »
Thanks Auryn! That's definitely the compressed font! I did already know about the sprites as I mentioned in an earlier post, but it's all good. One step closer!

bluecar5556

  • Guest
Re: Bomberman 5 Menu Translation
« Reply #13 on: October 23, 2013, 02:30:28 am »
Me and my friends are serious about bomberman 5 and play it on my xbox 360 using SNES360 emulator but none of us are programmers, unfortunately.  I'm confused, was there only a partial translation due to the english alphabet not being available to start with?  It would be nice to have a translation to write to an actual SNES rom and play 4 player natively in 16 bit glory!  0_0  If the BIOS decrypts gfx encryption on games and is the same for all SNES consoles, isn't there already a decompressor used to translate other SNES titles, namely RPG's?

VicVergil

  • Hero Member
  • *****
  • Posts: 727
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #14 on: October 23, 2013, 07:06:11 am »
0_0  If the BIOS decrypts gfx encryption on games and is the same for all SNES consoles, isn't there already a decompressor used to translate other SNES titles, namely RPG's?

The compression/decompression routines are NOT the same in SNES games.
There is no panacea, universal solution for all games.
AFAIK, Nintendo didn't give with their dev kit for the SNES a general compressor, like Sega did on Megadrive (Nemesis compression, though some games like Monster World IV don't use it), or like GBA and DS games (LZ compression, though once again it didn't keep some publishers from using their own compressions, I even saw a CPK one in a Japan-only Zelda clone by EA).

(Dat necrobump O_o )

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7147
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #15 on: October 23, 2013, 01:08:30 pm »
Me and my friends are serious about bomberman 5 and play it on my xbox 360 using SNES360 emulator but none of us are programmers, unfortunately.  I'm confused, was there only a partial translation due to the english alphabet not being available to start with?  It would be nice to have a translation to write to an actual SNES rom and play 4 player natively in 16 bit glory!  0_0  If the BIOS decrypts gfx encryption on games and is the same for all SNES consoles, isn't there already a decompressor used to translate other SNES titles, namely RPG's?

If multiplayer is all you want, Bomberman Party Edition for PS1 is REALLY similar. (though single-player in that game was limited to a remake of the first NES game)
"My watch says 30 chickens" Google, 2018

bluecar5556

  • Guest
Re: Bomberman 5 Menu Translation
« Reply #16 on: October 23, 2013, 03:24:09 pm »
Ive emailed Svambo who translated bomberman 4 back in 2009 if translating bm5 uses the same methods using SNESEDIT.  Thanks for the PS1 game suggestion, ill definately check it out.

svambo

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #17 on: November 15, 2013, 05:36:30 pm »
Hi Leader, hi Craig,
thanks for your kind mails. Bomberman 4 had no compressed charset so the code is different for Bomberman 5. However the way the text is stored might be similar. It's quite a while back but I  remember that there was more than one way texts were stored. The menus were texts and yes I used snesedit for them. Many other texts were sprites and every letter took 6 Bytes for position and sprite-block - was a lot of work to edit.
I uploaded you some notes I made back in the days. If you want check them out to get an idea.
http://www.file-upload.net/download-8296013/super-bomberman-4.doc.html
Good luck with your project.
Greets Svambo

FreeLunch

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Re: Bomberman 5 Menu Translation
« Reply #18 on: November 06, 2014, 04:40:55 pm »
Not sure if you're still working on this project, but saw this and figured it was relevant (links to this thread).

http://bittask.com/topic.php?id=4631