Cleanup, moving stuff out of ibm.h and such. Moved more configuration variables into main. Minor changes for multiplatform.

This commit is contained in:
waltje
2017-11-02 02:28:00 -05:00
parent 0565bf76af
commit b40ea14027
92 changed files with 565 additions and 467 deletions

View File

@@ -9,7 +9,7 @@
* Implementation of the CD-ROM drive with SCSI(-like)
* commands, for both ATAPI and SCSI usage.
*
* Version: @(#)cdrom.h 1.0.3 2017/10/15
* Version: @(#)cdrom.h 1.0.4 2017/11/01
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
@@ -21,6 +21,12 @@
#define CDROM_NUM 4
#define CD_STATUS_EMPTY 0
#define CD_STATUS_DATA_ONLY 1
#define CD_STATUS_PLAYING 2
#define CD_STATUS_PAUSED 3
#define CD_STATUS_STOPPED 4
#define CDROM_PHASE_IDLE 0
#define CDROM_PHASE_COMMAND 1
#define CDROM_PHASE_COMPLETE 2
@@ -38,6 +44,15 @@
#define CDROM_TIME (5LL * 100LL * (1LL << TIMER_SHIFT))
enum {
CDROM_BUS_DISABLED = 0,
CDROM_BUS_ATAPI_PIO_ONLY = 4,
CDROM_BUS_ATAPI_PIO_AND_DMA,
CDROM_BUS_SCSI,
CDROM_BUS_USB = 8
};
typedef struct {
int (*ready)(uint8_t id);
int (*medium_changed)(uint8_t id);