cache (on framebuffer mem) flush fix from 2007 (gpsp09-2xb_2)
This commit is contained in:
parent
e9c7b1376a
commit
010878638d
|
@ -11,7 +11,7 @@ STRIP = $(PREFIX)/bin/arm-open2x-linux-strip
|
||||||
OBJS = main.o cpu.o memory.u video.o input.o sound.o gp2x.o gui.o \
|
OBJS = main.o cpu.o memory.u video.o input.o sound.o gp2x.o gui.o \
|
||||||
cheats.o zip.o cpu_threaded.z cpu_speed.o cpuctrl.o \
|
cheats.o zip.o cpu_threaded.z cpu_speed.o cpuctrl.o \
|
||||||
gp2xminilib.o font.o display.o speedtest.o cmdline.o daemon.o \
|
gp2xminilib.o font.o display.o speedtest.o cmdline.o daemon.o \
|
||||||
arm_stub.o video_blend.o
|
arm_stub.o video_blend.o flush_cache.o
|
||||||
BIN = gpsp.gpe
|
BIN = gpsp.gpe
|
||||||
|
|
||||||
# Platform specific definitions
|
# Platform specific definitions
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
@ vim:filetype=armasm
|
||||||
|
|
||||||
|
.global gp2x_flush_cache @ beginning_addr, end_addr, flags
|
||||||
|
|
||||||
|
gp2x_flush_cache:
|
||||||
|
swi #0x9f0002
|
||||||
|
mov pc, lr
|
||||||
|
|
4
video.c
4
video.c
|
@ -93,6 +93,7 @@ SDL_Surface *hw_screen;
|
||||||
#endif
|
#endif
|
||||||
SDL_Surface *screen;
|
SDL_Surface *screen;
|
||||||
const u32 video_scale = 1;
|
const u32 video_scale = 1;
|
||||||
|
extern void gp2x_flush_cache(void *beginning_addr, void *end_addr, int flags);
|
||||||
|
|
||||||
#define get_screen_pixels() \
|
#define get_screen_pixels() \
|
||||||
((u16 *)screen->pixels) \
|
((u16 *)screen->pixels) \
|
||||||
|
@ -3409,6 +3410,9 @@ void flip_screen()
|
||||||
{
|
{
|
||||||
SDL_BlitSurface(screen, NULL, hw_screen, NULL);
|
SDL_BlitSurface(screen, NULL, hw_screen, NULL);
|
||||||
}
|
}
|
||||||
|
/* it is unclear if this syscall takes virtual or physical addresses,
|
||||||
|
* but using virtual seems to work for me. */
|
||||||
|
gp2x_flush_cache(hw_screen->pixels, hw_screen->pixels + 320*240, 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
SDL_Flip(screen);
|
SDL_Flip(screen);
|
||||||
|
|
Loading…
Reference in New Issue