notaz.gp2x.de
/
ginge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
890c1dc
)
some real basic pollux timer
author
notaz
<notasas@gmail.com>
Fri, 15 Jan 2016 00:50:55 +0000
(
02:50
+0200)
committer
notaz
<notasas@gmail.com>
Fri, 15 Jan 2016 00:50:55 +0000
(
02:50
+0200)
loader/emu.c
patch
|
blob
|
blame
|
history
diff --git
a/loader/emu.c
b/loader/emu.c
index
3a2bd65
..
91989c4
100644
(file)
--- 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;