Previous 15994 Revisions Next

r9015 Thursday 2nd September, 2010 at 10:24:32 UTC by Angelo Salese
[PASOPIA7]: Improved bitmap layer
[src/mess/drivers]pasopia.c

src/mess/drivers/pasopia.c
r9014r9015
2525static UINT8 cursor_blink,cursor_raster;
2626static UINT8 plane_reg,attr_data,attr_wrap,attr_latch,pal_sel,x_width;
2727
28#define VDP_CLOCK XTAL_3_579545MHz/4
29
2830static VIDEO_START( paso7 )
2931{
3032   p7_pal = auto_alloc_array(machine, UINT8, 0x10);
r9014r9015
117119static VIDEO_UPDATE( paso7 )
118120{
119121   static UINT8 *vram = memory_region(screen->machine, "vram");
120   int x,y,xi;
122   int x,y,xi,yi;
121123   int count;
122124   int width;
123125
r9014r9015
127129
128130   width = x_width ? 80 : 40;
129131
130   count = 0x0000;
131
132   for(y=0;y<200;y++)
132   for(yi=0;yi<8;yi++)
133133   {
134      for(x=0;x<8*width;x+=8)
134      count = yi;
135      for(y=0;y<200;y+=8)
135136      {
136         for(xi=0;xi<8;xi++)
137         for(x=0;x<8*width;x+=8)
137138         {
138            int pen_b,pen_r,pen_g,color;
139            for(xi=0;xi<8;xi++)
140            {
141               int pen_b,pen_r,pen_g,color;
139142
140            pen_b = (vram[count+0x0000]>>(7-xi)) & 1;
141            pen_r = (vram[count+0x4000]>>(7-xi)) & 1;
142            pen_g = 0;//(p7_vram[count+0x8000]>>(7-xi)) & 1;
143               pen_b = (vram[count+0x0000]>>(7-xi)) & 1;
144               pen_r = (vram[count+0x4000]>>(7-xi)) & 1;
145               pen_g = 0;//(p7_vram[count+0x8000]>>(7-xi)) & 1;
143146
144            color =  pen_g<<2 | pen_r<<1 | pen_b<<0;
147               color =  pen_g<<2 | pen_r<<1 | pen_b<<0;
145148
146            *BITMAP_ADDR16(bitmap, y, x+xi) = screen->machine->pens[color+0x20];
149               *BITMAP_ADDR16(bitmap, y+yi, x+xi) = screen->machine->pens[color+0x20];
150            }
151            count+=8;
147152         }
148         count++;
149153      }
150154   }
151155
r9014r9015
382386         cursor_addr = (cursor_addr & 0x3f00) | (data & 0xff);
383387
384388      mc6845_register_w(space->machine->device("crtc"), 0,data);
389
390      /* double pump the pixel clock if we are in 640 x 200 mode */
391      mc6845_set_clock(space->machine->device("crtc"), (x_width) ? VDP_CLOCK*2 : VDP_CLOCK);
385392   }
386393}
387394
r9014r9015
719726    MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
720727    MDRV_SCREEN_SIZE(640, 480)
721728    MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1)
722   MDRV_MC6845_ADD("crtc", H46505, XTAL_3_579545MHz/4, mc6845_intf)   /* unknown clock, hand tuned to get ~60 fps */
729   MDRV_MC6845_ADD("crtc", H46505, VDP_CLOCK, mc6845_intf)   /* unknown clock, hand tuned to get ~60 fps */
723730    MDRV_PALETTE_LENGTH(0x28)
724731    MDRV_PALETTE_INIT(pasopia7)
725732

Previous 15994 Revisions Next


© 1998-2018 The MESS Team