OMG! ZIRIA! ZIRIA!! ZIRIA!!! IT ACTUALLY HAPPENED!! 34 YEARS LATER!! The epic/legendary Tengai Makyou/Far East of Eden: Ziria JRPG has finally been localized! Supper the Subtitler struck again! Simply unstoppable, NOTHING can prevent him from TOTAL PCECD localization domination!!!! WHACHA GONNA DO BROTHER?!?!
Main Menu

Reading Data from PCE CDs

Started by wolfman, 07/08/2014, 05:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wolfman

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

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

Quote from: NightWolve on 07/08/2014, 07:21 AMThere 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

Quote from: NightWolve on 07/08/2014, 07:21 AMThere 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.
-------------------------------------------------------------

NecroPhile

That's what had to be done for the various translation patches, no?
Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

wolfman

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

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

Quote from: megatron-uk on 07/09/2014, 02:12 PMNo. 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.
-------------------------------------------------------------

ClodBusted

Turborip is as far as you can go ripping PCE CDs without digging into reverse engineering.

SuperPlay

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

Quote from: SuperPlay on 07/10/2014, 01:33 PMCcovel 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

Oh yeah, forgot to respond to this.

Quote from: guest on 07/09/2014, 01:37 PMThat'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).

Quote from: wolfman on 07/09/2014, 03:16 PM
Quote from: megatron-uk on 07/09/2014, 02:12 PMNo. 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

#12
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:
 
https://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.

BigusSchmuck

QuoteCorrect, 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

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.

TurboXray

Hacking hucard games = easy. Hacking CD games = not so much. Even if you're comfortable with nes 65x, and jump into the PCE - there's a whole new slew of problems that CD games introduce. Granted, going from CD->SCD allows you to avoid all these problems. But there isn't an option to allow SCD->'something newer'. There are no custom hucards out there that support more ram than SCD, sadly. If someone were to make these - then problem solved (emulation and real hardware). Else, it's a huge pain finding adequate free space in CDRAM for hooks/hack code - let alone making sure it's always free or in the right spot (Ys IV also had this problem. Spriggan Mark 2 has this issue too; I have two sets of hacks to resolve this). I.e. - you need more ram than what the games thinks is there, and therefore doesn't use. And no, Arcade Card does not fit the bill (no regular added ram to the cpu logical range).

 That one French guy made those turbo boards recently, could easily be adapted to support a new SCD card. 256k or 512k of sram for CD ram (rom: bank 00-3f. ram: bank 40-7f).

wolfman

Quote from: NightWolve on 08/10/2014, 05:46 AMYou get the idea and your question is now fully answered.
Yep. I am speechless  :shock:
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.
-------------------------------------------------------------