X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=loader%2Femu.c;h=c0b52dba996a2325940794202b628cd2347d3ac9;hp=3a2bd651814d4bc6f9fef469d9f6a8b6a93569b3;hb=cbd18fd2d426540a4101b7345c93f49b6fbbfa6d;hpb=890c1dc54f2d12febbf4238c73ccd145a6724771 diff --git a/loader/emu.c b/loader/emu.c index 3a2bd65..c0b52db 100644 --- a/loader/emu.c +++ b/loader/emu.c @@ -430,11 +430,17 @@ static void fb_thread_resume(void) static u32 xread32_io_cmn(u32 a, u32 *handled) { + struct timespec ts; u32 d = 0; *handled = 1; switch (a) { // Wiz stuff + case 0x1980: // TIMER3 TMRCOUNT + // assume the timer is set up for microsec time + g_clock_gettime_raw(CLOCK_REALTIME, &ts); + d = ts.tv_sec * 1000000 + ((u64)(u32)ts.tv_nsec * 4294968 >> 32); + break; case 0x402c: // MLCVSTRIDE0 case 0x4060: // MLCVSTRIDE1 d = pollux.v.stride; @@ -1285,6 +1291,7 @@ long emu_do_ioctl(int fd, int request, void *argp) } /* *********************** */ + case FAKEDEV_TTY: case FAKEDEV_TTY0: // fake tty0 to make GPH SDL happy if (request == 0x4b46) // KDGKBENT