From c64df172806527206f5f77c47c62a55dbb3e6561 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 15 Oct 2016 23:18:48 -0400 Subject: [PATCH] amusco: Minor changes (nw) - RTC writes now actually go through, so the game will remain stuck in 1987 until the date is changed - Add the new machine flag for the unemulated printer - Remove MSM5832 device name from logging messages --- src/devices/machine/msm5832.cpp | 20 +++++++++++--------- src/mame/drivers/amusco.cpp | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp index e87396bcee8..97e89eca2ff 100644 --- a/src/devices/machine/msm5832.cpp +++ b/src/devices/machine/msm5832.cpp @@ -145,6 +145,8 @@ void msm5832_device::device_timer(emu_timer &timer, device_timer_id id, int para void msm5832_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second) { + if (LOG) logerror("MSM5832 Clock Update: %d.%d.%d %d %d:%d:%d\n", year, month, day, day_of_week, hour, minute, second); + write_counter(REGISTER_Y1, year); write_counter(REGISTER_MO1, month); write_counter(REGISTER_D1, day); @@ -180,7 +182,7 @@ READ8_MEMBER( msm5832_device::data_r ) } } - if (LOG) logerror("MSM5832 '%s' Register Read %01x: %01x\n", tag(), m_address, data & 0x0f); + if (LOG) logerror("MSM5832 Register Read %01x: %01x\n", m_address, data & 0x0f); return data & 0x0f; } @@ -192,7 +194,7 @@ READ8_MEMBER( msm5832_device::data_r ) WRITE8_MEMBER( msm5832_device::data_w ) { - if (LOG) logerror("MSM5832 '%s' Register Write %01x: %01x\n", tag(), m_address, data & 0x0f); + if (LOG) logerror("MSM5832 Register Write %01x: %01x\n", m_address, data & 0x0f); if (m_cs && m_write) { @@ -217,7 +219,7 @@ WRITE8_MEMBER( msm5832_device::data_w ) void msm5832_device::address_w(UINT8 data) { - if (LOG) logerror("MSM5832 '%s' Address: %01x\n", tag(), data & 0x0f); + if (LOG) logerror("MSM5832 Address: %01x\n", data & 0x0f); m_address = data & 0x0f; } @@ -229,7 +231,7 @@ void msm5832_device::address_w(UINT8 data) WRITE_LINE_MEMBER( msm5832_device::adj_w ) { - if (LOG) logerror("MSM5832 '%s' 30 ADJ: %u\n", tag(), state); + if (LOG) logerror("MSM5832 30 ADJ: %u\n", state); if (state) { @@ -244,7 +246,7 @@ WRITE_LINE_MEMBER( msm5832_device::adj_w ) WRITE_LINE_MEMBER( msm5832_device::test_w ) { - if (LOG) logerror("MSM5832 '%s' TEST: %u\n", tag(), state); + if (LOG) logerror("MSM5832 TEST: %u\n", state); } @@ -254,7 +256,7 @@ WRITE_LINE_MEMBER( msm5832_device::test_w ) WRITE_LINE_MEMBER( msm5832_device::hold_w ) { - if (LOG) logerror("MSM5832 '%s' HOLD: %u\n", tag(), state); + if (LOG) logerror("MSM5832 HOLD: %u\n", state); m_hold = state; } @@ -266,7 +268,7 @@ WRITE_LINE_MEMBER( msm5832_device::hold_w ) WRITE_LINE_MEMBER( msm5832_device::read_w ) { - if (LOG) logerror("MSM5832 '%s' READ: %u\n", tag(), state); + if (LOG) logerror("MSM5832 READ: %u\n", state); m_read = state; } @@ -278,7 +280,7 @@ WRITE_LINE_MEMBER( msm5832_device::read_w ) WRITE_LINE_MEMBER( msm5832_device::write_w ) { - if (LOG) logerror("MSM5832 '%s' WR: %u\n", tag(), state); + if (LOG) logerror("MSM5832 WR: %u\n", state); m_write = state; } @@ -290,7 +292,7 @@ WRITE_LINE_MEMBER( msm5832_device::write_w ) WRITE_LINE_MEMBER( msm5832_device::cs_w ) { - if (LOG) logerror("MSM5832 '%s' CS: %u\n", tag(), state); + if (LOG) logerror("MSM5832 CS: %u\n", state); m_cs = state; } diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp index ec0aeda20cf..0eb226243de 100644 --- a/src/mame/drivers/amusco.cpp +++ b/src/mame/drivers/amusco.cpp @@ -106,6 +106,7 @@ public: tilemap_t *m_bg_tilemap; TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void video_start() override; + virtual void machine_start() override; DECLARE_READ8_MEMBER(hack_coin1_r); DECLARE_READ8_MEMBER(hack_coin2_r); DECLARE_READ8_MEMBER(hack_908_r); @@ -130,6 +131,7 @@ public: required_device m_screen; UINT8 m_mc6845_address; UINT16 m_video_update_address; + UINT8 m_rtc_data; }; @@ -165,6 +167,11 @@ void amusco_state::video_start() m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(amusco_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 10, 74, 24); } +void amusco_state::machine_start() +{ + m_rtc_data = 0; +} + /************************** * Read / Write Handlers * @@ -290,12 +297,15 @@ WRITE8_MEMBER(amusco_state::rtc_w) case 1: m_rtc->address_w(data & 0x0f); m_rtc->cs_w(BIT(data, 6)); + m_rtc->hold_w(BIT(data, 6)); m_rtc->write_w(BIT(data, 5)); + if (BIT(data, 5)) + m_rtc->data_w(space, 0, m_rtc_data); m_rtc->read_w(BIT(data, 4)); break; case 3: - m_rtc->data_w(space, 0, data); + m_rtc_data = data; break; default: @@ -489,4 +499,4 @@ ROM_END *************************/ /* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 1987, amusco, 0, amusco, amusco, driver_device, 0, ROT0, "Amusco", "American Music Poker (V1.4)", MACHINE_IMPERFECT_COLORS ) // runs much too fast; palette totally wrong +GAME( 1987, amusco, 0, amusco, amusco, driver_device, 0, ROT0, "Amusco", "American Music Poker (V1.4)", MACHINE_IMPERFECT_COLORS | MACHINE_NODEVICE_PRINTER ) // runs much too fast; palette totally wrong