Previous 15994 Revisions Next

r5566 Thursday 3rd September, 2009 at 17:38:24 UTC by Angelo Salese
[X1]: Properly implemented the alternative PCG upload
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r5565r5566
567567 *
568568 *************************************/
569569
570/* TODO: apparently this is for the alternative PCG mode */
571#if 0
572570static UINT16 check_pcg_addr(running_machine *machine)
573571{
574572   if(colorram[0x7ff] & 0x20) return 0x7ff;
r5565r5566
578576
579577   return 0x3ff;
580578}
581#endif
582579
583580static READ8_HANDLER( x1_pcg_r )
584581{
r5565r5566
628625   }
629626   else
630627   {
631//      if(!ply_reg.pcg_mode)
632//      {
633//
634//      }
635//      else
628      if(scrn_reg.pcg_mode)
636629      {
630         used_pcg_addr = videoram[check_pcg_addr(space->machine)]*8;
631         pcg_index[addr-1] = (offset & 0xe) >> 1;
632         pcg_offset = (pcg_index[addr-1]+used_pcg_addr) & 0x7ff;
633         pcg_offset+=((addr-1)*0x800);
634         PCG_RAM[pcg_offset] = data;
635
636         pcg_offset &= 0x7ff;
637
638          gfx_element_mark_dirty(space->machine->gfx[4], pcg_offset >> 3);
639          gfx_element_mark_dirty(space->machine->gfx[5], pcg_offset >> 3);
640          gfx_element_mark_dirty(space->machine->gfx[6], pcg_offset >> 3);
641          gfx_element_mark_dirty(space->machine->gfx[7], pcg_offset >> 3);
642
643      }
644      else
645      {
637646         used_pcg_addr = pcg_write_addr*8;
638647         pcg_offset = (pcg_index[addr-1]+used_pcg_addr) & 0x7ff;
639648         pcg_offset+=((addr-1)*0x800);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team