commodore64: double-wide multicolor sprites are actually 4x wide
This commit is contained in:
parent
b28ab42e18
commit
ae721eef5d
|
@ -825,7 +825,6 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
||||||
{
|
{
|
||||||
regs.MSRC[spriteIndex] = 24;
|
regs.MSRC[spriteIndex] = 24;
|
||||||
regs.MSR[spriteIndex] = mem.VicRead((ushort)((regs.MPTR[spriteIndex] << 6) | (regs.MC[spriteIndex])));
|
regs.MSR[spriteIndex] = mem.VicRead((ushort)((regs.MPTR[spriteIndex] << 6) | (regs.MC[spriteIndex])));
|
||||||
regs.MSR[spriteIndex] <<= 8;
|
|
||||||
regs.MC[spriteIndex]++;
|
regs.MC[spriteIndex]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -837,8 +836,8 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
regs.MSR[spriteIndex] |= mem.VicRead((ushort)((regs.MPTR[spriteIndex] << 6) | (regs.MC[spriteIndex])));
|
|
||||||
regs.MSR[spriteIndex] <<= 8;
|
regs.MSR[spriteIndex] <<= 8;
|
||||||
|
regs.MSR[spriteIndex] |= mem.VicRead((ushort)((regs.MPTR[spriteIndex] << 6) | (regs.MC[spriteIndex])));
|
||||||
regs.MC[spriteIndex]++;
|
regs.MC[spriteIndex]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1092,28 +1091,30 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
||||||
if (regs.MxX[j] == rasterOffsetX)
|
if (regs.MxX[j] == rasterOffsetX)
|
||||||
{
|
{
|
||||||
regs.MSRA[j] = true;
|
regs.MSRA[j] = true;
|
||||||
regs.MSRC[j] = 25;
|
|
||||||
}
|
}
|
||||||
if (regs.MSRA[j])
|
if (regs.MSRA[j])
|
||||||
{
|
{
|
||||||
// multicolor consumes two bits per pixel and is forced wide
|
// multicolor consumes two bits per pixel and is forced wide
|
||||||
if (regs.MxMC[j])
|
if (regs.MxMC[j])
|
||||||
{
|
{
|
||||||
spriteBits = (int)((regs.MSR[j] >> 30) & 0x3);
|
spriteBits = (int)((regs.MSR[j] >> 22) & 0x3);
|
||||||
if ((rasterOffsetX & 0x1) != (regs.MxX[j] & 0x1))
|
if ((rasterOffsetX & 0x1) != (regs.MxX[j] & 0x1))
|
||||||
{
|
{
|
||||||
regs.MSR[j] <<= 2;
|
if ((!regs.MxXE[j]) || ((rasterOffsetX & 0x2) != (regs.MxX[j] & 0x2)))
|
||||||
regs.MSRC[j]--;
|
{
|
||||||
|
regs.MSR[j] <<= 2;
|
||||||
|
regs.MSRC[j]--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spriteBits = (int)((regs.MSR[j] >> 30) & 0x2);
|
spriteBits = (int)((regs.MSR[j] >> 22) & 0x2);
|
||||||
if ((!regs.MxXE[j]) || ((rasterOffsetX & 0x1) != (regs.MxX[j] & 0x1)))
|
if ((!regs.MxXE[j]) || ((rasterOffsetX & 0x1) != (regs.MxX[j] & 0x1)))
|
||||||
{
|
{
|
||||||
regs.MSR[j] <<= 1;
|
regs.MSR[j] <<= 1;
|
||||||
regs.MSRC[j]--;
|
|
||||||
}
|
}
|
||||||
|
regs.MSRC[j]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if not transparent, process collisions and color
|
// if not transparent, process collisions and color
|
||||||
|
|
Loading…
Reference in New Issue