Author Topic: The lost Sunheart translation project (Trans. beta downloadable)  (Read 1775 times)

toktogul

  • Full Member
  • ***
  • Posts: 163
The lost Sunheart translation project (Trans. beta downloadable)
« on: November 25, 2015, 12:15:15 PM »
EDIT : Allright, I worked a little more on it, let me know what you think. I am still working on how to translate the pause menu and the ingame UI, but all the cinematics are now translated. its not the final version of the translation, I want you guys to help me to test it and if you find bugs or mistakes, let me know. Oh and yes, the story/writing isnt that fantastic. Very Japanese cliché kinda thing.

https://www.dropbox.com/s/xx9ehiwu5r3o9g7/Bouken%20Danshaku%20Don%20-%20The%20Lost%20Sunheart%20%28stest%29.pce?dl=0


i changed the title of the post since the conversation switched from basic questions to an actual first translation /hack project. Cabbage suggested me to work on this game, and so far its been a blast. I have translater the first three chapters and the intro. I will keep you updated on the project. (Starting around the end of page 2)

Thank you for your support, especially Elmer, Cabbage and Ccovell
« Last Edit: December 06, 2015, 06:09:34 PM by toktogul »

cabbage

  • Sr. Member
  • ****
  • Posts: 342
Re: What program do you use to see tiles?
« Reply #1 on: November 26, 2015, 01:33:06 AM »
YY-CHR has support for PCE, as well as other useful formats like 1bpp 8x8 and 16x16..

toktogul

  • Full Member
  • ***
  • Posts: 163
Re: What program do you use to see tiles?
« Reply #2 on: November 26, 2015, 09:18:36 AM »
YY-CHR has support for PCE, as well as other useful formats like 1bpp 8x8 and 16x16..

Thank you sir! I want to tackle the translation of Download, so far i have been successfull in changing the English text (the table is ASCII, and is visible through hex workshop). I can't find the Japanese script though. maybe if I can see the tiles with that you have provided me with today i might be able to make progress. Thank you.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: What program do you use to see tiles?
« Reply #3 on: November 26, 2015, 11:09:14 AM »
A lot of PCE games have their tiles compressed, which will hinder you quite a lot.  It might be better to dump 8k pages of CHR-RAM from an emulator like Mednafen to get the uncompressed tile data.  You can temporarily append the tiles to the PCE ROM and use it in the following program:

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

Djinn Tile Mapper is useful for viewing the whole ROM using tile data as a font.  (8K only at a time in SNES tile mode).

toktogul

  • Full Member
  • ***
  • Posts: 163
Re: What program do you use to see tiles?
« Reply #4 on: November 26, 2015, 12:46:22 PM »
A lot of PCE games have their tiles compressed, which will hinder you quite a lot.  It might be better to dump 8k pages of CHR-RAM from an emulator like Mednafen to get the uncompressed tile data.  You can temporarily append the tiles to the PCE ROM and use it in the following program:

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

Djinn Tile Mapper is useful for viewing the whole ROM using tile data as a font.  (8K only at a time in SNES tile mode).


Thank you for your help. Sorry for the upcoming question, it might sound dumb. So what you are saying is that I should use the emulator, run the game, and wait until there is text on the screen to pause and have the emulator show the info in the RAM running at that precise moment? So I am pretty much taking a RAM snapshot of whats going on at that moment in the game correct? That way I can find the tiles used at that moment and start building a table. Once I have the table figured out, since I already have the ASCII table, I should be able to find in the ROM the dialogues sections, and simply modify it with the English script. Correct?


elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: What program do you use to see tiles?
« Reply #5 on: November 26, 2015, 12:49:05 PM »
The best thing to do is to run Mednafen's debugger and look at what it is doing in VRAM and on the screen.

If you do that, then you'll see that it's loading up a bunch of 12x12 black-and-white kanji/English glyphs into 16x16 sprites and then printing out many lines of text.

Then it updates some of those sprites with new glyphs and prints a bunch more lines of of text.

The text isn't stored as shift-jis, and doesn't seem to get decompressed into RAM as shift-jis.

My first guess is that it's probably stored as indexes into the current set of glyphs that have been uploaded into VRAM.

So ... with a bit of investigation (looking at which zero-page locations change as text is displayed) ...

Zero-page ptr @ $0e is used for 8x8 ascii background characters

Zero-page ptr @ $8e is used for 16x16 kanji sprites (the story script)

The script is stored in bank $09.

This is the call to the function that reads the script ...

$00:$eda5 jsr $00:$ee62

This is the function that reads the script ...

$00:$ee62 function starts
$00:$ee75 actually reads script ptr at $8e

This is the code that sets the very first script ...

$09:805c table access with x set to 0 ...

$8e (script ptr lo byte) = $807c,x (index into table of pointers) = $75
$8f (script ptr hi byte) = $8091,x (index into table of pointers) = $8a

