src/mess/video/ti85.c
| r2215 | r2216 | |
| 30 | 30 | |
| 31 | 31 | static UINT8 * ti85_frames; |
| 32 | 32 | |
| 33 | | const unsigned char ti85_palette[32*7][3] = |
| 33 | const unsigned char ti85_colors[32*7][3] = |
| 34 | 34 | { |
| 35 | 35 | { 0xae, 0xcd, 0xb0 }, { 0xaa, 0xc9, 0xae }, { 0xa6, 0xc5, 0xad }, { 0xa3, 0xc1, 0xab }, { 0x9f, 0xbd, 0xaa }, { 0x9b, 0xb9, 0xa8 }, { 0x98, 0xb5, 0xa7 }, //0x00 |
| 36 | 36 | { 0xae, 0xcd, 0xb0 }, { 0xa9, 0xc8, 0xae }, { 0xa4, 0xc3, 0xac }, { 0xa0, 0xbe, 0xaa }, { 0x9b, 0xb9, 0xa8 }, { 0x96, 0xb4, 0xa6 }, { 0x92, 0xaf, 0xa4 }, //0x01 |
| r2215 | r2216 | |
| 66 | 66 | { 0x57, 0x74, 0x8c }, { 0x56, 0x73, 0x8b }, { 0x55, 0x72, 0x8b }, { 0x55, 0x71, 0x8b }, { 0x54, 0x70, 0x8a }, { 0x53, 0x6f, 0x8a }, { 0x53, 0x6f, 0x8a } //0x1f |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | | const unsigned short ti85_colortable[32][7] = |
| 69 | const unsigned short ti85_palette[32][7] = |
| 70 | 70 | { |
| 71 | 71 | { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 }, |
| 72 | 72 | { 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d }, |
| r2215 | r2216 | |
| 104 | 104 | |
| 105 | 105 | PALETTE_INIT( ti85 ) |
| 106 | 106 | { |
| 107 | | int used = sizeof (ti85_palette) / 3; |
| 108 | | int i; |
| 107 | UINT8 i, j, r, g, b; |
| 109 | 108 | |
| 110 | | for (i = 0; i < used; i++) |
| 111 | | palette_set_color_rgb(machine, i, ti85_palette[i][0], ti85_palette[i][1], ti85_palette[i][2]); |
| 109 | machine->colortable = colortable_alloc(machine, 224); |
| 112 | 110 | |
| 111 | for ( i = 0; i < 224; i++ ) |
| 112 | { |
| 113 | r = ti85_colors[i][0]; g = ti85_colors[i][1]; b = ti85_colors[i][2]; |
| 114 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); |
| 115 | } |
| 116 | |
| 117 | for (i=0; i < 32; i++) |
| 118 | for (j=0; j < 7; j++) |
| 119 | colortable_entry_set_value(machine->colortable, i*7+j, ti85_palette[i][j]); |
| 120 | |
| 113 | 121 | if (!strncmp(machine->gamedrv->name, "ti81", 4)) |
| 114 | 122 | { |
| 115 | 123 | ti_video_memory_size = TI81_VIDEO_MEMORY_SIZE; |
| r2215 | r2216 | |
| 153 | 161 | |
| 154 | 162 | if (!ti85_LCD_status || !ti85_timer_interrupt_mask) |
| 155 | 163 | { |
| 156 | | for (y=0; y<ti_screen_y_size; y++) |
| 164 | for (y=0; y<ti_screen_y_size; y++) |
| 157 | 165 | for (x=0; x<ti_screen_x_size; x++) |
| 158 | 166 | for (b=0; b<8; b++) |
| 159 | | *BITMAP_ADDR16(bitmap, y, x*8+b) = ti85_colortable[ti85_LCD_contrast&0x1f][6]; |
| 167 | *BITMAP_ADDR16(bitmap, y, x*8+b) = ti85_palette[ti85_LCD_contrast&0x1f][6]; |
| 160 | 168 | return 0; |
| 161 | 169 | } |
| 162 | 170 | |
| r2215 | r2216 | |
| 179 | 187 | + ((*(ti85_frames+4*ti_video_memory_size+y*ti_screen_x_size+x)>>(7-b)) & 0x01) |
| 180 | 188 | + ((*(ti85_frames+5*ti_video_memory_size+y*ti_screen_x_size+x)>>(7-b)) & 0x01); |
| 181 | 189 | |
| 182 | | *BITMAP_ADDR16(bitmap, y, x*8+b) = ti85_colortable[ti85_LCD_contrast&0x1f][brightnes]; |
| 190 | *BITMAP_ADDR16(bitmap, y, x*8+b) = ti85_palette[ti85_LCD_contrast&0x1f][brightnes]; |
| 183 | 191 | } |
| 184 | 192 | return 0; |
| 185 | 193 | } |
src/mess/drivers/ti85.c
| r2215 | r2216 | |
| 343 | 343 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 344 | 344 | MDRV_SCREEN_SIZE(96, 64) |
| 345 | 345 | MDRV_SCREEN_VISIBLE_AREA(0, 96-1, 0, 64-1) |
| 346 | | MDRV_PALETTE_LENGTH(32*7 + 32768) |
| 346 | MDRV_PALETTE_LENGTH(224) |
| 347 | 347 | MDRV_PALETTE_INIT( ti85 ) |
| 348 | 348 | |
| 349 | 349 | MDRV_VIDEO_START( ti85 ) |
| r2215 | r2216 | |
| 548 | 548 | SYSTEM_CONFIG_END |
| 549 | 549 | |
| 550 | 550 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 551 | | COMP( 1990, ti81, 0, 0, ti81, ti81, 0, NULL, "Texas Instruments", "TI-81", 0 ) |
| 552 | | COMP( 1992, ti85, 0, 0, ti85, ti85, 0, ti85, "Texas Instruments", "TI-85", 0 ) |
| 551 | COMP( 1990, ti81, 0, 0, ti81, ti81, 0, NULL, "Texas Instruments", "TI-81", GAME_NOT_WORKING ) |
| 552 | COMP( 1992, ti85, 0, 0, ti85, ti85, 0, ti85, "Texas Instruments", "TI-85", GAME_NOT_WORKING ) |
| 553 | 553 | COMP( 1993, ti82, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-82", GAME_NOT_WORKING ) |
| 554 | 554 | COMP( 1996, ti83, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83", GAME_NOT_WORKING ) |
| 555 | | COMP( 1997, ti86, 0, 0, ti86, ti85, 0, ti86, "Texas Instruments", "TI-86", 0 ) |
| 555 | COMP( 1997, ti86, 0, 0, ti86, ti85, 0, ti86, "Texas Instruments", "TI-86", GAME_NOT_WORKING ) |
| 556 | 556 | COMP( 1999, ti83p, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus", GAME_NOT_WORKING ) |
| 557 | 557 | /* |
| 558 | | COMP( 2001, ti83pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus Silver Edition", 0 ) |
| 559 | | COMP( 2004, ti84p, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-84 Plus", 0 ) |
| 560 | | COMP( 2004, ti84pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-84 Plus Silver Edition", 0 ) |
| 558 | COMP( 2001, ti83pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus Silver Edition", GAME_NOT_WORKING ) |
| 559 | COMP( 2004, ti84p, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-84 Plus", GAME_NOT_WORKING ) |
| 560 | COMP( 2004, ti84pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-84 Plus Silver Edition", GAME_NOT_WORKING ) |
| 561 | 561 | */ |