u4 release

This commit is contained in:
notaz 2009-06-09 00:43:01 +03:00
parent 5cc8854bc9
commit 5a01fba679
3 changed files with 63 additions and 37 deletions

View File

@ -122,9 +122,32 @@ static void fb_video_exit()
} }
#endif #endif
void gp2x_init() static int get_romdir(char *buff, size_t size)
{ {
FILE *f; FILE *f;
char *s;
int r = -1;
f = fopen("romdir.txt", "r");
if (f == NULL)
return -1;
s = fgets(buff, size, f);
if (s)
{
r = strlen(s);
while (r > 0 && isspace(buff[r-1]))
buff[--r] = 0;
}
fclose(f);
return r;
}
void gp2x_init()
{
char buff[256];
gpsp_gp2x_dev = open("/dev/mem", O_RDWR); gpsp_gp2x_dev = open("/dev/mem", O_RDWR);
gpsp_gp2x_dev_audio = open("/dev/mixer", O_RDWR); gpsp_gp2x_dev_audio = open("/dev/mixer", O_RDWR);
gpsp_gp2x_memregl = gpsp_gp2x_memregl =
@ -137,39 +160,28 @@ void gp2x_init()
fb_video_init(); fb_video_init();
#endif #endif
f = fopen("romdir.txt", "r"); if (get_romdir(buff, sizeof(buff)) > 0)
if (f != NULL) chdir(buff);
{
char buff[256];
char *s = fgets(buff, sizeof(buff) - 1, f);
if (s)
{
int r = strlen(s);
while (r > 0 && isspace(buff[r-1]))
buff[--r] = 0;
chdir(buff);
}
fclose(f);
}
gp2x_sound_volume(1); gp2x_sound_volume(1);
} }
#include <errno.h>
void gp2x_quit() void gp2x_quit()
{ {
char buff[256]; char buff1[256], buff2[256];
FILE *f;
getcwd(buff, sizeof(buff)); getcwd(buff1, sizeof(buff1));
chdir(main_path); chdir(main_path);
f = fopen("romdir.txt", "r+"); if (get_romdir(buff2, sizeof(buff2)) >= 0 &&
if (f != NULL) strcmp(buff1, buff2) != 0)
{ {
fprintf(f, "%s", buff); FILE *f = fopen("romdir.txt", "w");
fclose(f); if (f != NULL)
truncate("romdir.txt", strlen(buff)); {
sync(); printf("writing romdir: %s\n", buff1);
fprintf(f, "%s", buff1);
fclose(f);
}
} }
warm_finish(); warm_finish();
@ -182,9 +194,9 @@ void gp2x_quit()
close(gpsp_gp2x_dev); close(gpsp_gp2x_dev);
fcloseall(); fcloseall();
//chdir("/usr/gp2x"); sync();
//execl("gp2xmenu", "gp2xmenu", NULL); chdir("/usr/gp2x");
exit(0); execl("gp2xmenu", "gp2xmenu", NULL);
} }
void gp2x_sound_volume(u32 volume_up) void gp2x_sound_volume(u32 volume_up)
@ -247,6 +259,8 @@ void set_FCLK(u32 MHZ)
gpsp_gp2x_memregl[0xf004>>2] = v; gpsp_gp2x_memregl[0xf004>>2] = v;
gpsp_gp2x_memregl[0xf07c>>2] |= 0x8000; gpsp_gp2x_memregl[0xf07c>>2] |= 0x8000;
while (gpsp_gp2x_memregl[0xf07c>>2] & 0x8000)
;
#else #else
#define SYS_CLK_FREQ 7372800 #define SYS_CLK_FREQ 7372800
// m = MDIV + 8, p = PDIV + 2, s = SDIV // m = MDIV + 8, p = PDIV + 2, s = SDIV

View File

@ -12,13 +12,17 @@ not apply however).
Changelog: Changelog:
0.9-2xb u1 (unofficial notaz release): 0.9-2xb u4 (unofficial notaz release, done on Exophase's request)
- Fixed a problen in thread synchronization which caused deadlock after - Wiz port. No emulation related changes.
some time. - Wiz: dropped SDL for video and hitting hardware directly (GPH SDL can't
be trusted, it doesn't do double buffering as of firmware 1.0).
0.9-2xb u2 (unofficial notaz release): - Added new optimized software scaler with interpolation.
- Replaced non-working mmuhack.o with proper one, added cache flush calls - gpSP is now saving ROM dir on exit. Delete romdir.txt if you don't
to avoid artifacts. want that.
- gpSP now comes with wARM, new kernel module+lib for ARM cache control
(replaces mmuhack).
- gpSP no longer invalidates whole icache after recompilation, might
case minor speedup.
0.9-2xb u3 (unofficial notaz release, released with permission): 0.9-2xb u3 (unofficial notaz release, released with permission):
- Removed built-in CPU/LCD/RAM-Tweaker. - Removed built-in CPU/LCD/RAM-Tweaker.
@ -29,6 +33,14 @@ Changelog:
- Fixed centering-on-first-run problem. - Fixed centering-on-first-run problem.
- 3:2 scaled option now does what it says. - 3:2 scaled option now does what it says.
0.9-2xb u2 (unofficial notaz release):
- Replaced non-working mmuhack.o with proper one, added cache flush calls
to avoid artifacts.
0.9-2xb u1 (unofficial notaz release):
- Fixed a problen in thread synchronization which caused deadlock after
some time.
0.9-2xb: 0.9-2xb:
-- IMPORTANT-- If you're overwriting an old version, be sure to delete the -- IMPORTANT-- If you're overwriting an old version, be sure to delete the
gpsp.cfg file first, or be prepared to have a bunch of weird button gpsp.cfg file first, or be prepared to have a bunch of weird button

View File

@ -364,10 +364,10 @@ u32 gamepad_config_map[16] =
BUTTON_ID_SELECT, // Select BUTTON_ID_SELECT, // Select
BUTTON_ID_L, // Ltrigger BUTTON_ID_L, // Ltrigger
BUTTON_ID_R, // Rtrigger BUTTON_ID_R, // Rtrigger
BUTTON_ID_NONE, // A BUTTON_ID_FPS, // A
BUTTON_ID_A, // B BUTTON_ID_A, // B
BUTTON_ID_B, // X BUTTON_ID_B, // X
BUTTON_ID_NONE, // Y BUTTON_ID_MENU, // Y
BUTTON_ID_VOLDOWN, // Vol down BUTTON_ID_VOLDOWN, // Vol down
BUTTON_ID_VOLUP, // Vol up BUTTON_ID_VOLUP, // Vol up
BUTTON_ID_FPS, // Push BUTTON_ID_FPS, // Push