From 81743ee3b973082cefda885a0a5e89b716814ccb Mon Sep 17 00:00:00 2001 From: Mark Garlanger Date: Sat, 12 Aug 2023 14:51:28 -0500 Subject: heathkit/h19.cpp: Added DTE RS-232 port. (#11475) heathkit/tlb.cpp: Exposed all serial signals. --- src/mame/heathkit/h19.cpp | 21 ++++++ src/mame/heathkit/tlb.cpp | 189 ++++++++++++++++++++++++++-------------------- src/mame/heathkit/tlb.h | 11 ++- 3 files changed, 138 insertions(+), 83 deletions(-) diff --git a/src/mame/heathkit/h19.cpp b/src/mame/heathkit/h19.cpp index 8b72623b2c4..cbf4fa5716f 100644 --- a/src/mame/heathkit/h19.cpp +++ b/src/mame/heathkit/h19.cpp @@ -12,6 +12,7 @@ #include "emu.h" #include "tlb.h" +#include "bus/rs232/rs232.h" namespace { @@ -44,26 +45,46 @@ private: void h19_state::h19(machine_config &config) { HEATH_TLB(config, m_tlb); + m_tlb->serial_data_callback().set("dte", FUNC(rs232_port_device::write_txd)); + + rs232_port_device &dte(RS232_PORT(config, "dte", default_rs232_devices, "loopback")); + dte.rxd_handler().set(m_tlb, FUNC(heath_tlb_device::serial_in_w)); } void h19_state::h19_superh19(machine_config &config) { HEATH_SUPER19(config, m_tlb); + m_tlb->serial_data_callback().set("dte", FUNC(rs232_port_device::write_txd)); + + rs232_port_device &dte(RS232_PORT(config, "dte", default_rs232_devices, "loopback")); + dte.rxd_handler().set(m_tlb, FUNC(heath_tlb_device::serial_in_w)); } void h19_state::h19_watzh19(machine_config &config) { HEATH_WATZ(config, m_tlb); + m_tlb->serial_data_callback().set("dte", FUNC(rs232_port_device::write_txd)); + + rs232_port_device &dte(RS232_PORT(config, "dte", default_rs232_devices, "loopback")); + dte.rxd_handler().set(m_tlb, FUNC(heath_tlb_device::serial_in_w)); } void h19_state::h19_ultrah19(machine_config &config) { HEATH_ULTRA(config, m_tlb); + m_tlb->serial_data_callback().set("dte", FUNC(rs232_port_device::write_txd)); + + rs232_port_device &dte(RS232_PORT(config, "dte", default_rs232_devices, "loopback")); + dte.rxd_handler().set(m_tlb, FUNC(heath_tlb_device::serial_in_w)); } void h19_state::h19_gp19(machine_config &config) { HEATH_GP19(config, m_tlb); + m_tlb->serial_data_callback().set("dte", FUNC(rs232_port_device::write_txd)); + + rs232_port_device &dte(RS232_PORT(config, "dte", default_rs232_devices, "loopback")); + dte.rxd_handler().set(m_tlb, FUNC(heath_tlb_device::serial_in_w)); } // ROM definition diff --git a/src/mame/heathkit/tlb.cpp b/src/mame/heathkit/tlb.cpp index 0f5566bad16..29e14de9ff7 100644 --- a/src/mame/heathkit/tlb.cpp +++ b/src/mame/heathkit/tlb.cpp @@ -82,12 +82,22 @@ static constexpr XTAL H19_BEEP_FRQ = (H19_CLOCK / 2048); static constexpr uint32_t H19_KEY_DEBOUNCE_CAPACITOR = 5000; #define MM5740_CLOCK (mm5740_device::calc_effective_clock_key_debounce(H19_KEY_DEBOUNCE_CAPACITOR)) +// Keyboard flag masks +static constexpr uint8_t KB_STATUS_SHIFT_KEYS_MASK = 0x01; +static constexpr uint8_t KB_STATUS_CONTROL_KEY_MASK = 0x10; +static constexpr uint8_t KB_STATUS_KEYBOARD_STROBE_MASK = 0x80; + + DEFINE_DEVICE_TYPE(HEATH_TLB, heath_tlb_device, "heath_tlb", "Heath Terminal Logic Board"); DEFINE_DEVICE_TYPE(HEATH_SUPER19, heath_super19_tlb_device, "heath_super19_tlb", "Heath Terminal Logic Board w/Super19 ROM"); DEFINE_DEVICE_TYPE(HEATH_WATZ, heath_watz_tlb_device, "heath_watz_tlb", "Heath Terminal Logic Board w/Watzman ROM"); DEFINE_DEVICE_TYPE(HEATH_ULTRA, heath_ultra_tlb_device, "heath_ultra_tlb", "Heath Terminal Logic Board w/Ultra ROM"); DEFINE_DEVICE_TYPE(HEATH_GP19, heath_gp19_tlb_device, "heath_gp19_tlb", "Heath Terminal Logic Board plus Northwest Digital Systems GP-19") + +/** + * base Heath h19 functionality + */ heath_tlb_device::heath_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : heath_tlb_device(mconfig, HEATH_TLB, tag, owner, clock) { @@ -102,6 +112,8 @@ heath_tlb_device::heath_tlb_device(const machine_config &mconfig, device_type ty m_p_videoram(*this, "videoram"), m_p_chargen(*this, "chargen"), m_write_sd(*this), + m_dtr_cb(*this), + m_rts_cb(*this), m_reset(*this), m_ace(*this, "ins8250"), m_beep(*this, "beeper"), @@ -157,20 +169,6 @@ void heath_tlb_device::io_map(address_map &map) map(0xe0, 0xe0).mirror(0x1f).w(FUNC(heath_tlb_device::bell_w)); } - -// Keyboard encoder masks -static constexpr uint8_t KB_ENCODER_KEY_VALUE_MASK = 0x7f; -static constexpr uint8_t KB_ENCODER_CONTROL_KEY_MASK = 0x80; - -// Keyboard flag masks -static constexpr uint8_t KB_STATUS_SHIFT_KEYS_MASK = 0x01; -static constexpr uint8_t KB_STATUS_CAPS_LOCK_MASK = 0x02; -static constexpr uint8_t KB_STATUS_BREAK_KEY_MASK = 0x04; -static constexpr uint8_t KB_STATUS_ONLINE_KEY_MASK = 0x08; -static constexpr uint8_t KB_STATUS_CONTROL_KEY_MASK = 0x10; -static constexpr uint8_t KB_STATUS_REPEAT_KEYS_MASK = 0x40; -static constexpr uint8_t KB_STATUS_KEYBOARD_STROBE_MASK = 0x80; - void heath_tlb_device::device_start() { save_item(NAME(m_transchar)); @@ -221,23 +219,9 @@ void heath_tlb_device::bell_w(uint8_t data) m_bell_timer->adjust(attotime::from_msec(200)); } - -/*************************************************************************** - MM5740 B Mapping to the ROM address - - B1 -> A0 A10 = 0 - B2 -> A1 A9 = 0 - B3 -> A2 A8 = B8 - B4 -> A3 A7 = B7 - B5 -> A4 A6 = B9 - B6 -> A5 A5 = B6 - B7 -> A7 A4 = B5 - B8 -> A8 A3 = B4 - B9 -> A6 A2 = B3 - ground -> A9 A1 = B2 - ground -> A10 A0 = B1 - -****************************************************************************/ +/** + * MM5740 B Mapping to the ROM address + */ uint16_t heath_tlb_device::translate_mm5740_b(uint16_t b) { return bitswap<9>(b, 7, 6, 8, 5, 4, 3, 2, 1, 0); @@ -360,10 +344,9 @@ MC6845_UPDATE_ROW(heath_tlb_device::crtc_update_row) if (de) { - for (uint16_t x = 0; x < x_count; x++) + for (int x = 0; x < x_count; x++) { uint8_t inv = (x == cursor_x) ? 0xff : 0; - uint8_t chr = m_p_videoram[(ma + x) & 0x7ff]; if (chr & 0x80) @@ -377,13 +360,14 @@ MC6845_UPDATE_ROW(heath_tlb_device::crtc_update_row) // Display a scanline of a character (8 pixels) for (int b = 0; 8 > b; ++b) + { *p++ = palette[BIT(gfx, 7 - b)]; + } } } else { - const rgb_t color = palette[0]; - std::fill_n(p, x_count * 8, color); + std::fill_n(p, x_count * 8, palette[0]); } } @@ -418,7 +402,7 @@ static INPUT_PORTS_START( tlb ) PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LeftShift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Repeat") PORT_CODE(KEYCODE_RALT) PORT_WRITE_LINE_MEMBER(heath_tlb_device, repeat_key_w) - // bit 7 - 0x080 is low if a key is pressed + // bit 7 - 0x080 is low if any key is pressed PORT_BIT(0x100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RightShift") PORT_CODE(KEYCODE_RSHIFT) PORT_WRITE_LINE_MEMBER(heath_tlb_device, right_shift_w) PORT_BIT(0x200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F10) PORT_WRITE_LINE_MEMBER(heath_tlb_device, reset_key_w) @@ -624,9 +608,9 @@ static INPUT_PORTS_START( super19 ) PORT_DIPNAME( 0x80, 0x00, "DEC Keypad Codes") PORT_DIPLOCATION("SW402:8") PORT_DIPSETTING( 0x00, "Off") PORT_DIPSETTING( 0x80, "On") - INPUT_PORTS_END + static INPUT_PORTS_START( ultra19 ) PORT_INCLUDE( tlb ) @@ -643,7 +627,6 @@ static INPUT_PORTS_START( ultra19 ) PORT_DIPNAME( 0x08, 0x00, "Parity") PORT_DIPLOCATION("SW401:4") PORT_DIPSETTING( 0x00, "Disabled") PORT_DIPSETTING( 0x08, "Enabled") - PORT_DIPNAME( 0x10, 0x00, "Parity Type") PORT_DIPLOCATION("SW401:5") PORT_DIPSETTING( 0x00, "Odd") PORT_DIPSETTING( 0x10, "Even") @@ -672,9 +655,9 @@ static INPUT_PORTS_START( ultra19 ) PORT_DIPNAME( 0x80, 0x00, "Interlace Scan Mode") PORT_DIPLOCATION("SW402:8") PORT_DIPSETTING( 0x00, "Off") PORT_DIPSETTING( 0x80, "On") - INPUT_PORTS_END + static INPUT_PORTS_START( watz19 ) PORT_INCLUDE( tlb ) @@ -702,9 +685,9 @@ static INPUT_PORTS_START( watz19 ) PORT_DIPNAME( 0x80, 0x80, "Duplex") PORT_DIPLOCATION("SW401:8") PORT_DIPSETTING( 0x00, "Half") PORT_DIPSETTING( 0x80, "Full") - INPUT_PORTS_END + static INPUT_PORTS_START( gp19 ) PORT_INCLUDE( tlb ) @@ -737,36 +720,35 @@ static INPUT_PORTS_START( gp19 ) PORT_DIPNAME( 0x80, 0x00, "Blank Screen") PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x00, "After 10 mins") PORT_DIPSETTING( 0x80, "Never") - INPUT_PORTS_END ROM_START( h19 ) + // Original terminal code ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF ) - // Original - ROM_LOAD( "2732_444-46_h19code.bin", 0x0000, 0x1000, CRC(f4447da0) SHA1(fb4093d5b763be21a9580a0defebed664b1f7a7b)) + ROM_LOAD( "2732_444-46_h19code.u437", 0x0000, 0x1000, CRC(f4447da0) SHA1(fb4093d5b763be21a9580a0defebed664b1f7a7b)) + // Original font ROM_REGION( 0x0800, "chargen", 0 ) - // Original font dump - ROM_LOAD( "2716_444-29_h19font.bin", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + ROM_LOAD( "2716_444-29_h19font.u420", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + // Original keyboard ROM_REGION( 0x1000, "keyboard", 0 ) - // Original dump - ROM_LOAD( "2716_444-37_h19keyb.bin", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c)) + ROM_LOAD( "2716_444-37_h19keyb.u445", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c)) ROM_END ROM_START( super19 ) // Super H19 ROM ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "2732_super19_h447.bin", 0x0000, 0x1000, CRC(6c51aaa6) SHA1(5e368b39fe2f1af44a905dc474663198ab630117)) + ROM_LOAD( "2732_super19_h447.u437", 0x0000, 0x1000, CRC(6c51aaa6) SHA1(5e368b39fe2f1af44a905dc474663198ab630117)) + // Original font ROM_REGION( 0x0800, "chargen", 0 ) - // Original font dump - ROM_LOAD( "2716_444-29_h19font.bin", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + ROM_LOAD( "2716_444-29_h19font.u420", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + // Original keyboard ROM_REGION( 0x1000, "keyboard", 0 ) - // Original dump - ROM_LOAD( "2716_444-37_h19keyb.bin", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c)) + ROM_LOAD( "2716_444-37_h19keyb.u445", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c)) ROM_END ROM_START( watz19 ) @@ -775,50 +757,51 @@ ROM_START( watz19 ) // Watzman ROM ROM_SYSTEM_BIOS(0, "watzman", "Watzman") - ROMX_LOAD("watzman.bin", 0x0000, 0x1000, CRC(8168b6dc) SHA1(bfaebb9d766edbe545d24bc2b6630be4f3aa0ce9), ROM_BIOS(0)) + ROMX_LOAD("watzman.u437", 0x0000, 0x1000, CRC(8168b6dc) SHA1(bfaebb9d766edbe545d24bc2b6630be4f3aa0ce9), ROM_BIOS(0)) ROM_SYSTEM_BIOS(1, "watzman-a", "Watzman w/clock persists after reset") - ROMX_LOAD("watzman-a.bin", 0x0000, 0x1000, CRC(1f7553e9) SHA1(ac6ddb12b4fb46c1a0ad08ee43978ad3153b51aa), ROM_BIOS(1)) + ROMX_LOAD("watzman-a.u437", 0x0000, 0x1000, CRC(1f7553e9) SHA1(ac6ddb12b4fb46c1a0ad08ee43978ad3153b51aa), ROM_BIOS(1)) + // Original font ROM_REGION( 0x0800, "chargen", 0 ) - // Original font dump - ROM_LOAD( "2716_444-29_h19font.bin", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + ROM_LOAD( "2716_444-29_h19font.u420", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + // Watzman keyboard ROM_REGION( 0x1000, "keyboard", 0 ) - ROM_LOAD( "keybd.bin", 0x0000, 0x0800, CRC(58dc8217) SHA1(1b23705290bdf9fc6342065c6a528c04bff67b13)) + ROM_LOAD( "keybd.u445", 0x0000, 0x0800, CRC(58dc8217) SHA1(1b23705290bdf9fc6342065c6a528c04bff67b13)) ROM_END ROM_START( ultra19 ) // ULTRA ROM ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "2532_h19_ultra_firmware.bin", 0x0000, 0x1000, CRC(8ad4cdb4) SHA1(d6e1fc37a1f52abfce5e9adb1819e0030bed1df3)) + ROM_LOAD( "2532_h19_ultra_firmware.u437", 0x0000, 0x1000, CRC(8ad4cdb4) SHA1(d6e1fc37a1f52abfce5e9adb1819e0030bed1df3)) + // Original font ROM_REGION( 0x0800, "chargen", 0 ) - // Original font dump - ROM_LOAD( "2716_444-29_h19font.bin", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) - // Watzman keyboard + ROM_LOAD( "2716_444-29_h19font.u420", 0x0000, 0x0800, CRC(d595ac1d) SHA1(130fb4ea8754106340c318592eec2d8a0deaf3d0)) + + // Ultra keyboard ROM_REGION( 0x1000, "keyboard", 0 ) - ROM_LOAD( "2716_h19_ultra_keyboard.bin", 0x0000, 0x0800, CRC(76130c92) SHA1(ca39c602af48505139d2750a084b5f8f0e662ff7)) + ROM_LOAD( "2716_h19_ultra_keyboard.u445", 0x0000, 0x0800, CRC(76130c92) SHA1(ca39c602af48505139d2750a084b5f8f0e662ff7)) ROM_END ROM_START( gp19 ) // GP-19 ROMs ROM_REGION( 0x3000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "gp19_rom_1_ver_1_1.bin", 0x0000, 0x1000, CRC(7cbe8e0d) SHA1(977df895b067fa4e4646b4518cffb08d4e6bb6e0)) - ROM_LOAD( "gp19_rom_2_ver_1_1.bin", 0x1000, 0x1000, CRC(a85e3bc4) SHA1(f64e851c5d3ef98a9a48e0fc482baa576773ff43)) - ROM_LOAD( "gp19_rom_3_ver_1_1.bin", 0x2000, 0x1000, CRC(878f577c) SHA1(0756435914dcfb981de4e40d5f81af3e0f5bb1c5)) + ROM_LOAD( "gp19_rom_1_ver_1_1.u26", 0x0000, 0x1000, CRC(7cbe8e0d) SHA1(977df895b067fa4e4646b4518cffb08d4e6bb6e0)) + ROM_LOAD( "gp19_rom_2_ver_1_1.u25", 0x1000, 0x1000, CRC(a85e3bc4) SHA1(f64e851c5d3ef98a9a48e0fc482baa576773ff43)) + ROM_LOAD( "gp19_rom_3_ver_1_1.u24", 0x2000, 0x1000, CRC(878f577c) SHA1(0756435914dcfb981de4e40d5f81af3e0f5bb1c5)) - ROM_REGION( 0x1000, "chargen", 0 ) // GP-19 font - ROM_LOAD( "gp19_char_gen_cg_1.bin", 0x0000, 0x1000, CRC(49ec9242) SHA1(770a8c7b5b15bcfe465fd84326d0ae3dcaa85311)) + ROM_REGION( 0x1000, "chargen", 0 ) + ROM_LOAD( "gp19_char_gen_cg_1.u21", 0x0000, 0x1000, CRC(49ec9242) SHA1(770a8c7b5b15bcfe465fd84326d0ae3dcaa85311)) + // Original keyboard ROM_REGION( 0x1000, "keyboard", 0 ) - // Original dump - ROM_LOAD( "2716_444-37_h19keyb.bin", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c)) + ROM_LOAD( "2716_444-37_h19keyb.u445", 0x0000, 0x0800, CRC(5c3e6972) SHA1(df49ce64ae48652346a91648c58178a34fb37d3c)) ROM_END - ioport_constructor heath_tlb_device::device_input_ports() const { return INPUT_PORTS_NAME(tlb); @@ -829,16 +812,41 @@ const tiny_rom_entry *heath_tlb_device::device_rom_region() const return ROM_NAME(h19); } -void heath_tlb_device::serial_out_b(uint8_t data) +void heath_tlb_device::serial_out_b(int data) { m_write_sd(data); } +void heath_tlb_device::dtr_out(int data) +{ + m_dtr_cb(data); +} + +void heath_tlb_device::rts_out(int data) +{ + m_rts_cb(data); +} + void heath_tlb_device::serial_in_w(int state) { m_ace->rx_w(state); } +void heath_tlb_device::rlsd_in_w(int state) +{ + m_ace->dcd_w(state); +} + +void heath_tlb_device::dsr_in_w(int state) +{ + m_ace->dsr_w(state); +} + +void heath_tlb_device::cts_int_w(int state) +{ + m_ace->cts_w(state); +} + void heath_tlb_device::device_add_mconfig(machine_config &config) { // basic machine hardware @@ -869,6 +877,8 @@ void heath_tlb_device::device_add_mconfig(machine_config &config) INS8250(config, m_ace, INS8250_CLOCK); m_ace->out_int_callback().set(FUNC(heath_tlb_device::serial_irq_w)); m_ace->out_tx_callback().set(FUNC(heath_tlb_device::serial_out_b)); + m_ace->out_dtr_callback().set(FUNC(heath_tlb_device::dtr_out)); + m_ace->out_rts_callback().set(FUNC(heath_tlb_device::rts_out)); // keyboard MM5740(config, m_mm5740, MM5740_CLOCK); @@ -895,6 +905,12 @@ void heath_tlb_device::device_add_mconfig(machine_config &config) m_repeat_clock->signal_handler().set(m_mm5740, FUNC(mm5740_device::repeat_line_w)); } + +/** + * Super-19 ROM + * + * Developed by ATG Systems + */ heath_super19_tlb_device::heath_super19_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : heath_tlb_device(mconfig, HEATH_SUPER19, tag, owner, clock) { @@ -910,6 +926,12 @@ ioport_constructor heath_super19_tlb_device::device_input_ports() const return INPUT_PORTS_NAME(super19); } + +/** + * Watzman ROM + * + * Developed by Barry Watzman, sold by HUG (Heath Users Group) +*/ heath_watz_tlb_device::heath_watz_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : heath_tlb_device(mconfig, HEATH_WATZ, tag, owner, clock) { @@ -925,6 +947,12 @@ ioport_constructor heath_watz_tlb_device::device_input_ports() const return INPUT_PORTS_NAME(watz19); } + +/** + * UltraROM + * + * Developed by William G. Parrott, III, sold by Software Wizardry, Inc. + */ heath_ultra_tlb_device::heath_ultra_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : heath_tlb_device(mconfig, HEATH_ULTRA, tag, owner, clock) { @@ -977,7 +1005,6 @@ void heath_gp19_tlb_device::device_add_mconfig(machine_config &config) m_crtc->set_clock(GP19_DOT_CLOCK_2 / 8); m_screen->set_raw(GP19_DOT_CLOCK_2, 776, 32, 672, 264, 10, 250); - } void heath_gp19_tlb_device::device_start() @@ -993,7 +1020,6 @@ void heath_gp19_tlb_device::device_start() m_graphic_mode = false; m_col_132 = false; m_reverse_video = false; - } void heath_gp19_tlb_device::mem_map(address_map &map) @@ -1045,17 +1071,14 @@ void heath_gp19_tlb_device::latch_u5_w(uint8_t data) if (m_graphic_mode) { m_crtc->set_clock(GP19_DOT_CLOCK_3 / 8); - m_screen->set_raw(GP19_DOT_CLOCK_3, 672, 50, 560, 264, 0, 250); } else if (m_col_132) { m_crtc->set_clock(GP19_DOT_CLOCK_1 / 8); - m_screen->set_raw(GP19_DOT_CLOCK_1, 1280, 1088, 33, 264, 10, 250); } else { m_crtc->set_clock(GP19_DOT_CLOCK_2 / 8); - m_screen->set_raw(GP19_DOT_CLOCK_2, 776, 32, 672, 264, 10, 250); } } @@ -1071,19 +1094,21 @@ MC6845_UPDATE_ROW(heath_gp19_tlb_device::crtc_update_row) if (m_graphic_mode) { - for (uint16_t x = 0; x < x_count; x++) + for (int x = 0; x < x_count; x++) { uint8_t const gfx = m_p_videoram[(ma + x) & 0x3fff] ^ screen_inv; + for (int b = 0; 8 > b; ++b) + { *p++ = palette[BIT(gfx, b)]; + } } } else { - for (uint16_t x = 0; x < x_count; x++) + for (int x = 0; x < x_count; x++) { uint8_t inv = (x == cursor_x) ? 0xff : 0; - uint8_t chr = m_p_videoram[(ma + x) & 0x3fff]; if (chr & 0x80) @@ -1096,19 +1121,19 @@ MC6845_UPDATE_ROW(heath_gp19_tlb_device::crtc_update_row) // select proper character set uint16_t base = m_char_gen_a11 ? 0x800 : 0x0; - uint8_t const gfx = m_p_chargen[base | (chr << 4) | ra] ^ inv; // Display a scanline of a character (8 pixels) for (int b = 0; 8 > b; ++b) + { *p++ = palette[BIT(gfx, 7 - b)]; + } } } } else { - const rgb_t color = palette[0]; - std::fill_n(p, x_count * 8, color); + std::fill_n(p, x_count * 8, palette[0]); } } diff --git a/src/mame/heathkit/tlb.h b/src/mame/heathkit/tlb.h index edc2cde811f..b807c65a6d3 100644 --- a/src/mame/heathkit/tlb.h +++ b/src/mame/heathkit/tlb.h @@ -30,9 +30,14 @@ public: // interface routines auto serial_data_callback() { return m_write_sd.bind(); } + auto dtr_callback() { return m_dtr_cb.bind(); } + auto rts_callback() { return m_rts_cb.bind(); } auto reset_cb() { return m_reset.bind(); } void serial_in_w(int state); + void rlsd_in_w(int state); + void dsr_in_w(int state); + void cts_int_w(int state); void reset_key_w(int state); void right_shift_w(int state); @@ -73,7 +78,9 @@ private: void check_beep_state(); - void serial_out_b(uint8_t data); + void serial_out_b(int data); + void dtr_out(int data); + void rts_out(int data); int mm5740_shift_r(); int mm5740_control_r(); @@ -86,6 +93,8 @@ private: emu_timer *m_bell_timer; devcb_write_line m_write_sd; + devcb_write_line m_dtr_cb; + devcb_write_line m_rts_cb; devcb_write_line m_reset; required_device m_ace; -- cgit v1.2.3