Previous 15994 Revisions Next

r10084 Tuesday 18th January, 2011 at 03:03:17 UTC by Angelo Salese
[PC-8801]: Added analog color mode
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r10083r10084
1717   - CRTC really looks like to be a MCU;
1818   - needs to support V1 / V2 properly;
1919   - Add limits for extend work RAM;
20   - What happens to the palette contents when the analog/digital palette mode changes?
2021
2122   per-game specific TODO:
2223   - 100 Yen disk(s): reads kanji ports;
r10083r10084
2627   - American Success: reads the light pen?
2728   - Alphos: test case for text VRAM attributes;
2829   - Alphos: text VRAM garbage during gameplay;
29   - Alphos: background is supposed to be blue?
3030   - Balance of Power: attempt to use the SIO port for mouse polling, worked around for now;
31   - Battle Entry: moans with a kanji msg then dies if you try to press either numpad 1 or 2 (what it basically asks by looking at the DASM)
32   - Bersekers Front Gaiden 3: checks CPU speed port and polls the PCG stuff too;
33   - Bishoujo Baseball Gakuen: checks ym2608 after intro screen;
3134   - Bokosuka Wars: doesn't boot, floppy issue;
3235   - Grobda: palette is ugly;
36   - Wanderers from Ys: floppy / irq issues?
3337   - Xevious: game is too fast
3438
3539   Notes:
r10083r10084
139143static UINT8 dmac_mode;
140144static UINT8 alu_ctrl1,alu_ctrl2;
141145static UINT8 extram_mode,extram_bank;
146static int vblank_pos;
142147
143148static void pc8801_update_irq(running_machine *machine)
144149{
r10083r10084
663668   ---- ---x (pbsy?)
664669   */
665670
666   vrtc = (space->machine->primary_screen->vpos() < 200) ? 0 : 1; // vblank
671   vrtc = (space->machine->primary_screen->vpos() < vblank_pos) ? 0 : 1; // vblank
667672
668673   return (vrtc << 5) | 0xc0;
669674}
r10083r10084
720725   if((gfx_ctrl & 0x8) == 0)
721726      visarea.max_y = 200 - 1;
722727
728   /* low screen res if graphic screen is color */
729   if(gfx_ctrl & 0x10)
730      visarea.max_y = 200 - 1;
731
732   vblank_pos = visarea.max_y + 1;
733
723734   machine->primary_screen->configure(640, 480, visarea, machine->primary_screen->frame_period().attoseconds);
724735}
725736
r10083r10084
815826
816827static WRITE8_HANDLER( pc8801_palram_w )
817828{
818   /* TODO: analog hook-up */
829   static UINT8 b[8],r[8],g[8];
819830
820   if(offset)
821      palette_set_color_rgb(space->machine, offset, pal1bit(data >> 1), pal1bit(data >> 2), pal1bit(data >> 0));
831   if(misc_ctrl & 0x20) //analog palette
832   {
833      if((data & 0x40) == 0)
834      {
835         b[offset] = data & 0x7;
836         r[offset] = (data & 0x38) >> 3;
837      }
838      else
839         g[offset] = data & 0x7;
840
841   }
842   else //digital palette
843   {
844      b[offset] = data & 1 ? 7 : 0;
845      r[offset] = data & 2 ? 7 : 0;
846      g[offset] = data & 4 ? 7 : 0;
847   }
848
849   palette_set_color_rgb(space->machine, offset, pal3bit(r[offset]), pal3bit(g[offset]), pal3bit(b[offset]));
822850}
823851
824852static WRITE8_HANDLER( pc8801_layer_masking_w )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team