Some minor changes, mostly for some leftover EuroPC things.

Version bumped to 0.1.6.0 - finalizing for release.
This commit is contained in:
waltje
2018-05-12 23:53:10 -04:00
parent d393e95f8f
commit cfda8ef931
5 changed files with 88 additions and 32 deletions

View File

@@ -8,7 +8,7 @@
*
* Handling of the SCSI controllers.
*
* Version: @(#)scsi.c 1.0.9 2018/05/06
* Version: @(#)scsi.c 1.0.10 2018/05/12
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -56,7 +56,7 @@
#include "scsi_buslogic.h"
#include "scsi_ncr5380.h"
#include "scsi_ncr53c810.h"
#ifdef WALTJE
#ifdef USE_WD33C93
# include "scsi_wd33c93.h"
#endif
#include "scsi_x54x.h"
@@ -97,7 +97,7 @@ static const scsidev_t scsi_cards[] = {
{ "[ISA] Ranco RT1000B", "rt1000b", &scsi_rt1000b_device, NULL },
{ "[ISA] Trantor T130B", "t130b", &scsi_t130b_device, NULL },
{ "[ISA] Sumo SCSI-AT", "scsiat", &scsi_scsiat_device, NULL },
#ifdef WALTJE_SCSI
#ifdef USE_WD33C93
{ "[ISA] Generic WDC33C93", "wd33c93", &scsi_wd33c93_device, NULL },
#endif
{ "[MCA] Adaptec AHA-1640", "aha1640", &aha1640_device, x54x_device_reset },

View File

@@ -66,7 +66,7 @@
* bit 1: b8000 memory available
* 0000:046a: 00 jim 250 01 jim 350
*
* Version: @(#)m_europc.c 1.0.13 2018/05/06
* Version: @(#)m_europc.c 1.0.14 2018/05/12
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -308,7 +308,7 @@ rtc_reset(nvr_t *nvr)
* [A] unknown
*
* [B] 7 1 bootdrive extern
* 0 bootdribe intern
* 0 bootdrive intern
* 6:5 11 invalid hard disk type
* 10 hard disk installed, type 2
* 01 hard disk installed, type 1
@@ -319,14 +319,14 @@ rtc_reset(nvr_t *nvr)
* 00 external drive disabled
* 2 unknown
* 1:0 11 invalid internal drive type
* 10 internal drive 360K
* 01 internal drive 720K
* 10 internal drive 720K
* 01 internal drive 360K
* 00 internal drive disabled
*
* [C] 7:6 unknown
* 5 monitor detection OFF
* 4 unknown
* 3:2 11 illegal memory size
* 3:2 11 illegal memory size (768K ?)
* 10 512K
* 01 256K
* 00 640K
@@ -626,10 +626,34 @@ europc_boot(const device_t *info)
}
sys->nvr.regs[MRTC_CONF_C] = b;
#if 0
/* Set up hard disks. */
b = sys->nvr.regs[MRTC_CONF_B] & 0x84;
if (hdc_type != HDC_NONE)
b |= 0x20; /* HD20 #1 */
/* Set up floppy types. */
sys->nvr.regs[MRTC_CONF_B] = 0x2a;
#endif
if (fdd_get_type(0) != 0) {
/* We have floppy A: */
if (fdd_is_dd(0)) {
if (fdd_is_525(0))
b |= 0x01; /* 5.25" DD */
else
b |= 0x02; /* 3.5" DD */
} else
pclog("EuroPC: unsupported HD type for floppy drive 0\n");
}
if (fdd_get_type(1) != 0) {
/* We have floppy B: */
if (fdd_is_dd(1)) {
b |= 0x04; /* EXTERNAL */
if (fdd_is_525(1))
b |= 0x08; /* 5.25" DD */
else
b |= 0x10; /* 3.5" DD */
} else
pclog("EuroPC: unsupported HD type for floppy drive 1\n");
}
sys->nvr.regs[MRTC_CONF_B] = b;
/* Validate the NVR checksum and save. */
sys->nvr.regs[MRTC_CHECK_LO] = rtc_checksum(sys->nvr.regs);

View File

@@ -8,7 +8,7 @@
*
* Define application version and build info.
*
* Version: @(#)version.h 1.0.12 2018/05/03
* Version: @(#)version.h 1.0.13 2018/05/11
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -54,8 +54,8 @@
/* Version info. */
#define EMU_VER_MAJOR 0
#define EMU_VER_MINOR 1
#define EMU_VER_REV 5
#define EMU_VER_PATCH 6
#define EMU_VER_REV 6
//#define EMU_VER_PATCH 1
/* Standard C preprocessor macros. */

View File

@@ -8,7 +8,7 @@
*
* Implementation of server several dialogs.
*
* Version: @(#)win_dialog.c 1.0.9 2018/05/09
* Version: @(#)win_dialog.c 1.0.10 2018/05/11
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -120,7 +120,7 @@ ui_msgbox(int flags, void *arg)
case MBX_CONFIG: /* configuration */
fl = (MB_YESNO | MB_ICONERROR);
cap = get_string(IDS_2050); /* "Configuration Error" */
cap = get_string(IDS_2050); /* "Configuration Error" */
break;
}
@@ -193,22 +193,49 @@ dlg_file_hook(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
int
dlg_file_ex(HWND h, const wchar_t *f, const wchar_t *ifn, wchar_t *fn, int fl)
{
wchar_t temp[512];
wchar_t temp[512], *str;
wchar_t path[512];
OPENFILENAME ofn;
DWORD err;
BOOL r;
int ret;
/* Clear the temp path. */
memset(temp, 0x00, sizeof(temp));
/* Initialize OPENFILENAME. */
memset(&ofn, 0x00, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = h;
ofn.lpfnHook = dlg_file_hook;
/* This is the buffer in which to place the resulting filename. */
/* Tell the dialog where to go initially. */
memset(temp, 0x00, sizeof(temp));
if ((ifn != NULL) && (*ifn != L'\0')) {
/* We seem to have a valid path, use that. */
if (! plat_path_abs(ifn))
wcscpy(temp, usr_path);
wcscat(temp, ifn);
/* Re-slash the path, OpenFileName does not like forward slashes. */
str = temp;
while (*str != L'\0') {
if (*str == L'/')
*str = L'\\';
str++;
}
ofn.lpstrInitialDir = NULL;
} else {
/* Re-slash the path, OpenFileName does not like forward slashes. */
wcscpy(path, usr_path);
str = path;
while (*str != L'\0') {
if (*str == L'/')
*str = L'\\';
str++;
}
/* No initial path, use the usr_path value. */
ofn.lpstrInitialDir = path;
}
ofn.lpstrFile = temp;
ofn.nMaxFile = sizeof_w(temp);
@@ -218,15 +245,10 @@ dlg_file_ex(HWND h, const wchar_t *f, const wchar_t *ifn, wchar_t *fn, int fl)
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
/* Tell the dialog where to go initially. */
if (ifn == NULL)
ifn = usr_path;
ofn.lpstrInitialDir = ifn;
wcscpy(fn, ifn);
/* Set up the flags for this dialog. */
r = (fl & DLG_FILE_RO) ? TRUE : FALSE;
ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER | OFN_PATHMUSTEXIST;
ofn.Flags = OFN_ENABLESIZING | OFN_ENABLEHOOK | OFN_EXPLORER | \
OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_DONTADDTORECENT;
if (! (fl & DLG_FILE_SAVE)) {
ofn.Flags |= OFN_FILEMUSTEXIST;
@@ -240,7 +262,7 @@ dlg_file_ex(HWND h, const wchar_t *f, const wchar_t *ifn, wchar_t *fn, int fl)
else
r = GetOpenFileName(&ofn);
/* OK, just to make sure the dialog did not change our CWD. */
/* As OFN_NOCHANGEDIR does not work (see MSDN), just make sure. */
plat_chdir(usr_path);
if (r) {
@@ -257,8 +279,8 @@ dlg_file_ex(HWND h, const wchar_t *f, const wchar_t *ifn, wchar_t *fn, int fl)
/* If an error occurred, log this. */
if ((err = CommDlgExtendedError()) != NO_ERROR) {
sprintf((char *)temp,
"%sFile(%ls, %02x):\n\n error 0x%08lx",
(fl & DLG_FILE_SAVE)?"Save":"Open", ifn, fl, err);
"%sFile('%ls', %02x):\n\n error 0x%08lx",
(fl & DLG_FILE_SAVE)?"Save":"Open", temp, fl, err);
pclog("%s\n", (char *)temp);
(void)ui_msgbox(MBX_ERROR|MBX_ANSI, (char *)temp);
}

View File

@@ -8,7 +8,7 @@
*
* Implement the user Interface module.
*
* Version: @(#)win_ui.c 1.0.23 2018/05/10
* Version: @(#)win_ui.c 1.0.24 2018/05/12
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -742,12 +742,16 @@ input_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_INPUT:
#if defined(WALTJE) && defined(_DEBUG) && defined(USE_SDL)
pclog("UI: hwnd=%08lx WM_INPUT (infocus=%d) !\n", hwnd, infocus);
#endif
keyboard_handle(lParam, infocus);
break;
case WM_SETFOCUS:
#if defined(WALTJE) && defined(_DEBUG) && defined(USE_SDL)
pclog("UI: hwnd=%08lx WM_SETFOCUS (infocus=%d) !\n", hwnd, infocus);
#endif
infocus = 1;
if (! hook_enabled) {
hKeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL,
@@ -759,7 +763,9 @@ pclog("UI: hwnd=%08lx WM_SETFOCUS (infocus=%d) !\n", hwnd, infocus);
break;
case WM_KILLFOCUS:
#if defined(WALTJE) && defined(_DEBUG) && defined(USE_SDL)
pclog("UI: hwnd=%08lx WM_KILLFOCUS (infocus=%d) !\n", hwnd, infocus);
#endif
infocus = 0;
plat_mouse_capture(0);
if (hook_enabled) {
@@ -769,13 +775,17 @@ pclog("UI: hwnd=%08lx WM_KILLFOCUS (infocus=%d) !\n", hwnd, infocus);
break;
case WM_LBUTTONUP:
#if defined(WALTJE) && defined(_DEBUG) && defined(USE_SDL)
pclog("UI: hwnd=%08lx WM_LBUTTONUP (infocus=%d) !\n", hwnd, infocus);
#endif
if (! vid_fullscreen)
plat_mouse_capture(1);
break;
case WM_MBUTTONUP:
#if defined(WALTJE) && defined(_DEBUG) && defined(USE_SDL)
pclog("UI: hwnd=%08lx WM_MBUTTONUP (infocus=%d) !\n", hwnd, infocus);
#endif
if (mouse_get_buttons() < 3)
plat_mouse_capture(0);
break;