Board index » delphi » CD-Player-Tool in Borland Turbo Pascal 6.0

CD-Player-Tool in Borland Turbo Pascal 6.0

Stefan Kollmann <SKoll...@abo.Rhein-Zeitung.de> wrote in article
<326E15DA.7...@abo.Rhein-Zeitung.de>...

Quote
> Hello,

> I startet to write a little Program to play Music-CD's in my CD-ROM-
> Drive (Mitsumi FX400). Now I have a little Problem.
> I want to read the EAN (UPN) number of the CD, to create a database of
> the Titles.

A nice idea, but most CDs don't *have* UPC numbers; this is what the
error codes are telling you. The conventional way to get around this
problem is to read the Volume Serial Number instead. This isn't part
of the MSCDEX interface- it's a DOS thing.

Chris.

 

Re:CD-Player-Tool in Borland Turbo Pascal 6.0


Hello,

I startet to write a little Program to play Music-CD's in my CD-ROM-
Drive (Mitsumi FX400). Now I have a little Problem.
I want to read the EAN (UPN) number of the CD, to create a database of
the Titles.
But when I read the UPN-Code, there are two Errors.
The first Error is, that I get '0000000000000' as UPN-Code. If that
happens, the CD-Play-Procedure will work correctly. (Happens if I play a
CD-Album or Sampler)
The second Error is, that my CD-Play-Procedure Stops, when the UPN-Code
was read correctly. The Status of the CD-Rom-Drive is "2". This happens,
if I want to play a single-CD. Now I don't know what I made wrong.
I don't have any Table of CD-Rom-Commands and used the commands of an
old unit of the ALLSWAG.
So my question : Can anybody help me ?

Stefan Kollmann, SKoll...@Abo.Rhein-Zeitung.de

Re:CD-Player-Tool in Borland Turbo Pascal 6.0


Quote
Chris Rankin wrote:

> Stefan Kollmann <SKoll...@abo.Rhein-Zeitung.de> wrote in article
> <326E15DA.7...@abo.Rhein-Zeitung.de>...
> > Hello,

> > I startet to write a little Program to play Music-CD's in my CD-ROM-
> > Drive (Mitsumi FX400). Now I have a little Problem.
> > I want to read the EAN (UPN) number of the CD, to create a database of
> > the Titles.

> A nice idea, but most CDs don't *have* UPC numbers; this is what the
> error codes are telling you. The conventional way to get around this
> problem is to read the Volume Serial Number instead. This isn't part
> of the MSCDEX interface- it's a DOS thing.

> Chris.

Ok, I have the same problems with my Mitsumi FX400, i cant use any
if my routines for playing audio cd:s, since they dont manage to
create the text-register for the drive. It works great with a
sony device...
/Anders

Re:CD-Player-Tool in Borland Turbo Pascal 6.0


Anders Forsgren <afo0...@ba.ssdn.skelleftea.se> wrote in article

Quote
> Ok, I have the same problems with my Mitsumi FX400

The UPC is (not) recorded on the CD; it doesn't matter which drive you
have.

Quote
> i cant use any of my routines for playing audio cd:s, since they dont
manage to
> create the text-register for the drive. It works great with a sony

device...
I'm not sure I understand what you mean by the "text-register for the
drive".
Do you mean that you are trying to open the cd-rom device driver as a text
file?
Are you running TP/BP in a Win95 DOS box?

Chris.

Re:CD-Player-Tool in Borland Turbo Pascal 6.0


In <01bbc10a$aac520a0$6295e...@meyerm.logica.co.uk>, "Chris Rankin" <Rank...@Logica.com> writes:

Quote
>Stefan Kollmann <SKoll...@abo.Rhein-Zeitung.de> wrote in article
><326E15DA.7...@abo.Rhein-Zeitung.de>...
>> Hello,

>> I startet to write a little Program to play Music-CD's in my CD-ROM-
>> Drive (Mitsumi FX400). Now I have a little Problem.
>> I want to read the EAN (UPN) number of the CD, to create a database of
>> the Titles.

>A nice idea, but most CDs don't *have* UPC numbers; this is what the
>error codes are telling you. The conventional way to get around this
>problem is to read the Volume Serial Number instead. This isn't part
>of the MSCDEX interface- it's a DOS thing.

Even then, that's got a good guarantee... the common method is to add
up all the starting sectors for each track and use the sum as the ID code
Not a perfect method, but okay... of couse, you could multiply them to
I suppose.. less chance of two audio cd's having same "ID".

Paul L Daniels.
jack...@eis.net.au

Re:CD-Player-Tool in Borland Turbo Pascal 6.0


Quote
Chris Rankin wrote:

> Anders Forsgren <afo0...@ba.ssdn.skelleftea.se> wrote in article
> > Ok, I have the same problems with my Mitsumi FX400
> The UPC is (not) recorded on the CD; it doesn't matter which drive you
> have.

> > i cant use any of my routines for playing audio cd:s, since they dont
> manage to
> > create the text-register for the drive. It works great with a sony
> device...
> I'm not sure I understand what you mean by the "text-register for the
> drive".
> Do you mean that you are trying to open the cd-rom device driver as a text
> file?
> Are you running TP/BP in a Win95 DOS box?

> Chris.Well, I'm not sure what i'm doing, since i didn't write any of theese

units, but one has to use a text handle of the device to use the IOCTL
/Anders

Re:CD-Player-Tool in Borland Turbo Pascal 6.0


Anders Forsgren <afo0...@ba.ssdn.skelleftea.se> wrote in article
<327630B0....@ba.ssdn.skelleftea.se>...

Quote
> > Do you mean that you are trying to open the cd-rom device driver as a
text
> > file?
> > Are you running TP/BP in a Win95 DOS box?

>Well, I'm not sure what i'm doing, since i didn't write any of theese
> units, but one has to use a text handle of the device to use the IOCTL
> /Anders

Actually... no, you don't. Only MSCDEX needs to do this (when it loads).
Once loaded, you can use the MSCDEX services to get *everything* you
need to control the CD-ROM. There is some sample code on garbo:

ftp://garbo.uwasa.fi/pub/pc/turbopas/cdtips02.zip

If you *are* using Windows 95, then this will solve your problem.

Chris.

Other Threads