Previous 15994 Revisions Next

r941 Sunday 9th September, 2007 at 14:12:35 UTC by Wilbert Pol
Only changed indentation from spaces to tabs.
[src/mess/video]vdc.c

src/mess/video/vdc.c
r940r941
6969      } else {
7070         draw_overscan_line( vdc.current_bitmap_line );
7171      }
72    } else {
72   } else {
7373      /* We are in one of the blanking areas */
7474      draw_black_line( vdc.current_bitmap_line );
7575   }
r940r941
155155   if(vdc.curline == 261 && ! vdc.vblank_triggered ) {
156156
157157      vdc.vblank_triggered = 1;
158        if(vdc.vdc_data[CR].w & CR_VR) {   /* generate IRQ1 if enabled */
158      if(vdc.vdc_data[CR].w & CR_VR) {   /* generate IRQ1 if enabled */
159159         vdc.status |= VDC_VD;   /* set vblank flag */
160160         ret = 1;
161161      }
r940r941
203203
204204VIDEO_UPDATE( pce )
205205{
206    /* copy our rendering buffer to the display */
207    copybitmap (bitmap,vdc.bmp,0,0,0,0,cliprect,TRANSPARENCY_NONE,0);
206   /* copy our rendering buffer to the display */
207   copybitmap (bitmap,vdc.bmp,0,0,0,0,cliprect,TRANSPARENCY_NONE,0);
208208   return 0;
209209}
210210
r940r941
212212{
213213   int i;
214214
215    /* our line buffer */
216    UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, line, 0 );
215   /* our line buffer */
216   UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, line, 0 );
217217   
218218   for( i=0; i< VDC_WPF; i++ )
219219      line_buffer[i] = get_black_pen( Machine );
r940r941
226226   /* Are we in greyscale mode or in color mode? */
227227   int color_base = vdc.vce_control & 0x80 ? 512 : 0;
228228
229    /* our line buffer */
230    UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, line, 0 );
229   /* our line buffer */
230   UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, line, 0 );
231231   
232232   for ( i = 0; i < VDC_WPF; i++ )
233233      line_buffer[i] = Machine->pens[color_base + vdc.vce_data[0x100].w];
r940r941
439439         /* bump internal address */
440440         vdc.vce_address.w = (vdc.vce_address.w + 1) & 0x01FF;
441441         break;
442    }
442   }
443443}
444444
445445
r940r941
559559
560560static void conv_obj(int i, int l, int hf, int vf, char *buf)
561561{
562    int b0, b1, b2, b3, i0, i1, i2, i3, x;
563    int xi;
562   int b0, b1, b2, b3, i0, i1, i2, i3, x;
563   int xi;
564564   int tmp;
565565
566   l &= 0x0F;
567   if(vf) l = (15 - l);
566568
567    l &= 0x0F;
568    if(vf) l = (15 - l);
569
570569   tmp = l + ( i << 5);
571570
572    b0 = vram_read((tmp + 0x00)<<1);
573    b0 |= vram_read(((tmp + 0x00)<<1)+1)<<8;
571   b0 = vram_read((tmp + 0x00)<<1);
572   b0 |= vram_read(((tmp + 0x00)<<1)+1)<<8;
574573   b1 = vram_read((tmp + 0x10)<<1);
575574   b1 |= vram_read(((tmp + 0x10)<<1)+1)<<8;
576    b2 = vram_read((tmp + 0x20)<<1);
577    b2 |= vram_read(((tmp + 0x20)<<1)+1)<<8;
575   b2 = vram_read((tmp + 0x20)<<1);
576   b2 |= vram_read(((tmp + 0x20)<<1)+1)<<8;
578577   b3 = vram_read((tmp + 0x30)<<1);
579578   b3 |= vram_read(((tmp + 0x30)<<1)+1)<<8;
580579
581    for(x=0;x<16;x++)
582    {
583        if(hf) xi = x; else xi = (15 - x);
584        i0 = (b0 >> xi) & 1;
585        i1 = (b1 >> xi) & 1;
586        i2 = (b2 >> xi) & 1;
587        i3 = (b3 >> xi) & 1;
588        buf[x] = (i3 << 3 | i2 << 2 | i1 << 1 | i0);
589    }
580   for(x=0;x<16;x++)
581   {
582      if(hf) xi = x; else xi = (15 - x);
583      i0 = (b0 >> xi) & 1;
584      i1 = (b1 >> xi) & 1;
585      i2 = (b2 >> xi) & 1;
586      i3 = (b3 >> xi) & 1;
587      buf[x] = (i3 << 3 | i2 << 2 | i1 << 1 | i0);
588   }
590589}
591590
592591void pce_refresh_sprites(int bitmap_line, int line, UINT8 *drawn)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team