Author Topic: Reading Data from PCE CDs  (Read 679 times)

wolfman

  • Hero Member
  • *****
  • Posts: 546
Reading Data from PCE CDs
« on: July 07, 2014, 10:26:42 PM »
Is it possible to access the data stored on a game CD? I am curious in how certain games are structured in content, also I wanted to peek into its data. Is it possible to decompile them?

I know this is a very basic question, but I haven´t found an answer so far on my search...
recent addition: Japanese Language Skills, A1 proficiency level
------------------------------------------------------------------------
CryptoCoin Warrior
My Setup: PC Engine LT, CD-ROM², IFU-30
AKA woolfman on AtariAge, PlanetVB, Circuit-Board.
-----------------------------------------------------------------------

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Reading Data from PCE CDs
« Reply #1 on: July 08, 2014, 12:21:03 AM »
There is no file system when it comes to the data track of a NEC PCE/TG-16 game. The data track of a game starts with boot code and more code mixed with graphic data, adpcm data if used, etc. You have to disassemble at the first offset, follow the code as it boots the game and learn it to determine what's what over time. You would externally mark offsets as game code, text blocks, graphic data (tiles/fonts/etc), adpcm data, etc. Just like hacking a ROM file for a NES game, same thing, it's one binary of executable Assembly code mixed with graphic/script/audio data.

wolfman

  • Hero Member
  • *****
  • Posts: 546
Re: Reading Data from PCE CDs
« Reply #2 on: July 08, 2014, 12:49:15 AM »
There is no file system when it comes to the data track of a NEC PCE/TG-16 game. The data track of a game starts with boot code and more code mixed with graphic data, adpcm data if used, etc. You have to disassemble at the first offset, follow the code as it boots the game and learn it to determine what's what over time. You would externally mark offsets as game code, text blocks, graphic data (tiles/fonts/etc), adpcm data, etc. Just like hacking a ROM file for a NES game, same thing, it's one binary of executable Assembly code mixed with graphic/script/audio data.

Oh my.
recent addition: Japanese Language Skills, A1 proficiency level
------------------------------------------------------------------------
CryptoCoin Warrior
My Setup: PC Engine LT, CD-ROM², IFU-30
AKA woolfman on AtariAge, PlanetVB, Circuit-Board.
-----------------------------------------------------------------------

wolfman

  • Hero Member
  • *****
  • Posts: 546
Re: Reading Data from PCE CDs
« Reply #3 on: July 09, 2014, 05:55:20 AM »
There is no file system when it comes to the data track of a NEC PCE/TG-16 game. The data track of a game starts with boot code and more code mixed with graphic data, adpcm data if used, etc. You have to disassemble at the first offset, follow the code as it boots the game and learn it to determine what's what over time. You would externally mark offsets as game code, text blocks, graphic data (tiles/fonts/etc), adpcm data, etc. Just like hacking a ROM file for a NES game, same thing, it's one binary of executable Assembly code mixed with graphic/script/audio data.

Is there an example of someone who successfully attempted that? I would love to peek into it...
recent addition: Japanese Language Skills, A1 proficiency level
------------------------------------------------------------------------
CryptoCoin Warrior
My Setup: PC Engine LT, CD-ROM², IFU-30
AKA woolfman on AtariAge, PlanetVB, Circuit-Board.
-----------------------------------------------------------------------

Necromancer

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 21335
Re: Reading Data from PCE CDs
« Reply #4 on: July 09, 2014, 06:37:49 AM »
That's what had to be done for the various translation patches, no?
U.S. Collection: 97% complete    155/159 titles

wolfman

  • Hero Member
  • *****
  • Posts: 546
Re: Reading Data from PCE CDs
« Reply #5 on: July 09, 2014, 06:51:44 AM »
Yes, but is possible to see the laid out data in its original form - graphics, source code, video files, etc?
recent addition: Japanese Language Skills, A1 proficiency level
------------------------------------------------------------------------
CryptoCoin Warrior
My Setup: PC Engine LT, CD-ROM², IFU-30
AKA woolfman on AtariAge, PlanetVB, Circuit-Board.
-----------------------------------------------------------------------

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Reading Data from PCE CDs
« Reply #6 on: July 09, 2014, 07:12:37 AM »
No. Because by the time it has been written to the cd, there are no original 'files' left. Think of it as a big ROM image.

wolfman

  • Hero Member
  • *****
  • Posts: 546
Re: Reading Data from PCE CDs
« Reply #7 on: July 09, 2014, 08:16:07 AM »
No. Because by the time it has been written to the cd, there are no original 'files' left. Think of it as a big ROM image.

So none of those who did a translation of a PCECD have a completely decoded ROM?
recent addition: Japanese Language Skills, A1 proficiency level
------------------------------------------------------------------------
CryptoCoin Warrior
My Setup: PC Engine LT, CD-ROM², IFU-30
AKA woolfman on AtariAge, PlanetVB, Circuit-Board.
-----------------------------------------------------------------------

ClodBuster

  • Hero Member
  • *****
  • Posts: 2242
  • A real powerhouse!
    • Cumonreprocarts.com
