]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2900b13
authorToni Wilen <twilen@winuae.net>
Wed, 20 Aug 2014 13:32:53 +0000 (16:32 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 20 Aug 2014 13:32:53 +0000 (16:32 +0300)
a2065.cpp
blkdev_cdimage.cpp
drawing.cpp
hardfile.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt

index a0027566906e84e4adeddb076b815257b7d0ac9c..b9358d20cbb869e8722c06998fa893bf17e762e1 100644 (file)
--- a/a2065.cpp
+++ b/a2065.cpp
@@ -111,6 +111,8 @@ static uae_u8 broadcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 #define RX_STP 0x0200
 #define RX_ENP 0x0100
 
+DECLARE_MEMORY_FUNCTIONS(a2065);
+
 static uae_u16 gword2 (uae_u8 *p)
 {
        return (p[0] << 8) | p[1];
@@ -828,12 +830,23 @@ static void REGPARAM2 a2065_lput (uaecptr addr, uae_u32 l)
        a2065_wput (addr + 2, l);
 }
 
-DECLARE_MEMORY_FUNCTIONS(a2065);
+uae_u8 *REGPARAM2 a2065_xlate(uaecptr addr)
+{
+       if ((addr & 65535) >= RAM_OFFSET)
+               return &boardram[addr & RAM_MASK];
+       return default_xlate(addr);
+}
+
+int REGPARAM2 a2065_check(uaecptr a, uae_u32 b)
+{
+       a &= 65535;
+       return a >= RAM_OFFSET && a + b < 65536;
+}
 
 static addrbank a2065_bank = {
        a2065_lget, a2065_wget, a2065_bget,
        a2065_lput, a2065_wput, a2065_bput,
-       default_xlate, default_check, NULL, NULL, _T("A2065 Z2 Ethernet"),
+       a2065_xlate, a2065_check, NULL, NULL, _T("A2065 Z2 Ethernet"),
        a2065_lgeti, a2065_wgeti, ABFLAG_IO
 };
 
index 0e0cbea08dad24b84d80e6ec5924eea850517094..ffc666b021911840d1290f63904abc3adaf91341 100644 (file)
@@ -149,9 +149,11 @@ static int do_read (struct cdunit *cdu, struct cdtoc *t, uae_u8 *data, int secto
        if (t->enctype == ENC_CHD) {
 #ifdef WITH_CHD
                int type = CD_TRACK_MODE1_RAW;
+               uae_u8 tmpbuf[2352];
+               if (size > 2352)
+                       return 0;
                switch (size)
                {
-                       default:
                        case 2352:
                        type = CD_TRACK_MODE1_RAW;
                        break;
@@ -164,7 +166,11 @@ static int do_read (struct cdunit *cdu, struct cdtoc *t, uae_u8 *data, int secto
                }
                if (audio && size == 2352)
                        type = CD_TRACK_AUDIO;
-               return cdrom_read_data(cdu->chd_cdf, sector + t->offset, data, type, true) != 0;
+               if (cdrom_read_data(cdu->chd_cdf, sector + t->offset, tmpbuf, type, true)) {
+                       memcpy(data, tmpbuf + offset, size);
+                       return 1;
+               }
+               return 0;
 #endif
        } else if (t->handle) {
                int ssize = t->size + t->skipsize;
index d36b114fb8683c3306c80ab250ce9112540fb979..e068b103ff35526e6b78317bcc43e167733ce401 100644 (file)
@@ -1824,6 +1824,14 @@ static void gen_pfield_tables (void)
                dblpf_ind1[i] = i >= 128 ? i & 0x7F : (plane1 == 0 ? plane2 : plane1);
                dblpf_ind2[i] = i >= 128 ? i & 0x7F : (plane2 == 0 ? plane1 : plane2);
 
+               // Hack for OCS/ECS-only dualplayfield chipset bug.
+               // If PF2P2 is invalid (>5), playfield color becomes transparent but
+               // playfield still hides playfield under it! (if plfpri is set)
+               if (i & 64) {
+                       dblpf_ind2[i] = 0;
+                       dblpf_ind1[i] = 0;
+               }
+
                sprite_offs[i] = (i & 15) ? 0 : 2;
 
                clxtab[i] = ((((i & 3) && (i & 12)) << 9)
@@ -1922,16 +1930,29 @@ static void clear_bitplane_border_aga (void)
 }
 #endif
 
-/* emulate OCS/ECS only undocumented "SWIV" hardware feature */
 static void weird_bitplane_fix (int start, int end)
 {
-       int i;
        int sh = lores_shift;
        uae_u8 *p = pixdata.apixels + pixels_offset;
 
-       for (i = start >> sh; i < end >> sh; i++) {
-               if (p[i] > 16)
-                       p[i] = 16;
+       start >>= sh;
+       end >>= sh;
+       if (bplplanecnt == 5 && !bpldualpf) {
+               /* emulate OCS/ECS only undocumented "SWIV" hardware feature */
+               for (int i = start; i < end; i++) {
+                       if (p[i] & 16)
+                               p[i] = 16;
+               }
+       } else if (bpldualpf && bpldualpfpri) {
+               /* in dualplayfield mode this feature is even more strange.. */
+               for (int i = start; i < end; i++) {
+                       if (p[i] & (2 | 8 | 32))
+                               p[i] |= 0x40;
+               }
+       } else if (bpldualpf && !bpldualpfpri) {
+               for (int i = start; i < end; i++) {
+                       p[i] &= ~(2 | 8 | 32);
+               }
        }
 }
 
@@ -2362,7 +2383,7 @@ static void do_color_changes (line_draw_func worker_border, line_draw_func worke
                // playfield
                if (nextpos_in_range > lastpos && lastpos >= playfield_start && lastpos < playfield_end) {
                        int t = nextpos_in_range <= playfield_end ? nextpos_in_range : playfield_end;
-                       if (plf2pri > 5 && bplplanecnt == 5 && !(currprefs.chipset_mask & CSMASK_AGA))
+                       if (plf2pri > 5 && !(currprefs.chipset_mask & CSMASK_AGA))
                                weird_bitplane_fix (lastpos, t);
                        if (bplxor && may_require_hard_way && worker_pfield != pfield_do_linetoscr_bordersprite_aga)
                                playfield_hard_way(worker_pfield, lastpos, t);
index 3ad51b1c4b8119ba779c2d0f184eeb61a664e985..e611c0395fa906658f0c0705fe38fce5fc70fb1b 100644 (file)
@@ -69,10 +69,10 @@ struct hardfileprivdata {
        uaecptr changeint;
 };
 
-#define HFD_VHD_DYNAMIC 4
-#define HFD_VHD_FIXED 3
-#define HFD_CHD_OTHER 2
-#define HFD_CHD_HD 1
+#define HFD_CHD_OTHER 5
+#define HFD_CHD_HD 4
+#define HFD_VHD_DYNAMIC 3
+#define HFD_VHD_FIXED 2
 
 STATIC_INLINE uae_u32 gl (uae_u8 *p)
 {
@@ -486,13 +486,19 @@ int hdf_open (struct hardfiledata *hfd, const TCHAR *pname)
                        zf = zfile_fopen (nametmp, _T("rb"));
                }
                if (zf) {
-                       int err;
+                       int err = CHDERR_FILE_NOT_WRITEABLE;
                        hard_disk_file *chdf;
                        chd_file *cf = new chd_file();
-                       err = cf->open(*zf, false, NULL);
+                       if (!chd_readonly)
+                               err = cf->open(*zf, true, NULL);
+                       if (err == CHDERR_FILE_NOT_WRITEABLE) {
+                               chd_readonly = true;
+                               err = cf->open(*zf, false, NULL);
+                       }
                        if (err != CHDERR_NONE) {
                                zfile_fclose (zf);
-                               goto nonvhd;
+                               delete cf;
+                               goto end;
                        }
                        chdf = hard_disk_open(cf);
                        if (!chdf) {
@@ -503,7 +509,7 @@ int hdf_open (struct hardfiledata *hfd, const TCHAR *pname)
                                hfd->hfd_type = HFD_CHD_HD;
                                hfd->chd_handle = chdf;
                        }
-                       if (cf->compressed() || chd_readonly)
+                       if (chd_readonly)
                                hfd->ci.readonly = true;
                        hfd->virtsize = cf->logical_bytes ();
                        hfd->handle_valid = -1;
index b632ced8876ae70661a82dfd4ef68dc09827aaf9..ddfa8124b91d11ed9d2263dbe978afc6e6e693d6 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("12")
+#define WINUAEBETA _T("13")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2014, 8, 17)
+#define WINUAEDATE MAKEBD(2014, 8, 20)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index c01c17e1a075ad92827a0edccfb87e9c61b5f2b0..106ec67e4130d47617d9c7d243a242aebcb19e1d 100644 (file)
@@ -1613,9 +1613,9 @@ static int listrom (int *roms)
 static void show_rom_list (void)
 {
        TCHAR *p;
-       TCHAR unavail[MAX_DPATH], avail[MAX_DPATH];
        TCHAR *p1, *p2;
        int *rp;
+       bool first = true;
        int romtable[] = {
                5, 4, -1, -1, // A500 1.2
                6, 32, -1, -1, // A500 1.3
@@ -1627,20 +1627,54 @@ static void show_rom_list (void)
                16, 46, 31, 13, 12, -1, -1, // A4000
                17, -1, -1, // A4000T
                18, -1, 19, -1, -1, // CD32
-               18, -1, 19, -1, 74, 23, -1, -1,  // CD32 FMV
                20, 21, 22, -1, 6, 32, -1, -1, // CDTV
-               49, 50, 75, 51, 76, 77, -1, 5, 4, -1, -1, // ARCADIA
-               46, 16, 17, 31, 13, 12, -1, -1, // highend, any 3.x A4000
+               49, 50, 75, 51, 76, 77, -1, 5, 4, -1, -2, // ARCADIA
+
                53, 54, 55, 56, -1, -1, // A590/A2091
                57, 58, -1, -1, // A4091
+               18, -1, 19, -1, 74, 23, -1, -1,  // CD32 FMV
+               91, -1, -2, // Picasso IV
+
+               89, -1, -1, // 1230-IV
+               89, -1, 94, -1, -1, // 1230-IV SCSI
+               90, -1, -1, // 1260
+               90, -1, 94, -1, -1, // 1260 SCSI
+               92, -1, -1, // 2060
+               93, -1, -1, // Warp Engine
+               95, 101, -1, -1, // CS MK I
+               96, -1, -1, // CS MK II
+               97, -1, -1, // CS MK III
+               99, 100, -1, -1, // BPPC
+               98, -1 ,-2, // CSPPC
+
+               69, 67, 70, -1, -1, // nordic power
+               65, 68, -1, -1, // x-power
+               62, 60, -1, -1, // action cartridge
+               52, 25, -1, -1, // ar 1
+               26, 27, 28, -1, -1, // ar 2
+               29, 30, -1, -1, // ar 3
+
                0, 0, 0
        };
 
-       WIN32GUI_LoadUIString (IDS_ROM_AVAILABLE, avail, sizeof (avail) / sizeof (TCHAR));
-       WIN32GUI_LoadUIString (IDS_ROM_UNAVAILABLE, unavail, sizeof (avail) / sizeof (TCHAR));
-       _tcscat (avail, _T("\n"));
-       _tcscat (unavail, _T("\n"));
-       p1 = _T("A500 Boot ROM 1.2\0A500 Boot ROM 1.3\0A500+\0A600\0A1000\0A1200\0A3000\0A4000\0A4000T\0CD32\0CD32 FMV\0CDTV\0Arcadia Multi Select\0High end WinUAE\0A590/A2091 SCSI Boot ROM\0A4091 SCSI Boot ROM\0\0");
+       p1 = _T("A500 Boot ROM 1.2\0A500 Boot ROM 1.3\0A500+\0A600\0A1000\0A1200\0A3000\0A4000\0A4000T\0")
+               _T("CD32\0CDTV\0Arcadia Multi Select\0")
+
+               _T("A590/A2091 SCSI\0A4091 SCSI\0")
+               _T("CD32 Full Motion Video\0")
+               _T("Picasso IV\0")
+
+               _T("Blizzard 1230-IV\0Blizzard 1260\0")
+               _T("Blizzard 1230-IV/SCSI\0Blizzard 1260/SCSI\0")
+               _T("Blizzard 2060\0Warp Engine\0")
+               _T("CyberStorm MK I\0CyberStorm MK II\0CyberStorm MK III\0")
+               _T("Blizzard PPC\0CyberStorm PPC\0")
+               
+               _T("Nordic Power\0X-Power Professional 500\0Action Cartridge Super IV Professional\0")
+               _T("Action Replay MK I\0Action Replay MK II\0Action Replay MK III\0")
+               _T("Action Replay 1200\0")
+               
+               _T("\0");
 
        p = xmalloc (TCHAR, 100000);
        if (!p)
@@ -1652,21 +1686,25 @@ static void show_rom_list (void)
        while(rp[0]) {
                int ok = 1;
                p2 = p1 + _tcslen (p1) + 1;
-               _tcscat (p, _T(" "));
-               _tcscat (p, p1); _tcscat (p, _T(": "));
-               while (*rp != -1) {
+               while (*rp >= 0) {
                        if (ok) {
                                ok = 0;
                                if (listrom (rp))
                                        ok = 1;
                        }
-                       while(*rp++ != -1);
+                       while(*rp++ >= 0);
+               }
+               if (ok) {
+                       if (!first)
+                               _tcscat (p, _T(", "));
+                       first = false;
+                       _tcscat (p, p1);
+               }
+               if (*rp == -2) {
+                       _tcscat(p, _T("\n\n"));
+                       first = true;
                }
                rp++;
-               if (ok)
-                       _tcscat (p, avail);
-               else
-                       _tcscat (p, unavail);
                p1 = p2;
        }
 
index 4c4d12f49c1a428fbc4153aca3a4a828c1ec5346..95d4a74d69bd3ab0fa61cda7f3628c28155c204c 100644 (file)
@@ -18,6 +18,17 @@ Things that may happen in 2015:
 
 - restore only single input target to default.
 
+Beta 13:
+
+- Fixed vhd hardfiles. (b12)
+- Emulated strange OCS/ECS feature similar to "SWIV scoreboard" feature (plane color > 16 becomes 16 when PF2PRI
+  is set to invalid value). It gets more interesting if mode is dual playfield and PF2P2 is invalid: odd planes
+  become transparent and it still hides even planes behind it if PF2PRI is set! (Running Man / Scoopex)
+- A2065 buffer ram is now directly accessible, if someone wants to do some weird stuff with it (xlate and check
+  memory functions supported)
+- ROM scanner result window redesigned, all expansions that need rom images added.
+- Fixed CHD CD crash when sector size conversion was required.
+
 Beta 12:
 
 - Windowed mode status bar button mouse click off-by-one fix.