ifeq "$(PLATFORM)" "caanoo"
OBJS += frontend/plat_pollux.o frontend/in_tsbutton.o frontend/blit320.o
OBJS += frontend/gp2x/in_gp2x.o frontend/warm/warm.o
+libpcsxcore/new_dynarec/pcsxmem.o: CFLAGS += -DCUSTOM_MEMMAPS
USE_FRONTEND = 1
endif
ifeq "$(PLATFORM)" "maemo"
#define pl_gun_ts_init() NULL
#define pl_gun_ts_update(...) do {} while (0)
+#define pl_set_gun_rect(...) do {} while (0)
#endif
close(memdev);
}
+/* WIZ RAM lack workaround */
+void *memtab_mmap(void *addr, size_t size)
+{
+ void *ret;
+
+ if (gp2x_dev_id != GP2X_DEV_WIZ)
+ return mmap(addr, size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
+
+ ret = mmap(addr, size, PROT_READ | PROT_WRITE,
+ MAP_SHARED | MAP_FIXED, memdev, 0x03000000);
+ if (ret != MAP_FAILED)
+ warm_change_cb_range(WCB_C_BIT | WCB_B_BIT, 1, ret, size);
+ return ret;
+}
+
/* Caanoo stuff, perhaps move later */
static const char * const caanoo_keys[KEY_MAX + 1] = {
[0 ... KEY_MAX] = NULL,
{
int i;
+#ifdef CUSTOM_MEMMAPS
+ // WIZ lack-of-RAM hack
+ extern void *memtab_mmap(void *addr, size_t size);
+ mem_readtab = memtab_mmap((void *)0x08000000, 0x200000 * 4);
+#else
// have to map these further to keep tcache close to .text
mem_readtab = mmap((void *)0x08000000, 0x200000 * 4, PROT_READ | PROT_WRITE,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+#endif
if (mem_readtab == MAP_FAILED) {
fprintf(stderr, "failed to map mem tables\n");
exit(1);