diff options
author | 2019-10-15 02:09:30 -0400 | |
---|---|---|
committer | 2019-10-15 02:09:30 -0400 | |
commit | d9905f3d0314dcde2017d7b6b6840d08cd2b89f1 (patch) | |
tree | 84d15ac035d4bfd1028bfceec88c63da954bc7cf | |
parent | 0a72dcb2e09e1d544499b32221443d3752208a82 (diff) |
sed1330: Calculate frame rate for LCD screen (nw)
pc8401a: Derive clocks from XTAL (might well be different for pc8500, so not used there) (nw)
-rw-r--r-- | src/devices/video/sed1330.cpp | 7 | ||||
-rw-r--r-- | src/mame/drivers/pc8401a.cpp | 2 | ||||
-rw-r--r-- | src/mame/video/pc8401a.cpp | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp index 862c0ba675b..40027444684 100644 --- a/src/devices/video/sed1330.cpp +++ b/src/devices/video/sed1330.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "sed1330.h" +#include "screen.h" //#define VERBOSE 1 #include "logmacro.h" @@ -383,6 +384,12 @@ WRITE8_MEMBER( sed1330_device::data_w ) case 5: m_lf = data + 1; LOG("SED1330 Frame Height: %u\n", m_lf); + if (clock() != 0) + { + attotime fr = clocks_to_attotime(m_tcr * m_lf * 9); + screen().configure(m_tcr * m_fx, m_lf, screen().visible_area(), fr.as_attoseconds()); + LOG("SED1330 Frame Rate: %.1f Hz\n", fr.as_hz()); + } break; case 6: diff --git a/src/mame/drivers/pc8401a.cpp b/src/mame/drivers/pc8401a.cpp index 13ef80a6f87..d8e05c318ee 100644 --- a/src/mame/drivers/pc8401a.cpp +++ b/src/mame/drivers/pc8401a.cpp @@ -573,7 +573,7 @@ WRITE8_MEMBER( pc8401a_state::ppi_pc_w ) void pc8401a_state::pc8401a(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // NEC uPD70008C + Z80(config, m_maincpu, 7.987_MHz_XTAL / 2); // NEC uPD70008C m_maincpu->set_addrmap(AS_PROGRAM, &pc8401a_state::pc8401a_mem); m_maincpu->set_addrmap(AS_IO, &pc8401a_state::pc8401a_io); diff --git a/src/mame/video/pc8401a.cpp b/src/mame/video/pc8401a.cpp index 832b5c7cb1b..c851f937bc8 100644 --- a/src/mame/video/pc8401a.cpp +++ b/src/mame/video/pc8401a.cpp @@ -72,7 +72,7 @@ void pc8401a_state::pc8401a_video(machine_config &config) m_screen_lcd->set_visarea(0, 480-1, 0, 128-1); m_screen_lcd->set_palette("palette"); - SED1330(config, m_lcdc, 0); + SED1330(config, m_lcdc, 7.987_MHz_XTAL); m_lcdc->set_screen(m_screen_lcd); m_lcdc->set_addrmap(0, &pc8401a_state::pc8401a_lcdc); } @@ -91,7 +91,7 @@ void pc8500_state::pc8500_video(machine_config &config) m_screen_lcd->set_visarea(0, 480-1, 0, 200-1); m_screen_lcd->set_palette("palette"); - SED1330(config, m_lcdc, 0); + SED1330(config, m_lcdc, 8000000); m_lcdc->set_screen(SCREEN_TAG); m_lcdc->set_addrmap(0, &pc8500_state::pc8500_lcdc); |