Author: musuruan
Update of /cvs/nonfree/rpms/e-uae/F-20
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv19411
Modified Files:
e-uae.spec
Added Files:
e-uae-0.8.29-blitter.patch e-uae-0.8.29-fix-do-while-0.patch
e-uae-0.8.29-fix-string-format-bug.patch
Log Message:
* Wed Sep 03 2014 Andrea Musuruane <musuruan(a)gmail.com> - 0.8.29-0.19.wip4
- Fix FTBFS because of -Wno-format flag
- Added a patch to fix some new compiler warnings in GCC 4.3
- Added a patch to fix string bugs
- Added a patch to fix blitter handling when an active channel's address
is zero
- Dropped desktop vendor tag
- Dropped obsolete Group, Buildroot, %clean and %defattr
- Dropped cleaning at the beginning of %install
- Updated icon cache scriptlets
- Fix file permissions
- Fix end-of-line encoding
e-uae-0.8.29-blitter.patch:
blitter.c | 56 +++++++++++++--------------
genblitter.c | 112 +++++++++++++++++++++++++++---------------------------
include/blitter.h | 2
3 files changed, 85 insertions(+), 85 deletions(-)
--- NEW FILE e-uae-0.8.29-blitter.patch ---
From 1447891c79277a7f9a931c76881172618f4ba474 Mon Sep 17 00:00:00 2001
From: Keir <keir.xen(a)gmail.com>
Date: Wed, 22 Jan 2014 14:17:48 +0000
Subject: [PATCH] Fix blitter handling when an active channel's address is
zero.
---
src/blitter.c | 56 ++++++++++++-------------
src/genblitter.c | 112 +++++++++++++++++++++++++-------------------------
src/include/blitter.h | 2 +-
3 files changed, 85 insertions(+), 85 deletions(-)
diff --git a/src/blitter.c b/src/blitter.c
index 4bf0334..e68a22b 100644
--- a/src/blitter.c
+++ b/src/blitter.c
@@ -274,31 +274,31 @@ static void blitter_dofast (void)
{
int i,j;
uaecptr bltadatptr = 0, bltbdatptr = 0, bltcdatptr = 0, bltddatptr = 0;
- uae_u8 mt = bltcon0 & 0xFF;
+ uae_u8 mt = bltcon0 & 0xFF, chen = bltcon0 >> 8;
blit_masktable[0] = blt_info.bltafwm;
blit_masktable[blt_info.hblitsize - 1] &= blt_info.bltalwm;
- if (bltcon0 & 0x800) {
+ if (chen & 8) {
bltadatptr = bltapt;
bltapt += (blt_info.hblitsize*2 + blt_info.bltamod)*blt_info.vblitsize;
}
- if (bltcon0 & 0x400) {
+ if (chen & 4) {
bltbdatptr = bltbpt;
bltbpt += (blt_info.hblitsize*2 + blt_info.bltbmod)*blt_info.vblitsize;
}
- if (bltcon0 & 0x200) {
+ if (chen & 2) {
bltcdatptr = bltcpt;
bltcpt += (blt_info.hblitsize*2 + blt_info.bltcmod)*blt_info.vblitsize;
}
- if (bltcon0 & 0x100) {
+ if (chen & 1) {
bltddatptr = bltdpt;
bltdpt += (blt_info.hblitsize*2 + blt_info.bltdmod)*blt_info.vblitsize;
}
#ifdef SPEEDUP
if (blitfunc_dofast[mt] && !blitfill) {
- (*blitfunc_dofast[mt])(bltadatptr, bltbdatptr, bltcdatptr, bltddatptr, &blt_info);
+ (*blitfunc_dofast[mt])(chen, bltadatptr, bltbdatptr, bltcdatptr, bltddatptr,
&blt_info);
} else
#endif
{
@@ -313,7 +313,7 @@ static void blitter_dofast (void)
for (i = 0; i < blt_info.hblitsize; i++) {
uae_u32 bltadat, blitahold;
uae_u16 bltbdat;
- if (bltadatptr) {
+ if (chen & 8) {
blt_info.bltadat = bltadat = chipmem_wget (bltadatptr);
bltadatptr += 2;
} else
@@ -322,14 +322,14 @@ static void blitter_dofast (void)
blitahold = (((uae_u32)preva << 16) | bltadat) >> blt_info.blitashift;
preva = bltadat;
- if (bltbdatptr) {
+ if (chen & 4) {
blt_info.bltbdat = bltbdat = chipmem_wget (bltbdatptr);
bltbdatptr += 2;
blitbhold = (((uae_u32)prevb << 16) | bltbdat) >> blt_info.blitbshift;
prevb = bltbdat;
}
- if (bltcdatptr) {
+ if (chen & 2) {
blt_info.bltcdat = chipmem_wget (bltcdatptr);
bltcdatptr += 2;
}
@@ -345,16 +345,16 @@ static void blitter_dofast (void)
}
if (blt_info.bltddat)
blt_info.blitzero = 0;
- if (bltddatptr) {
+ if (chen & 1) {
dodst = 1;
dstp = bltddatptr;
bltddatptr += 2;
}
}
- if (bltadatptr) bltadatptr += blt_info.bltamod;
- if (bltbdatptr) bltbdatptr += blt_info.bltbmod;
- if (bltcdatptr) bltcdatptr += blt_info.bltcmod;
- if (bltddatptr) bltddatptr += blt_info.bltdmod;
+ if (chen & 8) bltadatptr += blt_info.bltamod;
+ if (chen & 4) bltbdatptr += blt_info.bltbmod;
+ if (chen & 2) bltcdatptr += blt_info.bltcmod;
+ if (chen & 1) bltddatptr += blt_info.bltdmod;
}
if (dodst) chipmem_wput (dstp, blt_info.bltddat);
blt_info.bltbhold = blitbhold;
@@ -369,30 +369,30 @@ static void blitter_dofast_desc (void)
{
int i,j;
uaecptr bltadatptr = 0, bltbdatptr = 0, bltcdatptr = 0, bltddatptr = 0;
- uae_u8 mt = bltcon0 & 0xFF;
+ uae_u8 mt = bltcon0 & 0xFF, chen = bltcon0 >> 8;
blit_masktable[0] = blt_info.bltafwm;
blit_masktable[blt_info.hblitsize - 1] &= blt_info.bltalwm;
- if (bltcon0 & 0x800) {
+ if (chen & 8) {
bltadatptr = bltapt;
bltapt -= (blt_info.hblitsize*2 + blt_info.bltamod)*blt_info.vblitsize;
}
- if (bltcon0 & 0x400) {
+ if (chen & 4) {
bltbdatptr = bltbpt;
bltbpt -= (blt_info.hblitsize*2 + blt_info.bltbmod)*blt_info.vblitsize;
}
- if (bltcon0 & 0x200) {
+ if (chen & 2) {
bltcdatptr = bltcpt;
bltcpt -= (blt_info.hblitsize*2 + blt_info.bltcmod)*blt_info.vblitsize;
}
- if (bltcon0 & 0x100) {
+ if (chen & 1) {
bltddatptr = bltdpt;
bltdpt -= (blt_info.hblitsize*2 + blt_info.bltdmod)*blt_info.vblitsize;
}
#ifdef SPEEDUP
if (blitfunc_dofast_desc[mt] && !blitfill) {
- (*blitfunc_dofast_desc[mt])(bltadatptr, bltbdatptr, bltcdatptr, bltddatptr,
&blt_info);
+ (*blitfunc_dofast_desc[mt])(chen, bltadatptr, bltbdatptr, bltcdatptr, bltddatptr,
&blt_info);
} else
#endif
{
@@ -406,7 +406,7 @@ static void blitter_dofast_desc (void)
for (i = 0; i < blt_info.hblitsize; i++) {
uae_u32 bltadat, blitahold;
uae_u16 bltbdat;
- if (bltadatptr) {
+ if (chen & 8) {
bltadat = blt_info.bltadat = chipmem_wget (bltadatptr);
bltadatptr -= 2;
} else
@@ -415,14 +415,14 @@ static void blitter_dofast_desc (void)
blitahold = (((uae_u32)bltadat << 16) | preva) >> blt_info.blitdownashift;
preva = bltadat;
- if (bltbdatptr) {
+ if (chen & 4) {
blt_info.bltbdat = bltbdat = chipmem_wget (bltbdatptr);
bltbdatptr -= 2;
blitbhold = (((uae_u32)bltbdat << 16) | prevb) >>
blt_info.blitdownbshift;
prevb = bltbdat;
}
- if (bltcdatptr) {
+ if (chen & 2) {
blt_info.bltcdat = blt_info.bltbdat = chipmem_wget (bltcdatptr);
bltcdatptr -= 2;
}
@@ -438,16 +438,16 @@ static void blitter_dofast_desc (void)
}
if (blt_info.bltddat)
blt_info.blitzero = 0;
- if (bltddatptr) {
+ if (chen & 1) {
dstp = bltddatptr;
dodst = 1;
bltddatptr -= 2;
}
}
- if (bltadatptr) bltadatptr -= blt_info.bltamod;
- if (bltbdatptr) bltbdatptr -= blt_info.bltbmod;
- if (bltcdatptr) bltcdatptr -= blt_info.bltcmod;
- if (bltddatptr) bltddatptr -= blt_info.bltdmod;
+ if (chen & 8) bltadatptr -= blt_info.bltamod;
+ if (chen & 4) bltbdatptr -= blt_info.bltbmod;
+ if (chen & 2) bltcdatptr -= blt_info.bltcmod;
+ if (chen & 1) bltddatptr -= blt_info.bltdmod;
}
if (dodst) chipmem_wput (dstp, blt_info.bltddat);
blt_info.bltbhold = blitbhold;
diff --git a/src/genblitter.c b/src/genblitter.c
index ba37b37..28b664b 100644
--- a/src/genblitter.c
+++ b/src/genblitter.c
@@ -48,9 +48,9 @@ static void generate_func(void)
for (i = 0; i < sizeof(blttbl); i++) {
int active = blitops[blttbl[i]].used;
int a_is_on = active & 1, b_is_on = active & 2, c_is_on = active & 4;
- printf("void blitdofast_%x (uaecptr pta, uaecptr ptb, uaecptr ptc, uaecptr ptd,
struct bltinfo *b)\n",blttbl[i]);
+ printf("void blitdofast_%x (uae_u8 chen, uaecptr pta, uaecptr ptb, uaecptr ptc,
uaecptr ptd, struct bltinfo *b)\n",blttbl[i]);
printf("{\n");
- printf("int i,j;\n");
+ printf("int i,j,dodst=0;\n");
printf("uae_u32 totald = 0;\n");
#if 0
printf("if (currprefs.blits_32bit_enabled && b->hblitsize >
1");
@@ -64,30 +64,30 @@ static void generate_func(void)
printf("int count=b->hblitsize/2, oddword=b->hblitsize&1;\n");
printf("for (j=0;j<b->vblitsize;j++) {\n");
printf("\tfor(i=0;i<count;i++) {\n");
- if (a_is_on) printf("\t\tif (pta) {srca=*((uae_u32 *)pta); pta += 4;}\n");
- if (b_is_on) printf("\t\tif (ptb) {srcb=*((uae_u32 *)ptb); ptb += 4;}\n");
- if (c_is_on) printf("\t\tif (ptc) {srcc=*((uae_u32 *)ptc); ptc += 4;}\n");
+ if (a_is_on) printf("\t\tif (chen&8) {srca=*((uae_u32 *)pta); pta +=
4;}\n");
+ if (b_is_on) printf("\t\tif (chen&4) {srcb=*((uae_u32 *)ptb); ptb +=
4;}\n");
+ if (c_is_on) printf("\t\tif (chen&2) {srcc=*((uae_u32 *)ptc); ptc +=
4;}\n");
printf("\t\tdest = %s;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dest;\n");
- printf("\t\tif (ptd) {*(uae_u32 *)ptd=dest; ptd += 4;}\n");
+ printf("\t\tif (chen&1) {*(uae_u32 *)ptd=dest; ptd += 4;}\n");
printf("\t}\n");
printf("\tif (oddword) {\n");
- if (a_is_on) printf("\t\tif (pta) { srca=(uae_u32)*(uae_u16 *)pta; pta += 2;
}\n");
- if (b_is_on) printf("\t\tif (ptb) { srcb=(uae_u32)*(uae_u16 *)ptb; ptb += 2;
}\n");
- if (c_is_on) printf("\t\tif (ptc) { srcc=(uae_u32)*(uae_u16 *)ptc; ptc += 2;
}\n");
+ if (a_is_on) printf("\t\tif (chen&8) { srca=(uae_u32)*(uae_u16 *)pta; pta += 2;
}\n");
+ if (b_is_on) printf("\t\tif (chen&4) { srcb=(uae_u32)*(uae_u16 *)ptb; ptb += 2;
}\n");
+ if (c_is_on) printf("\t\tif (chen&2) { srcc=(uae_u32)*(uae_u16 *)ptc; ptc += 2;
}\n");
printf("\t\tdest = %s;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dest;\n");
- printf("\t\tif (ptd) { *(uae_u16 *)ptd= dest; ptd += 2; }\n");
+ printf("\t\tif (chen&1) { *(uae_u16 *)ptd= dest; ptd += 2; }\n");
printf("\t}\n");
- if (a_is_on) printf("\tif (pta) pta += b->bltamod;\n");
- if (b_is_on) printf("\tif (ptb) ptb += b->bltbmod;\n");
- if (c_is_on) printf("\tif (ptc) ptc += b->bltcmod;\n");
- printf("\tif (ptd) ptd += b->bltdmod;\n");
+ if (a_is_on) printf("\tif (chen&8) pta += b->bltamod;\n");
+ if (b_is_on) printf("\tif (chen&4) ptb += b->bltbmod;\n");
+ if (c_is_on) printf("\tif (chen&2) ptc += b->bltcmod;\n");
+ printf("\tif (chen&1) ptd += b->bltdmod;\n");
printf("}\n");
- if (a_is_on) printf("if (pta) b->bltadat = (*(pta-b->bltamod-2) << 8) |
*(pta - b->bltamod - 1);\n"); /* Maybe not necessary, but I don't want
problems */
- if (b_is_on) printf("if (ptb) b->bltbdat = (*(ptb-b->bltbmod-2) << 8) |
*(ptb - b->bltbmod - 1);\n");
- if (c_is_on) printf("if (ptc) b->bltcdat = (*(ptc-b->bltcmod-2) << 8) |
*(ptc - b->bltcmod - 1);\n");
- printf("if (ptd) b->bltddat = (*(ptd-b->bltdmod-2) << 8) | *(ptd -
b->bltdmod - 1);\n");
+ if (a_is_on) printf("if (chen&8) b->bltadat = (*(pta-b->bltamod-2)
<< 8) | *(pta - b->bltamod - 1);\n"); /* Maybe not necessary, but I
don't want problems */
+ if (b_is_on) printf("if (chen&4) b->bltbdat = (*(ptb-b->bltbmod-2)
<< 8) | *(ptb - b->bltbmod - 1);\n");
+ if (c_is_on) printf("if (chen&2) b->bltcdat = (*(ptc-b->bltcmod-2)
<< 8) | *(ptc - b->bltcmod - 1);\n");
+ printf("if (chen&1) b->bltddat = (*(ptd-b->bltdmod-2) << 8) | *(ptd
- b->bltdmod - 1);\n");
printf("} else {\n");
#endif
@@ -98,37 +98,37 @@ static void generate_func(void)
printf("uaecptr dstp = 0;\n");
printf("for (j = b->vblitsize; j--; ) {\n");
printf("\tfor (i = 0; i < b->hblitsize; i++) {\n\t\tuae_u32 bltadat,
srca;\n\n");
- if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget (ptc); ptc += 2;
}\n");
- if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat =
chipmem_wget (ptb); ptb += 2;\n");
+ if (c_is_on) printf("\t\tif (chen&2) { srcc = chipmem_wget (ptc); ptc += 2;
}\n");
+ if (b_is_on) printf("\t\tif (chen&4) {\n\t\t\tuae_u32 bltbdat =
blt_info.bltbdat = chipmem_wget (ptb); ptb += 2;\n");
if (b_is_on) printf("\t\t\tsrcb = (((uae_u32)prevb << 16) | bltbdat) >>
b->blitbshift;\n");
if (b_is_on) printf("\t\t\tprevb = bltbdat;\n\t\t}\n");
- if (a_is_on) printf("\t\tif (pta) { bltadat = blt_info.bltadat = chipmem_wget
(pta); pta += 2; } else { bltadat = blt_info.bltadat; }\n");
+ if (a_is_on) printf("\t\tif (chen&8) { bltadat = blt_info.bltadat =
chipmem_wget (pta); pta += 2; } else { bltadat = blt_info.bltadat; }\n");
if (a_is_on) printf("\t\tbltadat &= blit_masktable[i];\n");
if (a_is_on) printf("\t\tsrca = (((uae_u32)preva << 16) | bltadat) >>
b->blitashift;\n");
if (a_is_on) printf("\t\tpreva = bltadat;\n");
- printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n");
+ printf("\t\tif (dodst) chipmem_wput (dstp, dstd);\n");
printf("\t\tdstd = (%s) & 0xFFFF;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dstd;\n");
- printf("\t\tif (ptd) { dstp = ptd; ptd += 2; }\n");
+ printf("\t\tif (chen&1) { dodst = 1; dstp = ptd; ptd += 2; }\n");
printf("\t}\n");
- if (a_is_on) printf("\tif (pta) pta += b->bltamod;\n");
- if (b_is_on) printf("\tif (ptb) ptb += b->bltbmod;\n");
- if (c_is_on) printf("\tif (ptc) ptc += b->bltcmod;\n");
- printf("\tif (ptd) ptd += b->bltdmod;\n");
+ if (a_is_on) printf("\tif (chen&8) pta += b->bltamod;\n");
+ if (b_is_on) printf("\tif (chen&4) ptb += b->bltbmod;\n");
+ if (c_is_on) printf("\tif (chen&2) ptc += b->bltcmod;\n");
+ printf("\tif (chen&1) ptd += b->bltdmod;\n");
printf("}\n");
if (b_is_on) printf("b->bltbhold = srcb;\n");
printf("b->bltcdat = srcc;\n");
- printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n");
+ printf("\t\tif (dodst) chipmem_wput (dstp, dstd);\n");
#if 0
printf("}\n");
#endif
printf("if (totald != 0) b->blitzero = 0;\n");
printf("}\n");
- printf("void blitdofast_desc_%x (uaecptr pta, uaecptr ptb, uaecptr ptc, uaecptr
ptd, struct bltinfo *b)\n",blttbl[i]);
+ printf("void blitdofast_desc_%x (uae_u8 chen, uaecptr pta, uaecptr ptb, uaecptr
ptc, uaecptr ptd, struct bltinfo *b)\n",blttbl[i]);
printf("{\n");
printf("uae_u32 totald = 0;\n");
- printf("int i,j;\n");
+ printf("int i,j,dodst=0;\n");
#if 0
printf("if (currprefs.blits_32bit_enabled && b->hblitsize >
1");
if (a_is_on) printf(" && !b->blitashift && b->bltafwm==0xffff
&& b->bltalwm==0xffff");
@@ -141,30 +141,30 @@ static void generate_func(void)
printf("int count=b->hblitsize/2, oddword=b->hblitsize&1;\n");
printf("for (j=0;j<b->vblitsize;j++) {\n");
printf("\tfor(i=0;i<count;i++) {\n");
- if (a_is_on) printf("\t\tif (pta) { srca=*((uae_u32 *)(pta-2)); pta -=
4;}\n");
- if (b_is_on) printf("\t\tif (ptb) { srcb=*((uae_u32 *)(ptb-2)); ptb -=
4;}\n");
- if (c_is_on) printf("\t\tif (ptc) { srcc=*((uae_u32 *)(ptc-2)); ptc -=
4;}\n");
+ if (a_is_on) printf("\t\tif (chen&8) { srca=*((uae_u32 *)(pta-2)); pta -=
4;}\n");
+ if (b_is_on) printf("\t\tif (chen&4) { srcb=*((uae_u32 *)(ptb-2)); ptb -=
4;}\n");
+ if (c_is_on) printf("\t\tif (chen&2) { srcc=*((uae_u32 *)(ptc-2)); ptc -=
4;}\n");
printf("\t\tdest = %s;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dest;\n");
- printf("\t\tif (ptd) {*(uae_u32 *)(ptd-2)=dest; ptd -= 4;}\n");
+ printf("\t\tif (chen&1) {*(uae_u32 *)(ptd-2)=dest; ptd -= 4;}\n");
printf("\t}\n");
printf("\tif (oddword) {\n");
- if (a_is_on) printf("\t\tif (pta) { srca=(uae_u32)*(uae_u16 *)pta; pta -= 2;
}\n");
- if (b_is_on) printf("\t\tif (ptb) { srcb=(uae_u32)*(uae_u16 *)ptb; ptb -= 2;
}\n");
- if (c_is_on) printf("\t\tif (ptc) { srcc=(uae_u32)*(uae_u16 *)ptc; ptc -= 2;
}\n");
+ if (a_is_on) printf("\t\tif (chen&8) { srca=(uae_u32)*(uae_u16 *)pta; pta -= 2;
}\n");
+ if (b_is_on) printf("\t\tif (chen&4) { srcb=(uae_u32)*(uae_u16 *)ptb; ptb -= 2;
}\n");
+ if (c_is_on) printf("\t\tif (chen&2) { srcc=(uae_u32)*(uae_u16 *)ptc; ptc -= 2;
}\n");
printf("\t\tdest = %s;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dest;\n");
- printf("\t\tif (ptd) { *(uae_u16 *)ptd= dest; ptd -= 2; }\n");
+ printf("\t\tif (chen&1) { *(uae_u16 *)ptd= dest; ptd -= 2; }\n");
printf("\t}\n");
- if (a_is_on) printf("\tif (pta) pta -= b->bltamod;\n");
- if (b_is_on) printf("\tif (ptb) ptb -= b->bltbmod;\n");
- if (c_is_on) printf("\tif (ptc) ptc -= b->bltcmod;\n");
- printf("\tif (ptd) ptd-=b->bltdmod;\n");
+ if (a_is_on) printf("\tif (chen&8) pta -= b->bltamod;\n");
+ if (b_is_on) printf("\tif (chen&4) ptb -= b->bltbmod;\n");
+ if (c_is_on) printf("\tif (chen&2) ptc -= b->bltcmod;\n");
+ printf("\tif (chen&1) ptd-=b->bltdmod;\n");
printf("}\n");
- if (a_is_on) printf("if (pta) b->bltadat = (*(pta + b->bltamod + 2) <<
8) | *(pta + b->bltamod + 1);\n"); /* Maybe not necessary, but I don't want
problems */
- if (b_is_on) printf("if (ptb) b->bltbdat = (*(ptb + b->bltbmod + 2) <<
8) | *(ptb + b->bltbmod + 1);\n");
- if (c_is_on) printf("if (ptc) b->bltcdat = (*(ptc + b->bltcmod + 2) <<
8) | *(ptc + b->bltcmod + 1);\n");
- printf("if (ptd) b->bltddat = (*(ptd + b->bltdmod + 2) << 8) | *(ptd +
b->bltdmod + 1);\n");
+ if (a_is_on) printf("if (chen&8) b->bltadat = (*(pta + b->bltamod + 2)
<< 8) | *(pta + b->bltamod + 1);\n"); /* Maybe not necessary, but I
don't want problems */
+ if (b_is_on) printf("if (chen&4) b->bltbdat = (*(ptb + b->bltbmod + 2)
<< 8) | *(ptb + b->bltbmod + 1);\n");
+ if (c_is_on) printf("if (chen&2) b->bltcdat = (*(ptc + b->bltcmod + 2)
<< 8) | *(ptc + b->bltcmod + 1);\n");
+ printf("if (chen&1) b->bltddat = (*(ptd + b->bltdmod + 2) << 8) |
*(ptd + b->bltdmod + 1);\n");
printf("} else {\n");
#endif
@@ -175,27 +175,27 @@ static void generate_func(void)
printf("uaecptr dstp = 0;\n");
printf("for (j = b->vblitsize; j--; ) {\n");
printf("\tfor (i = 0; i < b->hblitsize; i++) {\n\t\tuae_u32 bltadat,
srca;\n");
- if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget (ptc); ptc -= 2;
}\n");
- if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat =
chipmem_wget (ptb); ptb -= 2;\n");
+ if (c_is_on) printf("\t\tif (chen&2) { srcc = chipmem_wget (ptc); ptc -= 2;
}\n");
+ if (b_is_on) printf("\t\tif (chen&4) {\n\t\t\tuae_u32 bltbdat =
blt_info.bltbdat = chipmem_wget (ptb); ptb -= 2;\n");
if (b_is_on) printf("\t\t\tsrcb = ((bltbdat << 16) | prevb) >>
b->blitdownbshift;\n");
if (b_is_on) printf("\t\t\tprevb = bltbdat;\n\t\t}\n");
- if (a_is_on) printf("\t\tif (pta) { bltadat = blt_info.bltadat = chipmem_wget
(pta); pta -= 2; } else { bltadat = blt_info.bltadat; }\n");
+ if (a_is_on) printf("\t\tif (chen&8) { bltadat = blt_info.bltadat =
chipmem_wget (pta); pta -= 2; } else { bltadat = blt_info.bltadat; }\n");
if (a_is_on) printf("\t\tbltadat &= blit_masktable[i];\n");
if (a_is_on) printf("\t\tsrca = (((uae_u32)bltadat << 16) | preva) >>
b->blitdownashift;\n");
if (a_is_on) printf("\t\tpreva = bltadat;\n");
- printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n");
+ printf("\t\tif (dodst) chipmem_wput (dstp, dstd);\n");
printf("\t\tdstd = (%s) & 0xFFFF;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dstd;\n");
- printf("\t\tif (ptd) { dstp = ptd; ptd -= 2; }\n");
+ printf("\t\tif (chen&1) { dodst = 1; dstp = ptd; ptd -= 2; }\n");
printf("\t}\n");
- if (a_is_on) printf("\tif (pta) pta -= b->bltamod;\n");
- if (b_is_on) printf("\tif (ptb) ptb -= b->bltbmod;\n");
- if (c_is_on) printf("\tif (ptc) ptc -= b->bltcmod;\n");
- printf("\tif (ptd) ptd -= b->bltdmod;\n");
+ if (a_is_on) printf("\tif (chen&8) pta -= b->bltamod;\n");
+ if (b_is_on) printf("\tif (chen&4) ptb -= b->bltbmod;\n");
+ if (c_is_on) printf("\tif (chen&2) ptc -= b->bltcmod;\n");
+ printf("\tif (chen&1) ptd -= b->bltdmod;\n");
printf("}\n");
if (b_is_on) printf("b->bltbhold = srcb;\n");
printf("b->bltcdat = srcc;\n");
- printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n");
+ printf("\t\tif (dodst) chipmem_wput (dstp, dstd);\n");
#if 0
printf("}\n");
#endif
diff --git a/src/include/blitter.h b/src/include/blitter.h
index 97e8f89..53d5d11 100644
--- a/src/include/blitter.h
+++ b/src/include/blitter.h
@@ -36,7 +36,7 @@ extern void decide_blitter (unsigned int hpos);
extern void blitter_done_notify (void);
extern void blitter_slowdown (int, int, unsigned int, unsigned int);
-typedef void blitter_func(uaecptr, uaecptr, uaecptr, uaecptr, struct bltinfo *);
+typedef void blitter_func(uae_u8, uaecptr, uaecptr, uaecptr, uaecptr, struct bltinfo *);
#define BLITTER_MAX_WORDS 2048
e-uae-0.8.29-fix-do-while-0.patch:
bsdsocket-posix-new.c | 2 +-
gfx-sdl/sdlgfx.c | 2 +-
gui-gtk/gtkui.c | 2 +-
hardfile_unix.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE e-uae-0.8.29-fix-do-while-0.patch ---
From 37a95d052b08b40877d5594dc2331af8c7a136dc Mon Sep 17 00:00:00 2001
From: Keir <keir.xen(a)gmail.com>
Date: Wed, 22 Jan 2014 11:00:29 +0000
Subject: [PATCH] fix-do-while-0
---
src/bsdsocket-posix-new.c | 2 +-
src/gfx-sdl/sdlgfx.c | 2 +-
src/gui-gtk/gtkui.c | 2 +-
src/hardfile_unix.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/bsdsocket-posix-new.c b/src/bsdsocket-posix-new.c
index ded82a7..1e76869 100644
--- a/src/bsdsocket-posix-new.c
+++ b/src/bsdsocket-posix-new.c
@@ -56,7 +56,7 @@
#ifdef DEBUG_BSDSOCKET
#define DEBUG_LOG write_log
#else
-#define DEBUG_LOG(...) do ; while(0)
+#define DEBUG_LOG(...) do {} while(0)
#endif
#define WAITSIGNAL waitsig (context, sb)
diff --git a/src/gfx-sdl/sdlgfx.c b/src/gfx-sdl/sdlgfx.c
index 5615ed0..63de75f 100644
--- a/src/gfx-sdl/sdlgfx.c
+++ b/src/gfx-sdl/sdlgfx.c
@@ -52,7 +52,7 @@
#ifdef DEBUG
#define DEBUG_LOG write_log
#else
-#define DEBUG_LOG(...) do ; while(0)
+#define DEBUG_LOG(...) do {} while(0)
#endif
static SDL_Surface *display;
diff --git a/src/gui-gtk/gtkui.c b/src/gui-gtk/gtkui.c
index 8a4f264..6cae5cc 100644
--- a/src/gui-gtk/gtkui.c
+++ b/src/gui-gtk/gtkui.c
@@ -49,7 +49,7 @@
#ifdef GUI_DEBUG
#define DEBUG_LOG write_log( "%s: ", __func__); write_log
#else
-#define DEBUG_LOG(...) do ; while(0)
+#define DEBUG_LOG(...) do {} while(0)
#endif
static int gui_active;
diff --git a/src/hardfile_unix.c b/src/hardfile_unix.c
index 34420a0..5f8b9c3 100644
--- a/src/hardfile_unix.c
+++ b/src/hardfile_unix.c
@@ -16,7 +16,7 @@
#ifdef HDF_DEBUG
#define DEBUG_LOG write_log( "%s: ", __func__); write_log
#else
-#define DEBUG_LOG(...) do ; while(0)
+#define DEBUG_LOG(...) do {} while(0)
#endif
e-uae-0.8.29-fix-string-format-bug.patch:
cfgfile.c | 2 +-
enforcer.c | 4 ++--
gui-gtk/gtkui.c | 2 +-
newcpu.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--- NEW FILE e-uae-0.8.29-fix-string-format-bug.patch ---
--- src/gui-gtk/gtkui.c 2007-03-12 16:21:17.000000000 -0400
+++ src/gui-gtk/gtkui.c 2012-01-27 13:00:33.000000000 -0500
@@ -2244,7 +2244,7 @@
if (gui_available)
do_message_box (NULL, msg, TRUE, TRUE);
- write_log (msg);
+ write_log ("%s", msg);
}
void gui_notify_state (int state)
--- src/newcpu.c 2007-03-27 21:27:18.000000000 -0400
+++ src/newcpu.c 2012-01-27 13:07:48.000000000 -0500
@@ -2075,7 +2075,7 @@
}
while (i++ < 5)
f_out (f, " ");
- f_out (f, instrname);
+ f_out (f, "%s", instrname);
if (ccpt != 0) {
if (deaddr)
--- src/cfgfile.c 2007-03-27 21:39:39.000000000 -0400
+++ src/cfgfile.c 2012-01-27 13:17:52.000000000 -0500
@@ -289,7 +289,7 @@
va_start (parms, format);
vsprintf (tmp, format, parms);
- fprintf (f, tmp);
+ fprintf (f, "%s", tmp);
va_end (parms);
}
--- src/enforcer.c 2007-02-16 16:44:18.000000000 -0500
+++ src/enforcer.c 2012-01-27 13:24:42.000000000 -0500
@@ -334,8 +334,8 @@
sprintf (enforcer_buf_ptr, "Name: \"%s\"\n\n",
native_task_name);
enforcer_buf_ptr += strlen (enforcer_buf_ptr);
- console_out (enforcer_buf);
- write_log (enforcer_buf);
+ console_out ("%s", enforcer_buf);
+ write_log ("%s", enforcer_buf);
enforcer_hit = 0;
flashscreen = 30;
Index: e-uae.spec
===================================================================
RCS file: /cvs/nonfree/rpms/e-uae/F-20/e-uae.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- e-uae.spec 12 Mar 2013 19:25:31 -0000 1.8
+++ e-uae.spec 13 Sep 2014 15:30:57 -0000 1.9
@@ -1,8 +1,8 @@
Name: e-uae
Version: 0.8.29
-Release: 0.17.wip4%{?dist}
+Release: 0.19.wip4%{?dist}
Summary: A powerful Amiga Emulator, based on UAE
-Group: Applications/Emulators
+
License: GPLv2+
URL:
http://www.rcdrummond.net/uae/
Source0:
http://www.rcdrummond.net/uae/%{name}-%{version}-WIP4/%{name}-%{version}-...
@@ -13,7 +13,15 @@
Patch2: %{name}-0.8.29-execstack.patch
# patch from upstream to fix a 64bit gtk+ bug
Patch3: %{name}-0.8.29-gtk_64bit.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# patch from upstream to fix some new compiler warnings in GCC 4.3
+Patch4: %{name}-0.8.29-fix-do-while-0.patch
+# patch from mandriva to fix string bugs (made by codebase7 AT yahoo DOT com)
+Patch5: %{name}-0.8.29-fix-string-format-bug.patch
+# patch from Keir Fraser to fix blitter handling when an active channel's
+# address is zero
+#
https://github.com/keirf/e-uae/commit/1447891c79277a7f9a931c76881172618f4...
+Patch6: %{name}-0.8.29-blitter.patch
+
BuildRequires: desktop-file-utils
BuildRequires: gtk2-devel => 2.0.0
BuildRequires: libICE-devel
@@ -42,12 +50,24 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p0
+%patch6 -p1
+
+# Delete -Wno-format from WARNING_CFLAGS in configure
+sed -i 's/-Wno-format //' configure configure.in
# Encoding fixes
iconv -f iso8859-1 ChangeLog -t utf8 > ChangeLog.conv && /bin/mv -f
ChangeLog.conv ChangeLog
# Permission fixes
-chmod -x src/crc32.c
+chmod -x src/crc32.c src/include/crc32.h src/include/caps.h
+
+# Fix end-of-line encoding
+for txtfile in src/include/crc32.h src/include/caps.h
+do
+ sed -i 's/\r//' $txtfile
+done
%build
@@ -64,6 +84,7 @@
# --enable-natmem : Defaults to yes on Linux
# --enable-autoconfig : Defaults to yes if threads enabled (they should be)
# --enable-fdi : Defaults to on
+
%ifarch %{ix86} x86_64 ppc
# Fix for libcaps support
export LDFLAGS=-lstdc++
@@ -103,25 +124,17 @@
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
install -pm0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
-desktop-file-install --vendor dribble \
- --dir %{buildroot}%{_datadir}/applications \
- %{name}.desktop
-
-
-%clean
-rm -rf %{buildroot}
+desktop-file-install \
+ --dir %{buildroot}%{_datadir}/applications \
+ %{name}.desktop
%post
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
# SELinux support
%ifarch %{ix86}
@@ -131,9 +144,9 @@
%postun
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
# SELinux support
@@ -144,16 +157,35 @@
%endif
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
%files
-%defattr(-,root,root,-)
%{_bindir}/uae
%{_bindir}/readdisk
-%{_datadir}/applications/dribble-e-uae.desktop
+%{_datadir}/applications/e-uae.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%doc docs/* ChangeLog COPYING README
%changelog
+* Wed Sep 03 2014 Andrea Musuruane <musuruan(a)gmail.com> - 0.8.29-0.19.wip4
+- Fix FTBFS because of -Wno-format flag
+- Added a patch to fix some new compiler warnings in GCC 4.3
+- Added a patch to fix string bugs
+- Added a patch to fix blitter handling when an active channel's address
+ is zero
+- Dropped desktop vendor tag
+- Dropped obsolete Group, Buildroot, %%clean and %%defattr
+- Dropped cleaning at the beginning of %%install
+- Updated icon cache scriptlets
+- Fix file permissions
+- Fix end-of-line encoding
+
+* Sun Aug 31 2014 Sérgio Basto <sergio(a)serjux.com> - 0.8.29-0.18.wip4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
* Tue Mar 12 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 0.8.29-0.17.wip4
-
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild