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

@ -74,13 +74,13 @@ static Bitu INT1A_Handler(void) {
case 0x04: /* GET REAL-TIME ClOCK DATA (AT,XT286,PS) */
reg_dx=reg_cx=0;
CALLBACK_SCF(false);
LOG(LOG_ERROR|LOG_BIOS,"INT1A:04:Faked RTC get date call");
LOG(LOG_BIOS,LOG_ERROR)("INT1A:04:Faked RTC get date call");
break;
case 0x80: /* Pcjr Setup Sound Multiplexer */
LOG(LOG_ERROR|LOG_BIOS,"INT1A:80:Setup tandy sound multiplexer to %d",reg_al);
LOG(LOG_BIOS,LOG_ERROR)("INT1A:80:Setup tandy sound multiplexer to %d",reg_al);
break;
case 0x81: /* Tandy sound system checks */
LOG(LOG_ERROR|LOG_BIOS,"INT1A:81:Tandy DAC Check failing");
LOG(LOG_BIOS,LOG_ERROR)("INT1A:81:Tandy DAC Check failing");
break;
/*
INT 1A - Tandy 2500, Tandy 1000L series - DIGITAL SOUND - INSTALLATION CHECK
@ -93,7 +93,7 @@ static Bitu INT1A_Handler(void) {
clear on return, then call AH=84h"Tandy"
*/
default:
LOG(LOG_ERROR|LOG_BIOS,"INT1A:Undefined call %2X",reg_ah);
LOG(LOG_BIOS,LOG_ERROR)("INT1A:Undefined call %2X",reg_ah);
}
return CBRET_NONE;
}
@ -122,7 +122,7 @@ static Bitu INT11_Handler(void) {
14-15 number of parallel ports installed
*/
reg_ax=0x104D;
LOG(LOG_BIOS,"INT11:Equipment list returned %X",reg_ax);
LOG(LOG_BIOS,LOG_NORMAL)("INT11:Equipment list returned %X",reg_ax);
return CBRET_NONE;
}
@ -158,7 +158,7 @@ static Bitu INT12_Handler(void) {
};
static Bitu INT17_Handler(void) {
LOG(LOG_BIOS,"INT17:Function %X",reg_ah);
LOG(LOG_BIOS,LOG_NORMAL)("INT17:Function %X",reg_ah);
switch(reg_ah) {
case 0x00: /* PRINTER: Write Character */
reg_ah=1; /* Report a timeout */
@ -178,10 +178,10 @@ static Bitu INT17_Handler(void) {
static Bitu INT15_Handler(void) {
switch (reg_ah) {
case 0x06:
LOG(LOG_BIOS,"INT15 Unkown Function 6");
LOG(LOG_BIOS,LOG_NORMAL)("INT15 Unkown Function 6");
break;
case 0xC0: /* Get Configuration*/
LOG(LOG_ERROR|LOG_BIOS,"Request BIOS Configuration INT 15 C0");
LOG(LOG_BIOS,LOG_ERROR)("Request BIOS Configuration INT 15 C0");
CALLBACK_SCF(true);
break;
case 0x4f: /* BIOS - Keyboard intercept */
@ -229,7 +229,7 @@ static Bitu INT15_Handler(void) {
CALLBACK_SCF(true);
}
} else {
LOG(LOG_ERROR|LOG_BIOS,"INT15:84:Unknown Bios Joystick functionality.");
LOG(LOG_BIOS,LOG_ERROR)("INT15:84:Unknown Bios Joystick functionality.");
}
break;
case 0x86: /* BIOS - WAIT (AT,PS) */
@ -259,11 +259,11 @@ static Bitu INT15_Handler(void) {
Damn programs should use the mouse drivers
So let's fail these calls
*/
LOG(LOG_BIOS,"INT15:Function %X called,bios mouse not supported",reg_ah);
LOG(LOG_BIOS,LOG_NORMAL)("INT15:Function %X called,bios mouse not supported",reg_ah);
CALLBACK_SCF(true);
break;
default:
LOG(LOG_ERROR|LOG_BIOS,"INT15:Unknown call %2X",reg_ah);
LOG(LOG_BIOS,LOG_ERROR)("INT15:Unknown call %2X",reg_ah);
reg_ah=0x86;
CALLBACK_SCF(false);
}
@ -274,7 +274,7 @@ static Bitu INT1_Single_Step(void) {
static bool warned=false;
if (!warned) {
warned=true;
LOG(LOG_CPU,"INT 1:Single Step called");
LOG(LOG_CPU,LOG_NORMAL)("INT 1:Single Step called");
}
return CBRET_NONE;
}

View file

@ -34,10 +34,10 @@ static Bitu INT13_SmallHandler(void) {
case 0x0:
reg_ah=0x00;
CALLBACK_SCF(false);
LOG(LOG_BIOS,"reset disk return succesfull");
LOG(LOG_BIOS,LOG_NORMAL)("reset disk return succesfull");
break;
case 0x02: /* Read Disk Sectors */
LOG(LOG_BIOS,"INT13:02:Read Disk Sectors not supported failing");
LOG(LOG_BIOS,LOG_NORMAL)("INT13:02:Read Disk Sectors not supported failing");
reg_ah=0x80;
CALLBACK_SCF(true);
break;
@ -50,17 +50,17 @@ static Bitu INT13_SmallHandler(void) {
reg_ah=0x80;
CALLBACK_SCF(true);
}
LOG(LOG_BIOS,"INT 13:04 Verify sector used on %d, with result %d",reg_dl,reg_ah);
LOG(LOG_BIOS,LOG_NORMAL)("INT 13:04 Verify sector used on %d, with result %d",reg_dl,reg_ah);
break;
case 0x08: /* Get Drive Parameters */
LOG(LOG_BIOS,"INT13:08:Get Drive parameters not supported failing");
LOG(LOG_BIOS,LOG_NORMAL)("INT13:08:Get Drive parameters not supported failing");
reg_ah=0xff;
CALLBACK_SCF(true);
break;
case 0xff:
default:
LOG(LOG_ERROR|LOG_BIOS,"Illegal int 13h call %2X Fail it",reg_ah);
LOG(LOG_BIOS,LOG_ERROR)("Illegal int 13h call %2X Fail it",reg_ah);
reg_ah=0xff;
CALLBACK_SCF(true);
}

View file

@ -322,7 +322,7 @@ static Bitu INT16_Handler(void) {
reg_al=mem_readb(BIOS_KEYBOARD_FLAGS1);
break;
case 0x03: /* SET TYPEMATIC RATE AND DELAY */
LOG(LOG_ERROR|LOG_BIOS,"INT16:Unhandled Typematic Rate Call %2X",reg_al);
LOG(LOG_BIOS,LOG_ERROR)("INT16:Unhandled Typematic Rate Call %2X",reg_al);
break;
case 0x05: /* STORE KEYSTROKE IN KEYBOARD BUFFER */
//TODO make add_key bool :)
@ -335,10 +335,10 @@ static Bitu INT16_Handler(void) {
break;
case 0x55:
/* Weird call used by some dos apps */
LOG(LOG_BIOS,"INT16:55:Word TSR compatible call");
LOG(LOG_BIOS,LOG_NORMAL)("INT16:55:Word TSR compatible call");
break;
default:
LOG(LOG_ERROR|LOG_BIOS,"INT16:Unhandled call %02X",reg_ah);
LOG(LOG_BIOS,LOG_ERROR)("INT16:Unhandled call %02X",reg_ah);
break;
};

View file

@ -67,7 +67,7 @@ public:
device_EMM(){name="EMMXXXX0";}
bool Read(Bit8u * data,Bit16u * size) { return false;}
bool Write(Bit8u * data,Bit16u * size){
LOG(LOG_IOCTL,"EMS:Write to device");
LOG(LOG_IOCTL,LOG_NORMAL)("EMS:Write to device");
return false;
}
bool Seek(Bit32u * pos,Bit32u type){return false;}
@ -367,7 +367,7 @@ static Bit8u EMM_PartialPageMapping(void) {
reg_al=2+reg_bx*(2+sizeof(EMM_Mapping));
break;
default:
LOG(LOG_ERROR|LOG_MISC,"EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
return EMM_FUNC_NOSUP;
}
return EMM_NO_ERROR;
@ -404,7 +404,7 @@ static Bit8u HandleNameSearch(void) {
reg_bx=EMM_MAX_HANDLES;
break;
default:
LOG(LOG_ERROR|LOG_MISC,"EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
return EMM_FUNC_NOSUP;
}
return EMM_NO_ERROR;
@ -422,7 +422,7 @@ static Bit8u GetSetHandleName(void) {
MEM_BlockRead(SegPhys(es)+reg_di,emm_handles[handle].name,8);
break;
default:
LOG(LOG_ERROR|LOG_MISC,"EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
return EMM_FUNC_NOSUP;
}
return EMM_NO_ERROR;
@ -449,7 +449,7 @@ static Bit8u MemoryRegion(void) {
Bit8u buf_src[EMM_PAGE_SIZE];
Bit8u buf_dest[EMM_PAGE_SIZE];
if (reg_al>1) {
LOG(LOG_ERROR|LOG_MISC,"EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
return EMM_FUNC_NOSUP;
}
LoadMoveRegion(SegPhys(ds)+reg_si,region);
@ -610,7 +610,7 @@ static Bitu INT67_Handler(void) {
reg_ah=EMM_NO_ERROR;
break;
default:
LOG(LOG_ERROR|LOG_MISC,"EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
reg_ah=EMM_FUNC_NOSUP;
break;
}
@ -653,7 +653,7 @@ static Bitu INT67_Handler(void) {
break;
case 0x57: /* Memory region */
reg_ah=MemoryRegion();
if (reg_ah) LOG(LOG_ERROR,"EMS:Function 57 move failed");
if (reg_ah) LOG(LOG_MISC,LOG_ERROR)("EMS:Function 57 move failed");
break;
case 0x58: // Get mappable physical array address array
if (reg_al==0x00) {
@ -669,11 +669,11 @@ static Bitu INT67_Handler(void) {
reg_ah = EMM_NO_ERROR;
break;
case 0xDE: /* VCPI Functions */
LOG(LOG_ERROR|LOG_MISC,"EMS:VCPI Call %2X not supported",reg_al);
LOG(LOG_MISC,LOG_ERROR)("EMS:VCPI Call %2X not supported",reg_al);
reg_ah=EMM_FUNC_NOSUP;
break;
default:
LOG(LOG_ERROR|LOG_MISC,"EMS:Call %2X not supported",reg_ah);
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X not supported",reg_ah);
reg_ah=EMM_FUNC_NOSUP;
break;
}

View file

@ -42,7 +42,7 @@ static Bitu INT10_Handler(void) {
break;
case 0x01: /* Set TextMode Cursor Shape */
vga.internal.cursor=reg_cx; // maybe write some memory somewhere
LOG(LOG_INT10,"INT10:01:Set textmode cursor shape partially supported: %X",reg_cx);
LOG(LOG_INT10,LOG_NORMAL)("INT10:01:Set textmode cursor shape partially supported: %X",reg_cx);
break;
case 0x02: /* Set Cursor Pos */
//TODO Check some shit but not really usefull
@ -58,7 +58,7 @@ static Bitu INT10_Handler(void) {
reg_ah=0;
break;
case 0x05: /* Set Active Page */
if (reg_al & 0x80) LOG(LOG_INT10,"Func %x",reg_al);
if (reg_al & 0x80) LOG(LOG_INT10,LOG_NORMAL)("Func %x",reg_al);
else INT10_SetActivePage(reg_al);
break;
case 0x06: /* Scroll Up */
@ -81,7 +81,7 @@ static Bitu INT10_Handler(void) {
break;
case 0x0B: /* Set Background/Border Colour & Set Palette*/
if(!warned_int10_0b) {
LOG(LOG_ERROR|LOG_INT10,"Function 0B Unsupported: Set Background/border colour & Set Pallete");
LOG(LOG_INT10,LOG_ERROR)("Function 0B Unsupported: Set Background/border colour & Set Pallete");
warned_int10_0b=true;
}
break;
@ -135,7 +135,7 @@ static Bitu INT10_Handler(void) {
INT10_GetDACBlock(reg_bx,reg_cx,SegPhys(es)+reg_dx);
break;
default:
LOG(LOG_ERROR|LOG_INT10,"Function 10:Unhandled EGA/VGA Palette Function %2X",reg_al);
LOG(LOG_INT10,LOG_ERROR)("Function 10:Unhandled EGA/VGA Palette Function %2X",reg_al);
}
break;
case 0x11: /* Character generator functions */
@ -180,12 +180,12 @@ static Bitu INT10_Handler(void) {
break;
default:
reg_cx=16;
LOG(LOG_ERROR|LOG_INT10,"Fucntion 11:30 Request for font %2X",reg_bh);
LOG(LOG_INT10,LOG_ERROR)("Fucntion 11:30 Request for font %2X",reg_bh);
}
reg_dl=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS);
break;
default:
LOG(LOG_ERROR|LOG_INT10,"Function 11:Unsupported character generator call %2X",reg_al);
LOG(LOG_INT10,LOG_ERROR)("Function 11:Unsupported character generator call %2X",reg_al);
}
break;
case 0x12: /* alternate function select */
@ -198,7 +198,7 @@ static Bitu INT10_Handler(void) {
break;
}
default:
LOG(LOG_ERROR|LOG_INT10,"Function 12:Call %2X not handled",reg_bl);
LOG(LOG_INT10,LOG_ERROR)("Function 12:Call %2X not handled",reg_bl);
}
break;
case 0x13: /* Write String */
@ -223,15 +223,15 @@ static Bitu INT10_Handler(void) {
reg_al=0x1B;
break;
default:
LOG(LOG_ERROR|LOG_INT10,"Function 1B:Unhandled call BX %2X",reg_bx);
LOG(LOG_INT10,LOG_ERROR)("Function 1B:Unhandled call BX %2X",reg_bx);
}
break;
case 0xff:
if (!warned_ff) LOG(LOG_INT10,"INT10:FF:Weird NC call");
if (!warned_ff) LOG(LOG_INT10,LOG_NORMAL)("INT10:FF:Weird NC call");
warned_ff=true;
break;
default:
LOG(LOG_ERROR|LOG_INT10,"Function %2X not supported",reg_ah);
LOG(LOG_INT10,LOG_ERROR)("Function %2X not supported",reg_ah);
};
return CBRET_NONE;
}

View file

@ -267,7 +267,7 @@ INLINE static void WriteChar(Bit16u col,Bit16u row,Bit8u page,Bit8u chr,Bit8u at
fontdata=&int10_font_16[chr*16];
break;
default:
LOG(LOG_ERROR|LOG_INT10,"Teletype Illegal Font Height");
LOG(LOG_INT10,LOG_ERROR)("Teletype Illegal Font Height");
return;
}
x=8*col;

View file

@ -224,7 +224,7 @@ void INT10_SetVideoMode(Bit8u mode) {
mode&=mode & 127;
line=FindVideoMode(mode);
if (line==0xff) {
LOG(LOG_ERROR|LOG_INT10,"INT10:Trying to set non supported video mode %X",mode);
LOG(LOG_INT10,LOG_ERROR)("INT10:Trying to set non supported video mode %X",mode);
return;
}
@ -279,7 +279,7 @@ void INT10_SetVideoMode(Bit8u mode) {
IO_Read(VGAREG_ACTL_RESET);
//Set the palette
if ((modeset_ctl&0x08)==0x8) LOG(LOG_INT10,"Mode set without palette");
if ((modeset_ctl&0x08)==0x8) LOG(LOG_INT10,LOG_NORMAL)("Mode set without palette");
if((modeset_ctl&0x08)==0) {
// Set the PEL mask
IO_Write(VGAREG_PEL_MASK,vga_modes[line].pelmask);

View file

@ -86,7 +86,7 @@ void INT10_PutPixel(Bit16u x,Bit16u y,Bit8u page,Bit8u color) {
case CTEXT:
case MTEXT:
default:
LOG(LOG_ERROR|LOG_INT10,"PutPixel Unhandled memory model %d",curmode->memmodel);
LOG(LOG_INT10,LOG_ERROR)("PutPixel Unhandled memory model %d",curmode->memmodel);
break;
}
}
@ -135,7 +135,7 @@ void INT10_GetPixel(Bit16u x,Bit16u y,Bit8u page,Bit8u * color) {
case CTEXT:
case MTEXT:
default:
LOG(LOG_ERROR|LOG_INT10,"GetPixel Unhandled memory model %d",curmode->memmodel);
LOG(LOG_INT10,LOG_ERROR)("GetPixel Unhandled memory model %d",curmode->memmodel);
break;
}
}

View file

@ -425,7 +425,7 @@ static void mouse_reset(void)
break;
default:
mouse.max_y=199;
LOG(LOG_MOUSE|LOG_ERROR,"Unhandled videomode %X on reset",mode);
LOG(LOG_MOUSE,LOG_ERROR)("Unhandled videomode %X on reset",mode);
break;
}
mouse.max_x=639;
@ -433,7 +433,7 @@ static void mouse_reset(void)
mouse.min_y=0;
// Dont set max coordinates here. it is done by SetResolution!
mouse.x=0; // civ wont work otherwise
mouse.y=mouse.max_y/2;
mouse.y=static_cast<float>(mouse.max_y/2);
mouse.events=0;
mouse.mickey_x=0;
mouse.mickey_y=0;
@ -517,7 +517,7 @@ static Bitu INT33_Handler(void) {
if (!(max & 1)) max--;
mouse.min_x=min;
mouse.max_x=max;
LOG(LOG_MOUSE,"Define Hortizontal range min:%d max:%d",min,max);
LOG(LOG_MOUSE,LOG_NORMAL)("Define Hortizontal range min:%d max:%d",min,max);
}
break;
case 0x08: /* Define vertical cursor range */
@ -528,7 +528,7 @@ static Bitu INT33_Handler(void) {
if (!(max & 1)) max--;
mouse.min_y=min;
mouse.max_y=max;
LOG(LOG_MOUSE,"Define Vertical range min:%d max:%d",min,max);
LOG(LOG_MOUSE,LOG_NORMAL)("Define Vertical range min:%d max:%d",min,max);
}
break;
case 0x09: /* Define GFX Cursor */
@ -595,7 +595,7 @@ static Bitu INT33_Handler(void) {
reg_cl=0; /* Hmm ps2 irq dunno */
break;
default:
LOG(LOG_ERROR|LOG_MOUSE,"Mouse Function %2X",reg_ax);
LOG(LOG_MOUSE,LOG_ERROR)("Mouse Function %2X",reg_ax);
}
return CBRET_NONE;
}

View file

@ -328,7 +328,7 @@ Bitu XMS_ResizeMemory(Bitu handle, Bitu newSize)
xms_handles[next].active = false;
} else {
// Not enough mem available
LOG(LOG_ERROR,"XMS: Resize failure: out of mem 1");
LOG(LOG_MISC,LOG_ERROR)("XMS: Resize failure: out of mem 1");
return XMS_OUT_OF_SPACE;
};
// Resize and allocate new mem
@ -337,7 +337,7 @@ Bitu XMS_ResizeMemory(Bitu handle, Bitu newSize)
//CheckAllocationArea(xms_handles[handle].phys,xms_handles[handle].size*1024);
} else {
// No more free mem ?
LOG(LOG_ERROR,"XMS: Resize failure: out of mem 2");
LOG(LOG_MISC,LOG_ERROR)("XMS: Resize failure: out of mem 2");
return XMS_OUT_OF_SPACE;
};
};
@ -363,7 +363,7 @@ static bool multiplex_xms(void) {
};
Bitu XMS_Handler(void) {
LOG(LOG_ERROR,"XMS: CALL %02X",reg_ah);
LOG(LOG_MISC,LOG_ERROR)("XMS: CALL %02X",reg_ah);
switch (reg_ah) {
case XMS_GET_VERSION: /* 00 */
@ -439,11 +439,11 @@ Bitu XMS_Handler(void) {
reg_dx=0;
break;
case XMS_DEALLOCATE_UMB: /* 11 */
LOG(LOG_ERROR|LOG_MISC,"XMS:Unhandled call %2X",reg_ah);
LOG(LOG_MISC,LOG_ERROR)("XMS:Unhandled call %2X",reg_ah);
break;
}
LOG(LOG_ERROR,"XMS: CALL Result: %02X",reg_bl);
LOG(LOG_MISC,LOG_ERROR)("XMS: CALL Result: %02X",reg_bl);
return CBRET_NONE;
}