summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/abc1600.cpp3
-rw-r--r--src/mame/includes/abc1600.h1
-rw-r--r--src/mame/machine/abc1600mac.cpp26
-rw-r--r--src/mame/machine/abc1600mac.h8
4 files changed, 28 insertions, 10 deletions
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index 201041283b6..876a041cdc5 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -424,7 +424,7 @@ void abc1600_state::spec_contr_reg_w(uint8_t data)
break;
case 4: // PARTST
- m_partst = state;
+ m_mac->partst_w(state);
break;
case 5: // _DMADIS
@@ -815,7 +815,6 @@ void abc1600_state::machine_start()
save_item(NAME(m_dmadis));
save_item(NAME(m_sysscc));
save_item(NAME(m_sysfs));
- save_item(NAME(m_partst));
save_item(NAME(m_cs7));
save_item(NAME(m_bus0));
save_item(NAME(m_csb));
diff --git a/src/mame/includes/abc1600.h b/src/mame/includes/abc1600.h
index d3b7d086f4f..2526b6900b5 100644
--- a/src/mame/includes/abc1600.h
+++ b/src/mame/includes/abc1600.h
@@ -149,7 +149,6 @@ private:
int m_dmadis = 0;
int m_sysscc = 0;
int m_sysfs = 0;
- int m_partst = 0; // parity test
void abc1600_mem(address_map &map);
void mac_mem(address_map &map);
diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp
index bc32fa05673..81190890414 100644
--- a/src/mame/machine/abc1600mac.cpp
+++ b/src/mame/machine/abc1600mac.cpp
@@ -26,6 +26,8 @@
#define PAGE_WP BIT(page_data, 14)
#define PAGE_NONX BIT(page_data, 15)
+#define DMAOK 0x04
+
//**************************************************************************
@@ -107,7 +109,8 @@ abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char
m_boote(0),
m_magic(0),
m_task(0),
- m_cause(0)
+ m_cause(0),
+ m_partst(0)
{
}
@@ -130,6 +133,7 @@ void abc1600_mac_device::device_start()
save_item(NAME(m_task));
save_item(NAME(m_dmamap));
save_item(NAME(m_cause));
+ save_item(NAME(m_partst));
// HACK fill segment RAM or abcenix won't boot
memset(m_segment_ram, 0xff, 0x200);
@@ -183,6 +187,8 @@ inline offs_t abc1600_mac_device::get_physical_offset(offs_t offset, int task, b
nonx = PAGE_NONX;
wp = PAGE_WP;
+ m_cause = ((offset >> 13) & 0x1f) | DMAOK;
+
if (LOG && (offset != virtual_offset)) logerror("%s MAC %05x:%06x (SEGA %03x SEGD %02x PGA %03x PGD %04x NONX %u WP %u TASK %u FC %u MAGIC %u)\n",
machine().describe_context(), offset, virtual_offset, sega, segd, pga, page_data, nonx, wp, task, m_read_fc(), m_magic);
@@ -313,10 +319,12 @@ uint8_t abc1600_mac_device::cause_r()
*/
- uint8_t data = 0x02;
+ uint8_t data = 0;
- // DMA status
- data |= m_cause;
+ if (!m_partst)
+ {
+ data = 0x02 | m_cause;
+ }
m_watchdog->watchdog_reset();
@@ -675,6 +683,16 @@ void abc1600_mac_device::dmamap_w(offs_t offset, uint8_t data)
//-------------------------------------------------
+// partst_w - parity test
+//-------------------------------------------------
+
+void abc1600_mac_device::partst_w(int state)
+{
+ m_partst = state;
+}
+
+
+//-------------------------------------------------
// dump - dump MAC mappings
//-------------------------------------------------
diff --git a/src/mame/machine/abc1600mac.h b/src/mame/machine/abc1600mac.h
index abe1ffdc3d2..73b0695a727 100644
--- a/src/mame/machine/abc1600mac.h
+++ b/src/mame/machine/abc1600mac.h
@@ -56,6 +56,7 @@ public:
uint8_t page_hi_r(offs_t offset);
void page_hi_w(offs_t offset, uint8_t data);
void dmamap_w(offs_t offset, uint8_t data);
+ void partst_w(int state);
uint8_t dma0_mreq_r(offs_t offset) { return dma_mreq_r(0, DMAMAP_R0_LO, offset); }
void dma0_mreq_w(offs_t offset, uint8_t data) { dma_mreq_w(0, DMAMAP_R0_LO, offset, data); }
@@ -122,12 +123,13 @@ private:
devcb_read8::array<3> m_read_tren;
devcb_write8::array<3> m_write_tren;
- bool m_boote;
- bool m_magic;
- int m_task;
+ bool m_boote = 0;
+ bool m_magic = 0;
+ int m_task = 0;
uint8_t m_dmamap[8];
uint8_t m_cause;
+ bool m_partst = 0;
};