diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2008-11-12 03:57:32 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2008-11-12 03:57:32 +0000 |
| commit | d42041043b95617244ffdb9150c5e2f2720a8a83 (patch) | |
| tree | 71acbd2f8d8d51423d29ddbb2349ed23f77c3151 /apps/plugins | |
| parent | 68c686957b1b62671d727116e5c167cd8f080148 (diff) | |
| download | rockbox-d42041043b95617244ffdb9150c5e2f2720a8a83.zip rockbox-d42041043b95617244ffdb9150c5e2f2720a8a83.tar.gz rockbox-d42041043b95617244ffdb9150c5e2f2720a8a83.tar.bz2 rockbox-d42041043b95617244ffdb9150c5e2f2720a8a83.tar.xz | |
Add in the needed crt0.S code for the wakeup alarm also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19094 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/SOURCES | 2 | ||||
| -rw-r--r-- | apps/plugins/rockboy/cpu.c | 3 | ||||
| -rw-r--r-- | apps/plugins/rockboy/lcd.c | 33 | ||||
| -rw-r--r-- | apps/plugins/rockboy/sound.c | 5 |
4 files changed, 23 insertions, 20 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index a4ddbac..edeaf21 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -143,6 +143,8 @@ iriverify.c iriver_flash.c #endif +gigabeat_flash.c + #endif /* iFP7xx */ #if (LCD_WIDTH > 138) && (LCD_DEPTH > 1) /* Built for bitmap targets except H10 5/6gb, Archoses, iPod mini, mrobe100 and ifp*/ diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c index 1aca06f..f1926fe 100644 --- a/apps/plugins/rockboy/cpu.c +++ b/apps/plugins/rockboy/cpu.c @@ -333,8 +333,6 @@ 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) { @@ -353,6 +351,7 @@ 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)) >> unit; diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index da3b138..f62e3a9 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, j; + int i; #if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE)) int k, a, c; #endif @@ -73,10 +73,12 @@ 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 @@ -376,8 +378,8 @@ static void tilebuf(void) int base; byte *tilemap, *attrmap; int *tilebuf; - int *wrap; - static int wraptable[64] = + const int *wrap; + static const int wraptable[64] ICONST_ATTR = { 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 @@ -778,11 +780,11 @@ static void spr_enum(void) static void spr_scan(void) ICODE_ATTR; static void spr_scan(void) { - int i, x; - byte pal, b, ns = NS; - byte *src, *dest, *bg, *pri; + int i; + byte ns = NS; + byte *src, *dest; struct vissprite *vs; - static byte bgdup[256]; + static byte bgdup[256] IBSS_ATTR; if (!ns) return; @@ -791,7 +793,8 @@ static void spr_scan(void) for (; ns; ns--, vs--) { - x = vs->x; + int x = vs->x; + if (x > 159) continue; if (x < -7) continue; if (x < 0) @@ -807,23 +810,25 @@ static void spr_scan(void) if (x > 152) i = 160 - x; else i = 8; } - pal = vs->pal; + + byte pal = vs->pal; + if (vs->pri) { - bg = bgdup + (dest - BUF); + byte *bg = bgdup + (dest - BUF); while (i--) { - b = src[i]; + byte b = src[i]; if (b && !(bg[i]&3)) dest[i] = pal|b; } } else if (hw.cgb) { - bg = bgdup + (dest - BUF); - pri = PRI + (dest - BUF); + byte *bg = bgdup + (dest - BUF); + byte *pri = PRI + (dest - BUF); while (i--) { - b = src[i]; + byte 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 041b783..c1b06a1 100644 --- a/apps/plugins/rockboy/sound.c +++ b/apps/plugins/rockboy/sound.c @@ -116,9 +116,6 @@ 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)) @@ -172,7 +169,7 @@ static void gbSoundChannel1(int *r, int *l) if(S1.swlen<=0) { - freq = (((int)(R_NR14&7) << 8) | R_NR13); + int freq = (((int)(R_NR14&7) << 8) | R_NR13); int updown = 1; |