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

Author Topic: Here's something I don't understand about Game Boy palettes...(SOLVED)  (Read 9401 times)

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
No, just when I go into the menu screen. Everything else is untouched. Could it have something to do with this? That color was a part of the title screen palette...

http://oi52.tinypic.com/2vi2omx.jpg

Theoretically, this palette data should have been the fix.  :(

EDIT: And it was! It seems that I accidentally didn't use little endian format and it screwed up the colors. But once I plugged in those colors, I played the game and it came up looking like this:

http://i1089.photobucket.com/albums/i351/spriteiscoolio/2-1.png


And once I loaded it up, I went into my palette editor and went to the address you gave me, and simply added in the greys, and...it works! My menus now have greys! :D I can't even begin to thank you for all the time and effort you've saved me, and I even learned how to find out this stuff for myself in the future. It's been a pleasure.


« Last Edit: June 01, 2011, 09:27:07 pm by Spriteiscoolio »

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Glad I could help. You've been an awesome student. :3

This was a big help:

http://www.romhacking.net/docs/544/

The process is similar on any platform where palette RAM is in its own separate block, but this filled in the details - it's all on page 66.

Just so I know, which game is this you're working on? Are you fan translating a game or making a hack for a game that's already available in English? (If the former, a word of advice: your numbers need to be shifted down a pixel. They're out of line with the letters. ^_^;)
In the event of a firestorm, the salad bar will remain open.

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
The game is RPG Tsukuru GB, and this was pretty much my only addition - adding icons to the game. I'm using Magecraft's translation as a base (This is mostly a personal project but if I were to release it I'd try to get his/thier permission to use his translation)

http://www.gamefaqs.com/gbc/577001-rpg-tsukuru-gb
http://www.romhacking.net/trans/42/

Also, holy crap that document is nice. I'm going to be skimming this a lot. (also you're right about those numbers.)

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Need an English "RPG Maker GB" logo? Or any English-language graphics at all, really. I'm good at that kinda thing.
In the event of a firestorm, the salad bar will remain open.

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Need an English "RPG Maker GB" logo? Or any English-language graphics at all, really. I'm good at that kinda thing.

The rom already has the logo in English...kinda shoddy looking, but I'm okay with it. Thanks for the offer, though...I feel kinda bad though, you've helped me so much, I feel like I have to give back to the community now. xD And...I dunno! I've been meaning to translate a game, but considering my experience it might not be a good idea. I'd be able to translate the game but I wouldn't actually be able to put the translation in...kind of frustrating.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Translation's the hard part, actually - unless the script's compressed or something crazy like that. Are you familiar with using a command prompt?
In the event of a firestorm, the salad bar will remain open.

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Not at all. This project was my first foray beyond GUI based hacking.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Then things might get a little complicated. The major script dump/insertion tools are command line-based, but with batch files, you can automate the process a great deal. Do you know how to make a table file?
In the event of a firestorm, the salad bar will remain open.

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
I've looked at documents telling me how but I don't really comprehend it.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
The table is a file that tells your hex editor, script dumper and script inserter which hex values correspond to which characters. Sometimes you get lucky and the text data is stored in a recognized format, like ASCII or Shift-JIS, but for most older titles, it's purely ad hoc and requires some sleuthing to figure out.

The general form of a table looks like this:

Code: [Select]
6D=く
6E=け
6F=こ
70=さ
71=し
72=す
73=せ

That is, your tools will recognize that these hex values are used to represent the corresponding characters in the game's text data. This is just a sample, mind: the exact values will differ from game to game.

A good first step is to find the game's font. Assuming it's not compressed, it should be arranged in the same order as the game's table - this simplifies the math involved in converting character values to ROM addresses. Once you've figured that out, you can use relative searching to find patterns matching the game's text (again, provided the script isn't compressed) and thus work out the beginnings of your table.
In the event of a firestorm, the salad bar will remain open.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7061
  • *sigh* A changed avatar. Big deal.
    • View Profile
I think it's safe to say you're not going to find Magecraft or whatever the one member's name was.
The wonderful people at the Whirlpool :P flamed the hell out of him a decade ago for "stealing" a more experienced member's project (flaming wouldn't be tolerated here).

More relevant to this topic, it would not surprise me if this was stored with event data between the text. Definitely not beginner friendly, and I imagine it's a good reason why nobody's finished translations of the SNES games.
I tried myself to do RPG Maker 1 for SNES. Take a look in the editor at the things an NPC can do: walk in each direction, turn in each direction, yes/no prompts, etc. Each of those has a hex value. And even for the "text" opcode, there's probably more control bytes for text length, windows, etc. Even if you made a custom text dumper/inserter that could expand and relocate the event data, I'd guess that due to the editable nature, you'd still be restricted in how much you could expand the text before crashing by making the data take up too much SRAM.
(I'd thought about doing DTE for RPGM SNES, but then I realized that'd make editing the text input windows a real problem)
"My watch says 30 chickens" Google, 2018

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
I think it's safe to say you're not going to find Magecraft or whatever the one member's name was.
The wonderful people at the Whirlpool :P flamed the hell out of him a decade ago for "stealing" a more experienced member's project (flaming wouldn't be tolerated here).

More relevant to this topic, it would not surprise me if this was stored with event data between the text. Definitely not beginner friendly, and I imagine it's a good reason why nobody's finished translations of the SNES games.
I tried myself to do RPG Maker 1 for SNES. Take a look in the editor at the things an NPC can do: walk in each direction, turn in each direction, yes/no prompts, etc. Each of those has a hex value. And even for the "text" opcode, there's probably more control bytes for text length, windows, etc. Even if you made a custom text dumper/inserter that could expand and relocate the event data, I'd guess that due to the editable nature, you'd still be restricted in how much you could expand the text before crashing by making the data take up too much SRAM.
(I'd thought about doing DTE for RPGM SNES, but then I realized that'd make editing the text input windows a real problem)
So, would it be okay for me to release a patch with the custom icons that includes his translation? I'm seeing this as sort of a grey area, I wouldn't want to be seen as taking credit for other's work. If I can't I'll just reinsert the icons into the unpatched Japanese version and release it like that. And to be honest, I can't see myself doing a full translation anytime soon. I figure that if I can translate at least the main menu, I can be satisfied for a while.

The table is a file that tells your hex editor, script dumper and script inserter which hex values correspond to which characters. Sometimes you get lucky and the text data is stored in a recognized format, like ASCII or Shift-JIS, but for most older titles, it's purely ad hoc and requires some sleuthing to figure out.

The general form of a table looks like this:

Code: [Select]
6D=く
6E=け
6F=こ
70=さ
71=し
72=す
73=せ

That is, your tools will recognize that these hex values are used to represent the corresponding characters in the game's text data. This is just a sample, mind: the exact values will differ from game to game.

A good first step is to find the game's font. Assuming it's not compressed, it should be arranged in the same order as the game's table - this simplifies the math involved in converting character values to ROM addresses. Once you've figured that out, you can use relative searching to find patterns matching the game's text (again, provided the script isn't compressed) and thus work out the beginnings of your table.

Okay, this makes it a lot easier to understand. So, once I find one character, I just keep going up by one byte until the table is done? I'll see what I can do before I try to come back here for help again. I'm probably also going to try to work with a game that already has Roman characters instead of having to add them myself.
« Last Edit: June 02, 2011, 02:31:14 am by Spriteiscoolio »

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
There might be some gaps in the table, but yeah, once you've found a text pattern, it's like solving a substitution cipher.
In the event of a firestorm, the salad bar will remain open.

Spriteiscoolio

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
This is actually not too bad. I'm sure the next few steps will start to be though.