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
This commit is contained in:
Karl Kurbjun 2008-11-12 03:57:32 +00:00
parent 68c686957b
commit d42041043b
12 changed files with 284 additions and 32 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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;