First 2 characters in the script are "22".

"2" is uploaded into in sprite number $144.

$09:$8a75 = $14 = "2"
$09:$8a76 = $14 = "2"

Once you understand the mapping from $14 to sprite $144, then you can see that

"DOWN LOAD" = $16 $19 $1a $18 $10 $17 $19 $15 $16

Which you can find stored @ $09:$8b2e, $09:$8b93, $09:$8bce, etc

So ... does that make any sense to you?

If not, then as much as I'd personally love to see a translation of Download ... you might want to consider an easier game as your first translation!
« Last Edit: November 26, 2015, 01:40:19 PM by elmer »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: What program do you use to see tiles?
« Reply #6 on: November 26, 2015, 12:59:15 PM »
Once I have the table figured out, since I already have the ASCII table, I should be able to find in the ROM the dialogues sections, and simply modify it with the English script. Correct?

No, because the 8x8 ASCII font isn't used for the story script, it's used for things that are already in English.

The story script is displayed as sprites, and the contents of those sprites change at different times during the script. At no time is there a complete set of ASCII glyphs uploaded into those sprites.

You're going to need a major programming hack to find out when/how those sprite are uploaded, and how to change them into English glyphs.

After which you've got huge 16x16 English characters.

Switching to something like 8x16 is going to require a much more sophisticated hack.

To be honest ... this isn't a particularly "friendly" translation for a 1st-time guy to tackle.

toktogul

  • Full Member
  • ***
  • Posts: 163
Re: What program do you use to see tiles?
« Reply #7 on: November 26, 2015, 01:51:22 PM »
Once I have the table figured out, since I already have the ASCII table, I should be able to find in the ROM the dialogues sections, and simply modify it with the English script. Correct?

No, because the 8x8 ASCII font isn't used for the story script, it's used for things that are already in English.

The story script is displayed as sprites, and the contents of those sprites change at different times during the script. At no time is there a complete set of ASCII glyphs uploaded into those sprites.

You're going to need a major programming hack to find out when/how those sprite are uploaded, and how to change them into English glyphs.

After which you've got huge 16x16 English characters.

Switching to something like 8x16 is going to require a much more sophisticated hack.

To be honest ... this isn't a particularly "friendly" translation for a 1st-time guy to tackle.

thank you for your help. Well looks like I will have to pass on this one, too difficult for now, but ill come back later once I get better at it. this isnt over yet download, I will crack you one day (Its ironic since the plot is all about hacking and computer stuff hahah). Its a little bit bitter sweet since I was able to modify the English text,  see on screen my progress and I thought I made a major breakthrough hahaha.

At least I learned a couple of things with Download. What game would be more begginer friendly? Even if there is a translation already available, I would like to train to get better at understanding how those things work. Maybe a game without their font compressed or something.

cabbage

  • Sr. Member
  • ****
  • Posts: 342
Re: What program do you use to see tiles?
« Reply #8 on: November 26, 2015, 01:53:53 PM »
elmer is right, download is a tricky one.
I got as far as building a table for the loaded glyphs, dumping the script for that cutscene, replacing the loaded glyphs with the set of English characters, and inserting some test text (with a new table)... ie, the easy part.
But, it was quite ugly and the translation would have to be very heavily edited. the game really needs more extensive hacking to do it justice.
If none of this has discouraged you and you really want to try a bare-bones translation for it, I can dig out my notes and help you get started.

Really, there are plenty of other games that would be much easier, especially for a first project.
If you want to translate a shooter, how about The Lost Sunheart? If I remember correctly, it looked fairly straightforward to hack and would certainly benefit from a translation (in my opinion).
« Last Edit: November 26, 2015, 01:57:54 PM by cabbage »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: What program do you use to see tiles?
« Reply #9 on: November 26, 2015, 02:42:22 PM »
Well looks like I will have to pass on this one, too difficult for now, but ill come back later once I get better at it. this isnt over yet download, I will crack you one day (Its ironic since the plot is all about hacking and computer stuff hahah).

That's the spirit ... don't let it beat you ... just put it on the back-burner until you've got more experience, and have the necessary confidence with the programming side (or find a programmer to partner with).  :wink:

It can be done ... you'll just need to expand to a 768KB or 1MB cartridge size for the extra storage and re-write the display code to print into the sprites as a bitmap rather than use pre-loaded glyphs.

Far from trivial ... but definitely possible.

It's just a matter of experience and will. Good luck!  :)


Quote
At least I learned a couple of things with Download. What game would be more begginer friendly?

Someone else will have to answer this one ... I'm sorry, but I just don't know.


I got as far as building a table for the loaded glyphs, dumping the script for that cutscene, replacing the loaded glyphs with the set of English characters, and inserting some test text (with a new table)... ie, the easy part.

