+/*
+ * GINGE - GINGE Is Not Gp2x Emulator
+ * (C) notaz, 2010-2011
+ *
+ * This work is licensed under the MAME license, see COPYING file for details.
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static volatile unsigned short *memregs;
static volatile unsigned int *memregl;
+int probably_caanoo;
int memdev = -1;
#define FB_BUF_COUNT 4
printf("framebuffer: \"%s\" @ %08lx\n", fbfix.id, fbfix.smem_start);
fb_paddr[0] = fbfix.smem_start;
+ probably_caanoo = fb_paddr[0] >= 0x4000000;
+ printf("looking like Caanoo? %s.\n", probably_caanoo ? "yes" : "no");
gp2x_screens[0] = mmap(0, 320*240*2*FB_BUF_COUNT, PROT_READ|PROT_WRITE,
MAP_SHARED, memdev, fb_paddr[0]);
unsigned int r;
int ret;
+ if (probably_caanoo)
+ rot = 0;
+
rot_cmd[0] = rot ? 6 : 5;
ret = ioctl(fbdev, _IOW('D', 90, int[2]), rot_cmd);
if (ret < 0)