src/mess/drivers/pdp1.c
| r2039 | r2040 | |
| 137 | 137 | 0x00,0x68,0xb0,0x00,0x00,0x00,0x00,0x00,0x20,0x50,0x20,0x50,0xa8,0x50,0x00,0x00, |
| 138 | 138 | }; |
| 139 | 139 | |
| 140 | | /* set up memory regions */ |
| 141 | | // pdp1_memory = (UINT32 *) memory_region(REGION_CPU1); |
| 142 | | |
| 143 | 140 | /* set up our font */ |
| 144 | 141 | dst = memory_region(REGION_GFX1); |
| 145 | 142 | |
| r2039 | r2040 | |
| 346 | 343 | 8*8 /* every char takes 8 consecutive bytes */ |
| 347 | 344 | }; |
| 348 | 345 | |
| 349 | | static GFXDECODE_START( pdp1 ) |
| 350 | | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 3 ) |
| 351 | | GFXDECODE_END |
| 352 | 346 | |
| 353 | | |
| 354 | 347 | /* |
| 355 | 348 | The static palette only includes the pens for the control panel and |
| 356 | 349 | the typewriter, as the CRT palette is generated dynamically. |
| r2039 | r2040 | |
| 378 | 371 | |
| 379 | 372 | static UINT8 total_colors_needed = pen_crt_num_levels + sizeof(pdp1_colors) / 3; |
| 380 | 373 | |
| 374 | static GFXDECODE_START( pdp1 ) |
| 375 | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, pen_crt_num_levels + sizeof(pdp1_colors) / 3, 3 ) |
| 376 | GFXDECODE_END |
| 377 | |
| 381 | 378 | /* Initialise the palette */ |
| 382 | 379 | static PALETTE_INIT( pdp1 ) |
| 383 | 380 | { |
| r2039 | r2040 | |
| 427 | 424 | for( i = 0; i < total_colors_needed; i++ ) |
| 428 | 425 | colortable_entry_set_value(machine->colortable, i, i); |
| 429 | 426 | |
| 430 | | /* overwrite unneeded lowest palette entries with text values */ |
| 427 | /* set up palette for text */ |
| 431 | 428 | 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]); |
| 433 | 430 | } |
| 434 | 431 | |
| 435 | 432 | |
| r2039 | r2040 | |
| 489 | 486 | MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1) |
| 490 | 487 | |
| 491 | 488 | 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)) |
| 493 | 490 | |
| 494 | 491 | MDRV_PALETTE_INIT(pdp1) |
| 495 | 492 | MDRV_VIDEO_START(pdp1) |
src/mess/drivers/tx0.c
| r2039 | r2040 | |
| 213 | 213 | 8*8 /* every char takes 8 consecutive bytes */ |
| 214 | 214 | }; |
| 215 | 215 | |
| 216 | | static GFXDECODE_START( tx0 ) |
| 217 | | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 3 ) |
| 218 | | GFXDECODE_END |
| 219 | 216 | |
| 220 | | |
| 221 | 217 | /* |
| 222 | 218 | The static palette only includes the pens for the control panel and |
| 223 | 219 | the typewriter, as the CRT palette is generated dynamically. |
| r2039 | r2040 | |
| 245 | 241 | |
| 246 | 242 | static UINT8 total_colors_needed = pen_crt_num_levels + sizeof(tx0_colors) / 3; |
| 247 | 243 | |
| 244 | static GFXDECODE_START( tx0 ) |
| 245 | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, pen_crt_num_levels + sizeof(tx0_colors) / 3, 3 ) |
| 246 | GFXDECODE_END |
| 247 | |
| 248 | 248 | /* Initialise the palette */ |
| 249 | 249 | static PALETTE_INIT( tx0 ) |
| 250 | 250 | { |
| r2039 | r2040 | |
| 314 | 314 | for( i = 0; i < total_colors_needed; i++ ) |
| 315 | 315 | colortable_entry_set_value(machine->colortable, i, i); |
| 316 | 316 | |
| 317 | | /* overwrite unneeded lowest palette entries with text values */ |
| 317 | /* set up palette for text */ |
| 318 | 318 | 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]); |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
| r2039 | r2040 | |
| 358 | 358 | MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1) |
| 359 | 359 | |
| 360 | 360 | 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)) |
| 362 | 362 | |
| 363 | 363 | MDRV_PALETTE_INIT(tx0) |
| 364 | 364 | MDRV_VIDEO_START(tx0) |