Previous 15994 Revisions Next

r2017 Tuesday 18th March, 2008 at 22:55:38 UTC by Firewave
Removed some unnecessary machine->pens lookups
[src/mess/drivers]apexc.c gmaster.c svision.c tm990189.c
[src/mess/machine]gamepock.c

src/mess/machine/gamepock.c
r2016r2017
129129   ad = hd44102ch[0].start_page;
130130   for ( i = 0; i < 4; i++ ) {
131131      for ( j = 0; j < 50; j++ ) {
132         *BITMAP_ADDR16(bitmap, i * 8 + 0, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x01 ) ? screen->machine->pens[0] : screen->machine->pens[1];
133         *BITMAP_ADDR16(bitmap, i * 8 + 1, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x02 ) ? screen->machine->pens[0] : screen->machine->pens[1];
134         *BITMAP_ADDR16(bitmap, i * 8 + 2, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x04 ) ? screen->machine->pens[0] : screen->machine->pens[1];
135         *BITMAP_ADDR16(bitmap, i * 8 + 3, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x08 ) ? screen->machine->pens[0] : screen->machine->pens[1];
136         *BITMAP_ADDR16(bitmap, i * 8 + 4, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x10 ) ? screen->machine->pens[0] : screen->machine->pens[1];
137         *BITMAP_ADDR16(bitmap, i * 8 + 5, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x20 ) ? screen->machine->pens[0] : screen->machine->pens[1];
138         *BITMAP_ADDR16(bitmap, i * 8 + 6, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x40 ) ? screen->machine->pens[0] : screen->machine->pens[1];
139         *BITMAP_ADDR16(bitmap, i * 8 + 7, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x80 ) ? screen->machine->pens[0] : screen->machine->pens[1];
132         *BITMAP_ADDR16(bitmap, i * 8 + 0, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x01 ) ? 0 : 1;
133         *BITMAP_ADDR16(bitmap, i * 8 + 1, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x02 ) ? 0 : 1;
134         *BITMAP_ADDR16(bitmap, i * 8 + 2, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x04 ) ? 0 : 1;
135         *BITMAP_ADDR16(bitmap, i * 8 + 3, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x08 ) ? 0 : 1;
136         *BITMAP_ADDR16(bitmap, i * 8 + 4, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x10 ) ? 0 : 1;
137         *BITMAP_ADDR16(bitmap, i * 8 + 5, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x20 ) ? 0 : 1;
138         *BITMAP_ADDR16(bitmap, i * 8 + 6, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x40 ) ? 0 : 1;
139         *BITMAP_ADDR16(bitmap, i * 8 + 7, 49 - j ) = ( hd44102ch[0].ram[ad+j] & 0x80 ) ? 0 : 1;
140140      }
141141      ad += 0x40;
142142   }
r2016r2017
145145   ad = hd44102ch[1].start_page;
146146   for ( i = 4; i < 8; i++ ) {
147147      for ( j = 0; j < 50; j++ ) {
148         *BITMAP_ADDR16(bitmap, i * 8 + 0, j ) = ( hd44102ch[1].ram[ad+j] & 0x01 ) ? screen->machine->pens[0] : screen->machine->pens[1];
149         *BITMAP_ADDR16(bitmap, i * 8 + 1, j ) = ( hd44102ch[1].ram[ad+j] & 0x02 ) ? screen->machine->pens[0] : screen->machine->pens[1];
150         *BITMAP_ADDR16(bitmap, i * 8 + 2, j ) = ( hd44102ch[1].ram[ad+j] & 0x04 ) ? screen->machine->pens[0] : screen->machine->pens[1];
151         *BITMAP_ADDR16(bitmap, i * 8 + 3, j ) = ( hd44102ch[1].ram[ad+j] & 0x08 ) ? screen->machine->pens[0] : screen->machine->pens[1];
152         *BITMAP_ADDR16(bitmap, i * 8 + 4, j ) = ( hd44102ch[1].ram[ad+j] & 0x10 ) ? screen->machine->pens[0] : screen->machine->pens[1];
153         *BITMAP_ADDR16(bitmap, i * 8 + 5, j ) = ( hd44102ch[1].ram[ad+j] & 0x20 ) ? screen->machine->pens[0] : screen->machine->pens[1];
154         *BITMAP_ADDR16(bitmap, i * 8 + 6, j ) = ( hd44102ch[1].ram[ad+j] & 0x40 ) ? screen->machine->pens[0] : screen->machine->pens[1];
155         *BITMAP_ADDR16(bitmap, i * 8 + 7, j ) = ( hd44102ch[1].ram[ad+j] & 0x80 ) ? screen->machine->pens[0] : screen->machine->pens[1];
148         *BITMAP_ADDR16(bitmap, i * 8 + 0, j ) = ( hd44102ch[1].ram[ad+j] & 0x01 ) ? 0 : 1;
149         *BITMAP_ADDR16(bitmap, i * 8 + 1, j ) = ( hd44102ch[1].ram[ad+j] & 0x02 ) ? 0 : 1;
150         *BITMAP_ADDR16(bitmap, i * 8 + 2, j ) = ( hd44102ch[1].ram[ad+j] & 0x04 ) ? 0 : 1;
151         *BITMAP_ADDR16(bitmap, i * 8 + 3, j ) = ( hd44102ch[1].ram[ad+j] & 0x08 ) ? 0 : 1;
152         *BITMAP_ADDR16(bitmap, i * 8 + 4, j ) = ( hd44102ch[1].ram[ad+j] & 0x10 ) ? 0 : 1;
153         *BITMAP_ADDR16(bitmap, i * 8 + 5, j ) = ( hd44102ch[1].ram[ad+j] & 0x20 ) ? 0 : 1;
154         *BITMAP_ADDR16(bitmap, i * 8 + 6, j ) = ( hd44102ch[1].ram[ad+j] & 0x40 ) ? 0 : 1;
155         *BITMAP_ADDR16(bitmap, i * 8 + 7, j ) = ( hd44102ch[1].ram[ad+j] & 0x80 ) ? 0 : 1;
156156      }
157157      ad += 0x40;
158158   }
r2016r2017
161161   ad = hd44102ch[2].start_page;
162162   for ( i = 0; i < 4; i++ ) {
163163      for ( j = 0; j < 25; j++ ) {
164         *BITMAP_ADDR16(bitmap, i * 8 + 0, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x01 ) ? screen->machine->pens[0] : screen->machine->pens[1];
165         *BITMAP_ADDR16(bitmap, i * 8 + 1, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x02 ) ? screen->machine->pens[0] : screen->machine->pens[1];
166         *BITMAP_ADDR16(bitmap, i * 8 + 2, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x04 ) ? screen->machine->pens[0] : screen->machine->pens[1];
167         *BITMAP_ADDR16(bitmap, i * 8 + 3, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x08 ) ? screen->machine->pens[0] : screen->machine->pens[1];
168         *BITMAP_ADDR16(bitmap, i * 8 + 4, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x10 ) ? screen->machine->pens[0] : screen->machine->pens[1];
169         *BITMAP_ADDR16(bitmap, i * 8 + 5, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x20 ) ? screen->machine->pens[0] : screen->machine->pens[1];
170         *BITMAP_ADDR16(bitmap, i * 8 + 6, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x40 ) ? screen->machine->pens[0] : screen->machine->pens[1];
171         *BITMAP_ADDR16(bitmap, i * 8 + 7, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x80 ) ? screen->machine->pens[0] : screen->machine->pens[1];
164         *BITMAP_ADDR16(bitmap, i * 8 + 0, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x01 ) ? 0 : 1;
165         *BITMAP_ADDR16(bitmap, i * 8 + 1, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x02 ) ? 0 : 1;
166         *BITMAP_ADDR16(bitmap, i * 8 + 2, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x04 ) ? 0 : 1;
167         *BITMAP_ADDR16(bitmap, i * 8 + 3, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x08 ) ? 0 : 1;
168         *BITMAP_ADDR16(bitmap, i * 8 + 4, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x10 ) ? 0 : 1;
169         *BITMAP_ADDR16(bitmap, i * 8 + 5, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x20 ) ? 0 : 1;
170         *BITMAP_ADDR16(bitmap, i * 8 + 6, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x40 ) ? 0 : 1;
171         *BITMAP_ADDR16(bitmap, i * 8 + 7, 50 + j ) = ( hd44102ch[2].ram[ad+j] & 0x80 ) ? 0 : 1;
172172      }
173173      for ( j = 25; j < 50; j++ ) {
174         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 0, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x01 ) ? screen->machine->pens[0] : screen->machine->pens[1];
175         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 1, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x02 ) ? screen->machine->pens[0] : screen->machine->pens[1];
176         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 2, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x04 ) ? screen->machine->pens[0] : screen->machine->pens[1];
177         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 3, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x08 ) ? screen->machine->pens[0] : screen->machine->pens[1];
178         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 4, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x10 ) ? screen->machine->pens[0] : screen->machine->pens[1];
179         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 5, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x20 ) ? screen->machine->pens[0] : screen->machine->pens[1];
180         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 6, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x40 ) ? screen->machine->pens[0] : screen->machine->pens[1];
181         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 7, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x80 ) ? screen->machine->pens[0] : screen->machine->pens[1];
174         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 0, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x01 ) ? 0 : 1;
175         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 1, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x02 ) ? 0 : 1;
176         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 2, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x04 ) ? 0 : 1;
177         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 3, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x08 ) ? 0 : 1;
178         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 4, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x10 ) ? 0 : 1;
179         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 5, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x20 ) ? 0 : 1;
180         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 6, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x40 ) ? 0 : 1;
181         *BITMAP_ADDR16(bitmap, 32 + i * 8 + 7, 25 + j ) = ( hd44102ch[2].ram[ad+j] & 0x80 ) ? 0 : 1;
182182      }
183183      ad += 0x40;
184184   }
src/mess/drivers/tm990189.c
r2016r2017
316316
317317static VIDEO_UPDATE( tm990_189 )
318318{
319   update_common(bitmap, 580, 150, 110, 508, 387, 456, 507, 478, screen->machine->pens[1], screen->machine->pens[0]);
319   update_common(bitmap, 580, 150, 110, 508, 387, 456, 507, 478, 1, 0);
320320   return 0;
321321}
322322
r2016r2017
343343               LED_display_window_left, LED_display_window_top+16,
344344               LED_display_window_left+80, LED_display_window_top+16,
345345               LED_display_window_left+128, LED_display_window_top+16,
346               screen->machine->pens[6], screen->machine->pens[1]);
346               6, 1);
347347   return 0;
348348}
349349
r2016r2017
817817   MDRV_SOUND_ADD(WAVE, 0)
818818   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
819819   MDRV_SOUND_ADD(SPEAKER, 0)
820   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)MACHINE_DRIVER_END
820   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
821MACHINE_DRIVER_END
821822
822823#define LEFT_BORDER      15
823824#define RIGHT_BORDER      15
src/mess/drivers/apexc.c
r2016r2017
491491   int width = video_screen_get_width(screen);
492492   int height = video_screen_get_height(screen);
493493   apexc_bitmap = auto_bitmap_alloc(width, height, BITMAP_FORMAT_INDEXED16);
494   fillbitmap(apexc_bitmap, machine->pens[0], &/*machine->visible_area*/teletyper_window);
494   fillbitmap(apexc_bitmap, 0, &/*machine->visible_area*/teletyper_window);
495495}
496496
497497/* draw a small 8*8 LED (well, there were no LEDs at the time, so let's call this a lamp ;-) ) */
498static void apexc_draw_led(running_machine *machine, bitmap_t *bitmap, int x, int y, int state)
498static void apexc_draw_led(bitmap_t *bitmap, int x, int y, int state)
499499{
500500   int xx, yy;
501501
502502   for (yy=1; yy<7; yy++)
503503      for (xx=1; xx<7; xx++)
504         *BITMAP_ADDR16(bitmap, y+yy, x+xx) = machine->pens[state ? 2 : 3];
504         *BITMAP_ADDR16(bitmap, y+yy, x+xx) = state ? 2 : 3;
505505}
506506
507507/* write a single char on screen */
r2016r2017
529529   int i;
530530   char the_char;
531531
532   fillbitmap(bitmap, screen->machine->pens[0], &/*machine->visible_area*/panel_window);
532   fillbitmap(bitmap, 0, &/*machine->visible_area*/panel_window);
533533   apexc_draw_string(screen->machine, bitmap, "power", 8, 0, 0);
534534   apexc_draw_string(screen->machine, bitmap, "running", 8, 8, 0);
535535   apexc_draw_string(screen->machine, bitmap, "data :", 0, 24, 0);
r2016r2017
537537   copybitmap(bitmap, apexc_bitmap, 0, 0, 0, 0, &teletyper_window);
538538
539539
540   apexc_draw_led(screen->machine, bitmap, 0, 0, 1);
540   apexc_draw_led(bitmap, 0, 0, 1);
541541
542   apexc_draw_led(screen->machine, bitmap, 0, 8, cpunum_get_reg(0, APEXC_STATE));
542   apexc_draw_led(bitmap, 0, 8, cpunum_get_reg(0, APEXC_STATE));
543543
544544   for (i=0; i<32; i++)
545545   {
546      apexc_draw_led(screen->machine, bitmap, i*8, 32, (panel_data_reg << i) & 0x80000000UL);
546      apexc_draw_led(bitmap, i*8, 32, (panel_data_reg << i) & 0x80000000UL);
547547      the_char = '0' + ((i + 1) % 10);
548548      apexc_draw_char(screen->machine, bitmap, the_char, i*8, 40, 0);
549549      if (((i + 1) % 10) == 0)
r2016r2017
575575      draw_scanline8(apexc_bitmap, teletyper_window_offset_x, y, teletyper_window_width, buf, machine->pens, -1);
576576   }
577577
578   fillbitmap(apexc_bitmap, machine->pens[0], &teletyper_scroll_clear_window);
578   fillbitmap(apexc_bitmap, 0, &teletyper_scroll_clear_window);
579579}
580580
581581static void apexc_teletyper_putchar(running_machine *machine, int character)
src/mess/drivers/gmaster.c
r2016r2017
173173static VIDEO_UPDATE( gmaster )
174174{
175175    int x,y;
176//    plot_box(bitmap, 0, 0, 64/*bitmap->width*/, bitmap->height, machine->pens[0]); //xmess rounds up to 64 pixel
176//    plot_box(bitmap, 0, 0, 64/*bitmap->width*/, bitmap->height, 0); //xmess rounds up to 64 pixel
177177    for (y=0;y<ARRAY_LENGTH(gmaster_video.pixels); y++) {
178178   for (x=0;x<ARRAY_LENGTH(gmaster_video.pixels[0]);x++) {
179179     UINT8 d=gmaster_video.pixels[y][x];
src/mess/drivers/svision.c
r2016r2017
390390   }
391391   else
392392   {
393      plot_box(bitmap, 3, 0, 162, 159, screen->machine->pens[PALETTE_START]);
393      plot_box(bitmap, 3, 0, 162, 159, PALETTE_START);
394394   }
395395   return 0;
396396}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team