From 5111820c3717b5e6879a6d5d13164428230ddb50 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 2 Jan 2007 22:17:05 +0000 Subject: [PATCH] mcd: text shows up git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@14 be3aeb3a-fb24-0410-a615-afba39da0efa --- gp2x/Makefile | 11 ++++++++--- gp2x/emu.c | 12 ++++++------ gp2x/menu.c | 8 ++++---- gp2x/version.h | 2 +- linux/port_config.h | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/gp2x/Makefile b/gp2x/Makefile index a524cc0..fc729b0 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -92,10 +92,15 @@ ifeq "$(up)" "1" @cmd //C copy $@ \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ endif -up: up940 - @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ +up: # up940 + @cp -v PicoDrive.gpe /mnt/gp2x/mnt/sd/games/PicoDrive/ + +# @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ + up940: - @cmd //C copy code940.bin \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ + @cp -v code940.bin /mnt/gp2x/mnt/sd/games/PicoDrive/ + +# @cmd //C copy code940.bin \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ testrefr.gpe : test.o gp2x.o asmutils.o @echo $@ diff --git a/gp2x/emu.c b/gp2x/emu.c index 6e0021b..a90d850 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -79,14 +79,15 @@ static void strlwr(char* string) while ( (*string++ = (char)tolower(*string)) ); } -static int try_rfn_ext(char *ext) +static int try_rfn_cut(void) { FILE *tmp; char *p; - p = romFileName + strlen(romFileName) - 4; - if (p < romFileName) p = romFileName; - strcpy(p, ext); + p = romFileName + strlen(romFileName) - 1; + for (; p > romFileName; p--) + if (*p == '.') break; + *p = 0; if((tmp = fopen(romFileName, "rb"))) { fclose(tmp); @@ -156,8 +157,7 @@ int emu_ReloadRom(void) sprintf(menuErrorMsg, "Invalid GMV file."); return 0; } - dummy = try_rfn_ext(".zip") || try_rfn_ext(".bin") || - try_rfn_ext(".smd") || try_rfn_ext(".gen"); + dummy = try_rfn_cut() || try_rfn_cut(); if (!dummy) { sprintf(menuErrorMsg, "Could't find a ROM for movie."); return 0; diff --git a/gp2x/menu.c b/gp2x/menu.c index 588e0c9..7b18517 100644 --- a/gp2x/menu.c +++ b/gp2x/menu.c @@ -352,11 +352,11 @@ static char *romsel_loop(char *curr_path) for (;;) { draw_dirlist(curr_path, namelist, n, sel); - inp = wait_for_input(GP2X_UP|GP2X_DOWN|GP2X_LEFT|GP2X_RIGHT|GP2X_B|GP2X_X); + inp = wait_for_input(GP2X_UP|GP2X_DOWN|GP2X_LEFT|GP2X_RIGHT|GP2X_L|GP2X_R|GP2X_B|GP2X_X); if(inp & GP2X_UP ) { sel--; if (sel < 0) sel = n-2; } if(inp & GP2X_DOWN) { sel++; if (sel > n-2) sel = 0; } - if(inp & GP2X_LEFT) { sel-=10; if (sel < 0) sel = 0; } - if(inp & GP2X_RIGHT) { sel+=10; if (sel > n-2) sel = n-2; } + if(inp &(GP2X_LEFT|GP2X_L)) { sel-=10; if (sel < 0) sel = 0; } + if(inp &(GP2X_RIGHT|GP2X_R)) { sel+=10; if (sel > n-2) sel = n-2; } if(inp & GP2X_B) { // enter dir/select again: if (namelist[sel+1]->d_type == DT_REG) { @@ -827,7 +827,7 @@ static void draw_menu_credits(void) int tl_x = 15, tl_y = 70, y; memset(gp2x_screen, 0, 320*240); - gp2x_text_out8(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006"); + gp2x_text_out8(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006,2007"); y = tl_y; gp2x_text_out8(tl_x, y, "Credits:"); gp2x_text_out8(tl_x, (y+=10), "Dave: Cyclone 68000 core,"); diff --git a/gp2x/version.h b/gp2x/version.h index 1331a8a..8d13814 100644 --- a/gp2x/version.h +++ b/gp2x/version.h @@ -1,2 +1,2 @@ -#define VERSION "0.964" +#define VERSION "0.965" diff --git a/linux/port_config.h b/linux/port_config.h index be76af4..e5c88bb 100644 --- a/linux/port_config.h +++ b/linux/port_config.h @@ -12,7 +12,7 @@ // pico.c #define CAN_HANDLE_240_LINES 1 -#define dprintf(f,...) printf("%05i: " f "\n",Pico.m.frame_count,##__VA_ARGS__) +#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__) //#define dprintf(x...) #endif //PORT_CONFIG_H -- 2.39.2