summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2014-02-15 22:15:28 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2014-02-15 22:15:28 +0000
commit1f92dd545201eeed120d8e170fd5ab37bff95d01 (patch)
tree7c9470a29b84f67d0b9b71b31b7f84b85edd85bd /src
parentd438684920d34f490489c057755540e5e87ed444 (diff)
(MESS) apple3: Fix ROM test in Diagnostics and support PCPI AppliCard [R. Belmont]
Diffstat (limited to 'src')
-rw-r--r--src/mess/drivers/apple3.c2
-rw-r--r--src/mess/includes/apple3.h2
-rw-r--r--src/mess/machine/apple3.c14
3 files changed, 11 insertions, 7 deletions
diff --git a/src/mess/drivers/apple3.c b/src/mess/drivers/apple3.c
index c024c941ba0..df63d10d8f9 100644
--- a/src/mess/drivers/apple3.c
+++ b/src/mess/drivers/apple3.c
@@ -22,6 +22,7 @@
#include "machine/appldriv.h"
#include "bus/a2bus/a2cffa.h"
+#include "bus/a2bus/a2applicard.h"
static ADDRESS_MAP_START( apple3_map, AS_PROGRAM, 8, apple3_state )
AM_RANGE(0x0000, 0xffff) AM_READWRITE(apple3_memory_r, apple3_memory_w)
@@ -42,6 +43,7 @@ static const floppy_interface apple3_floppy_interface =
static SLOT_INTERFACE_START(apple3_cards)
SLOT_INTERFACE("cffa2", A2BUS_CFFA2_6502) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */
+ SLOT_INTERFACE("applicard", A2BUS_APPLICARD) /* PCPI Applicard */
SLOT_INTERFACE_END
static const struct a2bus_interface a2bus_intf =
diff --git a/src/mess/includes/apple3.h b/src/mess/includes/apple3.h
index eb87b5890f9..d0872412d05 100644
--- a/src/mess/includes/apple3.h
+++ b/src/mess/includes/apple3.h
@@ -93,7 +93,7 @@ public:
UINT8 *apple3_get_zpa_addr(offs_t offset);
void apple3_update_memory();
void apple3_via_out(UINT8 *var, UINT8 data);
- UINT8 *apple3_get_indexed_addr(offs_t offset);
+ UINT8 *apple3_get_indexed_addr(offs_t offset, bool is_write);
TIMER_DEVICE_CALLBACK_MEMBER(apple3_c040_tick);
DECLARE_PALETTE_INIT(apple3);
void apple3_irq_update();
diff --git a/src/mess/machine/apple3.c b/src/mess/machine/apple3.c
index 53e23ef690d..76b5d0719c1 100644
--- a/src/mess/machine/apple3.c
+++ b/src/mess/machine/apple3.c
@@ -3,9 +3,9 @@
machine/apple3.c
Apple ///
-
+
VIA #0 (D VIA)
- CA1: IRQ from the MM58167 RTC
+ CA1: IRQ from the MM58167 RTC
CA2: 1 if key pressed, 0 otherwise
CB1/CB2: connected to VBL
@@ -541,7 +541,7 @@ MACHINE_RESET_MEMBER(apple3_state,apple3)
-UINT8 *apple3_state::apple3_get_indexed_addr(offs_t offset)
+UINT8 *apple3_state::apple3_get_indexed_addr(offs_t offset, bool is_write)
{
UINT8 n;
UINT8 *result = NULL;
@@ -598,7 +598,7 @@ UINT8 *apple3_state::apple3_get_indexed_addr(offs_t offset)
result = apple3_bankaddr(~0, ((offs_t) m_via_0_b) * 0x100 + offset);
}
}
- else if ((offset >= 0xF000) && (m_via_0_a & 0x01))
+ else if ((offset >= 0xF000) && (m_via_0_a & 0x01) && (is_write))
{
/* The Apple /// Diagnostics seems to expect that indexed writes
* always write to RAM. That image jumps to an address that is
@@ -606,6 +606,8 @@ UINT8 *apple3_state::apple3_get_indexed_addr(offs_t offset)
*
* The confidence test and the diagnostics together indicates
* that this *doesn't* apply to the VIA region, however.
+ *
+ * The Diagnostics' ROM test shows this is for writes only.
*/
if (offset < 0xffd0 || offset > 0xffef)
@@ -737,7 +739,7 @@ READ8_MEMBER(apple3_state::apple3_memory_r)
((m_indir_count == 3) && ((!(m_indir_opcode & 0x10)) && (((m_indir_opcode & 0xf) == 0xc) || ((m_indir_opcode & 0xf) == 0xd)))))
{
UINT8 *test;
- test = apple3_get_indexed_addr(offset);
+ test = apple3_get_indexed_addr(offset, false);
if (test)
{
@@ -894,7 +896,7 @@ WRITE8_MEMBER(apple3_state::apple3_memory_w)
if ((!space.debugger_access()) && (m_indir_count > 0))
{
UINT8 *test;
- test = apple3_get_indexed_addr(offset);
+ test = apple3_get_indexed_addr(offset, true);
if (test)
{