CD-Rom support under DOS

User avatar
Chris23235
Top Contributor
Posts: 841
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 106 times
Been thanked: 167 times

CD-Rom support under DOS

Unread post by Chris23235 »

Has anybody managed to get the CD-ROM support working under DOS?

I tried it in 6.22 and 7.1 and the CD-ROM is detected correctly, but I can't access it. The only way I was able to make it work was with the Win98SE Boot disc. Here the oakcdrom.sys driver is used.

EDIT: Nevermind, I didn't realise that I can use the oakcdrom.sys driver also under DOS
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: CD-Rom support under DOS

Unread post by HMPoweredMan »

Through an external CDROM drive?

I've got virtual drives working no problem.
You can have the images in the mistetfs shared folder and mount them with SHSUCDX.

Throw the commands before some launcher script and it's pretty seamless.

I think this is what most people are doing for now.
User avatar
Chris23235
Top Contributor
Posts: 841
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 106 times
Been thanked: 167 times

Re: CD-Rom support under DOS

Unread post by Chris23235 »

I was refering to today's update which brought CD Rom support to the core :)
User avatar
Cebion
Posts: 115
Joined: Sun May 24, 2020 7:30 pm
Has thanked: 1 time
Been thanked: 3 times

Re: CD-Rom support under DOS

Unread post by Cebion »

HMPoweredMan wrote: Thu Sep 17, 2020 7:57 pm Through an external CDROM drive?

I've got virtual drives working no problem.
You can have the images in the mistetfs shared folder and mount them with SHSUCDX.

Throw the commands before some launcher script and it's pretty seamless.

I think this is what most people are doing for now.
Hello McFly :D
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: CD-Rom support under DOS

Unread post by HMPoweredMan »

Oh my
bertnorg
Posts: 22
Joined: Sun Jul 12, 2020 8:58 am
Been thanked: 1 time

Re: CD-Rom support under DOS

Unread post by bertnorg »

ok i got it working under dos. :D
first you must download the oakcdrom.sys file, then put it into the drivers folder on the dos vhd.

then edit the config.sys and the autoexec.bat.

[config.sys]
DEVICEHIGH=C:\DRIVERS\oakcdrom.sys /D:mscd001

[autoexec.bat]
C:\Dos\MSCDEX.EXE /D:mscd001 /L:d

if have edit the autoexec.bat line, now it gives no erors

this woks for me.
before work i got a half hour of thinking. so this could use some refinement
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: CD-Rom support under DOS

Unread post by Caldor »

Have you tried with both iso and bin/cue images? Both should be supported, but not yet audio CDs. What CD-Rom drive driver have you been using?

If I remember correctly, this FreeDOS boot should have a default CD-ROM drive support that you could try:
http://dionysus.dk/software/DOS/AO486_floppy.7z

It also has options to emulate a CD drive using iso files, but during the boot it should try to use the same driver for real drives if possible. I suspect its the most compatible way of supporting CD drives. But a Windows 98 boot disk with CD drive support should also work... or just Windows 95 or 98.

There is something about only one of the 4 IDE drives supporting CD-ROM and if you start out mounting a VHD it wont be able to swap CDs after booting, since it will work as an HDD.

I am planning on testing it later.
bertnorg
Posts: 22
Joined: Sun Jul 12, 2020 8:58 am
Been thanked: 1 time

Re: CD-Rom support under DOS

Unread post by bertnorg »

as i had little time to test.
i loaded a iso file and it shows up on the D drive.

the driver is the oakcdrom.sys file

http://manmrk.net/tutorials/DOS/cdrom.htm
User avatar
tontonkaloun
Posts: 354
Joined: Sun May 24, 2020 7:38 pm
Has thanked: 152 times
Been thanked: 51 times

Re: CD-Rom support under DOS

Unread post by tontonkaloun »

Hello,

Yes you need a driver in your config.sys file and the program mscdex.exe in your auitoexec.bat file.
User avatar
Chris23235
Top Contributor
Posts: 841
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 106 times
Been thanked: 167 times

Re: CD-Rom support under DOS

Unread post by Chris23235 »

Caldor wrote: Fri Sep 18, 2020 7:41 am Have you tried with both iso and bin/cue images? Both should be supported, but not yet audio CDs. What CD-Rom drive driver have you been using?

If I remember correctly, this FreeDOS boot should have a default CD-ROM drive support that you could try:
http://dionysus.dk/software/DOS/AO486_floppy.7z

It also has options to emulate a CD drive using iso files, but during the boot it should try to use the same driver for real drives if possible. I suspect its the most compatible way of supporting CD drives. But a Windows 98 boot disk with CD drive support should also work... or just Windows 95 or 98.

