From 7678559a691441bfb92c57119ea6e78492d09dd6 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 8 Oct 2016 17:27:18 +0300 Subject: [PATCH] 3400b11 --- od-win32/resources/resource.h | 4 +- od-win32/resources/winuae.rc | 21 +- od-win32/win32.cpp | 17 +- od-win32/win32.h | 4 +- od-win32/win32gfx.cpp | 5 + od-win32/win32gui.cpp | 222 +++++++++++++++--- od-win32/winuae_msvc14/winuae_msvc.vcxproj | 4 +- .../winuae_msvc14/winuae_msvc.vcxproj.filters | 4 +- od-win32/winuae_msvc15/winuae_msvc.vcxproj | 2 + .../winuae_msvc15/winuae_msvc.vcxproj.filters | 6 + od-win32/winuaechangelog.txt | 15 ++ sndboard.cpp | 9 - 12 files changed, 238 insertions(+), 75 deletions(-) diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index c2656833..616399cd 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -1265,6 +1265,8 @@ #define IDC_RAM_ADDRESS 1852 #define IDC_BOARDS_UP 1853 #define IDC_RAM_ADDRESS2 1853 +#define IDC_GENLOCKFILE 1853 +#define IDC_GENLOCKFILESELECT 1854 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 @@ -1316,7 +1318,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 400 #define _APS_NEXT_COMMAND_VALUE 40050 -#define _APS_NEXT_CONTROL_VALUE 1853 +#define _APS_NEXT_CONTROL_VALUE 1855 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 50c24a6e..b642a716 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -702,7 +702,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,201,57,48,15 END -IDD_CHIPSET DIALOGEX 0, 0, 396, 192 +IDD_CHIPSET DIALOGEX 0, 0, 396, 258 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN @@ -725,13 +725,13 @@ BEGIN COMBOBOX IDC_CS_EXT,148,109,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Options",IDC_STATIC,221,0,173,137 CONTROL "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,16,150,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,32,150,10 CONTROL "Wait for Blitter [] Compatibility hack for programs that don't wait for the blitter correctly, causing graphics corruption if CPU is too fast.",IDC_BLITWAIT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,29,150,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,45,150,10 CONTROL "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,234,42,150,10 - LTEXT "Video port display hardware:",IDC_STATIC,237,97,117,15,SS_CENTERIMAGE - COMBOBOX IDC_MONITOREMU,237,115,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,209,150,10 + LTEXT "Video port display hardware:",IDC_STATIC,237,62,117,15,SS_CENTERIMAGE + COMBOBOX IDC_MONITOREMU,237,80,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Collision Level",IDC_STATIC,1,141,393,48 CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0, "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,47,157,101,10 @@ -741,11 +741,13 @@ BEGIN "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,182,157,181,10 CONTROL "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3, "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,182,172,181,10 - LTEXT "Genlock emulation mode",IDC_STATIC,237,59,117,15,SS_CENTERIMAGE - COMBOBOX IDC_GENLOCKMODE,237,77,103,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_GENLOCKMIX,346,77,38,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_GENLOCKMODE,197,209,124,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_GENLOCKMIX,330,209,54,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Cycle-exact (Full) [] The most compatible A500/A1200 emulation mode.",IDC_CYCLEEXACT, "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,12,68,194,10 + GROUPBOX "Genlock",IDC_STATIC,0,195,393,57 + COMBOBOX IDC_GENLOCKFILE,12,231,356,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "...",IDC_GENLOCKFILESELECT,375,230,10,15 END IDD_CHIPSET2 DIALOGEX 0, 0, 396, 305 @@ -1548,6 +1550,7 @@ BEGIN IDD_CHIPSET, DIALOG BEGIN + BOTTOMMARGIN, 192 END IDD_CHIPSET2, DIALOG diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 899f561a..b65c7c6f 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -93,6 +93,7 @@ #include "inputrecord.h" #include "gfxboard.h" #include "statusline.h" +#include "devices.h" #ifdef RETROPLATFORM #include "rp.h" #include "cloanto/RetroPlatformIPC.h" @@ -439,19 +440,13 @@ bool resumepaused (int priority) return false; if (!pause_emulation) return false; + devices_unpause(); resumesoundpaused (); - blkdev_exitgui (); if (pausemouseactive) { pausemouseactive = 0; setmouseactive (-1); } pause_emulation = 0; -#ifdef RETROPLATFORM - rp_pause (pause_emulation); -#endif -#ifdef WITH_PPC - uae_ppc_pause(0); -#endif setsystime (); return true; } @@ -462,19 +457,13 @@ bool setpaused (int priority) return false; wait_keyrelease(); pause_emulation = priority; -#ifdef WITH_PPC - uae_ppc_pause(1); -#endif + devices_pause(); setsoundpaused (); - blkdev_entergui (); pausemouseactive = 1; if (isfullscreen () <= 0) { pausemouseactive = mouseactive; setmouseactive (0); } -#ifdef RETROPLATFORM - rp_pause (pause_emulation); -#endif return true; } diff --git a/od-win32/win32.h b/od-win32/win32.h index 42926de8..c2cd3291 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("10") +#define WINUAEBETA _T("11") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2016, 10, 4) +#define WINUAEDATE MAKEBD(2016, 10, 8) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index c04cf858..6354b451 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -2045,6 +2045,8 @@ int check_prefs_changed_gfx (void) c |= currprefs.genlock_image != changed_prefs.genlock_image ? (2 | 8) : 0; c |= currprefs.genlock != changed_prefs.genlock ? (2 | 8) : 0; c |= currprefs.genlock_mix != changed_prefs.genlock_mix ? (1 | 256) : 0; + c |= _tcsicmp(currprefs.genlock_image_file, changed_prefs.genlock_image_file) ? (2 | 8) : 0; + c |= _tcsicmp(currprefs.genlock_video_file, changed_prefs.genlock_video_file) ? (2 | 8) : 0; c |= currprefs.gfx_lores_mode != changed_prefs.gfx_lores_mode ? (2 | 8) : 0; c |= currprefs.gfx_scandoubler != changed_prefs.gfx_scandoubler ? (2 | 8) : 0; @@ -2135,9 +2137,12 @@ int check_prefs_changed_gfx (void) currprefs.gfx_iscanlines = changed_prefs.gfx_iscanlines; currprefs.gfx_pscanlines = changed_prefs.gfx_pscanlines; currprefs.monitoremu = changed_prefs.monitoremu; + currprefs.genlock_image = changed_prefs.genlock_image; currprefs.genlock = changed_prefs.genlock; currprefs.genlock_mix = changed_prefs.genlock_mix; + _tcscpy(currprefs.genlock_image_file, changed_prefs.genlock_image_file); + _tcscpy(currprefs.genlock_video_file, changed_prefs.genlock_video_file); currprefs.gfx_lores_mode = changed_prefs.gfx_lores_mode; currprefs.gfx_scandoubler = changed_prefs.gfx_scandoubler; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 8825c53a..05192998 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -286,6 +286,21 @@ static void hide (HWND hDlg, DWORD id, int hide) ShowWindow (w, hide ? SW_HIDE : SW_SHOW); } +static void parsefilepath(TCHAR *path, int maxlen) +{ + TCHAR *tmp = xmalloc(TCHAR, maxlen + 1); + _tcscpy(tmp, path); + TCHAR *p1 = _tcsstr(tmp, _T(" { ")); + TCHAR *p2 = _tcsstr(tmp, _T(" }")); + if (p1 && p2 && p2 > p1) { + *p1 = 0; + memset(path, 0, maxlen * sizeof(TCHAR)); + memcpy(path, p1 + 3, (p2 - p1 - 3) * sizeof(TCHAR)); + _tcscat(path, tmp); + } + xfree(tmp); +} + static int scsiromselect_table[256]; static bool getcomboboxtext(HWND hDlg, int id, TCHAR *out, int maxlen) @@ -630,7 +645,9 @@ static const TCHAR *historytypes[] = _T("DirFileSysMRUList"), _T("HardfileMRUList"), _T("FileSysMRUList"), - _T("TapeImageMRUList") + _T("TapeImageMRUList"), + _T("GenlockImageMRUList"), + _T("GenlockVideoMRUList") }; static int regread; @@ -664,12 +681,14 @@ static void write_disk_history2 (int type) } void write_disk_history (void) { - write_disk_history2 (HISTORY_FLOPPY); - write_disk_history2 (HISTORY_CD); - write_disk_history2 (HISTORY_DIR); - write_disk_history2 (HISTORY_HDF); - write_disk_history2 (HISTORY_FS); - write_disk_history2 (HISTORY_TAPE); + write_disk_history2(HISTORY_FLOPPY); + write_disk_history2(HISTORY_CD); + write_disk_history2(HISTORY_DIR); + write_disk_history2(HISTORY_HDF); + write_disk_history2(HISTORY_FS); + write_disk_history2(HISTORY_TAPE); + write_disk_history2(HISTORY_GENLOCK_IMAGE); + write_disk_history2(HISTORY_GENLOCK_VIDEO); } void reset_disk_history (void) @@ -677,12 +696,14 @@ void reset_disk_history (void) int i, rrold; for (i = 0; i < MAX_PREVIOUS_IMAGES; i++) { - DISK_history_add (NULL, i, HISTORY_FLOPPY, 0); - DISK_history_add (NULL, i, HISTORY_CD, 0); - DISK_history_add (NULL, i, HISTORY_DIR, 0); - DISK_history_add (NULL, i, HISTORY_HDF, 0); - DISK_history_add (NULL, i, HISTORY_FS, 0); - DISK_history_add (NULL, i, HISTORY_TAPE, 0); + DISK_history_add(NULL, i, HISTORY_FLOPPY, 0); + DISK_history_add(NULL, i, HISTORY_CD, 0); + DISK_history_add(NULL, i, HISTORY_DIR, 0); + DISK_history_add(NULL, i, HISTORY_HDF, 0); + DISK_history_add(NULL, i, HISTORY_FS, 0); + DISK_history_add(NULL, i, HISTORY_TAPE, 0); + DISK_history_add(NULL, i, HISTORY_GENLOCK_IMAGE, 0); + DISK_history_add(NULL, i, HISTORY_GENLOCK_VIDEO, 0); } rrold = regread; regread = (1 << HISTORY_MAX) - 1; @@ -2251,7 +2272,9 @@ static const GUID diskselectionguids[] = { { 0xe3741dff, 0x11f2, 0x445f, { 0x94, 0xb0, 0xa3, 0xe7, 0x58, 0xe2, 0xcb, 0xb5 } }, { 0x2056d641, 0xba13, 0x4312, { 0xaa, 0x75, 0xc5, 0xeb, 0x52, 0xa8, 0x1c, 0xe3 } }, { 0x05aa5db2, 0x470b, 0x4725, { 0x96, 0x03, 0xee, 0x61, 0x30, 0xfc, 0x54, 0x99 } }, - { 0x68366188, 0xa6d4, 0x4278, { 0xb7, 0x55, 0x6a, 0xb8, 0x17, 0xa6, 0x71, 0xd9 } } + { 0x68366188, 0xa6d4, 0x4278, { 0xb7, 0x55, 0x6a, 0xb8, 0x17, 0xa6, 0x71, 0xd9 } }, + { 0xe990bee1, 0xd7cc, 0x4768, { 0xaf, 0x34, 0xef, 0x39, 0x87, 0x48, 0x09, 0x50 } }, + { 0x12c53317, 0xd99c, 0x4494, { 0x8d, 0x81, 0x00, 0x6d, 0x8c, 0x62, 0x7d, 0x83 } } }; static void getfilter (int num, const TCHAR *name, int *filter, TCHAR *fname) @@ -2434,6 +2457,46 @@ static void selectdisk (struct uae_prefs *prefs, HWND hDlg, int num, int id, con DISK_history_add (prefs->floppyslots[num].df, -1, HISTORY_FLOPPY, 0); } +static void selectgenlock(struct uae_prefs *prefs, HWND hDlg, int id, const TCHAR *full_path) +{ + SetDlgItemText(hDlg, id, full_path); + if (workprefs.genlock_image == 3) { + _tcscpy(prefs->genlock_image_file, full_path); + fullpath(prefs->genlock_image_file, sizeof prefs->genlock_image_file / sizeof(TCHAR)); + DISK_history_add(prefs->genlock_image_file, -1, HISTORY_GENLOCK_IMAGE, 0); + } else if (workprefs.genlock_image == 4) { + _tcscpy(prefs->genlock_video_file, full_path); + fullpath(prefs->genlock_video_file, sizeof prefs->genlock_video_file / sizeof(TCHAR)); + DISK_history_add(prefs->genlock_video_file, -1, HISTORY_GENLOCK_VIDEO, 0); + } +} + +static void getcreatefloppytype(HWND hDlg, drive_type *atype, int *hd) +{ + *atype = DRV_NONE; + *hd = -1; + int type = SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L); + switch (type) + { + case 0: + *atype = DRV_35_DD; + break; + case 1: + *atype = DRV_35_HD; + break; + case 2: + *atype = DRV_PC_ONLY_80; + break; + case 3: + *atype = DRV_PC_ONLY_80; + *hd = 1; + break; + case 4: + *atype = DRV_PC_ONLY_40; + break; + } +} + static void setdpath (const TCHAR *name, const TCHAR *path) { TCHAR tmp[MAX_DPATH]; @@ -2457,6 +2520,8 @@ static void setdpath (const TCHAR *name, const TCHAR *path) // flag = 16 for recording input // flag = 17 for CD image // flag = 18 for Tape image +// flag = 20 for genlock image +// flag = 21 for genlock video int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, TCHAR *path_out, int *multi) { static int previousfilter[20]; @@ -2556,6 +2621,14 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs fetch_path (_T("TapePath"), init_path, sizeof (init_path) / sizeof (TCHAR)); guid = &diskselectionguids[7]; break; + case 20: + fetch_path(_T("GenlockImagePath"), init_path, sizeof(init_path) / sizeof(TCHAR)); + guid = &diskselectionguids[8]; + break; + case 21: + fetch_path(_T("GenlockVideoPath"), init_path, sizeof(init_path) / sizeof(TCHAR)); + guid = &diskselectionguids[9]; + break; } } @@ -2687,6 +2760,12 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs case 18: WIN32GUI_LoadUIString (IDS_SELECTTAPE, szTitle, MAX_DPATH); break; + case 20: + _tcscpy(szTitle, _T("Select genlock image")); + break; + case 21: + _tcscpy(szTitle, _T("Select genlock video")); + break; } if (all) { p = szFilter; @@ -2771,6 +2850,9 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs } SetDlgItemText (hDlg, wParam, full_path); break; + case IDC_GENLOCKFILESELECT: + selectgenlock(prefs, hDlg, IDC_GENLOCKFILE, full_path); + break; case IDC_CD_SELECT: selectcd (prefs, hDlg, 0, IDC_CD_TEXT, full_path); break; @@ -2799,22 +2881,30 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs break; case IDC_CREATE: { + drive_type atype = DRV_NONE; + int hd = -1; TCHAR disk_name[32]; disk_name[0] = 0; disk_name[31] = 0; GetDlgItemText (hDlg, IDC_CREATE_NAME, disk_name, 30); - if (disk_creatediskfile (&workprefs, full_path, 0, (drive_type)SendDlgItemMessage (hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), disk_name, ischecked (hDlg, IDC_FLOPPY_FFS), ischecked (hDlg, IDC_FLOPPY_BOOTABLE), NULL)) { + getcreatefloppytype(hDlg, &atype, &hd); + if (disk_creatediskfile (&workprefs, full_path, 0, atype, hd, disk_name, ischecked (hDlg, IDC_FLOPPY_FFS), ischecked (hDlg, IDC_FLOPPY_BOOTABLE), NULL)) { fullpath (full_path, sizeof full_path / sizeof (TCHAR)); DISK_history_add (full_path, -1, HISTORY_FLOPPY, 0); } } break; case IDC_CREATE_RAW: - TCHAR disk_name[32]; - disk_name[0] = 0; disk_name[31] = 0; - GetDlgItemText (hDlg, IDC_CREATE_NAME, disk_name, 30); - if (disk_creatediskfile (&workprefs, full_path, 1, (drive_type)SendDlgItemMessage (hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), disk_name, ischecked (hDlg, IDC_FLOPPY_FFS), ischecked (hDlg, IDC_FLOPPY_BOOTABLE), NULL)) { - fullpath (full_path, sizeof full_path / sizeof (TCHAR)); - DISK_history_add (full_path, -1, HISTORY_FLOPPY, 0); + { + drive_type atype = DRV_NONE; + int hd = -1; + TCHAR disk_name[32]; + disk_name[0] = 0; disk_name[31] = 0; + GetDlgItemText(hDlg, IDC_CREATE_NAME, disk_name, 30); + getcreatefloppytype(hDlg, &atype, &hd); + if (disk_creatediskfile(&workprefs, full_path, 1, atype, hd, disk_name, ischecked(hDlg, IDC_FLOPPY_FFS), ischecked(hDlg, IDC_FLOPPY_BOOTABLE), NULL)) { + fullpath(full_path, sizeof full_path / sizeof(TCHAR)); + DISK_history_add(full_path, -1, HISTORY_FLOPPY, 0); + } } break; case IDC_LOAD: @@ -2905,6 +2995,18 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs *amiga_path = 0; setdpath (_T("TapePath"), openFileName.lpstrFile); } + } else if (flag == 20) { + amiga_path = _tcsstr(openFileName.lpstrFile, openFileName.lpstrFileTitle); + if (amiga_path && amiga_path != openFileName.lpstrFile) { + *amiga_path = 0; + setdpath(_T("GenlockImagePath"), openFileName.lpstrFile); + } + } else if (flag == 21) { + amiga_path = _tcsstr(openFileName.lpstrFile, openFileName.lpstrFileTitle); + if (amiga_path && amiga_path != openFileName.lpstrFile) { + *amiga_path = 0; + setdpath(_T("GenlockVideoPath"), openFileName.lpstrFile); + } } } if (!multi) @@ -6589,8 +6691,11 @@ static void enable_for_chipsetdlg (HWND hDlg) CheckDlgButton (hDlg, IDC_BLITWAIT, FALSE); } ew (hDlg, IDC_BLITWAIT, workprefs.immediate_blits ? FALSE : TRUE); + ew(hDlg, IDC_GENLOCKMODE, workprefs.genlock ? TRUE : FALSE); ew(hDlg, IDC_GENLOCKMIX, workprefs.genlock ? TRUE : FALSE); + ew(hDlg, IDC_GENLOCKFILE, workprefs.genlock && workprefs.genlock_image >= 3 && workprefs.genlock_image < 5 ? TRUE : FALSE); + ew(hDlg, IDC_GENLOCKFILESELECT, workprefs.genlock && workprefs.genlock_image >= 3 && workprefs.genlock_image < 5 ? TRUE : FALSE); } static const int fakerefreshrates[] = { 50, 60, 100, 120, 0 }; @@ -7656,8 +7761,14 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l workprefs.monitoremu = nn; nn = SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_GETCURSEL, 0, 0); - if (nn != CB_ERR) + if (nn != CB_ERR && nn != workprefs.genlock_image) { workprefs.genlock_image = nn; + if (workprefs.genlock_image == 3) { + SendDlgItemMessage(hDlg, IDC_GENLOCKFILE, WM_SETTEXT, 0, (LPARAM)workprefs.genlock_image_file); + } else if (workprefs.genlock_image == 4) { + SendDlgItemMessage(hDlg, IDC_GENLOCKFILE, WM_SETTEXT, 0, (LPARAM)workprefs.genlock_video_file); + } + } nn = SendDlgItemMessage(hDlg, IDC_GENLOCKMIX, CB_GETCURSEL, 0, 0); if (nn != CB_ERR) { workprefs.genlock_mix = nn * 25; @@ -7666,6 +7777,16 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l } } +static void setgenlock(HWND hDlg) +{ + setautocomplete(hDlg, IDC_GENLOCKFILE); + if (workprefs.genlock_image == 3) { + addhistorymenu(hDlg, workprefs.genlock_image_file, IDC_GENLOCKFILE, HISTORY_GENLOCK_IMAGE, true); + } else if (workprefs.genlock_image == 4) { + addhistorymenu(hDlg, workprefs.genlock_video_file, IDC_GENLOCKFILE, HISTORY_GENLOCK_VIDEO, true); + } +} + static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { static int recursive = 0; @@ -7696,9 +7817,12 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("Velvet")); SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_RESETCONTENT, 0, 0); - SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM) _T("-")); - SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM) _T("Noise")); - SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM) _T("Test card")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("-")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Noise (built-in)")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Test card (built-in)")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Image file (png)")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Video file")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Capture device")); SendDlgItemMessage(hDlg, IDC_GENLOCKMIX, CB_RESETCONTENT, 0, 0); for (int i = 0; i <= 10; i++) { @@ -7726,6 +7850,8 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR ew (hDlg, IDC_AGA, FALSE); #endif + setgenlock(hDlg); + case WM_USER: recursive++; values_to_chipsetdlg (hDlg); @@ -7733,11 +7859,42 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR recursive--; break; - case WM_HSCROLL: case WM_COMMAND: if (recursive > 0) break; recursive++; + + if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_KILLFOCUS) { + switch (LOWORD(wParam)) + { + case IDC_GENLOCKFILE: + { + TCHAR *p = workprefs.genlock_image == 3 ? workprefs.genlock_image_file : workprefs.genlock_video_file; + getcomboboxtext(hDlg, IDC_GENLOCKFILE, p, MAX_DPATH); + parsefilepath(p, MAX_DPATH); + addhistorymenu(hDlg, p, IDC_GENLOCKFILE, workprefs.genlock_image == 3 ? HISTORY_GENLOCK_IMAGE : HISTORY_GENLOCK_VIDEO, true); + break; + } + } + } + switch (LOWORD(wParam)) + { + case IDC_GENLOCKFILESELECT: + { + TCHAR path[MAX_DPATH]; + path[0] = 0; + DiskSelection(hDlg, IDC_GENLOCKFILESELECT, workprefs.genlock_image == 3 ? 20 : 21, &workprefs, path); + break; + } + } + values_from_chipsetdlg(hDlg, msg, wParam, lParam); + enable_for_chipsetdlg(hDlg); + recursive--; + break; + case WM_HSCROLL: + if (recursive > 0) + break; + recursive++; values_from_chipsetdlg (hDlg, msg, wParam, lParam); enable_for_chipsetdlg( hDlg ); recursive--; @@ -14035,17 +14192,8 @@ static int getfloppybox (HWND hDlg, int f_text, TCHAR *out, int maxlen, int type else SendDlgItemMessage (hDlg, f_text, WM_GETTEXT, (WPARAM)maxlen, (LPARAM)out); - tmp = xmalloc (TCHAR, maxlen + 1); - _tcscpy (tmp, out); - p1 = _tcsstr(tmp, _T(" { ")); - p2 = _tcsstr(tmp, _T(" }")); - if (p1 && p2 && p2 > p1) { - *p1 = 0; - memset (out, 0, maxlen * sizeof (TCHAR)); - memcpy (out, p1 + 3, (p2 - p1 - 3) * sizeof (TCHAR)); - _tcscat (out, tmp); - } - xfree (tmp); + parsefilepath(out, maxlen); + i = 0; while ((p = DISK_history_get (i, type))) { if (!_tcscmp (p, out)) { diff --git a/od-win32/winuae_msvc14/winuae_msvc.vcxproj b/od-win32/winuae_msvc14/winuae_msvc.vcxproj index d1b2f113..176d4e5e 100644 --- a/od-win32/winuae_msvc14/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc14/winuae_msvc.vcxproj @@ -740,7 +740,7 @@ 0x0409 - ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng16.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;softfloat.lib;%(AdditionalDependencies) + ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng16.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;softfloat.lib;strmiids.lib;%(AdditionalDependencies) NotSet $(OutDir)$(TargetName)$(TargetExt) true @@ -943,6 +943,7 @@ + @@ -1046,7 +1047,6 @@ - diff --git a/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters index ad7a4a76..b0f75ca7 100644 --- a/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc14/winuae_msvc.vcxproj.filters @@ -823,6 +823,9 @@ common + + win32 + @@ -923,7 +926,6 @@ - diff --git a/od-win32/winuae_msvc15/winuae_msvc.vcxproj b/od-win32/winuae_msvc15/winuae_msvc.vcxproj index 07eb43d2..b82a02e4 100644 --- a/od-win32/winuae_msvc15/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc15/winuae_msvc.vcxproj @@ -844,6 +844,7 @@ + @@ -941,6 +942,7 @@ + diff --git a/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters index ace976c2..b0f75ca7 100644 --- a/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters @@ -820,6 +820,12 @@ support + + common + + + win32 + diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 9856b98a..95980e06 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -4,6 +4,21 @@ 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 11: + +- Added generic Z2/Z3 autoconfig support to expansion.cpp. Previously each expansion type needed own separate autoconfig handling. +- Ariadne II added but not yet working. Drivers require working 9346 EEPROM chip. (RTL8029 is NE2000 clone with some extra features) +- Any archive mounted as a harddrive: skip files with zero length file names. +- LZX archive mounted as a harddrive: archives inside LZX archive didn't always unpack and zero size files failed to open. +- Genlock custom video file, capture device and image file support fully implemented. GUI support added. Uses obsolete DirectShow + SampleGrabber method which is not necessarily supported with all video files/capture devices. Image support requires png image files. + Scaling is simple integer scaling. Genlock display changes to blue if image, video or capture device fails to open. Capture option + uses default capture device. You may get few seconds of blue genlock screen before capture/video initializes fully. + Maximum pointlessness feature level reached! +- uaesnd updates. It can play sound for the first time. +- Test compilation with Visual Studio 15 Preview 5. + Beta 10: - OpalVision emulation. Not fully supported yet, King of Karate does not work but for example OpalPaint mostly work with some glitches. diff --git a/sndboard.cpp b/sndboard.cpp index cbc610ca..39819519 100644 --- a/sndboard.cpp +++ b/sndboard.cpp @@ -337,15 +337,6 @@ static bool uaesnd_validate(struct uaesndboard_stream *s) write_log(_T("UAESND: invalid sample repeat pointer range %08x - %08x\n"), repeat, repeat + s->replen * s->framesize); return false; } - } else { - if (s->replen != 0) { - write_log(_T("UAESND: repeat count == 0: repeat length must be also zero.\n")); - return false; - } - if (s->repeat != 0) { - write_log(_T("UAESND: repeat count == 0: repeat address must be also zero.\n")); - return false; - } } uaesnd_setfreq(s); for (int i = s->ch; i < MAX_UAE_CHANNELS; i++) { -- 2.47.3