From bbb7cf45b0098981908aa8e8f21ff964d76c4cc3 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 4 May 2003 19:19:09 +0000 Subject: [PATCH] updated loggingsystem Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@989 --- ChangeLog | 7 ++++ src/dos/cdrom.cpp | 2 +- src/dos/cdrom_aspi_win32.cpp | 14 ++++---- src/dos/dev_con.h | 16 +++++----- src/dos/dos.cpp | 62 ++++++++++++++++++------------------ src/dos/dos_execute.cpp | 4 +-- src/dos/dos_files.cpp | 6 ++-- src/dos/dos_ioctl.cpp | 6 ++-- src/dos/dos_misc.cpp | 2 +- src/dos/dos_mscdex.cpp | 24 +++++++------- src/dos/drive_cache.cpp | 4 +-- src/gui/midi.cpp | 2 +- src/gui/midi_win32.h | 2 +- src/gui/sdlmain.cpp | 2 +- src/hardware/cmos.cpp | 14 ++++---- src/hardware/disney.cpp | 8 ++--- src/hardware/dma.cpp | 8 ++--- src/hardware/gameblaster.cpp | 2 +- src/hardware/iohandler.cpp | 8 ++--- src/hardware/keyboard.cpp | 14 ++++---- src/hardware/memory.cpp | 6 ++-- src/hardware/mpu401.cpp | 4 +-- src/hardware/pic.cpp | 12 +++---- src/hardware/sblaster.cpp | 20 ++++++------ src/hardware/tandy_sound.cpp | 2 +- src/hardware/timer.cpp | 6 ++-- src/hardware/vga.cpp | 12 +++---- src/hardware/vga_attr.cpp | 6 ++-- src/hardware/vga_crtc.cpp | 4 +-- src/hardware/vga_dac.cpp | 6 ++-- src/hardware/vga_gfx.cpp | 8 ++--- src/hardware/vga_memory.cpp | 2 +- src/hardware/vga_misc.cpp | 2 +- src/hardware/vga_seq.cpp | 4 +-- src/ints/bios.cpp | 24 +++++++------- src/ints/bios_disk.cpp | 10 +++--- src/ints/bios_keyboard.cpp | 6 ++-- src/ints/ems.cpp | 18 +++++------ src/ints/int10.cpp | 20 ++++++------ src/ints/int10_char.cpp | 2 +- src/ints/int10_modes.cpp | 4 +-- src/ints/int10_put_pixel.cpp | 4 +-- src/ints/mouse.cpp | 10 +++--- src/ints/xms.cpp | 10 +++--- 44 files changed, 208 insertions(+), 201 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3745cf8b..fcf663af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +0.60 + - added support for the not inheritance flags. + - created functions for creating child psp. + - updated errorcodes of findfirst (thanks Mirek!) + - added basic support for vidmode 0x7 + - rewrote loggingsystem to generate less warnings + 0.58 - fixed date and time issues with fcbs - added more commands to the internal Shell diff --git a/src/dos/cdrom.cpp b/src/dos/cdrom.cpp index 1cb924e7..909ef3ca 100644 --- a/src/dos/cdrom.cpp +++ b/src/dos/cdrom.cpp @@ -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) && (forceCD20 */ @@ -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; }; diff --git a/src/dos/dos_execute.cpp b/src/dos/dos_execute.cpp index e5149fb3..7da7e712 100644 --- a/src/dos/dos_execute.cpp +++ b/src/dos/dos_execute.cpp @@ -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; diff --git a/src/dos/dos_files.cpp b/src/dos/dos_files.cpp index fcb583b0..812aa7f5 100644 --- a/src/dos/dos_files.cpp +++ b/src/dos/dos_files.cpp @@ -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); diff --git a/src/dos/dos_ioctl.cpp b/src/dos/dos_ioctl.cpp index 77ddaba6..313f89a6 100644 --- a/src/dos/dos_ioctl.cpp +++ b/src/dos/dos_ioctl.cpp @@ -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; diff --git a/src/dos/dos_misc.cpp b/src/dos/dos_misc.cpp index e0542159..33b56f1e 100644 --- a/src/dos/dos_misc.cpp +++ b/src/dos/dos_misc.cpp @@ -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; }; diff --git a/src/dos/dos_mscdex.cpp b/src/dos/dos_mscdex.cpp index ecb2ebc8..4ca544b8 100644 --- a/src/dos/dos_mscdex.cpp +++ b/src/dos/dos_mscdex.cpp @@ -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;} diff --git a/src/dos/drive_cache.cpp b/src/dos/drive_cache.cpp index 92f0c00c..16f4f9e0 100644 --- a/src/dos/drive_cache.cpp +++ b/src/dos/drive_cache.cpp @@ -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; iPlaySysex(midi.sysex.buf,midi.sysex.used); - LOG(0,"Sysex message size %d",midi.sysex.used); + LOG(LOG_ALL,LOG_NORMAL)("Sysex message size %d",midi.sysex.used); midi.sysex.active=false; if (data==0xf7) return; } diff --git a/src/gui/midi_win32.h b/src/gui/midi_win32.h index 54d33179..bdac5ded 100644 --- a/src/gui/midi_win32.h +++ b/src/gui/midi_win32.h @@ -47,7 +47,7 @@ public: }; void PlaySysex(Bit8u * sysex,Bitu len) { if (WaitForSingleObject (m_event, 2000) == WAIT_TIMEOUT) { - LOG(LOG_MISC|LOG_ERROR,"Can't send midi message"); + LOG(LOG_MISC,LOG_ERROR)("Can't send midi message"); return; } midiOutUnprepareHeader (m_out, &m_hdr, sizeof (m_hdr)); diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index d191b371..4928e394 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -397,7 +397,7 @@ static void HandleKey(SDL_KeyboardEvent * key) { /* Special Keys */ default: code=KBD_1; - LOG(LOG_ERROR|LOG_KEYBOARD,"Unhandled SDL keysym %d",key->keysym.sym); + LOG(LOG_KEYBOARD,LOG_ERROR)("Unhandled SDL keysym %d",key->keysym.sym); break; } /* Check the modifiers */ diff --git a/src/hardware/cmos.cpp b/src/hardware/cmos.cpp index b28b1494..3f9a4be5 100644 --- a/src/hardware/cmos.cpp +++ b/src/hardware/cmos.cpp @@ -53,7 +53,7 @@ static void cmos_checktimer(void) { if (!cmos.timer.div || !cmos.timer.enabled) return; if (cmos.timer.div<=2) cmos.timer.div+=7; cmos.timer.micro=(Bitu) (10000000.0/(32768.0 / (1 << (cmos.timer.div - 1)))); - LOG(LOG_PIT,"RTC Timer at %f hz",1000000.0/cmos.timer.micro); + LOG(LOG_PIT,LOG_NORMAL)("RTC Timer at %f hz",1000000.0/cmos.timer.micro); PIC_AddEvent(cmos_timerevent,cmos.timer.micro); } @@ -76,13 +76,13 @@ static void cmos_writereg(Bit32u port,Bit8u val) { case 0x01: /* Seconds Alarm */ case 0x03: /* Minutes Alarm */ case 0x05: /* Hours Alarm */ - LOG(LOG_BIOS,"CMOS:Trying to set alarm"); + LOG(LOG_BIOS,LOG_NORMAL)("CMOS:Trying to set alarm"); cmos.regs[cmos.reg]=val; break; case 0x0a: /* Status reg A */ cmos.regs[cmos.reg]=val & 0x7f; - if (val & 0x70!=0x20) LOG(LOG_ERROR|LOG_BIOS,"CMOS Illegal 22 stage divider value"); + if (val & 0x70!=0x20) LOG(LOG_BIOS,LOG_ERROR)("CMOS Illegal 22 stage divider value"); cmos.timer.div=(val & 0xf); cmos_checktimer(); break; @@ -90,7 +90,7 @@ static void cmos_writereg(Bit32u port,Bit8u val) { cmos.bcd=!(val & 0x4); cmos.regs[cmos.reg]=val & 0x7f; cmos.timer.enabled=(val & 0x40)>0; - if (val&0x10) LOG(LOG_ERROR|LOG_BIOS,"CMOS:Updated ended interrupt not supported yet"); + if (val&0x10) LOG(LOG_BIOS,LOG_ERROR)("CMOS:Updated ended interrupt not supported yet"); cmos_checktimer(); break; case 0x0f: /* Shutdown status byte */ @@ -98,7 +98,7 @@ static void cmos_writereg(Bit32u port,Bit8u val) { break; default: cmos.regs[cmos.reg]=val & 0x7f; - LOG(LOG_ERROR|LOG_BIOS,"CMOS:WRite to unhandled register %x",cmos.reg); + LOG(LOG_BIOS,LOG_ERROR)("CMOS:WRite to unhandled register %x",cmos.reg); } } @@ -107,7 +107,7 @@ static void cmos_writereg(Bit32u port,Bit8u val) { static Bit8u cmos_readreg(Bit32u port) { if (cmos.reg>0x3f) { - LOG(LOG_ERROR|LOG_BIOS,"CMOS:Read from illegal register %x",cmos.reg); + LOG(LOG_BIOS,LOG_ERROR)("CMOS:Read from illegal register %x",cmos.reg); return 0xff; } time_t curtime; @@ -151,7 +151,7 @@ static Bit8u cmos_readreg(Bit32u port) { case 0x31: /* Extended memory in KB High Byte */ return cmos.regs[cmos.reg]; default: - LOG(LOG_BIOS,"CMOS:Read from reg %F",cmos.reg); + LOG(LOG_BIOS,LOG_NORMAL)("CMOS:Read from reg %F",cmos.reg); return cmos.regs[cmos.reg]; } } diff --git a/src/hardware/disney.cpp b/src/hardware/disney.cpp index b03fe524..423582db 100644 --- a/src/hardware/disney.cpp +++ b/src/hardware/disney.cpp @@ -47,7 +47,7 @@ static void disney_write(Bit32u port,Bit8u val) { disney.data=val; break; case 1: /* Status Port */ - LOG(LOG_MISC,"DISNEY:Status write %x",val); + LOG(LOG_MISC,LOG_NORMAL)("DISNEY:Status write %x",val); break; case 2: /* Control Port */ // LOG_WARN("DISNEY:Control write %x",val); @@ -56,7 +56,7 @@ static void disney_write(Bit32u port,Bit8u val) { disney.buffer[disney.used++]=disney.data; } } - if (val&0x10) LOG(LOG_ERROR,"DISNEY:Parallel IRQ Enabled"); + if (val&0x10) LOG(LOG_MISC,LOG_ERROR)("DISNEY:Parallel IRQ Enabled"); disney.control=val; break; } @@ -66,7 +66,7 @@ static Bit8u disney_read(Bit32u port) { switch (port-DISNEY_BASE) { case 0: /* Data Port */ -// LOG(LOG_MISC,"DISNEY:Read from data port"); +// LOG(LOG_MISC,LOG_NORMAL)("DISNEY:Read from data port"); return disney.data; break; case 1: /* Status Port */ @@ -75,7 +75,7 @@ static Bit8u disney_read(Bit32u port) { else return 0x0; break; case 2: /* Control Port */ - LOG(LOG_MISC,"DISNEY:Read from control port"); + LOG(LOG_MISC,LOG_NORMAL)("DISNEY:Read from control port"); return disney.control; break; } diff --git a/src/hardware/dma.cpp b/src/hardware/dma.cpp index 13dd2577..80608ac1 100644 --- a/src/hardware/dma.cpp +++ b/src/hardware/dma.cpp @@ -105,7 +105,7 @@ static Bit8u read_dma(Bit32u port) { ret=0x0; break; default: - LOG(LOG_ERROR,"DMA:Unhandled read from %X",port); + LOG(LOG_DMA,LOG_ERROR)("DMA:Unhandled read from %X",port); } return ret; } @@ -140,7 +140,7 @@ static void write_dma(Bit32u port,Bit8u val) { DMA_TestChannel(chan); break; case 0x08: /* Command Register */ - if (val != 4) LOG(LOG_ERROR,"DMA1:Illegal command %2X",val); + if (val != 4) LOG(LOG_DMA,LOG_ERROR)("DMA1:Illegal command %2X",val); cont->command_reg=val; break; case 0x09: /* Request Register */ @@ -165,7 +165,7 @@ static void write_dma(Bit32u port,Bit8u val) { chan->mode.autoinit_enable = (val & 0x10) > 0; chan->mode.transfer_type = (val >> 2) & 0x03; if (chan->mode.address_decrement) { - LOG(LOG_ERROR,"DMA:Address Decrease not supported yet"); + LOG(LOG_DMA,LOG_ERROR)("DMA:Address Decrease not supported yet"); } DMA_TestChannel(chan); break; @@ -173,7 +173,7 @@ static void write_dma(Bit32u port,Bit8u val) { cont->flipflop=true; break; default: - LOG(LOG_ERROR,"DMA:Unhandled write %X to %X",val,port); + LOG(LOG_DMA,LOG_ERROR)("DMA:Unhandled write %X to %X",static_cast(val),port); }; }; diff --git a/src/hardware/gameblaster.cpp b/src/hardware/gameblaster.cpp index 3deb6748..29f6568e 100644 --- a/src/hardware/gameblaster.cpp +++ b/src/hardware/gameblaster.cpp @@ -358,7 +358,7 @@ static void saa1099_write_port_w( int chip, int offset, int data ) break; default: /* Error! */ // logerror("%04x: (SAA1099 #%d) Unknown operation (reg:%02x, data:%02x)\n",activecpu_get_pc(), chip, reg, data); - LOG(0|LOG_ERROR,"CMS Unkown write to reg %x with %x",reg, data); + LOG(LOG_MISC,LOG_ERROR)("CMS Unkown write to reg %x with %x",reg, data); } } diff --git a/src/hardware/iohandler.cpp b/src/hardware/iohandler.cpp index 13138f8b..be6e2d61 100644 --- a/src/hardware/iohandler.cpp +++ b/src/hardware/iohandler.cpp @@ -24,12 +24,12 @@ IO_WriteBlock IO_WriteTable[IO_MAX]; void IO_Write(Bitu num,Bit8u val) { if (num(val),port); IO_RegisterWriteHandler(port,&IO_WriteBlocked,"Blocked Write"); } diff --git a/src/hardware/keyboard.cpp b/src/hardware/keyboard.cpp index d03bedc9..a85de1b2 100644 --- a/src/hardware/keyboard.cpp +++ b/src/hardware/keyboard.cpp @@ -47,7 +47,7 @@ struct KeyCode { }; struct KeyEvent { - Bitu type; + Bits type; Bitu state; KEYBOARD_EventHandler * handler; KeyEvent * next; @@ -180,7 +180,7 @@ static void write_p60(Bit32u port,Bit8u val) { KEYBOARD_AddCode(0xfa,0,0,STATE_NORMAL); /* Acknowledge */ break; default: - LOG(LOG_ERROR|LOG_KEYBOARD,"60:Unhandled command %X",val); + LOG(LOG_KEYBOARD,LOG_ERROR)("60:Unhandled command %X",val); } return; case CMD_SETOUTPORT: @@ -218,13 +218,13 @@ static void write_p64(Bit32u port,Bit8u val) { keyb.scheduled=true; PIC_AddEvent(KEYBOARD_GetCode,KEYDELAY); } - LOG(LOG_KEYBOARD,"Activated"); + LOG(LOG_KEYBOARD,LOG_NORMAL)("Activated"); break; case 0xae: /* Deactivate keyboard */ keyb.active=false; PIC_DeActivateIRQ(1); PIC_RemoveEvents(KEYBOARD_GetCode); - LOG(LOG_KEYBOARD,"De-Activated"); + LOG(LOG_KEYBOARD,LOG_NORMAL)("De-Activated"); break; case 0xd0: /* Outport on buffer */ KEYBOARD_AddCode(MEM_A20_Enabled() ? 0x02 : 0,0,0,STATE_NORMAL); @@ -233,7 +233,7 @@ static void write_p64(Bit32u port,Bit8u val) { keyb.command=CMD_SETOUTPORT; break; default: - LOG(LOG_ERROR|LOG_KEYBOARD,"Port 64 write with val %d",val); + LOG(LOG_KEYBOARD,LOG_ERROR)("Port 64 write with val %d",val); break; } } @@ -246,7 +246,7 @@ void KEYBOARD_AddEvent(Bitu keytype,Bitu state,KEYBOARD_EventHandler * handler) KeyEvent * newevent=new KeyEvent; /* Add the event in the correct key structure */ if (keytype>=KBD_LAST) { - LOG(LOG_ERROR|LOG_KEYBOARD,"Illegal key %d for handler",keytype); + LOG(LOG_KEYBOARD,LOG_ERROR)("Illegal key %d for handler",keytype); } newevent->next=event_handlers[keytype]; event_handlers[keytype]=newevent; @@ -372,7 +372,7 @@ void KEYBOARD_AddKey(KBD_KEYS keytype,Bitu unicode,Bitu mod,bool pressed) { case KBD_insert:extend=true;ret=82;break; case KBD_delete:extend=true;ret=83;break; default: - E_Exit("Unsopperted key press"); + E_Exit("Unsupported key press"); break; } /* check for active key events */ diff --git a/src/hardware/memory.cpp b/src/hardware/memory.cpp index 075b388a..4fa22ce5 100644 --- a/src/hardware/memory.cpp +++ b/src/hardware/memory.cpp @@ -93,11 +93,11 @@ void MEM_StrCopy(PhysPt off,char * data,Bitu size) { } static Bit8u Illegal_ReadHandler(PhysPt pt) { - LOG(LOG_ERROR,"MEM:Illegal read from address %4X",pt); + LOG(LOG_ALL,LOG_ERROR)("MEM:Illegal read from address %4X",pt); return 0xff; } static void Illegal_WriteHandler(PhysPt pt,Bit8u val) { - LOG(LOG_ERROR,"Illegal write val %2X to address %4X",val,pt); + LOG(LOG_ALL,LOG_ERROR)("Illegal write val %2X to address %4X",static_cast(val),pt); } /* Could only be called when the pt host entry is 0 ah well :) */ @@ -243,7 +243,7 @@ void MEM_A20_Enable(bool enable) { } else { MEM_SetupMapping(PAGE_COUNT(1024*1024),PAGE_COUNT(64*1024),memory); } - LOG(LOG_MISC,"A20 Line is %s",enable ? "Enabled" : "Disabled"); + LOG(LOG_MISC,LOG_NORMAL)("A20 Line is %s",enable ? "Enabled" : "Disabled"); } Bitu MEM_TotalSize(void) { diff --git a/src/hardware/mpu401.cpp b/src/hardware/mpu401.cpp index ff9e9bb1..d68e0a35 100644 --- a/src/hardware/mpu401.cpp +++ b/src/hardware/mpu401.cpp @@ -158,7 +158,7 @@ static void QueueByte(Bit8u data) { if (pos>=MPU_QUEUE) pos-=MPU_QUEUE; mpu.queue_used++; mpu.queue[pos]=data; - } else LOG(LOG_MISC,"MPU401:Data queue full"); + } else LOG(LOG_MISC,LOG_NORMAL)("MPU401:Data queue full"); } static void ClrQueue(void) { @@ -184,7 +184,7 @@ static void MPU401_WriteCommand(Bit32u port,Bit8u val) { break; default: - LOG(LOG_MISC,"MPU401:Unhandled command %X",val); + LOG(LOG_MISC,LOG_NORMAL)("MPU401:Unhandled command %X",val); QueueByte(MSG_CMD_ACK); break; } diff --git a/src/hardware/pic.cpp b/src/hardware/pic.cpp index f23f8fd4..f4fe8730 100644 --- a/src/hardware/pic.cpp +++ b/src/hardware/pic.cpp @@ -126,14 +126,14 @@ static void write_data(Bit32u port,Bit8u val) { }; break; case 1: /* icw2 */ - LOG(LOG_PIC,"%d:Base vector %X",port==0x21 ? 0 : 1,val); + LOG(LOG_PIC,LOG_NORMAL)("%d:Base vector %X",static_cast(port==0x21 ? 0 : 1),static_cast(val)); for (i=0;i<=7;i++) { irqs[i+irq_base].vector=(val&0xf8)+i; }; if(pic->icw_index++ >= pic->icw_words) pic->icw_index=0; break; case 2: /* icw 3 */ - LOG(LOG_PIC,"%d:ICW 3 %X",port==0x21 ? 0 : 1,val); + LOG(LOG_PIC,LOG_NORMAL)("%d:ICW 3 %X",static_cast(port==0x21 ? 0 : 1),static_cast(val)); if(pic->icw_index++ >= pic->icw_words) pic->icw_index=0; break; case 3: /* icw 4 */ @@ -147,11 +147,11 @@ static void write_data(Bit32u port,Bit8u val) { */ pic->auto_eoi=(val & 0x2)>0; - LOG(LOG_PIC,"%d:ICW 4 %X",port==0x21 ? 0 : 1,val); + LOG(LOG_PIC,LOG_NORMAL)("%d:ICW 4 %X",static_cast(port==0x21 ? 0 : 1),static_cast(val)); if(pic->icw_index++ >= pic->icw_words) pic->icw_index=0; break; default: /* icw 3, and 4*/ - LOG(LOG_PIC,"ICW HUH? %X",val); + LOG(LOG_PIC,LOG_NORMAL)("ICW HUH? %X",val); } } @@ -269,7 +269,7 @@ static void AddEntry(PICEntry * entry) { void PIC_AddEvent(PIC_EventHandler handler,Bitu delay) { if (!pic.free_entry) { - LOG(LOG_ERROR|LOG_PIC,"Event queue full"); + LOG(LOG_PIC,LOG_ERROR)("Event queue full"); return; } PICEntry * entry=pic.free_entry; @@ -284,7 +284,7 @@ void PIC_AddEvent(PIC_EventHandler handler,Bitu delay) { void PIC_AddIRQ(Bitu irq,Bitu delay) { if (irq>15) E_Exit("PIC:Illegal IRQ"); if (!pic.free_entry) { - LOG(LOG_ERROR|LOG_PIC,"Event queue full"); + LOG(LOG_PIC,LOG_ERROR)("Event queue full"); return; } PICEntry * entry=pic.free_entry; diff --git a/src/hardware/sblaster.cpp b/src/hardware/sblaster.cpp index f5af8d9a..864e52c0 100644 --- a/src/hardware/sblaster.cpp +++ b/src/hardware/sblaster.cpp @@ -344,7 +344,7 @@ static void GenerateSound(Bitu size) { } } if (sb.out.pos>SB_BUF_SIZE) { - LOG(LOG_ERROR|LOG_SB,"Generation Buffer Full!!!!"); + LOG(LOG_SB,LOG_ERROR)("Generation Buffer Full!!!!"); sb.out.pos=0; } } @@ -408,7 +408,7 @@ static void DSP_StartDMATranfser(DMA_MODES mode) { sb.tmp.add_index=(sb.dma.rate<<16)/sb.hw.rate; break; default: - LOG(LOG_ERROR|LOG_SB,"DSP:Illegal transfer mode %d",mode); + LOG(LOG_SB,LOG_ERROR)("DSP:Illegal transfer mode %d",mode); return; } //TODO Use the 16-bit dma for 16-bit transfers @@ -416,7 +416,7 @@ static void DSP_StartDMATranfser(DMA_MODES mode) { sb.dma.mode=mode; DMA_SetEnableCallBack(sb.hw.dma8,DMA_Enable); //TODO with stereo divide add_index - LOG(LOG_SB,"DMA Transfer:%s rate %d size %d",type,sb.dma.rate,sb.dma.total); + LOG(LOG_SB,LOG_NORMAL)("DMA Transfer:%s rate %d size %d",type,sb.dma.rate,sb.dma.total); } static void DSP_AddData(Bit8u val) { @@ -426,7 +426,7 @@ static void DSP_AddData(Bit8u val) { sb.dsp.out.data[start]=val; sb.dsp.out.used++; } else { - LOG(LOG_ERROR|LOG_SB,"DSP:Data Output buffer full"); + LOG(LOG_SB,LOG_ERROR)("DSP:Data Output buffer full"); } } @@ -538,7 +538,7 @@ static void DSP_DoCommand(void) { break; case 0xe2: /* Weird DMA identification write routine */ { - LOG(LOG_SB,"DSP Function 0xe2"); + LOG(LOG_SB,LOG_NORMAL)("DSP Function 0xe2"); for (Bitu i = 0; i < 8; i++) if ((sb.dsp.in.data[0] >> i) & 0x01) sb.e2.value += E2_incr_table[sb.e2.count % 4][i]; sb.e2.value += E2_incr_table[sb.e2.count % 4][8]; @@ -567,7 +567,7 @@ static void DSP_DoCommand(void) { PIC_AddIRQ(sb.hw.irq,0); break; default: - LOG(LOG_ERROR|LOG_SB,"DSP:Unhandled command %2X",sb.dsp.cmd); + LOG(LOG_SB,LOG_ERROR)("DSP:Unhandled command %2X",sb.dsp.cmd); break; } sb.dsp.cmd=DSP_NO_COMMAND; @@ -610,7 +610,7 @@ static void MIXER_Write(Bit8u val) { sb.mixer.master=val; break; default: - LOG(LOG_ERROR|LOG_SB,"MIXER:Write to unhandled index %X",sb.mixer.index); + LOG(LOG_SB,LOG_ERROR)("MIXER:Write to unhandled index %X",sb.mixer.index); } } @@ -623,7 +623,7 @@ static Bit8u MIXER_Read(void) { ret=sb.mixer.master; break; default: - LOG(LOG_ERROR|LOG_SB,"MIXER:Read from unhandled index %X",sb.mixer.index); + LOG(LOG_SB,LOG_ERROR)("MIXER:Read from unhandled index %X",sb.mixer.index); ret=0xff; } return ret; @@ -659,7 +659,7 @@ static Bit8u read_sb(Bit32u port) { case DSP_RESET: return 0xff; default: - LOG(LOG_SB,"Unhandled read from SB Port %4X",port); + LOG(LOG_SB,LOG_NORMAL)("Unhandled read from SB Port %4X",port); break; } return 0xff; @@ -688,7 +688,7 @@ static void write_sb(Bit32u port,Bit8u val) { break; default: - LOG(LOG_SB,"Unhandled write to SB Port %4X",port); + LOG(LOG_SB,LOG_NORMAL)("Unhandled write to SB Port %4X",port); break; } } diff --git a/src/hardware/tandy_sound.cpp b/src/hardware/tandy_sound.cpp index c71c1dbd..927a6990 100644 --- a/src/hardware/tandy_sound.cpp +++ b/src/hardware/tandy_sound.cpp @@ -99,7 +99,7 @@ static void write_pc0(Bit32u port,Bit8u val) { // tandy.chan[tandy.reg>>1].freq_pos=0; break; default: - LOG(0,"TANDY:Illegal dual byte reg %d",tandy.reg); + LOG(LOG_ALL,LOG_ERROR)("TANDY:Illegal dual byte reg %d",tandy.reg); }; } diff --git a/src/hardware/timer.cpp b/src/hardware/timer.cpp index d0f0e6c0..c9fa47c4 100644 --- a/src/hardware/timer.cpp +++ b/src/hardware/timer.cpp @@ -84,7 +84,7 @@ static void counter_latch(Bitu counter) { else p->read_latch=(Bit16u)(p->cntr-(((double)micro/(double)p->micro)*(double)p->cntr)); break; default: - LOG(LOG_ERROR|LOG_PIT,"Illegal Mode %d for reading counter %d",p->mode,counter); + LOG(LOG_PIT,LOG_ERROR)("Illegal Mode %d for reading counter %d",p->mode,counter); micro%=p->micro; p->read_latch=(Bit16u)(p->cntr-(((double)micro/(double)p->micro)*(double)p->cntr)); break; @@ -120,14 +120,14 @@ static void write_latch(Bit32u port,Bit8u val) { case 0x00: /* Timer hooked to IRQ 0 */ PIC_RemoveEvents(PIT0_Event); PIC_AddEvent(PIT0_Event,p->micro); - LOG(LOG_PIT,"PIT 0 Timer at %.3g Hz mode %d",PIT_TICK_RATE/(double)p->cntr,p->mode); + LOG(LOG_PIT,LOG_NORMAL)("PIT 0 Timer at %.3g Hz mode %d",PIT_TICK_RATE/(double)p->cntr,(Bit32u)p->mode); break; case 0x02: /* Timer hooked to PC-Speaker */ // LOG(LOG_PIT,"PIT 2 Timer at %.3g Hz mode %d",PIT_TICK_RATE/(double)p->cntr,p->mode); PCSPEAKER_SetCounter(p->cntr,p->mode); break; default: - LOG(LOG_ERROR|LOG_PIT,"PIT:Illegal timer selected for writing"); + LOG(LOG_PIT,LOG_ERROR)("PIT:Illegal timer selected for writing"); } } } diff --git a/src/hardware/vga.cpp b/src/hardware/vga.cpp index f07c5aae..bf94677b 100644 --- a/src/hardware/vga.cpp +++ b/src/hardware/vga.cpp @@ -56,7 +56,7 @@ static void VGA_DrawHandler(RENDER_Part_Handler part_handler) { Bitu stop=vga.config.line_compare; if (vga.draw.double_height) stop/=2; if (stop>=vga.draw.height){ - LOG(LOG_VGAGFX,"Split at %d",stop); + LOG(LOG_VGAGFX,LOG_NORMAL)("Split at %d",stop); goto drawnormal; } switch (vga.mode) { @@ -73,7 +73,7 @@ static void VGA_DrawHandler(RENDER_Part_Handler part_handler) { bufsplit=memory+0xa0000; break; default: - LOG(LOG_VGAGFX,"VGA:Unhandled split screen mode %d",vga.mode); + LOG(LOG_VGAGFX,LOG_NORMAL)("VGA:Unhandled split screen mode %d",vga.mode); goto norender; } part_handler(buf,0,0,vga.draw.width,stop); @@ -161,8 +161,8 @@ static void VGA_DoResize(void) { /* Check for pixel doubling, master clock/2 */ if (vga.seq.clocking_mode & 0x8) clock/=2; - LOG(LOG_VGA,"H total %d, V Total %d",htotal,vtotal); - LOG(LOG_VGA,"H D End %d, V D End %d",hdispend,vdispend); + LOG(LOG_VGA,LOG_NORMAL)("H total %d, V Total %d",htotal,vtotal); + LOG(LOG_VGA,LOG_NORMAL)("H D End %d, V D End %d",hdispend,vdispend); fps=clock/(vtotal*htotal); vga.draw.resizing=false; @@ -221,8 +221,8 @@ static void VGA_DoResize(void) { vga.draw.height=height; vga.draw.pitch=pitch; - LOG(LOG_VGA,"Width %d, Height %d",width,height); - LOG(LOG_VGA,"Flags %X, fps %f",flags,fps); + LOG(LOG_VGA,LOG_NORMAL)("Width %d, Height %d",width,height); + LOG(LOG_VGA,LOG_NORMAL)("Flags %X, fps %f",flags,fps); RENDER_SetSize(width,height,8,pitch,((float)width/(float)height),flags,&VGA_DrawHandler); vga.draw.blank=(Bitu)(1000000/fps); PIC_AddEvent(VGA_BlankTimer,vga.draw.blank); diff --git a/src/hardware/vga_attr.cpp b/src/hardware/vga_attr.cpp index 8c5d06a7..c105d3e1 100644 --- a/src/hardware/vga_attr.cpp +++ b/src/hardware/vga_attr.cpp @@ -122,10 +122,10 @@ void write_p3c0(Bit32u port,Bit8u val) { except in 256 color mode. Note: this register does not affect 256 color modes. */ - if (val) LOG(LOG_VGAGFX,"VGA:ATTR:DAC index set to %d",val); + if (val) LOG(LOG_VGAGFX,LOG_NORMAL)("VGA:ATTR:DAC index set to %d",val); break; default: - LOG(LOG_VGAMISC,"VGA:ATTR:Write to unkown Index %2X",attr(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:Write to unkown Index %2X",attr(index)); break; } } @@ -151,7 +151,7 @@ Bit8u read_p3c1(Bit32u port) { case 0x14: /* Color Select Register */ return attr(color_select); default: - LOG(LOG_VGAMISC,"VGA:ATTR:Read from unkown Index %2X",attr(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:Read from unkown Index %2X",attr(index)); } return 0; }; diff --git a/src/hardware/vga_crtc.cpp b/src/hardware/vga_crtc.cpp index 56b558b7..e2c40f0a 100644 --- a/src/hardware/vga_crtc.cpp +++ b/src/hardware/vga_crtc.cpp @@ -274,7 +274,7 @@ void write_p3d5(Bit32u port,Bit8u val) { break; default: - LOG(LOG_VGAMISC,"VGA:CRTC:Write to unknown index %2X",val,crtc(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:Write to unknown index %2X",val,crtc(index)); } } @@ -331,7 +331,7 @@ Bit8u read_p3d5(Bit32u port) { case 0x18: /* Line Compare Register */ return crtc(line_compare); default: - LOG(LOG_VGAMISC,"VGA:CRTC:Read from unknown index %X",crtc(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:Read from unknown index %X",crtc(index)); } return 0; } diff --git a/src/hardware/vga_dac.cpp b/src/hardware/vga_dac.cpp index f03db347..f9c7051c 100644 --- a/src/hardware/vga_dac.cpp +++ b/src/hardware/vga_dac.cpp @@ -54,7 +54,7 @@ enum {DAC_READ,DAC_WRITE}; static void write_p3c6(Bit32u port,Bit8u val) { - if (val!=0xff) LOG(LOG_VGAGFX,"VGA:Pel Mask not 0xff"); + if (val!=0xff) LOG(LOG_VGAGFX,LOG_NORMAL)("VGA:Pel Mask not 0xff"); vga.dac.pel_mask=val; } @@ -112,7 +112,7 @@ static void write_p3c9(Bit32u port,Bit8u val) { vga.dac.pel_index=0; break; default: - LOG(LOG_VGAGFX,"VGA:DAC:Illegal Pel Index"); //If this can actually happen that will be the day + LOG(LOG_VGAGFX,LOG_NORMAL)("VGA:DAC:Illegal Pel Index"); //If this can actually happen that will be the day }; } @@ -133,7 +133,7 @@ static Bit8u read_p3c9(Bit32u port) { vga.dac.pel_index=0; break; default: - LOG(LOG_VGAMISC,"VGA:DAC:Illegal Pel Index"); //If this can actually happen that will be the day + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:DAC:Illegal Pel Index"); //If this can actually happen that will be the day } return ret; } diff --git a/src/hardware/vga_gfx.cpp b/src/hardware/vga_gfx.cpp index 89fdf02d..cc363bb0 100644 --- a/src/hardware/vga_gfx.cpp +++ b/src/hardware/vga_gfx.cpp @@ -70,7 +70,7 @@ void write_p3cf(Bit32u port,Bit8u val) { case 3: /* Data Rotate */ gfx(data_rotate)=val; vga.config.data_rotate=val & 7; - if (vga.config.data_rotate) LOG(LOG_VGAGFX,"VGA:Data Rotate used %d",val &7); + if (vga.config.data_rotate) LOG(LOG_VGAGFX,LOG_NORMAL)("VGA:Data Rotate used %d",val &7); vga.config.raster_op=(val>>3) & 3; /* 0-2 Number of positions to rotate data right before it is written to @@ -171,12 +171,12 @@ void write_p3cf(Bit32u port,Bit8u val) { case 9: /* Unknown */ /* Crystal Dreams seems to like to write tothis register very weird */ if (!index9warned) { - LOG(LOG_VGAMISC,"VGA:3CF:Write %2X to illegal index 9",val); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:3CF:Write %2X to illegal index 9",val); index9warned=true; } break; default: - LOG(LOG_VGAMISC,"VGA:3CF:Write %2X to illegal index %2X",val,gfx(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:3CF:Write %2X to illegal index %2X",val,gfx(index)); break; } } @@ -202,7 +202,7 @@ switch (gfx(index)) { case 8: /* Bit Mask Register */ return gfx(bit_mask); default: - LOG(LOG_VGAMISC,"Reading from illegal index %2X in port %4X",gfx(index),port); + LOG(LOG_VGAMISC,LOG_NORMAL)("Reading from illegal index %2X in port %4X",static_cast(gfx(index)),port); } return 0; /* Compiler happy */ } diff --git a/src/hardware/vga_memory.cpp b/src/hardware/vga_memory.cpp index 693d4a36..81d2ee05 100644 --- a/src/hardware/vga_memory.cpp +++ b/src/hardware/vga_memory.cpp @@ -86,7 +86,7 @@ INLINE static Bit32u ModeOperation(Bit8u val) { full=RasterOp(vga.config.full_set_reset,ExpandTable[val] & vga.config.full_bit_mask); break; default: - LOG(LOG_VGAMISC,"VGA:Unsupported write mode %d",vga.config.write_mode); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:Unsupported write mode %d",vga.config.write_mode); } return full; } diff --git a/src/hardware/vga_misc.cpp b/src/hardware/vga_misc.cpp index 1f4fcf40..82d5d984 100644 --- a/src/hardware/vga_misc.cpp +++ b/src/hardware/vga_misc.cpp @@ -48,7 +48,7 @@ static Bit8u read_p3da(Bit32u port) { static void write_p3d8(Bit32u port,Bit8u val) { - LOG(LOG_VGAMISC,"Write %2X to 3da",val); + LOG(LOG_VGAMISC,LOG_NORMAL)("Write %2X to 3da",val); /* 3 Vertical Sync Select. If set Vertical Sync to the monitor is the logical OR of the vertical sync and the vertical display enable. diff --git a/src/hardware/vga_seq.cpp b/src/hardware/vga_seq.cpp index 2fdaa178..c4b6f198 100644 --- a/src/hardware/vga_seq.cpp +++ b/src/hardware/vga_seq.cpp @@ -91,7 +91,7 @@ void write_p3c5(Bit32u port,Bit8u val) { VGA_FindSettings(); break; default: - LOG(LOG_VGAMISC,"VGA:SEQ:Write to illegal index %2X",seq(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:Write to illegal index %2X",seq(index)); }; }; @@ -113,7 +113,7 @@ Bit8u read_p3c5(Bit32u port) { case 4: /* Memory Mode */ return seq(memory_mode); default: - LOG(LOG_VGAMISC,"VGA:SEQ:Read from illegal index %2X",seq(index)); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:Read from illegal index %2X",seq(index)); }; return 0; }; diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index 8961bdf5..4af725f1 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -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; } diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 298ad39f..afbe92c6 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -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); } diff --git a/src/ints/bios_keyboard.cpp b/src/ints/bios_keyboard.cpp index f84a9b5e..80de0814 100644 --- a/src/ints/bios_keyboard.cpp +++ b/src/ints/bios_keyboard.cpp @@ -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; }; diff --git a/src/ints/ems.cpp b/src/ints/ems.cpp index cb6621b3..52b8a6a3 100644 --- a/src/ints/ems.cpp +++ b/src/ints/ems.cpp @@ -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; } diff --git a/src/ints/int10.cpp b/src/ints/int10.cpp index 571af946..0554cf69 100644 --- a/src/ints/int10.cpp +++ b/src/ints/int10.cpp @@ -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; } diff --git a/src/ints/int10_char.cpp b/src/ints/int10_char.cpp index d2406086..e30dbc7d 100644 --- a/src/ints/int10_char.cpp +++ b/src/ints/int10_char.cpp @@ -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; diff --git a/src/ints/int10_modes.cpp b/src/ints/int10_modes.cpp index a7cfc021..36f0bc87 100644 --- a/src/ints/int10_modes.cpp +++ b/src/ints/int10_modes.cpp @@ -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); diff --git a/src/ints/int10_put_pixel.cpp b/src/ints/int10_put_pixel.cpp index 934b7279..22e40ac2 100644 --- a/src/ints/int10_put_pixel.cpp +++ b/src/ints/int10_put_pixel.cpp @@ -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; } } diff --git a/src/ints/mouse.cpp b/src/ints/mouse.cpp index 949dc7f9..1788e353 100644 --- a/src/ints/mouse.cpp +++ b/src/ints/mouse.cpp @@ -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(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; } diff --git a/src/ints/xms.cpp b/src/ints/xms.cpp index be417848..6db3f299 100644 --- a/src/ints/xms.cpp +++ b/src/ints/xms.cpp @@ -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; }