mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
voodoo: Fixed subtle casting bug. The uncasted depth in the expanded variable calculation was causing a possible sign extension into the top 32 bits of expanded. Allows obsidian manufacturing test in calspeed to pass. (nw)
This commit is contained in:
parent
d3cd2c35ae
commit
e9bfbc7a26
@ -5906,16 +5906,16 @@ void voodoo_device::raster_fastfill(void *destbase, int32_t y, const poly_extent
|
||||
/* fill this dest buffer row */
|
||||
if (FBZMODE_AUX_BUFFER_MASK(vd->reg[fbzMode].u) && vd->fbi.auxoffs != ~0)
|
||||
{
|
||||
uint16_t depth = vd->reg[zaColor].u;
|
||||
uint64_t expanded = ((uint64_t)depth << 48) | ((uint64_t)depth << 32) | (depth << 16) | depth;
|
||||
uint32_t depth = vd->reg[zaColor].u;
|
||||
uint64_t expanded = ((uint64_t)depth << 32) | (uint64_t)depth;
|
||||
uint16_t *dest = (uint16_t *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels;
|
||||
|
||||
for (x = startx; x < stopx && (x & 3) != 0; x++)
|
||||
dest[x] = depth;
|
||||
dest[x] = (uint16_t) depth;
|
||||
for ( ; x < (stopx & ~3); x += 4)
|
||||
*(uint64_t *)&dest[x] = expanded;
|
||||
for ( ; x < stopx; x++)
|
||||
dest[x] = depth;
|
||||
dest[x] = (uint16_t) depth;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1317,6 +1317,9 @@ static INPUT_PORTS_START( calspeed )
|
||||
PORT_INCLUDE(seattle_common)
|
||||
|
||||
PORT_MODIFY("DIPS")
|
||||
PORT_DIPNAME( 0x0010, 0x0010, "Obsidian Manufacturing Test" ) // Needs boot rom test on to run.
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ))
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ))
|
||||
PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
Loading…
Reference in New Issue
Block a user