mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
(MESS) fanucspg: Better colors from new reference. [Guru, R. Belmont]
nw: If you're bored and can read segmented 16-bit x86 decently, I could use some help figuring out what's happening when it (I think) attempts to boot off the '765 and bring all those other chips into play. (Change test_r to return 0x80 to observe).
This commit is contained in:
parent
17e802b9b8
commit
4a931fa955
@ -716,6 +716,11 @@ static MC6845_UPDATE_ROW( fanuc_update_row )
|
||||
UINT32 *p = &bitmap.pix32(y);
|
||||
int i;
|
||||
UINT8 *chargen = state->m_chargen->base();
|
||||
static const UINT32 palette[8] =
|
||||
{
|
||||
// black red green yellow blue purple light blue white
|
||||
0x000000, 0xff0000, 0x00ff00, 0xffff00, 0x0000ff, 0xff00ff, 0x99ffff, 0xffffff
|
||||
};
|
||||
|
||||
for ( i = 0; i < x_count; i++ )
|
||||
{
|
||||
@ -724,20 +729,13 @@ static MC6845_UPDATE_ROW( fanuc_update_row )
|
||||
if (state->m_video_ctrl & 0x02)
|
||||
{
|
||||
if (offset <= 0x5ff)
|
||||
{
|
||||
{
|
||||
UINT8 chr = state->m_vram[offset + 0x600];
|
||||
UINT8 attr = state->m_vram[offset];
|
||||
UINT8 data = chargen[ chr + (ra * 256) ];
|
||||
UINT32 fg = 0xffffff;
|
||||
UINT32 fg = palette[((attr>>5) & 7)];
|
||||
UINT32 bg = 0;
|
||||
|
||||
// colors are black, red, green, yellow, blue, purple, light blue, and white
|
||||
// attr & 0x70 = 0x60 is green, need more software running to know the others
|
||||
if (((attr>>4) & 7) == 6)
|
||||
{
|
||||
fg = 0x008800;
|
||||
}
|
||||
|
||||
*p++ = ( data & 0x01 ) ? fg : bg;
|
||||
*p++ = ( data & 0x02 ) ? fg : bg;
|
||||
*p++ = ( data & 0x04 ) ? fg : bg;
|
||||
|
Loading…
Reference in New Issue
Block a user