Previous 15994 Revisions Next

r1929 Tuesday 11th March, 2008 at 21:08:42 UTC by Wilbert Pol
Removed deprecat.h dependency from video/spectrum.c
[src/mess/video]spectrum.c

src/mess/video/spectrum.c
r1928r1929
1414***************************************************************************/
1515
1616#include "driver.h"
17#include "deprecat.h"
1817#include "includes/spectrum.h"
1918#include "eventlst.h"
2019#include "video/border.h"
r1928r1929
342341 *******************************************************************/
343342
344343/* Draw a scanline in TS2068/TC2048 hires mode (code modified from COUPE.C) */
345static void ts2068_hires_scanline(bitmap_t *bitmap, int y, int borderlines)
344static void ts2068_hires_scanline(running_machine *machine, bitmap_t *bitmap, int y, int borderlines)
346345{
347346   int x,b,scrx,scry;
348347   unsigned short ink,pap;
r1928r1929
372371      {
373372                        if (*scr&b)
374373         {
375                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[ink]);
376                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[ink]);
374                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[ink]);
375                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[ink]);
377376         }
378377         else
379378         {
380                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[pap]);
381                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[pap]);
379                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[pap]);
380                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[pap]);
382381         }
383382      }
384383                scr++;
r1928r1929
387386}
388387
389388/* Draw a scanline in TS2068/TC2048 64-column mode */
390static void ts2068_64col_scanline(bitmap_t *bitmap, int y, int borderlines, unsigned short inkcolor)
389static void ts2068_64col_scanline(running_machine *machine, bitmap_t *bitmap, int y, int borderlines, unsigned short inkcolor)
391390{
392391   int x,b,scrx,scry;
393392        unsigned char *scr1, *scr2;
r1928r1929
403402      for (b=0x80;b!=0;b>>=1)
404403      {
405404                        if (*scr1&b)
406                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[inkcolor]);
405                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[inkcolor]);
407406         else
408                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[7-inkcolor]);
407                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[7-inkcolor]);
409408      }
410409                scr1++;
411410
412411      for (b=0x80;b!=0;b>>=1)
413412      {
414413                        if (*scr2&b)
415                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[inkcolor]);
414                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[inkcolor]);
416415         else
417                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[7-inkcolor]);
416                                spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[7-inkcolor]);
418417      }
419418                scr2++;
420419   }
421420}
422421
423422/* Draw a scanline in TS2068/TC2048 lores (normal Spectrum) mode */
424static void ts2068_lores_scanline(bitmap_t *bitmap, int y, int borderlines, int screen)
423static void ts2068_lores_scanline(running_machine *machine, bitmap_t *bitmap, int y, int borderlines, int screen)
425424{
426425   int x,b,scrx,scry;
427426   unsigned short ink,pap;
r1928r1929
451450      {
452451         if (*scr&b)
453452         {
454            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[ink]);
455            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[ink]);
453            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[ink]);
454            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[ink]);
456455         }
457456         else
458457         {
459            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[pap]);
460            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,Machine->pens[pap]);
458            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[pap]);
459            spectrum_plot_pixel(bitmap,scrx++,scry+borderlines,machine->pens[pap]);
461460         }
462461      }
463462      scr++;
r1928r1929
476475                /* 64 Column mode */
477476                unsigned short inkcolor = (ts2068_port_ff_data & 0x38) >> 3;
478477                for (count = 0; count < 192; count++)
479                        ts2068_64col_scanline(bitmap, count, TS2068_TOP_BORDER, inkcolor);
478                        ts2068_64col_scanline(machine, bitmap, count, TS2068_TOP_BORDER, inkcolor);
480479   }
481480        else if ((ts2068_port_ff_data & 7) == 2)
482481        {
483482                /* Extended Color mode */
484483                for (count = 0; count < 192; count++)
485                        ts2068_hires_scanline(bitmap, count, TS2068_TOP_BORDER);
484                        ts2068_hires_scanline(machine, bitmap, count, TS2068_TOP_BORDER);
486485        }
487486        else if ((ts2068_port_ff_data & 7) == 1)
488487        {
489488                /* Screen 6000-7aff */
490489                for (count = 0; count < 192; count++)
491                        ts2068_lores_scanline(bitmap, count, TS2068_TOP_BORDER, 1);
490                        ts2068_lores_scanline(machine, bitmap, count, TS2068_TOP_BORDER, 1);
492491        }
493492        else
494493        {
495494                /* Screen 4000-5aff */
496495                for (count = 0; count < 192; count++)
497                        ts2068_lores_scanline(bitmap, count, TS2068_TOP_BORDER, 0);
496                        ts2068_lores_scanline(machine, bitmap, count, TS2068_TOP_BORDER, 0);
498497        }
499498
500499        draw_border(bitmap, full_refresh,
r1928r1929
516515      /* 64 Column mode */
517516      unsigned short inkcolor = (ts2068_port_ff_data & 0x38) >> 3;
518517      for (count = 0; count < 192; count++)
519         ts2068_64col_scanline(bitmap, count, SPEC_TOP_BORDER, inkcolor);
518         ts2068_64col_scanline(machine, bitmap, count, SPEC_TOP_BORDER, inkcolor);
520519   }
521520   else if ((ts2068_port_ff_data & 7) == 2)
522521   {
523522      /* Extended Color mode */
524523      for (count = 0; count < 192; count++)
525         ts2068_hires_scanline(bitmap, count, SPEC_TOP_BORDER);
524         ts2068_hires_scanline(machine, bitmap, count, SPEC_TOP_BORDER);
526525   }
527526   else if ((ts2068_port_ff_data & 7) == 1)
528527   {
529528      /* Screen 6000-7aff */
530529      for (count = 0; count < 192; count++)
531         ts2068_lores_scanline(bitmap, count, SPEC_TOP_BORDER, 1);
530         ts2068_lores_scanline(machine, bitmap, count, SPEC_TOP_BORDER, 1);
532531   }
533532   else
534533   {
535534      /* Screen 4000-5aff */
536535      for (count = 0; count < 192; count++)
537         ts2068_lores_scanline(bitmap, count, SPEC_TOP_BORDER, 0);
536         ts2068_lores_scanline(machine, bitmap, count, SPEC_TOP_BORDER, 0);
538537   }
539538
540539   draw_border(bitmap, full_refresh,

Previous 15994 Revisions Next


© 1998-2018 The MESS Team