Previous 199869 Revisions Next

r18244 Tuesday 2nd October, 2012 at 16:58:55 UTC by Curt Coder
(MESS) trs80m2: Fixed reverse video. [Curt Coder]
[src/mess/drivers]trs80m2.c

trunk/src/mess/drivers/trs80m2.c
r18243r18244
562562static MC6845_UPDATE_ROW( trs80m2_update_row )
563563{
564564   trs80m2_state *state = device->machine().driver_data<trs80m2_state>();
565   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
566565
566   int x = 0;
567
567568   for (int column = 0; column < x_count; column++)
568569   {
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];
570573
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);
573576
574      if (column == cursor_x)
577      for (int bit = 0; bit < 8; bit++)
575578      {
576         data = 0xff;
577      }
579         int dout = BIT(data, 7);
580         int color = dcursor ^ drevid ^ dout;
578581
579      for (bit = 0; bit < 8; bit++)
580      {
581         int x = (column * 8) + bit;
582         bitmap.pix32(y, x++) = RGB_MONOCHROME_GREEN[color];
582583
583         bitmap.pix32(y, x) = palette[BIT(data, 7)];
584
585584         data <<= 1;
586585      }
587586   }
r18243r18244
633632{
634633   if (m_blnkvid)
635634   {
636      bitmap.fill(get_black_pen(machine()), cliprect);
635      bitmap.fill(RGB_BLACK, cliprect);
637636   }
638637   else
639638   {
r18243r18244
10551054   MCFG_SCREEN_SIZE(640, 480)
10561055   MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
10571056
1058   MCFG_PALETTE_LENGTH(2)
1059   MCFG_PALETTE_INIT(monochrome_green)
1060
10611057   MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_12_48MHz/8, mc6845_intf)
10621058
10631059   // devices
r18243r18244
11641160
11651161//    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   INIT     COMPANY             FULLNAME        FLAGS
11661162COMP( 1979, trs80m2,   0,         0,      trs80m2,   trs80m2, driver_device,      0,      "Tandy Radio Shack",   "TRS-80 Model II",   GAME_NO_SOUND_HW | GAME_IMPERFECT_KEYBOARD )
1167COMP( 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 )
1163COMP( 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 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team