Alex.
Retired
- Joined
- Aug 24, 2005
- Messages
- 4,616
It works perfectly, I finally get real accurate 60fps! Thank you very much for sharing this Notaznotaz said:here's the code that I use in PicoDrive:
Last edited by a moderator:
It works perfectly, I finally get real accurate 60fps! Thank you very much for sharing this Notaznotaz said:here's the code that I use in PicoDrive:
notaz said:oh BTW 'memregl' is standard
Code:volatile unsigned int *memregl; memregl = mmap(0, 0x20000, PROT_READ|PROT_WRITE, MAP_SHARED, memdev, 0xc0000000);
'memdev' was not declared in this scope
Jan-Nik said:notaz said:oh BTW 'memregl' is standard
Code:volatile unsigned int *memregl; memregl = mmap(0, 0x20000, PROT_READ|PROT_WRITE, MAP_SHARED, memdev, 0xc0000000);
I'm gettingIs there some header I forgot to include?Code:'memdev' was not declared in this scope
/* open /dev/mem to access registers */
memdev = open("/dev/mem", O_RDWR);
if(memdev < 0) {
printf("Could not open /dev/mem\n");
return -1;
}
wait_until = get_ticks_us() + 16666;
draw_frame();
while (get_ticks_us() < wait_until)
usleep(1000); // sleep on Wiz is a bad idea, this is just for illustration
root@wiz:/proc# cat timer_list
Timer List Version: v0.3
HRTIMER_MAX_CLOCK_BASES: 2
now at 106338437000 nsecs
cpu: 0
clock 0:
.index: 0
.resolution: 10000000 nsecs
.get_time: ktime_get_real
active timers:
clock 1:
.index: 1
.resolution: 10000000 nsecs
.get_time: ktime_get
active timers:
#0: <c1ec9eb0>, hrtimer_wakeup, S:01
# expires at 106337856000 nsecs [in 18446744073708970616 nsecs]
#1: <c1ec9eb0>, hrtimer_wakeup, S:01
# expires at 106338864000 nsecs [in 427000 nsecs]