ROM Hack Rhythm Tengoku Translation - Rhythm Heaven Silver

  • Thread starter W hat
  • Start date
  • Views 428,630
  • Replies 527
  • Likes 35

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
Rhythm Heaven claims the spirit of yet another promising hacker, crushing his will with its labyrinthine code and impregnable graphics compression. We must persevere, to end its reign of terror once and for all.
 

W hat

Rhythm Heaven Fan
OP
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
Beta 2c is here. In addition to making periods 1x2 pixels instead of 1x1, it includes the game "Dr. Bacteria". The core game for Bon Odori is also included, but the comments are not done and it will not be finished until next week. You can play it now, but then what will you do next week?

http://www.mediafire...665rgj87519ig7a

Dr. Bacteria doesn't have much text. Most of my time this week was spent on the email for the game, "Rhythm Sense Diagnosis." It's 23 pages. Indeed, this was the final boss of emails. Every other email is four pages or less.

P6U14.gif


---

Blazer, we've also found someone who thinks they can help us. Technical information follows.

Hi there,
I just played the last 6 hours with your game and I believe I found where the problem is and I contacted CUE (a member of this forum) because he is probably the one that can solve your problem the fastest.
As soon that i have a solution, i will tell you. Basically it should be only a matter of decompression/compression (I believe CUE tool would compress your file the right way but the decompressor has a problem. CT2 is no use because it's a "normal" compression but a special write mode.
If you has a solution to the decompressor, be ready to work with a bit less than 800 files (between graphics, tilemaps and palettes).

...

It's just that that game use things nobody else use in any games hehe.
Basically what i see as the problem is that the game uses BIOS decompression ID12 that is a LZ77 that is directly decompressed to the vram and to do this, he has some special writing methods.
Cue is ready to help but sadly he could not access the files i send to him to find out why his de-/compression tools didn't work.

For the technical mumbo jumbo (still assuming that i am right with my theory):
SWI 11h (GBA/NDS7/NDS9) - LZ77UnCompWram
SWI 12h (GBA/NDS7/NDS9) - LZ77UnCompVram (NDS: with Callback)
Expands LZ77-compressed data. The Wram function is faster, and writes in units of 8bits. For the Vram function the destination must be halfword aligned, data is written in units of 16bits.
If the size of the compressed data is not a multiple of 4, please adjust it as much as possible by padding with 0. Align the source address to a 4-Byte boundary.
r0 Source address, pointing to data as such:
Data header (32bit)
Bit 0-3 Reserved
Bit 4-7 Compressed type (must be 1 for LZ77)
Bit 8-31 Size of decompressed data
Repeat below. Each Flag Byte followed by eight Blocks.
Flag data (8bit)
Bit 0-7 Type Flags for next 8 Blocks, MSB first
Block Type 0 - Uncompressed - Copy 1 Byte from Source to Dest
Bit 0-7 One data byte to be copied to dest
Block Type 1 - Compressed - Copy N+3 Bytes from Dest-Disp-1 to Dest
Bit 0-3 Disp MSBs
Bit 4-7 Number of bytes to copy (minus 3)
Bit 8-15 Disp LSBs
r1 Destination address
r2 Callback parameter (NDS SWI 12h only, see Callback notes below)
r3 Callback structure (NDS SWI 12h only, see Callback notes below)

Return: No return value.

NDS Decompression Callbacks
On NDS7/NDS9, the SWI 12h, 13h, 15h functions are reading source data from callback functions (rather than directly from memory). The callback functions may read normal data from memory, or from other devices, such like directly from the gamepak bus, without storing the source data in memory. The downside is that the callback mechanism makes the function very slow, furthermore, NDS7/NDS9 SWI 12h, 13h, 15h are using THUMB code, and variables on stack, alltogether that makes the whole shit very-very-very slow.

r2 = user defined callback parameter (passed on to Open function)
r3 = pointer to callback structure

Callback structure (five 32bit pointers to callback functions)

Open_and_get_32bit (eg. LDR r0,[r0], get header)
Close (optional, 0=none)
Get_8bit (eg. LDRB r0,[r0])
Get_16bit (not used)
Get_32bit (used by Huffman only)

All functions may use ARM or THUMB code (indicated by address bit0). The current source address (r0) is passed to all callback functions. Additionally, the initial destination address (r1), and a user defined parameter (r2) are passed to the Open function. All functions have return values in r0. The Open function normally returns the first word (containing positive length and type), alternatively it may return a negative error code to abort/reject decompression. The Close function, if it is defined, should return zero (or any positive value), or a negative errorcode. The other functions return raw data, without errorcodes. The SWI returns the length of decompressed data, or the signed errorcode from the Open/Close functions.
 

Blazer

Well-Known Member
Member
Joined
Aug 10, 2008
Messages
281
Trophies
0
XP
470
Country
United States
Oh shit, why did they do it that way? Why not call a normal decompression routine? >_>' I guess I shouldn't try and make sense of why things are they are the way they are and just accept how it is, I guess, but it's befuddling. (I'm sure there's some reason: the only thing that comes to mind though is the fact that graphics in Rhythm Heaven tend to be animated to some extent... :P).

And you know, you should just link to GBATek instead of copying/pasting all that :P http://nocash.emubase.de/gbatek.htm

Lastly, this is a GBA game; filter out NDS-specific tech specs
 

mmiller

Member
Newcomer
Joined
Sep 23, 2012
Messages
7
Trophies
0
XP
14
Country
United States
please
  • add words to bon bon 2 & remix 6
  • add names to the songs in listening mode
  • add the songs that will be played in live preformances
  • add the mono, speaker, and clear data names (if you can)
i also came up with names for the endless games and toys (if you dont feel like translating)


toys
[t3] : love machine
[t4]: rap boy deluxe

endless games
[g3]: quiz sp (or how ever you did it for dr bacteria)
[g4] : face maker

and also some names i came up with (some i came up with
  • fireworks (5-4)
  • rap boys (4-5)
  • rap women (6-4)
  • flower power (3-1)
  • penguin plunge (3-2)
  • dance crew (3-5)
  • quiz (4-1)
  • built to scale (4-4)
  • hopping road (5-1)
descriptions

fire works: the bon bon ordi is done, now its time for some fireworks, rhythm fireworks, BOOM!! BOOM!! BOOM!!

rap boys: red and blue are here to rap to the latest hits, today they are rapping the song :Having Fun by the rap women (thier rivals)

rap women: the rap boys were good but the rap women are better (And have better editing) in order to beat them they will need determanation and rhythm

flower power: this little lady wants flowers, no problem when you have both magic and rhythm (dont tell them they are the same thing)

penguin plunge: these penguins have the best of training and the best job ever, why you may ask, cause rhythm is involved (there is also a monkey helping them)

dance crew: the best dance crew is here and is more ready than ever!, today they will be using only three moves! punching , going to the right, and going down

quiz: today is the day you"ve been waiting for, you are finnaly put on your favoroute show "do you have rhythm?" the name may not be original but its a good show

built to scale: today you began your job of working at the assembaly line, you may be at the lowest pissition, but atleats your not flipping burgers (WHEW!)

hoping road: there may be a road for cars, but did you know this road is for hopping pebbles? Its a new concept but the workers are getting good money, they sit under the road moving the parts of the road up!
 

W hat

Rhythm Heaven Fan
OP
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
Thanks for your interest! After making so many modifications to the first post in this thread, I now realize that I removed information on what this hack is and our release schedule.
I hope this helps explain things:

This hack is being worked on chronologically: starting with the first game and moving a little bit forward each week. In addition to translating mini-games every week, we also translate all bonus content associated with that game. If we translate game #12, we also translate drum lesson #4 because you can unlock it by getting medals on 12 games.

Unfortunately for you, that means that Bon Dance #2 and Remix 6 will be translated when we're around 75% done with the project. Sorry!

We can't add song names all at once now. Why? Because the names of the songs will change depending on what the game is called. As an example, the translation for game 2-1 is "White Ghost" or "White Apparition." But we went with the name "Sneaky Spirits." We translate song names, like everything else, in chronological order. Most songs aren't unlocked until you get 50 perfect medals. You're really going to have to wait for that one. :-(

Concerts, also, are not unlocked until Remix 8 is completed.

I believe you're referring to the graphics in the menus?

FVO1d.png


They will be edited as soon as we have that capability. As mentioned a few posts back, we're getting close.

As for your specific suggestions on titles / descriptions, I have to decline. One, I base my localizations on the literal translation. Here's an example:

Vegeta-Pull literal translation:
The gloomy hairs
that keep growing!
Pluck'em,
pluck'em!

My localization:
These weird hairs
keep growing!
Pluck'em,
pluck'em!

Second, this localization is mostly my writing. Everyone has their own writing style. If I start to include writing from many different people, the translation will lack focus and a clear style.

Thanks again for your suggestions and interest in the hack. It pains me, too, that it's not done yet - the reason I started this is because I wanted to play the game. But please enjoy the betas we've released. Most ROM hackers wait until they finish a project before they release anything.

edit: Can someone compile this?
[quote author=Auryn]
hi there,
I have a bad and a good and a bad again notice for you.
The bad first: I was wrong with my compression teory.
The good is that CUE found a pattern in that data, made a little desciption and he made a little program to extract some tile.
The bad is that it's not tested well and it's not a complete program.
Anyway make sure to credit CUE if you will release a patch someday.

Here is his message:
To decode the graphics a programmer is needed. I'm not a GBA expert and I don't have more time to expend in this game.

The health screen has 3 parts:
- tile encoded
- tile counts
- tile pattern (080D1AD60 or so, not tested)

Not full tested. I can extract the tiles 0x00 to 0x72 without problems, but the 0x73 is wrong.

080D1AD4C has 2 pointers:
- 080D1AABC, pointing at 08D1A330, the encoded tile data
- 080D1AACC, the encoded count data

The tileset is a 4bpp texture (16 colors), divided in blocks de 2 colors.

Eeach encoded data block is a 2bpp has:
- 1 byte with the foreground and background color
- 1 byte with the number of encoded words - 1
- the encoded words, low endian format)
Each encoded word has 2 bytes, each byte has 2 nibbles, each nible has 4 bits, each bit is the color defines in the first bit

The count data is a double byte blocks:
- 1st byte has the number of nibbles to copy
- 2nd byte has the number of nibbles to repeat

A tiny C program to extract some tiles:
Code: [Select]

Code:
/*----------------------------------------------------------------------------*/
#include "common.inc"

/*----------------------------------------------------------------------------*/
void Title(void);
void Decode(char *filename, int offset);
void DecodeNibble(int value, int color);
void UpdateTile(void);

/*----------------------------------------------------------------------------*/
int nTile, yTile, xTile;

/*----------------------------------------------------------------------------*/
int main(int argc, char **argv) {
Title();

Decode("Rhythm Tengoku (Japan).gba", 0x00D1AD4C);

printf("\nDone\n");

exit(EXIT_SUCCESS);
}

/*----------------------------------------------------------------------------*/
void Title(void) {
printf("Rhythm Tengoku v1.0 - GBA\n");
printf("Health screen decoder test\n");
printf("Copyright © CUE 2012\n");
printf("\n");
}

/*----------------------------------------------------------------------------*/
void Decode(char *filename, int offset) {
unsigned char *rom;
unsigned int   count, idx1, idx2;
unsigned int   colors, nbytes, code, nibble;
unsigned int   i;

// load the rom, checks not added
rom = FileLoad(filename); // the only function defined in common.inc, use your own FILE READ function

// index 1 -> offset to count
// index 2 -> offset to encoded data
idx1 = *(unsigned int *)(rom + offset + 4) - 0x08000000;
idx2 = *(unsigned int *)(rom + offset) - 0x08000000;
idx2 = *(unsigned int *)(rom + idx2) - 0x08000000;

// init tile data
nTile = xTile = yTile = 0;

// encoded data:
// - 1st byte -> foreground and background colors (palette colors)
// - 2nd byte -> number of encoded words - 1
// - 3rd byte -> words of encoded data

// count:
// - 1st value -> copy 'n' nibbles, zero to end
// - 2nd value -> repeat 'n' times the latest nibble

for (count = 0; count != -1; ) {
colors = rom[idx2++];
nbytes = (rom[idx2++] + 1) >= 4;

if (!count) {
count = rom[idx1++];
//printf("[0:%02X]", count);
}
DecodeNibble(nibble, colors);
count--;
if (!count) {
count = rom[idx1++];
//printf("[1:%02X]", count);
if (!count) { count = -1; break; }
while (count--) DecodeNibble(nibble, colors);
count = 0;
}
}
}

// fill the tile row
// 2 more bytes needed
// each byte has the real color number, 2 pixels/byte
if (yTile) {
printf("****"); // the 4 colors
for (i = 0; i < 2; i++) {
code = rom[idx2++];
}
UpdateTile();
count--;
}
else if (!xTile) {
idx2+=4;
UpdateTile();
count--;
UpdateTile();
count--;
}
//printf("%08X %08X\n", idx1, idx2);
break; // stop 1st block
}

