reduce logging a bit
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2924
This commit is contained in:
parent
ade6b1cd59
commit
6403c0e6ed
4 changed files with 49 additions and 11 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_mscdex.cpp,v 1.48 2007-06-27 19:14:59 qbix79 Exp $ */
|
||||
/* $Id: dos_mscdex.cpp,v 1.49 2007-07-19 18:58:39 c2woody Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -877,7 +877,7 @@ static Bit16u MSCDEX_IOCTL_Input(PhysPt buffer,Bit8u drive_unit) {
|
|||
Bit8u addr_mode = mem_readb(buffer+1);
|
||||
if (addr_mode==0) { // HSG
|
||||
Bit32u frames=MSF_TO_FRAMES(pos.min, pos.sec, pos.fr);
|
||||
if (frames<150) LOG_MSG("MSCDEX: Get position: invalid position %d:%d:%d", pos.min, pos.sec, pos.fr);
|
||||
if (frames<150) MSCDEX_LOG("MSCDEX: Get position: invalid position %d:%d:%d", pos.min, pos.sec, pos.fr);
|
||||
else frames-=150;
|
||||
mem_writed(buffer+2,frames);
|
||||
} else if (addr_mode==1) { // Red book
|
||||
|
@ -886,7 +886,7 @@ static Bit16u MSCDEX_IOCTL_Input(PhysPt buffer,Bit8u drive_unit) {
|
|||
mem_writeb(buffer+4,pos.min);
|
||||
mem_writeb(buffer+5,0x00);
|
||||
} else {
|
||||
LOG_MSG("MSCDEX: Get position: invalid address mode %x",addr_mode);
|
||||
MSCDEX_LOG("MSCDEX: Get position: invalid address mode %x",addr_mode);
|
||||
return 0x03; // invalid function
|
||||
}
|
||||
}break;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: memory.cpp,v 1.50 2007-06-14 08:23:46 qbix79 Exp $ */
|
||||
/* $Id: memory.cpp,v 1.51 2007-07-19 18:58:39 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "mem.h"
|
||||
|
@ -63,11 +63,27 @@ public:
|
|||
flags=PFLAG_INIT|PFLAG_NOCODE;
|
||||
}
|
||||
Bitu readb(PhysPt addr) {
|
||||
#if C_DEBUG
|
||||
LOG_MSG("Illegal read from %x, CS:IP %8x:%8x",addr,SegValue(cs),reg_eip);
|
||||
#else
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("Illegal read from %x, CS:IP %8x:%8x",addr,SegValue(cs),reg_eip);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
void writeb(PhysPt addr,Bitu val) {
|
||||
#if C_DEBUG
|
||||
LOG_MSG("Illegal write to %x, CS:IP %8x:%8x",addr,SegValue(cs),reg_eip);
|
||||
#else
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("Illegal write to %x, CS:IP %8x:%8x",addr,SegValue(cs),reg_eip);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: softmodem.cpp,v 1.7 2007-01-13 08:35:49 qbix79 Exp $ */
|
||||
/* $Id: softmodem.cpp,v 1.8 2007-07-19 18:58:39 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
|
||||
|
@ -90,7 +90,13 @@ void CSerialModem::handleUpperEvent(Bit16u type) {
|
|||
if(tqueue->left() < 2) {
|
||||
CSerial::setCTS(false);
|
||||
}
|
||||
} else LOG_MSG("MODEM: TX Buffer overflow!");
|
||||
} else {
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("MODEM: TX Buffer overflow!");
|
||||
}
|
||||
}
|
||||
ByteTransmitted();
|
||||
|
||||
break;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: softmodem.h,v 1.7 2007-01-13 08:35:49 qbix79 Exp $ */
|
||||
/* $Id: softmodem.h,v 1.8 2007-07-19 18:58:39 c2woody Exp $ */
|
||||
|
||||
#ifndef DOSBOX_SERIALMODEM_H
|
||||
#define DOSBOX_SERIALMODEM_H
|
||||
|
@ -73,7 +73,11 @@ public:
|
|||
|
||||
void addb(Bit8u _val) {
|
||||
if(used>=size) {
|
||||
LOG_MSG("FIFO Overflow!");
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("MODEM: FIFO Overflow! (addb)");
|
||||
}
|
||||
return;
|
||||
}
|
||||
//assert(used<size);
|
||||
|
@ -85,7 +89,11 @@ public:
|
|||
}
|
||||
void adds(Bit8u * _str,Bitu _len) {
|
||||
if((used+_len)>size) {
|
||||
LOG_MSG("FIFO Overflow!");
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("MODEM: FIFO Overflow! (adds len %d)",_len);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -100,7 +108,11 @@ public:
|
|||
}
|
||||
Bit8u getb(void) {
|
||||
if (!used) {
|
||||
LOG_MSG("MODEM: FIFO UNDERFLOW!");
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("MODEM: FIFO UNDERFLOW! (getb)");
|
||||
}
|
||||
return data[pos];
|
||||
}
|
||||
Bitu where=pos;
|
||||
|
@ -111,7 +123,11 @@ public:
|
|||
}
|
||||
void gets(Bit8u * _str,Bitu _len) {
|
||||
if (!used) {
|
||||
LOG_MSG("MODEM: FIFO UNDERFLOW!");
|
||||
static Bits lcount=0;
|
||||
if (lcount<1000) {
|
||||
lcount++;
|
||||
LOG_MSG("MODEM: FIFO UNDERFLOW! (gets len %d)",_len);
|
||||
}
|
||||
return;
|
||||
}
|
||||
//assert(used>=_len);
|
||||
|
|
Loading…
Add table
Reference in a new issue