From 8c333311f116149d3282bd44731ef3f655b918fa Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Sat, 18 Apr 2020 12:41:33 +0300 Subject: [PATCH] abc1600: Fixed floppy DMA. [Curt Coder] --- src/devices/bus/abcbus/abcbus.cpp | 12 ++++++++++-- src/mame/drivers/abc1600.cpp | 2 -- src/mame/machine/abc1600mac.cpp | 8 +++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/devices/bus/abcbus/abcbus.cpp b/src/devices/bus/abcbus/abcbus.cpp index e0ce60ef990..714c4608975 100644 --- a/src/devices/bus/abcbus/abcbus.cpp +++ b/src/devices/bus/abcbus/abcbus.cpp @@ -50,8 +50,16 @@ abcbus_slot_device::abcbus_slot_device(const machine_config &mconfig, const char m_write_xint2(*this), m_write_xint3(*this), m_write_xint4(*this), - m_write_xint5(*this), m_card(nullptr), m_irq(0), m_nmi(0), m_pren(0), - m_trrq(0), m_xint2(0), m_xint3(0), m_xint4(0), m_xint5(0) + m_write_xint5(*this), + m_card(nullptr), + m_irq(CLEAR_LINE), + m_nmi(CLEAR_LINE), + m_pren(1), + m_trrq(1), + m_xint2(CLEAR_LINE), + m_xint3(CLEAR_LINE), + m_xint4(CLEAR_LINE), + m_xint5(CLEAR_LINE) { } diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp index 79d507d0c87..ab0766d5124 100644 --- a/src/mame/drivers/abc1600.cpp +++ b/src/mame/drivers/abc1600.cpp @@ -34,8 +34,6 @@ TODO: - - starting from MAME 0.151, the Z80 DMA reads 0x08 as the 257th byte to transfer from disk t0s14 thus failing a comparison @ 37cfa, leading to a watchdog reset - changing z80dma.cpp:480 to "done = (m_count == 0);" fixes this but isn't the real reason - segment/page RAM addresses are not correctly decoded, "sas/format/format" after abcenix is booted can't find the SASI interface because of this [:mac] ':3f' (08A98) MAC 7e4a2:0004a2 (SEGA 02f SEGD 09 PGA 09c PGD 8000 NONX 1 WP 0) should be diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp index bf367da1a07..0dabd223a6e 100644 --- a/src/mame/machine/abc1600mac.cpp +++ b/src/mame/machine/abc1600mac.cpp @@ -18,6 +18,7 @@ #define LOG 0 #define LOG_MAC 0 #define LOG_DMA 0 +#define LOG_IO 0 #define A0 BIT(offset, 0) @@ -245,8 +246,11 @@ uint8_t abc1600_mac_device::read_user_memory(offs_t offset) { int nonx = 0, wp = 0; offs_t virtual_offset = translate_address(offset, &nonx, &wp); + uint8_t data = space().read_byte(virtual_offset); - return space().read_byte(virtual_offset); + if (LOG_IO && virtual_offset >= 0x1fe000) logerror("%s user read %06x:%02x\n", machine().describe_context(), virtual_offset, data); + + return data; } @@ -261,6 +265,8 @@ void abc1600_mac_device::write_user_memory(offs_t offset, uint8_t data) //if (nonx || !wp) return; + if (LOG_IO && virtual_offset >= 0x1fe000) logerror("%s user write %06x:%02x\n", machine().describe_context(), virtual_offset, data); + space().write_byte(virtual_offset, data); }