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

Author Topic: Translations: Pokémon Diamond for the NES?!  (Read 1862 times)

RHDNBot

  • Guest
Translations: Pokémon Diamond for the NES?!
« on: March 12, 2019, 08:33:17 am »

Update By: SaveState

Yes, you read that right! Here is a brand-spanking-new (incomplete) translation of Kou Dai Guai Shou, a Chinese Pokémon Diamond bootleg game for the NES. SaveState is in charge of the project, and is keeping a good pace.

As of the time of this news, the translation of this game only goes up to Route 202, with many other things edited, such as some outdoor tiles and the battle system text.

RHDN Project Page

Relevant Link

mikeprado30

  • Full Member
  • ***
  • Posts: 169
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #1 on: March 13, 2019, 11:17:10 pm »
Very nice!

Hopefully it will get fully translated soon.

Thanks to the people involved on this project :thumbsup:

SaveState

  • Jr. Member
  • **
  • Posts: 13
  • I hack GBA, NES, and sometimes GBC
    • View Profile
    • SaveState's ROM Hacking Site
Re: Translations: Pokémon Diamond for the NES?!
« Reply #2 on: March 15, 2019, 09:07:30 am »
Yes! You're welcome! As of right now, it is only me. :) However, I do think it would be better if someone else would help with things. It's kinda hard trying to do this and school at the same time.  :(

dm0x

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #3 on: March 18, 2019, 01:00:04 pm »
This is very neat and interesting. Cant wait for it to finish so i can give it a proper playthrough.

torridgristle

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #4 on: March 18, 2019, 06:01:53 pm »
I found out why it wasn't running in Mesen even though the original ROM ran. The original ROM was in the compatibility database and what it did was:

System: NesNtsc
Mapper: 224
PRG ROM Size: 1024
CHR RAM Size: 8
Work RAM Size: 0
Save RAM Size: 8
Battery: 1
Mirroring: Horizontal

And, without setting it to NES 2.0, it will run in Mesen if you change the header to 224 (apparently many mapper 224 ROMs are incorrectly set to mapper 4) instead of displaying a gray screen at Prof Oak, but saving doesn't work.

However if you go ahead and change it to a NES 2.0 header then all the compatibility settings would be saved to the file and it works fine in Mesen with saving and presumably everything.
« Last Edit: March 18, 2019, 07:25:05 pm by torridgristle »

SaveState

  • Jr. Member
  • **
  • Posts: 13
  • I hack GBA, NES, and sometimes GBC
    • View Profile
    • SaveState's ROM Hacking Site
Re: Translations: Pokémon Diamond for the NES?!
« Reply #5 on: March 19, 2019, 07:26:04 am »
However if you go ahead and change it to a NES 2.0 header then all the compatibility settings would be saved to the file and it works fine in Mesen with saving and presumably everything.

WOW! Thank you so much for the info! I tried changing the mapper to number 224, and it worked in Mesen! However, it lost compatibility in FCEUX, because mapper 224 isn't supported by FCEUX.

I'm not vary familiar with how NES 2.0 headers work. Could you please tell me what specifics I should set the NES 2.0 header to? (Like the Work RAM, Save RAM, CHR RAM, and CHR Save RAM and stuff?) (Sorry, I probably sound like a noob right now)

Edit: Never mind. I figured it out ;) :P However, it still doesn't have support in FCEUX. Is there any remedy for that?

March 19, 2019, 10:03:09 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Also, if anyone could figure out how text pointers work, that would be super helpful  :laugh: Also, I'm having trouble fixing which music plays where, and help with that would be appreciated :thumbsup:
« Last Edit: March 19, 2019, 10:05:59 am by SaveState »

torridgristle

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #6 on: March 22, 2019, 11:27:37 am »
Sorry for the late reply, I didn't have an internet connection for a while.

I don't think that there's a good remedy for it as of yet. I looked around for reasons why this runs in FCEUX at all, when it shouldn't, and it turns out that a fix for KT-008 boards is coded into FCEUX's MMC3 support with the understanding that they're often mislabeled as Mapper 4. https://github.com/TASVideos/fceux/blob/5be92d3ee50fcdc04ec4d727cef5201fa8fba378/src/boards/mmc3.cpp

