summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2016-08-31 15:05:37 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2016-08-31 15:05:37 +0200
commitfc262685f6ff089aa82b1db6dc28fc9f762a0e41 (patch)
tree362b2752fd6835a714c99bb5c5929872234d5b11
parent5cc832da59f1ad4f20898555209aa7842794ef72 (diff)
ti99: Added debug read.
-rw-r--r--src/devices/bus/ti99_peb/ti_fdc.cpp21
-rw-r--r--src/devices/bus/ti99_peb/ti_fdc.h3
2 files changed, 24 insertions, 0 deletions
diff --git a/src/devices/bus/ti99_peb/ti_fdc.cpp b/src/devices/bus/ti99_peb/ti_fdc.cpp
index df24aea6580..70ce8954090 100644
--- a/src/devices/bus/ti99_peb/ti_fdc.cpp
+++ b/src/devices/bus/ti99_peb/ti_fdc.cpp
@@ -113,8 +113,27 @@ SETADDRESS_DBIN_MEMBER( ti_fdc_device::setaddress_dbin )
operate_ready_line();
}
+/*
+ Access for debugger. This is a stripped-down version of the
+ main methods below. We only allow ROM access.
+*/
+void ti_fdc_device::debug_read(offs_t offset, UINT8* value)
+{
+ if (((offset & m_select_mask)==m_select_value) && m_selected)
+ {
+ if ((offset & 0x1ff1)!=0x1ff0)
+ *value = m_dsrrom[offset & 0x1fff];
+ }
+}
+
READ8Z_MEMBER(ti_fdc_device::readz)
{
+ if (space.debugger_access())
+ {
+ debug_read(offset, value);
+ return;
+ }
+
if (m_inDsrArea && m_selected)
{
// Read ports of 1771 are mapped to 5FF0,2,4,6: 0101 1111 1111 0xx0
@@ -150,6 +169,8 @@ READ8Z_MEMBER(ti_fdc_device::readz)
WRITE8_MEMBER(ti_fdc_device::write)
{
+ if (space.debugger_access()) return;
+
if (m_inDsrArea && m_selected)
{
// Write ports of 1771 are mapped to 5FF8,A,C,E: 0101 1111 1111 1xx0
diff --git a/src/devices/bus/ti99_peb/ti_fdc.h b/src/devices/bus/ti99_peb/ti_fdc.h
index 7cb6267cab5..e71050d34e1 100644
--- a/src/devices/bus/ti99_peb/ti_fdc.h
+++ b/src/devices/bus/ti99_peb/ti_fdc.h
@@ -47,6 +47,9 @@ protected:
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
+ // For debugger access
+ void debug_read(offs_t offset, UINT8* value);
+
// Wait state logic
void operate_ready_line();