]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
3400b3
authorToni Wilen <twilen@winuae.net>
Sun, 28 Aug 2016 14:05:28 +0000 (17:05 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 28 Aug 2016 14:05:28 +0000 (17:05 +0300)
15 files changed:
cfgfile.cpp
custom.cpp
ethernet.cpp
expansion.cpp
gfxboard.cpp
include/autoconf.h
main.cpp
od-win32/picasso96_win.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
pci.cpp
qemuvga/es1370.cpp
sndboard.cpp
statusline.cpp

index 930d9db8d7ce2e0dc1afbf30441ca479e3efc3f8..1963f7d9060b531a656229bbe50ddc9e663753dd 100644 (file)
@@ -1913,12 +1913,15 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
                        }
                        s[_tcslen (s) - 1] = 0;
                }
-               if (i == CHIPSET_REFRESH_PAL)
-                       cfgfile_dwrite (f, _T("displaydata_pal"), tmp);
-               else if (i == CHIPSET_REFRESH_NTSC)
-                       cfgfile_dwrite (f, _T("displaydata_ntsc"), tmp);
-               else
+               if (i == CHIPSET_REFRESH_PAL) {
+                       if (cr->locked)
+                               cfgfile_dwrite (f, _T("displaydata_pal"), tmp);
+               } else if (i == CHIPSET_REFRESH_NTSC) {
+                       if (cr->locked)
+                               cfgfile_dwrite (f, _T("displaydata_ntsc"), tmp);
+               } else {
                        cfgfile_dwrite (f, _T("displaydata"), tmp);
+               }
        }
 
        cfgfile_write_str (f, _T("collision_level"), collmode[p->collision_level]);
@@ -3532,12 +3535,12 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                        if (_tcscmp (option, _T("displaydata_pal")) == 0) {
                                i = CHIPSET_REFRESH_PAL;
                                cr = &p->cr[i];
-                               cr->rate = -1;
+                               cr->inuse = false;
                                _tcscpy (label, _T("PAL"));
                        } else if (_tcscmp (option, _T("displaydata_ntsc")) == 0) {
                                i = CHIPSET_REFRESH_NTSC;
                                cr = &p->cr[i];
-                               cr->rate = -1;
+                               cr->inuse = false;
                                _tcscpy (label, _T("NTSC"));
                        }
                        if (!cr->inuse) {
index 77feaef91463fa4e2187f9cb8da1ac499a0bb316..5122c3b9f6823e622a4421b9a1387bd4028d152b 100644 (file)
@@ -2218,13 +2218,14 @@ static void reset_bpl_vars(void)
 /* check special case where last fetch wraps to next line
  * this makes totally corrupted and flickering display on
  * real hardware due to refresh cycle conflicts
+ * Exception: AGA + 64 bit fetch: glitch free overrun is possible.
  */
 static void maybe_finish_last_fetch (int pos, int fm)
 {
        if (plf_state > plf_passed_stop2 || plf_state < plf_passed_stop || (fetch_state != fetch_started && fetch_state != fetch_started_first) || !dmaen (DMA_BITPLANE)) {
                finish_last_fetch (pos, fm, true);
        } else {
-               bitplane_overrun_fetch_cycle = fetch_cycle;
+               bitplane_overrun_fetch_cycle = fetch_cycle - 1;
                int cycle_start = bitplane_overrun_fetch_cycle & fetchstart_mask;
                int left = fetchunit - cycle_start;
                if (plf_state == plf_passed_stop_act) {
@@ -2299,8 +2300,13 @@ static void do_overrun_fetch(int until, int fm)
                        }
                        break;  
                }
+
 #if 0
                if (bpl0) {
+                       bpl1dat_written = true;
+                       bpl1dat_written_at_least_once = true;
+                       if (thisline_decision.plfleft < 0)
+                               reset_bpl_vars();
                        maybe_first_bpl1dat(pos);
                        beginning_of_plane_block(pos, fm);
                }
@@ -2312,12 +2318,6 @@ static void do_overrun_fetch(int until, int fm)
                }
                if (toscr_nbits == 16)
                        flush_display(fm);
-               if (bpl0) {
-                       bpl1dat_written = true;
-                       bpl1dat_written_at_least_once = true;
-                       reset_bpl_vars();
-                       beginning_of_plane_block(pos, fetchmode);
-               }
 #endif
 
                if ((bitplane_overrun_fetch_cycle & fetchunit_mask) == 0) {
@@ -7618,6 +7618,8 @@ static void vsync_handler_pre (void)
                        }
                }
        }
