1
0
Fork 0

updated loggingsystem

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@989
This commit is contained in:
Peter Veenstra 2003-05-04 19:19:09 +00:00
parent 72d44cbc16
commit bbb7cf45b0
44 changed files with 208 additions and 201 deletions

View file

@ -166,7 +166,7 @@ int CDROM_GetMountType(char* path, int forceCD)
int num = SDL_CDNumDrives();
// If cd drive is forced then check if its in range and return 0
if ((forceCD>=0) && (forceCD<num)) {
LOG(LOG_ERROR,"CDROM: Using drive %d",forceCD);
LOG(LOG_ALL,LOG_ERROR)("CDROM: Using drive %d",forceCD);
return 0;
}

View file

@ -92,13 +92,13 @@ BYTE CDROM_Interface_Aspi::GetHostAdapter(char* hardwareID)
if (sd.SRB_Status == SS_COMP) {
if (sd.SRB_DeviceType == DTYPE_CDROM) {
if ((target==j) && (lun==k)) {
LOG(LOG_MISC,"SCSI: Getting Hardware vendor.");
LOG(LOG_MISC,LOG_NORMAL)("SCSI: Getting Hardware vendor.");
// "Hardware ID = vendor" match ?
char vendor[64];
if (GetVendor(i,target,lun,vendor)) {
LOG(LOG_MISC,"SCSI: Vendor : %s",vendor);
LOG(LOG_MISC,LOG_NORMAL)("SCSI: Vendor : %s",vendor);
if (strstr(strupr(hardwareID),strupr(vendor))) {
LOG(LOG_MISC,"SCSI: Host Adapter found: %d",i);
LOG(LOG_MISC,LOG_NORMAL)("SCSI: Host Adapter found: %d",i);
return i;
}
};
@ -108,7 +108,7 @@ BYTE CDROM_Interface_Aspi::GetHostAdapter(char* hardwareID)
}
}
}
LOG(LOG_ERROR,"SCSI: Host Adapter not found: %d",i);
LOG(LOG_MISC,LOG_ERROR)("SCSI: Host Adapter not found: %d",i);
return 0;
};
@ -131,16 +131,16 @@ bool CDROM_Interface_Aspi::ScanRegistryFindKey(HKEY& hKeyBase)
newKeyResult = RegOpenKeyEx (hKeyBase,subKey,0,KEY_READ,&hNewKey);
if (newKeyResult==ERROR_SUCCESS) {
if (GetRegistryValue(hNewKey,"CurrentDriveLetterAssignment",buffer,256)) {
LOG(LOG_MISC,"SCSI: Drive Letter found: %s",buffer);
LOG(LOG_MISC,LOG_NORMAL)("SCSI: Drive Letter found: %s",buffer);
// aha, something suspicious...
if (buffer[0]==letter) {
char hardwareID[256];
// found it... lets see if we can get the scsi values
bool v1 = GetRegistryValue(hNewKey,"SCSILUN",buffer,256);
LOG(LOG_MISC,"SCSI: SCSILUN found: %s",buffer);
LOG(LOG_MISC,LOG_NORMAL)("SCSI: SCSILUN found: %s",buffer);
lun = buffer[0]-'0';
bool v2 = GetRegistryValue(hNewKey,"SCSITargetID",buffer,256);
LOG(LOG_MISC,"SCSI: SCSITargetID found: %s",buffer);
LOG(LOG_MISC,LOG_NORMAL)("SCSI: SCSITargetID found: %s",buffer);
target = buffer[0]-'0';
bool v3 = GetRegistryValue(hNewKey,"HardwareID",hardwareID,256);
RegCloseKey(hNewKey);

View file

@ -120,7 +120,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
ansi.esc=true;
count++;
if(!ansi_enabled) {
LOG(LOG_IOCTL,"ANSI sequences detected. enabling ansi support"); /* maybe LOG_MSG */
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI sequences detected. enabling ansi support"); /* maybe LOG_MSG */
ansi_enabled=true;
}
continue;
@ -144,7 +144,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
case 'D':/* scrolling DOWN*/
case 'M':/* scrolling UP*/
default:
LOG(LOG_IOCTL,"ANSI: unknown char %c after a esc",data[count]); /*prob () */
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI: unknown char %c after a esc",data[count]); /*prob () */
ClearAnsi();
break;
}
@ -180,13 +180,13 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
ansi.attr|=0x8;
break;
case 4: /* underline */
LOG(LOG_IOCTL,"ANSI:no support for underline yet");
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI:no support for underline yet");
break;
case 5: /* blinking */
LOG(LOG_IOCTL,"ANSI:no support for blinking yet");
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI:no support for blinking yet");
break;
case 7: /* reverse */
LOG(LOG_IOCTL,"ANSI:no support for reverse yet");
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI:no support for reverse yet");
break;
case 30: /* fg color black */
ansi.attr&=0xf8;
@ -285,7 +285,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
case 'J': /*erase screen and move cursor home*/
if(ansi.data[0]==0) ansi.data[0]=2;
if(ansi.data[0]!=2) {/* only number 2 (the standard one supported) */
LOG(LOG_IOCTL,"ANSI: esc[%dJ called : not supported",ansi.data[0]);
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI: esc[%dJ called : not supported",ansi.data[0]);
break;
}
for(i=0;i<(Bitu)ansi.ncols*ansi.nrows;i++) INT10_TeletypeOutput(' ',ansi.attr,true,0);
@ -294,7 +294,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
break;
case 'h': /* set MODE (if code =7 enable linewrap) */
case 'I': /*RESET MODE */
LOG(LOG_IOCTL,"ANSI: set/reset mode called(not supported)");
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI: set/reset mode called(not supported)");
ClearAnsi();
break;
case 'D': /*Cursor Backward */
@ -321,7 +321,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
case 'p':/* reassign keys (needs strings) */
case 'i':/* printer stuff */
default:
LOG(LOG_IOCTL,"ANSI: unhandled char %c in esc[",data[count]);
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI: unhandled char %c in esc[",data[count]);
ClearAnsi();
break;
}

View file

@ -171,7 +171,7 @@ static Bitu DOS_21Handler(void) {
}else{
reg_al=0xff;
}
LOG(LOG_FCB,"DOS:0x0f FCB-fileopen used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x0f FCB-fileopen used, result:al=%d",reg_al);
break;
case 0x10: /* Close File using FCB */
if(DOS_FCBClose(SegValue(ds),reg_dx)){
@ -179,7 +179,7 @@ static Bitu DOS_21Handler(void) {
}else{
reg_al=0xff;
}
LOG(LOG_FCB,"DOS:0x10 FCB-fileclose used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x10 FCB-fileclose used, result:al=%d",reg_al);
break;
case 0x11: /* Find First Matching File using FCB */
if(DOS_FCBFindFirst(SegValue(ds),reg_dx)){
@ -187,7 +187,7 @@ static Bitu DOS_21Handler(void) {
}else{
reg_al=0xff;
}
LOG(LOG_FCB,"DOS:0x11 FCB-FindFirst used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x11 FCB-FindFirst used, result:al=%d",reg_al);
break;
case 0x12: /* Find Next Matching File using FCB */
if(DOS_FCBFindNext(SegValue(ds),reg_dx)){
@ -195,7 +195,7 @@ static Bitu DOS_21Handler(void) {
}else{
reg_al=0xff;
}
LOG(LOG_FCB,"DOS:0x12 FCB-FindNext used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x12 FCB-FindNext used, result:al=%d",reg_al);
break;
case 0x13: /* Delete File using FCB */
if (DOS_FCBDeleteFile(SegValue(ds),reg_dx)) reg_al = 0x00;
@ -203,16 +203,16 @@ static Bitu DOS_21Handler(void) {
break;
case 0x14: /* Sequential read from FCB */
reg_al = DOS_FCBRead(SegValue(ds),reg_dx,0);
LOG(LOG_FCB,"DOS:0x14 FCB-Read used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x14 FCB-Read used, result:al=%d",reg_al);
break;
case 0x15: /* Sequential write to FCB */
reg_al=DOS_FCBWrite(SegValue(ds),reg_dx,0);
LOG(LOG_FCB,"DOS:0x15 FCB-Write used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x15 FCB-Write used, result:al=%d",reg_al);
break;
case 0x16: /* Create or truncate file using FCB */
if (DOS_FCBCreate(SegValue(ds),reg_dx)) reg_al = 0x00;
else reg_al = 0xFF;
LOG(LOG_FCB,"DOS:0x16 FCB-Create used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x16 FCB-Create used, result:al=%d",reg_al);
break;
case 0x17: /* Rename file using FCB */
if (DOS_FCBRenameFile(SegValue(ds),reg_dx)) reg_al = 0x00;
@ -226,11 +226,11 @@ static Bitu DOS_21Handler(void) {
break;
case 0x21: /* Read random record from FCB */
reg_al = DOS_FCBRandomRead(SegValue(ds),reg_dx,1,true);
LOG(LOG_FCB,"DOS:0x21 FCB-Random read used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x21 FCB-Random read used, result:al=%d",reg_al);
break;
case 0x22: /* Write random record to FCB */
reg_al=DOS_FCBRandomWrite(SegValue(ds),reg_dx,1,true);
LOG(LOG_FCB,"DOS:0x22 FCB-Random write used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x22 FCB-Random write used, result:al=%d",reg_al);
break;
case 0x23: /* Get file size for FCB */
if (DOS_FCBGetFileSize(SegValue(ds),reg_dx,reg_cx)) reg_al = 0x00;
@ -241,11 +241,11 @@ static Bitu DOS_21Handler(void) {
break;
case 0x27: /* Random block read from FCB */
reg_al = DOS_FCBRandomRead(SegValue(ds),reg_dx,reg_cx,false);
LOG(LOG_FCB,"DOS:0x27 FCB-Random(block) read used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x27 FCB-Random(block) read used, result:al=%d",reg_al);
break;
case 0x28: /* Random Block write to FCB */
reg_al=DOS_FCBRandomWrite(SegValue(ds),reg_dx,reg_cx,false);
LOG(LOG_FCB,"DOS:0x28 FCB-Random(block) write used, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:0x28 FCB-Random(block) write used, result:al=%d",reg_al);
break;
case 0x29: /* Parse filename into FCB */
{ Bit8u difference;
@ -254,7 +254,7 @@ static Bitu DOS_21Handler(void) {
reg_al=FCB_Parsename(SegValue(es),reg_di,reg_al ,string, &difference);
reg_si+=difference;
}
LOG(LOG_FCB,"DOS:29:FCB Parse Filename, result:al=%d",reg_al);
LOG(LOG_FCB,LOG_NORMAL)("DOS:29:FCB Parse Filename, result:al=%d",reg_al);
break;
case 0x19: /* Get current default drive */
reg_al=DOS_GetDefaultDrive();
@ -306,7 +306,7 @@ static Bitu DOS_21Handler(void) {
}
break;
case 0x2d: /* Set System Time */
LOG(LOG_ERROR,"DOS:Set System Time not supported");
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Set System Time not supported");
reg_al=0; /* Noone is changing system time */
break;
case 0x2e: /* Set Verify flag */
@ -384,7 +384,7 @@ static Bitu DOS_21Handler(void) {
case 3:
reg_al=0;break;
};
LOG(LOG_ERROR|LOG_MISC,"DOS:0x37:Call for not supported switchchar");
LOG(LOG_MISC,LOG_ERROR)("DOS:0x37:Call for not supported switchchar");
break;
case 0x38: /* Set Country Code */
if (reg_al==0) { /* Get country specidic information */
@ -404,7 +404,7 @@ static Bitu DOS_21Handler(void) {
CALLBACK_SCF(false);
break;
} else { /* Set country code */
LOG(LOG_ERROR|LOG_MISC,"DOS:Setting country code not supported");
LOG(LOG_MISC,LOG_ERROR)("DOS:Setting country code not supported");
}
CALLBACK_SCF(true);
break;
@ -524,7 +524,7 @@ static Bitu DOS_21Handler(void) {
}
break;
case 0x01: /* Set */
LOG(LOG_ERROR|LOG_MISC,"DOS:Set File Attributes for %s not supported",name1);
LOG(LOG_MISC,LOG_ERROR)("DOS:Set File Attributes for %s not supported",name1);
CALLBACK_SCF(false);
break;
default:
@ -601,7 +601,7 @@ static Bitu DOS_21Handler(void) {
case 0x4b: /* EXEC Load and/or execute program */
{
MEM_StrCopy(SegPhys(ds)+reg_dx,name1,DOSNAMEBUF);
LOG(LOG_ERROR|LOG_MISC,"Execute %s %d",name1,reg_al);
LOG(LOG_EXEC,LOG_ERROR)("Execute %s %d",name1,reg_al);
if (!DOS_Execute(name1,SegPhys(es)+reg_bx,reg_al)) {
reg_ax=dos.errorcode;
CALLBACK_SCF(true);
@ -655,7 +655,7 @@ static Bitu DOS_21Handler(void) {
RealPt addr=dos_infoblock.GetPointer();
SegSet16(es,RealSeg(addr));
reg_bx=RealOff(addr);
LOG(LOG_MISC,"Call is made for list of lists - let's hope for the best");
LOG(LOG_DOSMISC,LOG_NORMAL)("Call is made for list of lists - let's hope for the best");
break; }
//TODO Think hard how shit this is gonna be
//And will any game ever use this :)
@ -689,7 +689,7 @@ static Bitu DOS_21Handler(void) {
} else {
reg_cx=0;
reg_dx=0;
LOG(LOG_ERROR|LOG_MISC,"DOS:57:Setting File Date is faked",reg_ah);
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:57:Setting File Date is faked",reg_ah);
}
break;
case 0x58: /* Get/Set Memory allocation strategy */
@ -709,7 +709,7 @@ static Bitu DOS_21Handler(void) {
CALLBACK_SCF(true);
break;
default:
LOG(LOG_ERROR|LOG_MISC,"DOS:58:Not Supported Set//Get memory allocation call %X",reg_al);
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:58:Not Supported Set//Get memory allocation call %X",reg_al);
}
break;
case 0x59: /* Get Extended error information */
@ -770,7 +770,7 @@ static Bitu DOS_21Handler(void) {
case 0x65: /* Get extented country information and a lot of other useless shit*/
/* Todo maybe fully support this for now we set it standard for USA */
{
LOG(LOG_ERROR|LOG_MISC,"DOS:65:Extended country information call");
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:65:Extended country information call");
PhysPt data=SegPhys(es)+reg_di;
switch (reg_al) {
case 1:
@ -799,12 +799,12 @@ static Bitu DOS_21Handler(void) {
}
case 0x66: /* Get/Set global code page table */
if (reg_al==1) {
LOG(LOG_ERROR|LOG_MISC,"Getting global code page table");
LOG(LOG_DOSMISC,LOG_ERROR)("Getting global code page table");
reg_bx=reg_dx=437;
CALLBACK_SCF(false);
break;
}
LOG(LOG_DOSMISC,"DOS:Setting code page table is not supported");
LOG(LOG_DOSMISC,LOG_NORMAL)("DOS:Setting code page table is not supported");
break;
case 0x67: /* Set handle count */
/* Weird call to increase amount of file handles needs to allocate memory if >20 */
@ -818,11 +818,11 @@ static Bitu DOS_21Handler(void) {
{
switch(reg_al) {
case 0x00: /* Get */
LOG(LOG_ERROR|LOG_MISC,"DOS:Get Disk serial number");
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Get Disk serial number");
CALLBACK_SCF(true);
break;
case 0x01:
LOG(LOG_ERROR|LOG_MISC,"DOS:Set Disk serial number");
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Set Disk serial number");
default:
E_Exit("DOS:Illegal Get Serial Number call %2X",reg_al);
}
@ -834,7 +834,7 @@ static Bitu DOS_21Handler(void) {
case 0x71: /* Unknown probably 4dos detection */
reg_ax=0x7100;
CALLBACK_SCF(true);
LOG(LOG_DOSMISC,"DOS:Windows long file name support call %2X",reg_al);
LOG(LOG_DOSMISC,LOG_NORMAL)("DOS:Windows long file name support call %2X",reg_al);
break;
case 0x68: /* FFLUSH Commit file */
case 0x63: /* Weirdo double byte stuff (fails but say it succeeded) available only in MSDOS 2.25 */
@ -855,7 +855,7 @@ static Bitu DOS_21Handler(void) {
case 0x5e: /* More Network Functions */
case 0x5f: /* And Even More Network Functions */
default:
LOG(LOG_ERROR|LOG_MISC,"DOS:Unhandled call %02X al=%02X. Set al to default of 0",reg_ah,reg_al);
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Unhandled call %02X al=%02X. Set al to default of 0",reg_ah,reg_al);
reg_al=0x00; /* default value */
break;
};
@ -888,12 +888,12 @@ static Bitu DOS_25Handler(void) {
SETFLAGBIT(CF,false);
reg_ax=0;
if((reg_cx != 1) ||(reg_dx != 1))
LOG(LOG_DOSMISC,"int 25 called but not as diskdetection");
LOG(LOG_DOSMISC,LOG_NORMAL)("int 25 called but not as diskdetection");
}
return CBRET_NONE;
}
static Bitu DOS_26Handler(void) {
LOG(LOG_DOSMISC,"int 26 called: hope for the best!");
LOG(LOG_DOSMISC,LOG_NORMAL)("int 26 called: hope for the best!");
flags.type=0;
if(Drives[reg_al]==0){
reg_ax=0x8002;
@ -909,12 +909,12 @@ static Bitu DOS_28Handler(void) {
}
static Bitu DOS_29Handler(void) {
LOG(LOG_ERROR|LOG_MISC,"int 29 called");
LOG(LOG_DOSMISC,LOG_ERROR)("int 29 called");
return CBRET_NONE;
}
static Bitu DOS_CaseMapFunc(void) {
//LOG(LOG_ERROR|LOG_MISC,"Case map routine called : %c",reg_al);
//LOG(LOG_DOSMISC,LOG_ERROR)("Case map routine called : %c",reg_al);
return CBRET_NONE;
};

View file

@ -304,12 +304,12 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) {
pos=headersize;DOS_SeekFile(fhandle,&pos,DOS_SEEK_SET);
while (imagesize>0x7FFF) {
readsize=0x8000;DOS_ReadFile(fhandle,loadaddress,&readsize);
if (readsize!=0x8000) LOG(LOG_EXEC,"Illegal header");
if (readsize!=0x8000) LOG(LOG_EXEC,LOG_NORMAL)("Illegal header");
loadaddress+=0x8000;imagesize-=0x8000;
}
if (imagesize>0) {
readsize=(Bit16u)imagesize;DOS_ReadFile(fhandle,loadaddress,&readsize);
if (readsize!=imagesize) LOG(LOG_EXEC,"Illegal header");
if (readsize!=imagesize) LOG(LOG_EXEC,LOG_NORMAL)("Illegal header");
}
/* Relocate the exe image */
Bit16u relocate;

View file

@ -330,8 +330,8 @@ bool DOS_CreateFile(char * name,Bit16u attributes,Bit16u * entry) {
bool DOS_OpenFile(char * name,Bit8u flags,Bit16u * entry) {
/* First check for devices */
if (flags>2) LOG(LOG_FILES|LOG_ERROR,"Special file open command %X file %s",flags,name);
else LOG(LOG_FILES,"file open command %X file %s",flags,name);
if (flags>2) LOG(LOG_FILES,LOG_ERROR)("Special file open command %X file %s",flags,name);
else LOG(LOG_FILES,LOG_NORMAL)("file open command %X file %s",flags,name);
DOS_PSP psp(dos.psp);
Bit8u handle=DOS_FindDevice((char *)name);
@ -658,7 +658,7 @@ bool DOS_FCBOpen(Bit16u seg,Bit16u offset) {
handle = psp.FindEntryByHandle(i);
if (handle==0xFF) {
// This shouldnt happen
LOG(LOG_FILES|LOG_ERROR,"DOS: File %s is opened but has no psp entry.",shortname);
LOG(LOG_FILES,LOG_ERROR)("DOS: File %s is opened but has no psp entry.",shortname);
return false;
}
fcb.FileOpen((Bit8u)handle);

View file

@ -45,7 +45,7 @@ bool DOS_IOCTL(void) {
reg_dx=Files[handle]->GetInformation();
return true;
case 0x07: /* Get Output Status */
LOG(LOG_IOCTL,"DOS:IOCTL:07:Fakes output status is ready for handle %d",handle);
LOG(LOG_IOCTL,LOG_NORMAL)("DOS:IOCTL:07:Fakes output status is ready for handle %d",handle);
reg_al=0xff;
return true;
case 0x08: /* Check if block device removable */
@ -82,7 +82,7 @@ bool DOS_IOCTL(void) {
mem_writeb(ptr+6,0x00); // media type (00=other type)
break;
default :
LOG(LOG_IOCTL|LOG_ERROR,"DOS:IOCTL Call 0D:%2X Drive %2X unhandled",reg_cl,drive);
LOG(LOG_IOCTL,LOG_ERROR)("DOS:IOCTL Call 0D:%2X Drive %2X unhandled",reg_cl,drive);
return false;
}
return true;
@ -105,7 +105,7 @@ bool DOS_IOCTL(void) {
break;
}
default:
LOG(LOG_DOSMISC|LOG_ERROR,"DOS:IOCTL Call %2X unhandled",reg_al);
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:IOCTL Call %2X unhandled",reg_al);
return false;
};
return false;

View file

@ -44,7 +44,7 @@ static Bitu INT2F_Handler(void) {
if ((*loop_multiplex->handler)()) return CBRET_NONE;
loop_multiplex=loop_multiplex->next;
}
LOG(LOG_ERROR,"DOS:Multiplex Unhandled call %4X",reg_ax);
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Multiplex Unhandled call %4X",reg_ax);
return CBRET_NONE;
};

View file

@ -228,7 +228,7 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit)
// Get Mounttype and init needed cdrom interface
switch (CDROM_GetMountType(physicalPath,forceCD)) {
case 0x00 : {
LOG(LOG_MISC,"MSCDEX: Mounting physical cdrom: %s" ,physicalPath);
LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: Mounting physical cdrom: %s" ,physicalPath);
#if defined (WIN32)
// Check OS
OSVERSIONINFO osi;
@ -238,30 +238,30 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit)
// only WIN NT/200/XP
if (useCdromInterface==CDROM_USE_IOCTL) {
cdrom[numDrives] = new CDROM_Interface_Ioctl();
LOG(LOG_MISC,"MSCDEX: IOCTL Interface.");
LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: IOCTL Interface.");
break;
}
}
if (useCdromInterface==CDROM_USE_ASPI) {
// all Wins - ASPI
cdrom[numDrives] = new CDROM_Interface_Aspi();
LOG(LOG_MISC,"MSCDEX: ASPI Interface.");
LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: ASPI Interface.");
break;
}
#endif
cdrom[numDrives] = new CDROM_Interface_SDL();
LOG(LOG_MISC,"MSCDEX: SDL Interface.");
LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: SDL Interface.");
} break;
case 0x01 : // iso cdrom interface
// FIXME: Not yet supported
LOG(LOG_MISC|LOG_ERROR,"MSCDEX: Mounting iso file as cdrom: %s" ,physicalPath);
LOG(LOG_MISC,LOG_ERROR)("MSCDEX: Mounting iso file as cdrom: %s" ,physicalPath);
cdrom[numDrives] = new CDROM_Interface_Fake;
return 2;
break;
case 0x02 : // fake cdrom interface (directories)
cdrom[numDrives] = new CDROM_Interface_Fake;
LOG(LOG_MISC,"MSCDEX: Mounting directory as cdrom: %s",physicalPath);
LOG(LOG_MISC,"MSCDEX: You wont have full MSCDEX support !");
LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: Mounting directory as cdrom: %s",physicalPath);
LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: You wont have full MSCDEX support !");
result = 5;
break;
default : // weird result
@ -728,7 +728,7 @@ static Bitu MSCDEX_Interrupt_Handler(void)
mem_writeb(buffer+10,0x00);
break;
};
default : LOG(LOG_ERROR|LOG_MISC,"MSCDEX: Unsupported IOCTL INPUT Subfunction %02X",subFuncNr);
default : LOG(LOG_MISC,LOG_ERROR)("MSCDEX: Unsupported IOCTL INPUT Subfunction %02X",subFuncNr);
break;
}
break;
@ -747,7 +747,7 @@ static Bitu MSCDEX_Interrupt_Handler(void)
case 0x05 : // load media
mscdex->LoadUnloadMedia(subUnit,false);
break;
default : LOG(LOG_ERROR|LOG_MISC,"MSCDEX: Unsupported IOCTL OUTPUT Subfunction %02X",subFuncNr);
default : LOG(LOG_MISC,LOG_ERROR)("MSCDEX: Unsupported IOCTL OUTPUT Subfunction %02X",subFuncNr);
break;
};
break;
@ -784,7 +784,7 @@ static Bitu MSCDEX_Interrupt_Handler(void)
case 0x88 : /* Resume Audio */
mscdex->ResumeAudio(subUnit);
break;
default : LOG(LOG_ERROR|LOG_MISC,"MSCDEX: Unsupported Driver Request %02X",funcNr);
default : LOG(LOG_MISC,LOG_ERROR)("MSCDEX: Unsupported Driver Request %02X",funcNr);
break;
};
@ -870,7 +870,7 @@ static bool MSCDEX_Handler(void)
case 0x1510: /* Device driver request */
mscdex->SendDriverRequest(reg_cx,data);
return true;
default : LOG(LOG_ERROR|LOG_MISC,"MSCDEX: Unknwon call : %04X",reg_ax);
default : LOG(LOG_MISC,LOG_ERROR)("MSCDEX: Unknwon call : %04X",reg_ax);
return true;
};
@ -882,7 +882,7 @@ public:
device_MSCDEX() { name="MSCD001"; }
bool Read (Bit8u * data,Bit16u * size) { return false;}
bool Write(Bit8u * data,Bit16u * size) {
LOG(0,"Write to mscdex device");
LOG(LOG_ALL,LOG_NORMAL)("Write to mscdex device");
return false;
}
bool Seek(Bit32u * pos,Bit32u type){return false;}

View file

@ -113,13 +113,13 @@ void DOS_Drive_Cache::SetLabel(const char* vname)
}
};
label[labelPos]=0;
// LOG(LOG_ERROR,"CACHE: Set volume label to %s",label);
// LOG(LOG_ALL,LOG_ERROR)("CACHE: Set volume label to %s",label);
};
Bit16u DOS_Drive_Cache::GetFreeID(CFileInfo* dir)
{
for (Bit32u i=0; i<MAX_OPENDIRS; i++) if (free[i] || (dir==dirSearch[i])) return i;
LOG(LOG_FILES,"DIRCACHE: Too many open directories!");
LOG(LOG_FILES,LOG_NORMAL)("DIRCACHE: Too many open directories!");
return 0;
};