Applied all relevant PCem commits;

Extensively cleaned up and changed the CD-ROM code;
Removed CD-ROM IOCTTL (it was causing performance and stability issues);
Turned a lot of things into device_t's;
Added the PS/1 Model 2011 XTA and standalone XTA hard disk controllers, ported from Varcem;
Numerous FDC fixes for the PS/1 Model 2121;
NVR changes ported from Varcem;
The PCap code no longer requires libpcap to be compiled;
Numerous fixes to various SCSI controllers;
Updated NukedOPL to 1.8;
Fixes to OpenAL initialization and closing, should give less Audio issues now;
Revorked parts of the common (S)VGA code (also based on code from QEMU);
Removed the Removable SCSI hard disks (they were a never finished experiment so there was no need to keep them there);
Cleaned up the SCSI hard disk and Iomega ZIP code (but more cleanups of that are coming in the future);
In some occasions (IDE hard disks in multiple sector mode and SCSI hard disks) the status bar icon is no longer updated, should improve performance a bit;
Redid the way the tertiary and quaternary IDE controllers are configured (and they are now device_t's);
Extensively reworked the IDE code and fixed quite a few bugs;
Fixes to XT MFM, AT MFM, and AT ESDI code;
Some changes to XTIDE and MCA ESDI code;
Some fixes to the CD-ROM image handler.
This commit is contained in:
OBattler
2018-04-25 23:51:13 +02:00
parent 2789adca0e
commit a412ceb4d9
151 changed files with 21026 additions and 21058 deletions

View File

@@ -8,7 +8,7 @@
*
* Emulation of the 3DFX Voodoo Graphics controller.
*
* Version: @(#)vid_voodoo.c 1.0.12 2018/03/18
* Version: @(#)vid_voodoo.c 1.0.13 2018/04/13
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* leilei
@@ -37,18 +37,10 @@
#include "vid_voodoo.h"
#include "vid_voodoo_dither.h"
#ifdef MIN
#undef MIN
#endif
#ifdef ABS
#undef ABS
#endif
#ifdef CLAMP
#undef CLAMP
#endif
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define CLAMP(x) (((x) < 0) ? 0 : (((x) > 0xff) ? 0xff : (x)))
#define CLAMP16(x) (((x) < 0) ? 0 : (((x) > 0xffff) ? 0xffff : (x)))
@@ -4007,8 +3999,6 @@ enum
case 0xf: dst_dat = 0xffff; break; \
}
#define ABS(x) ((x) > 0 ? (x) : -(x))
static void blit_start(voodoo_t *voodoo)
{
uint64_t dat64;
@@ -4179,15 +4169,29 @@ static void blit_data(voodoo_t *voodoo, uint32_t data)
{
int src_bits = 32;
uint32_t base_addr = (voodoo->bltCommand & BLTCMD_DST_TILED) ? ((voodoo->bltDstBaseAddr & 0x3ff) << 12) : (voodoo->bltDstBaseAddr & 0x3ffff8);
uint32_t addr;
uint16_t *dst;
if ((voodoo->bltCommand & BLIT_COMMAND_MASK) != BLIT_COMMAND_CPU_TO_SCREEN)
return;
if (SLI_ENABLED)
dst = (uint16_t *)&voodoo->fb_mem[base_addr + (voodoo->blt.dst_y >> 1) * voodoo->blt.dst_stride];
{
addr = base_addr + (voodoo->blt.dst_y >> 1) * voodoo->blt.dst_stride;
dst = (uint16_t *)&voodoo->fb_mem[addr];
}
else
dst = (uint16_t *)&voodoo->fb_mem[base_addr + voodoo->blt.dst_y*voodoo->blt.dst_stride];
{
addr = base_addr + voodoo->blt.dst_y*voodoo->blt.dst_stride;
dst = (uint16_t *)&voodoo->fb_mem[addr];
}
if (addr >= voodoo->front_offset && voodoo->row_width)
{
int y = (addr - voodoo->front_offset) / voodoo->row_width;
if (y < voodoo->v_disp)
voodoo->dirty_line[y] = 2;
}
while (src_bits && voodoo->blt.cur_x <= voodoo->blt.size_x)
{