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

@ -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;
}
}