voodoo: Remove wrapping after y origin conversion so that proper y-clipping is performed. Fixes pool cue wrapping out of top the screen in virtpool. (nw)

This commit is contained in:
Ted Green 2017-08-30 19:17:44 -06:00
parent 4f85f293d9
commit 8bca7cfd4f
2 changed files with 6 additions and 5 deletions

View File

@ -2651,7 +2651,7 @@ void voodoo_device::raster_##name(void *destbase, int32_t y, const poly_extent *
/* determine the screen Y */ \
scry = y; \
if (FBZMODE_Y_ORIGIN(FBZMODE)) \
scry = (vd->fbi.yorigin - y) & 0x3ff; \
scry = (vd->fbi.yorigin - y); \
\
/* compute dithering */ \
COMPUTE_DITHER_POINTERS(FBZMODE, y, FOGMODE); \

View File

@ -2860,6 +2860,7 @@ int32_t voodoo_device::register_w(voodoo_device *vd, offs_t offset, uint32_t dat
break;
case trexInit1:
vd->logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", vd->index, (regnum < 0x384 / 4) ? vd->regnames[regnum] : "oob", chips, data);
/* send tmu config data to the frame buffer */
vd->send_config = (TREXINIT_SEND_TMU_CONFIG(data) > 0);
goto default_case;
@ -3189,7 +3190,7 @@ int32_t voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, uint32_t data, ui
/* determine the screen Y */
scry = y;
if (LFBMODE_Y_ORIGIN(vd->reg[lfbMode].u))
scry = (vd->fbi.yorigin - y) & 0x3ff;
scry = (vd->fbi.yorigin - y);
/* advance pointers to the proper row */
bufoffs = scry * vd->fbi.rowpixels + x;
@ -3247,7 +3248,7 @@ int32_t voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, uint32_t data, ui
/* determine the screen Y */
scry = y;
if (FBZMODE_Y_ORIGIN(vd->reg[fbzMode].u))
scry = (vd->fbi.yorigin - y) & 0x3ff;
scry = (vd->fbi.yorigin - y);
/* advance pointers to the proper row */
dest += scry * vd->fbi.rowpixels;
@ -4055,7 +4056,7 @@ static uint32_t lfb_r(voodoo_device *vd, offs_t offset, bool lfb_3d)
/* determine the screen Y */
scry = y;
if (LFBMODE_Y_ORIGIN(vd->reg[lfbMode].u))
scry = (vd->fbi.yorigin - y) & 0x3ff;
scry = (vd->fbi.yorigin - y);
} else {
// Direct lfb access
buffer = (uint16_t *)(vd->fbi.ram + vd->fbi.lfb_base*4);
@ -5884,7 +5885,7 @@ void voodoo_device::raster_fastfill(void *destbase, int32_t y, const poly_extent
/* determine the screen Y */
scry = y;
if (FBZMODE_Y_ORIGIN(vd->reg[fbzMode].u))
scry = (vd->fbi.yorigin - y) & 0x3ff;
scry = (vd->fbi.yorigin - y);
/* fill this RGB row */
if (FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u))