Fixes to the fixes of the devconf module which were, um, messed up.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Driver for the ESDI controller (WD1007-vse1) for PC/AT.
|
||||
*
|
||||
* Version: @(#)hdc_esdi_at.c 1.0.5 2018/03/31
|
||||
* Version: @(#)hdc_esdi_at.c 1.0.6 2018/04/01
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -238,7 +238,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
esdi_t *esdi = (esdi_t *)priv;
|
||||
|
||||
#ifdef ENABLE_HDD_LOG
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("WD1007 write(%04x, %02x)\n", port, val);
|
||||
#endif
|
||||
|
||||
@@ -282,7 +282,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv)
|
||||
esdi->command = val;
|
||||
esdi->error = 0;
|
||||
|
||||
#ifdef ENABLE_HDD_LOG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1007: command %02x\n", val & 0xf0);
|
||||
#endif
|
||||
switch (val & 0xf0) {
|
||||
@@ -478,7 +478,7 @@ esdi_read(uint16_t port, void *priv)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_HDD_LOG
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("WD1007 read(%04x) = %02x\n", port, temp);
|
||||
#endif
|
||||
|
||||
@@ -508,7 +508,7 @@ esdi_callback(void *priv)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_HDD_LOG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1007: command %02x\n", esdi->command);
|
||||
#endif
|
||||
|
||||
@@ -656,7 +656,7 @@ esdi_callback(void *priv)
|
||||
|
||||
drive->cfg_spt = esdi->secount;
|
||||
drive->cfg_hpc = esdi->head+1;
|
||||
#ifdef ENABLE_HDD_LOG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1007: parameters: spt=%i hpc=%i\n", drive->cfg_spt,drive->cfg_hpc);
|
||||
#endif
|
||||
if (! esdi->secount)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
* however, are auto-configured by the system software as
|
||||
* shown above.
|
||||
*
|
||||
* Version: @(#)hdc_esdi_mca.c 1.0.4 2018/03/31
|
||||
* Version: @(#)hdc_esdi_mca.c 1.0.5 2018/04/01
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
@@ -757,7 +757,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
esdi_t *dev = (esdi_t *)priv;
|
||||
|
||||
#if 0
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("ESDI: wr(%04x, %02x)\n", port-dev->base, val);
|
||||
#endif
|
||||
switch (port-dev->base) {
|
||||
@@ -888,7 +888,7 @@ esdi_writew(uint16_t port, uint16_t val, void *priv)
|
||||
{
|
||||
esdi_t *dev = (esdi_t *)priv;
|
||||
|
||||
#if 0
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("ESDI: wrw(%04x, %04x)\n", port-dev->base, val);
|
||||
#endif
|
||||
switch (port-dev->base) {
|
||||
@@ -922,7 +922,7 @@ esdi_mca_read(int port, void *priv)
|
||||
{
|
||||
esdi_t *dev = (esdi_t *)priv;
|
||||
|
||||
#if 0
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("ESDI: mcard(%04x)\n", port);
|
||||
#endif
|
||||
return(dev->pos_regs[port & 7]);
|
||||
@@ -934,7 +934,7 @@ esdi_mca_write(int port, uint8_t val, void *priv)
|
||||
{
|
||||
esdi_t *dev = (esdi_t *)priv;
|
||||
|
||||
#if 0
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("ESDI: mcawr(%04x, %02x) pos[2]=%02x pos[3]=%02x\n",
|
||||
port, val, dev->pos_regs[2], dev->pos_regs[3]);
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* based design. Most cards were WD1003-WA2 or -WAH, where the
|
||||
* -WA2 cards had a floppy controller as well (to save space.)
|
||||
*
|
||||
* Version: @(#)hdc_mfm_at.c 1.0.3 2018/03/27
|
||||
* Version: @(#)hdc_mfm_at.c 1.0.4 2018/04/01
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Define application version and build info.
|
||||
*
|
||||
* Version: @(#)version.h 1.0.3 2018/03/30
|
||||
* Version: @(#)version.h 1.0.4 2018/04/01
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -55,7 +55,7 @@
|
||||
#define EMU_VER_MAJOR 0
|
||||
#define EMU_VER_MINOR 1
|
||||
#define EMU_VER_REV 3
|
||||
#define EMU_VER_PATCH 4
|
||||
#define EMU_VER_PATCH 5
|
||||
|
||||
|
||||
/* Standard C preprocessor macros. */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* and builds a complete Win32 DIALOG resource block in a
|
||||
* buffer in memory, and then passes that to the API handler.
|
||||
*
|
||||
* Version: @(#)win_devconf.c 1.0.7 2018/03/31
|
||||
* Version: @(#)win_devconf.c 1.0.8 2018/04/01
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -437,11 +437,13 @@ dlg_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
|
||||
|
||||
#define DATABLOCK_SIZE 16384
|
||||
uint8_t
|
||||
deviceconfig_open(HWND hwnd, device_t *device)
|
||||
{
|
||||
char temp[128];
|
||||
const device_config_t *config = device->config;
|
||||
uint16_t *data_block = malloc(16384);
|
||||
uint16_t *data_block = malloc(DATABLOCK_SIZE);
|
||||
uint16_t *data;
|
||||
DLGTEMPLATE *dlg = (DLGTEMPLATE *)data_block;
|
||||
DLGITEMTEMPLATE *item;
|
||||
@@ -450,10 +452,9 @@ deviceconfig_open(HWND hwnd, device_t *device)
|
||||
|
||||
deviceconfig_changed = 0;
|
||||
|
||||
memset(data_block, 0x00, sizeof(16384));
|
||||
memset(data_block, 0x00, DATABLOCK_SIZE);
|
||||
|
||||
dlg->style = DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | \
|
||||
WS_POPUP | WS_CAPTION | WS_SYSMENU;
|
||||
dlg->style = DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU;
|
||||
dlg->x = 10;
|
||||
dlg->y = 10;
|
||||
dlg->cx = 220;
|
||||
@@ -463,8 +464,8 @@ deviceconfig_open(HWND hwnd, device_t *device)
|
||||
|
||||
*data++ = 0; /*no menu*/
|
||||
*data++ = 0; /*predefined dialog box class*/
|
||||
data += MultiByteToWideChar(CP_ACP, 0,
|
||||
"Device Configuration", -1, data, 50);
|
||||
sprintf(temp, "%s Configuration", device->name);
|
||||
data += MultiByteToWideChar(CP_ACP, 0, temp, -1, data, 50);
|
||||
|
||||
*data++ = 9; /*Point*/
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Segoe UI", -1, data, 50);
|
||||
@@ -509,8 +510,7 @@ deviceconfig_open(HWND hwnd, device_t *device)
|
||||
item->cx = 140;
|
||||
item->cy = 150;
|
||||
|
||||
item->style = WS_CHILD | WS_VISIBLE | \
|
||||
CBS_DROPDOWN | WS_VSCROLL;
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | WS_VSCROLL;
|
||||
|
||||
data = (uint16_t *)(item + 1);
|
||||
*data++ = 0xFFFF;
|
||||
@@ -558,8 +558,7 @@ deviceconfig_open(HWND hwnd, device_t *device)
|
||||
item->cx = 140;
|
||||
item->cy = 14;
|
||||
|
||||
item->style = WS_CHILD | WS_VISIBLE | \
|
||||
ES_AUTOHSCROLL | ES_NUMBER;
|
||||
item->style = WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | ES_NUMBER;
|
||||
item->dwExtendedStyle = WS_EX_CLIENTEDGE;
|
||||
|
||||
data = (uint16_t *)(item + 1);
|
||||
|
||||
Reference in New Issue
Block a user