1
0
Fork 0

Remove ASPI CD-ROM interface

ASPI was supported by Microsoft only for Windows 95, 98 and, ME.
Adaptec supported this interface going forward for Windows NT, 2000,
and XP (32-bit only).
This commit is contained in:
Patryk Obara 2019-12-01 12:37:33 +01:00 committed by Patryk Obara
parent d82766930f
commit e43f83a68a
9 changed files with 8 additions and 1198 deletions

View file

@ -20,8 +20,6 @@
#ifndef __CDROM_INTERFACE__
#define __CDROM_INTERFACE__
#define MAX_ASPI_CDROM 5
#include <string.h>
#include <string>
#include <iostream>
@ -49,7 +47,6 @@
enum {
CDROM_USE_SDL,
CDROM_USE_ASPI,
CDROM_USE_IOCTL_DIO,
CDROM_USE_IOCTL_DX,
CDROM_USE_IOCTL_MCI
@ -286,55 +283,7 @@ private:
#endif
#include <windows.h>
#include "wnaspi32.h" // Aspi stuff
class CDROM_Interface_Aspi : public CDROM_Interface
{
public:
CDROM_Interface_Aspi (void);
virtual ~CDROM_Interface_Aspi(void);
bool SetDevice (char* path, int forceCD);
bool GetUPC (unsigned char& attr, char* upc);
bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut);
bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr);
bool GetAudioSub (unsigned char& attr, unsigned char& track, unsigned char& index, TMSF& relPos, TMSF& absPos);
bool GetAudioStatus (bool& playing, bool& pause);
bool GetMediaTrayStatus (bool& mediaPresent, bool& mediaChanged, bool& trayOpen);
bool PlayAudioSector (unsigned long start,unsigned long len);
bool PauseAudio (bool resume);
bool StopAudio (void);
void ChannelControl (TCtrl ctrl) { return; };
bool ReadSectors (PhysPt buffer, bool raw, unsigned long sector, unsigned long num);
bool LoadUnloadMedia (bool unload);
private:
DWORD GetTOC (LPTOC toc);
HANDLE OpenIOCTLFile (char cLetter, BOOL bAsync);
void GetIOCTLAdapter (HANDLE hF,int * iDA,int * iDT,int * iDL);
bool ScanRegistryFindKey (HKEY& hKeyBase);
bool ScanRegistry (HKEY& hKeyBase);
BYTE GetHostAdapter (char* hardwareID);
bool GetVendor (BYTE HA_num, BYTE SCSI_Id, BYTE SCSI_Lun, char* szBuffer);
// ASPI stuff
BYTE haId;
BYTE target;
BYTE lun;
char letter;
// Windows stuff
HINSTANCE hASPI;
HANDLE hEvent; // global event
DWORD (*pGetASPI32SupportInfo) (void); // ptrs to aspi funcs
DWORD (*pSendASPI32Command) (LPSRB);
TMSF oldLeadOut;
};
class CDROM_Interface_Ioctl : public CDROM_Interface
{