#endif\r
}\r
_DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log\r
+ _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
\r
//screen = modexDefaultPage();\r
engi_stat = ENGI_RUN;\r
// TODO: Could we also provide a build mode to emit debug to the "Bochs E9 hack?"
#ifdef DEBUGSERIAL
+# include <stdarg.h>
+# include <stdlib.h>
+# include <stdio.h>
+
unsigned char _DEBUG_INITed = 0;
struct info_8250 *_DEBUG_uart = NULL;
}
}
}
+
+static char _DEBUGF_TMP[256];
+
+void _DEBUGF(const char *fmt,...) {
+ va_list va;
+
+ va_start(va,fmt);
+ vsnprintf(_DEBUGF_TMP,sizeof(_DEBUGF_TMP),fmt,va);
+ _DEBUG(_DEBUGF_TMP);
+ va_end(va);
+}
#endif
# ifdef DEBUGSERIAL
# include <hw/8250/8250.h>
+void _DEBUGF(const char *fmt,...);
void _DEBUG(const char *msg);
int _DEBUG_INIT();
# else
+static inline void _DEBUGF(const char *fmt,...) {
+ // NOTHING
+}
static inline void _DEBUG(const char *msg) {
// NOTHING
}
#endif
}
_DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log
+ _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);
pan.pn=1;
//player[0].data = &pp;
#endif\r
}\r
_DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log\r
+ _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
\r
/* load our palette */\r
modexLoadPalFile("data/default.pal", &pal2);\r