summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/univac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/univac.cpp')
-rw-r--r--src/mame/drivers/univac.cpp23
1 files changed, 11 insertions, 12 deletions
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));