diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-10-03 19:50:59 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-10-03 19:50:59 -0400 |
commit | 6555282d47ab109ddc880abcc28c6ba910d861b3 (patch) | |
tree | cc06f1b491c47e37568f5b9bcc402a098a59dc0b | |
parent | 3a13c26b245ccd842240827e355b254bed50eceb (diff) |
monzagp: Experimental visible area offset (nw)
-rw-r--r-- | src/devices/video/dp8350.cpp | 10 | ||||
-rw-r--r-- | src/mame/drivers/monzagp.cpp | 16 |
2 files changed, 10 insertions, 16 deletions
diff --git a/src/devices/video/dp8350.cpp b/src/devices/video/dp8350.cpp index f5e7362bfdc..6ae35f07b91 100644 --- a/src/devices/video/dp8350.cpp +++ b/src/devices/video/dp8350.cpp @@ -241,15 +241,9 @@ void dp835x_device::reconfigure_screen() attotime refresh = clocks_to_attotime(lines_per_frame * m_dots_per_line); if (m_half_shift) - { - rectangle visarea(0, 2 * m_dots_per_row - 1, 0, m_video_scan_lines - 1); - screen().configure(2 * m_dots_per_line, lines_per_frame, visarea, refresh.as_attoseconds()); - } + screen().configure(2 * m_dots_per_line, lines_per_frame, screen().visible_area(), refresh.as_attoseconds()); else - { - rectangle visarea(0, m_dots_per_row - 1, 0, m_video_scan_lines - 1); - screen().configure(m_dots_per_line, lines_per_frame, visarea, refresh.as_attoseconds()); - } + screen().configure(m_dots_per_line, lines_per_frame, screen().visible_area(), refresh.as_attoseconds()); logerror("Frame rate refresh: %.2f Hz (f%d); horizontal rate scan: %.4f kHz; character rate: %.4f MHz; dot rate: %.5f MHz\n", ATTOSECONDS_TO_HZ(refresh.as_attoseconds()), diff --git a/src/mame/drivers/monzagp.cpp b/src/mame/drivers/monzagp.cpp index e860f04acf1..3cbc2bad05a 100644 --- a/src/mame/drivers/monzagp.cpp +++ b/src/mame/drivers/monzagp.cpp @@ -73,7 +73,7 @@ private: virtual void machine_start() override; TIMER_DEVICE_CALLBACK_MEMBER(time_tick_timer); DECLARE_PALETTE_INIT(monzagp); - uint32_t screen_update_monzagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<cpu_device> m_maincpu; required_device<dp8350_device> m_crtc; required_device<gfxdecode_device> m_gfxdecode; @@ -168,7 +168,7 @@ void monzagp_state::machine_start() m_digits.resolve(); } -uint32_t monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t monzagp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* for(int i=0;i<8;i++) @@ -510,19 +510,19 @@ MACHINE_CONFIG_START(monzagp_state::monzagp) MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, monzagp_state, port2_w)) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_UPDATE_DRIVER(monzagp_state, screen_update_monzagp) - MCFG_SCREEN_PALETTE("palette") + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(10920000, 700, 0, 560, 312, 11, 240); // 11-line offset makes attract mode look symmetric + screen.set_screen_update(FUNC(monzagp_state::screen_update)); + screen.set_palette(m_palette); DP8350(config, m_crtc, 10920000); // pins 21/22 connected to XTAL, 3 to GND, 5 to +5 m_crtc->set_screen("screen"); m_crtc->refresh_control(0); m_crtc->vsync_callback().set_inputline(m_maincpu, MCS48_INPUT_IRQ).invert(); // active low; no inverter should be needed - MCFG_PALETTE_ADD("palette", 0x200) - MCFG_PALETTE_INIT_OWNER(monzagp_state, monzagp) + PALETTE(config, m_palette, 0x200).set_init(FUNC(monzagp_state::palette_init_monzagp)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_monzagp) + GFXDECODE(config, "gfxdecode", "palette", gfx_monzagp); MCFG_TIMER_DRIVER_ADD_PERIODIC("time_tick_timer", monzagp_state, time_tick_timer, attotime::from_hz(4)) |