free(rom);
}

/*----------------------------------------------------------------------------*/
void DecodeNibble(int value, int colors) {
unsigned char symbol[] = ".#";
unsigned int  i;

// 4 bits/nibble, each bit is a color:
// - 0 -> color >> 4
// - 1 -> color & 0xF
// ".#" is for test purposes

for (i = 0; i < 4; i++) {
printf("%c", symbol[value & 1]);
value >>= 1;
}

UpdateTile();
}

/*----------------------------------------------------------------------------*/
void UpdateTile(void) {
// 1 tile = 8 rows of 8 columns, 8x8 pixels
// 4 bits each nible
yTile += 4;
if (yTile == 8) {
if (!xTile) printf(" tile %03X", nTile);
printf("\n");
yTile = 0;
if (++xTile == 8) {
printf("\n");
xTile = 0;
nTile++;
}
}
}

/*----------------------------------------------------------------------------*/
// eof
[/quote]
 

CUE

Well-Known Member
Newcomer
Joined
Oct 24, 2002
Messages
53
Trophies
0
Location
Pucela
Website
romxhack.esforos.com
XP
290
Country
You no need compile the code, is buggy and unfinished. You need to understand the proccess.

Result:
Code:
Rhythm Tengoku v1.0 - GBA
Health screen decoder test
Copyright (C) CUE 2012

