From fc262685f6ff089aa82b1db6dc28fc9f762a0e41 Mon Sep 17 00:00:00 2001 From: Michael Zapf Date: Wed, 31 Aug 2016 15:05:37 +0200 Subject: [PATCH] ti99: Added debug read. --- src/devices/bus/ti99_peb/ti_fdc.cpp | 21 +++++++++++++++++++++ src/devices/bus/ti99_peb/ti_fdc.h | 3 +++ 2 files changed, 24 insertions(+) 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();