Previous 15994 Revisions Next

r10479 Thursday 17th February, 2011 at 16:53:25 UTC by Angelo Salese
[PC-9801]: pal_entry is a local variable helper, doesn't need to be promoted into state machine
[src/mess/drivers]pc9801.c

src/mess/drivers/pc9801.c
r10478r10479
4848   UINT8 keyb_press;
4949
5050   UINT8 fdc_2dd_ctrl;
51   UINT8 pal_entry;
5251};
5352
5453
r10478r10479
502501         case 0x0c:
503502         case 0x0e:
504503         {
504            static UINT8 pal_entry;
505
505506            state->pal_clut[(offset & 0x6) >> 1] = data;
506507
507508            /* can't be more twisted I presume ... :-/ */
508            state->pal_entry = (((offset & 4) >> 1) | ((offset & 2) << 1)) >> 1;
509            state->pal_entry ^= 3;
509            pal_entry = (((offset & 4) >> 1) | ((offset & 2) << 1)) >> 1;
510            pal_entry ^= 3;
510511
511            palette_set_color_rgb(space->machine, (state->pal_entry)|4|8, pal1bit((data & 0x2) >> 1), pal1bit((data & 4) >> 2), pal1bit((data & 1) >> 0));
512            palette_set_color_rgb(space->machine, (state->pal_entry)|8, pal1bit((data & 0x20) >> 5), pal1bit((data & 0x40) >> 6), pal1bit((data & 0x10) >> 4));
512            palette_set_color_rgb(space->machine, (pal_entry)|4|8, pal1bit((data & 0x2) >> 1), pal1bit((data & 4) >> 2), pal1bit((data & 1) >> 0));
513            palette_set_color_rgb(space->machine, (pal_entry)|8, pal1bit((data & 0x20) >> 5), pal1bit((data & 0x40) >> 6), pal1bit((data & 0x10) >> 4));
513514            return;
514515         }
515516         default:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team