Previous 15994 Revisions Next

r8879 Tuesday 24th August, 2010 at 08:45:17 UTC by Barry Rodewald
[X680x0] Fixed 1024x1024 graphic layer rendering, added basic interlaced mode support.
[src/mess/includes]x68k.h
[src/mess/video]x68k.c

src/mess/video/x68k.c
r8878r8879
128128   x68k_sys.crtc.vmultiple = 1;
129129   if((x68k_sys.crtc.reg[20] & 0x10) != 0 && (x68k_sys.crtc.reg[20] & 0x0c) == 0)
130130      x68k_sys.crtc.vmultiple = 2;  // 31.5kHz + 256 lines = doublescan
131   if(x68k_sys.crtc.interlace != 0)
132      x68k_sys.crtc.vmultiple = 0.5f;  // 31.5kHz + 1024 lines or 15kHz + 512 lines = interlaced
131133   x68k_sys.crtc.htotal = (x68k_sys.crtc.reg[0] + 1) * 8;
132134   x68k_sys.crtc.vtotal = (x68k_sys.crtc.reg[4] + 1) / x68k_sys.crtc.vmultiple; // default is 567 (568 scanlines)
133135   x68k_sys.crtc.hbegin = (x68k_sys.crtc.reg[2] * 8) + 1;
r8878r8879
430432            break;
431433         }
432434      }
433      if(ACCESSING_BITS_8_15)
435/*      if(ACCESSING_BITS_8_15)
434436      {
435437         x68k_sys.crtc.interlace = 0;
436438         if(data & 0x0400)
437439            x68k_sys.crtc.interlace = 1;
438      }
440      }*/
439441      x68k_crtc_refresh_mode(space->machine);
440442      break;
441443   case 576:  // operation register
r8878r8879
821823            loc &= 0xfffff;
822824            for(pixel=x68k_sys.crtc.hbegin;pixel<=x68k_sys.crtc.hend;pixel++)
823825            {
824               colour = x68k_gvram[loc];
826               switch(loc & 0xc0000)
827               {
828               case 0x00000:
829                  colour = x68k_gvram[loc & 0x3ffff] & 0x000f;
830                  break;
831               case 0x40000:
832                  colour = (x68k_gvram[loc & 0x3ffff] & 0x00f0) >> 4;
833                  break;
834               case 0x80000:
835                  colour = (x68k_gvram[loc & 0x3ffff] & 0x0f00) >> 8;
836                  break;
837               case 0xc0000:
838                  colour = (x68k_gvram[loc & 0x3ffff] & 0xf000) >> 12;
839                  break;
840               }
825841               if(colour != 0)
826842                  *BITMAP_ADDR16(bitmap,scanline,pixel) = 512 + (x68k_sys.video.gfx_pal[colour] >> 1);
827843               loc++;
828               loc &= 0x3ffff;
844               loc &= 0xfffff;
829845            }
830846         }
831847      }
src/mess/includes/x68k.h
r8878r8879
128128      int hsync_end;  // Horizontal Sync End
129129      int vsync_end;  // Vertical Sync End
130130      int hsyncadjust;  // Horizontal Sync Adjustment
131      int hmultiple;  // Horizontal pixel multiplier
132      int vmultiple;  // Vertical scanline multiplier (x2 for doublescan modes)
131      float hmultiple;  // Horizontal pixel multiplier
132      float vmultiple;  // Vertical scanline multiplier (x2 for doublescan modes)
133133      int height;
134134      int width;
135135      int visible_height;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team