summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/a2bus/a2themill.cpp22
-rw-r--r--src/devices/bus/a2bus/a2themill.h3
2 files changed, 22 insertions, 3 deletions
diff --git a/src/devices/bus/a2bus/a2themill.cpp b/src/devices/bus/a2bus/a2themill.cpp
index 87a4e330ddd..44925c4c68b 100644
--- a/src/devices/bus/a2bus/a2themill.cpp
+++ b/src/devices/bus/a2bus/a2themill.cpp
@@ -18,8 +18,6 @@
ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot
the disc and type "-DEMO1" and press Enter to launch the simple demo.
- TODO: Add DIP switch to select standard and OS-9 modes.
-
*********************************************************************/
#include "emu.h"
@@ -43,6 +41,23 @@ void a2bus_themill_device::m6809_mem(address_map &map)
map(0x0000, 0xffff).rw(FUNC(a2bus_themill_device::dma_r), FUNC(a2bus_themill_device::dma_w));
}
+static INPUT_PORTS_START( themill )
+ PORT_START("MILLCFG")
+ PORT_DIPNAME( 0x01, 0x01, "6809 Mapping" )
+ PORT_DIPSETTING( 0x00, "Original")
+ PORT_DIPSETTING( 0x01, "OS-9")
+INPUT_PORTS_END
+
+//-------------------------------------------------
+// input_ports - device-specific input ports
+//-------------------------------------------------
+
+ioport_constructor a2bus_themill_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( themill );
+}
+
+
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
@@ -65,6 +80,7 @@ a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device
: device_t(mconfig, type, tag, owner, clock)
, device_a2bus_card_interface(mconfig, *this)
, m_6809(*this, "m6809")
+ , m_cfgsw(*this, "MILLCFG")
, m_bEnabled(false)
, m_flipAddrSpace(false)
, m_6809Mode(false)
@@ -93,7 +109,7 @@ void a2bus_themill_device::device_reset()
{
m_bEnabled = false;
m_flipAddrSpace = false;
- m_6809Mode = true;
+ m_6809Mode = (m_cfgsw->read() & 1) ? true : false;
m_status = 0xc0; // OS9 loader relies on this
m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
diff --git a/src/devices/bus/a2bus/a2themill.h b/src/devices/bus/a2bus/a2themill.h
index 152cfa6882d..59f0c2316d1 100644
--- a/src/devices/bus/a2bus/a2themill.h
+++ b/src/devices/bus/a2bus/a2themill.h
@@ -33,6 +33,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
// overrides of standard a2bus slot functions
virtual uint8_t read_c0nx(uint8_t offset) override;
@@ -41,6 +42,8 @@ protected:
private:
required_device<cpu_device> m_6809;
+ required_ioport m_cfgsw;
+
bool m_bEnabled;
bool m_flipAddrSpace;
bool m_6809Mode;