Ported the latest Voodoo 1/2 patches from PCem.

This commit is contained in:
TC1995
2020-11-20 22:24:46 +01:00
parent 8aab3da769
commit 908258302b
2 changed files with 23 additions and 3 deletions

View File

@@ -390,7 +390,7 @@ static uint32_t voodoo_readl(uint32_t addr, void *p)
break;
default:
fatal("voodoo_readl : bad addr %08X\n", addr);
voodoo_log("voodoo_readl : bad addr %08X\n", addr);
temp = 0xffffffff;
}

View File

@@ -36,6 +36,24 @@
#include <86box/vid_voodoo_render.h>
#include <86box/vid_voodoo_setup.h>
#ifdef ENABLE_VOODOO_SETUP_LOG
int voodoo_setup_do_log = ENABLE_VOODOO_SETUP_LOG;
static void
voodoo_setup_log(const char *fmt, ...)
{
va_list ap;
if (voodoo_setup_do_log) {
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
}
}
#else
#define voodoo_setup_log(fmt, ...)
#endif
void voodoo_triangle_setup(voodoo_t *voodoo)
{
@@ -152,8 +170,10 @@ void voodoo_triangle_setup(voodoo_t *voodoo)
voodoo->params.vertexCx = (int32_t)(int16_t)((int32_t)(verts[vc].sVx * 16.0f) & 0xffff);
voodoo->params.vertexCy = (int32_t)(int16_t)((int32_t)(verts[vc].sVy * 16.0f) & 0xffff);
if (voodoo->params.vertexAy > voodoo->params.vertexBy || voodoo->params.vertexBy > voodoo->params.vertexCy)
fatal("triangle_setup wrong order %d %d %d\n", voodoo->params.vertexAy, voodoo->params.vertexBy, voodoo->params.vertexCy);
if (voodoo->params.vertexAy > voodoo->params.vertexBy || voodoo->params.vertexBy > voodoo->params.vertexCy) {
voodoo_setup_log("triangle_setup wrong order %d %d %d\n", voodoo->params.vertexAy, voodoo->params.vertexBy, voodoo->params.vertexCy);
return;
}
if (voodoo->sSetupMode & SETUPMODE_RGB)
{