From: notaz Date: Tue, 27 May 2008 21:38:46 +0000 (+0000) Subject: bugfixes, state load for new mode X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6850f9ec3b7c97084f1f0567824c65aa56e7fabb;p=libpicofe.git bugfixes, state load for new mode git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@468 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/gp2x/940ctl.c b/gp2x/940ctl.c index 8c8b18b..4a571ff 100644 --- a/gp2x/940ctl.c +++ b/gp2x/940ctl.c @@ -178,24 +178,11 @@ void YM2612PicoStateLoad_940(void) { UINT8 *REGS = YM2612GetRegs(); - int i; - /* make sure JOB940_PICOSTATELOAD gets done before next JOB940_YM2612UPDATEONE */ add_job_940(JOB940_PICOSTATELOAD); if (CHECK_BUSY(JOB940_PICOSTATELOAD)) wait_busy_940(JOB940_PICOSTATELOAD); writebuff_ptr = 0; - - // feed all the registers and update internal state - for(i = 0; i < 0x100; i++) { - YM2612Write_940(0, i, -1); - YM2612Write_940(1, REGS[i], -1); - } - for(i = 0; i < 0x100; i++) { - YM2612Write_940(2, i, -1); - YM2612Write_940(3, REGS[i|0x100], -1); - } - addr_A1 = *(INT32 *) (REGS + 0x200); } diff --git a/psp/menu.c b/psp/menu.c index 48de81e..4cb0b4b 100644 --- a/psp/menu.c +++ b/psp/menu.c @@ -52,18 +52,21 @@ static unsigned int inp_prev = 0; static unsigned long wait_for_input(unsigned int interesting, int is_key_config) { unsigned int ret; - static int repeats = 0, wait = 50; + static int repeats = 0, wait = 6; int release = 0, count, i; if (!is_key_config) interesting |= (interesting & 0xf0) << 24; // also use analog - if (repeats == 2 || repeats == 4) wait /= 2; - if (repeats == 6) wait = 15; + if (repeats == 2) wait = 3; + else if (repeats == 4) wait = 2; + else if (repeats == 6) wait = 1; - for (i = 0; i < 6 && inp_prev == psp_pad_read(1); i++) { + for (i = 0; i < wait && inp_prev == gp2x_joystick_read(1); i++) { + + for (i = 0; i < wait && inp_prev == psp_pad_read(1); i++) { if (i == 0) repeats++; - psp_msleep(wait); + psp_msleep(30); } for (count = 0; !((ret = psp_pad_read(1)) & interesting) && count < 100; count++) { @@ -73,7 +76,7 @@ static unsigned long wait_for_input(unsigned int interesting, int is_key_config) if (release || ret != inp_prev) { repeats = 0; - wait = 50; + wait = 6; } inp_prev = ret;