On the contrary ... what you did is excellent work, don't sell it short. Congratulations, you solved some of the most challenging parts!  :D

It's hard for most folks to understand the abstractions and schemes that were part of a programmer's arsenal back-in-the-day ... and you cracked that ... you did really, really well.

The next step is also a tough one, and I can easily understand why you decided to drop things ... it's not that it's incredibly difficult ... but it is time-consuming, and it needs a familiarity with programming techniques that nobody uses anymore, and really aren't well known or documented.

If it's something that really, really interests you, then there are folks at places like "romhacking.net" where you can probably learn the skills that you'll need.


Quote
If none of this has discouraged you and you really want to try a bare-bones translation for it, I can dig out my notes and help you get started.

I think that this goes back to a post that Bonknuts made in a different thread ... it would be great if there were a place that people could share their notes if/when they decide to abandon a translation. It would make things much easier for someone else when they come along months/years later and want to "have-a-go" at a translation.

toktogul

  • Full Member
  • ***
  • Posts: 163
Re: What program do you use to see tiles?
« Reply #10 on: November 26, 2015, 03:13:55 PM »
elmer is right, download is a tricky one.
I got as far as building a table for the loaded glyphs, dumping the script for that cutscene, replacing the loaded glyphs with the set of English characters, and inserting some test text (with a new table)... ie, the easy part.
But, it was quite ugly and the translation would have to be very heavily edited. the game really needs more extensive hacking to do it justice.
If none of this has discouraged you and you really want to try a bare-bones translation for it, I can dig out my notes and help you get started.

Really, there are plenty of other games that would be much easier, especially for a first project.
If you want to translate a shooter, how about The Lost Sunheart? If I remember correctly, it looked fairly straightforward to hack and would certainly benefit from a translation (in my opinion).

Thank you for your help, you 2 are the best! Ill give that game a look, and I will for sure come back with some questions haha. Its seriously been interesting soo far to look at how the games work. I hope I can contribute more in the future to the rom hacking scene. it looks like one of the most interesting hobby ever. so far its been fascinating. 

toktogul

  • Full Member
  • ***
  • Posts: 163
Re: What program do you use to see tiles?
« Reply #11 on: November 26, 2015, 03:36:46 PM »
Allright, looks like a game I can do. I wasnt even aware of this game haha. I managed to find the japanese and alphabet font. Even in game, the characters do not look amazing, but using yy-chr its even worst. It seems like its missing letters, or rather skipping every 2 letters. Upon looking a little closer, it even seems like there are 2 letters per square (J and K are 2 layers of the same square)

Anyway, I started using this tool today, what is the Hexadecimal adress? is it what is written under <<Pattern>> A being A4  and C A5?


ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: What program do you use to see tiles?
« Reply #12 on: November 26, 2015, 05:35:48 PM »
A little reminder that PCE tiles (when they're not compressed) are usually 4BPP, SNES format.  (2BPP NES format is rarely the case...)

You're in luck, since Don Sunheart uses 1BPP tiles for its font.  Just change YY-Chr's view to 1BPP and shift the tiles around till a blank space then exclamation mark are the first tiles in the window.  That may be the mapping.

toktogul

  • Full Member
  • ***
  • Posts: 163
Re: What program do you use to see tiles?
« Reply #13 on: November 26, 2015, 07:33:21 PM »
A little reminder that PCE tiles (when they're not compressed) are usually 4BPP, SNES format.  (2BPP NES format is rarely the case...)

You're in luck, since Don Sunheart uses 1BPP tiles for its font.  Just change YY-Chr's view to 1BPP and shift the tiles around till a blank space then exclamation mark are the first tiles in the window.  That may be the mapping.

Great thank you for the heads up. By switching to 1bpp tiles it should be 1 per square right? Is it the reason why the quality of the characters in game are so... Low quality?

cabbage

  • Sr. Member
  • ****
  • Posts: 342
Re: What program do you use to see tiles?
« Reply #14 on: November 26, 2015, 08:35:51 PM »
toktogul- good, you found the font! :)
Sunheart indeed uses a 1bpp font. I'm not sure what you mean by "low quality," but the font is just 8x8 tiles with 2 colors (one color for the letter, one color for the background--hence 1bpp). A lot of games use a 1bpp font.
Luckily this game already includes the full uppercase and lowercase English alphabet, so you don't really have to edit the font at all. You can eventually overwrite some of the Japanese font to add extra characters if you need them.

To make your table file(s), you'll need to look into the game to find out which byte(s) map to which letter/character. There's not necessarily a standard method that applies to all games...
one easy way to brute-force it is to find a string of English text in the game and do a Relative Search (e.g. with the WindHex hex editor) to find that string, and build your table from that information. You can always edit that string in the hex editor to test other values as you fill in the gaps of your table(s).

Make sure you keep a clean copy of the ROM around while you work so you can easily restore it after something gets broken :D