........ tile 000
........
........
#.......
......##
....##..
...#....
....##..

........ tile 001
........
.#....#.
#...####
......#.
......#.
.....#..
.....#..

........ tile 002
........
..#.#...
#.#.#.##
........
####....
.......#
......#.

........ tile 003
........
..#.....
######..
...#....
...#....
#####...
....#...

,..
 

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
I'm kind of tired of the Bon Bon Ordi level by now, but I think it's looking pretty perfect! I'm also pretty proud of the localized lyrics.

We're almost 25% done with the game text stored as text, and I think we've passed the hardest hurdles with Dr. Bacteria and Bon Bon Ordi's lyrics.

Graphical text is probably still a problem, and I'm just not a programmer so I can't fathom any of the above, though I really appreciate CUE coming to help explain!
 

Blazer

Well-Known Member
Member
Joined
Aug 10, 2008
Messages
281
Trophies
0
XP
470
Country
United States
Like I said in an e-mail, even of you compile the program, it won't get you very far. Its more about understanding the format. Someone skilled in programming would have to use the info on the tiles he shared to create a program that can export and reimport them, essentially, assuming there's nothing that can already do it, which there doesn't seem to be. This is a rather large task given its general nature and lack of detailed information, not to mention that it's game-specific so it's very possible that said program could never really be helpful outside of this graphic format.

