Fixed minor bugs in the NCR 53C810 and Adaptec/Buslogic SCSI emulations;

FDC reads and writes now use up ISA cycles;
Fixed Mach64 mono-source blits, fixes NT 3.1 and 3.5 drivers;
Incresed maximum emulated CD-ROM speed to 72x;
Fixed a minor bug in the Cirrus Logic CL-GD 54xx emulation.
This commit is contained in:
OBattler
2018-03-10 21:46:38 +01:00
parent 07035f7100
commit c0bb63bd82
6 changed files with 39 additions and 17 deletions

View File

@@ -9,7 +9,7 @@
* Implementation of the NEC uPD-765 and compatible floppy disk
* controller.
*
* Version: @(#)fdc->c 1.0.17 2018/03/02
* Version: @(#)fdc->c 1.0.18 2018/03/08
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -689,6 +689,8 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
fdc_log("Write FDC %04X %02X\n", addr, val);
cycles -= ISA_CYCLES(8);
switch (addr&7) {
case 0:
return;
@@ -1145,7 +1147,11 @@ fdc_read(uint16_t addr, void *priv)
{
fdc_t *fdc = (fdc_t *) priv;
uint8_t ret;
int drive;
cycles -= ISA_CYCLES(8);
switch (addr&7) {
case 0: /* STA */
ret = 0xff;

View File

@@ -10,7 +10,7 @@
* NCR and later Symbios and LSI. This controller was designed
* for the PCI bus.
*
* Version: @(#)scsi_ncr53c810.c 1.0.7 2018/03/07
* Version: @(#)scsi_ncr53c810.c 1.0.8 2018/03/09
*
* Authors: Paul Brook (QEMU)
* Artyom Tarasenko (QEMU)
@@ -1297,8 +1297,6 @@ again:
ncr53c810_log("NCR 810: SCRIPTS: Waiting\n");
}
return;
ncr53c810_log("SCRIPTS execution stopped\n");
}

View File

@@ -11,7 +11,7 @@
* series of SCSI Host Adapters made by Mylex.
* These controllers were designed for various buses.
*
* Version: @(#)scsi_x54x.c 1.0.18 2018/03/07
* Version: @(#)scsi_x54x.c 1.0.19 2018/03/09
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -1065,6 +1065,7 @@ x54x_req_setup(x54x_t *dev, uint32_t CCBPointer, Mailbox32_t *Mailbox32)
/* Fetch data from the Command Control Block. */
DMAPageRead(CCBPointer, (uint8_t *)&req->CmdBlock, sizeof(CCB32));
x54x_add_to_period(sizeof(CCB32));
req->Is24bit = dev->Mbx24bit;
req->CCBPointer = CCBPointer;

View File

@@ -8,7 +8,7 @@
*
* ATi Mach64 graphics card emulation.
*
* Version: @(#)vid_ati_mach64.c 1.0.13 2018/03/02
* Version: @(#)vid_ati_mach64.c 1.0.14 2018/03/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -959,6 +959,13 @@ void mach64_start_fill(mach64_t *mach64)
mach64->accel.dst_width = (mach64->dst_height_width >> 16) & 0x1fff;
mach64->accel.dst_height = mach64->dst_height_width & 0x1fff;
if (((mach64->dp_src >> 16) & 7) == MONO_SRC_BLITSRC)
{
if (mach64->accel.dst_width & 7)
mach64->accel.dst_width = (mach64->accel.dst_width & ~7) + 8;
}
mach64->accel.x_count = mach64->accel.dst_width;
mach64->accel.src_x = 0;
@@ -1140,8 +1147,11 @@ void mach64_start_line(mach64_t *mach64)
#define READ(addr, dat, width) if (width == 0) dat = svga->vram[((addr)) & mach64->vram_mask]; \
else if (width == 1) dat = *(uint16_t *)&svga->vram[((addr) << 1) & mach64->vram_mask]; \
else if (width == 2) dat = *(uint32_t *)&svga->vram[((addr) << 2) & mach64->vram_mask]; \
else dat = (svga->vram[((addr) >> 3) & mach64->vram_mask] >> ((addr) & 7)) & 1;
else if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) dat = (svga->vram[((addr) >> 3) & mach64->vram_mask] >> ((addr) & 7)) & 1; \
else dat = (svga->vram[((addr) >> 3) & mach64->vram_mask] >> (7 - ((addr) & 7))) & 1;
#define READ1BPP(addr, dat, width)
#define MIX switch (mix ? mach64->accel.mix_fg : mach64->accel.mix_bg) \
{ \
case 0x0: dest_dat = ~dest_dat; break; \
@@ -1161,7 +1171,7 @@ void mach64_start_line(mach64_t *mach64)
case 0xe: dest_dat = ~src_dat & dest_dat; break; \
case 0xf: dest_dat = ~(src_dat | dest_dat); break; \
}
#define WRITE(addr, width) if (width == 0) \
{ \
svga->vram[(addr) & mach64->vram_mask] = dest_dat; \
@@ -1179,10 +1189,17 @@ void mach64_start_line(mach64_t *mach64)
} \
else \
{ \
if (dest_dat & 1) \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << ((addr) & 7); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << ((addr) & 7)); \
if (dest_dat & 1) { \
if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << ((addr) & 7); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << (7 - ((addr) & 7)); \
} else { \
if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << ((addr) & 7)); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << (7 - ((addr) & 7)));\
} \
svga->changedvram[(((addr) >> 3) & mach64->vram_mask) >> 12] = changeframecount; \
}

View File

@@ -9,7 +9,7 @@
* Emulation of select Cirrus Logic cards (CL-GD 5428,
* CL-GD 5429, 5430, 5434 and 5436 are supported).
*
* Version: @(#)vid_cl_54xx.c 1.0.10 2018/03/02
* Version: @(#)vid_cl_54xx.c 1.0.11 2018/03/08
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Barry Rodewald,
@@ -2074,7 +2074,7 @@ gd54xx_start_blit(uint32_t cpu_dat, int count, gd54xx_t *gd54xx, svga_t *svga)
switch (gd54xx->blt.rop) {
case 0x00: dst = 0; break;
case 0x05: dst = src & dst; break;
case 0x06: dst = dst; break;
case 0x06: /* dst = dst; */ break;
case 0x09: dst = src & ~dst; break;
case 0x0b: dst = ~ dst; break;
case 0x0d: dst = src; break;

View File

@@ -8,7 +8,7 @@
*
* Windows 86Box Settings dialog handler.
*
* Version: @(#)win_settings.c 1.0.42 2018/03/07
* Version: @(#)win_settings.c 1.0.43 2018/03/10
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
@@ -4409,7 +4409,7 @@ static void cdrom_add_locations(HWND hdlg)
}
h = GetDlgItem(hdlg, IDC_COMBO_CD_SPEED);
for (i = 1; i <= 56; i++)
for (i = 1; i <= 72; i++)
{
wsprintf(lptsTemp, L"%ix", i);
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);