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

Author Topic: Translations: Pokémon Diamond for the NES?!  (Read 9111 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: 231
    • 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: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
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

  • Jr. Member
  • **
  • 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: 36
    • 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: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
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: 36
    • 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: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
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: 36
    • 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: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
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

  • Jr. Member
  • **
  • Posts: 21
    • 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: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
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?

torridgristle

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #12 on: April 20, 2019, 08:09:23 am »
You're gonna end up needing to change pointers. I did this in my own copy to enter full-length Pokemon names since there's a bunch of free space here and there in the ROM. I used Kruptar7 which recalculates pointers for you but Atlas / Cartographer or whatever else is popular might do it too as long as you tell it where the free space is located.

James5541

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #13 on: April 20, 2019, 03:28:04 pm »
It looks amazing so far! Pokemon Diamond is my personal favourite and I can't wait to see the finished product.
"Do a barrel roll"

SaveState

  • Jr. Member
  • **
  • Posts: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
Re: Translations: Pokémon Diamond for the NES?!
« Reply #14 on: April 23, 2019, 11:07:30 am »
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.



Thank you so much for this CPU info! After a week or so of inactivity (sorry!) I just finished repointing all Pokemon names! (I know that the name size limit is 8 characters, so all names longer than that were abbreviated as such.) However, even while using only 0A (instead of 0D 0A) as the text stop byte, I can't fit the last two Pokemon's names, Hippopotas and Hippowdon, in the space designated for Pokemon names in the ROM. I tried repointing the names to somewhere else in the ROM, but that didn't work :'( and their names are left blank when I try to see them (possibly because the names weren't loaded into memory). Is there anything I can do?

Edit: Hey I just figured out how to fix it :P I put their names in the Pokemon Species section of data (Where there is plenty of extra space) and it works fine! ;)

April 23, 2019, 11:08:50 am - (Auto Merged - Double Posts are not allowed before 7 days.)
It looks amazing so far! Pokemon Diamond is my personal favourite and I can't wait to see the finished product.

Also, thanks for the support! ;) This kind of stuff is what keeps me going!

April 24, 2019, 11:49:06 am - (Auto Merged - Double Posts are not allowed before 7 days.)
In the game, there only seems to be Poison as a status effect, and all moves that would change stats only make the opponent poisoned, Is that correct? Doesn't this make the Paralyz Heal, Awakening, Ice Heal, Burn Heal, and Full Heal Obsolete? Is there any way to include the other status effects, or stat-modifying moves?
« Last Edit: April 24, 2019, 11:49:06 am by SaveState »

Lord Igniz

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #15 on: June 09, 2019, 08:13:39 pm »
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?
Hello,

Unforunately the Everdrive N8 only supports up to 512KB rom sizes. Mapper 4 is supported, but 224 is not. Hopefully someone will put the work to clear up the space on the ROM for this, Pokemon Yellow, and FF VII because all these Chinese ROMs include a bunch of additonal garbage that is not needed, and is keeping it from running via a flash cart which I need to play these games as I do not use emulation. Hopefully this will be a reality some day.

Supergamerguy

  • Full Member
  • ***
  • Posts: 245
  • Retro game fanatic; loves platformers, hates jrpgs
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #16 on: December 11, 2020, 09:20:06 pm »
Is this project still being worked on? I, and I'm sure a great many others, would love to see it finished.
Dah-nuh-nuh-nah! Super fighting robot! Dah-nuh-nah-nah! MEGA MAN! Fighting.......to save.......the world!!!!!

SaveState

  • Jr. Member
  • **
  • Posts: 16
  • I hack NES, and code in JavaScript.
    • View Profile
    • SaveState's Web Games
Re: Translations: Pokémon Diamond for the NES?!
« Reply #17 on: February 12, 2021, 01:38:44 am »
Is this project still being worked on? I, and I'm sure a great many others, would love to see it finished.

Hey man, I am super excited to get back on this project, as I see that it would be really cool to actually play this game fully in English. However, I am currently serving a two-year mission trip for my church. I do plan on resuming work on this once I return home, but I simply need to focus more on the Lord's work for right now. I hope you guys can understand that :)

Supergamerguy

  • Full Member
  • ***
  • Posts: 245
  • Retro game fanatic; loves platformers, hates jrpgs
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #18 on: February 12, 2021, 07:33:24 am »
Hey man, I am super excited to get back on this project, as I see that it would be really cool to actually play this game fully in English. However, I am currently serving a two-year mission trip for my church. I do plan on resuming work on this once I return home, but I simply need to focus more on the Lord's work for right now. I hope you guys can understand that :)

I completely understand that and wish you good luck on your trip! This project is definitely secondary in comparison and can wait.
Dah-nuh-nuh-nah! Super fighting robot! Dah-nuh-nah-nah! MEGA MAN! Fighting.......to save.......the world!!!!!

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7088
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Translations: Pokémon Diamond for the NES?!
« Reply #19 on: February 17, 2021, 01:48:26 am »
One does not just "delete free space" in a NES game. Certainly you can't just "trim" it like maybe you could a GBA or DS game due to the console structure.
Not without significantly rewriting the game.
I think that comment warrants a wall of technical information, sorry if that is a can of worms.

It is more understandable if one knows how 8-bit cartridge games were structured.
8-bit CPUs almost if not always had a 64KB address limit, which meant that nearly all 8-bit consoles using those would be limited to 32KB ROMs.
Since 32KB would have been paltry even by 1985 standards, that is why they use mappers. (true of NES, GB, SMS, GG, MSX and so on.)
Mappers allowed games to have whatever size game ROM they wanted, as long as they had a mapper able to support it. Mappers break the ROM into "banks" so that at any one instant, only a total of 32KB of banks is visible to the CPU since that is all it can understand.

With NES, it is common mapper artchitecture that the LAST bank of PRG-ROM is always available to the CPU (to contain certain important code such as the boot code). If you remove data from the ROM to "delete free space", how will the game know where it is?

Also, official NES games often used CHR-ROM (where the PPU can access an entire ROM bank as the loaded tileset). That is, it's not just one binary blob, is a collection of ROM banks that are expected to all be an equal size each.
That means if you want to change even ONE TILE in the tileset, you need to duplicate an entire bank. (whatever the CHR-ROM bank size is, depending on the mapper/mapper configuration settings)
(one possible use was to cycle through CHR-ROM banks rapidly to create an animation effect, because using CHR-RAM and writing animation data to it every frame is a real bottleneck. See the USA (CHR-RAM) and PAL (CHR-ROM) versions of Dragon's Lair for what a dramatic difference that can make on performance.)

Though why the Chinese RPGs did it. Don't know if they made good technical use of it, but seeing as the ones spoken of are demakes like Pokemon and FF7, these were probably just slopped together like a bootleg-cranking machine.
"My watch says 30 chickens" Google, 2018