Since there has been discussion about the CDD last month I was wondering if we could start documenting how to use the CD drive without the BIOS (i.e. documenting how the BIOS does its stuff in the first place). Not sure whether it'd be easier or harder than decompressing the actual BIOS but it would be nice to know at least (albeit there could be other benefits like possibly allowing using more compact code and claim back some PRG-RAM space). Also could probably help making emulation easier to implement.
I suppose it'd be easiest to start documenting how to detect if the CD is there and how to play (and stop) CD tracks. I may look at the CDD stuff later to see if I can figure out how it works but if somebody else want to start here go ahead.
Documenting using the CD drive without the BIOS
Moderator: Mask of Destiny
Documenting using the CD drive without the BIOS
Sik is pronounced as "seek", not as "sick".
Re: Documenting using the CD drive without the BIOS
…OK no matter how much I try reading the CDD stuff I have no clue how the heck you'd play audio tracks (or how you'd tell when a track ends). And on top of that the docs I have seem to conflict with each other regarding some values (e.g. is status 0x00 no disc or stopped disc?). Any clues?
From what little I'm seeing, the best I can figure out is that to play a track you need to seek to its beginning then send the command to play, and then keep monitoring the current time until it hits the end of the track and send a stop command? (unless you want the disc to keep playing into the following tracks, that is)
From what little I'm seeing, the best I can figure out is that to play a track you need to seek to its beginning then send the command to play, and then keep monitoring the current time until it hits the end of the track and send a stop command? (unless you want the disc to keep playing into the following tracks, that is)
Sik is pronounced as "seek", not as "sick".
Re: Documenting using the CD drive without the BIOS
0x0 is stopped. 0xb is no disc. The older information was more guesswork, whereas the newer information comes from a combination of the official PDF manuals and some source code to an emulation of the CDD (which is, at least for me, not comprehensible outside of the constants.)
The CDD will pause once the end of an audio track is reached. I presume it's the same for a (the) data track.
The CDD will pause once the end of an audio track is reached. I presume it's the same for a (the) data track.
Re: Documenting using the CD drive without the BIOS
The BIOS constantly polls the CDD for status (within the level 4 interrupt handler). As soon as it sees the track number change, it will initiate a pause. It uses a similar process when reading data sectors. Obviously the BIOS is also constantly checking CDD for error code, open tray, or any other unexpected status change that may inhibit its current action.
Re: Documenting using the CD drive without the BIOS
…so my guess was correct then.
We need a new document (and by that I mean text, not source code) describing how to use the CDD. Even if just from a 68000 programmer viewpoint (rather than emulation viewpoint, which is a lot trickier and probably deserves its own separate documentation). So far the little that there's documented outside of code feels impossible to decipher (・~・)
We need a new document (and by that I mean text, not source code) describing how to use the CDD. Even if just from a 68000 programmer viewpoint (rather than emulation viewpoint, which is a lot trickier and probably deserves its own separate documentation). So far the little that there's documented outside of code feels impossible to decipher (・~・)
Sik is pronounced as "seek", not as "sick".
-
- Very interested
- Posts: 273
- Joined: Fri Feb 29, 2008 8:12 pm
- Location: United States
Re: Documenting using the CD drive without the BIOS
You guys might want to try asking the Terraonion guys about it, their developer said on Discord they're willing to share their information and findings they documented during the Mega SD development.