]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2310b10
authorToni Wilen <twilen@winuae.net>
Sun, 9 Jan 2011 14:49:05 +0000 (16:49 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 9 Jan 2011 14:49:05 +0000 (16:49 +0200)
16 files changed:
blkdev.cpp
custom.cpp
debug.cpp
disk.cpp
drawing.cpp
filesys.cpp
inputdevice.cpp
memory.cpp
newcpu.cpp
od-win32/dinput.cpp
od-win32/picasso96_win.cpp
od-win32/rp.cpp
od-win32/rp.h
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/winuaechangelog.txt

index 8e7fe8374960e8d9f34422f96ec734fa2119582c..00ecd7c5edde83947d3007fbe5aaab58759fe21e 100644 (file)
@@ -385,6 +385,9 @@ int get_standard_cd_unit (cd_standard_unit csu)
        int unitnum = get_standard_cd_unit2 (csu);
        if (unitnum < 0)
                return -1;
+#ifdef RETROPLATFORM
+       rp_cd_device_enable (unitnum, true);
+#endif
        delayed[unitnum] = 0;
        if (currprefs.cdslots[unitnum].delayed) {
                delayed[unitnum] = PRE_INSERT_DELAY;
@@ -405,11 +408,20 @@ int sys_command_isopen (int unitnum)
 int sys_command_open (int unitnum)
 {
        waspaused[unitnum] = 0;
-       return sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : NULL, CD_STANDARD_UNIT_DEFAULT);
+       int v = sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : NULL, CD_STANDARD_UNIT_DEFAULT);
+       if (!v)
+               return 0;
+#ifdef RETROPLATFORM
+       rp_cd_device_enable (unitnum, true);
+#endif
+       return v;
 }
 
 void sys_command_close (int unitnum)
 {
+#ifdef RETROPLATFORM
+       rp_cd_device_enable (unitnum, false);
+#endif
        sys_command_close_internal (unitnum);
 }
 
@@ -418,7 +430,6 @@ void blkdev_cd_change (int unitnum, const TCHAR *name)
        struct device_info di;
        sys_command_info (unitnum, &di, 1);
 #ifdef RETROPLATFORM
-       rp_cd_change (unitnum, di.media_inserted);
        rp_cd_image_change (unitnum, name);
 #endif
 }
index 910f97e07d2cef7a4b2eb8c0cde3b4208ab5e7c4..1b278a1260f5a62ba6141d78ebe40612d316bd5e 100644 (file)
@@ -4749,7 +4749,8 @@ STATIC_INLINE void do_sprites_1 (int num, int cycle, int hpos)
        struct sprite *s = &spr[num];
        int dma, posctl = 0;
        uae_u16 data;
-       int isdma = dmaen (DMA_SPRITE);
+       // fetch both sprite pairs even if DMA was switched off between sprites
+       int isdma = dmaen (DMA_SPRITE) || ((num & 1) && spr[num & ~1].dmacycle);
 
        if (isdma && vpos == sprite_vblank_endline)
                spr_arm (num, 0);