+       if (regs.halted < 0)
+               reset_cpu_idle();
        cpu_last_stop_vpos = 0;
        cpu_stopped_lines = 0;
 #endif
@@ -8341,8 +8343,8 @@ static void hsync_handler_post (bool onvsync)
                                maybe_process_pull_audio();
                        }
                }
-               if (vpos + 1 < maxvpos + lof_store && vpos >= nextwaitvpos && (audio_is_pull() <= 0 || (audio_is_pull() > 0 && audio_pull_buffer()))) {
-                       nextwaitvpos += maxvpos_display * 1 / 4;
+               if (vpos + 1 < maxvpos + lof_store && vpos >= nextwaitvpos && vpos < maxvpos - (maxvpos / 3) && (audio_is_pull() <= 0 || (audio_is_pull() > 0 && audio_pull_buffer()))) {
+                       nextwaitvpos += maxvpos_display * 1 / 3;
                        vsyncmintime += vsynctimeperline;
                        if (!vsync_isdone () && !currprefs.turbo_emulation) {
                                frame_time_t rpt = read_processor_time ();
index 40689f3551536bf69271401bee793d50d530cfad..e05ee12b69d65cc621ccb1a81f07f6eab40a5bda 100644 (file)
@@ -197,6 +197,7 @@ bool ethernet_enumerate (struct netdriverdata **nddp, const TCHAR *name)
 {
        int j;
        struct netdriverdata *nd;
+       gui_flicker_led(LED_NET, 0, 0);
        if (name) {
                netmode = 0;
                *nddp = NULL;
index 3cb7fa241737a58451eb4d21ea19d324ce920167..c73374517381feb0ce75ff9af065b2ea96fbb0db 100644 (file)
@@ -2518,6 +2518,8 @@ bool expansion_can_move(struct uae_prefs *p, int index)
        if (index < 0 || index >= cardno)
                return false;
        struct card_data *cd = cards[index];
+       if (cd->aci.parent_of_previous)
+               return false;
        int order1 = get_order(p, cd);
        if (order1 < 0 || order1 >= EXPANSION_ORDER_MAX - 1)
                return false;
@@ -2675,7 +2677,7 @@ static void expansion_parse_cards(struct uae_prefs *p, bool log)
                write_log(_T("END\n"));
 }
 
-int expansion_autoconfig_move(struct uae_prefs *p, int index, int dir)
+int expansion_autoconfig_move(struct uae_prefs *p, int index, int dir, bool test)
 {
        if (index < 0 || index >= cardno)
                return -1;
@@ -2700,6 +2702,9 @@ int expansion_autoconfig_move(struct uae_prefs *p, int index, int dir)
                }
                dir += dir < 0 ? -1 : 1;
        }
+       if (test) {
+               return 0;
+       }
        set_order(p, cd1, order2);
        set_order(p, cd2, order1);
        if (p != &currprefs)
index 86eeb7cf9d6930a3545e3ccfe50f2bfa98a745c2..8042268eb1731d8eac1468bfcf5ce2c58ddd66df 100644 (file)
@@ -674,8 +674,8 @@ bool gfxboard_vsync_handler (void)
                                        write_log(_T("GFXBOARD %d ACTIVE=%d\n"), i, gb->monswitch_current);
                                        if (gb->monswitch_current) {
                                                if (!gfxboard_rtg_enable_initial(i)) {
-                                                       // Nothing visible and RTG on? Re-enable our display.
-                                                       if (rtg_visible < 0 && picasso_on) {
+                                                       // Nothing visible? Re-enable our display.
+                                                       if (rtg_visible < 0) {
                                                                gfxboard_toggle(i, 0);
                                                        }
                                                }
index c7c9e152d629db398194f234cb3bf6a432e17edb..a48d97d7546c4e6d11cbc7a6a9be8c1cb73a70d3 100644 (file)
@@ -152,7 +152,7 @@ extern struct autoconfig_info *expansion_get_autoconfig_info(struct uae_prefs*,
 extern struct autoconfig_info *expansion_get_autoconfig_data(struct uae_prefs *p, int index);
 extern struct autoconfig_info *expansion_get_autoconfig_by_address(struct uae_prefs *p, uaecptr addr);
 extern void expansion_set_autoconfig_sort(struct uae_prefs *p);
-extern int expansion_autoconfig_move(struct uae_prefs *p, int index, int direction);
+extern int expansion_autoconfig_move(struct uae_prefs *p, int index, int direction, bool test);
 extern bool expansion_can_move(struct uae_prefs *p, int index);
 extern bool alloc_expansion_bank(addrbank *bank, struct autoconfig_info *aci);
 extern void free_expansion_bank(addrbank *bank);
index c0b460d1d28b9af60054606f447fd2690d1896f8..346e2bb9b4ecd1b6cff1b5e2f01215dc1e932880 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1076,6 +1076,7 @@ static int real_main2 (int argc, TCHAR **argv)
        memset (&gui_data, 0, sizeof gui_data);
        gui_data.cd = -1;
        gui_data.hd = -1;
+       gui_data.net = -1;
        gui_data.md = (currprefs.cs_cd32nvram || currprefs.cs_cdtvram) ? 0 : -1;
        logging_init (); /* Yes, we call this twice - the first case handles when the user has loaded
                                                 a config using the cmd-line.  This case handles loads through the GUI. */
index a3cecf5b6c17e2721cca53c37d2b7f52b216bbeb..ed91e38bfc9ada91b2716fce0698813e4b397da1 100644 (file)
@@ -742,7 +742,7 @@ void picasso_trigger_vblank(void)
 static bool rtg_render (void)
 {
        bool flushed = false;
-       bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+       bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE && currprefs.rtgboards[0].rtgmem_size;
 
        if (doskip () && p96skipmode == 0) {
                ;
@@ -991,7 +991,7 @@ static void picasso_handle_vsync2(void)
        int vsync = isvsync_rtg();
        int mult;
        bool rendered = false;
-       bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+       bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE;
 
        int state = picasso_state_change;
        if (state & PICASSO_STATE_SETDAC) {
@@ -1053,7 +1053,7 @@ static void picasso_handle_vsync2(void)
        if (!picasso_on)
                return;
 
-       if (uaegfx)
+       if (uaegfx && rtg_index == 0)
                mouseupdate();
 
        if (thisisvsync) {
@@ -1062,7 +1062,7 @@ static void picasso_handle_vsync2(void)
        }
 
        if (uaegfx) {
-               if (setupcursor_needed)
+               if (setupcursor_needed && rtg_index == 0)
                        setupcursor();
                if (thisisvsync)
                        picasso_trigger_vblank();
@@ -1080,16 +1080,15 @@ static int p96hsync;
 
 void picasso_handle_vsync(void)
 {
-       if (rtg_index < 0)
-               return;
-
-       bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+       bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE;
 
-       if (currprefs.rtgboards[rtg_index].rtgmem_size == 0)
+       if (currprefs.rtgboards[0].rtgmem_size == 0)
                return;
 
        if (!picasso_on && uaegfx) {
-               createwindowscursor(0, 0, 0, 0, 0, 1);
+               if (rtg_index == 0) {
+                       createwindowscursor(0, 0, 0, 0, 0, 1);
+               }
                picasso_trigger_vblank();
                return;
        }
@@ -1105,12 +1104,9 @@ void picasso_handle_vsync(void)
 
 void picasso_handle_hsync(void)
 {
-       if (rtg_index < 0)
-               return;
-
-       bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+       bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE;
 
-       if (currprefs.rtgboards[rtg_index].rtgmem_size == 0)
+       if (currprefs.rtgboards[0].rtgmem_size == 0)
                return;
 
        int vsync = isvsync_rtg();
@@ -1131,7 +1127,9 @@ void picasso_handle_hsync(void)
        if (p96hsync >= p96syncrate) {
                if (!picasso_on) {
                        if (uaegfx) {
-                               createwindowscursor(0, 0, 0, 0, 0, 1);
+                               if (rtg_index == 0) {
+                                       createwindowscursor(0, 0, 0, 0, 0, 1);
+                               }
                                picasso_trigger_vblank();
                        }
                } else {
@@ -2640,7 +2638,7 @@ static uae_u32 REGPARAM2 picasso_SetColorArray (TrapContext *ctx)
        uae_u16 count = trap_get_dreg (ctx, 1);
        uaecptr boardinfo = trap_get_areg (ctx, 0);
        uaecptr clut = boardinfo + PSSO_BoardInfo_CLUT;
-       if (start > 256 || start + count > 256)
+       if (start > 256 || count > 256 || start + count > 256)
                return 0;
        if (updateclut(ctx, clut, start, count))
                full_refresh = 1;
index 0322db97deb9d7f905d810f0550b64bbb379ec05..d5a8019442f27f0eedf8d58e354a732fed3d4626 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("2")
+#define WINUAEBETA _T("3")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2016, 8, 24)
+#define WINUAEDATE MAKEBD(2016, 8, 28)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 93e9a13f187081dfa18b8c06697a972805ecd7a4..e0b78844a082839795cf3e5a696617bc0b021d12 100644 (file)
@@ -9864,6 +9864,22 @@ static LRESULT ProcesssBoardsDlgProcCustomDraw(LPARAM lParam)
 {
 }
 
+static void BoardsEnable(HWND hDlg, int selected)
+{
+       bool move_up = expansion_can_move(&workprefs, selected);
+       bool move_down = move_up;
+       if (move_up) {
+               if (expansion_autoconfig_move(&workprefs, selected, -1, true) < 0)
+                       move_up = false;
+       }
+       if (move_down) {
+               if (expansion_autoconfig_move(&workprefs, selected, 1, true) < 0)
+                       move_down = false;
+       }
+       ew(hDlg, IDC_BOARDS_UP, move_up);
+       ew(hDlg, IDC_BOARDS_DOWN, move_down);
+}
+
 static INT_PTR CALLBACK BoardsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
        static int recursive = 0;
@@ -9898,16 +9914,12 @@ static INT_PTR CALLBACK BoardsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                                case IDC_BOARDS_UP:
                                case IDC_BOARDS_DOWN:
                                if (selected >= 0) {
-                                       int newpos = expansion_autoconfig_move(&workprefs, selected, LOWORD(wParam) == IDC_BOARDS_UP ? -1 : 1);
+                                       int newpos = expansion_autoconfig_move(&workprefs, selected, LOWORD(wParam) == IDC_BOARDS_UP ? -1 : 1, false);
                                        if (newpos >= 0) {
                                                selected = newpos;
-                                               
-                                               
+                                               BoardsEnable(hDlg, selected);
                                                InitializeListView(hDlg);
-
-
                                                ListView_SetItemState(cachedlist, selected, LVIS_SELECTED, LVIS_SELECTED);
-
                                        }
                                }
                                break;
@@ -9949,10 +9961,8 @@ static INT_PTR CALLBACK BoardsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                                        HWND list = nmlistview->hdr.hwndFrom;
                                        int entry = listview_entry_from_click(list, &column);
                                        if (entry >= 0) {
-                                               bool move = expansion_can_move(&workprefs, entry);
                                                selected = entry;
-                                               ew(hDlg, IDC_BOARDS_UP, move);
-                                               ew(hDlg, IDC_BOARDS_DOWN, move);
+                                               BoardsEnable(hDlg, selected);
                                        }
                                }
                                break;
@@ -19740,7 +19750,8 @@ void gui_flicker_led (int led, int unitnum, int status)
        if (led < 0) {
                gui_flicker_led2(LED_HD, 0, 0);
                gui_flicker_led2(LED_CD, 0, 0);
-               gui_flicker_led2(LED_NET, 0, 0);
+               if (gui_data.net >= 0)
+                       gui_flicker_led2(LED_NET, 0, 0);
                if (gui_data.md >= 0)
                        gui_flicker_led2(LED_MD, 0, 0);
        } else {
index 1268530bb6c9eaaeda045096d23bdf9accb52a0e..fffa2869a1111ea0474db20c4604bef3f24c9904 100644 (file)
@@ -1,4 +1,20 @@
 \r
+Beta 3:\r
+\r
+- PCI ES1370 fixed.\r
+- (Missed from b1 log): CPU Idle logic has been completely changed, now it only has two states, inactive and active.\r
+  Active state changes internal CPU speed state to approximate and active equals fastest possible mode.\r
+  Old logic was never good enough. CPU usage was never low enough and it didn't prevent audio glitches.\r
+- Another b1 missed log entry: conditional register breakpoints, break when any CPU register matches\r
+  (equals, smaller, larger, range). More information in debugger help.\r
+- Do not use new CPU Idle mode in PPC-only configs.\r
+- Low latency vsync really fixed. Can also fix other CPU usage related problems in other modes.\r
+- Hardware info panel up/down button disable logic improved.\r
+- Bitplane DMA overrun 1 cycle adjustment, now it matches real A1200 100%. Possible Disk/Audio/Sprite\r
+  DMA slot conflicts are not yet emulated. (Causes graphics glitches on real hardware)\r
+- uaegfx vblank interrupt hang fixed.\r
+- Network OSD led was invisible.\r
+\r
 Beta 2:\r
 \r
 - Needed natmem space also included IO only Z3 boards but only RAM and VRAM boards should count.\r
diff --git a/pci.cpp b/pci.cpp
index 791722f886037825917e9e6442db7a82d5f55ba9..c5f9c83d10b57834a5de1e5cebd983d35a7d6682 100644 (file)
--- a/pci.cpp
+++ b/pci.cpp
@@ -1243,7 +1243,7 @@ void pci_read_dma(struct pci_board_state *pcibs, uaecptr addr, uae_u8 *p, int si
        } else {
                write_log(_T("pci_read_dma invalid address %08x, size %d\n"), addr, size);
                while (size > 0) {
-                       *p++ = uaerand();
+                       *p++ = uaerand() >> 4;
                        addr++;
                        size--;
                }
@@ -1473,13 +1473,13 @@ static void add_pci_devices(struct pci_bridge *pcib)
                pci_board_add(pcib, &ne2000_pci_board, slot++, 0);
        }
 
-       if (is_device_rom(&currprefs, ROMTYPE_FM801, 0) > 0) {
+       if (is_device_rom(&currprefs, ROMTYPE_FM801, 0) >= 0) {
                pci_board_add(pcib, &fm801_pci_board, slot, 0);
                pci_board_add(pcib, &fm801_pci_board_func1, slot, 1);
                slot++;
        }
 
-       if (is_device_rom(&currprefs, ROMTYPE_ES1370, 0) > 0) {
+       if (is_device_rom(&currprefs, ROMTYPE_ES1370, 0) >= 0) {
                pci_board_add(pcib, &es1370_pci_board, slot++, 0);
        }
 
index f708d86dcbab12fc63cab2c34b08d62a8895426b..e8806b298d27b09e198a8b2c66ea85bdef09df0c 100644 (file)
@@ -1186,8 +1186,8 @@ static void es1370_free(struct pci_board_state *pcibs)
 static bool es1370_init(struct pci_board_state *pcibs)
 {
        init(pcibs);
-       es1370_reset(&es1370state);
        es1370state.irq_callback = pcibs->irq_callback;
+       es1370_reset(&es1370state);
        return true;
 }
 
index c280c125aaa769edcb1b08d283b74fd694c03cdc..dee3873fd26437911506a33eb772640a537fb3aa 100644 (file)
@@ -1882,7 +1882,11 @@ void AUD_set_active_out(SWVoiceOut *sw, int on)
        sw->samplebuf_index = 0;
        sw->samplebuf_total = 0;
        calculate_volume_qemu();
-       sw->streamid = audio_enable_stream(sw->active, -1, 2);
+       audio_enable_stream(false, sw->streamid, 2);
+       sw->streamid = 0;
+       if (on) {
+               sw->streamid = audio_enable_stream(true, -1, 2);
+       }
 }
 void AUD_set_active_in(SWVoiceIn *sw, int on)
 {
@@ -1894,9 +1898,11 @@ int  AUD_is_active_in(SWVoiceIn *sw)
 void AUD_close_out(QEMUSoundCard *card, SWVoiceOut *sw)
 {
        qemu_voice_out = NULL;
-       audio_enable_stream(false, sw->streamid, 0);
-       sw->streamid = 0;
-       xfree(sw);
+       if (sw) {
+               audio_enable_stream(false, sw->streamid, 0);
+               sw->streamid = 0;
+               xfree(sw);
+       }
 }
 SWVoiceIn *AUD_open_in(
        QEMUSoundCard *card,
index 9e96917df508967a913d280fa3cb78d377f3355e..483c5db55a953b206968c01c03c12f234a4d01c9 100644 (file)
@@ -243,19 +243,21 @@ void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u
                        num3 = -1;
                } else if (led == LED_NET) {
                        pos = 6;
-                       on = gui_data.net;
-                       on_rgb = 0;
-                       if (on & 1)
-                               on_rgb |= 0x00cc00;
-                       if (on & 2)
-                               on_rgb |= 0xcc0000;
-                       off_rgb = 0x000000;
-                       num1 = -1;
-                       num2 = -1;
-                       num3 = 17;
-                       am = 1;
+                       if (gui_data.net >= 0) {
+                               on = gui_data.net;
+                               on_rgb = 0;
+                               if (on & 1)
+                                       on_rgb |= 0x00cc00;
+                               if (on & 2)
+                                       on_rgb |= 0xcc0000;
+                               off_rgb = 0x000000;
+                               num1 = -1;
+                               num2 = -1;
+                               num3 = 17;
+                               am = 1;
+                       }
                } else {
-                       return;
+                       continue;
                }
                on_rgb |= 0x33000000;
                off_rgb |= 0x33000000;