There is something about only one of the 4 IDE drives supporting CD-ROM and if you start out mounting a VHD it wont be able to swap CDs after booting, since it will work as an HDD.

I am planning on testing it later.
Bin and ISO Files work. My feeling is, it is much faster than SHSUCDX and it seems wo work better, at least Wing Commander III works now, it always crashed when the image was mounted via SHSUCDX.
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 times

Re: CD-Rom support under DOS

Unread post by pgimeno »

Caldor wrote: Fri Sep 18, 2020 7:41 am Have you tried with both iso and bin/cue images? Both should be supported, but not yet audio CDs.
To be precise, there's no explicit support for BIN/CUE, but selecting the BIN file for the first track will happen to work IF it is a data track with 2048 bytes/sector.
User avatar
xtcrefugee
Posts: 19
Joined: Wed Sep 09, 2020 3:57 pm
Has thanked: 4 times

Re: CD-Rom support under DOS

Unread post by xtcrefugee »

As this seems to be the relevant topic, I just thought I'd share my findings about which DOS mode CD drivers work:

OAKCDROM.SYS - Oak generic driver, it's the one that comes with the Windows boot disk, but it's also slow to start and consumes by far the most memory.
VIDE-CDD.SYS - Acer driver, this one gets recommended regularly on Vogons as it's one of the most memory efficient ATAPI drivers.
ATAPICD.SYS - Generic driver, consumes more memory than VIDE-CDD but still far less than OAKCDROM, no pause for CD detection on load so it won't slow down your boot.
D011V200.SYS - Oak OTI-011 driver, consumes a little less memory than ATAPICD.SYS but otherwise acts exactly the same as OAKCDROM. Another favorite among retro enthusiasts as it's a good compromise for memory footprint + compatibility.

I benchmarked all the above in DOS and all perform basically the same. Others I tried like xcdrom, btcdrom etc. wouldn't work. For anyone using 98lite it looks like you have to switch to at least the "chubby" shell to avoid an Explorer crash when trying to open the CD from My Computer (the same happens with the MiSTerFS.exe shared folder if loaded from your autoexec.bat).

Having said that, I'm really not sure if this is practical for use in Windows yet with only the DOS device driver. File transfers are incredibly slow from the CD, at least 4x slower in Windows than in DOS with my 98lite install.
User avatar
vorvek
Posts: 16
Joined: Sun May 24, 2020 9:24 pm
Has thanked: 2 times
Been thanked: 3 times

Re: CD-Rom support under DOS

Unread post by vorvek »

I can't get the CD-ROM to work. I've used simple config.sys and autoexec.bat based on the ones I use in my actual 486. Everything seems to work during boot, but it doesn't matter whether I mount an ISO, a bin file, or anything else in 1-0, I get a "NOT READY READING DRIVE D" error.

This is my current config.sys. I've tried both OAKCDROM.SYS and VIDECDD.SYS (which is what I normally use):

Code: Select all

DEVICE=C:\DOS\HIMEM.SYS  /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM FRAME=C800 D=64 X=A000-C7FF I=D000-EFFF NOTR
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:OPTICAL

DOS=HIGH,UMB
BUFFERS=10,0
FILES=30
STACKS=9,256
LASTDRIVE=E
COUNTRY=034,,C:\DOS\COUNTRY.SYS

SHELL=C:\4DOS\4DOS.COM C:\4DOS\ /P
This is my current autoexec.bat:

Code: Select all

@ECHO OFF
PROMPT $p$g
PATH C:\DOS
SET TEMP=C:\DOS

C:\DOS\KEYB.EXE SP
C:\DOS\CTM-ES.EXE

LH C:\4DOS\KSTACK.COM
LH C:\DOS\MSCDEX.EXE /D:OPTICAL

SET BLASTER=A220 I7 D1 H5 T6
UNISOUND.COM /V99 /VW99 /VF99 /VL00 /VM00 /VP50
Am I missing anything?
User avatar
Chris23235
Top Contributor
Posts: 841
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 106 times
Been thanked: 167 times

Re: CD-Rom support under DOS

Unread post by Chris23235 »

xtcrefugee wrote: Sat Sep 19, 2020 8:26 pm
VIDE-CDD.SYS - Acer driver, this one gets recommended regularly on Vogons as it's one of the most memory efficient ATAPI drivers.
What settings do you use for VIDE-CDD.SYS? Whenever I try it, the driver is loaded and the drive is present, but I can't read from the CD.
User avatar
RealLarry
Top Contributor
Posts: 768
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 86 times
Been thanked: 329 times

Re: CD-Rom support under DOS

Unread post by RealLarry »

