diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2021-05-09 19:19:50 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2021-05-09 19:19:50 -0400 |
commit | 2077c7dca05c4ccf01e0535f72518fb0aff206b5 (patch) | |
tree | cd895fef0aae67220e38ce6448ac2903ad9db9e0 | |
parent | efaab6518b705b1aa58087878467ba9c3d6e92a1 (diff) |
pdp8: Make this skeleton CPU file buildable
-rw-r--r-- | src/devices/cpu/pdp8/pdp8.cpp | 24 | ||||
-rw-r--r-- | src/devices/cpu/pdp8/pdp8.h | 4 |
2 files changed, 12 insertions, 16 deletions
diff --git a/src/devices/cpu/pdp8/pdp8.cpp b/src/devices/cpu/pdp8/pdp8.cpp index e8090c8dfde..c34281af2cb 100644 --- a/src/devices/cpu/pdp8/pdp8.cpp +++ b/src/devices/cpu/pdp8/pdp8.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(PDP8, pdp8_device, "pdp8_cpu", "DEC PDP8") pdp8_device::pdp8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cpu_device(mconfig, PDP8, tag, owner, clock), - m_program_config("program", ENDIANNESS_BIG, 12, 12, -1), + m_program_config("program", ENDIANNESS_BIG, 16, 12, -1), m_pc(0), m_ac(0), m_mb(0), @@ -63,6 +63,7 @@ pdp8_device::pdp8_device(const machine_config &mconfig, const char *tag, device_ m_icount(0) { // Allocate & setup + m_program_config.m_is_octal = true; } @@ -115,18 +116,15 @@ void pdp8_device::device_reset() //------------------------------------------------- -// memory_space_config - return the configuration -// of the specified address space, or nullptr if -// the space doesn't exist +// memory_space_config - return a vector of +// address space configurations for this device //------------------------------------------------- -const address_space_config *pdp8_device::memory_space_config(int spacenum) const +device_memory_interface::space_config_vector pdp8_device::memory_space_config() const { - if (spacenum == AS_PROGRAM) - { - return &m_program_config; - } - return nullptr; + return space_config_vector { + std::make_pair(AS_PROGRAM, &m_program_config), + }; } @@ -140,7 +138,7 @@ void pdp8_device::state_string_export(const device_state_entry &entry, std::stri switch (entry.index()) { case STATE_GENFLAGS: - strprintf(str, "%c", m_halt ? 'H' : '.'); + str = util::string_format("%c", m_halt ? 'H' : '.'); break; } } @@ -151,7 +149,7 @@ void pdp8_device::state_string_export(const device_state_entry &entry, std::stri // helper function //------------------------------------------------- -std::unique_ptr<util::disasm_interface> pdp8_cpu_device::create_disassembler() +std::unique_ptr<util::disasm_interface> pdp8_device::create_disassembler() { return std::make_unique<pdp8_disassembler>(); } @@ -218,7 +216,7 @@ void pdp8_device::execute_run() debugger_instruction_hook(m_pc); - uint16_t op = m_program->read_word(m_pc); + uint16_t op [[maybe_unused]] = m_program->read_word(m_pc); --m_icount; } diff --git a/src/devices/cpu/pdp8/pdp8.h b/src/devices/cpu/pdp8/pdp8.h index 75fe4da45ab..ef6c4af95ae 100644 --- a/src/devices/cpu/pdp8/pdp8.h +++ b/src/devices/cpu/pdp8/pdp8.h @@ -46,7 +46,7 @@ public: virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; // address spaces - const address_space_config m_program_config; + address_space_config m_program_config; enum state { @@ -106,6 +106,4 @@ enum PDP8_HALT }; -CPU_DISASSEMBLE( pdp8 ); - #endif /* __PDP8_H__ */ |