From d6bb586c22b8597135a92ce47a16bab687044d3b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 29 Oct 2017 19:15:59 +0200 Subject: [PATCH] 3600b7 --- cfgfile.cpp | 17 +++- custom.cpp | 32 +++---- drawing.cpp | 37 ++++---- include/options.h | 1 + memory.cpp | 4 +- od-win32/resources/resource.h | 1 + od-win32/resources/winuae.rc | 73 ++++++++------- od-win32/sounddep/sound.cpp | 104 +-------------------- od-win32/win32.h | 4 +- od-win32/win32gui.cpp | 27 +++--- od-win32/winuae_msvc15/winuae_msvc.vcxproj | 6 +- od-win32/winuaechangelog.txt | 39 ++++++++ 12 files changed, 151 insertions(+), 194 deletions(-) diff --git a/cfgfile.cpp b/cfgfile.cpp index 6148a803..fd869a46 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -205,7 +205,7 @@ static const TCHAR *dongles[] = { _T("none"), _T("robocop 3"), _T("leaderboard"), _T("b.a.t. ii"), _T("italy'90 soccer"), _T("dames grand maitre"), - _T("rugby coach"), _T("cricket captain"), _T("leviathan"), + _T("rugby coach"), _T("cricket captain"), _T("leviathan"), _T("musicmaster"), NULL }; static const TCHAR *cdmodes[] = { _T("disabled"), _T(""), _T("image"), _T("ioctl"), _T("spti"), _T("aspi"), 0 }; @@ -2147,6 +2147,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_dwrite_bool(f, _T("z3_autoconfig"), p->cs_z3autoconfig); cfgfile_dwrite_bool(f, _T("1mchipjumper"), p->cs_1mchipjumper); cfgfile_dwrite_bool(f, _T("color_burst"), p->cs_color_burst); + cfgfile_dwrite_bool(f, _T("unmapped_zero"), p->cs_unmapped_zero); cfgfile_dwrite (f, _T("chipset_hacks"), _T("0x%x"), p->cs_hacks); if (is_board_enabled(p, ROMTYPE_CD32CART, 0)) { @@ -4085,7 +4086,7 @@ static void get_filesys_controller (const TCHAR *hdc, int *type, int *typenum, i hdcv = HD_CONTROLLER_TYPE_PCMCIA; hdunit = 0; idx = 0; - } else if (_tcslen(hdc) >= 5 && !_tcsncmp(hdc, _T("scide"), 6)) { + } else if (_tcslen(hdc) >= 5 && !_tcsncmp(hdc, _T("scide"), 5)) { hdcv = HD_CONTROLLER_TYPE_PCMCIA; hdunit = 0; idx = 1; @@ -5009,6 +5010,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH || cfgfile_yesno(option, value, _T("ics_agnus"), &p->cs_dipagnus) || cfgfile_yesno(option, value, _T("z3_autoconfig"), &p->cs_z3autoconfig) || cfgfile_yesno(option, value, _T("color_burst"), &p->cs_color_burst) + || cfgfile_yesno(option, value, _T("unmapped_zero"), &p->cs_unmapped_zero) || cfgfile_yesno(option, value, _T("1mchipjumper"), &p->cs_1mchipjumper) || cfgfile_yesno(option, value, _T("agnus_bltbusybug"), &p->cs_agnusbltbusybug) || cfgfile_yesno(option, value, _T("gfxcard_hardware_vblank"), &p->rtg_hardwareinterrupt) @@ -7142,6 +7144,7 @@ void default_prefs (struct uae_prefs *p, bool reset, int type) p->cs_slowmemisfast = 0; p->cs_resetwarning = 1; p->cs_ciatodbug = false; + p->cs_unmapped_zero = false; p->cs_color_burst = false; for (int i = APMODE_NATIVE; i <= APMODE_RTG; i++) { @@ -7750,6 +7753,7 @@ static int bip_cd32 (struct uae_prefs *p, int config, int compa, int romcheck) p->nr_floppies = 0; p->floppyslots[0].dfxtype = DRV_NONE; p->floppyslots[1].dfxtype = DRV_NONE; + p->cs_unmapped_zero = true; set_68020_compa (p, compa, 1); p->cs_compatible = CP_CD32; built_in_chipset_prefs (p); @@ -7972,6 +7976,7 @@ static int bip_super (struct uae_prefs *p, int config, int compa, int romcheck) p->cart_internal = 0; p->picasso96_nocustom = 1; p->cs_compatible = 1; + p->cs_unmapped_zero = true; built_in_chipset_prefs (p); p->cs_ide = -1; p->cs_ciaatod = p->ntscmode ? 2 : 1; @@ -8105,6 +8110,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_z3autoconfig = false; p->cs_bytecustomwritebug = false; p->cs_1mchipjumper = false; + p->cs_unmapped_zero = false; switch (p->cs_compatible) { @@ -8116,6 +8122,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ide = -1; p->cs_mbdmac = 0; p->cs_ramseyrev = 0x0f; + p->cs_unmapped_zero = true; } else if (p->cpu_compatible) { // very A500-like p->cs_df0idhw = 0; @@ -8154,6 +8161,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ksmirror_a8 = 1; p->cs_ciaoverlay = 0; p->cs_resetwarning = 0; + p->cs_unmapped_zero = true; break; case CP_A500: // A500 p->cs_df0idhw = 0; @@ -8202,6 +8210,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_rtc = 1; p->cs_ciaatod = p->ntscmode ? 2 : 1; p->cs_ciatodbug = true; + p->cs_unmapped_zero = true; break; case CP_A3000: // A3000 p->cs_rtc = 2; @@ -8211,6 +8220,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ksmirror_e0 = 0; p->cs_ciaatod = p->ntscmode ? 2 : 1; p->cs_z3autoconfig = true; + p->cs_unmapped_zero = true; break; case CP_A3000T: // A3000T p->cs_rtc = 2; @@ -8220,6 +8230,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ksmirror_e0 = 0; p->cs_ciaatod = p->ntscmode ? 2 : 1; p->cs_z3autoconfig = true; + p->cs_unmapped_zero = true; break; case CP_A4000: // A4000 p->cs_rtc = 2; @@ -8231,6 +8242,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ksmirror_e0 = 0; p->cs_ciaoverlay = 0; p->cs_z3autoconfig = true; + p->cs_unmapped_zero = true; break; case CP_A4000T: // A4000T p->cs_rtc = 2; @@ -8242,6 +8254,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ksmirror_e0 = 0; p->cs_ciaoverlay = 0; p->cs_z3autoconfig = true; + p->cs_unmapped_zero = true; break; } if (p->cpu_model >= 68040) diff --git a/custom.cpp b/custom.cpp index 7eb8a061..3ce66920 100644 --- a/custom.cpp +++ b/custom.cpp @@ -7844,7 +7844,6 @@ static void vsync_handler_pre (void) if (timehack_alive > 0) timehack_alive--; - devices_vsync_pre(); #ifdef PICASSO96 if (isvsync_rtg () >= 0) rtg_vsync (); @@ -7870,6 +7869,9 @@ static void vsync_handler_pre (void) } } + // GUI check here, must be after frame rendering + devices_vsync_pre(); + fpscounter (frameok); bool waspaused = false; @@ -8054,7 +8056,6 @@ static void copper_check (int n) static void hsync_scandoubler (void) { - int i, idx1; struct draw_info *dip1; uae_u16 odmacon = dmacon; uaecptr bpltmp[8], bpltmpx[8]; @@ -8073,7 +8074,7 @@ static void hsync_scandoubler (void) dmacon &= ~DMA_BITPLANE; } - for (i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) { int diff; bpltmp[i] = bplpt[i]; bpltmpx[i] = bplptx[i]; @@ -8100,7 +8101,7 @@ static void hsync_scandoubler (void) // copy color changes dip1 = curr_drawinfo + next_lineno - 1; - for (idx1 = dip1->first_color_change; idx1 < dip1->last_color_change; idx1++) { + for (int idx1 = dip1->first_color_change; idx1 < dip1->last_color_change; idx1++) { struct color_change *cs2 = &curr_color_changes[idx1]; int regno = cs2->regno; int hpos = cs2->linepos / 4; @@ -8128,7 +8129,7 @@ static void hsync_scandoubler (void) dmacon = odmacon; - for (i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) { bplpt[i] = bpltmp[i]; bplptx[i] = bpltmpx[i]; } @@ -8779,7 +8780,8 @@ void custom_prepare (void) void custom_reset (bool hardreset, bool keyboardreset) { - int i; + if (hardreset) + board_prefs_changed(-1, -1); target_reset (); reset_all_systems (); @@ -8808,14 +8810,14 @@ void custom_reset (bool hardreset, bool keyboardreset) if (hardreset) { if (!aga_mode) { uae_u16 c = (((currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA)) || currprefs.cs_denisenoehb) ? 0xfff : 0x000; - for (i = 0; i < 32; i++) { + for (int i = 0; i < 32; i++) { current_colors.color_regs_ecs[i] = c; current_colors.acolors[i] = getxcolor (c); } #ifdef AGA } else { uae_u32 c = 0; - for (i = 0; i < 256; i++) { + for (int i = 0; i < 256; i++) { current_colors.color_regs_aga[i] = c; current_colors.acolors[i] = getxcolor (c); } @@ -8925,7 +8927,7 @@ void custom_reset (bool hardreset, bool keyboardreset) BPLCON0 (0, v); FMODE (0, fmode); if (!(currprefs.chipset_mask & CSMASK_AGA)) { - for(i = 0 ; i < 32 ; i++) { + for(int i = 0 ; i < 32 ; i++) { vv = current_colors.color_regs_ecs[i]; current_colors.color_regs_ecs[i] = -1; record_color_change (0, i, vv); @@ -8935,7 +8937,7 @@ void custom_reset (bool hardreset, bool keyboardreset) } #ifdef AGA } else { - for(i = 0 ; i < 256 ; i++) { + for(int i = 0 ; i < 256 ; i++) { vv = current_colors.color_regs_aga[i]; current_colors.color_regs_aga[i] = -1; record_color_change (0, i, vv); @@ -8951,7 +8953,7 @@ void custom_reset (bool hardreset, bool keyboardreset) v = serper; serper = 0; SERPER(v); - for (i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) { SPRxCTLPOS (i); nr_armed += spr[i].armed != 0; } @@ -9012,8 +9014,7 @@ void dumpcustom (void) static void gen_custom_tables (void) { - int i; - for (i = 0; i < 256; i++) { + for (int i = 0; i < 256; i++) { sprtaba[i] = ((((i >> 7) & 1) << 0) | (((i >> 6) & 1) << 2) | (((i >> 5) & 1) << 4) @@ -9026,7 +9027,7 @@ static void gen_custom_tables (void) sprite_ab_merge[i] = (((i & 15) ? 1 : 0) | ((i & 240) ? 2 : 0)); } - for (i = 0; i < 16; i++) { + for (int i = 0; i < 16; i++) { clxmask[i] = (((i & 1) ? 0xF : 0x3) | ((i & 2) ? 0xF0 : 0x30) | ((i & 4) ? 0xF00 : 0x300) @@ -9914,13 +9915,12 @@ uae_u8 *restore_custom_agacolors (uae_u8 *src) uae_u8 *save_custom_agacolors (int *len, uae_u8 *dstptr) { uae_u8 *dstbak, *dst; - int i; if (dstptr) dstbak = dst = dstptr; else dstbak = dst = xmalloc (uae_u8, 256 * 4); - for (i = 0; i < 256; i++) + for (int i = 0; i < 256; i++) #ifdef AGA SL (current_colors.color_regs_aga[i] | (color_regs_genlock[i] ? 0x80000000 : 0)); #else diff --git a/drawing.cpp b/drawing.cpp index c5448583..9efdf381 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2493,17 +2493,28 @@ static void init_aspect_maps (void) { int i, maxl, h; - h = gfxvidinfo.drawbuffer.height_allocated; - - if (h == 0) - /* Do nothing if the gfx driver hasn't initialized the screen yet */ - return; - linedbld = linedbl = currprefs.gfx_vresolution; if (doublescan > 0 && interlace_seen <= 0) { linedbl = 0; linedbld = 1; } + maxl = (MAXVPOS + 1) << linedbld; + min_ypos_for_screen = minfirstline << linedbl; + max_drawn_amiga_line = -1; + + gfxvidinfo.xchange = 1 << (RES_MAX - currprefs.gfx_resolution); + gfxvidinfo.ychange = linedbl ? 1 : 2; + + visible_left_start = 0; + visible_right_stop = MAX_STOP; + visible_top_start = 0; + visible_bottom_stop = MAX_STOP; + set_blanking_limits(); + + h = gfxvidinfo.drawbuffer.height_allocated; + if (h == 0) + /* Do nothing if the gfx driver hasn't initialized the screen yet */ + return; if (native2amiga_line_map) xfree (native2amiga_line_map); @@ -2514,9 +2525,6 @@ static void init_aspect_maps (void) amiga2aspect_line_map = xmalloc (int, (MAXVPOS + 1) * 2 + 1); native2amiga_line_map = xmalloc (int, h); - maxl = (MAXVPOS + 1) << linedbld; - min_ypos_for_screen = minfirstline << linedbl; - max_drawn_amiga_line = -1; for (i = 0; i < maxl; i++) { int v = i - min_ypos_for_screen; if (v >= h && max_drawn_amiga_line < 0) @@ -2538,15 +2546,6 @@ static void init_aspect_maps (void) for (j = amiga2aspect_line_map[i]; j < h && native2amiga_line_map[j] == -1; j++) native2amiga_line_map[j] = i >> linedbl; } - - gfxvidinfo.xchange = 1 << (RES_MAX - currprefs.gfx_resolution); - gfxvidinfo.ychange = linedbl ? 1 : 2; - - visible_left_start = 0; - visible_right_stop = MAX_STOP; - visible_top_start = 0; - visible_bottom_stop = MAX_STOP; - set_blanking_limits (); } /* @@ -4191,10 +4190,10 @@ void reset_drawing (void) memset (spixels, 0, sizeof spixels); memset (&spixstate, 0, sizeof spixstate); + notice_screen_contents_lost(); init_drawing_frame (); pfield_set_linetoscr(); - notice_screen_contents_lost (); frame_res_cnt = currprefs.gfx_autoresolution_delay; lightpen_y1[0] = lightpen_y2[0] = -1; lightpen_y1[1] = lightpen_y2[1] = -1; diff --git a/include/options.h b/include/options.h index 43422e88..b3da613f 100644 --- a/include/options.h +++ b/include/options.h @@ -612,6 +612,7 @@ struct uae_prefs { bool cs_cia6526; bool cs_bytecustomwritebug; bool cs_color_burst; + bool cs_unmapped_zero; int cs_hacks; struct boardromconfig expansionboard[MAX_EXPANSION_BOARDS]; diff --git a/memory.cpp b/memory.cpp index f856a93e..4963987a 100644 --- a/memory.cpp +++ b/memory.cpp @@ -306,8 +306,8 @@ uae_u32 dummy_get_safe(uaecptr addr, int size, bool inst, uae_u32 defvalue) addr &= 0x00ffffff; if (addr >= 0x10000000) return v & mask; - // CD32 returns zeros from all unmapped addresses - if (currprefs.cs_cd32cd) + // CD32 and B2000 + if (currprefs.cs_unmapped_zero) return 0; if ((currprefs.cpu_model <= 68010) || (currprefs.cpu_model == 68020 && (currprefs.chipset_mask & CSMASK_AGA) && currprefs.address_space_24)) { if (size == 4) { diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 34ca2120..36d806ae 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -1128,6 +1128,7 @@ #define IDC_DBG_MEM 1756 #define IDC_CS_COMPOSITECOLOR 1756 #define IDC_DBG_DASM 1757 +#define IDC_CS_UNMAPPEDZERO 1757 #define IDC_DBG_MEMDOWNFAST 1758 #define IDC_DBG_MEMTOPC 1759 #define IDC_DBG_MEMUPFAST 1760 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index da22635d..a2d7c842 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -768,43 +768,43 @@ IDD_CHIPSET2 DIALOGEX 0, 0, 396, 305 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - CONTROL "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,6,234,10 - GROUPBOX "Battery Backed Up Real Time Clock",IDC_STATIC,1,22,394,31 - CONTROL "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,15,36,57,10 - CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,80,36,77,10 - CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,36,67,10 - CONTROL "A2000 MSM6242B",IDC_CS_RTC4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,240,36,78,10 - EDITTEXT IDC_CS_RTCADJUST,325,34,64,13,ES_AUTOHSCROLL - GROUPBOX "CIA-A TOD Clock Source",IDC_STATIC,1,56,394,29 - CONTROL "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,41,68,86,10 - CONTROL "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,133,68,109,10 - CONTROL "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,248,68,116,10 - GROUPBOX "Chipset Features",IDC_STATIC,0,88,395,128 - CONTROL "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,104,104,11 - CONTROL "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,117,104,11 - CONTROL "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,130,105,11 - CONTROL "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,143,104,11 - CONTROL "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,156,104,11 - CONTROL "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,169,104,11 - CONTROL "CIA TOD bug",IDC_CS_CIATODBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,182,104,11 - CONTROL "1M Chip / 0.5M+0.5M",IDC_CS_1MCHIPJUMPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,195,104,11 - CONTROL "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,104,121,11 - CONTROL "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,117,121,11 - CONTROL "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,130,121,11 - CONTROL "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,143,121,11 - CONTROL "ROM Mirror (A8)",IDC_CS_KSMIRROR_A8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,156,121,11 - CONTROL "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,169,121,11 - CONTROL "Z3 Autoconfig",IDC_CS_Z3AUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,182,104,11 + CONTROL "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,4,234,10 + GROUPBOX "Battery Backed Up Real Time Clock",IDC_STATIC,1,18,394,31 + CONTROL "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,15,32,57,10 + CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,80,32,77,10 + CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,32,67,10 + CONTROL "A2000 MSM6242B",IDC_CS_RTC4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,240,32,78,10 + EDITTEXT IDC_CS_RTCADJUST,325,30,64,13,ES_AUTOHSCROLL + GROUPBOX "CIA-A TOD Clock Source",IDC_STATIC,1,52,394,29 + CONTROL "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,41,64,86,10 + CONTROL "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,133,64,109,10 + CONTROL "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,248,64,116,10 + GROUPBOX "Chipset Features",IDC_STATIC,0,84,395,132 + CONTROL "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,98,104,11 + CONTROL "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,111,104,11 + CONTROL "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,124,105,11 + CONTROL "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,137,104,11 + CONTROL "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,150,104,11 + CONTROL "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,163,104,11 + CONTROL "CIA TOD bug",IDC_CS_CIATODBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,176,104,11 + CONTROL "1M Chip / 0.5M+0.5M",IDC_CS_1MCHIPJUMPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,189,104,11 + CONTROL "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,98,121,11 + CONTROL "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,111,121,11 + CONTROL "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,124,121,11 + CONTROL "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,137,121,11 + CONTROL "ROM Mirror (A8)",IDC_CS_KSMIRROR_A8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,150,121,11 + CONTROL "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,163,121,11 + CONTROL "Z3 Autoconfig",IDC_CS_Z3AUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,176,104,11 CONTROL "Custom register byte write bug",IDC_CS_BYTECUSTOMWRITEBUG, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,195,130,11 - CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,104,125,11 - CONTROL "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,117,125,11 - CONTROL "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,130,125,11 - CONTROL "CDTV-CR",IDC_CS_CDTVCR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,143,123,11 - CONTROL "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,156,125,11 - CONTROL "C00000 is Fast RAM",IDC_CS_SLOWISFAST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,169,125,11 - CONTROL "A1000 Agnus (8361/8367)",IDC_CS_DIPAGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,182,125,11 - CONTROL "Composite color burst",IDC_CS_COMPOSITECOLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,195,125,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,189,130,11 + CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,98,125,11 + CONTROL "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,111,125,11 + CONTROL "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,124,125,11 + CONTROL "CDTV-CR",IDC_CS_CDTVCR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,137,123,11 + CONTROL "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,150,125,11 + CONTROL "C00000 is Fast RAM",IDC_CS_SLOWISFAST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,163,125,11 + CONTROL "A1000 Agnus (8361/8367)",IDC_CS_DIPAGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,176,125,11 + CONTROL "Composite color burst",IDC_CS_COMPOSITECOLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,189,125,12 GROUPBOX "Internal SCSI Hardware",IDC_STATIC,0,218,395,39 CONTROL "A3000 WD33C93 SCSI",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,236,108,11 CONTROL "A4000T NCR53C710 SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,236,125,11 @@ -818,6 +818,7 @@ BEGIN CONTROL "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,289,107,11 EDITTEXT IDC_CS_AGNUSREV,311,274,45,13,ES_AUTOHSCROLL EDITTEXT IDC_CS_DENISEREV,311,289,45,13,ES_AUTOHSCROLL + CONTROL "Unmapped returns zero",IDC_CS_UNMAPPEDZERO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,202,104,11 END IDD_AVIOUTPUT DIALOGEX 0, 0, 396, 260 diff --git a/od-win32/sounddep/sound.cpp b/od-win32/sounddep/sound.cpp index 55d1395a..47055002 100644 --- a/od-win32/sounddep/sound.cpp +++ b/od-win32/sounddep/sound.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -47,109 +48,6 @@ #define USE_XAUDIO 0 -#ifndef _WIN64 - -// only in 8.1+ SDKs - -typedef enum _AUDIO_STREAM_CATEGORY { - AudioCategory_Other = 0, - AudioCategory_ForegroundOnlyMedia = 1, - AudioCategory_Communications = 3, - AudioCategory_Alerts = 4, - AudioCategory_SoundEffects = 5, - AudioCategory_GameEffects = 6, - AudioCategory_GameMedia = 7, - AudioCategory_GameChat = 8, - AudioCategory_Speech = 9, - AudioCategory_Movie = 10, - AudioCategory_Media = 11, -} AUDIO_STREAM_CATEGORY; - -typedef enum AUDCLNT_STREAMOPTIONS { - AUDCLNT_STREAMOPTIONS_NONE = 0, - AUDCLNT_STREAMOPTIONS_RAW = 0x1, - AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x2 -} AUDCLNT_STREAMOPTIONS; -DEFINE_ENUM_FLAG_OPERATORS(AUDCLNT_STREAMOPTIONS); - -typedef struct AudioClientProperties { - UINT32 cbSize; - BOOL bIsOffload; - AUDIO_STREAM_CATEGORY eCategory; - AUDCLNT_STREAMOPTIONS Options; -} AudioClientProperties; - -EXTERN_C const IID IID_IAudioClient2; - -MIDL_INTERFACE("726778CD-F60A-4eda-82DE-E47610CD78AA") -IAudioClient2 : public IAudioClient -{ -public: - virtual HRESULT STDMETHODCALLTYPE IsOffloadCapable( - /* [annotation][in] */ - _In_ AUDIO_STREAM_CATEGORY Category, - /* [annotation][in] */ - _Out_ BOOL *pbOffloadCapable) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetClientProperties( - /* [annotation][in] */ - _In_ const AudioClientProperties *pProperties) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetBufferSizeLimits( - /* [annotation][in] */ - _In_ const WAVEFORMATEX *pFormat, - /* [annotation][in] */ - _In_ BOOL bEventDriven, - /* [annotation][in] */ - _Out_ REFERENCE_TIME *phnsMinBufferDuration, - /* [annotation][in] */ - _Out_ REFERENCE_TIME *phnsMaxBufferDuration) = 0; - -}; - -#else - -#define AudioCategory_Media 11 -#define AUDCLNT_STREAMOPTIONS_MATCH_FORMAT 0x2 - -#endif - -EXTERN_C const IID IID_IAudioClient3; - -MIDL_INTERFACE("7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42") -IAudioClient3 : public IAudioClient2 -{ -public: - virtual HRESULT STDMETHODCALLTYPE GetSharedModeEnginePeriod( - /* [annotation][in] */ - _In_ const WAVEFORMATEX *pFormat, - /* [annotation][out] */ - _Out_ UINT32 *pDefaultPeriodInFrames, - /* [annotation][out] */ - _Out_ UINT32 *pFundamentalPeriodInFrames, - /* [annotation][out] */ - _Out_ UINT32 *pMinPeriodInFrames, - /* [annotation][out] */ - _Out_ UINT32 *pMaxPeriodInFrames) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCurrentSharedModeEnginePeriod( - /* [unique][annotation][out] */ - _Out_ WAVEFORMATEX **ppFormat, - /* [annotation][out] */ - _Out_ UINT32 *pCurrentPeriodInFrames) = 0; - - virtual HRESULT STDMETHODCALLTYPE InitializeSharedAudioStream( - /* [annotation][in] */ - _In_ DWORD StreamFlags, - /* [annotation][in] */ - _In_ UINT32 PeriodInFrames, - /* [annotation][in] */ - _In_ const WAVEFORMATEX *pFormat, - /* [annotation][in] */ - _In_opt_ LPCGUID AudioSessionGuid) = 0; - -}; - struct sound_dp { // directsound diff --git a/od-win32/win32.h b/od-win32/win32.h index 4d695f33..80707e91 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("6") +#define WINUAEBETA _T("7") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2017, 10, 14) +#define WINUAEDATE MAKEBD(2017, 10, 29) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 6d73c863..6ad5ee39 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -8102,6 +8102,7 @@ static void values_to_chipsetdlg2 (HWND hDlg) CheckDlgButton(hDlg, IDC_CS_1MCHIPJUMPER, workprefs.cs_1mchipjumper || workprefs.chipmem_size >= 0x100000); CheckDlgButton(hDlg, IDC_CS_BYTECUSTOMWRITEBUG, workprefs.cs_bytecustomwritebug); CheckDlgButton(hDlg, IDC_CS_COMPOSITECOLOR, workprefs.cs_color_burst); + CheckDlgButton(hDlg, IDC_CS_UNMAPPEDZERO, workprefs.cs_unmapped_zero); txt[0] = 0; _stprintf (txt, _T("%d"), workprefs.cs_rtc_adjust); SetDlgItemText(hDlg, IDC_CS_RTCADJUST, txt); @@ -8192,6 +8193,7 @@ static void values_from_chipsetdlg2 (HWND hDlg, UINT msg, WPARAM wParam, LPARAM workprefs.cs_1mchipjumper = ischecked(hDlg, IDC_CS_1MCHIPJUMPER); workprefs.cs_bytecustomwritebug = ischecked(hDlg, IDC_CS_BYTECUSTOMWRITEBUG); workprefs.cs_color_burst = ischecked(hDlg, IDC_CS_COMPOSITECOLOR); + workprefs.cs_unmapped_zero = ischecked(hDlg, IDC_CS_UNMAPPEDZERO); cfgfile_compatibility_romtype(&workprefs); @@ -8278,6 +8280,7 @@ static void enable_for_chipsetdlg2 (HWND hDlg) ew(hDlg, IDC_CS_1MCHIPJUMPER, e && workprefs.chipmem_size < 0x100000); ew(hDlg, IDC_CS_BYTECUSTOMWRITEBUG, e); ew(hDlg, IDC_CS_COMPOSITECOLOR, e); + ew(hDlg, IDC_CS_UNMAPPEDZERO, e); } static INT_PTR CALLBACK ChipsetDlgProc2 (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -11250,7 +11253,8 @@ static INT_PTR MiscDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) v = SendDlgItemMessage (hDlg, IDC_DXMODE, CB_GETCURSEL, 0, 0L); if (v != CB_ERR) { workprefs.gfx_api = v; - d3d_select(&workprefs); + if (full_property_sheet) + d3d_select(&workprefs); enable_for_miscdlg (hDlg); } break; @@ -15710,16 +15714,17 @@ static void init_portsdlg (HWND hDlg) workprefs.parallel_postscript_emulation = 0; } - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_RESETCONTENT, 0, 0L); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)szNone.c_str()); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("RoboCop 3")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Leader Board")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("B.A.T. II")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Italy '90 Soccer")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Dames Grand-Maître")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Rugby Coach")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Cricket Captain")); - SendDlgItemMessage (hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Leviathan")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_RESETCONTENT, 0, 0L); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)szNone.c_str()); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("RoboCop 3")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Leader Board")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("B.A.T. II")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Italy '90 Soccer")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Dames Grand-Maître")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Rugby Coach")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Cricket Captain")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Leviathan")); + SendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Music Master")); SendDlgItemMessage (hDlg, IDC_SERIAL, CB_RESETCONTENT, 0, 0L); SendDlgItemMessage (hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)szNone.c_str()); diff --git a/od-win32/winuae_msvc15/winuae_msvc.vcxproj b/od-win32/winuae_msvc15/winuae_msvc.vcxproj index f25c1722..a53ce383 100644 --- a/od-win32/winuae_msvc15/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc15/winuae_msvc.vcxproj @@ -162,9 +162,9 @@ $(MSBuildProgramFiles32)\Windows Kits\10\lib\10.0.16299.0\ucrt\$(PlatformShortName);C:\dev\lib;$(LibraryPath) C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;C:\dev\lib;C:\dev\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath) C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath) - $(MSBuildProgramFiles32)\Windows Kits\10\Include\10.0.10240.0\ucrt;C:\dev\include;$(IncludePath) + $(MSBuildProgramFiles32)\Windows Kits\10\Include\10.0.16299.0\ucrt;$(MSBuildProgramFiles32)\Windows Kits\10\Include\10.0.16299.0\winrt;$(MSBuildProgramFiles32)\Windows Kits\10\Include\10.0.16299.0\um;$(MSBuildProgramFiles32)\Windows Kits\10\Include\10.0.16299.0\shared;C:\dev\include;$(IncludePath) $(ReferencePath) - $(MSBuildProgramFiles32)\Windows Kits\10\lib\10.0.10240.0\ucrt\$(PlatformShortName);C:\dev\lib;$(LibraryPath) + $(MSBuildProgramFiles32)\Windows Kits\10\lib\10.0.16299.0\ucrt\$(PlatformShortName);C:\dev\lib;$(LibraryPath) true true true @@ -175,7 +175,7 @@ C:\dev\include;$(IncludePath) C:\dev\lib\x64;$(LibraryPath) C:\dev\lib\x64;$(LibraryPath) - C:\dev\include;$(IncludePath) + C:\dev\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um;$(IncludePath) C:\dev\lib\x64;$(LibraryPath) diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index d4b75926..c78fc259 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -4,6 +4,45 @@ JIT Direct current rules are less complex now. It automatically switches off onl - RTG VRAM is outside of reserved natmem space. Workaround: Move RTG in earlier position using Hardware info GUI panel. Note that in 64-bit version RTG VRAM must be inside of reserved natmem space. (Outside = error message and return back to GUI) +Beta 7: + +- Added support for npcap without winpcap backwards compatibility option, fall back to winpcap if not found. (https://nmap.org/npcap/, fully Windows 10 1607+ compatible, original winpcap is not and win10pcap has at least one annoying bug.) +- Fixed partially corrupted first avioutput recorded frame. +- When saving state with avioutput active: last frame was not recorded. +- Number of avioutput frames buffered (waiting for compression thread to process them) counter was reset periodically which caused lost frames (and leaked memory) in recorded video if CPU was not fast enough. +- 680x0 STOP #X instruction undocumented feature emulated (documentation does not mention #X S-bit having any special conditions) + - 68000 (010?) X S-bit cleared and Trace not active: Updates SR, increases PC and then causes privilege violation exception. (Weird, isn't it?) + - 68000 (010?) exits after 4 idle cycles if trace was active, without trace it takes 8 cycles (or more if it needs to stop). + - 68020/030: works as documented, S-bit makes no difference. + - 68040/060 and X S-bit cleared: Does not modify SR, does not increase PC, causes immediate privilege violation exception. +- Added Kupke Golem HD3000 emulation. Uses existing OMTI adapter emulation, not tested, working install disk is MIA. +- Added Music Master dongle emulation. +- Added "unmapped zero" advanced chipset option. If set, all unmapped memory regions return zeros (previously always if non-ce 68020+). Added because B2000 (A2000 not tested) does this which is different than all other 68000 based Amigas, probably due to bus controller chip. This can change behavior of some badly coded programs. +- Directory filesystem ACTION_SET_DATE failed to change datestamp if file was read-only. +- Expansion device GUI changes are now activated after hard reset. + +Kupke Golem HD3000: +- OMTI controller based. ("SASI CHS" HD mode) +- Byte wide hardware handshake PIO. +- v1.4 ROM added ("golem driver v1.4 (15 SEP 1989)") + +Very experimental Direct3D 11 mode (DXGI 1.2+). Work in progress! + +DXGI enables much better control of frame timing (not yet in use), allows windowed variable refresh rate support and more. + +- Only windowed/full-window/fullscreen option supported. +- Multiple monitors supported. +- Direct3D11 on the fly switching supported. +- Filter settings are ignored. +- Scaling can't be adjusted. +- Enables (if available) windowed variable refresh rate mode (DXGI_FEATURE_PRESENT_ALLOW_TEARING, DXGI 1.5+). G-Sync confirmed working. Which is nice. +- In theory may work with Windows 7 (must have all updates) but may also accidentally require 8 or 10 (at this point). Windows 10 16299 only tested. +- Useless error message appears if things go wrong. +- Still requires d3d9x (=June 2010 DX redistributable) for matrix calculations. +- Calls SetMaximumFrameLatency(1) but I am not sure if it has any effect in windowed mode. +- Quick and dirty hack of Direct3D11 2D example tutorial. +- Shaders must be unpacked in plugins\filtershaders\direct3d11 (http://www.winuae.net/files/b/direct3d11_shaders.7z) + Beta 6: - "PC Bridge (40)" drive was missing from "Don't support 360k floppy images in Amiga drive unless it is configured as 5.25" drive" check. -- 2.47.3