Page 1 of 1

Subcodes only for CD+G ?

Posted: Mon Jun 19, 2017 11:47 am
by KanedaFr
Hi,

While Nemesis started a subject about this 3 years ago, it didn't seem to answer this basic question : are the subcodes ONLY used for CD+G ?
I know R to W are used for CD+G (and CD TExt) but does the MegaCD use the P and Q ones ?
I mean, internally, to handle TOC/track (with Q Mode 1 ) or to detect data vs audio (even if I think it's handle more on the CD DSP side)

Re: Subcodes only for CD+G ?

Posted: Mon Jun 19, 2017 7:56 pm
by Mask of Destiny
Are you asking about whether the BIOS itself uses subcode data or if the subcode data is used by the Mega CD in general? For the latter, the answer is trivially yes because it's the only place to get the TOC. It's encoded repeatedly in the subcode data inside the lead-in area. What I can't personally say is whether the BIOS gets the raw subcode data and interprets it or whether some part of the CD hardware handles decoding the TOC.

Re: Subcodes only for CD+G ?

Posted: Mon Jun 19, 2017 9:04 pm
by KanedaFr
OK, so I'll need to get deeper on the BIOS. I asked before, to avoid losing time if anyone already did it ;)
Thanks

Re: Subcodes only for CD+G ?

Posted: Mon Jun 19, 2017 9:17 pm
by Eke
D/M status, TOC and current Track infos are all retrieved/computed by dedicated 4-bit microprocessor using subcode Q data output by CD DSP on SUBQ pin (controlled by serial clock on SQCK pin).

D/M status bit is found in Q subchannel control field while TOC and current Track infos are found in q-data field respectively during Lead In and User Data / Lead Out areas.

Those infos are written back in CDD status words that can be read by software in ASIC registers. Additionaly, D/M status is provided to main ASIC to distinguish between CD-AUDIO/CD-ROM sectors data (also appears as a bit in one of the ASIC registers).

P subchannel is only accessible from subcodes buffer inside main ASIC. No software(including BIOS) seems to use P-Q subchannels data from this buffer (I don't emulate it by default unless a .sub file is found and it does not cause any issue).

Re: Subcodes only for CD+G ?

Posted: Tue Jun 20, 2017 10:35 am
by KanedaFr
OK, so the CD DSP need it, not the ASIC (if we forget about CD+G)
If the SBSO line is flat, it won't bug the game ?

You said GX support .sub files.
Unfortunatly, they rarely come with game rip :(
What could I use to made a private rip including the .sub part ? (on windows)

Re: Subcodes only for CD+G ?

Posted: Tue Jun 20, 2017 12:08 pm
by Eke
KanedaFr wrote:If the SBSO line is flat, it won't bug the game ?
It shouldn't affect software since, from my testing in emulator, neither games or BIOS care if the subcode interrupt never occurs
But it's possible it could lock the ASIC and thus the whole Mega CD hardware, depending how it was designed. Quite unlikely but you never know :wink:
KanedaFr wrote: Unfortunatly, they rarely come with game rip :(
Because for all released games (I don't count CD+G title as games), they don't hold any meaningful data (likely zeros) in Q-W subchannels and P-Q subchannels infos are standard infos that are easily recreated when burning the CD image or running it in an emulator.
KanedaFr wrote:What could I use to made a private rip including the .sub part ? (on windows)
I think CloneCD can do it but don't quote me on that. You should probably ask on redump forums.

Re: Subcodes only for CD+G ?

Posted: Tue Jun 20, 2017 1:31 pm
by KanedaFr
Eke wrote:
KanedaFr wrote:If the SBSO line is flat, it won't bug the game ?
It shouldn't affect software since, from my testing in emulator, neither games or BIOS care if the subcode interrupt never occurs
But it's possible it could lock the ASIC and thus the whole Mega CD hardware, depending how it was designed. Quite unlikely but you never know :wink:
:evil: :(
Eke wrote:
KanedaFr wrote: Unfortunatly, they rarely come with game rip :(
Because for all released games (I don't count CD+G title as games), they don't hold any meaningful data (likely zeros) in Q-W subchannels and P-Q subchannels infos are standard infos that are easily recreated when burning the CD image or running it in an emulator.
yes, I see what you mean...
So perhaps I could just fake it the same way than to read a subchannel file...
KanedaFr wrote:What could I use to made a private rip including the .sub part ? (on windows)
I think CloneCD can do it but don't quote me on that. You should probably ask on redump forums.
It seems some software are able to dump CUE/BIN/SUB....else, yes, CloneCD (and Alcohol) seems to be able to handle it.
I recently discover it thanks to CDEmu

Re: Subcodes only for CD+G ?

Posted: Thu Aug 10, 2017 12:35 pm
by Huge
If you are on Windows, CD Manipulator can make clonecd compatible dumps with subcode included, and it is free:
http://www.storeroom.info/cdm/

It will write a "cdm" file instead of "ccd" but the format is the same, and it can be renamed and work the same.

Re: Subcodes only for CD+G ?

Posted: Wed Aug 29, 2018 12:34 am
by Nemesis
I managed to get full subcode reading working on the LaserActive hardware through software. I found the bios routines were buggy and flawed. I had to partially bypass them and poke the hardware directly. Synchronization is also a problem. Subcode data arrives independently from sector data and unsynchronized with it, so it's usually off by a few sectors. It's certainly possible to read subcode data on the MegaCD/LD hardware though, with some effort.