From 50b50a818fcad0c72387ec276dea493a9ca78f65 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 10 Nov 2018 14:43:51 -0500 Subject: univac.cpp: Add customized CRTC; configure CTC using verified input frequencies (nw) --- src/devices/video/dp8350.cpp | 23 ++++++++++++++++++++++- src/devices/video/dp8350.h | 10 ++++++++++ src/mame/drivers/univac.cpp | 23 +++++++++++------------ 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/devices/video/dp8350.cpp b/src/devices/video/dp8350.cpp index b15ad895a67..4443b58348b 100644 --- a/src/devices/video/dp8350.cpp +++ b/src/devices/video/dp8350.cpp @@ -28,7 +28,9 @@ designation also comes from there, since the actual IC is merely marked with its HP part number, 1820-2373.) DP8369 is another variant ordered by General Terminal Corp. for their SW10 terminal; - option “K” is its National designation. + option “K” is its National designation. Sperry Univac ordered + another variant whose actual number is unknown but appears to use + the option “A” parameters. Variant Dot rate Monitor type ------- -------- ------------ @@ -37,6 +39,7 @@ DP8353 17.6256 MHz Motorola M3003 DP8367 25.7715 MHz HP 13220 DP8369 12.2472 MHz GTC SW10 + DP???? 19.98 MHz Sperry Univac UTS **********************************************************************/ @@ -55,6 +58,7 @@ // device type definitions DEFINE_DEVICE_TYPE(DP8350, dp8350_device, "dp8350", "DP8350 CRTC") DEFINE_DEVICE_TYPE(DP8367, dp8367_device, "dp8367", "DP8367 CRTC") +DEFINE_DEVICE_TYPE(DP835X_A, dp835x_a_device, "dp835x_a", "DP835X CRTC (option A)") //************************************************************************** @@ -150,6 +154,23 @@ dp8367_device::dp8367_device(const machine_config &mconfig, const char *tag, dev } +//------------------------------------------------- +// dp835x_a_device - constructor +//------------------------------------------------- + +dp835x_a_device::dp835x_a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : dp835x_device(mconfig, DP835X_A, tag, owner, clock, + 9, 14, 80, 25, + 0, 14, 20, // sync parameters guessed + 38, 59, 94, // sync parameters guessed + 100, 4, 8, 1, // sync parameters and vblank_stop guessed + true, 5, 0, // values assumed + true, true, true) // values assumed +{ +} + + + //------------------------------------------------- // device_config_complete - finalise device // configuration diff --git a/src/devices/video/dp8350.h b/src/devices/video/dp8350.h index e8368c09c32..3a5c16bbf6a 100644 --- a/src/devices/video/dp8350.h +++ b/src/devices/video/dp8350.h @@ -170,8 +170,18 @@ public: dp8367_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); }; +// ======================> dp835x_a_device + +class dp835x_a_device : public dp835x_device +{ +public: + // device constructor + dp835x_a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); +}; + // device type declarations DECLARE_DEVICE_TYPE(DP8350, dp8350_device) DECLARE_DEVICE_TYPE(DP8367, dp8367_device) +DECLARE_DEVICE_TYPE(DP835X_A, dp835x_a_device) #endif // MAME_VIDEO_DP8350_H diff --git a/src/mame/drivers/univac.cpp b/src/mame/drivers/univac.cpp index dbdd2003b5b..b98d7774eab 100644 --- a/src/mame/drivers/univac.cpp +++ b/src/mame/drivers/univac.cpp @@ -48,6 +48,7 @@ You can use a debug trick to get UTS10 to boot: #include "machine/z80ctc.h" #include "machine/z80sio.h" #include "sound/beep.h" +#include "video/dp8350.h" #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -255,7 +256,7 @@ void univac_state::device_post_load() uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - uint8_t y,ra,chr,gfx; + uint8_t y,ra,chr; uint16_t sy=0,x,ma=0; //m_bank_mask; (it isn't port43 that selects the screen) m_framecnt++; @@ -270,7 +271,7 @@ uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap { chr = m_p_videoram[x]; // bit 7 = rv attribute (or dim, depending on control-page setting) - gfx = m_p_chargen[((chr & 0x7f)<<4) | ra] ^ (BIT(chr, 7) ? 0xff : 0); + uint16_t gfx = m_p_chargen[((chr & 0x7f)<<4) | ra] ^ (BIT(chr, 7) ? 0x1ff : 0); // chars 1C, 1D, 1F need special handling if ((chr >= 0x1c) && (chr <= 0x1f) && BIT(gfx, 7)) @@ -282,6 +283,7 @@ uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap } /* Display a scanline of a character */ + *p++ = BIT(gfx, 8); *p++ = BIT(gfx, 7); *p++ = BIT(gfx, 6); *p++ = BIT(gfx, 5); @@ -331,25 +333,22 @@ MACHINE_CONFIG_START(univac_state::uts20) /* video hardware */ MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green()) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(univac_state, screen_update) - MCFG_SCREEN_SIZE(640, 25*14) - MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 25*14-1) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_uts) - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); + dp835x_device &crtc(DP835X_A(config, "crtc", 19'980'000)); + crtc.set_screen("screen"); + crtc.vblank_callback().set(m_ctc, FUNC(z80ctc_device::trg0)); + crtc.vblank_callback().append(m_ctc, FUNC(z80ctc_device::trg3)); - clock_device &ctc_clock(CLOCK(config, "ctc_clock", 2000000)); // unknown - ctc_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg0)); - ctc_clock.signal_handler().append(m_ctc, FUNC(z80ctc_device::trg1)); - ctc_clock.signal_handler().append(m_ctc, FUNC(z80ctc_device::trg2)); - ctc_clock.signal_handler().append(m_ctc, FUNC(z80ctc_device::trg3)); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); Z80CTC(config, m_ctc, 18.432_MHz_XTAL / 6); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + m_ctc->set_clk<1>(18.432_MHz_XTAL / 12); + m_ctc->set_clk<2>(18.432_MHz_XTAL / 12); m_ctc->zc_callback<1>().set(m_uart, FUNC(z80sio_device::txca_w)); m_ctc->zc_callback<1>().append(m_uart, FUNC(z80sio_device::rxca_w)); m_ctc->zc_callback<2>().set(m_uart, FUNC(z80sio_device::rxtxcb_w)); -- cgit v1.2.3