xtcrefugee wrote: Sat Sep 19, 2020 8:26 pm As this seems to be the relevant topic, I just thought I'd share my findings about which DOS mode CD drivers work:

OAKCDROM.SYS - Oak generic driver, it's the one that comes with the Windows boot disk, but it's also slow to start and consumes by far the most memory.
VIDE-CDD.SYS - Acer driver, this one gets recommended regularly on Vogons as it's one of the most memory efficient ATAPI drivers.
ATAPICD.SYS - Generic driver, consumes more memory than VIDE-CDD but still far less than OAKCDROM, no pause for CD detection on load so it won't slow down your boot.
D011V200.SYS - Oak OTI-011 driver, consumes a little less memory than ATAPICD.SYS but otherwise acts exactly the same as OAKCDROM. Another favorite among retro enthusiasts as it's a good compromise for memory footprint + compatibility.

I benchmarked all the above in DOS and all perform basically the same. Others I tried like xcdrom, btcdrom etc. wouldn't work. For anyone using 98lite it looks like you have to switch to at least the "chubby" shell to avoid an Explorer crash when trying to open the CD from My Computer (the same happens with the MiSTerFS.exe shared folder if loaded from your autoexec.bat).

Having said that, I'm really not sure if this is practical for use in Windows yet with only the DOS device driver. File transfers are incredibly slow from the CD, at least 4x slower in Windows than in DOS with my 98lite install.
Nice writeup and thanks for bringing up things to memory. I've re-collected, updated, documented and enclosed my DOS stuff therefore, maybe it's of use for us or somebody.
Attachments
tools.zip
(88.02 KiB) Downloaded 281 times
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
bertnorg
Posts: 22
Joined: Sun Jul 12, 2020 8:58 am
Been thanked: 1 time

Re: CD-Rom support under DOS

Unread post by bertnorg »

you got a fault in our autoexec.bat.
you forgot to give lastdrive a driveleter D

C:\Dos\MSCDEX.EXE /D:mscd001 /L:d

/l:d
User avatar
xtcrefugee
Posts: 19
Joined: Wed Sep 09, 2020 3:57 pm
Has thanked: 4 times

Re: CD-Rom support under DOS

Unread post by xtcrefugee »

vorvek wrote: Sun Sep 20, 2020 2:20 am I can't get the CD-ROM to work. I've used simple config.sys and autoexec.bat based on the ones I use in my actual 486. Everything seems to work during boot, but it doesn't matter whether I mount an ISO, a bin file, or anything else in 1-0, I get a "NOT READY READING DRIVE D" error.
Try a very minimal config just to eliminate those other entries:

CONFIG.SYS:

Code: Select all

DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MISTERCD
AUTOEXEC.BAT:

Code: Select all

@ECHO OFF
LH MSCDEX.EXE /D:MISTERCD
I just tested with the above and can confirm it's properly showing the files on both test CDs I'm using, a .iso I made with UltraISO and also a .bin from elsewhere. If that's still failing, check your DOS files are OK (maybe try a Win 98 boot disk instead), check your .iso's are OK, check your mister and ao486 binaries are up to date and make sure you have the most recent boot0.rom in your ao486 directory.

Chris23235 wrote: Sun Sep 20, 2020 4:47 amWhat settings do you use for VIDE-CDD.SYS? Whenever I try it, the driver is loaded and the drive is present, but I can't read from the CD.
I just used /D:MISTERCD with all the above, no special settings. I'd check the same things I suggested for vorvek as the problem is probably elsewhere, or you have a bad VIDE-CDD.SYS.

@RealLarry Nice 👍
User avatar
vorvek
Posts: 16
Joined: Sun May 24, 2020 9:24 pm
Has thanked: 2 times
Been thanked: 3 times

Re: CD-Rom support under DOS

Unread post by vorvek »

Well, I don't know what happened the last time I used OAKCDROM.SYS that prevented it from working (had the same DRIVE NOT READY error), but using it this time worked, with and without EMM386.EXE. It's possible that VIDE-CDD.SYS simply doesn't work with MiSTer at the moment?
User avatar
xtcrefugee
Posts: 19
Joined: Wed Sep 09, 2020 3:57 pm
Has thanked: 4 times

Re: CD-Rom support under DOS

Unread post by xtcrefugee »

It does, I tested it before writing my comment above when I mentioned it and the other CD drivers that work. If the file isn't bad (the one from RealLarry's post above should be fine) then you most likely have something else in your setup that's making the CD unreliable.
User avatar
vorvek
Posts: 16
Joined: Sun May 24, 2020 9:24 pm
Has thanked: 2 times
Been thanked: 3 times

