-Unset pixels when necessary.
-Fixed the loading of a card's rows. -Corrected the maskings. The top tiles look perfect now, but the text isn't showing up yet.
This commit is contained in:
parent
06022c9076
commit
641ef2bcff
|
@ -189,17 +189,17 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
||||||
// Parse data from the card.
|
// Parse data from the card.
|
||||||
bool gram = ((card & 0x0800) != 0);
|
bool gram = ((card & 0x0800) != 0);
|
||||||
int card_num = card >> 3;
|
int card_num = card >> 3;
|
||||||
int fg = card & 0x0004;
|
int fg = card & 0x0007;
|
||||||
if (Fgbg)
|
if (Fgbg)
|
||||||
{
|
{
|
||||||
int bg = ((card >> 9) & 0x0008) |
|
int bg = ((card >> 9) & 0x0008) |
|
||||||
((card >> 11) & 0x0004) |
|
((card >> 11) & 0x0004) |
|
||||||
((card >> 9) & 0x0002);
|
((card >> 9) & 0x0003);
|
||||||
/*
|
/*
|
||||||
Only 64 of the GROM's cards can be used in FGBG
|
Only 64 of the GROM's cards can be used in FGBG
|
||||||
Mode.
|
Mode.
|
||||||
*/
|
*/
|
||||||
card_num &= 0x0020;
|
card_num &= 0x003F;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -207,7 +207,7 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
||||||
if (gram)
|
if (gram)
|
||||||
{
|
{
|
||||||
// GRAM only has 64 cards.
|
// GRAM only has 64 cards.
|
||||||
card_num &= 0x0020;
|
card_num &= 0x003F;
|
||||||
fg |= (card >> 9) & 0x0008;
|
fg |= (card >> 9) & 0x0008;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -215,7 +215,7 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
||||||
All of the GROM's 256 cards can be used in Color
|
All of the GROM's 256 cards can be used in Color
|
||||||
Stack Mode.
|
Stack Mode.
|
||||||
*/
|
*/
|
||||||
card_num &= 0x0080;
|
card_num &= 0x00FF;
|
||||||
}
|
}
|
||||||
// Each picture is 8x8 pixels.
|
// Each picture is 8x8 pixels.
|
||||||
for (int pict_row = 0; pict_row < 8; pict_row++)
|
for (int pict_row = 0; pict_row < 8; pict_row++)
|
||||||
|
@ -224,7 +224,7 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
||||||
Each picture is stored sequentially in the GROM / GRAM,
|
Each picture is stored sequentially in the GROM / GRAM,
|
||||||
and so are their rows.
|
and so are their rows.
|
||||||
*/
|
*/
|
||||||
int row_mem = (card_num * 8) + (pict_row * 8);
|
int row_mem = (card_num * 8) + pict_row;
|
||||||
byte row;
|
byte row;
|
||||||
if (gram)
|
if (gram)
|
||||||
row = (byte)ReadMemory((ushort)(0x3800 +
|
row = (byte)ReadMemory((ushort)(0x3800 +
|
||||||
|
@ -237,15 +237,17 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
||||||
// The rightmost column does not get displayed.
|
// The rightmost column does not get displayed.
|
||||||
if (card_col == 19 && pict_col == 0)
|
if (card_col == 19 && pict_col == 0)
|
||||||
continue;
|
continue;
|
||||||
|
int pixel = (card_row * 159 * 8) + (card_col * 8) +
|
||||||
|
(pict_row * 159) + (7 - pict_col);
|
||||||
// If the pixel is on, give it the FG color.
|
// If the pixel is on, give it the FG color.
|
||||||
if ((row & 0x1) != 0)
|
if ((row & 0x1) != 0)
|
||||||
/*
|
/*
|
||||||
The pixels go right as the bits get less
|
The pixels go right as the bits get less
|
||||||
significant.
|
significant.
|
||||||
*/
|
*/
|
||||||
FrameBuffer[((card_row * 159 * 8) + (card_col * 8) +
|
FrameBuffer[pixel] = ColorToRGBA(fg);
|
||||||
(pict_row * 159) + (7 - pict_col))] =
|
else
|
||||||
ColorToRGBA(fg);
|
FrameBuffer[pixel] = 0x000000;
|
||||||
row >>= 1;
|
row >>= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue