-#if defined(__GP2X__)
- #include <stdio.h>
- #define lprintf printf
-#elif defined(PSP)
- extern void lprintf(const char *fmt, ...);
-#else
- #include "giz.h"
-#endif
+extern void lprintf(const char *fmt, ...);
DEFINC = -I../.. -I. -DARM -D__GP2X__ # -DBENCHMARK\r
COPT_COMMON = -static -Wall -Winline\r
ifeq ($(DEBUG),)\r
-COPT_COMMON += -O2 -ftracer -fstrength-reduce -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
+COPT_COMMON += -O3 -ftracer -fstrength-reduce -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
else\r
COPT_COMMON += -ggdb\r
endif\r
\r
extern int crashed_940;\r
\r
-static short sndBuffer[2*44100/50];\r
+static short __attribute__((aligned(4))) sndBuffer[2*44100/50];\r
static struct timeval noticeMsgTime = { 0, 0 }; // when started showing\r
static int osd_fps_x;\r
static int combo_keys = 0, combo_acts = 0; // keys and actions which need button combos\r
\r
#include <stdio.h>\r
#include <stdlib.h>\r
+#include <stdarg.h>\r
#include <string.h>\r
#include <unistd.h>\r
#include <sys/mman.h>\r
}\r
}\r
\r
+/* lprintf */\r
+void lprintf(const char *fmt, ...)\r
+{\r
+ va_list vl;\r
+\r
+ va_start(vl, fmt);\r
+ vprintf(fmt, vl);\r
+ va_end(vl);\r
+}\r
\r
\r
smalltext_out16(1, 3*10, "Processing CD image / MP3s", 0xffff);\r
smalltext_out16_lim(1, 4*10, romFileName, 0xffff, 80);\r
- dst += 30;\r
+ dst += 320*30;\r
\r
if (len > 320) len = 320;\r
for (ln = 8; ln > 0; ln--, dst += 320)\r
memset(dst, 0xff, len*2);\r
+ menu_flip();\r
cdload_called = 1;\r
}\r
\r
\r
void menu_romload_end(void)\r
{\r
- PicoCartLoadProgressCB = NULL;\r
+ PicoCartLoadProgressCB = PicoCDLoadProgressCB = NULL;\r
smalltext_out16(1, cdload_called ? 60 : 30, "Starting emulation...", 0xffff);\r
menu_flip();\r
}\r
#define CAN_HANDLE_240_LINES 1\r
\r
// logging emu events\r
-#define EL_LOGMASK 0 // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO) // xffff\r
+#define EL_LOGMASK EL_STATUS // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL) // xffff\r
\r
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)\r
#define dprintf(x...)\r
usleep(c/200);
}
+/* lprintf */
+void lprintf(const char *fmt, ...)
+{
+ va_list vl;
+ va_start(vl, fmt);
+ vprintf(fmt, vl);
+ va_end(vl);
+}