Re: CD-Rom support under DOS

Unread post by vorvek »

It must be my machine then. I've used oakcdrom, vide-cdd and teac-cdi. The same drivers I use in my actual machines. oakcdrom works fine, vide-cdd loads fine but then gives the "not ready" message when trying to access the drive, and teac-cdi can't find a suitable drive at all during boot. It's not a big deal, since I'm loading the drivers into EMS anyway, but I'm still confused as why it wouldn't work. Changing from oakcdrom to vide-cdd only requires changing the DEVICE, and none of them require anything other than /D:yaddayadda to find a drive in the primary or secondary IDE channels, from what I understand.

There's a vide-cdd driver somewhere that's patched for different ports, if I'm not mistaken, but if the normal one works for others, it should also work for me.
User avatar
Sorgelig
Site Admin
Posts: 877
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: CD-Rom support under DOS

Unread post by Sorgelig »

vide-cdd doesn't react properly on errors. It should issue "GET SENSE (03)" command to clear the pending error but it doesn't, so it gets error forever on every read command.
User avatar
Sorgelig
Site Admin
Posts: 877
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: CD-Rom support under DOS

Unread post by Sorgelig »

i think vide-cdd will work in upcoming release
mbalmer
Posts: 19
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Re: CD-Rom support under DOS

Unread post by mbalmer »

I just want to say how amazing the work on this core has been. It is truly mind-boggling to look at the state of this core 3 months ago compared to now and see how far it's come.

I do have one thing, though, and I'm not sure why it's behaving the way it is. I had been using 4DOS before this, and it was working fine, but when I added in the OAKCDROM.SYS file and such to CONFIG.SYS, the system locks up immediately after loading in 4DOS as the command interpreter. If I go back to vanilla COMMAND.COM it's fine, and it's still fine if I load 4DOS in on top of COMMAND.COM.

For the moment, I've just disabled 4DOS, but I thought I might mention that issue in case anyone else is dealing with it.

Having CD support is AMAZING. Thank you for all your hard work, Sorg.
User avatar
vorvek
Posts: 16
Joined: Sun May 24, 2020 9:24 pm
Has thanked: 2 times
Been thanked: 3 times

Re: CD-Rom support under DOS

Unread post by vorvek »

Sorgelig wrote: Mon Sep 21, 2020 7:44 pm vide-cdd doesn't react properly on errors. It should issue "GET SENSE (03)" command to clear the pending error but it doesn't, so it gets error forever on every read command.
Thank you for confirming that I'm not crazy!
mbalmer wrote: Mon Sep 21, 2020 11:14 pm For the moment, I've just disabled 4DOS, but I thought I might mention that issue in case anyone else is dealing with it.
As you can see in my autoexec/config.sys above, I'm using 4DOS with KSTACK, and both work in the current version of the core.
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: CD-Rom support under DOS

Unread post by wark91 »

Tried the last version 20200922
1 point - I can load bin/cue with audio track but not bin/cue not containing audio track.
2 point - With CD player of Win98 I can select track but no sound is played and the time of the track is not increase or decrease. I have a Disk led is bliking that"s all.

Someone else have also those issues ?
User avatar
Chris23235
Top Contributor
Posts: 841
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 106 times
Been thanked: 167 times

Re: CD-Rom support under DOS

Unread post by Chris23235 »

Sorgelig wrote: Mon Sep 21, 2020 9:03 pm i think vide-cdd will work in upcoming release
Vide-CDD now works, many thanks :)
User avatar
Sorgelig
Site Admin
Posts: 877
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: CD-Rom support under DOS

Unread post by Sorgelig »

Even xcdrom.sys is working now. It's even more smaller.
mbalmer
Posts: 19
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Re: CD-Rom support under DOS

Unread post by mbalmer »

vorvek wrote: Tue Sep 22, 2020 12:54 am As you can see in my autoexec/config.sys above, I'm using 4DOS with KSTACK, and both work in the current version of the core.
I'm not sure why it wasn't working for me, but it is now! :D
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: CD-Rom support under DOS

Unread post by bbond007 »

wark91 wrote: Tue Sep 22, 2020 6:50 pm 2 point - With CD player of Win98 I can select track but no sound is played and the time of the track is not increase or decrease. I have a Disk led is bliking that"s all.
"Currently only data portion of CD is supported." --> https://github.com/MiSTer-devel/ao486_M ... /README.md
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: CD-Rom support under DOS

Unread post by wark91 »

Thank you for the confirmation. Because there is support of bin/cue i thought it is also the case for the audio track.
I also switched from oakcdrom.sys to Vide-CDD and the bin/Cue with just one data track is load correctly now.
Post Reply