pdp8: Make this skeleton CPU file buildable

This commit is contained in:
AJR 2021-05-09 19:19:50 -04:00
parent efaab6518b
commit 2077c7dca0
2 changed files with 12 additions and 16 deletions

View File

@ -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;
}

View File

@ -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__ */