From ede3786b9e428d9fbad24b1b844a17902c9ec670 Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Sat, 1 Dec 2018 20:36:05 +0100 Subject: tms32031.cpp: Fixed the disassembler. [Ryan Holtz] --- src/devices/cpu/tms32031/tms32031.cpp | 15 +++++++++------ src/devices/cpu/tms32031/tms32031.h | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp index fb13fbba9ce..e0e071e5518 100644 --- a/src/devices/cpu/tms32031/tms32031.cpp +++ b/src/devices/cpu/tms32031/tms32031.cpp @@ -96,6 +96,7 @@ DEFINE_DEVICE_TYPE(TMS32032, tms32032_device, "tms32032", "Texas Instruments TMS // TODO: expand to cover all the standard internal peripherals void tms3203x_device::common_3203x(address_map &map) { + map(0x000000, 0x000fff).r(FUNC(tms3203x_device::bootrom_r)); map(0x808064, 0x808064).rw(FUNC(tms3203x_device::primary_bus_control_r), FUNC(tms3203x_device::primary_bus_control_w)); } @@ -353,15 +354,20 @@ const tiny_rom_entry *tms3203x_device::device_rom_region() const } } +READ32_MEMBER(tms3203x_device::bootrom_r) +{ + if (m_mcbl_mode) + return m_bootrom[offset]; + + return m_cache->read_dword(offset); +} + //------------------------------------------------- // ROPCODE - fetch an opcode //------------------------------------------------- inline uint32_t tms3203x_device::ROPCODE(offs_t pc) { - if (m_mcbl_mode && pc < 0x1000) - return m_bootrom[pc]; - return m_cache->read_dword(pc); } @@ -372,9 +378,6 @@ inline uint32_t tms3203x_device::ROPCODE(offs_t pc) inline uint32_t tms3203x_device::RMEM(offs_t addr) { - if (m_mcbl_mode && addr < 0x1000) - return m_bootrom[addr]; - return m_program->read_dword(addr); } diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h index 14b7ab015db..beb312ddf61 100644 --- a/src/devices/cpu/tms32031/tms32031.h +++ b/src/devices/cpu/tms32031/tms32031.h @@ -190,6 +190,9 @@ protected: // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; + // internal memory handlers + DECLARE_READ32_MEMBER(bootrom_r); + // internal peripheral device handlers DECLARE_READ32_MEMBER(primary_bus_control_r) { return m_primary_bus_control; } DECLARE_WRITE32_MEMBER(primary_bus_control_w); -- cgit v1.2.3