index 1dfa596386df99156f67d76bbc86e0a199e7cbb3..2355f37a805336c73d4bff3a85689bcd3435ebf9 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
@@ -3363,6 +3363,7 @@ static BOOL debug_line (TCHAR *input)
                case 'H':
                        {
                                int count, temp, badly, skip;
+                               uae_u32 addr = 0;
                                uae_u32 oldpc = m68k_getpc ();
                                struct regstruct save_regs = regs;
 
@@ -3376,6 +3377,10 @@ static BOOL debug_line (TCHAR *input)
                                        count = readint (&inptr);
                                else
                                        count = 10;
+                               if (count > 1000) {
+                                       addr = count;
+                                       count = MAX_HIST;
+                               }
                                if (count < 0)
                                        break;
                                skip = count;
@@ -3391,11 +3396,15 @@ static BOOL debug_line (TCHAR *input)
                                }
                                while (temp != lasthist) {
                                        regs = history[temp];
-                                       m68k_setpc (history[temp].pc);
-                                       if (badly)
-                                               m68k_dumpstate (stdout, NULL);
-                                       else
-                                               m68k_disasm (stdout, history[temp].pc, NULL, 1);
+                                       if (history[temp].pc == addr || addr == 0) {
+                                               m68k_setpc (history[temp].pc);
+                                               if (badly)
+                                                       m68k_dumpstate (stdout, NULL);
+                                               else
+                                                       m68k_disasm (stdout, history[temp].pc, NULL, 1);
+                                               if (addr && history[temp].pc == addr)
+                                                       break;
+                                       }
                                        if (skip-- < 0)
                                                break;
                                        if (++temp == MAX_HIST)
index a0c299a5b265baf1376e45968115a4c7f6339646..d1d2424c78926961ac815d1fdb7ef6f55ee30153 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -2365,7 +2365,7 @@ static void DISK_check_change (void)
                        currprefs.floppyslots[i].dfxtype = changed_prefs.floppyslots[i].dfxtype;
                        reset_drive (i);
 #ifdef RETROPLATFORM
-                       rp_floppydrive_change (i, currprefs.floppyslots[i].dfxtype >= 0 ? 1 : 0);
+                       rp_floppy_device_enable (i, currprefs.floppyslots[i].dfxtype >= 0);
 #endif
                }
        }
index 9fafac4df8379526c8677a4565e114cd72288251..a3cfc07cc79455b771d01ca9d6dfb36fb67c8224 100644 (file)
@@ -2238,7 +2238,7 @@ static void center_image (void)
                thisframe_y_adjust = minfirstline;
 
        thisframe_y_adjust_real = thisframe_y_adjust << linedbl;
-       tmp = (maxvpos_nom - thisframe_y_adjust) << linedbl;
+       tmp = (maxvpos_nom - thisframe_y_adjust + 1) << linedbl;
        if (tmp != max_ypos_thisframe) {
                last_max_ypos = tmp;
                if (last_max_ypos < 0)
@@ -2525,12 +2525,10 @@ void finish_drawing_frame (void)
                        break;
                if (where2 < 0)
                        continue;
-
                hposblank = 0;
                pfield_draw_line (line, where2, amiga2aspect_line_map[i1 + 1]);
        }
 