It's ugly but you may have to have an IPS for a NES 2.0 mapper 224 header that makes it work in Mesen and possibly some other emulators, and an IPS for an incorrect but still playable iNES mapper 4 header that makes it work in FCEUX and maybe other FCEUX-based emulators.

While I prefer Mesen and understand it to be superior in debugging and hardware-accuracy, FCEUX is undoubtedly popular and has many ports (it even came installed on my little Chinese handheld) and supporting it is important, as much of a headache as it may be.

Anyway: The text pointers, from what I've seen by relative searching for the offsets of what I believe are string terminators (0D 0A), appear to be the offset (minus 10h from the header since I forget that often) + 8000h. For example, at 0606 these 2-byte pointers exist: 478D,538D,6E8D,9E8D,DD8D,EA8D,338E,3F8E,7C8E,DF8E. They lead to 0D47, 0D53, 0D6E, 0D9E, 0DDD, 0DEA, 0E33, 0E3F, 0E7C, 0EDF if I'm correct. Hope this helps.
« Last Edit: March 22, 2019, 12:48:47 pm by torridgristle »

SaveState

  • Jr. Member
  • **
  • Posts: 13
  • I hack GBA, NES, and sometimes GBC
    • View Profile
    • SaveState's ROM Hacking Site
Re: Translations: Pokémon Diamond for the NES?!
« Reply #7 on: March 22, 2019, 01:04:07 pm »
It's ugly but you may have to have an IPS for a NES 2.0 mapper 224 header that makes it work in Mesen and possibly some other emulators, and an IPS for an incorrect but still playable iNES mapper 4 header that makes it work in FCEUX and maybe other FCEUX-based emulators.

...

Anyway: The text pointers, from what I've seen by relative searching for the offsets of what I believe are string terminators (0D 0A), appear to be the offset (minus 10h from the header since I forget that often) + 8000h. For example, at 0606 these 2-byte pointers exist: 478D,538D,6E8D,9E8D,DD8D,EA8D,338E,3F8E,7C8E,DF8E. They lead to 0D47, 0D53, 0D6E, 0D9E, 0DDD, 0DEA, 0E33, 0E3F, 0E7C, 0EDF if I'm correct. Hope this helps.

Yeah about the separate IPS thing, I thought I was gonna have to do that :( .

Thanks for the info about pointers, I'll look into it! :thumbsup:

torridgristle

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #8 on: March 22, 2019, 03:25:16 pm »
Capture2Text with the additional Chinese Simplified dictionary seems to work perfectly with the game's 16px font, and the auto translation from Google tends to be understandable.

https://sourceforge.net/projects/capture2text/
https://sourceforge.net/projects/capture2text/files/Dictionaries/

I don't know how much info you've figured out on items and such so I figure I should share what I have on CPU memory hacking for debugging purposes, like full Pokedex and all items and such.

Spoiler:
00BB Item Count: Pokeball
00BC Item Count: Great Ball
00BD Item Count: Ultra Ball
00BE Item Count: Master Ball
00BF Item Count: Potion
00C0 Item Count: Super Potion
00C1 Item Count: Hyper Potion
00C2 Item Count: Max Potion
00C3 Item Count: Antidote
00C4 Item Count: Paralysis Heal
00C5 Item Count: Awakening
00C6 Item Count: Ice Heal
00C7 Item Count: Burn Heal
00C8 Item Count: Full Heal
00C9 Item Count: Revive
00CA Item Count: Elixer
00CB Item Count: Max Elixer
00CC Item Count: Rare Candy
00CD Item Count: Fire Stone
00CE Item Count: Water Stone
00CF Item Count: Thunder Stone
00D0 Item Count: Leaf Stone
00D1 Item Count: Moon Stone

0098 Number of Pokemon seen ($5D is max) (Pokedex)

0303 Horizontal Location
0335 Verical Location

044F-045B Pokemon that have been seen (Pokedex)
046F-047B Pokemon that have been caught (Pokedex)

04AF Number of Pokemon in your party

Pokemon in party position 1:
04B0 Party Placement (Leave this alone)
04B6 Pokemon ID Number
04BC Level
04C2 HP Remaining, first byte.
04C8 HP Remaining, second byte.
04CE Experience (Relative), first byte.
04D4 Experience (Relative), second byte.
04DA First Move ID
04E0 Second Move ID
04E6 Third Move ID
04EC Fourth Move ID
04F2 First Move PP Remaining
04F8 Second Move PP Remaining
04FE Third Move PP Remaining
0504 Fourth Move PP Remaining
050A Status Effect (Poison is 01)

Pokemon in party positions 2-6 you add 1 or 2 or 3 etc to the addresses for the Pokemon in party position 1.

I've been working on a table for the Chinese text. It takes up B0-BF in the byte pairs what go Bx xx and I'm finding that it's... it's not really a typical text encoding or table or anything. It has duplicates, like 入 is B0 8E and B1 30 and B2 D2 and probably some more once I finish the other banks. 口 is B0 8F and B1 31 and and B2 D3. Maybe this is the pattern? There's a good chunk of things that repeat in each Bx after a few unique characters for the Bx, like 一 which has appeared at B0 0E but nowhere else so far (I've done B0 through B2). It doesn't seem to make things easy to predict though so I can't just find a few and fill out a complete table, so far I've just been replacing the text for interacting with the TV with Bx 00-FF and OCRing the Simplified Chinese what shows up.

