joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.81k stars 383 forks source link

CloneCD image support #2417

Open joncampbell123 opened 3 years ago

joncampbell123 commented 3 years ago

Describe the solution you'd like Add support for CloneCD images to CD-ROM emulation.

Additional context This PC-98 game: https://archive.org/download/NeoKobe-NecPc-98012017-11-17/DataWest.zip/Data%20West%2FMs.%20Detective%20%232%20-%20Sugatanaki%20Iraisha%2FMs.%20Detective%20%232%20-%20Sugatanaki%20Iraisha%20%5BCD%5D.zip

maron2000 commented 3 years ago

Expecting very much for this enhancement! BTW, is there a working CD-ROM driver for PC98 mode? I thought neither OAK IDE nor SCSI driver can be loaded in MS-DOS at present. (I just tried the IDE driver NECCDD.SYS but dosbox-x freezed after loading)

rderooy commented 3 years ago

I don't know for PC98 mode, but OAKCDROM.SYS works in PC mode when you boot DOS in DOSBox-X.

maron2000 commented 3 years ago

@rderooy Yes, you're right that there is a valid CD driver for PC mode. I wanted to know about PC98 mode since the CD image mentioned in @joncampbell123 's comment is a PC98 game.

joncampbell123 commented 3 years ago

Current PC-98 images with a CD-ROM driver freeze in DOSBox-X because they are polling an I/O port that is not yet implemented.

maron2000 commented 3 years ago

@joncampbell123 Thanks for your comment and looking forward to implementing CD-ROM support for PC-98 mode as well as Clone CD image support.

joncampbell123 commented 9 months ago

Documentation for CloneCD files: https://www.gnu.org/software//ccd2cue/manual/html_node/CCD-sheet-format.html#CCD-sheet-format

maron2000 commented 9 months ago

patacd.sys and NECCDC.SYS are CD drivers reported to be working on a booted PC98 DOS on DOSBox-X. patacd.sys can be downloaded from the link in the following page. https://bauxite.sakura.ne.jp/software/dos/freedos.htm You have to convert ccd images to iso or cue+bin format, though.

joncampbell123 commented 9 months ago

I want to update that the IDE CD-ROM driver that hung in DOSBox-X when booting some HDI game images is resolved. I looked into it again and the driver was also polling I/O ports 5Ch and 5Eh, which are apparently tied to a 24-bit counter that increments at about 300KHz. The OAK IDE CDROM-driver was using that to keep time. Once implemented, the driver no longer infinitely hangs, but instead polls the bit for about 6-8 seconds before continuing.

joncampbell123 commented 9 months ago

At the same time, you can also easily resolve that hang by mounting an ISO image using IMGMOUNT to the secondary IDE controller in PC-98 mode. The IDE CDROM driver loops until the DRQ bit is set and having an image mounted leaves that bit set and allows it to immediately proceed.

maron2000 commented 9 months ago

Actually, there are several types of CD drivers for PC-98. The recommended one for DOSBox-X is NECCDC.SYS, that I mentioned above, and NECCDD.SYS is commonly used in np2 forks.

NECCDD.SYS waits for 10 sec if drive is not ready, but can be avoided by unsetting bit 7 of F8E8:0011.

https://archive.org/details/NECPC98CDROMDrivers