From: Toni Wilen Date: Sun, 10 Sep 2017 15:51:07 +0000 (+0300) Subject: 3600b4 X-Git-Tag: 3600~97 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=e1edb58320477a5416b805b0fadbee9337768428;p=francis%2Fwinuae.git 3600b4 --- diff --git a/akiko.cpp b/akiko.cpp index 2b8443f1..8505b78f 100644 --- a/akiko.cpp +++ b/akiko.cpp @@ -30,7 +30,6 @@ #include "flashrom.h" #include "debug.h" -#define AKIKO_DEBUG_NVRAM 0 #define AKIKO_DEBUG_IO 1 #define AKIKO_DEBUG_IO_CMD 1 diff --git a/ide.cpp b/ide.cpp index 20974e14..86aa357b 100644 --- a/ide.cpp +++ b/ide.cpp @@ -1068,6 +1068,7 @@ static void ide_do_command (struct ide_hdf *ide, uae_u8 cmd) ide->regs.ide_error = 0; ide->intdrq = false; ide->lba48cmd = false; + ide->irq_delay = 0; if (ide->atapi) { @@ -1357,6 +1358,8 @@ uae_u32 ide_read_reg (struct ide_hdf *ide, int ide_reg) v = ide->regs.ide_select; break; case IDE_STATUS: + if (ide->irq && IDE_LOG > 1) + write_log(_T("IDE IRQ CLEAR\n")); ide->irq = 0; ide->irq_new = false; /* fall through */ diff --git a/include/options.h b/include/options.h index 9efffdaf..5119abb5 100644 --- a/include/options.h +++ b/include/options.h @@ -351,6 +351,7 @@ struct gfx_filterdata #define MAX_DUPLICATE_EXPANSION_BOARDS 4 #define MAX_EXPANSION_BOARDS 20 +#define ROMCONFIG_CONFIGTEXT_LEN 256 struct boardromconfig; struct romconfig { @@ -362,7 +363,7 @@ struct romconfig int device_settings; int subtype; void *unitdata; - TCHAR configtext[256]; + TCHAR configtext[ROMCONFIG_CONFIGTEXT_LEN]; uae_u16 manufacturer; uae_u8 product; uae_u8 autoconfig[16]; @@ -584,6 +585,7 @@ struct uae_prefs { bool cs_cd32c2p; bool cs_cd32nvram; bool cs_cd32fmv; + bool cs_cd32cubo; int cs_cd32nvram_size; bool cs_cdtvcd; bool cs_cdtvram; diff --git a/memory.cpp b/memory.cpp index b330e2bc..7d7e94ac 100644 --- a/memory.cpp +++ b/memory.cpp @@ -39,6 +39,7 @@ #include "cpuboard.h" #include "uae/ppc.h" #include "devices.h" +#include "inputdevice.h" bool canbang; static bool rom_write_enabled; @@ -2657,6 +2658,7 @@ void memory_reset (void) arcadia_map_banks (); } #endif + inputdevice_map(); #ifdef ACTION_REPLAY #ifdef ARCADIA diff --git a/od-win32/hardfile_win32.cpp b/od-win32/hardfile_win32.cpp index ad6a3f3c..a70af9fe 100644 --- a/od-win32/hardfile_win32.cpp +++ b/od-win32/hardfile_win32.cpp @@ -2016,6 +2016,8 @@ static int hdf_write_2 (struct hardfiledata *hfd, void *buffer, uae_u64 offset, return 0; if (hfd->dangerous) return 0; + if (len == 0) + return 0; hfd->cache_valid = 0; hdf_seek (hfd, offset); poscheck (hfd, len); @@ -2039,10 +2041,11 @@ static int hdf_write_2 (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int tmplen = 512; tmp = (uae_u8*)VirtualAlloc (NULL, tmplen, MEM_COMMIT, PAGE_READWRITE); if (tmp) { + int cmplen = tmplen > len ? len : tmplen; memset (tmp, 0xa1, tmplen); hdf_seek (hfd, offset); ReadFile (hfd->handle->h, tmp, tmplen, &outlen2, NULL); - if (memcmp (hfd->cache, tmp, tmplen) != 0 || outlen != len) + if (memcmp (hfd->cache, tmp, cmplen) != 0 || outlen != len) gui_message (_T("\"%s\"\n\nblock zero write failed! Make sure WinUAE has Windows Administrator privileges."), name); VirtualFree (tmp, 0, MEM_RELEASE); } diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index c18b4725..34ca2120 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -1277,6 +1277,8 @@ #define IDC_GENLOCKFILESELECT 1854 #define IDC_PATH_GEOMETRY 1855 #define IDC_PATH_GEOMETRY_SELECTOR 1856 +#define IDC_EDIT1 1857 +#define IDC_EXPANSIONBOARDSTRINGBOX 1857 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 @@ -1328,7 +1330,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 407 #define _APS_NEXT_COMMAND_VALUE 40050 -#define _APS_NEXT_CONTROL_VALUE 1857 +#define _APS_NEXT_CONTROL_VALUE 1858 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 4d8b2c2b..da22635d 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -1311,11 +1311,14 @@ BEGIN PUSHBUTTON "...",IDC_SCSIROMCHOOSER,376,42,10,15 CONTROL "Autoboot disabled",IDC_SCSIROMFILEAUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,62,99,12 CONTROL "",IDC_EXPANSIONBOARDCHECKBOX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,76,99,12 + EDITTEXT IDC_EXPANSIONBOARDSTRINGBOX,202,76,172,14,ES_AUTOHSCROLL + COMBOBOX IDC_EXPANSIONBOARDSELECTOR,202,76,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_SCSIROMFILE,202,42,171,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP GROUPBOX "Accelerator Board Settings",IDC_STATIC,1,97,394,91 COMBOBOX IDC_CPUBOARD_TYPE,13,118,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_CPUBOARD_SUBTYPE,13,137,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_ACCELERATORBOARDITEMSELECTOR,12,169,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_ACCELERATORBOARDSELECTOR,202,169,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP RTEXT "Accelerator board memory:",IDC_STATIC,155,145,104,15,SS_CENTERIMAGE LTEXT "Accelerator board ROM file:",IDC_STATIC,203,105,170,15,SS_CENTERIMAGE COMBOBOX IDC_CPUBOARDROMFILE,202,120,169,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP @@ -1325,14 +1328,12 @@ BEGIN CONTROL "",IDC_ACCELERATORBOARDCHECKBOX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,170,99,12 GROUPBOX "Miscellaneous Expansions",IDC_STATIC,1,192,394,51 CONTROL "bsdsocket.library [] bsdsocket network library emulation.",IDC_SOCKETS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,207,187,11 - CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,223,147,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,207,179,11 + CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,223,180,11 CONTROL "uaenet.device [] Sana 2 compatible network device emulation.",IDC_SANA2, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,207,187,11 - CONTROL "CD32 Full Motion Video cartridge",IDC_CS_CD32FMV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,223,151,11 + CONTROL "CD32 Full Motion Video cartridge",IDC_CS_CD32FMV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,223,193,11 CONTROL "Enabled",IDC_SCSIROMSELECTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,43,99,12 - COMBOBOX IDC_EXPANSIONBOARDSELECTOR,202,76,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_ACCELERATORBOARDSELECTOR,202,169,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP END @@ -1998,7 +1999,7 @@ BEGIN IDS_QS_MODEL_A600 "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n" IDS_QS_MODEL_A1000 "512 KB Chip RAM\nThe A1000 was the first model produced, with a configuration equivalent to that of an A500 with OCS chipset. You normally don't need to use this configuration, unless you are nostalgic and would like to hear the short A1000 boot tune\n""ICS"" Denise without EHB support\nVery first A1000 models had Denise without EHB capability.\n256 KB Chip RAM\n Unexpanded A1000. All later A1000 models were sold with a 256 KB RAM expansion built-in.\nA1000 ""Velvet"" Prototype\n" IDS_QS_MODEL_A1200 "Basic non-expanded configuration\nUse this configuration to run most AGA demos and games\n4 MB Fast RAM expanded configuration\nSome newer AGA games and demos need an expanded A1200 to run.\nBlizzard 1230 IV\n\nBlizzard 1240\n\nBlizzard 1260\n\nBlizzard PPC\n" - IDS_QS_MODEL_CD32 "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation.\nCD32 with Full Motion Video cartridge\n" + IDS_QS_MODEL_CD32 "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation.\nCD32 with Full Motion Video cartridge\n\nCubo CD32\n" IDS_QS_MODEL_CDTV "CDTV\nThe CDTV was the first model with a built-in CD-ROM drive. Looking like a black CD player, it featured a configuration equivalent to that of an A500 with 1 MB RAM and an ECS chipset.\nFloppy drive and 64KB SRAM card expanded CDTV\n\nCDTV-CR\n" END diff --git a/od-win32/sounddep/sound.cpp b/od-win32/sounddep/sound.cpp index 9ab9bcc0..d4a49cbd 100644 --- a/od-win32/sounddep/sound.cpp +++ b/od-win32/sounddep/sound.cpp @@ -2691,6 +2691,7 @@ static BOOL CALLBACK DSEnumProc (LPGUID lpGUID, LPCTSTR lpszDesc, LPCTSTR lpszDr sd[i]->name = my_strdup (lpszDesc); sd[i]->type = SOUND_DEVICE_DS; sd[i]->cfgname = my_strdup (sd[i]->name); + sd[i]->prefix = my_strdup(_T("DS")); return TRUE; } @@ -2770,13 +2771,15 @@ static void wasapi_enum (struct sound_device **sdp) TCHAR buf[1000]; _stprintf (buf, _T("WASAPIX:%s"), sdp[i]->cfgname); sdp[cnt] = xcalloc (struct sound_device, 1); - sdp[cnt]->cfgname = my_strdup (buf); + sdp[cnt]->cfgname = my_strdup(buf); + sdp[cnt]->prefix = my_strdup(_T("WASAPIX")); sdp[cnt]->name = my_strdup (sdp[i]->name); sdp[cnt]->alname = sdp[i]->alname ? my_strdup (sdp[i]->alname) : NULL; _stprintf (buf, _T("WASAPI:%s"), sdp[i]->cfgname); sdp[cnt]->type = SOUND_DEVICE_WASAPI_EXCLUSIVE; xfree (sdp[i]->cfgname); sdp[i]->cfgname = my_strdup (buf); + sdp[i]->prefix = my_strdup(_T("WASAPI")); cnt++; } @@ -2836,6 +2839,7 @@ static void OpenALEnumerate (struct sound_device **sds, const char *pDeviceNames } _stprintf (tmp, _T("OPENAL:%s"), sds[i]->alname); sds[i]->cfgname = my_strdup (tmp); + sds[i]->prefix = my_strdup(_T("OPENAL")); } if (ppDefaultDevice) ppDefaultDevice = NULL; @@ -2921,6 +2925,7 @@ static void PortAudioEnumerate (struct sound_device **sds) xfree (s1); sds[i]->type = SOUND_DEVICE_PA; sds[i]->name = my_strdup (tmp); + sds[i]->prefix = my_strdup(_T("PORTAUDIO")); _stprintf (tmp2, _T("PORTAUDIO:%s"), tmp); sds[i]->cfgname = my_strdup (tmp2); sds[i]->panum = j; diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 3d8e3dad..45ae3587 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -4077,6 +4077,22 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR * } } } + if (p->win32_soundcard < 0) { + for (i = 0; i < MAX_SOUND_DEVICES && sound_devices[i]; i++) { + if (!sound_devices[i]->prefix) + continue; + int prefixlen = _tcslen(sound_devices[i]->prefix); + int tmplen = _tcslen(tmpbuf); + if (prefixlen > 0 && tmplen >= prefixlen && + !_tcsncmp(sound_devices[i]->prefix, tmpbuf, prefixlen) && + ((tmplen > prefixlen && tmpbuf[prefixlen] == ':') + || tmplen == prefixlen)) { + p->win32_soundcard = i; + break; + } + } + + } if (p->win32_soundcard < 0) p->win32_soundcard = num; return 1; diff --git a/od-win32/win32.h b/od-win32/win32.h index 1d09bbb6..c9458f63 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("3") +#define WINUAEBETA _T("4") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2017, 8, 27) +#define WINUAEDATE MAKEBD(2017, 9, 10) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") @@ -197,6 +197,7 @@ struct sound_device TCHAR *name; TCHAR *alname; TCHAR *cfgname; + TCHAR *prefix; int panum; int type; }; diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index cfdd58be..173491d7 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -837,15 +837,7 @@ bool S2X_init (int dw, int dh, int dd) temp_height = dst_height * m; } else { temp_width = dst_width * 2; - if (temp_width > dxcaps.maxwidth) - temp_width = dxcaps.maxwidth; temp_height = dst_height * 2; - if (temp_height > dxcaps.maxheight) - temp_height = dxcaps.maxheight; - if (temp_width < dst_width) - temp_width = dst_width; - if (temp_height < dst_height) - temp_height = dst_height; } if (usedfilter->type == UAE_FILTER_HQ2X || usedfilter->type == UAE_FILTER_HQ3X || usedfilter->type == UAE_FILTER_HQ4X) { @@ -853,11 +845,37 @@ bool S2X_init (int dw, int dh, int dd) int h = amiga_height > dst_height ? amiga_height : dst_height; tempsurf2 = xmalloc (uae_u8, w * h * (amiga_depth / 8) * ((scale + 1) / 2)); tempsurf3 = xmalloc (uae_u8, w * h *(dst_depth / 8) * 4 * scale); - if (!d3d) - tempsurf = allocsystemsurface (temp_width, temp_height); - } else { - if (!d3d) - tempsurf = allocsurface (temp_width, temp_height); + } + if (!d3d) { + for (;;) { + if (temp_width > dxcaps.maxwidth) + temp_width = dxcaps.maxwidth; + if (temp_height > dxcaps.maxheight) + temp_height = dxcaps.maxheight; + if (temp_width < dst_width) + temp_width = dst_width; + if (temp_height < dst_height) + temp_height = dst_height; + tempsurf = allocsurface(temp_width, temp_height); + if (tempsurf) + break; + if (temp_width >= 2 * dst_width || temp_height >= 2 * dst_height) { + temp_width = dst_width * 3 / 2; + temp_height = dst_height * 3 / 2; + continue; + } + if (temp_width == dst_width * 3 / 2 || temp_height == dst_height * 2) { + temp_width = dst_width * 4 / 3; + temp_height = dst_height * 4 / 3; + continue; + } + if (temp_width > dst_width || temp_height > dst_height) { + temp_width = dst_width; + temp_height = dst_height; + continue; + } + break; + } } if (!tempsurf && !d3d) { write_log (_T("DDRAW: failed to create temp surface (%dx%d)\n"), temp_width, temp_height); @@ -1067,7 +1085,7 @@ end: sr.left = 0; if (sr.top < 0) sr.top = 0; - if (sr.right < temp_width && sr.bottom < temp_height) { + if (sr.right <= temp_width && sr.bottom <= temp_height) { if (sr.left < sr.right && sr.top < sr.bottom) DirectDraw_BlitRect (NULL, &dr, tempsurf, &sr); } diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index ceac0256..a0460670 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -4,6 +4,19 @@ 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 4: + +- If DirectDraw mode surface allocation fails, retry it with smaller size. +- Smaller than 512 block size and writing to HDF block zero was always detected as failed. +- SCSI MODE SENSE format parameters/rigid drive geometry and uaehf.device TD_GETGEOMETRY didn't return manual physical geometry if it was set. +- If config file has sound driver name that can't be found, try to find default device of same type before defaulting to first in list. +- 68030 MMU + prefetch mode delayed bus error fix. +- Added Cubo CD32 config dip switches (Cubo Switch #1 to #8), event activation = switch state toggled. State is only logged, perhaps some kind of on-screen message will be added later. +- Added Cubo CD32 option in Quickstart panel. Currently only enables serial port fake touch screen used by some later games, responds "ok" to all touch screen commands. +- Expansion panel string datatype was unimplemented (forgotten..). NIC MAC option is now visible. +- Disassembler [xxxx] data values (b3) now support 68030+ data caches. If data is located in cache and data in memory is identical, it is prefixed with *, if data is cached and data in memory is different: [value in cache:value in memory] +- Ignore DMS unpacking errors if all data is already unpacked (for example if dms has extra data at the end etc) + Beta 3: - 68030 data cache + indirect UAE Boot ROM will now always work, even without MMU. UAE Boot ROM address space now forces all caching off, even if write-allocate is enabled.