diff options
author | 2018-12-01 20:36:05 +0100 | |
---|---|---|
committer | 2018-12-01 20:36:16 +0100 | |
commit | ede3786b9e428d9fbad24b1b844a17902c9ec670 (patch) | |
tree | 6dadfa7c63139667ca1d1be6752bd27334a3ea52 | |
parent | ecd1131eb6cd23ffb4288cfffef6b5c05b612fde (diff) |
tms32031.cpp: Fixed the disassembler. [Ryan Holtz]
-rw-r--r-- | src/devices/cpu/tms32031/tms32031.cpp | 15 | ||||
-rw-r--r-- | 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<util::disasm_interface> 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); |