Vastly overhauled the UI, there's now a completely new Settings dialog as well as a status bar with disk activity icons and removable drive menus;

Thoroughly clean up the code to vastly reduce the number of compiler warnings and found and fixed several bugs in the process;
Applied all mainline PCem commits;
Added SCSI hard disk emulation;
Commented out all unfinished machines and graphics cards;
Added the AOpen AP53 and ASUS P/I-P55T2 machines as well as another Tyan 440FX machine, all three with AMI WinBIOS (patch from TheCollector1995);
Added the Diamond Stealth 3D 3000 (S3 ViRGE/VX) graphics card (patch from TheCollector1995);
Added the PS/2 XT IDE (AccuLogic) HDD Controller (patch from TheCollector1995);
Added Microsoft/Logitech Bus Mouse emulation (patch from waltje);
Overhauled the makefiles (patch from waltje);
Added the Adaptec AHA-1542CF SCSI controller (patch from waltje);
Added preliminary (but still unfinished) Adaptec AHA-154x SCSI controller BIOS support (patch from waltje);
Added an ISABugger debugging device (patch from waltje);
Added sanity checks to the Direct3D code.
This commit is contained in:
OBattler
2017-05-05 01:49:42 +02:00
parent d07d53962c
commit f6ef1f833c
346 changed files with 24292 additions and 18058 deletions

View File

@@ -8,7 +8,7 @@
#undef BITMAP
#include <D3dx9tex.h>
#include "86box.h"
#include "resources.h"
#include "resource.h"
#include "video.h"
#include "win-d3d-fs.h"
#include "win.h"
@@ -210,12 +210,10 @@ static void d3d_fs_close_objects()
static void d3d_fs_init_objects()
{
HRESULT hr;
D3DLOCKED_RECT dr;
int y;
RECT r;
hr = d3ddev->CreateVertexBuffer(6*sizeof(CUSTOMVERTEX),
d3ddev->CreateVertexBuffer(6*sizeof(CUSTOMVERTEX),
0,
D3DFVF_XYZRHW | D3DFVF_TEX1,
D3DPOOL_MANAGED,
@@ -373,11 +371,10 @@ static void d3d_fs_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
VOID* pVoid;
D3DLOCKED_RECT dr;
RECT window_rect;
uint32_t *p, *src;
int yy;
double l, t, r, b;
if (y1 == y2)
if ((y1 == y2) || (d3dTexture == NULL))
{
video_blit_complete();
return; /*Nothing to do*/
@@ -396,7 +393,7 @@ static void d3d_fs_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
fatal("LockRect failed\n");
for (yy = y1; yy < y2; yy++)
memcpy(dr.pBits + ((yy - y1) * dr.Pitch), &(((uint32_t *)buffer32->line[yy + y])[x]), w * 4);
memcpy((uint32_t *) &(((uint8_t *) dr.pBits)[(yy - y1) * dr.Pitch]), (uint32_t *) &(buffer32->line[yy + y][x]), w * 4);
video_blit_complete();
d3dTexture->UnlockRect(0);
@@ -472,11 +469,11 @@ static void d3d_fs_blit_memtoscreen_8(int x, int y, int w, int h)
VOID* pVoid;
D3DLOCKED_RECT dr;
RECT window_rect;
uint32_t *p, *src;
uint32_t *p;
int xx, yy;
double l, t, r, b;
if (!h)
if (!h || (d3dTexture == NULL))
{
video_blit_complete();
return; /*Nothing to do*/
@@ -496,7 +493,7 @@ static void d3d_fs_blit_memtoscreen_8(int x, int y, int w, int h)
for (yy = 0; yy < h; yy++)
{
uint32_t *p = (uint32_t *)(dr.pBits + (yy * dr.Pitch));
p = (uint32_t *) &(((uint8_t *) dr.pBits)[yy * dr.Pitch]);
if ((y + yy) >= 0 && (y + yy) < buffer->h)
{
for (xx = 0; xx < w; xx++)
@@ -575,13 +572,12 @@ static void d3d_fs_blit_memtoscreen_8(int x, int y, int w, int h)
void d3d_fs_take_screenshot(char *fn)
{
HRESULT hr = D3D_OK;
LPDIRECT3DSURFACE9 d3dSurface = NULL;
if (!d3dTexture) return;
hr = d3ddev->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &d3dSurface);
hr = D3DXSaveSurfaceToFile(fn, D3DXIFF_PNG, d3dSurface, NULL, NULL);
d3ddev->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &d3dSurface);
D3DXSaveSurfaceToFile(fn, D3DXIFF_PNG, d3dSurface, NULL, NULL);
d3dSurface->Release();
d3dSurface = NULL;