summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Michael Zapf <github@mizapf.de>2021-03-03 19:43:42 +0100
committer Michael Zapf <github@mizapf.de>2021-03-03 19:43:42 +0100
commitcf4c992b557aea744ff0fe0c3cb9af0f6765e7c6 (patch)
tree59ccf2ee82980b17eac7c8ba6d9c19114bd3ef2b /src
parent9a25a60fe24926dedcd870a6abcfdd345f839ba2 (diff)
geneve: Fixed address decoding in IDE card for standard Geneve; changed default for RTC chip.
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/ti99/peb/tn_ide.cpp15
-rw-r--r--src/devices/bus/ti99/peb/tn_ide.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/src/devices/bus/ti99/peb/tn_ide.cpp b/src/devices/bus/ti99/peb/tn_ide.cpp
index f16f86c4823..a1f7528940e 100644
--- a/src/devices/bus/ti99/peb/tn_ide.cpp
+++ b/src/devices/bus/ti99/peb/tn_ide.cpp
@@ -178,7 +178,8 @@ nouspikel_ide_card_device::nouspikel_ide_card_device(const machine_config &mconf
m_ideint(false),
m_mode(MODE_OFF),
m_page(0),
- m_rtctype(0)
+ m_rtctype(0),
+ m_genmod(false)
{
}
@@ -474,6 +475,9 @@ void nouspikel_ide_card_device::decode(offs_t offset, bool& mmap, bool& sramsel,
{
bool inspace = false;
+ // In a normal Geneve, assume AME=1, AMD=0
+ if (!m_genmod) offset = ((offset & 0x07ffff) | 0x100000);
+
// A0=0
if (m_mode == MODE_TI) inspace = ((offset & 0x8000)==0);
else
@@ -666,6 +670,7 @@ void nouspikel_ide_card_device::device_reset()
m_mode = ioport("MODE")->read();
m_srammap = (ioport("MAPMODE")->read()!=0);
m_rtctype = rtype[ioport("RTC")->read()];
+ m_genmod = (ioport("GENMOD")->read() != 0);
// The 65271 option does not support buffered SRAM; only the BQ4847
// can drive a buffered external RAM; the other two chips have internal SRAM
@@ -689,12 +694,18 @@ INPUT_CHANGED_MEMBER( nouspikel_ide_card_device::mode_changed )
INPUT_PORTS_START( tn_ide )
PORT_START("RTC")
- PORT_CONFNAME(0x03, 0, "RTC chip")
+ PORT_CONFNAME(0x03, 1, "RTC chip")
PORT_CONFSETTING(0, "RTC-65271")
PORT_CONFSETTING(1, "BQ4847 (ext SRAM)")
PORT_CONFSETTING(2, "BQ4842 (128K)")
PORT_CONFSETTING(3, "BQ4852 (512K)")
+ // When used in a normal Geneve, AME/AMD lines are set to (1,0)
+ PORT_START("GENMOD")
+ PORT_CONFNAME(0x01, 0, "Genmod decoding")
+ PORT_CONFSETTING(0, DEF_STR( Off ))
+ PORT_CONFSETTING(1, DEF_STR( On ))
+
// The switch should be open (1) on powerup for BQ clock chips
PORT_START("MAPMODE")
PORT_DIPNAME(0x1, 1, "Map at boot time") PORT_CHANGED_MEMBER(DEVICE_SELF, nouspikel_ide_card_device, mode_changed, 0)
diff --git a/src/devices/bus/ti99/peb/tn_ide.h b/src/devices/bus/ti99/peb/tn_ide.h
index cfed79c26ad..8286b6e4801 100644
--- a/src/devices/bus/ti99/peb/tn_ide.h
+++ b/src/devices/bus/ti99/peb/tn_ide.h
@@ -68,6 +68,9 @@ private:
// RTC type
int m_rtctype;
+ // Genmod decoding. If not used, the AME line is pulled up, and the AMD line is pulled down
+ bool m_genmod;
+
DECLARE_WRITE_LINE_MEMBER(clock_interrupt_callback);
DECLARE_WRITE_LINE_MEMBER(ide_interrupt_callback);
DECLARE_WRITE_LINE_MEMBER(resetdr_callback);