From: Toni Wilen Date: Mon, 27 Jul 2015 16:26:39 +0000 (+0300) Subject: 3200b5 X-Git-Tag: 3200~122 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=544b1f88b5304ea3185c1d2aef1e2f48bd8881a5;p=francis%2Fwinuae.git 3200b5 --- diff --git a/cfgfile.cpp b/cfgfile.cpp index 6d584f87..6d7a8d67 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -1058,8 +1058,8 @@ static int cfgfile_read_rom_settings(const struct expansionboardsettings *ebs, c } int cnt = 1; int bits = 1; - for (int i = 7; i >= 0; i--) { - if (itemcnt & (1 << i)) { + for (int i = 0; i < 8; i++) { + if ((1 << i) >= itemcnt) { cnt = 1 << i; bits = i; break; @@ -1099,8 +1099,8 @@ static void cfgfile_write_rom_settings(const struct expansionboardsettings *ebs, } int cnt = 1; int bits = 1; - for (int i = 7; i >= 0; i--) { - if (itemcnt & (1 << i)) { + for (int i = 0; i < 8; i++) { + if ((1 << i) >= itemcnt) { cnt = 1 << i; bits = i; break; diff --git a/include/autoconf.h b/include/autoconf.h index fd6966a8..b647d809 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -128,7 +128,7 @@ struct expansionsubromtype { const TCHAR *name; const TCHAR *configname; - int romtype; + uae_u32 romtype; int memory_mid, memory_pid; uae_u32 memory_serial; bool memory_after; @@ -141,9 +141,9 @@ struct expansionromtype const TCHAR *friendlymanufacturer; DEVICE_INIT init, init2; DEVICE_ADD add; - int romtype; - int romtype_extra; - int parentromtype; + uae_u32 romtype; + uae_u32 romtype_extra; + uae_u32 parentromtype; int zorro; bool singleonly; const struct expansionsubromtype *subtypes; diff --git a/include/filesys.h b/include/filesys.h index 5bad7bae..9efdf0c8 100644 --- a/include/filesys.h +++ b/include/filesys.h @@ -90,7 +90,7 @@ struct hd_hardfiledata { }; #define HD_CONTROLLER_EXPANSION_MAX 50 -#define HD_CONTROLLER_NEXT_UNIT 100 +#define HD_CONTROLLER_NEXT_UNIT 200 #define HD_CONTROLLER_TYPE_UAE 0 #define HD_CONTROLLER_TYPE_IDE_AUTO (HD_CONTROLLER_TYPE_UAE + 1) diff --git a/include/rommgr.h b/include/rommgr.h index 069c6f1d..0cfb364d 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -86,8 +86,11 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size); #define ROMTYPE_PROMIGOS 0x00100028 #define ROMTYPE_SYSTEM2000 0x00100029 #define ROMTYPE_A1060 0x0010002a -#define ROMTYPE_A2088XT 0x0010002b +#define ROMTYPE_A2088 0x0010002b #define ROMTYPE_A2088T 0x0010002c +#define ROMTYPE_A2286 0x0010002d +#define ROMTYPE_A2386 0x0010002e +#define ROMTYPE_OMTIADAPTER 0x0010002f #define ROMTYPE_NOT 0x00800000 #define ROMTYPE_QUAD 0x01000000 diff --git a/od-win32/win32.h b/od-win32/win32.h index 661d573e..102c9f0a 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("4") +#define WINUAEBETA _T("5") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2015, 7, 22) +#define WINUAEDATE MAKEBD(2015, 7, 27) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 0a5e5740..834a7014 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -437,6 +437,8 @@ static BOOL GetFileDialog (OPENFILENAME *opn, const GUID *guid, int mode) } pfd->GetOptions (&pfos); pfos |= FOS_FORCEFILESYSTEM; + if (!(opn->Flags & OFN_FILEMUSTEXIST)) + pfos &= ~FOS_FILEMUSTEXIST; if (opn->Flags & OFN_ALLOWMULTISELECT) pfos |= FOS_ALLOWMULTISELECT; if (mode < 0) @@ -2605,6 +2607,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs defext = _T("uss"); break; case 11: + case 19: WIN32GUI_LoadUIString (IDS_SELECTFLASH, szTitle, MAX_DPATH); WIN32GUI_LoadUIString (IDS_FLASH, szFormat, MAX_DPATH); _stprintf (szFilter, _T("%s "), szFormat); @@ -2675,6 +2678,9 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs if (!(result = GetSaveFileName_2 (hDlg, &openFileName, guid))) write_log (_T("GetSaveFileNameX() failed, err=%d.\n"), GetLastError ()); } else { + if (flag == 11 || flag == 19) { + openFileName.Flags &= ~OFN_FILEMUSTEXIST; + } if (!(result = GetOpenFileName_2 (hDlg, &openFileName, guid))) write_log (_T("GetOpenFileNameX() failed, err=%d.\n"), GetLastError ()); } @@ -8135,8 +8141,8 @@ static void create_expansionrom_gui(HWND hDlg, struct expansionrom_gui *eg, cons p += _tcslen(p) + 1; } int bits = 1; - for (int i = 7; i >= 0; i--) { - if (itemcnt & (1 << i)) { + for (int i = 0; i < 8; i++) { + if ((1 << i) >= itemcnt) { bits = i; break; } @@ -8169,8 +8175,8 @@ static void create_expansionrom_gui(HWND hDlg, struct expansionrom_gui *eg, cons p += _tcslen(p) + 1; } int bits = 1; - for (int i = 7; i >= 0; i--) { - if (itemcnt & (1 << i)) { + for (int i = 0; i < 8; i++) { + if ((1 << i) >= itemcnt) { bits = i; break; } @@ -9491,7 +9497,7 @@ static void kickstartfilebuttons (HWND hDlg, WPARAM wParam, TCHAR *path) values_to_kickstartdlg (hDlg); break; case IDC_RTCCHOOSER: - DiskSelection(hDlg, IDC_RTCFILE, 6, &workprefs, path); + DiskSelection(hDlg, IDC_RTCFILE, 19, &workprefs, path); values_to_kickstartdlg (hDlg); break; case IDC_CARTCHOOSER: @@ -12874,6 +12880,14 @@ static void addfloppytype (HWND hDlg, int n) ew (hDlg, f_enable, TRUE); } CheckDlgButton (hDlg, f_enable, state ? BST_CHECKED : BST_UNCHECKED); + TCHAR tmp[10]; + if (n < 2 || nn - 1 < DRV_PC_ONLY_40) { + _stprintf(tmp, _T("DF%d:"), n); + } else { + int t = nn - 1 == DRV_PC_ONLY_40 ? 40 : 80; + _stprintf(tmp, _T("%c: (%d)"), n == 2 ? 'A' : 'B', t); + } + SetWindowText(GetDlgItem(hDlg, f_enable), tmp); } chk = !showcd && disk_getwriteprotect (&workprefs, text) && state == TRUE ? BST_CHECKED : 0; if (f_wp >= 0) @@ -13100,8 +13114,10 @@ static INT_PTR CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage (hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)ft35hd); SendDlgItemMessage (hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)ft525sd); SendDlgItemMessage (hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)ft35ddescom); - if (i >= 2) - SendDlgItemMessage(hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)_T("PC Bridge")); + if (i >= 2) { + SendDlgItemMessage(hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)_T("PC Bridge (40)")); + SendDlgItemMessage(hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)_T("PC Bridge (80)")); + } } setmultiautocomplete (hDlg, df0texts); } @@ -17846,16 +17862,29 @@ static int do_filesys_insert (const TCHAR *root) return 0; } +static bool draghit(DWORD id, POINT pt) +{ + RECT r; + if (GetPanelRect(GetDlgItem(panelDlg, id), &r)) { + int extra = r.bottom - r.top; + r.top -= extra; + r.bottom += extra; + return PtInRect(&r, pt) != 0; + } + return false; +} + int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage) { int cnt, i, drv, harddrive, drvdrag, firstdrv; TCHAR file[MAX_DPATH]; TCHAR *filepart = NULL; - int dfxtext[] = { IDC_DF0TEXT, IDC_DF0TEXTQ, IDC_DF1TEXT, IDC_DF1TEXTQ, IDC_DF2TEXT, -1, IDC_DF3TEXT, -1 }; + const int dfxtext[] = { IDC_DF0TEXT, IDC_DF0TEXTQ, IDC_DF1TEXT, IDC_DF1TEXTQ, IDC_DF2TEXT, -1, IDC_DF3TEXT, -1 }; POINT pt; RECT r, r2; int ret = 0; DWORD flags; + TCHAR *dragrompath = NULL; DragQueryPoint (hd, &pt); pt.y += GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER); @@ -17885,14 +17914,28 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage) for (i = 0; i < 4; i++) { int id = dfxtext[i * 2 + (currentpage == QUICKSTART_ID ? 1 : 0)]; if (workprefs.floppyslots[i].dfxtype >= 0 && id >= 0) { - if (GetPanelRect (GetDlgItem (panelDlg, id), &r)) { - if (PtInRect (&r, pt)) { - drv = i; - break; - } + if (draghit(id, pt)) { + drv = i; + break; } } } + } else if (currentpage == KICKSTART_ID) { + if (draghit(IDC_ROMFILE, pt)) { + dragrompath = prefs->romfile; + } else if (draghit(IDC_ROMFILE2, pt)) { + dragrompath = prefs->romextfile; + } else if (draghit(IDC_CARTFILE, pt)) { + dragrompath = prefs->cartfile; + } else if (draghit(IDC_FLASHFILE, pt)) { + dragrompath = prefs->flashfile; + } else if (draghit(IDC_RTCFILE, pt)) { + dragrompath = prefs->rtcfile; + } + } else if (currentpage == HARDDISK_ID) { + if (draghit(IDC_CD_TEXT, pt)) { + dragrompath = prefs->cdslots[0].name; + } } firstdrv = drv; for (i = 0; i < cnt; i++) { @@ -17962,6 +18005,10 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage) } } } + if (dragrompath && !(flags & FILE_ATTRIBUTE_DIRECTORY)) { + _tcscpy(dragrompath, file); + type = -2; + } switch (type) { @@ -18033,7 +18080,9 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage) ret = 1; break; case ZFILE_CDIMAGE: - _tcscpy (workprefs.cdslots[0].name, file); + _tcscpy (prefs->cdslots[0].name, file); + break; + case -2: break; default: if (currentpage < 0 && !full_property_sheet) { diff --git a/od-win32/winuae_msvc14/winuae_msvc.vcxproj b/od-win32/winuae_msvc14/winuae_msvc.vcxproj index 8fa1d49b..f328c37b 100644 --- a/od-win32/winuae_msvc14/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc14/winuae_msvc.vcxproj @@ -809,6 +809,18 @@ + + + + + + + + + + + + diff --git a/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters index 59b2a65c..e93869e6 100644 --- a/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters @@ -59,6 +59,9 @@ {961c1680-65e6-445a-bf6e-82775255ef2d} + + {c9a4aeea-c63c-40e4-9da2-371acd5ea8fe} + @@ -757,11 +760,47 @@ mame - - common + + x86 + + + x86 + + + x86 + + + x86 + + + x86 + + + x86 + + + x86 + + + x86 + + + x86 + + + x86 - common + x86 + + + x86 + + + x86 + + + x86 diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 8ed8b275..985336e9 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,28 @@ +Beta 5: + +- Added OMTI-Adapter HD controller, same as ALF1 but different hardware base address. +- It was not possible to select HDF PCMCIA SRAM and IDE options. +- Flash ROM file and RTC battery backed up RAM file dialog didn't allow creation of new files. +- Made disk image dragndrop floppy drive hit box larger. +- ROM panel drag drop over ROM paths will work as expected. Previously it was always autodetected + and "best" ROM path was selected. Now autodetection will be only used when dropped over empty space. +- Harddrives panel CD path dragndrop update. +- ProWizard written module files now include name of inserted disk in DF0: or CD image, like screenshot file names. + +x86 bridgeboard updates: +- A2286 and A2386SX emulation implemented. CPU and FPU core, keyboard, interrupt controller and + more from DOSBox. A2386SX BIOS is still misdetecting things. +- Floppy drive label is changed between DF2:<>A: and DF3:<>B: if configured as PC bridge drive. + (Note that if you don't configure any PC drives, you will get really slow BIOS floppy detection) +- Added 40 track (5.25" 360k) and 80 track (all others) drive selection. This must match inserted image + or BIOS drive detection will get confused. +- Always do full disk image size autodetection when disk is inserted in PC bridge drive. Without + it most dos disks was detected as undersized adf images. +- A2286/A2386 CMOS RAM is stored to disk if ROM panel Flash RAM file path is set. +- DOSBox CPU core type selectable in bridgeboard config GUI, also 8088-based bridgeboards + can be optinally configured to use DOSBox CPU core. + Beta 4: - RTG<>chipset mode switching didn't check if modes have different filter type (forgot to add