diff options
author | 2015-09-08 14:41:35 +0200 | |
---|---|---|
committer | 2015-09-08 14:41:35 +0200 | |
commit | c79dd5981bc4a1a05ba2e83f5f00f4ea6ad8d612 (patch) | |
tree | b246e33bae473e45e51f6f79de17aa45e61a3001 | |
parent | efa3a679a331ea91002a0bc72e49a230ff2a2f67 (diff) |
hp64k: moved baud rate generator from generic clock to com8116
-rw-r--r-- | src/mess/drivers/hp64k.c | 534 |
1 files changed, 256 insertions, 278 deletions
diff --git a/src/mess/drivers/hp64k.c b/src/mess/drivers/hp64k.c index 0671ea5702e..61dd5942d01 100644 --- a/src/mess/drivers/hp64k.c +++ b/src/mess/drivers/hp64k.c @@ -156,7 +156,7 @@ #include "machine/74123.h" #include "machine/rescap.h" #include "sound/beep.h" -#include "machine/clock.h" +#include "machine/com8116.h" #include "machine/i8251.h" #include "bus/rs232/rs232.h" @@ -166,8 +166,6 @@ #define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n)) #define BIT_SET(w , n) ((w) |= BIT_MASK(n)) -#define BAUD_RATE_GEN_CLOCK 5068800 - class hp64k_state : public driver_device { public: @@ -216,21 +214,21 @@ public: DECLARE_READ16_MEMBER(hp64k_usart_r); DECLARE_WRITE16_MEMBER(hp64k_usart_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_rxrdy_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_txrdy_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_txd_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_dtr_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_rts_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_rxrdy_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_txrdy_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_txd_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_dtr_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_rts_w); DECLARE_WRITE16_MEMBER(hp64k_loopback_w); - void hp64k_update_loopback(void); - DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_rxd_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_dcd_w); - DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_cts_w); + void hp64k_update_loopback(void); + DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_rxd_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_dcd_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_cts_w); DECLARE_WRITE16_MEMBER(hp64k_beep_w); TIMER_DEVICE_CALLBACK_MEMBER(hp64k_beeper_off); - DECLARE_WRITE_LINE_MEMBER(hp64k_baud_clk_w); + DECLARE_WRITE_LINE_MEMBER(hp64k_baud_clk_w); private: required_device<hp_5061_3011_cpu_device> m_cpu; required_device<i8275_device> m_crtc; @@ -248,10 +246,10 @@ private: required_ioport m_rs232_sw; required_device<beep_device> m_beeper; required_device<timer_device> m_beep_timer; - required_device<clock_device> m_baud_rate; - required_ioport m_s5_sw; - required_device<i8251_device> m_uart; - required_device<rs232_port_device> m_rs232; + required_device<com8116_device> m_baud_rate; + required_ioport m_s5_sw; + required_device<i8251_device> m_uart; + required_device<rs232_port_device> m_rs232; // Character generator const UINT8 *m_chargen; @@ -302,14 +300,14 @@ private: floppy_state_t m_floppy_if_state; floppy_image_device *m_current_floppy; - // RS232 I/F - bool m_16x_clk; - bool m_baud_clk; - UINT8 m_16x_div; - bool m_loopback; - bool m_txd_state; - bool m_dtr_state; - bool m_rts_state; + // RS232 I/F + bool m_16x_clk; + bool m_baud_clk; + UINT8 m_16x_div; + bool m_loopback; + bool m_txd_state; + bool m_dtr_state; + bool m_rts_state; }; static ADDRESS_MAP_START(cpu_mem_map , AS_PROGRAM , 16 , hp64k_state) @@ -329,9 +327,9 @@ static ADDRESS_MAP_START(cpu_io_map , AS_IO , 16 , hp64k_state) // PA = 4, IC = [0..3] // Floppy I/F AM_RANGE(HP_MAKE_IOADDR(4 , 0) , HP_MAKE_IOADDR(4 , 3)) AM_READWRITE(hp64k_flp_r , hp64k_flp_w) - // PA = 5, IC = [0..3] - // Write to USART - AM_RANGE(HP_MAKE_IOADDR(5 , 0) , HP_MAKE_IOADDR(5 , 3)) AM_WRITE(hp64k_usart_w) + // PA = 5, IC = [0..3] + // Write to USART + AM_RANGE(HP_MAKE_IOADDR(5 , 0) , HP_MAKE_IOADDR(5 , 3)) AM_WRITE(hp64k_usart_w) // PA = 6, IC = [0..3] // Read from USART AM_RANGE(HP_MAKE_IOADDR(6 , 0) , HP_MAKE_IOADDR(6 , 3)) AM_READ(hp64k_usart_r) @@ -366,11 +364,11 @@ hp64k_state::hp64k_state(const machine_config &mconfig, device_type type, const m_rear_panel_sw(*this , "rear_sw"), m_rs232_sw(*this , "rs232_sw"), m_beeper(*this , "beeper"), - m_beep_timer(*this , "beep_timer"), - m_baud_rate(*this , "baud_rate"), - m_s5_sw(*this , "s5_sw"), - m_uart(*this , "uart"), - m_rs232(*this , "rs232") + m_beep_timer(*this , "beep_timer"), + m_baud_rate(*this , "baud_rate"), + m_s5_sw(*this , "s5_sw"), + m_uart(*this , "uart"), + m_rs232(*this , "rs232") { } @@ -385,26 +383,6 @@ void hp64k_state::video_start() m_chargen = memregion("chargen")->base(); } -// Divisors of K1135 baud rate generator -static unsigned baud_rate_divisors[] = { - 6336, - 4224, - 2880, - 2355, - 2112, - 1056, - 528, - 264, - 176, - 158, - 132, - 88, - 66, - 44, - 33, - 16 -}; - void hp64k_state::machine_reset() { m_crtc_drq = false; @@ -428,12 +406,12 @@ void hp64k_state::machine_reset() m_floppy0_wpt = false; m_floppy1_wpt = false; m_beeper->set_state(0); - m_baud_rate->set_unscaled_clock(BAUD_RATE_GEN_CLOCK / baud_rate_divisors[ (m_s5_sw->read() >> 1) & 0xf ]); - m_16x_clk = (m_rs232_sw->read() & 0x02) != 0; - m_loopback = false; - m_txd_state = true; - m_dtr_state = true; - m_rts_state = true; + m_baud_rate->str_w((m_s5_sw->read() >> 1) & 0xf); + m_16x_clk = (m_rs232_sw->read() & 0x02) != 0; + m_loopback = false; + m_txd_state = true; + m_dtr_state = true; + m_rts_state = true; } @@ -958,125 +936,125 @@ void hp64k_state::hp64k_floppy_wpt_cb(floppy_image_device *floppy , int state) READ16_MEMBER(hp64k_state::hp64k_usart_r) { - UINT16 tmp; + UINT16 tmp; - if ((offset & 1) == 0) { - tmp = m_uart->status_r(space , 0); - } else { - tmp = m_uart->data_r(space , 0); - } + if ((offset & 1) == 0) { + tmp = m_uart->status_r(space , 0); + } else { + tmp = m_uart->data_r(space , 0); + } // bit 8 == bit 7 rear panel switches (modem/terminal) ??? - tmp |= (m_rs232_sw->read() << 8); + tmp |= (m_rs232_sw->read() << 8); - if (BIT(m_rear_panel_sw->read() , 7)) { - BIT_SET(tmp , 8); - } + if (BIT(m_rear_panel_sw->read() , 7)) { + BIT_SET(tmp , 8); + } return tmp; } WRITE16_MEMBER(hp64k_state::hp64k_usart_w) { - if ((offset & 1) == 0) { - m_uart->control_w(space , 0 , (UINT8)(data & 0xff)); - } else { - m_uart->data_w(space , 0 , (UINT8)(data & 0xff)); - } + if ((offset & 1) == 0) { + m_uart->control_w(space , 0 , (UINT8)(data & 0xff)); + } else { + m_uart->data_w(space , 0 , (UINT8)(data & 0xff)); + } } WRITE_LINE_MEMBER(hp64k_state::hp64k_rxrdy_w) { - if (state) { - BIT_SET(m_irl_pending , 6); - } else { - BIT_CLR(m_irl_pending , 6); - } + if (state) { + BIT_SET(m_irl_pending , 6); + } else { + BIT_CLR(m_irl_pending , 6); + } - hp64k_update_irl(); + hp64k_update_irl(); } WRITE_LINE_MEMBER(hp64k_state::hp64k_txrdy_w) { - if (state) { - BIT_SET(m_irl_pending , 5); - } else { - BIT_CLR(m_irl_pending , 5); - } + if (state) { + BIT_SET(m_irl_pending , 5); + } else { + BIT_CLR(m_irl_pending , 5); + } - hp64k_update_irl(); + hp64k_update_irl(); } WRITE_LINE_MEMBER(hp64k_state::hp64k_txd_w) { - m_txd_state = state; - if (m_loopback) { - m_uart->write_rxd(state); - } - m_rs232->write_txd(state); + m_txd_state = state; + if (m_loopback) { + m_uart->write_rxd(state); + } + m_rs232->write_txd(state); } WRITE_LINE_MEMBER(hp64k_state::hp64k_dtr_w) { - m_dtr_state = state; - if (m_loopback) { - m_uart->write_dsr(state); - } - m_rs232->write_dtr(state); + m_dtr_state = state; + if (m_loopback) { + m_uart->write_dsr(state); + } + m_rs232->write_dtr(state); } WRITE_LINE_MEMBER(hp64k_state::hp64k_rts_w) { - if (BIT(m_s5_sw->read() , 0)) { - // Full duplex, RTS/ = 0 - state = 0; - } - m_rts_state = state; - if (m_loopback) { - m_uart->write_cts(state); - } - m_rs232->write_rts(state); + if (BIT(m_s5_sw->read() , 0)) { + // Full duplex, RTS/ = 0 + state = 0; + } + m_rts_state = state; + if (m_loopback) { + m_uart->write_cts(state); + } + m_rs232->write_rts(state); } WRITE16_MEMBER(hp64k_state::hp64k_loopback_w) { - m_loopback = BIT(data , 11); - hp64k_update_loopback(); + m_loopback = BIT(data , 11); + hp64k_update_loopback(); } void hp64k_state::hp64k_update_loopback(void) { - if (m_loopback) { - m_uart->write_rxd(m_txd_state); - m_uart->write_dsr(m_dtr_state); - m_uart->write_cts(m_rts_state); - } else { - m_uart->write_rxd(m_rs232->rxd_r()); - m_uart->write_dsr(m_rs232->dcd_r()); - m_uart->write_cts(m_rs232->cts_r()); - } + if (m_loopback) { + m_uart->write_rxd(m_txd_state); + m_uart->write_dsr(m_dtr_state); + m_uart->write_cts(m_rts_state); + } else { + m_uart->write_rxd(m_rs232->rxd_r()); + m_uart->write_dsr(m_rs232->dcd_r()); + m_uart->write_cts(m_rs232->cts_r()); + } } WRITE_LINE_MEMBER(hp64k_state::hp64k_rs232_rxd_w) { - if (!m_loopback) { - m_uart->write_rxd(state); - } + if (!m_loopback) { + m_uart->write_rxd(state); + } } WRITE_LINE_MEMBER(hp64k_state::hp64k_rs232_dcd_w) { - if (!m_loopback) { - m_uart->write_dsr(state); - } + if (!m_loopback) { + m_uart->write_dsr(state); + } } WRITE_LINE_MEMBER(hp64k_state::hp64k_rs232_cts_w) { - if (!m_loopback) { - m_uart->write_cts(state); - } + if (!m_loopback) { + m_uart->write_cts(state); + } } WRITE16_MEMBER(hp64k_state::hp64k_beep_w) @@ -1095,15 +1073,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp64k_state::hp64k_beeper_off) WRITE_LINE_MEMBER(hp64k_state::hp64k_baud_clk_w) { - if (!m_16x_clk) { - if (state && !m_baud_clk) { - m_16x_div++; - } - m_baud_clk = !!state; - state = BIT(m_16x_div , 3); + if (!m_16x_clk) { + if (state && !m_baud_clk) { + m_16x_div++; } - m_uart->write_txc(state); - m_uart->write_rxc(state); + m_baud_clk = !!state; + state = BIT(m_16x_div , 3); + } + m_uart->write_txc(state); + m_uart->write_rxc(state); } static INPUT_PORTS_START(hp64k) @@ -1249,101 +1227,101 @@ static INPUT_PORTS_START(hp64k) PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("PREVPG") - PORT_START("rear_sw") - PORT_DIPNAME(0x8000 , 0x8000 , "E9-6 jumper") - PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) - PORT_DIPSETTING(0x8000 , DEF_STR(No)) - PORT_DIPNAME(0x4000 , 0x4000 , "E9-5 jumper") - PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) - PORT_DIPSETTING(0x4000 , DEF_STR(No)) - PORT_DIPNAME(0x2000 , 0x2000 , "E9-4 jumper") - PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) - PORT_DIPSETTING(0x2000 , DEF_STR(No)) - PORT_DIPNAME(0x1000 , 0x1000 , "E9-3 jumper") - PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) - PORT_DIPSETTING(0x1000 , DEF_STR(No)) - PORT_DIPNAME(0x0800 , 0x0800 , "E9-2 jumper") - PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) - PORT_DIPSETTING(0x0800 , DEF_STR(No)) - PORT_DIPNAME(0x0400 , 0x0400 , "E9-1 jumper") - PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) - PORT_DIPSETTING(0x0400 , DEF_STR(No)) - PORT_DIPNAME(0x0018 , 0x0000 , "System source") - PORT_DIPLOCATION("S1:!7,!6") - PORT_DIPSETTING(0x0000 , "Sys bus") - PORT_DIPSETTING(0x0008 , "Local storage-talk only") - PORT_DIPSETTING(0x0010 , "Local storage-addressable") - PORT_DIPSETTING(0x0018 , "Performance verification") - PORT_DIPNAME(0x0300 , 0x0000 , "Upper bus address (N/U)") - PORT_DIPLOCATION("S1:!2,!1") - PORT_DIPSETTING(0x0000 , "0") - PORT_DIPSETTING(0x0100 , "1") - PORT_DIPSETTING(0x0200 , "2") - PORT_DIPSETTING(0x0300 , "3") - PORT_DIPNAME(0x0007 , 0x0000 , "System bus address") - PORT_DIPLOCATION("S1:!5,!4,!3") - PORT_DIPSETTING(0x0000 , "0") - PORT_DIPSETTING(0x0001 , "1") - PORT_DIPSETTING(0x0002 , "2") - PORT_DIPSETTING(0x0003 , "3") - PORT_DIPSETTING(0x0004 , "4") - PORT_DIPSETTING(0x0005 , "5") - PORT_DIPSETTING(0x0006 , "6") - PORT_DIPSETTING(0x0007 , "7") - PORT_DIPNAME(0x0080 , 0x0000 , "RS232 mode") - PORT_DIPLOCATION("S4 IO:!8") - PORT_DIPSETTING(0x0000 , "Terminal") - PORT_DIPSETTING(0x0080 , "Modem") - - PORT_START("rs232_sw") - PORT_DIPNAME(0xc0 , 0x00 , "Stop bits") - PORT_DIPLOCATION("S4 IO:!2,!1") - PORT_DIPSETTING(0x00 , "Invalid") - PORT_DIPSETTING(0x40 , "1") - PORT_DIPSETTING(0x80 , "1.5") - PORT_DIPSETTING(0xc0 , "2") - PORT_DIPNAME(0x20 , 0x00 , "Parity") - PORT_DIPLOCATION("S4 IO:!3") - PORT_DIPSETTING(0x00 , "Odd") - PORT_DIPSETTING(0x20 , "Even") - PORT_DIPNAME(0x10 , 0x00 , "Parity enable") - PORT_DIPLOCATION("S4 IO:!4") - PORT_DIPSETTING(0x00 , DEF_STR(No)) - PORT_DIPSETTING(0x10 , DEF_STR(Yes)) - PORT_DIPNAME(0x0c , 0x00 , "Char length") - PORT_DIPLOCATION("S4 IO:!6,!5") - PORT_DIPSETTING(0x00 , "5") - PORT_DIPSETTING(0x04 , "6") - PORT_DIPSETTING(0x08 , "7") - PORT_DIPSETTING(0x0c , "8") - PORT_DIPNAME(0x02 , 0x00 , "Baud rate factor") - PORT_DIPLOCATION("S4 IO:!7") - PORT_DIPSETTING(0x00 , "1x") - PORT_DIPSETTING(0x02 , "16x") - - PORT_START("s5_sw") - PORT_DIPNAME(0x01 , 0x00 , "Duplex") - PORT_DIPLOCATION("S5 IO:!1") - PORT_DIPSETTING(0x00 , "Half duplex") - PORT_DIPSETTING(0x01 , "Full duplex") - PORT_DIPNAME(0x1e , 0x00 , "Baud rate") - PORT_DIPLOCATION("S5 IO:!5,!4,!3,!2") - PORT_DIPSETTING(0x00 , "50") - PORT_DIPSETTING(0x02 , "75") - PORT_DIPSETTING(0x04 , "110") - PORT_DIPSETTING(0x06 , "134.5") - PORT_DIPSETTING(0x08 , "150") - PORT_DIPSETTING(0x0a , "300") - PORT_DIPSETTING(0x0c , "600") - PORT_DIPSETTING(0x0e , "1200") - PORT_DIPSETTING(0x10 , "1800") - PORT_DIPSETTING(0x12 , "2000") - PORT_DIPSETTING(0x14 , "2400") - PORT_DIPSETTING(0x16 , "3600") - PORT_DIPSETTING(0x18 , "4800") - PORT_DIPSETTING(0x1a , "7200") - PORT_DIPSETTING(0x1c , "9600") - PORT_DIPSETTING(0x1e , "19200") + PORT_START("rear_sw") + PORT_DIPNAME(0x8000 , 0x8000 , "E9-6 jumper") + PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) + PORT_DIPSETTING(0x8000 , DEF_STR(No)) + PORT_DIPNAME(0x4000 , 0x4000 , "E9-5 jumper") + PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) + PORT_DIPSETTING(0x4000 , DEF_STR(No)) + PORT_DIPNAME(0x2000 , 0x2000 , "E9-4 jumper") + PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) + PORT_DIPSETTING(0x2000 , DEF_STR(No)) + PORT_DIPNAME(0x1000 , 0x1000 , "E9-3 jumper") + PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) + PORT_DIPSETTING(0x1000 , DEF_STR(No)) + PORT_DIPNAME(0x0800 , 0x0800 , "E9-2 jumper") + PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) + PORT_DIPSETTING(0x0800 , DEF_STR(No)) + PORT_DIPNAME(0x0400 , 0x0400 , "E9-1 jumper") + PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) + PORT_DIPSETTING(0x0400 , DEF_STR(No)) + PORT_DIPNAME(0x0018 , 0x0000 , "System source") + PORT_DIPLOCATION("S1:!7,!6") + PORT_DIPSETTING(0x0000 , "Sys bus") + PORT_DIPSETTING(0x0008 , "Local storage-talk only") + PORT_DIPSETTING(0x0010 , "Local storage-addressable") + PORT_DIPSETTING(0x0018 , "Performance verification") + PORT_DIPNAME(0x0300 , 0x0000 , "Upper bus address (N/U)") + PORT_DIPLOCATION("S1:!2,!1") + PORT_DIPSETTING(0x0000 , "0") + PORT_DIPSETTING(0x0100 , "1") + PORT_DIPSETTING(0x0200 , "2") + PORT_DIPSETTING(0x0300 , "3") + PORT_DIPNAME(0x0007 , 0x0000 , "System bus address") + PORT_DIPLOCATION("S1:!5,!4,!3") + PORT_DIPSETTING(0x0000 , "0") + PORT_DIPSETTING(0x0001 , "1") + PORT_DIPSETTING(0x0002 , "2") + PORT_DIPSETTING(0x0003 , "3") + PORT_DIPSETTING(0x0004 , "4") + PORT_DIPSETTING(0x0005 , "5") + PORT_DIPSETTING(0x0006 , "6") + PORT_DIPSETTING(0x0007 , "7") + PORT_DIPNAME(0x0080 , 0x0000 , "RS232 mode") + PORT_DIPLOCATION("S4 IO:!8") + PORT_DIPSETTING(0x0000 , "Terminal") + PORT_DIPSETTING(0x0080 , "Modem") + + PORT_START("rs232_sw") + PORT_DIPNAME(0xc0 , 0x00 , "Stop bits") + PORT_DIPLOCATION("S4 IO:!2,!1") + PORT_DIPSETTING(0x00 , "Invalid") + PORT_DIPSETTING(0x40 , "1") + PORT_DIPSETTING(0x80 , "1.5") + PORT_DIPSETTING(0xc0 , "2") + PORT_DIPNAME(0x20 , 0x00 , "Parity") + PORT_DIPLOCATION("S4 IO:!3") + PORT_DIPSETTING(0x00 , "Odd") + PORT_DIPSETTING(0x20 , "Even") + PORT_DIPNAME(0x10 , 0x00 , "Parity enable") + PORT_DIPLOCATION("S4 IO:!4") + PORT_DIPSETTING(0x00 , DEF_STR(No)) + PORT_DIPSETTING(0x10 , DEF_STR(Yes)) + PORT_DIPNAME(0x0c , 0x00 , "Char length") + PORT_DIPLOCATION("S4 IO:!6,!5") + PORT_DIPSETTING(0x00 , "5") + PORT_DIPSETTING(0x04 , "6") + PORT_DIPSETTING(0x08 , "7") + PORT_DIPSETTING(0x0c , "8") + PORT_DIPNAME(0x02 , 0x00 , "Baud rate factor") + PORT_DIPLOCATION("S4 IO:!7") + PORT_DIPSETTING(0x00 , "1x") + PORT_DIPSETTING(0x02 , "16x") + + PORT_START("s5_sw") + PORT_DIPNAME(0x01 , 0x00 , "Duplex") + PORT_DIPLOCATION("S5 IO:!1") + PORT_DIPSETTING(0x00 , "Half duplex") + PORT_DIPSETTING(0x01 , "Full duplex") + PORT_DIPNAME(0x1e , 0x00 , "Baud rate") + PORT_DIPLOCATION("S5 IO:!5,!4,!3,!2") + PORT_DIPSETTING(0x00 , "50") + PORT_DIPSETTING(0x02 , "75") + PORT_DIPSETTING(0x04 , "110") + PORT_DIPSETTING(0x06 , "134.5") + PORT_DIPSETTING(0x08 , "150") + PORT_DIPSETTING(0x0a , "300") + PORT_DIPSETTING(0x0c , "600") + PORT_DIPSETTING(0x0e , "1200") + PORT_DIPSETTING(0x10 , "1800") + PORT_DIPSETTING(0x12 , "2000") + PORT_DIPSETTING(0x14 , "2400") + PORT_DIPSETTING(0x16 , "3600") + PORT_DIPSETTING(0x18 , "4800") + PORT_DIPSETTING(0x1a , "7200") + PORT_DIPSETTING(0x1c , "9600") + PORT_DIPSETTING(0x1e , "19200") INPUT_PORTS_END @@ -1361,12 +1339,12 @@ static MACHINE_CONFIG_START(hp64k , hp64k_state) // Actual keyboard refresh rate should be between 1 and 2 kHz MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer" , hp64k_state , hp64k_kb_scan , attotime::from_hz(100)) - // Line sync timer. A line frequency of 50 Hz is assumed. - MCFG_TIMER_DRIVER_ADD_PERIODIC("linesync_timer" , hp64k_state , hp64k_line_sync , attotime::from_hz(50)) + // Line sync timer. A line frequency of 50 Hz is assumed. + MCFG_TIMER_DRIVER_ADD_PERIODIC("linesync_timer" , hp64k_state , hp64k_line_sync , attotime::from_hz(50)) // Clock = 25 MHz / 9 * (112/114) MCFG_DEVICE_ADD("crtc" , I8275 , 2729045) - MCFG_VIDEO_SET_SCREEN("screen") + MCFG_VIDEO_SET_SCREEN("screen") MCFG_I8275_CHARACTER_WIDTH(9) MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(hp64k_state , crtc_display_pixels) MCFG_I8275_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_crtc_drq_w)) @@ -1375,55 +1353,55 @@ static MACHINE_CONFIG_START(hp64k , hp64k_state) MCFG_SCREEN_ADD("screen" , RASTER) MCFG_SCREEN_UPDATE_DEVICE("crtc" , i8275_device , screen_update) MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_SIZE(720 , 390) + MCFG_SCREEN_SIZE(720 , 390) MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") - MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4) - MCFG_WD_FDC_FORCE_READY - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_drq_w)) - MCFG_FLOPPY_DRIVE_ADD("fdc:0" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) - MCFG_SLOT_FIXED(true) - MCFG_FLOPPY_DRIVE_ADD("fdc:1" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) - MCFG_SLOT_FIXED(true) - - MCFG_DEVICE_ADD("fdc_rdy0" , TTL74123 , 0) - MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) - MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) - // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF - MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) - MCFG_TTL74123_B_PIN_VALUE(1) - MCFG_TTL74123_CLEAR_PIN_VALUE(1) - MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy0_rdy)); - - MCFG_DEVICE_ADD("fdc_rdy1" , TTL74123 , 0) - MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) - MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) - MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) - MCFG_TTL74123_B_PIN_VALUE(1) - MCFG_TTL74123_CLEAR_PIN_VALUE(1) - MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy1_rdy)); - - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("beeper" , BEEP , 2500) - MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) - - MCFG_TIMER_DRIVER_ADD("beep_timer" , hp64k_state , hp64k_beeper_off); - - MCFG_DEVICE_ADD("baud_rate" , CLOCK , 0) - MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(hp64k_state , hp64k_baud_clk_w)); - - MCFG_DEVICE_ADD("uart" , I8251 , 0) - MCFG_I8251_RXRDY_HANDLER(WRITELINE(hp64k_state , hp64k_rxrdy_w)); - MCFG_I8251_TXRDY_HANDLER(WRITELINE(hp64k_state , hp64k_txrdy_w)); - MCFG_I8251_TXD_HANDLER(WRITELINE(hp64k_state , hp64k_txd_w)); - MCFG_I8251_DTR_HANDLER(WRITELINE(hp64k_state , hp64k_dtr_w)); - MCFG_I8251_RTS_HANDLER(WRITELINE(hp64k_state , hp64k_rts_w)); - - MCFG_RS232_PORT_ADD("rs232" , default_rs232_devices , NULL) - MCFG_RS232_RXD_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_rxd_w)) - MCFG_RS232_DCD_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_dcd_w)) - MCFG_RS232_CTS_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_cts_w)) + MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4) + MCFG_WD_FDC_FORCE_READY + MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_intrq_w)) + MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_drq_w)) + MCFG_FLOPPY_DRIVE_ADD("fdc:0" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) + MCFG_SLOT_FIXED(true) + MCFG_FLOPPY_DRIVE_ADD("fdc:1" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) + MCFG_SLOT_FIXED(true) + + MCFG_DEVICE_ADD("fdc_rdy0" , TTL74123 , 0) + MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) + MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) + // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF + MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) + MCFG_TTL74123_B_PIN_VALUE(1) + MCFG_TTL74123_CLEAR_PIN_VALUE(1) + MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy0_rdy)); + + MCFG_DEVICE_ADD("fdc_rdy1" , TTL74123 , 0) + MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) + MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) + MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) + MCFG_TTL74123_B_PIN_VALUE(1) + MCFG_TTL74123_CLEAR_PIN_VALUE(1) + MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy1_rdy)); + + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper" , BEEP , 2500) + MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) + + MCFG_TIMER_DRIVER_ADD("beep_timer" , hp64k_state , hp64k_beeper_off); + + MCFG_DEVICE_ADD("baud_rate" , COM8116 , XTAL_5_0688MHz) + MCFG_COM8116_FR_HANDLER(WRITELINE(hp64k_state , hp64k_baud_clk_w)); + + MCFG_DEVICE_ADD("uart" , I8251 , 0) + MCFG_I8251_RXRDY_HANDLER(WRITELINE(hp64k_state , hp64k_rxrdy_w)); + MCFG_I8251_TXRDY_HANDLER(WRITELINE(hp64k_state , hp64k_txrdy_w)); + MCFG_I8251_TXD_HANDLER(WRITELINE(hp64k_state , hp64k_txd_w)); + MCFG_I8251_DTR_HANDLER(WRITELINE(hp64k_state , hp64k_dtr_w)); + MCFG_I8251_RTS_HANDLER(WRITELINE(hp64k_state , hp64k_rts_w)); + + MCFG_RS232_PORT_ADD("rs232" , default_rs232_devices , NULL) + MCFG_RS232_RXD_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_rxd_w)) + MCFG_RS232_DCD_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_dcd_w)) + MCFG_RS232_CTS_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_cts_w)) MACHINE_CONFIG_END |