HDD (or flash) instead of a CD, questions...
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
First approach:
BCLK = 16MHz / 8. Yes, audio bit clock is 2.1168MHz (16.9344 / 8). 2 116 800 Hz / 48 = 44 100 Hz.
Audio CD loading and then playback it:
Note that some data is break thru to the DAC, but Mute not allow them to output. I think it is maybe the TOC. Then I push PLAY and Mute is off. Little bit closer:
I think we've done with audio output, right? Everything as expected with it.
BCLK = 16MHz / 8. Yes, audio bit clock is 2.1168MHz (16.9344 / 8). 2 116 800 Hz / 48 = 44 100 Hz.
Audio CD loading and then playback it:
Note that some data is break thru to the DAC, but Mute not allow them to output. I think it is maybe the TOC. Then I push PLAY and Mute is off. Little bit closer:
I think we've done with audio output, right? Everything as expected with it.
Last edited by HardWareMan on Thu Jun 29, 2017 10:59 am, edited 3 times in total.
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
Same here (no audio disk -> audio disk load -> audio disc play):
A little bit closer while playing:
SCOR period: 1/75 sec. SCOR pulse is right one WFCK clock period. EXCK/SBSO active only when WFCK is low and they push only 8 bits at once (1 byte at once):
Subchannel data is quite periodical to full sector:
You can use my captured data to decode playing time and other control data. Just for practice.
Now, I can capture all of these signals at once, but do you really want it?
A little bit closer while playing:
SCOR period: 1/75 sec. SCOR pulse is right one WFCK clock period. EXCK/SBSO active only when WFCK is low and they push only 8 bits at once (1 byte at once):
Subchannel data is quite periodical to full sector:
You can use my captured data to decode playing time and other control data. Just for practice.
Now, I can capture all of these signals at once, but do you really want it?
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
I forgot control channel. Here is power up:
Little bit closer at reset:
Shortest nIRQ period is 6.334 ms.
The rest periods seems to be multiple to shortest one (I guess it is just skipping).
Captured data while power up, open tray, close tray, disc load, next track, play modes.
Little bit closer at reset:
Shortest nIRQ period is 6.334 ms.
The rest periods seems to be multiple to shortest one (I guess it is just skipping).
Captured data while power up, open tray, close tray, disc load, next track, play modes.
Re: HDD (or flash) instead of a CD, questions...
Sure it was my first source of infoHardWareMan wrote: Did you saw this diagrams before (they come from Mega CD 1 manual)?
and the Mega CD2 manual got some more
yes, 16bits with MSB 2's complementHardWareMan wrote: It seems that 48 bits in transaction, 24 bit for every channel and it is use 16 bit with right align and sign extend (D16...D23 is copy of D15).
[/quote]HardWareMan wrote:
Also, there would be nice to know what this means:
BLCK = bit clock
DATA = signal data
LRCK = Left Right ??? clock
C2PO = error flag
SCOR = Subcode Chunk
SBSO - Subcode data
WFCK - Frame Clock
EXCK - XXX clock
GND
16MHz - DF xxx clock (modulation ?)
CDCK - CD mechacon clock
HOCK - host CPU clock
GND
DBx - Data Bus X
IRQ - IRQ Request
SGND - ???
RESET - CD hard reset
which is what you'll find on your previous post, extracted from the MCD 2 manual
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
Anyway, what about capture data?
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
I've got it. The CD track is kind of tape with 74/80/99 minutes of play, digitally. So, when it carries an audio data, there no need a perfect sync, so rough time coordinate is M:S:F format in subchannel. When they turn the audio CD to the data CD, there must be more accurate sync to the "tape". So, they use subchannel to mark an sector start and format sector with data sync (00-FF-FF...FF-00), data itself (2048 bytes) and ECC at the tail. Every stereo audio sample treated as 4 bytes of data (2x16bit). As result, same I2S interface used for audio and data transfer, but player mute DAC when it transfer digitall data.
I also remember old CD players, that plays data track as audio since they was made before the Data CD was introduced.
I also remember old CD players, that plays data track as audio since they was made before the Data CD was introduced.
Re: HDD (or flash) instead of a CD, questions...
Yes, DATA is send like audio (2352bytes) and the D/M flag mute itHardWareMan wrote:I've got it. The CD track is kind of tape with 74/80/99 minutes of play, digitally. So, when it carries an audio data, there no need a perfect sync, so rough time coordinate is M:S:F format in subchannel. When they turn the audio CD to the data CD, there must be more accurate sync to the "tape". So, they use subchannel to mark an sector start and format sector with data sync (00-FF-FF...FF-00), data itself (2048 bytes) and ECC at the tail. Every stereo audio sample treated as 4 bytes of data (2x16bit). As result, same I2S interface used for audio and data transfer, but player mute DAC when it transfer digitall data.
I also remember old CD players, that plays data track as audio since they was made before the Data CD was introduced.
It was the conclusion of Eke back when l_oliveira told us MCD used i2s..
So, your capture data prove it !
I'm at the officeAnyway, what about capture data?
not easy to spy BIG pictures w/o being noticed
Can't wait to be back at home to check all of this !
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
OK. I think we can do first approach to make FLASH player of CD image. The only thing is still undiscovered is set of commands and statuses on control 4 bit bus.
Re: HDD (or flash) instead of a CD, questions...
so subchannel data is sent even when SCOR occurs, thanks !HardWareMan wrote:Same here (no audio disk -> audio disk load -> audio disc play)
What I can't explain is why SCORE is ONE WFCK only and not TWO (S0 & S1)
i don't understand...
What did you use to render them ?You can use my captured data to decode playing time and other control data. Just for practice.
it seems really useful to mesure time and freq as well...
Like I said, I'd like to confirm if there is any link between comm, sub and data....or they're totally independantNow, I can capture all of these signals at once, but do you really want it?
so could you measure IRQ / WFCK / LRCK on the same timing ?
Re: HDD (or flash) instead of a CD, questions...
I think it's not that hard... difficult for someone like me who'll need to learn VHDL & FPGA at the same time (in progress...very interesting) but, from what I see, doableHardWareMan wrote:OK. I think we can do first approach to make FLASH player of CD image. The only thing is still undiscovered is set of commands and statuses on control 4 bit bus.
and (a part of) the set commands are available, thanks to emu authors : Stef & Eke
http://gendev.spritesmind.net/page-megasd.html (see CDC command)
To find the others one, you'll need to compare DATA sent from HOST to µC to DATA send from µC to DSP
but to do this, you'll need a ROM which would send every kind of commands and not only the ones knowns (currently in progress, based on Chilly Mode 1 sample)
Re: HDD (or flash) instead of a CD, questions...
OHHH !!!HardWareMan wrote:I forgot control channel. Here is power up
IRQ is not sent EVERY 1/75s ?!!!
Does it mean the next IRQ is sent only when command received is proceeded ?
to be able to sent result on next IRQ ?
it would answer my question about sync how comm / sub / data
I would then mean
Code: Select all
IRQ
status = xxx
command = Play CD
move to track
...
..
...
CD DSP confirm it starts send data
IRQ
status = playing
command = none
wait
IRQ
status = playing
command = none
wait
....
so does it mean it's 1/75 unless µC is busy ?
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
Here we come. Power up and boot Earthworm Jim CD:KanedaFr wrote:Like I said, I'd like to confirm if there is any link between comm, sub and data....or they're totally independant
so could you measure IRQ / WFCK / LRCK on the same timing ?
Some closeups with nIRQ is active:
I think they must be independent, but still within 16MHz (DFCK) clock domain. It makes sense to synchronize only I2C and sub-channel. Their flow can be synchronous, because they are read linearly from the CD matrix. Control section don't require to be synced to I2S and subchannel. I think the nIRQ timing was done by DFCK division.
It's like a nIRQ not synced to any of signal. As I said before, this signal has 6,33ms period time slot. But it don't fire up at every slot (6,33ms), some slots a skipped (when drive controller busy?).
BTW, 6,33ms is ~157Hz. Maybe it is 2x 1/75? 75*2=150Hz and I got just measurement error?
Last edited by HardWareMan on Thu Jun 29, 2017 2:42 pm, edited 1 time in total.
Re: HDD (or flash) instead of a CD, questions...
THANKS !!!
awesome !!!
so, for me, the only question still here (for now) is why SCOR is only 1 frame and not 2 like it should be :
A sector is 98 frames, with 2 frames for S0/S1 synchronisation word and 96 frames for subcode = 96bit for P, 96bit for Q,......
so where is the second frame ?!
oh, and is the subcode really useful for MCD...does it use it for TOC or not ?
in this case, subcode "emulation" is only needed for CD+G
awesome !!!
so, for me, the only question still here (for now) is why SCOR is only 1 frame and not 2 like it should be :
A sector is 98 frames, with 2 frames for S0/S1 synchronisation word and 96 frames for subcode = 96bit for P, 96bit for Q,......
so where is the second frame ?!
oh, and is the subcode really useful for MCD...does it use it for TOC or not ?
in this case, subcode "emulation" is only needed for CD+G
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: HDD (or flash) instead of a CD, questions...
It is quite logical. When reader detect S1 (while S0 already in internal buffer/register) it set SCOR for one subcode byte. And reset it on first non Sx subcode. It is not necessary to set it for 2.KanedaFr wrote:THANKS !!!
awesome !!!
You're welcome.KanedaFr wrote: so, for me, the only question still here (for now) is why SCOR is only 1 frame and not 2 like it should be :
A sector is 98 frames, with 2 frames for S0/S1 synchronisation word and 96 frames for subcode = 96bit for P, 96bit for Q,......
so where is the second frame ?!
Last edited by HardWareMan on Thu Jun 29, 2017 2:48 pm, edited 1 time in total.
Re: HDD (or flash) instead of a CD, questions...
which prove MCD is 1x CD driveHardWareMan wrote:SCOR period: 1/75 sec.
and you do understand why I wanted to check fi SCOR was in sync with IRQ which 1/75sec too