delorie.com/archives/browse.cgi | search |
From: | "Thorsten Erdmann" <thorsten DOT erdmann AT gmx DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | More CD ROM problems |
Date: | Fri, 25 Aug 2000 19:40:36 +0200 |
Organization: | AddCom AG |
Lines: | 34 |
Message-ID: | <8o6c75$6sq$1@riker.addcom.de> |
NNTP-Posting-Host: | h-213.61.84.78.host.de.colt.net |
X-Trace: | riker.addcom.de 967226405 7066 213.61.84.78 (25 Aug 2000 18:00:05 GMT) |
X-Complaints-To: | news AT news DOT addcom DOT de |
NNTP-Posting-Date: | 25 Aug 2000 18:00:05 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2014.211 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2014.211 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hi, I want to built a standalone MP3 player which should be able to play from CD. For start I will use a PC under DOS/DJGPP, but later it will become a small 68000 system. So I need to program the CDROM directly on hardware level (MSCDEX doesn't seem to recognize CD changes anyway). So I tried Hale's ATA driver and it works fine - mostly. First but minor problem is the ATAPI Identify command 0x81. As I understand it is a ATA-like command. But I get no response from the drive. Also the ATA/IDE-Identify command fails. On harddrives it works. Now the main problem. How can I determine if a media is in the drive and if a media change occurred. I want to display an open or closed CD-drive icon on the player's display. So I need a command which requests the tray status and the media changed status whithout interferring with a currently running audio play command. What I find out is, that in case of media change the next command to the drive returns an error condition. But I don't think that's the right way to detect a media change. I think the Mode Sense Command is the right way, but I don't understand the description of that command in the ATAPI documentation. Maybe someone has a code snippet of such a routine. Hope you can help me. Thank you Thorsten
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |