mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
arm_linux.S for cache ops and random fixes
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@587 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
f11bad75ed
commit
095a240bd9
11 changed files with 50 additions and 35 deletions
|
@ -54,13 +54,14 @@ LD = $(CROSS)ld
|
|||
OBJCOPY = $(CROSS)objcopy
|
||||
|
||||
# frontend
|
||||
OBJS += main.o menu.o gp2x.o usbjoy.o emu.o squidgehack.o cpuctrl.o asm_utils.o
|
||||
OBJS += main.o menu.o gp2x.o usbjoy.o emu.o squidgehack.o cpuctrl.o
|
||||
# 940 core control
|
||||
OBJS += 940ctl.o
|
||||
|
||||
# common
|
||||
OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \
|
||||
platform/common/arm_utils.o platform/common/readpng.o platform/common/mp3_helix.o
|
||||
platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \
|
||||
platform/common/mp3_helix.o
|
||||
|
||||
# Pico
|
||||
ifeq "$(amalgamate)" "1"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "gp2x.h"
|
||||
#include "usbjoy.h"
|
||||
#include "../common/arm_utils.h"
|
||||
#include "../common/arm_linux.h"
|
||||
|
||||
volatile unsigned short *gp2x_memregs;
|
||||
//static
|
||||
|
@ -162,9 +163,7 @@ void gp2x_video_wait_vsync(void)
|
|||
void gp2x_video_flush_cache(void)
|
||||
{
|
||||
// since we are using the mmu hack, we must flush the cache first
|
||||
// (the params are most likely wrong, but they seem to work somehow)
|
||||
//flushcache(addr, addr + 320*240*2, 0);
|
||||
flushcache(gp2x_screen, (char *)gp2x_screen + 320*240*2, 0);
|
||||
cache_flush_d_inval_i(gp2x_screen, (char *)gp2x_screen + 320*240*2);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ struct usbjoy *joy_open(int joynumber)
|
|||
char path [128];
|
||||
struct usbjoy * joy = NULL;
|
||||
struct js_event event;
|
||||
#ifdef __GP2X__
|
||||
static char insmod_done = 0;
|
||||
|
||||
// notaz: on my system I get unresolved input_* symbols, so have to 'insmod input' too
|
||||
// also we should insmod only once, not on every joy_open() call.
|
||||
if (!insmod_done) {
|
||||
|
@ -66,13 +66,18 @@ struct usbjoy *joy_open(int joynumber)
|
|||
system ("insmod joydev"); // Loads joydev module
|
||||
insmod_done = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (joynumber == 0) {
|
||||
}
|
||||
else if (joynumber > 0) {
|
||||
sprintf (path, "/dev/input/js%d", joynumber-1);
|
||||
fd = open(path, O_RDONLY, 0);
|
||||
if (fd > 0) {
|
||||
if (fd == -1) {
|
||||
sprintf (path, "/dev/js%d", joynumber-1);
|
||||
fd = open(path, O_RDONLY, 0);
|
||||
}
|
||||
if (fd != -1) {
|
||||
joy = (struct usbjoy *) malloc(sizeof(*joy));
|
||||
if (joy == NULL) { close(fd); return NULL; }
|
||||
memset(joy, 0, sizeof(*joy));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue