Change to logging - when logging is disabled, the logging functions are now #define'd to nothing, so the compiler ignores the lines that call them completely, seems to slightly speed up the emulator; note that the logging in vid_table.c has not been changed yet, because this file on my local tree currently contains other WIP changes.
This commit is contained in:
@@ -16,13 +16,11 @@
|
||||
|
||||
#ifdef ENABLE_ADLIB_LOG
|
||||
int adlib_do_log = ENABLE_ADLIB_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
adlib_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_ADLIB_LOG
|
||||
va_list ap;
|
||||
|
||||
if (adlib_do_log) {
|
||||
@@ -30,8 +28,10 @@ adlib_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define adlib_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct adlib_t
|
||||
|
||||
@@ -138,13 +138,11 @@ static void update_legacy(es1371_t *es1371);
|
||||
|
||||
#ifdef ENABLE_AUDIOPCI_LOG
|
||||
int audiopci_do_log = ENABLE_AUDIOPCI_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
audiopci_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_AUDIOPCI_LOG
|
||||
va_list ap;
|
||||
|
||||
if (audiopci_do_log) {
|
||||
@@ -152,8 +150,10 @@ audiopci_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define audiopci_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
static void es1371_update_irqs(es1371_t *es1371)
|
||||
|
||||
@@ -295,13 +295,11 @@ uint32_t rep_count_w = 0;
|
||||
|
||||
#ifdef ENABLE_EMU8K_LOG
|
||||
int emu8k_do_log = ENABLE_EMU8K_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
emu8k_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_EMU8K_LOG
|
||||
va_list ap;
|
||||
|
||||
if (emu8k_do_log) {
|
||||
@@ -309,8 +307,10 @@ emu8k_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define emu8k_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
static inline int16_t EMU8K_READ(emu8k_t *emu8k, uint32_t addr)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Roland MPU-401 emulation.
|
||||
*
|
||||
* Version: @(#)snd_mpu401.c 1.0.17 2018/09/15
|
||||
* Version: @(#)snd_mpu401.c 1.0.18 2018/10/18
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* DOSBox Team,
|
||||
@@ -58,13 +58,11 @@ static void MPU401_EOIHandlerDispatch(void *p);
|
||||
|
||||
#ifdef ENABLE_MPU401_LOG
|
||||
int mpu401_do_log = ENABLE_MPU401_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
mpu401_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_MPU401_LOG
|
||||
va_list ap;
|
||||
|
||||
if (mpu401_do_log) {
|
||||
@@ -72,8 +70,10 @@ mpu401_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define mpu401_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
|
||||
@@ -181,13 +181,11 @@ enum
|
||||
|
||||
#ifdef ENABLE_PAS16_LOG
|
||||
int pas16_do_log = ENABLE_PAS16_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
pas16_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_PAS16_LOG
|
||||
va_list ap;
|
||||
|
||||
if (pas16_do_log) {
|
||||
@@ -195,8 +193,10 @@ pas16_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define pas16_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
static uint8_t pas16_in(uint16_t port, void *p)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Sound Blaster emulation.
|
||||
*
|
||||
* Version: @(#)sound_sb.c 1.0.13 2018/09/11
|
||||
* Version: @(#)sound_sb.c 1.0.14 2018/10/18
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -173,13 +173,11 @@ const int32_t sb_att_7dbstep_2bits[]=
|
||||
|
||||
#ifdef ENABLE_SB_LOG
|
||||
int sb_do_log = ENABLE_SB_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
sb_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_SB_LOG
|
||||
va_list ap;
|
||||
|
||||
if (sb_do_log) {
|
||||
@@ -187,8 +185,10 @@ sb_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define sb_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
/* sb 1, 1.5, 2, 2 mvc do not have a mixer, so signal is hardwired */
|
||||
|
||||
@@ -113,13 +113,11 @@ float low_fir_sb16_coef[SB16_NCoef];
|
||||
|
||||
#ifdef ENABLE_SB_DSP_LOG
|
||||
int sb_dsp_do_log = ENABLE_SB_DSP_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
sb_dsp_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_SB_DSP_LOG
|
||||
va_list ap;
|
||||
|
||||
if (sb_dsp_do_log) {
|
||||
@@ -127,8 +125,10 @@ sb_dsp_log(const char *fmt, ...)
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define sb_dsp_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
static inline double sinc(double x)
|
||||
|
||||
Reference in New Issue
Block a user