-
        /* clear possible old garbage at the bottom if emulated area become smaller */
        for (i = last_max_ypos; i < gfxvidinfo.height; i++) {
                int i1 = i + min_ypos_for_screen;
index da9d0fe52d9a45545396fc1179bb56be3c1940dd..1c249a44ff098bfe1c3838507959333d2705c175 100644 (file)
@@ -3989,10 +3989,10 @@ static void
        if (mode < 0)
                whence = SEEK_SET;
 
-       TRACE((L"ACTION_SEEK(%s,%d,%d)\n", k->aino->nname, pos, mode));
+       old = fs_lseek (k->fd, 0, SEEK_CUR);
+       TRACE((L"ACTION_SEEK(%s,%d,%d)=%d\n", k->aino->nname, pos, mode, old));
        gui_flicker_led (LED_HD, unit->unit, 1);
 
-       old = fs_lseek (k->fd, 0, SEEK_CUR);
        {
                uae_s64 temppos;
                uae_s64 filesize = fs_lseek64 (k->fd, 0, SEEK_END);
index d0907446de5ca803bc2e7e6f2f0c023e01d76f33..9dfb1bb934ced07239ca5170e7a8bd3f92b00397 100644 (file)
@@ -3081,7 +3081,7 @@ static int switchdevice (struct uae_input_device *id, int num, int button)
        if (num == 0 && otherbuttonpressed)
                newport = newport ? 0 : 1;
        if (currprefs.input_selected_setting == GAMEPORT_INPUT_SETTINGS) {
-               if (num == 0 || num == 1) {
+               if ((num == 0 || num == 1) && currprefs.jports[newport].id != JPORT_CUSTOM) {
                        int om = jsem_ismouse (num, &currprefs);
                        int om1 = jsem_ismouse (0, &currprefs);
                        int om2 = jsem_ismouse (1, &currprefs);
@@ -4271,8 +4271,8 @@ static void compatibility_copy (struct uae_prefs *prefs, bool gameports)
                                if (gameports)
                                        cleardev (joysticks, joy);
                                input_get_default_joystick (joysticks, joy, i, af, 0);
-                               _tcsncpy (prefs->jports[i].name, idev[IDTYPE_MOUSE].get_friendlyname (joy), MAX_JPORTNAME - 1);
-                               _tcsncpy (prefs->jports[i].configname, idev[IDTYPE_MOUSE].get_uniquename (joy), MAX_JPORTNAME - 1);
+                               _tcsncpy (prefs->jports[i].name, idev[IDTYPE_JOYSTICK].get_friendlyname (joy), MAX_JPORTNAME - 1);
+                               _tcsncpy (prefs->jports[i].configname, idev[IDTYPE_JOYSTICK].get_uniquename (joy), MAX_JPORTNAME - 1);
                                used[joy] = 1;
                                joymodes[i] = JSEM_MODE_JOYSTICK;
                        }
index b1cabfc520ad2589c8b00ed5dcc59afc369e30f5..0236dacd13f0972477868486c7774eb2c3ac1e86 100644 (file)
@@ -6,6 +6,8 @@
 * (c) 1995 Bernd Schmidt
 */
 
+#define DEBUG_STUPID 0
+
 #include "sysconfig.h"
 #include "sysdeps.h"
 
@@ -1227,7 +1229,9 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr a)
                                uaecptr a2 = a - 32;
                                uaecptr a3 = m68k_getpc () - 32;
                                write_log (L"Your Amiga program just did something terribly stupid %08X PC=%08X\n", a, M68K_GETPC);
-                               //activate_debugger();
+#if DEBUG_STUPID
+                               activate_debugger();
+#endif
                                m68k_dumpstate (0, 0);
                                for (i = 0; i < 10; i++) {
                                        write_log (L"%08X ", i >= 5 ? a3 : a2);
index 3bf6db6eb814aeacd7b5359247c933a9ea3f7d1f..7d31932939255580b455c7c8c7e80a44f966733c 100644 (file)
@@ -3331,6 +3331,25 @@ STATIC_INLINE int do_specialties (int cycles)
        }
 
        while (regs.spcflags & SPCFLAG_STOP) {
+
+               if (uae_int_requested) {
+                       INTREQ_f (0x8008);
+                       set_special (SPCFLAG_INT);
+               }
+               {
+                       extern int volatile uaenet_int_requested;
+                       if (uaenet_int_requested) {
+                               INTREQ_f (0x8000 | 0x2000);
+                               set_special (SPCFLAG_INT);
+                       }
+               }
+               {
+                       extern void bsdsock_fake_int_handler (void);
+                       extern int volatile bsd_int_requested;
+                       if (bsd_int_requested)
+                               bsdsock_fake_int_handler ();
+               }
+
                if (cpu_tracer > 0) {
                        cputrace.stopped = regs.stopped;
                        cputrace.intmask = regs.intmask;
@@ -3366,7 +3385,7 @@ STATIC_INLINE int do_specialties (int cycles)
                        return 1;
                }
 
-               if (currprefs.cpu_idle && currprefs.m68k_speed != 0 && ((regs.spcflags & SPCFLAG_STOP)) == SPCFLAG_STOP) {
+               if (!uae_int_requested && currprefs.cpu_idle && currprefs.m68k_speed != 0 && ((regs.spcflags & SPCFLAG_STOP)) == SPCFLAG_STOP) {
                        /* sleep 1ms if STOP-instruction is executed */
                        if (1) {
                                static int sleepcnt, lvpos, zerocnt;
index 61a77ca2476ad45665605f024be62569802b8b3a..f3f46864d8333bb229a1c224ae2ab1cfd49ebf18 100644 (file)
@@ -1734,7 +1734,7 @@ static BOOL di_enumcallback2 (LPCDIDEVICEINSTANCE lpddi, int joy)
                _tcscpy (did->name, lpddi->tszInstanceName);
        } else {
                did->name = xmalloc (TCHAR, 100);
-               _stprintf (did->name, L"[no name]");
+               _tcscpy (did->name, L"[no name]");
        }
        trimws (did->name);
        _stprintf (tmp, L"%08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X %08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X",
index 15d36f087ac903569e508e30aa32df2d9b55e62b..074fad262a680a3dc2f07f4c812f485761d8a380 100644 (file)
@@ -2274,6 +2274,12 @@ void picasso_enablescreen (int on)
        checkrtglibrary();
 }
 
+static void resetpalette(void)
+{
+       for (int i = 0; i < 256; i++)
+               picasso96_state.CLUT[i].Pad = 0xff;
+}
+
 /*
 * SetColorArray:
 * a0: struct BoardInfo
@@ -2295,16 +2301,20 @@ static int updateclut (uaecptr clut, int start, int count)
                int g = get_byte (clut + 1);
                int b = get_byte (clut + 2);
 
-               changed |= (picasso96_state.CLUT[i].Red != r
+               //write_log(L"%d: %02x%02x%02x\n", i, r, g, b);
+               changed |= picasso96_state.CLUT[i].Red != r
                        || picasso96_state.CLUT[i].Green != g
-                       || picasso96_state.CLUT[i].Blue != b);
-
+                       || picasso96_state.CLUT[i].Blue != b;
+               if (picasso96_state.CLUT[i].Pad) {
+                       changed = 1;
+                       picasso96_state.CLUT[i].Pad = 0;
+               }
                picasso96_state.CLUT[i].Red = r;
                picasso96_state.CLUT[i].Green = g;
                picasso96_state.CLUT[i].Blue = b;
                clut += 3;
        }
-       picasso_palette ();
+       changed |= picasso_palette ();
        return changed;
 }
 static uae_u32 REGPARAM2 picasso_SetColorArray (TrapContext *ctx)
@@ -3212,6 +3222,7 @@ static uae_u32 REGPARAM2 picasso_SetDisplay (TrapContext *ctx)
 {
        uae_u32 state = m68k_dreg (regs, 0);
        P96TRACE ((L"SetDisplay(%d)\n", state));
+       resetpalette();
        return !state;
 }
 
@@ -4300,6 +4311,7 @@ void picasso_reset (void)
        uaegfx_active = 0;
        interrupt_enabled = 0;
        reserved_gfxmem = 0;
+       resetpalette();
 }
 
 void uaegfx_install_code (void)
index 49450f4db20c5c588550bb3f4a21e50c1c584108..82b6f5ed38a0c72475165369ecdb603ad10a1142 100644 (file)
@@ -994,36 +994,36 @@ void rp_cd_image_change (int num, const TCHAR *name)
        rp_device_change (RP_DEVICE_CD, num, name);
 }
 
-void rp_floppydrive_change (int num, int removed)
+void rp_floppy_device_enable (int num, bool enabled)
 {
        if (!cando ())
                return;
-       if (removed)
-               floppy_mask &= ~(1 << num);
-       else
+       if (enabled)
                floppy_mask |= 1 << num;
+       else
+               floppy_mask &= ~(1 << num);
        RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_FLOPPY, floppy_mask, NULL, 0, &guestinfo, NULL);
 }
 
-void rp_hd_change (int num, int removed)
+void rp_hd_device_enable (int num, bool enabled)
 {
        if (!cando ())
                return;
-       if (removed)
-               hd_mask &= ~(1 << num);
-       else
+       if (enabled)
                hd_mask |= 1 << num;
+       else
+               hd_mask &= ~(1 << num);
        RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_HD, hd_mask, NULL, 0, &guestinfo, NULL);
 }
 
-void rp_cd_change (int num, int removed)
+void rp_cd_device_enable (int num, bool enabled)
 {
        if (!cando ())
                return;
-       if (removed)
-               cd_mask &= ~(1 << num);
-       else
+       if (enabled)
                cd_mask |= 1 << num;
+       else
+               cd_mask &= ~(1 << num);
        RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_CD, cd_mask, NULL, 0, &guestinfo, NULL);
 }
 
index bce816131eef2e26f66c06461a35d26dc82cc6ea..ef796385722b01952fec038796aa992ea740afa9 100644 (file)
@@ -32,8 +32,9 @@ extern void rp_update_gameport (int port, int mask, int onoff);
 extern void rp_update_volume (struct uae_prefs*);
 extern void rp_update_leds (int, int, int);
 extern void rp_floppy_track (int floppy, int track);
-extern void rp_floppydrive_change (int num, int removed);
 extern void rp_hd_activity (int, int, int);
-extern void rp_hd_change (int, int);
 extern void rp_cd_activity (int, int);
-extern void rp_cd_change (int, int);
+
+void rp_floppy_device_enable (int num, bool enabled);
+void rp_hd_device_enable (int num, bool enabled);
+void rp_cd_device_enable (int num, bool enabled);
index 46d8c730d8a735e216fa3b1ad7176e39ddfbb375..83bfc2b0b408e00423dd3ade1a3d4e9913ca0b03 100644 (file)
@@ -18,8 +18,8 @@
 #define WINUAEPUBLICBETA 1
 #define LANG_DLL 1
 
-#define WINUAEBETA L"9"
-#define WINUAEDATE MAKEBD(2011, 1, 4)
+#define WINUAEBETA L"10"
+#define WINUAEDATE MAKEBD(2011, 1, 9)
 #define WINUAEEXTRA L""
 #define WINUAEREV L""
 
index 48fe2d79cdcc13496af5c9ead1b2e618a55aae86..71d72f3ea0c639b23893380f364ebdff673e4fdb 100644 (file)
@@ -55,7 +55,7 @@
 #endif
 
 #define AMIGA_WIDTH_MAX (752 / 2)
-#define AMIGA_HEIGHT_MAX (572 / 2)
+#define AMIGA_HEIGHT_MAX (574 / 2)
 
 #define DM_DX_FULLSCREEN 1
 #define DM_W_FULLSCREEN 2
@@ -1615,7 +1615,8 @@ int picasso_palette (void)
                        | doMask256 (g, green_bits, green_shift)
                        | doMask256 (b, blue_bits, blue_shift))
                        | doMask256 (0xff, alpha_bits, alpha_shift);
-               if (v !=  picasso_vidinfo.clut[i]) {
+               if (v != picasso_vidinfo.clut[i]) {
+                       //write_log (L"%d:%08x\n", i, v);
                        picasso_vidinfo.clut[i] = v;
                        changed = 1;
                }
index 478b7fb47b10ee77122cab13331d240fa5e284a6..d1d6487c5ced2fbedc99ac57bed1303387ce4b8f 100644 (file)
@@ -1,4 +1,10 @@
 
+- fast multicore systems filesystem slowdown fix (always been there but "slower" CPUs didn't trigger it so easily)
+- last scanline was invisible in filtered doubled modes
+- sprite dma does not switch immediately off when DMACON sprite bit is cleared (Magic Demo / Diabolics)
+- do not autoswitch (button press on unused input device) if it would replace GamePorts custom remapped input device
+- fixed GamePorts parallel port configuration possible crash and wrong configuration
+
 Beta 9:
 
 - emulate mouse counter behavior 100% when joystick is connected (increase/decrease counter by 4 when