#include <video_defines.h>
#include <minilib.h>
#include <stdarg.h>
+#include <output.h>
static char logents[4][41] = {{0}};
smram_state_t old_state = smram_save_state();
smram_aseg_set_state(SMRAM_ASEG_SMMCODE);
-
+
while (*src)
{
*(destp++) = *(src++);
strblit(logents[y], y, 40);
}
-void dolog(char *s)
+void dolog(const char *s)
{
memmove(logents[0], logents[1], sizeof(logents[0])*3);
strcpy(logents[3], s);
}
+void (*output)(const char *s) = dolog;
-void dologf(char *fmt, ...)
+void dologf(const char *fmt, ...)
{
va_list va;
vsnprintf(logents[3], 40, fmt, va);
va_end(va);
}
+void (*outputf)(const char *s, ...) = dologf;
+
+void dump_log (char * target) {
+ memcpy(target, logents, sizeof(logents));
+}