diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-04-18 07:41:31 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-04-18 07:41:31 +0000 |
commit | c3dcc87aa494934943769b70fd752af1271d196a (patch) | |
tree | 56cd61160f29c22ee3fa67ee9bc3e020013aa051 /apps/plugins/rockboy/emu.c | |
parent | 521d6a5e1f1dc3a08700b22db5b203920c9f3bda (diff) | |
download | rockbox-c3dcc87aa494934943769b70fd752af1271d196a.tar.gz rockbox-c3dcc87aa494934943769b70fd752af1271d196a.zip |
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
Diffstat (limited to 'apps/plugins/rockboy/emu.c')
-rw-r--r-- | apps/plugins/rockboy/emu.c | 18 |
1 files changed, 8 insertions, 10 deletions
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) | |||
41 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 41 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
42 | rb->cpu_boost(true); | 42 | rb->cpu_boost(true); |
43 | #endif | 43 | #endif |
44 | |||
44 | while(!shut) | 45 | while(!shut) |
45 | { | 46 | { |
46 | cpu_emulate(2280); | 47 | cpu_emulate(2280); |
47 | while (R_LY > 0 && R_LY < 144) | 48 | while (R_LY > 0 && R_LY < 144) |
48 | emu_step(); | 49 | emu_step(); |
49 | 50 | ||
50 | /* rtc_tick(); */ /* RTC support not implemented */ | 51 | rtc_tick(); /* RTC support not implemented */ |
51 | 52 | ||
52 | if(options.sound) | 53 | if(options.sound || !plugbuf) |
53 | { | ||
54 | sound_mix(); | 54 | sound_mix(); |
55 | pcm_submit(); | 55 | |
56 | } | ||
57 | |||
58 | doevents(); | 56 | doevents(); |
59 | vid_begin(); | 57 | vid_begin(); |
60 | 58 | ||
61 | if (!(R_LCDC & 0x80)) | 59 | if (!(R_LCDC & 0x80)) |
62 | cpu_emulate(32832); | 60 | cpu_emulate(32832); |
63 | 61 | ||
@@ -70,11 +68,11 @@ void emu_run(void) | |||
70 | frames++; | 68 | frames++; |
71 | framesin++; | 69 | framesin++; |
72 | 70 | ||
73 | if(*rb->current_tick-timeten>=20) | 71 | if(*rb->current_tick-timeten>=10) |
74 | { | 72 | { |
75 | timeten=*rb->current_tick; | 73 | timeten=*rb->current_tick; |
76 | if(framesin<12) options.frameskip++; | 74 | if(framesin<6) options.frameskip++; |
77 | if(framesin>12) options.frameskip--; | 75 | if(framesin>6) options.frameskip--; |
78 | if(options.frameskip>options.maxskip) options.frameskip=options.maxskip; | 76 | if(options.frameskip>options.maxskip) options.frameskip=options.maxskip; |
79 | if(options.frameskip<0) options.frameskip=0; | 77 | if(options.frameskip<0) options.frameskip=0; |
80 | framesin=0; | 78 | framesin=0; |