From 260f1bcc8a782e7b19a11d446927cd4c2c493e8c Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 29 Jun 2008 20:07:34 +0000 Subject: [PATCH] idle loop detection (Cyclone only, with debug stuff) git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@502 be3aeb3a-fb24-0410-a615-afba39da0efa --- base_readme.txt | 3 ++- common/emu.c | 2 -- common/menu.h | 1 + gp2x/Makefile | 2 +- gp2x/menu.c | 19 +++++++++++-------- gp2x/port_config.h | 2 +- gp2x/version.h | 2 +- psp/menu.c | 12 +++++++----- psp/version.h | 2 +- 9 files changed, 25 insertions(+), 20 deletions(-) diff --git a/base_readme.txt b/base_readme.txt index 6561c9b..6c8e528 100644 --- a/base_readme.txt +++ b/base_readme.txt @@ -621,6 +621,8 @@ Additional thanks * Tasco Deluxe for his reverse engineering work on SVP and some mappers. * Bart Trzynadlowski for his SSFII and 68000 docs. * Haze for his research (http://haze.mameworld.info). +* Lordus, Exophase and Rokas for various ideas. +* Nemesis for his YM2612 research. * Mark and Jean-loup for zlib library. * ketchupgun for the skin. #ifdef GP2X @@ -632,7 +634,6 @@ Additional thanks * A_SN for his gamma code. * craigix for supplying the GP2X hardware and making this port possible. * Alex for the icon. -* Exophase, Rokas and Lordus for various ideas. * All the people from gp32x boards for their support. #endif #ifdef GIZ diff --git a/common/emu.c b/common/emu.c index 0b8fdf7..fabd521 100644 --- a/common/emu.c +++ b/common/emu.c @@ -427,8 +427,6 @@ int emu_ReloadRom(void) return 0; } - Pico.m.frame_count = 0; - // insert CD if it was detected if (cd_state != CIT_NOT_CD) { ret = Insert_CD(romFileName, cd_state); diff --git a/common/menu.h b/common/menu.h index 6ecc191..bfa05c4 100644 --- a/common/menu.h +++ b/common/menu.h @@ -66,6 +66,7 @@ typedef enum MA_OPT2_NO_FRAME_LIMIT, /* psp */ MA_OPT2_SVP_DYNAREC, MA_OPT2_NO_SPRITE_LIM, + MA_OPT2_NO_IDLE_LOOPS, MA_OPT2_DONE, MA_OPT3_SCALE, /* psp (all OPT3) */ MA_OPT3_HSCALE32, diff --git a/gp2x/Makefile b/gp2x/Makefile index 4ebecb4..1066a85 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -128,7 +128,7 @@ OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o endif ifeq "$(use_cyclone)" "1" DEFINC += -DEMU_C68K -OBJS += ../../cpu/Cyclone/proj/Cyclone.o +OBJS += ../../cpu/Cyclone/proj/Cyclone.o ../../cpu/Cyclone/tools/idle.o endif # drz80/mz80 ifeq "$(mz80)" "1" diff --git a/gp2x/menu.c b/gp2x/menu.c index db4c9fa..8ec98aa 100644 --- a/gp2x/menu.c +++ b/gp2x/menu.c @@ -25,7 +25,7 @@ #include #ifndef _DIRENT_HAVE_D_TYPE -#error "need d_type for file browser +#error "need d_type for file browser" #endif extern int mmuhack_status; @@ -67,7 +67,7 @@ static unsigned long wait_for_input(unsigned long interesting) repeats = 0; wait = 20; } - if (wait > 6 && (ret&(GP2X_UP|GP2X_LEFT|GP2X_DOWN|GP2X_RIGHT))) + if (wait > 6 && (ret&(GP2X_UP|GP2X_LEFT|GP2X_DOWN|GP2X_RIGHT|GP2X_L|GP2X_R))) wait = 6; inp_prev = ret; inp_prevjoy = 0; @@ -1075,6 +1075,7 @@ menu_entry opt2_entries[] = { "craigix's RAM timings", MB_ONOFF, MA_OPT2_RAMTIMINGS, ¤tConfig.EmuOpt, 0x0100, 0, 0, 1, 1 }, { NULL, MB_ONOFF, MA_OPT2_SQUIDGEHACK, ¤tConfig.EmuOpt, 0x0010, 0, 0, 1, 1 }, { "SVP dynarec", MB_ONOFF, MA_OPT2_SVP_DYNAREC, &PicoOpt, 0x20000, 0, 0, 1, 1 }, + { "Disable idle loop patching",MB_ONOFF, MA_OPT2_NO_IDLE_LOOPS, &PicoOpt, 0x80000, 0, 0, 1, 1 }, { "done", MB_NONE, MA_OPT2_DONE, NULL, 0, 0, 0, 1, 0 }, }; @@ -1428,7 +1429,7 @@ static int menu_loop_options(void) static void draw_menu_credits(void) { - int tl_x = 15, tl_y = 64, y; + int tl_x = 15, tl_y = 56, y; gp2x_pd_clone_buffer2(); text_out16(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006-2008"); @@ -1438,17 +1439,19 @@ static void draw_menu_credits(void) text_out16(tl_x, (y+=10), " base code of PicoDrive"); text_out16(tl_x, (y+=10), "Reesy & FluBBa: DrZ80 core"); text_out16(tl_x, (y+=10), "MAME devs: YM2612 and SN76496 cores"); - text_out16(tl_x, (y+=10), "Charles MacDonald: Genesis hw docs"); - text_out16(tl_x, (y+=10), "Stephane Dallongeville:"); - text_out16(tl_x, (y+=10), " opensource Gens"); - text_out16(tl_x, (y+=10), "Haze: Genesis hw info"); text_out16(tl_x, (y+=10), "rlyeh and others: minimal SDK"); text_out16(tl_x, (y+=10), "Squidge: squidgehack"); text_out16(tl_x, (y+=10), "Dzz: ARM940 sample"); - text_out16(tl_x, (y+=10), "GnoStiC / Puck2099: USB joystick"); + text_out16(tl_x, (y+=10), "GnoStiC / Puck2099: USB joy code"); text_out16(tl_x, (y+=10), "craigix: GP2X hardware"); text_out16(tl_x, (y+=10), "ketchupgun: skin design"); + text_out16(tl_x, (y+=20), "special thanks (for code, docs, ideas)"); + text_out16(tl_x, (y+=10), " Charles MacDonald, Haze,"); + text_out16(tl_x, (y+=10), " Stephane Dallongeville,"); + text_out16(tl_x, (y+=10), " Lordus, Exophase, Rokas,"); + text_out16(tl_x, (y+=10), " Nemesis, Tasco Deluxe"); + menu_flip(); } diff --git a/gp2x/port_config.h b/gp2x/port_config.h index fe0fcea..22b43cd 100644 --- a/gp2x/port_config.h +++ b/gp2x/port_config.h @@ -19,7 +19,7 @@ #define CAN_HANDLE_240_LINES 1 // logging emu events -#define EL_LOGMASK EL_STATUS // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL) // xffff +#define EL_LOGMASK (EL_STATUS|EL_IDLE) // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL) // xffff //#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__) #define dprintf(x...) diff --git a/gp2x/version.h b/gp2x/version.h index 580a8ae..d4bd447 100644 --- a/gp2x/version.h +++ b/gp2x/version.h @@ -1,2 +1,2 @@ -#define VERSION "1.45" +#define VERSION "1.50" diff --git a/psp/menu.c b/psp/menu.c index 85669ae..44c7c66 100644 --- a/psp/menu.c +++ b/psp/menu.c @@ -82,7 +82,7 @@ static unsigned long wait_for_input(unsigned int interesting, int is_key_config) if (!is_key_config) ret |= (ret & 0xf0000000) >> 24; // use analog as d-pad - if (wait > 6 && (ret&(BTN_UP|BTN_LEFT|BTN_DOWN|BTN_RIGHT))) + if (wait > 6 && (ret&(BTN_UP|BTN_LEFT|BTN_DOWN|BTN_RIGHT|BTN_L|BTN_R))) wait = 6; // we don't need diagonals in menus @@ -1512,13 +1512,15 @@ static void draw_menu_credits(void) text_out16(tl_x, (y+=10), "Chui: Fame/C"); text_out16(tl_x, (y+=10), "NJ: CZ80"); text_out16(tl_x, (y+=10), "MAME devs: YM2612 and SN76496 cores"); - text_out16(tl_x, (y+=10), "Stephane Dallongeville:"); - text_out16(tl_x, (y+=10), " Gens code, base of Fame/C, CZ80"); - text_out16(tl_x, (y+=10), "Charles MacDonald: Genesis hw docs"); - text_out16(tl_x, (y+=10), "Haze: Genesis hw info"); text_out16(tl_x, (y+=10), "ps2dev.org people: PSP SDK/code"); text_out16(tl_x, (y+=10), "ketchupgun: skin design"); + text_out16(tl_x, (y+=20), "special thanks (for code, docs, ideas):"); + text_out16(tl_x, (y+=10), " Charles MacDonald, Haze,"); + text_out16(tl_x, (y+=10), " Stephane Dallongeville,"); + text_out16(tl_x, (y+=10), " Lordus, Exophase, Rokas,"); + text_out16(tl_x, (y+=10), " Nemesis, Tasco Deluxe"); + menu_draw_end(); } diff --git a/psp/version.h b/psp/version.h index 9b9d909..d4bd447 100644 --- a/psp/version.h +++ b/psp/version.h @@ -1,2 +1,2 @@ -#define VERSION "1.40b" +#define VERSION "1.50" -- 2.39.2