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

Author Topic: Psycho Dream (SFC) - Translation Hack  (Read 763 times)

BitCloud88

  • Newbie
  • *
  • Posts: 4
    • View Profile
Psycho Dream (SFC) - Translation Hack
« on: January 11, 2021, 08:30:13 pm »
Hi everyone!

I have been trying to teach myself Hex editing and am hoping to learn a bit more as I read threads here on the forum but also by asking just a few questions along the way!

My question:

How do you determine when a ROM is displaying text/characters or if perhaps the written words on screen are actually sprite/graphic work?

I'm using HxD and am starting with an action plat-former game developed by RIOT called Psycho Dream (1992) for the SFC/SNES.

The game itself does not deal much with story except for a few loading screens which I've very roughly translated. For example the first screen of three:



このカセットに収録されている
映像及び音声の使用は、
家庭内での利用を目的とする
販売に限って許諾されております。

The use of video and audio recorded on this cassette. It is licensed only for sale for the purpose of domestic use.

In HxD under the character encoding of UTF-16 BE, the Hex would be:

Code: [Select]
30 53 30 6e 30 ab 30 bb 30 c3 30 c8 30 6b 53 ce
93 32 30 55 30 8c 30 66 30 44 30 8b 00 0a 66 20
50 cf 53 ca 30 73 97 f3 58 f0 30 6e 4f 7f 75 28
30 6f 30 01 00 0a 5b b6 5e ad 51 85 30 67 30 6e
52 29 75 28 30 92 76 ee 76 84 30 68 30 59 30 8b
00 0a 8c a9 58 f2 30 6b 96 50 30 63 30 66 8a 31
8a fe 30 55 30 8c 30 66 30 4a 30 8a 30 7e 30 59
30 02

However, I can't seem to find the matching Hex or the decoded text in the .SMC.

I've been able to decipher code/text belonging to the game options and credits, but not this warning screen...

The debug at this screen as well as the next two after it show the same information:

Code: [Select]
DMA[7]: CPU->PPU Mode:0 0x0003B1->0x2122 Bytes:200 (inc) V:227 CGRAM: 00 (0)
Is it possible the warning is not loaded as characters or have I made an error?

And sorry if I've mis-formatted anything in this post to everyone. I really appreciate any help! Thanks!
« Last Edit: January 11, 2021, 11:35:59 pm by BitCloud88 »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7060
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Psycho Dream (SFC) - Translation Hack
« Reply #1 on: January 12, 2021, 09:51:03 am »
Old console games rarely store their game text in ASCII.
Let alone the chance of UTF.

How do you know if it's text or graphics?

Typically you work backwards.
Get a savestate of the screen. (the reason I still keep ZSNES is because it uses uncompressed savestates. And also to combine with WindHex, which hides the ZSNES CPU data, so I can see actual VRAM offsets)
Then open it in a tile editor. If you can see the full text displayed among the graphics, then it's probably a graphic. If you can only see the font (characters not duplicated), it's probably a font.

Then use a debugging emulator to figure out where and how that data was loaded from.
"My watch says 30 chickens" Google, 2018

BitCloud88

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Psycho Dream (SFC) - Translation Hack
« Reply #2 on: January 12, 2021, 06:30:42 pm »
Thanks so much for the reply!

Okay, great idea - I made a .ZST save state at this screen and tried two different tile editors.

Perhaps I'm just not familiar with how to read a tile editor, but the first editor looks like nothing more but artifacts... the second editor however I was able to make-out what appears to be the first screen in my example:



If I understand correctly, this means the characters are among the graphics.

Next question then:

I'm guessing I would run the debug emulator and trace the DMA for where this data location is saved?

Pardon my novice but I really appreciate it! Feel like I'm getting somewhere!

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7060
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Psycho Dream (SFC) - Translation Hack
« Reply #3 on: January 12, 2021, 06:58:04 pm »
Which tile editors are you using?

When I mentioned WindHex, it automatically recognizes ZSTs and hides the CPU data (which is the first 0xC13 bytes in the file) and then after that is 0x20000 bytes WRAM, 0x10000 bytes VRAM and 0x10000 bytes APU RAM.

If you are using a different tile editor you will have to manually scroll to the right address ($C13) to see the start of the RAM data. (I am pretty sure I remember that magic number correctly.)
If you can find your matching data within WRAM (the first $20000 bytes, or would be $20C13-40C12), then it is easier to trace, since you can look for the routine copying it to WRAM.

Also, it looks like graphics are stored in a lower bitdepth. For SNES, the tile editor is probably defaulting to 4bpp, but 2bpp is more commonly used. It might even be 1bpp. You will have to find the key for your tile editor to adjust that so it looks right.
"My watch says 30 chickens" Google, 2018

BitCloud88

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Psycho Dream (SFC) - Translation Hack
« Reply #4 on: January 12, 2021, 07:28:16 pm »
The tile editors I used were Digisalt and Ultimate Tile Editor V0.6; However I just tried another called Graphic Editor which seems to me a bit more dynamic.

I appreciate the hint! So oddly enough the graphics for the written characters are located both at $C13 for the RAM and $20C13 for VRAM. Running the game it seems to draw from the second set in VRAM...

Now that I can experiment, I'm able to edit my save state file and see alterations that I've made to the graphic tiles! However, I don't see a simple way to introduce English letters to the tiles, unless I can upload a pre-designed image at this tile location?

Thanks for providing me with some direction! Exciting to finally see (literally) some results! :thumbsup:

January 13, 2021, 07:53:45 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Sorry for double posting! I feel so close but have one last brick wall in front of me!

I've located the tiles I need to edit in SNES' 2bpp graphic format:



I am replacing the tiles with an image in Photoshop that is 128px wide by 64px tall saved as a .BMP.

My save state shows I have the location of my text pretty close, but it's illegible because I can't seem to understand the colors...



In case I don't figure it out by tinkering, any hints on editing the color palette is much appreciated!

January 14, 2021, 10:19:44 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
If anyone has the keys to open my mind to this I'd be really grateful:

How do I edit the tiles in the SNES 2bpp Graphic Format?

I can't even see them in the ROM.SMC unless I create a save state .ZST. I've been able to manipulate the sprites in 4bpp but anything in 2bpp is hidden...

Any hints at this point would make a world of difference. Thanks!
« Last Edit: January 15, 2021, 12:06:44 am by BitCloud88 »