]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1420b9.zip
authorToni Wilen <twilen@winuae.net>
Wed, 25 Apr 2007 15:15:56 +0000 (18:15 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:33:23 +0000 (21:33 +0200)
28 files changed:
akiko.c
cfgfile.c
expansion.c
fpp.c
gayle.c
gencomp.c
gencpu.c
gfxutil.c
include/autoconf.h
include/gfxfilter.h
include/newcpu.h
include/options.h
memory.c
newcpu.c
od-win32/build68k_msvc/build68k_msvc.vcproj
od-win32/genblitter_msvc/genblitter_msvc.vcproj
od-win32/gencomp_msvc/gencomp_msvc.vcproj
od-win32/gencpu_msvc/gencpu_msvc.vcproj
od-win32/genlinetoscr_msvc/genlinetoscr_msvc.vcproj
od-win32/resources/winuae.rc
od-win32/scaler_more.c
od-win32/srcrelease.bat
od-win32/win32.h
od-win32/win32_scale2x.c
od-win32/win32gfx.c
od-win32/winuae_msvc/winuae_msvc.vcproj
od-win32/winuaechangelog.txt
od-win32/writelog.c

diff --git a/akiko.c b/akiko.c
index 99fb989a9e0fcbbf15397b1ea61df506588d0630..da6bc9e8dff7d3d7273bc7128401b3f4205d7ed7 100755 (executable)
--- a/akiko.c
+++ b/akiko.c
@@ -713,7 +713,8 @@ static int cdrom_command_multi (void)
        int cdrom_data_offset_end = msf2lsn (endpos);
        cdrom_data_offset = msf2lsn (seekpos);
 #if AKIKO_DEBUG_IO_CMD
-       write_log ("READ DATA FROM %06.6X (%d) TO %06.6X (%d) SPEED=%dx\n", seekpos, cdrom_data_offset, endpos, cdrom_data_offset_end, cdrom_speed);
+       write_log ("READ DATA FROM %06.6X (%d) TO %06.6X (%d) SPEED=%dx\n",
+           seekpos, cdrom_data_offset, endpos, cdrom_data_offset_end, cdrom_speed);
 #endif
        cdrom_result_buffer[1] |= 0x02;
     } else if (cdrom_command_buffer[10] & 4) { /* play audio */
index 076235dcd072008e18fd8aebae170a4e3e110b19..98f7951105aac3fd2feb245bef347d2fb85b923b 100755 (executable)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -468,6 +468,13 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
     cfgfile_write (f, "gfx_filter_scanlines=%d\n", p->gfx_filter_scanlines);
     cfgfile_write (f, "gfx_filter_scanlinelevel=%d\n", p->gfx_filter_scanlinelevel);
     cfgfile_write (f, "gfx_filter_scanlineratio=%d\n", p->gfx_filter_scanlineratio);
+    cfgfile_write (f, "gfx_filter_luminance=%d\n", p->gfx_filter_luminance);
+    cfgfile_write (f, "gfx_filter_contrast=%d\n", p->gfx_filter_contrast);
+    cfgfile_write (f, "gfx_filter_saturation=%d\n", p->gfx_filter_saturation);
+    cfgfile_write (f, "gfx_filter_gamma=%d\n", p->gfx_filter_gamma);
+    cfgfile_write (f, "gfx_filter_blur=%d\n", p->gfx_filter_blur);
+    cfgfile_write (f, "gfx_filter_noise=%d\n", p->gfx_filter_noise);
+
     cfgfile_write (f, "gfx_luminance=%d\n", p->gfx_luminance);
     cfgfile_write (f, "gfx_contrast=%d\n", p->gfx_contrast);
     cfgfile_write (f, "gfx_gamma=%d\n", p->gfx_gamma);
@@ -764,6 +771,12 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
        || cfgfile_intval (option, value, "gfx_filter_scanlines", &p->gfx_filter_scanlines, 1)
        || cfgfile_intval (option, value, "gfx_filter_scanlinelevel", &p->gfx_filter_scanlinelevel, 1)
        || cfgfile_intval (option, value, "gfx_filter_scanlineratio", &p->gfx_filter_scanlineratio, 1)
+       || cfgfile_intval (option, value, "gfx_filter_luminance", &p->gfx_filter_luminance, 1)
+       || cfgfile_intval (option, value, "gfx_filter_contrast", &p->gfx_filter_contrast, 1)
+       || cfgfile_intval (option, value, "gfx_filter_saturation", &p->gfx_filter_saturation, 1)
+       || cfgfile_intval (option, value, "gfx_filter_gamma", &p->gfx_filter_gamma, 1)
+       || cfgfile_intval (option, value, "gfx_filter_blur", &p->gfx_filter_blur, 1)
+       || cfgfile_intval (option, value, "gfx_filter_noise", &p->gfx_filter_noise, 1)
        || cfgfile_intval (option, value, "gfx_luminance", &p->gfx_luminance, 1)
        || cfgfile_intval (option, value, "gfx_contrast", &p->gfx_contrast, 1)
        || cfgfile_intval (option, value, "gfx_gamma", &p->gfx_gamma, 1)
@@ -1172,6 +1185,8 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
        return 1;
 
     if (cfgfile_intval (option, value, "cachesize", &p->cachesize, 1)
+       || cfgfile_intval (option, value, "cpu060_revision", &p->cpu060_revision, 1)
+       || cfgfile_intval (option, value, "fpu_revision", &p->fpu_revision, 1)
        || cfgfile_intval (option, value, "cdtvramcard", &p->cs_cdtvcard, 1)
        || cfgfile_intval (option, value, "fatgary", &p->cs_fatgaryrev, 1)
        || cfgfile_intval (option, value, "ramsey", &p->cs_ramseyrev, 1)
@@ -2720,6 +2735,8 @@ void default_prefs (struct uae_prefs *p, int type)
 
     p->fpu_model = 0;
     p->cpu_model = 68000;
+    p->cpu060_revision = 1;
+    p->fpu_revision = -1;
     p->m68k_speed = 0;
     p->cpu_compatible = 1;
     p->address_space_24 = 1;
@@ -2791,6 +2808,8 @@ static void buildin_default_prefs (struct uae_prefs *p)
 
     p->fpu_model = 0;
     p->cpu_model = 68000;
+    p->cpu060_revision = 1;
+    p->fpu_revision = -1;
     p->m68k_speed = 0;
     p->cpu_compatible = 1;
     p->address_space_24 = 1;
index e3db1390d060163c3cab0a3e60e31f747ca29090..a7a3041533b2b93ce09782b7b9ef8564ed812986 100755 (executable)
@@ -1055,6 +1055,23 @@ static void allocate_expamem (void)
 #endif /* SAVESTATE */
 }
 
+int need_uae_boot_rom(void)
+{
+    if (nr_units() > 0)
+       return 1;
+    if (currprefs.socket_emu)
+       return 1;
+    if (currprefs.uaeserial)
+       return 1;
+    if (currprefs.scsi)
+       return 1;
+    if (currprefs.win32_outsidemouse)
+       return 1;
+    if (currprefs.gfxmem_size)
+       return 1;
+    return 0;
+}
+
 void expamem_reset (void)
 {
     int do_mount = 1;
@@ -1079,11 +1096,8 @@ void expamem_reset (void)
        write_log ("Kickstart version is below 1.3!  Disabling autoconfig devices.\n");
        do_mount = 0;
     }
-#ifdef FILESYS
-    /* No need for filesystem stuff if there aren't any mounted.  */
-    if (nr_units() == 0)
+    if (need_uae_boot_rom() == 0)
        do_mount = 0;
-#endif
     if (fastmemory != NULL) {
        card_init[cardno] = expamem_init_fastcard;
        card_map[cardno++] = expamem_map_fastcard;
diff --git a/fpp.c b/fpp.c
index aaadd638909d509cd2052af5d45eb38b5a67bea1..78c260071dba38fbb3ea357382d6eeed6a10e090 100755 (executable)
--- a/fpp.c
+++ b/fpp.c
@@ -182,6 +182,8 @@ typedef uae_s32 tointtype;
 static int get_fpu_version(void)
 {
     int v = 0;
+    if (currprefs.fpu_revision >= 0)
+       return currprefs.fpu_revision;
     switch (currprefs.fpu_model)
     {
        case 68881:
@@ -218,7 +220,7 @@ STATIC_INLINE tointtype toint(fptype src, fptype minval, fptype maxval)
     case 0: /* to nearest */
        return (tointtype)floor (src + 0.5);
     case 1: /* to zero */
-       return (tointtype) src;
+       return (tointtype)src;
     case 2: /* down */
        return (tointtype)floor (src);
     case 3: /* up */
@@ -773,9 +775,9 @@ void fdbcc_opp (uae_u32 opcode, struct regstruct *regs, uae_u16 extra)
     } else if (!cc) {
        int reg = opcode & 0x7;
 
-       m68k_dreg (regs, reg) = ((m68k_dreg (regs, reg) & ~0xffff)
-           | ((m68k_dreg (regs, reg) - 1) & 0xffff));
-       if ((m68k_dreg (regs, reg) & 0xffff) == 0xffff)
+       m68k_dreg (regs, reg) = ((m68k_dreg (regs, reg) & 0xffff0000)
+           | (((m68k_dreg (regs, reg) & 0xffff) - 1) & 0xffff));
+       if ((m68k_dreg (regs, reg) & 0xffff) != 0xffff)
            m68k_setpc (regs, pc + disp);
     }
 }
@@ -1026,7 +1028,7 @@ void fpp_opp (uae_u32 opcode, struct regstruct *regs, uae_u16 extra)
        if ((opcode & 0x38) == 0) {
            if (extra & 0x2000) {
                if (extra & 0x1000)
-                   m68k_dreg (regs, opcode & 7) = regs->fpcr;
+                   m68k_dreg (regs, opcode & 7) = regs->fpcr & 0xffff;
                if (extra & 0x0800)
                    m68k_dreg (regs, opcode & 7) = get_fpsr ();
                if (extra & 0x0400)
@@ -1044,7 +1046,7 @@ void fpp_opp (uae_u32 opcode, struct regstruct *regs, uae_u16 extra)
        } else if ((opcode & 0x38) == 0x08) {
            if (extra & 0x2000) {
                if (extra & 0x1000)
-                   m68k_areg (regs, opcode & 7) = regs->fpcr;
+                   m68k_areg (regs, opcode & 7) = regs->fpcr & 0xffff;
                if (extra & 0x0800)
                    m68k_areg (regs, opcode & 7) = get_fpsr ();
                if (extra & 0x0400)
@@ -1090,7 +1092,7 @@ void fpp_opp (uae_u32 opcode, struct regstruct *regs, uae_u16 extra)
            }
            ad -= incr;
            if (extra & 0x1000) {
-               put_long (ad, regs->fpcr);
+               put_long (ad, regs->fpcr & 0xffff);
                ad += 4;
            }
            if (extra & 0x0800) {
@@ -1109,13 +1111,23 @@ void fpp_opp (uae_u32 opcode, struct regstruct *regs, uae_u16 extra)
        } else {
            /* FMOVEM memory->FPP */
            uae_u32 ad;
+           int incr = 0;
 
            if (get_fp_ad (opcode, &ad) == 0) {
                m68k_setpc (regs, m68k_getpc (regs) - 4);
                op_illg (opcode, regs);
                return;
            }
-           ad = (opcode & 0x38) == 0x20 ? ad - 12 : ad;
+           //ad = (opcode & 0x38) == 0x20 ? ad - 12 : ad;
+           if((opcode & 0x38) == 0x20) {
+               if (extra & 0x1000)
+                   incr += 4;
+               if (extra & 0x0800)
+                   incr += 4;
+               if (extra & 0x0400)
+                   incr += 4;
+               ad = ad - incr;
+           }
            if (extra & 0x1000) {
                regs->fpcr = get_long (ad);
                native_set_fpucw(regs->fpcr);
diff --git a/gayle.c b/gayle.c
index 196db4318670d9d79a712adfac01588dd04fd151..3f9ff644326804c811fb58c26e82714f2967140d 100755 (executable)
--- a/gayle.c
+++ b/gayle.c
@@ -135,6 +135,7 @@ struct ide_hdf
     uae_u8 status;
     int irq_delay;
     int num;
+    int bootpri; // for fake RDB
 };
 
 static struct ide_hdf idedrive[4];
@@ -1512,6 +1513,7 @@ int gayle_add_ide_unit(int ch, char *path, int blocksize, int readonly,
     ide = &idedrive[ch];
     ide->hfd.readonly = readonly;
     ide->hfd.blocksize = blocksize;
+    ide->bootpri = bootpri;
     ide->size = 0;
     if (!hdf_open(&ide->hfd, path))
        return -1;
@@ -1530,7 +1532,7 @@ int gayle_add_ide_unit(int ch, char *path, int blocksize, int readonly,
         hdf_read(&ide->hfd, buf, 0, 512);
        if (buf[0] != 0 && memcmp(buf, "RDSK", 4)) {
            ide->hfd.nrcyls = (ide->hfd.size / blocksize) / (sectors * surfaces);
-           create_virtual_rdb(&ide->hfd, rl (buf), bootpri, filesys);
+           create_virtual_rdb(&ide->hfd, rl (buf), ide->bootpri, filesys);
            while (ide->hfd.nrcyls * surfaces * sectors > ide->cyls_def * ide->secspertrack_def * ide->heads_def) {
                ide->cyls_def++;
            }
@@ -1634,6 +1636,11 @@ uae_u8 *save_ide (int num, int *len)
     save_u8(ide_feat2);
     save_u8(ide_error);
     save_u8(ide_devcon);
+    save_u64(ide->hfd.virtual_size);
+    save_u32(ide->hfd.secspertrack);
+    save_u32(ide->hfd.heads);
+    save_u32(ide->hfd.reservedblocks);
+    save_u32(ide->bootpri);
     *len = dst - dstbak;
     return dstbak;
 }
@@ -1668,7 +1675,16 @@ uae_u8 *restore_ide (uae_u8 *src)
     ide_feat2 = restore_u8();
     ide_error = restore_u8();
     ide_devcon = restore_u8();
-    gayle_add_ide_unit (num, path, blocksize, readonly, 0, 0, 0, 0, 0, 0);
+    ide->hfd.virtual_size = restore_u64();
+    ide->hfd.secspertrack = restore_u32();
+    ide->hfd.heads = restore_u32();
+    ide->hfd.reservedblocks = restore_u32();
+    ide->bootpri = restore_u32();
+    if (ide->hfd.virtual_size)
+       gayle_add_ide_unit (num, path, blocksize, readonly, ide->hfd.device_name,
+           ide->hfd.secspertrack, ide->hfd.heads, ide->hfd.reservedblocks, ide->bootpri, NULL);
+    else
+        gayle_add_ide_unit (num, path, blocksize, readonly, 0, 0, 0, 0, 0, 0);
     xfree(path);
     return src;
 }
index 6939b2f6b61b5733bccc8414a71e7d6072731d90..ccc19db06dcbd214e6f6f81bc57bc33f2ca0d8bd 100755 (executable)
--- a/gencomp.c
+++ b/gencomp.c
@@ -2844,6 +2844,8 @@ gen_opcode (unsigned long int opcode)
        break;
 
      case i_MMUOP:
+     case i_MMUOP30A:
+     case i_MMUOP30B:
        isjump;
        failure;
        break;
index db1128cbc492dd0a77164b9e21a8b6eef2c47c6c..7b188d4daf95608c239542c1b78a25163cf999c9 100755 (executable)
--- a/gencpu.c
+++ b/gencpu.c
@@ -790,9 +790,9 @@ static void genmovemle (uae_u16 opcode)
     char putcode[100];
     int size = table68k[opcode].size == sz_long ? 4 : 2;
     if (table68k[opcode].size == sz_long) {
-       strcpy (putcode, "put_long(srca,");
+       strcpy (putcode, "put_long(srca");
     } else {
-       strcpy (putcode, "put_word(srca,");
+       strcpy (putcode, "put_word(srca");
     }
 
     printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0));
@@ -803,16 +803,21 @@ static void genmovemle (uae_u16 opcode)
     start_brace ();
     if (table68k[opcode].dmode == Apdi) {
        printf ("\tuae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff;\n");
-       printf ("\twhile (amask) { srca -= %d; %s m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; }\n",
-               size, putcode);
-       printf ("\twhile (dmask) { srca -= %d; %s m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
-               size, putcode);
+       printf ("\tint type = get_cpu_model() >= 68020;\n");
+       printf ("\twhile (amask) {\n");
+       printf ("\t\tsrca -= %d;\n", size);
+       printf ("\t\tif (type) m68k_areg(regs, dstreg) = srca;\n");
+       printf ("\t\t%s, m68k_areg(regs, movem_index2[amask]));\n", putcode);
+       printf ("\t\tamask = movem_next[amask];\n");
+       printf ("\t}\n");
+       printf ("\twhile (dmask) { srca -= %d; %s, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
+           size, putcode);
        printf ("\tm68k_areg(regs, dstreg) = srca;\n");
     } else {
        printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
-       printf ("\twhile (dmask) { %s m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
+       printf ("\twhile (dmask) { %s, m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
                putcode, size);
-       printf ("\twhile (amask) { %s m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
+       printf ("\twhile (amask) { %s, m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
                putcode, size);
     }
 }
index 0363a4337a6e8804a5285f1b8e5269b316c87676..6842bfe01a399d3ea4d316766e5fc980852641ef 100755 (executable)
--- a/gfxutil.c
+++ b/gfxutil.c
@@ -180,10 +180,18 @@ static uae_u32 get_cr(int r, int g, int b)
     return limit256rb(0.5f*r - 0.418688f*g - 0.081312f*b);
 }
 
-extern uae_s32 tyhrgb[262144];
-extern uae_s32 tylrgb[262144];
-extern uae_s32 tcbrgb[262144];
-extern uae_s32 tcrrgb[262144];
+extern uae_s32 tyhrgb[65536];
+extern uae_s32 tylrgb[65536];
+extern uae_s32 tcbrgb[65536];
+extern uae_s32 tcrrgb[65536];
+extern uae_u32 redc[3 * 256], grec[3 * 256], bluc[3 * 256];
+
+static uae_u32 lowbits(int v, int shift, int lsize)
+{
+    v >>= shift;
+    v &= (1 << lsize) - 1;
+    return v;
+}
 
 void alloc_colors64k (int rw, int gw, int bw, int rs, int gs, int bs, int aw, int as, int alpha, int byte_swap)
 {
@@ -196,27 +204,23 @@ void alloc_colors64k (int rw, int gw, int bw, int rs, int gs, int bs, int aw, in
        int r = ((i >> 8) << 4) | (i >> 8);
        int g = (((i >> 4) & 0xf) << 4) | ((i >> 4) & 0x0f);
        int b = ((i & 0xf) << 4) | (i & 0x0f);
-       if (usedfilter && usedfilter->yuv && !(currprefs.chipset_mask & CSMASK_AGA)) {
-           xcolors[i] = (get_yh(r, g, b) << 24) | (get_yl(r, g, b) << 16) | (get_cb(r, g, b) << 8) | (get_cr(r, g, b) << 0);
-       } else {
-           r = gamma[r + j];
-           g = gamma[g + j];
-           b = gamma[b + j];
-           xcolors[i] = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs) | doAlpha (alpha, aw, as);
-           if (byte_swap) {
-               if (bpp <= 16)
-                   xcolors[i] = bswap_16 (xcolors[i]);
-               else
-                   xcolors[i] = bswap_32 (xcolors[i]);
-           }
-           if (bpp <= 16) {
-               /* Fill upper 16 bits of each colour value
-                * with a copy of the colour. */
-               xcolors[i] |= xcolors[i] * 0x00010001;
-           }
+        r = gamma[r + j];
+        g = gamma[g + j];
+        b = gamma[b + j];
+        xcolors[i] = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs) | doAlpha (alpha, aw, as);
+        if (byte_swap) {
+           if (bpp <= 16)
+               xcolors[i] = bswap_16 (xcolors[i]);
+           else
+               xcolors[i] = bswap_32 (xcolors[i]);
+       }
+       if (bpp <= 16) {
+           /* Fill upper 16 bits of each colour value
+            * with a copy of the colour. */
+           xcolors[i] |= xcolors[i] * 0x00010001;
        }
     }
-#ifdef AGA
+#if defined(AGA) || defined(GFXFILTER)
     /* create AGA color tables */
     for(i = 0; i < 256; i++) {
        j = i + 256;
@@ -242,16 +246,63 @@ void alloc_colors64k (int rw, int gw, int bw, int rs, int gs, int bs, int aw, in
            xbluecolors [i] = xbluecolors [i] * 0x00010001;
        }
     }
-    /* create AGA RGB 6:6:6 YUV-filter tables */
-    if (usedfilter && usedfilter->yuv && (currprefs.chipset_mask & CSMASK_AGA)) {
-       for (i = 0; i < 262144; i++) {
+    /* copy original color table */
+    for (i = 0; i < 256; i++) {
+        redc[0 * 256 + i] = xredcolors[0];
+        grec[0 * 256 + i] = xgreencolors[0];
+        bluc[0 * 256 + i] = xbluecolors[0];
+        redc[1 * 256 + i] = xredcolors[i];
+        grec[1 * 256 + i] = xgreencolors[i];
+        bluc[1 * 256 + i] = xbluecolors[i];
+        redc[2 * 256 + i] = xredcolors[255];
+        grec[2 * 256 + i] = xgreencolors[255];
+        bluc[2 * 256 + i] = xbluecolors[255];
+    }
+    if (usedfilter && usedfilter->yuv) {
+       /* create internal 5:6:5 color tables */
+        for (i = 0; i < 256; i++) {
+           j = i + 256;
+           xredcolors[i] = doColor (gamma[j], 5, 11);
+           xgreencolors[i] = doColor (gamma[j], 6, 5);
+           xbluecolors[i] = doColor (gamma[j], 5, 0);
+           if (bpp <= 16) {
+               /* Fill upper 16 bits of each colour value with
+                * a copy of the colour. */
+               xredcolors  [i] = xredcolors  [i] * 0x00010001;
+               xgreencolors[i] = xgreencolors[i] * 0x00010001;
+               xbluecolors [i] = xbluecolors [i] * 0x00010001;
+           }
+       }
+       for (i = 0; i < 4096; i++) {
+           int r = ((i >> 8) << 4) | (i >> 8);
+           int g = (((i >> 4) & 0xf) << 4) | ((i >> 4) & 0x0f);
+           int b = ((i & 0xf) << 4) | (i & 0x0f);
+           r = gamma[r + 256];
+           g = gamma[g + 256];
+           b = gamma[b + 256];
+           xcolors[i] = doMask(r, 5, 11) | doMask(g, 6, 5) | doMask(b, 5, 0);
+           if (byte_swap) {
+               if (bpp <= 16)
+                   xcolors[i] = bswap_16 (xcolors[i]);
+               else
+                   xcolors[i] = bswap_32 (xcolors[i]);
+           }
+           if (bpp <= 16) {
+               /* Fill upper 16 bits of each colour value
+                * with a copy of the colour. */
+               xcolors[i] |= xcolors[i] * 0x00010001;
+           }
+       }
+
+       /* create RGB 5:6:5 -> YUV tables */
+       for (i = 0; i < 65536; i++) {
            uae_u32 r, g, b;
-           r = ((i >> 12) & 0x3f) <<  2;
-           r = doColor(gamma[r + 256], rw, 0);
-           g = ((i >>  6) & 0x3f) <<  2;
-           g = doColor(gamma[g + 256], gw, 0);
-           b = ((i >>  0) & 0x3f) <<  2;
-           b = doColor(gamma[b + 256], bw, 0);
+           r = (((i >> 11) & 31) << 3) | lowbits (i, 11, 3);
+           r = gamma[r + 256];
+           g = (((i >>  5) & 63) << 2) | lowbits (i,  5, 2);
+           g = gamma[g + 256];
+           b = (((i >>  0) & 31) << 3) | lowbits (i,  0, 3);
+           b = gamma[b + 256];
            tyhrgb[i] = get_yh (r, g, b) * 256 * 256;
            tylrgb[i] = get_yl (r, g, b) * 256 * 256;
            tcbrgb[i] = ((uae_s8)get_cb (r, g, b)) * 256;
index 2adb1c1c4d4812b7109980cef86ea4ee0c94367d..47854cf095a31332c64cb49f2ed385b9aa6ac13e 100755 (executable)
@@ -38,6 +38,7 @@ extern uaecptr filesys_initcode;
 
 extern int is_hardfile (int unit_no);
 extern int nr_units (void);
+extern int need_uae_boot_rom (void);
 
 struct mountedinfo
 {
index 4b4e70da1ebc963ffffa87ca9d255def8379578b..8b0faaa3f0dfe2ecc83622e1e0d65eef0f4825ec 100755 (executable)
@@ -12,9 +12,7 @@ extern void S2X_free (void);
 
 extern void PAL_init (void);
 extern void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height);
-extern void PAL_1x1_AGA_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height);
-extern void PAL_1x1_16(uae_u32 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height);
-extern void PAL_1x1_AGA_16(uae_u32 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height);
+extern void PAL_1x1_16(uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height);
 
 typedef unsigned char uint8;
 typedef unsigned short uint16;
index 5f15207a80871368bcb6d88bee896fe83f3a56f4..6c5c558f4f21174f33bd45736c54ef1d30c49226 100755 (executable)
@@ -300,6 +300,7 @@ extern uae_u32 REGPARAM3 get_disp_ea_000 (struct regstruct *regs, uae_u32 base,
 extern void m68k_disasm_ea (void *f, uaecptr addr, uaecptr *nextpc, int cnt, uae_u32 *seaddr, uae_u32 *deaddr);
 extern void m68k_disasm (void *f, uaecptr addr, uaecptr *nextpc, int cnt);
 extern void m68k_disasm_2 (char *buf, int bufsize, uaecptr addr, uaecptr *nextpc, int cnt, uae_u32 *seaddr, uae_u32 *deaddr, int safemode);
+extern int get_cpu_model(void);
 
 extern void REGPARAM3 MakeSR (struct regstruct *regs) REGPARAM;
 extern void REGPARAM3 MakeFromSR (struct regstruct *regs) REGPARAM;
index a7ad981a8270dc3a50889b63efd46c96c58cba4f..af6a8047d62b5a6af2450bbc7ca4a296e0944707 100755 (executable)
@@ -230,7 +230,9 @@ struct uae_prefs {
     int m68k_speed;
     int cpu_level;
     int cpu_model;
+    int cpu060_revision;
     int fpu_model;
+    int fpu_revision;
     int cpu_compatible;
     int address_space_24;
     int picasso96_nocustom;
index 858ba7df5d84016823b629ab89f7d74c68667b4a..b123400afdfdd796dc0f4c1559f9e27f3b5143fc 100755 (executable)
--- a/memory.c
+++ b/memory.c
@@ -2343,7 +2343,7 @@ void memory_reset (void)
        map_banks (&cardmem_bank, cardmem_start >> 16, allocated_cardmem >> 16, 0);
 
 #ifdef AUTOCONFIG
-    if (nr_units()) {
+    if (need_uae_boot_rom()) {
        uae_boot_rom = 1;
        map_banks (&rtarea_bank, RTAREA_BASE >> 16, 1, 0);
     }
index 6f27d8bee76aff50d1c8f2bd5e0c3a7fd96e51bb..ac82072478dc5806291e89267d38a512e5c644b0 100755 (executable)
--- a/newcpu.c
+++ b/newcpu.c
@@ -77,8 +77,8 @@ cpuop_func *cpufunctbl[65536];
 extern uae_u32 get_fpsr(void);
 
 #define COUNT_INSTRS 0
-#define MC68060_PCR   0x04300100
-#define MC68EC060_PCR 0x04310100
+#define MC68060_PCR   0x04300000
+#define MC68EC060_PCR 0x04310000
 
 #if COUNT_INSTRS
 static unsigned long int instrcount[65536];
@@ -699,6 +699,11 @@ static int verify_ea (int reg, amodes mode, wordsizes size, uae_u32 *val)
 }
 #endif
 
+int get_cpu_model(void)
+{
+    return currprefs.cpu_model;
+}
+
 uae_u32 REGPARAM2 get_disp_ea_020 (struct regstruct *regs, uae_u32 base, uae_u32 dp)
 {
     int reg = (dp >> 12) & 15;
@@ -1589,6 +1594,7 @@ void m68k_reset (void)
     regs.pcr = 0;
     if (currprefs.cpu_model == 68060) {
         regs.pcr = currprefs.fpu_model ? MC68060_PCR : MC68EC060_PCR;
+       regs.pcr |= (currprefs.cpu060_revision & 0xff) << 8;
        regs.pcr |= 2;
     }
     fill_prefetch_slow (&regs);
index 8dfd658c9b38f0701b8182f24ce0b943ca00f29a..ed747f26e0573ca183e7a6faadc3719bb81089f1 100755 (executable)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9,00"
        Name="build68k"
        ProjectGUID="{AF3DBBDE-E006-4DC3-9A26-CB0D7D82AE3C}"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
@@ -76,6 +77,8 @@
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/build68k.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
@@ -95,9 +98,6 @@
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="creating cpudefs.c"
                                GenerateDebugInformation="true"
                                ProgramDatabaseFile=".\Debug/build68k.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="creating cpudefs.c"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/build68k.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="creating cpudefs.c"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/build68k.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="creating cpudefs.c"
index f99833eabe8b8b3c6729fe5a799c0a921b1fda3b..97aef46a580af107dae378ab2a81b3484d9ce0ff 100755 (executable)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9,00"
        Name="genblitter"
        ProjectGUID="{765B0AF0-B8D3-4998-89AF-D6F939E1CD18}"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
@@ -77,6 +78,8 @@
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/genblitter.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
@@ -96,9 +99,6 @@
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating blitter files"
                                GenerateDebugInformation="true"
                                ProgramDatabaseFile=".\Debug/genblitter.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating blitter files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/genblitter.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating blitter files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/genblitter.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating blitter files"
index 3a1cc5b3d8f5f039998adf52264ec48961a3a3d5..8a616637967bf8097abfba04b2da7ba7ae402e16 100755 (executable)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9,00"
        Name="gencomp"
        ProjectGUID="{54197DFF-9CAA-4A9F-B9C2-2881EA04EACB}"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
@@ -74,6 +75,8 @@
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/gencomp.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
@@ -93,9 +96,6 @@
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencomp files"
                                GenerateDebugInformation="true"
                                ProgramDatabaseFile=".\Debug/gencomp.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencomp files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/gencomp.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencomp files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/gencomp.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencomp files"
index a5ad9d74fb09cbab3756e133bc558d69c7fccda6..24854f4ad37399792bdc5d6236d8e951fbd9dead 100755 (executable)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9,00"
        Name="gencpu"
        ProjectGUID="{DEF7ACF7-050E-4069-BB99-5B5D93F60521}"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
@@ -78,6 +79,8 @@
                                GenerateDebugInformation="true"
                                ProgramDatabaseFile=".\Debug/gencpu.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencpu files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/gencpu.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencpu files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/gencpu.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencpu files"
                                SuppressStartupBanner="true"
                                ProgramDatabaseFile=".\Release/gencpu.pdb"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating gencpu files"
index fa6e6257cd5db9b59a92c52fd6bf48cb24815f1c..6e4d076fc8cf9a2e12316e395b1b1f2bda39c2ed 100755 (executable)
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9,00"
        Name="genlinetoscr"
        ProjectGUID="{E9F73E11-A463-45C6-A733-2BED75852BA1}"
        RootNamespace="genlinetoscr_msvc"
        Keyword="Win32Proj"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
@@ -63,6 +64,8 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
                        <Tool
@@ -83,9 +86,6 @@
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating linetoscr.c"
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                                Description="generating linetoscr.c"
index 41b381474bf03ce9cc57a8da5425aa48c3345acd..3bd8ede367838adc0765d37d0fbdc360367f98ff 100755 (executable)
@@ -1197,7 +1197,7 @@ BEGIN
     IDS_NUMSG_MODRIP_SAVE   "Module/packed data found\n%s\nWould you like to save it?"
     IDS_NUMSG_KS68020       "The selected system ROM requires a 68020 with 32-bit addressing or 68030 or higher CPU."
     IDS_NUMSG_ROMNEED       "One of the following system ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."
-    IDS_NUMSG_STATEHD       "WARNING: Current configuration is not compatible with state saves. This message will not appear again."
+    IDS_NUMSG_STATEHD       "WARNING: Current configuration is not fully compatible with state saves.\nThis message will not appear again."
     IDS_NUMSG_NOCAPS        "Selected disk image needs the SPS plugin\nwhich is available from\nhttp//www.softpres.org/"
     IDS_NUMSG_OLDCAPS       "You need an updated SPS plugin\nwhich is available from\nhttp//www.softpres.org/"
     IDS_IMGCHK_BOOTBLOCKCRCERROR 
index 1abbb8d199b3b02a03b55c9186f3f8c49cfd892f..a561fd0fc5218de318909c72c5cac18e998f4afd 100755 (executable)
 static uae_s32 line_yuv_0[4096 * 3];
 static uae_s32 line_yuv_1[4096 * 3];
 static uae_u32 randomtable[4096];
-static uae_u32 redc[3 * 256], grec[3 * 256], bluc[3 * 256];
+uae_u32 redc[3 * 256], grec[3 * 256], bluc[3 * 256];
 static uae_u32 *predc, *pgrec, *pbluc;
 static int randomoffset, randomshift;
 static int xx1, xx2, xx3, pal_noise_mask, scanlinelevel;
 
-uae_s32 tyhrgb[262144];
-uae_s32 tylrgb[262144];
-uae_s32 tcbrgb[262144];
-uae_s32 tcrrgb[262144];
+uae_s32 tyhrgb[65536];
+uae_s32 tylrgb[65536];
+uae_s32 tcbrgb[65536];
+uae_s32 tcrrgb[65536];
 
 void PAL_init(void)
 {
     int i;
     for (i = 0; i < 4096; i++)
        randomtable[i] = rand() | (rand() << 15);
-    for (i = 0; i < 256; i++) {
-       redc[0 * 256 + i] = xredcolors[0];
-       grec[0 * 256 + i] = xgreencolors[0];
-       bluc[0 * 256 + i] = xbluecolors[0];
-       redc[1 * 256 + i] = xredcolors[i];
-       grec[1 * 256 + i] = xgreencolors[i];
-       bluc[1 * 256 + i] = xbluecolors[i];
-       redc[2 * 256 + i] = xredcolors[255];
-       grec[2 * 256 + i] = xgreencolors[255];
-       bluc[2 * 256 + i] = xbluecolors[255];
-    }
     predc = &redc[1 * 256];
     pgrec = &grec[1 * 256];
     pbluc = &bluc[1 * 256];
@@ -54,6 +43,7 @@ void PAL_init(void)
     scanlinelevel = 128 - currprefs.gfx_filter_scanlines * 128 / 100;
 }
 
+#if 0
 #define mm 256 * 256
 #define sat 256
 STATIC_INLINE int zyh(uae_u32 v)
@@ -72,28 +62,26 @@ STATIC_INLINE int zcr(uae_u32 v)
 {
     return ((int)((uae_s8)(v >> 0))) * sat;
 }
+#endif
 
-STATIC_INLINE uae_u32 STRIPRGB(uae_u32 v)
-{
-    return ((v & 0x0000fc) >> 2) | ((v & 0x00fc00) >> 4) | ((v & 0xfc0000) >> 6);
-}
 STATIC_INLINE int zyhRGB(uae_u32 v)
 {
-    return tyhrgb[STRIPRGB(v)];
+    return tyhrgb[v];
 }
 STATIC_INLINE int zylRGB(uae_u32 v)
 {
-    return tylrgb[STRIPRGB(v)];
+    return tylrgb[v];
 }
 STATIC_INLINE int zcbRGB(uae_u32 v)
 {
-    return tcbrgb[STRIPRGB(v)];
+    return tcbrgb[v];
 }
 STATIC_INLINE int zcrRGB(uae_u32 v)
 {
-    return tcrrgb[STRIPRGB(v)];
+    return tcrrgb[v];
 }
 
+#if 0
 void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height)
 {
     const uae_u32 *tmpsrc;
@@ -193,9 +181,9 @@ void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, i
         trg += pitcht;
     }
 }
+#endif
 
-
-void PAL_1x1_AGA_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height)
+void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height)
 {
     const uae_u32 *tmpsrc;
     uae_u32 *tmptrg;
@@ -294,3 +282,103 @@ void PAL_1x1_AGA_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int widt
         trg += pitcht;
     }
 }
+
+void PAL_1x1_16(uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height)
+{
+    const uae_u16 *tmpsrc;
+    uae_u16 *tmptrg;
+    uae_s32 *lineptr0;
+    uae_s32 *lineptr1;
+    uae_s32 *line;
+    uae_s32 *linepre;
+    unsigned int x, y, wstart, wfast, wend, wint;
+    int l, u, v;
+    int red, grn, blu;
+    int xt = 0;
+    int yt = 0;
+    int xs = 0;
+    int ys = 0;
+
+    pitchs /= sizeof (*trg);
+    pitcht /= sizeof (*trg);
+
+    src = src + pitchs * ys + xs - 2;
+    trg = trg + pitcht * yt + xt;
+    if (width < 8) {
+        wstart = width;
+        wfast = 0;
+        wend = 0;
+    } else {
+        /* alignment: 8 pixels*/
+        wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
+        wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
+        wend = (width - wstart) & 0x07; /* do not forget the rest*/
+    }
+    wint = width + 5;
+    lineptr0 = line_yuv_0;
+    lineptr1 = line_yuv_1;
+
+    tmpsrc = src - pitchs;
+    line = lineptr0;
+    for (x = 0; x < wint; x++) {
+        uae_u32 cl0, cl1, cl2, cl3;
+
+        cl0 = tmpsrc[0];
+        cl1 = tmpsrc[xx1];
+        cl2 = tmpsrc[xx2];
+        cl3 = tmpsrc[xx3];
+        line[0] = 0;
+        line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
+        line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
+        tmpsrc++;
+        line += 3;
+    }
+
+    for (y = 0; y < height; y++) {
+       int scn = (y & 1) ? scanlinelevel : 128;
+       randomshift = rand() & 15;
+       randomoffset = rand() & 2047;
+
+        tmpsrc = src;
+        tmptrg = trg;
+
+        line = lineptr0;
+        lineptr0 = lineptr1;
+        lineptr1 = line;
+
+        tmpsrc = src;
+        line = lineptr0;
+        for (x = 0; x < wint; x++) {
+           int r = (randomtable[randomoffset++] >> randomshift) & pal_noise_mask;
+            uae_u32 cl0, cl1, cl2, cl3;
+            cl0 = tmpsrc[0];
+            cl1 = tmpsrc[xx1];
+            cl2 = tmpsrc[xx2];
+            cl3 = tmpsrc[xx3];
+           line[0] = (zylRGB(cl1) + zyhRGB(cl2) * (scn - r) / 128 + zylRGB(cl3)) / 256; /* 1/4 + 1/2 + 1/4 */
+            line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
+            line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
+            tmpsrc++;
+            line += 3;
+        }
+
+        line = lineptr0;
+        linepre = lineptr1;
+        for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
+
+            l = line[0];
+            u = (line[1] + linepre[1]) / 8;
+            v = (line[2] + linepre[2]) / 8;
+            line += 3;
+            linepre += 3;
+
+            red = (v + l) / 256;
+            blu = (u + l) / 256;
+            grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
+            *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
+        }
+
+        src += pitchs;
+        trg += pitcht;
+    }
+}
index f0598a46c47ad60baf50357ebaefadf53a4cae6c..60b24032867497dcfa81cd700bc6a2f321283ed9 100755 (executable)
@@ -17,8 +17,8 @@ del compemu.c
 del comptbl.h
 del compstbl.c
 del cpuemu_0.c
-del cpuemu_5.c
-del cpuemu_6.c
+del cpuemu_11.c
+del cpuemu_12.c
 del linetoscr.c
 
 cd od-win32
index dc4a6251899096ff2ea624da9145f2600af44847..99ab4919371d65f5d43180eb119f18517ef3650b 100755 (executable)
@@ -15,9 +15,9 @@
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEBETA 8
+#define WINUAEBETA 9
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 4, 20)
+#define WINUAEDATE MAKEBD(2007, 4, 25)
 //#define WINUAEEXTRA ""
 
 #define IHF_WINDOWHIDDEN 6
index 875c70096cf8d386cada703c3f8d0d6363be0d3a..277cb5251292cf77a5ebff4a0b2cc7f6d29c9abc 100755 (executable)
@@ -32,7 +32,7 @@ struct uae_filter uaefilters[] =
 
     { UAE_FILTER_2XSAI, 0, "2xSaI", "2xsai", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
 
-    { UAE_FILTER_PAL, 1, "PAL", "pal", 0, UAE_FILTER_MODE_32_32, 0, 0, 0 },
+    { UAE_FILTER_PAL, 1, "PAL", "pal", 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 },
 
 
     { 0 }
@@ -112,9 +112,14 @@ void S2X_render (void)
     LPDIRECTDRAWSURFACE7 dds;
     DDSURFACEDESC2 desc;
 
-    sptr = gfxvidinfo.bufmem
-       - ((dst_width - amiga_width) / 2) * (amiga_depth / 8)
-       - ((dst_height - amiga_height) / 2) * gfxvidinfo.rowbytes;
+    sptr = gfxvidinfo.bufmem;
+    v = (dst_width - amiga_width) / 2;
+    aw += v;
+    sptr -= v * (amiga_depth / 8);
+    v = (dst_height - amiga_height) / 2;
+    ah += v;
+    sptr -= v * gfxvidinfo.rowbytes;
+
     endsptr = gfxvidinfo.realbufmem + (amiga_height - 1) * 3 * gfxvidinfo.rowbytes;
 
     v = currprefs.gfx_filter ? currprefs.gfx_filter_horiz_offset : 0;
@@ -264,13 +269,13 @@ void S2X_render (void)
            ok = 1;
        }
 
-    } else if (usedfilter->type == UAE_FILTER_PAL) { /* 32/1X */
+    } else if (usedfilter->type == UAE_FILTER_PAL) { /* 16/32/1X */
 
         if (amiga_depth == 32 && dst_depth == 32) {
-           if (currprefs.chipset_mask & CSMASK_AGA)
-               PAL_1x1_AGA_32((uae_u32*)sptr, gfxvidinfo.rowbytes, (uae_u32*)dptr, pitch, aw, ah);
-           else
-               PAL_1x1_32((uae_u32*)sptr, gfxvidinfo.rowbytes, (uae_u32*)dptr, pitch, aw, ah);
+           PAL_1x1_32((uae_u32*)sptr, gfxvidinfo.rowbytes, (uae_u32*)dptr, pitch, aw, ah);
+           ok = 1;
+       } else if (amiga_depth == 16 && dst_depth == 16) {
+           PAL_1x1_16((uae_u16*)sptr, gfxvidinfo.rowbytes, (uae_u16*)dptr, pitch, aw, ah);
            ok = 1;
        }
 
index 6e7f3799058fd9d66369f5d322d1c0601ce14213..6b5225704315b7bf8921bf66537691db26044ead 100755 (executable)
@@ -1087,9 +1087,19 @@ int check_prefs_changed_gfx (void)
     c |= currprefs.gfx_filter_filtermode != changed_prefs.gfx_filter_filtermode ? (2|8) : 0;
     c |= currprefs.gfx_filter_horiz_zoom_mult != changed_prefs.gfx_filter_horiz_zoom_mult ? (1|8) : 0;
     c |= currprefs.gfx_filter_vert_zoom_mult != changed_prefs.gfx_filter_vert_zoom_mult ? (1|8) : 0;
-
-    c |= currprefs.gfx_lores != changed_prefs.gfx_lores ? 1 : 0;
-    c |= currprefs.gfx_linedbl != changed_prefs.gfx_linedbl ? 1 : 0;
+    c |= currprefs.gfx_filter_noise != changed_prefs.gfx_filter_noise ? (1|8) : 0;
+    c |= currprefs.gfx_filter_blur != changed_prefs.gfx_filter_blur ? (1|8) : 0;
+    c |= currprefs.gfx_filter_scanlines != changed_prefs.gfx_filter_scanlines ? (1|8) : 0;
+    c |= currprefs.gfx_filter_scanlinelevel != changed_prefs.gfx_filter_scanlinelevel ? (1|8) : 0;
+    c |= currprefs.gfx_filter_scanlineratio != changed_prefs.gfx_filter_scanlineratio ? (1|8) : 0;
+    c |= currprefs.gfx_filter_luminance != changed_prefs.gfx_filter_luminance ? (1|8) : 0;
+    c |= currprefs.gfx_filter_contrast != changed_prefs.gfx_filter_contrast ? (1|8) : 0;
+    c |= currprefs.gfx_filter_saturation != changed_prefs.gfx_filter_saturation ? (1|8) : 0;
+    c |= currprefs.gfx_filter_gamma != changed_prefs.gfx_filter_gamma ? (1|8) : 0;
+    //c |= currprefs.gfx_filter_ != changed_prefs.gfx_filter_ ? (1|8) : 0;
+
+    c |= currprefs.gfx_lores != changed_prefs.gfx_lores ? 2 : 0;
+    c |= currprefs.gfx_linedbl != changed_prefs.gfx_linedbl ? 2 : 0;
     c |= currprefs.gfx_lores_mode != changed_prefs.gfx_lores_mode ? 1 : 0;
     c |= currprefs.gfx_display != changed_prefs.gfx_display ? (2|4|8) : 0;
     c |= currprefs.win32_alwaysontop != changed_prefs.win32_alwaysontop ? 1 : 0;
@@ -1121,6 +1131,16 @@ int check_prefs_changed_gfx (void)
        currprefs.gfx_filter_filtermode = changed_prefs.gfx_filter_filtermode;
        currprefs.gfx_filter_horiz_zoom_mult = changed_prefs.gfx_filter_horiz_zoom_mult;
        currprefs.gfx_filter_vert_zoom_mult = changed_prefs.gfx_filter_vert_zoom_mult;
+       currprefs.gfx_filter_noise = changed_prefs.gfx_filter_noise;
+       currprefs.gfx_filter_blur = changed_prefs.gfx_filter_blur;
+       currprefs.gfx_filter_scanlines = changed_prefs.gfx_filter_scanlines;
+       currprefs.gfx_filter_scanlinelevel = changed_prefs.gfx_filter_scanlinelevel;
+       currprefs.gfx_filter_scanlineratio = changed_prefs.gfx_filter_scanlineratio;
+       currprefs.gfx_filter_luminance = changed_prefs.gfx_filter_luminance;
+       currprefs.gfx_filter_contrast = changed_prefs.gfx_filter_contrast;
+       currprefs.gfx_filter_saturation = changed_prefs.gfx_filter_saturation;
+       currprefs.gfx_filter_gamma = changed_prefs.gfx_filter_gamma;
+       //currprefs.gfx_filter_ = changed_prefs.gfx_filter_;
 
        currprefs.gfx_lores_mode = changed_prefs.gfx_lores_mode;
        currprefs.gfx_lores = changed_prefs.gfx_lores;
index c3205ecf2310dfc2cf92c350f6e2a75c378aec12..780fa2bc5aa3e70d2a2321870b98942233c49415 100755 (executable)
@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9,00"
        Name="winuae"
        ProjectGUID="{4ADAA943-1AC8-4FB5-82E5-4FB753B6C2DA}"
        RootNamespace="winuae"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
                                AdditionalOptions=""
                                Optimization="0"
                                AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,_WIN32_IE=0x0500,UNIX"
+                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32_IE=0x0500"
+                               GeneratePreprocessedFile="0"
+                               KeepComments="false"
                                ExceptionHandling="0"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                BufferSecurityCheck="true"
-                               RuntimeTypeInfo="true"
+                               RuntimeTypeInfo="false"
                                PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
                                AssemblerListingLocation=".\Debug/"
                                ObjectFile=".\Debug/"
@@ -65,7 +68,7 @@
                                SuppressStartupBanner="true"
                                Detect64BitPortabilityProblems="false"
                                DebugInformationFormat="4"
-                               CompileAs="0"
+                               CompileAs="1"
                                DisableSpecificWarnings="4996"
                                EnablePREfast="false"
                        />
@@ -95,6 +98,8 @@
                                SubSystem="2"
                                StackReserveSize="2621440"
                                StackCommitSize="2621440"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                SubSystem="2"
                                StackReserveSize="2621440"
                                StackCommitSize="2621440"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                OmitFramePointers="true"
                                WholeProgramOptimization="false"
                                AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE=0x0500,UNIX"
+                               PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0500"
                                StringPooling="true"
                                ExceptionHandling="0"
                                BasicRuntimeChecks="0"
                                ProgramDataBaseFileName=".\Release/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
-                               CompileAs="0"
+                               CompileAs="1"
                                DisableSpecificWarnings="4996"
                                ForcedIncludeFiles=""
                        />
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
                                LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="2"
+                               DataExecutionPrevention="2"
                                TargetMachine="1"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
                                LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                        />
                        <Tool
                                Name="VCLinkerTool"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                        />
                        <Tool
                                Name="VCLinkerTool"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
                                LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                SubSystem="2"
                                StackReserveSize="2621440"
                                StackCommitSize="2621440"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                SubSystem="2"
                                StackReserveSize="2621440"
                                StackCommitSize="2621440"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
                        CharacterSet="2"
+                       WholeProgramOptimization="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                                OmitFramePointers="true"
                                WholeProgramOptimization="true"
                                AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE=0x0500,UNIX"
+                               PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0500"
                                StringPooling="true"
                                ExceptionHandling="0"
                                BasicRuntimeChecks="0"
                                ProgramDataBaseFileName=".\FullRelease/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
-                               CompileAs="0"
+                               CompileAs="1"
                                DisableSpecificWarnings="4996"
                                ForcedIncludeFiles=""
                        />
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
                                LinkTimeCodeGeneration="1"
+                               RandomizedBaseAddress="2"
+                               DataExecutionPrevention="2"
                                TargetMachine="1"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
                                LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
index 90f8fd32cc0a762e322a2ce7f511583bd245c47e..56c1214992702c2245d14ac16813bf0a838c75f3 100755 (executable)
@@ -1,4 +1,21 @@
 
+Beta 9:
+
+- new PAL filter configuration file support (forgot it in b8)
+- PAL filter now works both in 16 and 32-bit modes. Internal color
+  space is now only R5G6B5, even in 32-bit AGA. Makes things simpler
+  (minus image quality loss) Fix later, not sure..
+- map "UAE Boot ROM" automatically if any "external" expansion is
+  enabled (uaescsi, uaeserial, bsdsocket etc..) Previously it was
+  only mapped if filesystem (directory or hdf) was configured.
+- IDE non-RDB HDF statefile support added
+- filter default centering fixed (I think..)
+- minor FPU updates to very rarely used instructions (from aranym)
+- "cpu060_revision" config entry added ("read-only", not created when
+  saving config), sets 68060 revision field in PCR register (current
+  default is 1)
+
+
 Beta 8:
 
 - very long CDTV CD reads don't freeze anymore (overflow in CD
index 7544057db9045702d740af7cb5412170cdd477c2..4d9e5a8cc98aa2dd127ee11072900a1d5b1402d4 100755 (executable)
@@ -1,4 +1,3 @@
-
 #include "sysconfig.h"
 #include "sysdeps.h"