Changed all the CD-ROM files to the new agreed upon coding style.
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Generic CD-ROM drive core header.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
@@ -67,57 +65,57 @@ struct cdrom;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t attr, track,
|
||||
index,
|
||||
abs_m, abs_s, abs_f,
|
||||
rel_m, rel_s, rel_f;
|
||||
uint8_t attr, track,
|
||||
index,
|
||||
abs_m, abs_s, abs_f,
|
||||
rel_m, rel_s, rel_f;
|
||||
} subchannel_t;
|
||||
|
||||
typedef struct {
|
||||
int number;
|
||||
uint8_t attr, m, s, f;
|
||||
int number;
|
||||
uint8_t attr, m, s, f;
|
||||
} track_info_t;
|
||||
|
||||
/* Define the various CD-ROM drive operations (ops). */
|
||||
typedef struct {
|
||||
void (*get_tracks)(struct cdrom *dev, int *first, int *last);
|
||||
void (*get_track_info)(struct cdrom *dev, uint32_t track, int end, track_info_t *ti);
|
||||
void (*get_subchannel)(struct cdrom *dev, uint32_t lba, subchannel_t *subc);
|
||||
int (*is_track_pre)(struct cdrom *dev, uint32_t lba);
|
||||
int (*sector_size)(struct cdrom *dev, uint32_t lba);
|
||||
int (*read_sector)(struct cdrom *dev, int type, uint8_t *b, uint32_t lba);
|
||||
int (*track_type)(struct cdrom *dev, uint32_t lba);
|
||||
void (*exit)(struct cdrom *dev);
|
||||
void (*get_tracks)(struct cdrom *dev, int *first, int *last);
|
||||
void (*get_track_info)(struct cdrom *dev, uint32_t track, int end, track_info_t *ti);
|
||||
void (*get_subchannel)(struct cdrom *dev, uint32_t lba, subchannel_t *subc);
|
||||
int (*is_track_pre)(struct cdrom *dev, uint32_t lba);
|
||||
int (*sector_size)(struct cdrom *dev, uint32_t lba);
|
||||
int (*read_sector)(struct cdrom *dev, int type, uint8_t *b, uint32_t lba);
|
||||
int (*track_type)(struct cdrom *dev, uint32_t lba);
|
||||
void (*exit)(struct cdrom *dev);
|
||||
} cdrom_ops_t;
|
||||
|
||||
typedef struct cdrom {
|
||||
uint8_t id;
|
||||
|
||||
union {
|
||||
uint8_t res, res0, /* Reserved for other ID's. */
|
||||
res1,
|
||||
ide_channel, scsi_device_id;
|
||||
uint8_t res, res0, /* Reserved for other ID's. */
|
||||
res1,
|
||||
ide_channel, scsi_device_id;
|
||||
};
|
||||
|
||||
uint8_t bus_type, /* 0 = ATAPI, 1 = SCSI */
|
||||
bus_mode, /* Bit 0 = PIO suported;
|
||||
Bit 1 = DMA supportd. */
|
||||
cd_status, /* Struct variable reserved for
|
||||
media status. */
|
||||
speed, cur_speed;
|
||||
uint8_t bus_type, /* 0 = ATAPI, 1 = SCSI */
|
||||
bus_mode, /* Bit 0 = PIO suported;
|
||||
Bit 1 = DMA supportd. */
|
||||
cd_status, /* Struct variable reserved for
|
||||
media status. */
|
||||
speed, cur_speed;
|
||||
|
||||
FILE* img_fp;
|
||||
void *priv;
|
||||
|
||||
char image_path[1024],
|
||||
prev_image_path[1024];
|
||||
prev_image_path[1024];
|
||||
|
||||
uint32_t sound_on, cdrom_capacity,
|
||||
pad, seek_pos,
|
||||
seek_diff, cd_end;
|
||||
pad, seek_pos,
|
||||
seek_diff, cd_end;
|
||||
|
||||
int host_drive, prev_host_drive,
|
||||
cd_buflen, noplay;
|
||||
cd_buflen, noplay;
|
||||
|
||||
const cdrom_ops_t *ops;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user