Previous 15994 Revisions Next

r2040 Friday 21st March, 2008 at 10:35:13 UTC by Robbbert
[TX0, PDP1] Fix a palette bug that crept in.
[src/mess/drivers]pdp1.c tx0.c

src/mess/drivers/pdp1.c
r2039r2040
137137      0x00,0x68,0xb0,0x00,0x00,0x00,0x00,0x00,0x20,0x50,0x20,0x50,0xa8,0x50,0x00,0x00,
138138   };
139139
140   /* set up memory regions */
141//   pdp1_memory = (UINT32 *) memory_region(REGION_CPU1);
142
143140   /* set up our font */
144141   dst = memory_region(REGION_GFX1);
145142
r2039r2040
346343   8*8 /* every char takes 8 consecutive bytes */
347344};
348345
349static GFXDECODE_START( pdp1 )
350   GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 3 )
351GFXDECODE_END
352346
353
354347/*
355348    The static palette only includes the pens for the control panel and
356349    the typewriter, as the CRT palette is generated dynamically.
r2039r2040
378371
379372static UINT8 total_colors_needed = pen_crt_num_levels + sizeof(pdp1_colors) / 3;
380373
374static GFXDECODE_START( pdp1 )
375   GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, pen_crt_num_levels + sizeof(pdp1_colors) / 3, 3 )
376GFXDECODE_END
377
381378/* Initialise the palette */
382379static PALETTE_INIT( pdp1 )
383380{
r2039r2040
427424   for( i = 0; i < total_colors_needed; i++ )
428425      colortable_entry_set_value(machine->colortable, i, i);
429426
430   /* overwrite unneeded lowest palette entries with text values */
427   /* set up palette for text */
431428   for( i = 0; i < 6; i++ )
432      colortable_entry_set_value(machine->colortable, i, pdp1_palette[i]);
429      colortable_entry_set_value(machine->colortable, total_colors_needed + i, pdp1_palette[i]);
433430}
434431
435432
r2039r2040
489486   MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1)
490487
491488   MDRV_GFXDECODE(pdp1)
492   MDRV_PALETTE_LENGTH(pen_crt_num_levels + sizeof(pdp1_colors) / 3)
489   MDRV_PALETTE_LENGTH(pen_crt_num_levels + sizeof(pdp1_colors) / 3 + sizeof(pdp1_palette))
493490
494491   MDRV_PALETTE_INIT(pdp1)
495492   MDRV_VIDEO_START(pdp1)
src/mess/drivers/tx0.c
r2039r2040
213213   8*8 /* every char takes 8 consecutive bytes */
214214};
215215
216static GFXDECODE_START( tx0 )
217   GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 3 )
218GFXDECODE_END
219216
220
221217/*
222218    The static palette only includes the pens for the control panel and
223219    the typewriter, as the CRT palette is generated dynamically.
r2039r2040
245241
246242static UINT8 total_colors_needed = pen_crt_num_levels + sizeof(tx0_colors) / 3;
247243
244static GFXDECODE_START( tx0 )
245   GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, pen_crt_num_levels + sizeof(tx0_colors) / 3, 3 )
246GFXDECODE_END
247
248248/* Initialise the palette */
249249static PALETTE_INIT( tx0 )
250250{
r2039r2040
314314   for( i = 0; i < total_colors_needed; i++ )
315315      colortable_entry_set_value(machine->colortable, i, i);
316316
317   /* overwrite unneeded lowest palette entries with text values */
317   /* set up palette for text */
318318   for( i = 0; i < 6; i++ )
319      colortable_entry_set_value(machine->colortable, i, tx0_palette[i]);
319      colortable_entry_set_value(machine->colortable, total_colors_needed + i, tx0_palette[i]);
320320}
321321
322322
r2039r2040
358358   MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1)
359359
360360   MDRV_GFXDECODE(tx0)
361   MDRV_PALETTE_LENGTH(pen_crt_num_levels + sizeof(tx0_colors) / 3)
361   MDRV_PALETTE_LENGTH(pen_crt_num_levels + sizeof(tx0_colors) / 3 + sizeof(tx0_palette))
362362
363363   MDRV_PALETTE_INIT(tx0)
364364   MDRV_VIDEO_START(tx0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team