mirror of
https://github.com/holub/mame
synced 2025-07-06 02:18:09 +03:00
sed1330: Calculate frame rate for LCD screen (nw)
pc8401a: Derive clocks from XTAL (might well be different for pc8500, so not used there) (nw)
This commit is contained in:
parent
0a72dcb2e0
commit
d9905f3d03
@ -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:
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user