From dccc2bd01c24a4d7af8614872d62a513cf35df4a Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 25 Feb 2007 23:04:33 +0000 Subject: [PATCH] 1.20 release git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@57 be3aeb3a-fb24-0410-a615-afba39da0efa --- gp2x/emu.c | 12 ++++++------ gp2x/menu.c | 18 ++++++++++-------- gp2x/version.h | 2 +- linux/gp2x.c | 5 +++++ 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/gp2x/emu.c b/gp2x/emu.c index cdb69b7..d973805 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -424,8 +424,6 @@ static void romfname_ext(char *dst, const char *prefix, const char *ext) dst[511-8] = 0; if (dst[strlen(dst)-4] == '.') dst[strlen(dst)-4] = 0; if (ext) strcat(dst, ext); - - printf("romfname_ext: %s\n", dst); } @@ -973,9 +971,9 @@ void emu_forced_frame(void) PicoOpt = po_old; if (!(Pico.video.reg[12]&1)) { - vidCpyM2 = vidCpyM2_40col; + vidCpyM2 = vidCpyM2_32col; clearArea(1); - } else vidCpyM2 = vidCpyM2_32col; + } else vidCpyM2 = vidCpyM2_40col; vidCpyM2((unsigned char *)gp2x_screen+320*8, framebuff+328*8); vidConvCpyRGB32(localPal, Pico.cram, 0x40); @@ -1369,8 +1367,10 @@ int emu_SaveLoadGame(int load, int sram) // make save filename saveFname = emu_GetSaveFName(load, sram, state_slot); if (saveFname == NULL) { - strcpy(noticeMsg, load ? "LOAD FAILED (missing file)" : "SAVE FAILED "); - gettimeofday(¬iceMsgTime, 0); + if (!sram) { + strcpy(noticeMsg, load ? "LOAD FAILED (missing file)" : "SAVE FAILED "); + gettimeofday(¬iceMsgTime, 0); + } return -1; } diff --git a/gp2x/menu.c b/gp2x/menu.c index 9a2914a..236b693 100644 --- a/gp2x/menu.c +++ b/gp2x/menu.c @@ -688,9 +688,10 @@ static void draw_cd_menu_options(int menu_sel, char *b_us, char *b_eu, char *b_j gp2x_text_out8(tl_x, y, "USA BIOS: %s", b_us); // 0 gp2x_text_out8(tl_x, (y+=10), "EUR BIOS: %s", b_eu); // 1 gp2x_text_out8(tl_x, (y+=10), "JAP BIOS: %s", b_jp); // 2 - gp2x_text_out8(tl_x, (y+=10), "CD LEDs %s", (currentConfig.EmuOpt &0x400)?"ON":"OFF"); // 3 - gp2x_text_out8(tl_x, (y+=10), "CDDA audio (using mp3s) %s", (currentConfig.PicoOpt&0x800)?"ON":"OFF"); // 4 - gp2x_text_out8(tl_x, (y+=10), "PCM audio %s", (currentConfig.PicoOpt&0x400)?"ON":"OFF"); // 5 + gp2x_text_out8(tl_x, (y+=10), "CD LEDs %s", (currentConfig.EmuOpt &0x0400)?"ON":"OFF"); // 3 + gp2x_text_out8(tl_x, (y+=10), "CDDA audio (using mp3s) %s", (currentConfig.PicoOpt&0x0800)?"ON":"OFF"); // 4 + gp2x_text_out8(tl_x, (y+=10), "PCM audio %s", (currentConfig.PicoOpt&0x0400)?"ON":"OFF"); // 5 + gp2x_text_out8(tl_x, (y+=10), "Better sync (very slow) %s", (currentConfig.PicoOpt&0x2000)?"ON":"OFF"); // 6 gp2x_text_out8(tl_x, (y+=10), "Done"); // draw cursor @@ -706,7 +707,7 @@ static void draw_cd_menu_options(int menu_sel, char *b_us, char *b_eu, char *b_j static void cd_menu_loop_options(void) { - int menu_sel = 0, menu_sel_max = 6; + int menu_sel = 0, menu_sel_max = 7; unsigned long inp = 0; char bios_us[32], bios_eu[32], bios_jp[32], *bios, *p; @@ -733,10 +734,11 @@ static void cd_menu_loop_options(void) if(inp & GP2X_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } if((inp& GP2X_B)||(inp&GP2X_LEFT)||(inp&GP2X_RIGHT)) { // toggleable options switch (menu_sel) { - case 3: currentConfig.EmuOpt ^=0x400; break; - case 4: currentConfig.PicoOpt^=0x800; break; - case 5: currentConfig.PicoOpt^=0x400; break; - case 6: return; + case 3: currentConfig.EmuOpt ^=0x0400; break; + case 4: currentConfig.PicoOpt^=0x0800; break; + case 5: currentConfig.PicoOpt^=0x0400; break; + case 6: currentConfig.PicoOpt^=0x2000; break; + case 7: return; } } if(inp & (GP2X_X|GP2X_A)) return; diff --git a/gp2x/version.h b/gp2x/version.h index 0645b77..eeb782c 100644 --- a/gp2x/version.h +++ b/gp2x/version.h @@ -1,2 +1,2 @@ -#define VERSION "1.15" +#define VERSION "1.20" diff --git a/linux/gp2x.c b/linux/gp2x.c index 38ab053..e4e3421 100644 --- a/linux/gp2x.c +++ b/linux/gp2x.c @@ -260,6 +260,11 @@ void gp2x_video_RGB_setscaling(int W, int H) { } +void gp2x_memcpy_buffers(int buffers, void *data, int offset, int len) +{ + memcpy((char *)gp2x_screen + offset, data, len); +} + void gp2x_memcpy_all_buffers(void *data, int offset, int len) { memcpy((char *)gp2x_screen + offset, data, len); -- 2.39.5