Re: Reading Data from PCE CDs
« Reply #8 on: July 09, 2014, 09:34:01 AM »
Turborip is as far as you can go ripping PCE CDs without digging into reverse engineering.

They tried to make me do a recap
I said no, no, no

SuperPlay

  • Hero Member
  • *****
  • Posts: 1659
Re: Reading Data from PCE CDs
« Reply #9 on: July 10, 2014, 06:33:07 AM »
Ccovel did a post over at the Magic Engine Forums back in 2006 relating to CD images that you may find interesting:

http://forums.magicengine.com/en/viewtopic.php?t=1755&postdays=0&postorder=asc&start=0


The tools he refers to are:

YY-CHR:  http://wiki.nesdev.com/w/index.php/YY-CHR

and

Tile Layer Pro: http://www.romhacking.net/utilities/108/

I never did get around to having a play with these, however after re-reading the thread I think I may have somthing on this weekends to do list ;-)

wolfman

  • Hero Member
  • *****
  • Posts: 546
Re: Reading Data from PCE CDs
« Reply #10 on: August 08, 2014, 12:15:28 PM »
Ccovel did a post over at the Magic Engine Forums back in 2006 relating to CD images that you may find interesting:

http://forums.magicengine.com/en/viewtopic.php?t=1755&postdays=0&postorder=asc&start=0


The tools he refers to are:

YY-CHR:  http://wiki.nesdev.com/w/index.php/YY-CHR

and

Tile Layer Pro: http://www.romhacking.net/utilities/108/

I never did get around to having a play with these, however after re-reading the thread I think I may have somthing on this weekends to do list ;-)


Hey, thanks for the info. Will have a look at this!
recent addition: Japanese Language Skills, A1 proficiency level
------------------------------------------------------------------------
CryptoCoin Warrior
My Setup: PC Engine LT, CD-ROM², IFU-30
AKA woolfman on AtariAge, PlanetVB, Circuit-Board.
-----------------------------------------------------------------------

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Reading Data from PCE CDs
« Reply #11 on: August 08, 2014, 03:33:51 PM »
Oh yeah, forgot to respond to this.

That's what had to be done for the various translation patches, no?

Yeah, partly, but never the whole thing, only the bare minimum of what was necessary. In the case of Ys IV, that was limited to tracking down the text decompression code (Neill Corlett), and a few other limited cases like the print routine (David Shadoff and a little help by me).

No. Because by the time it has been written to the cd, there are no original 'files' left. Think of it as a big ROM image.

So none of those who did a translation of a PCECD have a completely decoded ROM?

Correct, like megatron said. Think of data track 2 as one big NES ROM file... and it's pretty close to that actually since the HuC6280 is very close to the NES CPU (a 6502 type) which means the Assembly language is pretty similar. So, if you learned to hack NES games, with a little more knowledge, that would more easily lend itself to PCE.

There's no need to completely disassemble it, I mean, it depends on how far you need to go after all... If you wanna hack the game, change sprites around and/or gameplay, then yeah, you would need to go very far to fully understand everything, but I and anybody else when it came to fan translations only ever went as far as was needed, the bare minimum.

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Reading Data from PCE CDs
« Reply #12 on: August 09, 2014, 10:46:20 PM »
I uploaded Neill Corlett's old disassembly work for Ys IV to give you an idea of the grunt work that we're talking about here. It's unfinished because he discovered the decompression code and ultimately that's mainly what was needed, and he quit the project because of other interests (like the PS2 sound format stuff he started), leaving me with everything to carry on (and I did, with others like David Shadoff). Anyway, here you go:
 
http://www.ysutopia.net/downloads/ys4/ys4_dis.html

Find "Boot loader" on that page which puts you at the physical offset of 0x0000 in a rip of Ys IV data track 2 when looking at it in a hex editor. You can see him trying to break things down, disassemble code when encountered, etc. He manually traced like this, eventually found the decompression code and converted it from this HuC6280/6502 Assembly that you see to "C". You get the idea and your question is now fully answered.
« Last Edit: August 09, 2014, 10:53:26 PM by NightWolve »

BigusSchmuck

  • Hero Member
  • *****
  • Posts: 3425
Re: Reading Data from PCE CDs
« Reply #13 on: August 10, 2014, 04:14:53 AM »
Quote
Correct, like megatron said. Think of data track 2 as one big NES ROM file... and it's pretty close to that actually since the HuC6280 is very close to the NES CPU (a 6502 type) which means the Assembly language is pretty similar. So, if you learned to hack NES games, with a little more knowledge, that would more easily lend itself to PCE.
This is why I never understood why we haven't seen a bunch of PCE hacks/translations. Our little engine that could needs more loving!

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Reading Data from PCE CDs
« Reply #14 on: August 10, 2014, 04:31:27 AM »
Yeah, that's partly why I got into fan translations for the system, I saw that all the attention was focused at NES/SNES. As such, I would get to be "the first" to do something noteworthy, e.g. the first CD RPG fan translation with "Xak III: The Eternal Recurrence." Ys IV came afterwards. It's still a neglected system compared to the others, but yeah, I wanted to be one of the first people to make a dent towards changing that.