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: 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
Add a link
Reference in a new issue