tl;dr either find someone, think of an easier workaround, or just ignore it altogether. ._.
 

W hat

Rhythm Heaven Fan
OP
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
3EwZE.gif


Early update. Next update 10/5. By 10/12 10/19 we should be into the swing of things, releasing multiple games per week. Right now things are a little hectic and the games have a lot of text.

This week is "The*Bon Odori"! It's my favorite game so far. What a great song!

And, this week has two patches! Please let us know which style you prefer.

Localized (English) text for the song:
http://www.mediafire...32reb4114oog9is

Romaji (Readable like English, but makes no sense because it's Japanese. Matches what the singer is saying.)
http://www.mediafire...1c1luagudd8at7m

Here's an (old) video example of Romaji. Excuse my poor playing.


Re: Programming / tile editing

I'm not going to look into it too much right now. Later, sure, but I'm focused on other things both inside and outside the project. I LOVE that Cue, Blazer, and Auryn have helped me this much already. We couldn't do anything without you guys.
 

YayMii

hi
Member
Joined
Jun 24, 2009
Messages
4,916
Trophies
0
Age
28
Location
that place
XP
758
Country
Canada
I'm assuming there's no way to show both without having to dig deeply into the game's code?

Anyways, I'd prefer the Romaji version just because it matches what she's saying.
Keep up the good work!
 

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
We'd have to do more than just hack in another line - as it stands, the localized lyrics needed to be cut down because the way they're drawn and animated induces flickering if you try to make lines that use all the available space. You can see this very briefly half-way through the song. If we tried to add the translation at the same time, it'd probably exceed the GBA's capability to run all the text (plus that's a lot of text to read while trying to play the game). I had some better lyrics for some lines, but had to trim out a syllable because it'd cause the singer in the turret to flicker in and out while they displayed, which was just unacceptable.

Unfortunately, I'm a writer and project manager and not a programmer so I was limited to just writing to try and solve the lyrics issue. If Nintendo was doing the localization, I imagine they would have gone and re-recorded the song to be in English, which would have given them a lot more flexibility to match up the tune to a different set of beats. I feel like I did a pretty good job keeping the rhymes, the long vowels at the end of each line, and the general meaning of the lyrics without going too far off the beat. I intended to keep the syllables synced up, but in the end I didn't have enough room to make that work too.

If you choose to play the Romaji version, you can unlock a literal translation of the lyrics as one of the perfect campaign gifts. I've included the Romaji, literal, and localized lyrics in the gift so you can see all three. You won't miss out on understanding the song if you prefer the Romaji release, you'll just have to wait a little longer to unlock the gift before you can understand what's being said.

The other songs in the game don't impact gameplay, so they are likely to stay exactly as they are. You'll be able to see those lyrics by unlocking the perfect campaign rewards. That's not a whole lot different than playing the original game, since if you're like me you couldn't make out the lyrics anyways while actually playing!

We're coming up quickly on Column 3, which is my personal favorite column with a lot of fun games with poppy tunes, and my favorite remix!
 

Blazer

Well-Known Member
Member
Joined
Aug 10, 2008
Messages
281
Trophies
0
XP
470
Country
United States
^probably not

And I agree with the Romaji thing

Just include a text file with the song translation, in Rhythm Heaven games the syllables in te lyrics are a lot more important and stuff for keeping rhythm, having text that doesn't flow with the music and cues and what not will make it a little harder. XP just my opinion though

EDIT: I was looking for updates and noticed that SirNiko made a post I didn't notice, and that everything before this edit was meant as a reply to the last post on the previous page if that makes sense XP
 

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
In remix 2, the mice have a couple of lines. Because only one line appears, there's no connection or context. This one seems to be an odd man out, though.

こい してる?

Anyone have a suggestion on how that would be translated?
 

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
Hey folks, a note on the patches (Some of which I already mentioned in this thread, but feel is important enough to mention again)-

The first patch linked is the "Romaji" version of the demo. This features a latin script version of the Bon Odori text that makes it easy to sing along with the japanese words, but doesn't make any sense to english speakers.

The second patch linked is the "Localized" version of the demo. This features english text that lets you sing along in english, but you'll be singing over the japanese vocals. This version lets you understand the song as you play the level.

Both are easily playable, since you only need to clap to the refrains which are still just the nonsense "Don don pan pan". If you prefer the romaji lyrics, you can still see a literal translation of the lyrics by unlocking the "Song Lyrics 1" gift in the reference room by completing a certain game during the perfect campaign.

Future "Beta" patches (which will include games from column 3 but not all the games from column 3) will only feature the localized version of the lyrics. The landmark Demo patches (Which will include a full column of games) will offer both localized and romaji, to suit your tastes.

I would really appreciate feedback on the localized and romaji versions of the Bon Odori level from people who have played it!

Also included in this patch are 6 e-mails (4 unlockable), 5 unlockable drums for the sound test, 2 endless games, 2 rhythm toys, and all the drum lessons.

I've been working ahead to find all the pointers for each game and test tags and other technical things, so I'm pretty confident that columns 3 and 4 just need translating at this point. Hopefully we've overcome all the technical hurdles relating to text, leaving us with the graphics as the only remaining technical obstacle.
 

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
Drum lessons are getting a final round of polish this week, and should be completely finished by next week. These are a lot easier than they could have been, since there's some unused drum lesson text in the script that suggests the drum lessons were once much, much more involved! Down the road, sometime, I'll post some of the unused text.

The last major hurdle is the Cafe, which is not just a tremendous amount of text, but is also very difficult to test because a lot of it is chosen at random, or at least has inconspicuous triggers.

In the meantime, at least, you can play the portion of the game that is already translated for your enjoyment!
 

W hat

Rhythm Heaven Fan
OP
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
6a9zQ.gif

http://www.mediafire.com/?5tu9nay6u71t22a

Sorry that it's just one game again this week. :\

edit: Welcome back! If you've been following rh0updates on Twitter, you'd know about this already.

Bunny Hop is last Friday's update. I'd like to get some meatier updates (more than just one game), but I've been saying that for a while and it's never happened yet. I need to be more diligent.

https://twitter.com/rh0updates

http://www.mediafire.com/?whmbzz2bv7hi1ji

SirNiko is doing even more than before. He's done the translation for a few mini-games, and I make a minor change or two before publishing the patch. This hack would absolutely be over and delayed without him.
 

SirNiko

Well-Known Member
Newcomer
Joined
Aug 7, 2012
Messages
80
Trophies
0
XP
87
Country
United States
It's good to finally be back! I've been busy too, between work and travel. Hopefully at the end of November my schedule will open up and we can start dominating this game!

We have come across one relatively minor obstacle - we don't have the translated lyrics to Koi no Honey Sweet Angel (Honey Sweet Angel of Love, the song for Remix 3). Surprisingly, nowhere on the internet can I find a translation (though a few youtube videos have the romaji lyrics). I think that's the only remaining obstacle to translating the in-game text. Then the only other hurdle will be figuring out how to edit the graphical text.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: Nobody is reading what you post.