Ceci est une version archivée de
Metadiscinfo() à 2005-06-08 23:25:00.
LONG Metadiscinfo( drive,discinfo )
WORD drive;
bos_discinfo_t *discinfo;
Opcode
63 (0x3f)
Availability
A
MetaDOS driver must be installed.
Parameters
drive is the letter of a
MetaDOS device, i.e. the ASCII code for any character from 'A' to 'Z'.
discinfo is a pointer to the following structure, which will be filled by the function upon return:
typedef struct {
unsigned char disctype; /* Type of CD: 0 for audio CD, anything else for data CD */
unsigned char first; /* Number of first track of the CD */
unsigned char last; /* Number of last track of the CD */
unsigned char current; /* Number of currently playing track */
bos_tocentry_t relative; /* Current playing position, from start of the track */
bos_tocentry_t absolute; /* Current playing position, from start of disc */
bos_tocentry_t end; /* End of CD */
unsigned char index, reserved1[3];
unsigned long reserved2[123];
} bos_discinfo_t;
The relative, absolute and end fields are in this format:
typedef struct {
unsigned char track; /* Number of track */
unsigned char minute; /* Minutes, in BCD format */
unsigned char second; /* Seconds, in BCD format */
unsigned char frame; /* Frames, in BCD format */
} bos_tocentry_t;
The BCD format is very simple: if you have minute=0x40 (in hexa), it means 40mn. If you have seconds=0x23 (in hexa), it means 23 s.
Binding
pea discinfo
move.w drive,-(sp)
move.w #$3f,-(sp)
trap #14
addq.l #8,sp
Return Value
The LONG value contains 0 if the operation was successful, or a negative error code.