From 59d4d2025c9f1b0a68b780fe6a6f0e313caf3027 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Wed, 12 Nov 2008 04:15:34 +0000 Subject: Revert last commit (accidentally committed the whole tree) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19095 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockboy/cpu.c | 3 ++- apps/plugins/rockboy/lcd.c | 33 ++++++++++++++------------------- apps/plugins/rockboy/sound.c | 5 ++++- 3 files changed, 20 insertions(+), 21 deletions(-) (limited to 'apps/plugins/rockboy') diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c index f1926fe421..1aca06f337 100644 --- a/apps/plugins/rockboy/cpu.c +++ b/apps/plugins/rockboy/cpu.c @@ -333,6 +333,8 @@ void cpu_timers(int cnt) static int cpu_idle(int max) { + int cnt, unit; + if (!(cpu.halt && IME)) return 0; if (R_IF & R_IE) { @@ -351,7 +353,6 @@ static int cpu_idle(int max) return max; } - int cnt, unit; /* Figure out when the next timer interrupt will happen */ unit = ((-R_TAC) & 3) << 1; cnt = (511 - cpu.tim + (1<> unit; diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index f62e3a9ce3..da3b138e51 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c @@ -64,7 +64,7 @@ fb_data *vdest; static void updatepatpix(void) ICODE_ATTR; static void updatepatpix(void) { - int i; + int i, j; #if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE)) int k, a, c; #endif @@ -73,12 +73,10 @@ static void updatepatpix(void) if (!anydirty) return; for (i = 0; i < 1024; i++) { - int j; if (i == 384) i = 512; if (i == 896) break; if (!patdirty[i]) continue; patdirty[i] = 0; - for (j = 0; j < 8; j++) { #if CONFIG_CPU == SH7034 @@ -378,8 +376,8 @@ static void tilebuf(void) int base; byte *tilemap, *attrmap; int *tilebuf; - const int *wrap; - static const int wraptable[64] ICONST_ATTR = + int *wrap; + static int wraptable[64] = { 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32 @@ -780,11 +778,11 @@ static void spr_enum(void) static void spr_scan(void) ICODE_ATTR; static void spr_scan(void) { - int i; - byte ns = NS; - byte *src, *dest; + int i, x; + byte pal, b, ns = NS; + byte *src, *dest, *bg, *pri; struct vissprite *vs; - static byte bgdup[256] IBSS_ATTR; + static byte bgdup[256]; if (!ns) return; @@ -793,8 +791,7 @@ static void spr_scan(void) for (; ns; ns--, vs--) { - int x = vs->x; - + x = vs->x; if (x > 159) continue; if (x < -7) continue; if (x < 0) @@ -810,25 +807,23 @@ static void spr_scan(void) if (x > 152) i = 160 - x; else i = 8; } - - byte pal = vs->pal; - + pal = vs->pal; if (vs->pri) { - byte *bg = bgdup + (dest - BUF); + bg = bgdup + (dest - BUF); while (i--) { - byte b = src[i]; + b = src[i]; if (b && !(bg[i]&3)) dest[i] = pal|b; } } else if (hw.cgb) { - byte *bg = bgdup + (dest - BUF); - byte *pri = PRI + (dest - BUF); + bg = bgdup + (dest - BUF); + pri = PRI + (dest - BUF); while (i--) { - byte b = src[i]; + b = src[i]; if (b && (!pri[i] || !(bg[i]&3))) dest[i] = pal|b; } diff --git a/apps/plugins/rockboy/sound.c b/apps/plugins/rockboy/sound.c index c1b06a1bd7..041b7831d3 100644 --- a/apps/plugins/rockboy/sound.c +++ b/apps/plugins/rockboy/sound.c @@ -116,6 +116,9 @@ struct snd snd IBSS_ATTR; static void gbSoundChannel1(int *r, int *l) { int vol = S1.envol; + + int freq = 0; + int value = 0; if(S1.on && (S1.len || !S1.cont)) @@ -169,7 +172,7 @@ static void gbSoundChannel1(int *r, int *l) if(S1.swlen<=0) { - int freq = (((int)(R_NR14&7) << 8) | R_NR13); + freq = (((int)(R_NR14&7) << 8) | R_NR13); int updown = 1; -- cgit v1.2.3