From c3dcc87aa494934943769b70fd752af1271d196a Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Wed, 18 Apr 2007 07:41:31 +0000 Subject: Allow rockboy to run while music is playing with smaller roms. Works on players that do not use the IRAM macros. Only tested on the Gigabeat as I think that is the only player that will run rockboy well with music. Also simplified the sound and reduced the code size a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13199 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockboy/emu.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'apps/plugins/rockboy/emu.c') diff --git a/apps/plugins/rockboy/emu.c b/apps/plugins/rockboy/emu.c index 50fc442713..7f24bde01e 100644 --- a/apps/plugins/rockboy/emu.c +++ b/apps/plugins/rockboy/emu.c @@ -41,23 +41,21 @@ void emu_run(void) #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(true); #endif + while(!shut) { cpu_emulate(2280); while (R_LY > 0 && R_LY < 144) emu_step(); - /* rtc_tick(); */ /* RTC support not implemented */ + rtc_tick(); /* RTC support not implemented */ - if(options.sound) - { + if(options.sound || !plugbuf) sound_mix(); - pcm_submit(); - } - + doevents(); vid_begin(); - + if (!(R_LCDC & 0x80)) cpu_emulate(32832); @@ -70,11 +68,11 @@ void emu_run(void) frames++; framesin++; - if(*rb->current_tick-timeten>=20) + if(*rb->current_tick-timeten>=10) { timeten=*rb->current_tick; - if(framesin<12) options.frameskip++; - if(framesin>12) options.frameskip--; + if(framesin<6) options.frameskip++; + if(framesin>6) options.frameskip--; if(options.frameskip>options.maxskip) options.frameskip=options.maxskip; if(options.frameskip<0) options.frameskip=0; framesin=0; -- cgit v1.2.3