trunk/src/mess/drivers/trs80m2.c
r18243 | r18244 | |
562 | 562 | static MC6845_UPDATE_ROW( trs80m2_update_row ) |
563 | 563 | { |
564 | 564 | trs80m2_state *state = device->machine().driver_data<trs80m2_state>(); |
565 | | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
566 | 565 | |
| 566 | int x = 0; |
| 567 | |
567 | 568 | for (int column = 0; column < x_count; column++) |
568 | 569 | { |
569 | | int bit; |
| 570 | UINT8 code = state->m_video_ram[(ma + column) & 0x7ff]; |
| 571 | offs_t address = ((code & 0x7f) << 4) | (ra & 0x0f); |
| 572 | UINT8 data = state->m_char_rom[address]; |
570 | 573 | |
571 | | UINT16 address = (state->m_video_ram[(ma + column) & 0x7ff] << 4) | (ra & 0x0f); |
572 | | UINT8 data = state->m_char_rom[address & 0x7ff]; |
| 574 | int dcursor = (column == cursor_x); |
| 575 | int drevid = BIT(code, 7); |
573 | 576 | |
574 | | if (column == cursor_x) |
| 577 | for (int bit = 0; bit < 8; bit++) |
575 | 578 | { |
576 | | data = 0xff; |
577 | | } |
| 579 | int dout = BIT(data, 7); |
| 580 | int color = dcursor ^ drevid ^ dout; |
578 | 581 | |
579 | | for (bit = 0; bit < 8; bit++) |
580 | | { |
581 | | int x = (column * 8) + bit; |
| 582 | bitmap.pix32(y, x++) = RGB_MONOCHROME_GREEN[color]; |
582 | 583 | |
583 | | bitmap.pix32(y, x) = palette[BIT(data, 7)]; |
584 | | |
585 | 584 | data <<= 1; |
586 | 585 | } |
587 | 586 | } |
r18243 | r18244 | |
633 | 632 | { |
634 | 633 | if (m_blnkvid) |
635 | 634 | { |
636 | | bitmap.fill(get_black_pen(machine()), cliprect); |
| 635 | bitmap.fill(RGB_BLACK, cliprect); |
637 | 636 | } |
638 | 637 | else |
639 | 638 | { |
r18243 | r18244 | |
1055 | 1054 | MCFG_SCREEN_SIZE(640, 480) |
1056 | 1055 | MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) |
1057 | 1056 | |
1058 | | MCFG_PALETTE_LENGTH(2) |
1059 | | MCFG_PALETTE_INIT(monochrome_green) |
1060 | | |
1061 | 1057 | MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_12_48MHz/8, mc6845_intf) |
1062 | 1058 | |
1063 | 1059 | // devices |
r18243 | r18244 | |
1164 | 1160 | |
1165 | 1161 | // YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS |
1166 | 1162 | COMP( 1979, trs80m2, 0, 0, trs80m2, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model II", GAME_NO_SOUND_HW | GAME_IMPERFECT_KEYBOARD ) |
1167 | | COMP( 1982, trs80m16, trs80m2, 0, trs80m16, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model 16", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
1168 | | //COMP( 1983, trs80m12, trs80m2, 0, trs80m16, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model 12", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
1169 | | //COMP( 1984, trs80m16b,trs80m2, 0, trs80m16, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model 16B", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
1170 | | //COMP( 1985, tandy6k, trs80m2, 0, tandy6k, trs80m2, driver_device, 0, "Tandy Radio Shack", "Tandy 6000 HD", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
| 1163 | COMP( 1982, trs80m16, trs80m2, 0, trs80m16, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model 16", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
| 1164 | //COMP( 1983, trs80m12, trs80m2, 0, trs80m16, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model 12", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
| 1165 | //COMP( 1984, trs80m16b,trs80m2, 0, trs80m16, trs80m2, driver_device, 0, "Tandy Radio Shack", "TRS-80 Model 16B", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |
| 1166 | //COMP( 1985, tandy6k, trs80m2, 0, tandy6k, trs80m2, driver_device, 0, "Tandy Radio Shack", "Tandy 6000 HD", GAME_NO_SOUND_HW | GAME_NOT_WORKING | GAME_IMPERFECT_KEYBOARD ) |