Edit: Finished the table. I know for sure a few characters aren't right, but there's images built from screenshots of each Bx character set in case it becomes a problem and needs to be refined. As it stands it's better than trying to find where the text is in the ROM when it's loaded while playing it. https://mega.nz/#!Fk0QkQpA!D-pmAHFdrZGmDQhyo2eDObd20i0Xa4e-LhppV0ov8DM
« Last Edit: March 23, 2019, 12:22:22 pm by torridgristle »

SaveState

  • Jr. Member
  • **
  • Posts: 13
  • I hack GBA, NES, and sometimes GBC
    • View Profile
    • SaveState's ROM Hacking Site
Re: Translations: Pokémon Diamond for the NES?!
« Reply #9 on: March 25, 2019, 07:04:52 am »
Thanks! I don't really need Google translate and stuff, I just look at the text in an actual Pokemon Diamond Game! This table file will definitely help me when looking for a specific string of text! Thank you so much for helping me out! :thumbsup:

Edit: Sorry I haven't been making super-fast progress. Like I said before, it's kinda hard finding time to do this with school and everything. Nevertheless, I will have a significant update soon.

Lord Igniz

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #10 on: April 11, 2019, 04:58:10 am »
What is the file size of the ROM? If it's anything like Pokemon Yellow NES it won't run on a flash cart because the file is too large (2MB for Yellow NES) and the mapper (93) was also not supported. Would love to play this on the actual hardware.

SaveState

  • Jr. Member
  • **
  • Posts: 13
  • I hack GBA, NES, and sometimes GBC
    • View Profile
    • SaveState's ROM Hacking Site
Re: Translations: Pokémon Diamond for the NES?!
« Reply #11 on: April 12, 2019, 12:14:37 pm »
What is the file size of the ROM? If it's anything like Pokemon Yellow NES it won't run on a flash cart because the file is too large (2MB for Yellow NES) and the mapper (93) was also not supported. Would love to play this on the actual hardware.

This game is actually only 1MB in size (not sure if that's small enough)! Also, I'm not sure what mappers are supported on flashcarts, but this one uses mapper 4 or 224 depending on the level of support the emulator/flashcart has. (It is actually a mapper 224 game, but, as stated above by torridgristle, it was commonly mistaken as a mapper 4 ROM by dumpers, and some emulator developers just included support for it as a mapper 4 game instead of telling everyone to change their ROM to 224.) I hope I helped! :thumbsup:

edit: speaking of ROM sizes, does anyone here know if there's an easy way to take out free space in a ROM such as this one? Correct me if I'm wrong, but the only way to do this is just tons of re-pointing (something I am definitely not willing to do), am I correct?