diff options
-rw-r--r-- | src/devices/machine/com8116.cpp | 13 | ||||
-rw-r--r-- | src/devices/machine/com8116.h | 12 | ||||
-rw-r--r-- | src/mame/drivers/v100.cpp | 33 | ||||
-rw-r--r-- | src/mame/drivers/v550.cpp | 4 |
4 files changed, 43 insertions, 19 deletions
diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp index 0a3da24042e..02c266772e2 100644 --- a/src/devices/machine/com8116.cpp +++ b/src/devices/machine/com8116.cpp @@ -25,6 +25,7 @@ DEFINE_DEVICE_TYPE(COM8116, com8116_device, "com8116", "COM8116 Dual BRG") DEFINE_DEVICE_TYPE(COM8116_003, com8116_003_device, "com8116_003", "COM8116-003 Dual BRG") DEFINE_DEVICE_TYPE(COM5016_5, com5016_5_device, "com5016_5", "COM5016-5 Dual BRG") DEFINE_DEVICE_TYPE(COM5016_013, com5016_013_device, "com5016_013", "COM5016-013 Dual BRG") +DEFINE_DEVICE_TYPE(COM8116_020, com8116_020_device, "com8116_020", "COM8116-020 Dual BRG") // Parts with T after the number do not have an internal oscillator and require an external clock source // The SMC/COM 5xxx parts are all dual 5v/12v parts, while the 8xxx parts are 5v only @@ -40,7 +41,6 @@ const int com8116_device::divisors_16X_5_0688MHz[16] = // SMC/COM8116-003 and WD WD-1943-03 // from http://www.vintagecomputer.net/fjkraan/comp/divcomp/doc/SMC_BaudGen.pdf page 283 (pdf page 20) // baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 9600, 19200 -// SMC/COM8116T-020 should have similar output rates, but clock is unknown and probably different const int com8116_device::divisors_16X_6_01835MHz[16] = { 7523, 5015, 3420, 2797, 2508, 1881, 1254, 627, 313, 209, 188, 157, 104, 78, 39, 20 }; @@ -63,6 +63,12 @@ const int com8116_device::divisors_32X_5_0688MHz[16] = const int com8116_device::divisors_16X_2_7648MHz[16] = { 3456, 2304, 1571, 1285, 1152, 864, 576, 288, 144, 96, 86, 72, 48, 36, 18, 9 }; +// SMC/COM8116T-020 (corrected from http://bitsavers.org/pdf/visualTechnology/Visual_100/MM-100-001-0A_Visual_100_and_Visual_400_Video_Display_Terminal_Maintenance_Manual_Sep1980.pdf (pdf page 99)) +// (75, 134.5 and 2000 baud divisors given as 1,807, 856 and 57, which do not match stated actual frequencies) +// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 9600, 19200 +const int com8116_device::divisors_16X_1_8432MHz[16] = + { 2304, 1536, 1047, 857, 768, 576, 384, 192, 96, 64, 58, 48, 32, 24, 12, 6 }; + // SMC/COM5026(T)-030 (non-standard serial rates, from http://bitsavers.informatik.uni-stuttgart.de/pdf/standardMicrosystems/_dataBooks/1979_StandardMicrosystems.pdf page 135) const int com8116_device::divisors_16X_5_0688MHz_030[16] = { 731, 733, 735, 737, 741, 743, 745, 751, 6970, 5569, 5433, 4752, 4269, 1920, 1584, 301 }; @@ -120,6 +126,11 @@ com5016_013_device::com5016_013_device(const machine_config &mconfig, const char { } +com8116_020_device::com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + com8116_device(mconfig, COM8116_020, tag, owner, clock, divisors_16X_1_8432MHz) +{ +} + //------------------------------------------------- // device_start - device-specific startup diff --git a/src/devices/machine/com8116.h b/src/devices/machine/com8116.h index 50c8849e2ee..506ba71c96c 100644 --- a/src/devices/machine/com8116.h +++ b/src/devices/machine/com8116.h @@ -58,6 +58,7 @@ protected: static const int divisors_16X_4_9152MHz[16]; static const int divisors_32X_5_0688MHz[16]; static const int divisors_16X_2_7648MHz[16]; + static const int divisors_16X_1_8432MHz[16]; static const int divisors_16X_5_0688MHz_030[16]; static const int divisors_16X_4_6080MHz[16]; static const int divisors_16X_4_9152MHz_SY2661_1[16]; @@ -123,10 +124,21 @@ public: }; +// ======================> com8116_020_device + +class com8116_020_device : public com8116_device +{ +public: + // construction/destruction + com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +}; + + // device type definition DECLARE_DEVICE_TYPE(COM8116, com8116_device) DECLARE_DEVICE_TYPE(COM8116_003, com8116_003_device) DECLARE_DEVICE_TYPE(COM5016_5, com5016_5_device) DECLARE_DEVICE_TYPE(COM5016_013, com5016_013_device) +DECLARE_DEVICE_TYPE(COM8116_020, com8116_020_device) #endif // MAME_MACHINE_COM8116_H diff --git a/src/mame/drivers/v100.cpp b/src/mame/drivers/v100.cpp index b2942051599..82f840cc00b 100644 --- a/src/mame/drivers/v100.cpp +++ b/src/mame/drivers/v100.cpp @@ -343,36 +343,37 @@ static INPUT_PORTS_START( v100 ) INPUT_PORTS_END -MACHINE_CONFIG_START(v100_state::v100) - MCFG_DEVICE_ADD("maincpu", Z80, XTAL(47'736'000) / 12) // divider not verified - MCFG_DEVICE_PROGRAM_MAP(mem_map) - MCFG_DEVICE_IO_MAP(io_map) - MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(v100_state, irq_ack) +void v100_state::v100(machine_config &config) +{ + Z80(config, m_maincpu, 47.736_MHz_XTAL / 20); // 2.387 MHz PCLOCK + m_maincpu->set_addrmap(AS_PROGRAM, &v100_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &v100_state::io_map); + m_maincpu->set_irq_acknowledge_callback(FUNC(v100_state::irq_ack)); - I8251(config, m_usart[0], XTAL(47'736'000) / 12); // divider not verified + I8251(config, m_usart[0], 47.736_MHz_XTAL / 20); - com8116_device &brg1(COM8116(config, "brg1", 5068800)); // TODO: clock and divisors for this customized variant + com8116_device &brg1(COM8116_020(config, "brg1", 1.8432_MHz_XTAL)); brg1.fr_handler().set(m_usart[0], FUNC(i8251_device::write_rxc)); brg1.ft_handler().set(m_usart[0], FUNC(i8251_device::write_txc)); - I8251(config, m_usart[1], XTAL(47'736'000) / 12); + I8251(config, m_usart[1], 47.736_MHz_XTAL / 20); - com8116_device &brg2(COM8116(config, "brg2", 5068800)); + com8116_device &brg2(COM8116_020(config, "brg2", 1.8432_MHz_XTAL)); brg2.fr_handler().set(m_usart[1], FUNC(i8251_device::write_rxc)); brg2.ft_handler().set(m_usart[1], FUNC(i8251_device::write_txc)); - MCFG_SCREEN_ADD("screen", RASTER) - //MCFG_SCREEN_RAW_PARAMS(XTAL(47'736'000) / 2, 102 * V100_CH_WIDTH, 0, 80 * V100_CH_WIDTH, 260, 0, 240) - MCFG_SCREEN_RAW_PARAMS(XTAL(47'736'000), 170 * V100_CH_WIDTH, 0, 132 * V100_CH_WIDTH, 312, 0, 240) - MCFG_SCREEN_UPDATE_DRIVER(v100_state, screen_update) + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + //m_screen->set_raw(47.736_MHz_XTAL / 2, 102 * V100_CH_WIDTH, 0, 80 * V100_CH_WIDTH, 260, 0, 240); + m_screen->set_raw(47.736_MHz_XTAL, 170 * V100_CH_WIDTH, 0, 132 * V100_CH_WIDTH, 312, 0, 240); + m_screen->set_screen_update(FUNC(v100_state::screen_update)); - CRT5037(config, m_vtac, XTAL(47'736'000) / V100_CH_WIDTH); + CRT5037(config, m_vtac, 47.736_MHz_XTAL / V100_CH_WIDTH); m_vtac->set_char_width(V100_CH_WIDTH); m_vtac->set_screen("screen"); m_vtac->hsyn_callback().set(FUNC(v100_state::picu_r_w<7>)).invert(); m_vtac->vsyn_callback().set(FUNC(v100_state::picu_r_w<6>)).invert(); - I8214(config, m_picu, XTAL(47'736'000) / 12); + I8214(config, m_picu, 47.736_MHz_XTAL / 20); m_picu->int_wr_callback().set_inputline(m_maincpu, 0, ASSERT_LINE); i8255_device &ppi(I8255(config, "ppi", 0)); @@ -384,7 +385,7 @@ MACHINE_CONFIG_START(v100_state::v100) ppi.out_pc_callback().append(m_earom, FUNC(er1400_device::clock_w)).bit(0).invert(); ER1400(config, m_earom); -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/v550.cpp b/src/mame/drivers/v550.cpp index c8b9f504978..404724bacb1 100644 --- a/src/mame/drivers/v550.cpp +++ b/src/mame/drivers/v550.cpp @@ -127,11 +127,11 @@ void v550_state::v550(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "mainint").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - com8116_device &brg1(COM8116(config, "brg1", 5068800)); // actually SMC COM8116T-020 (unknown clock) + com8116_device &brg1(COM8116_020(config, "brg1", 1.8432_MHz_XTAL)); // SMC COM8116T-020 brg1.ft_handler().set("mpsc", FUNC(upd7201_new_device::txca_w)); brg1.fr_handler().set("mpsc", FUNC(upd7201_new_device::rxca_w)); - com8116_device &brg2(COM8116(config, "brg2", 5068800)); // actually SMC COM8116T-020 + com8116_device &brg2(COM8116_020(config, "brg2", 1.8432_MHz_XTAL)); // SMC COM8116T-020 brg2.ft_handler().set("mpsc", FUNC(upd7201_new_device::txcb_w)); brg2.ft_handler().append("mpsc", FUNC(upd7201_new_device::rxcb_w)); brg2.fr_handler().set("usart", FUNC(i8251_device::write_txc)); |