summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/hpc/hpc.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/cpu/hpc/hpc.h
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/devices/cpu/hpc/hpc.h')
-rw-r--r--src/devices/cpu/hpc/hpc.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/devices/cpu/hpc/hpc.h b/src/devices/cpu/hpc/hpc.h
new file mode 100644
index 00000000000..5f73a0ee2e6
--- /dev/null
+++ b/src/devices/cpu/hpc/hpc.h
@@ -0,0 +1,88 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_HPC_HPC_H
+#define MAME_CPU_HPC_HPC_H
+
+#pragma once
+
+
+class hpc_device : public cpu_device
+{
+public:
+ enum {
+ HPC_PSW,
+ HPC_SP,
+ HPC_PC,
+ HPC_A,
+ HPC_K,
+ HPC_B,
+ HPC_X
+ };
+
+protected:
+ // construction/destruction
+ hpc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map);
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // device_execute_interface overrides
+ virtual void execute_run() override;
+ virtual void execute_set_input(int inputnum, int state) override;
+
+ // device_memory_interface overrides
+ virtual space_config_vector memory_space_config() const override;
+
+ // internal register access
+ u8 psw_r();
+ void psw_w(u8 data);
+
+private:
+ // address space
+ address_space_config m_program_config;
+ address_space *m_program;
+
+ // internal state
+ required_shared_ptr<u16> m_core_regs;
+ u8 m_psw;
+
+ // execution sequencing
+ s32 m_icount;
+};
+
+class hpc46003_device : public hpc_device
+{
+public:
+ // construction/destruction
+ hpc46003_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device_disasm_interface overrides
+ virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+
+private:
+ void internal_map(address_map &map);
+};
+
+class hpc46104_device : public hpc_device
+{
+public:
+ // construction/destruction
+ hpc46104_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device_disasm_interface overrides
+ virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+
+private:
+ void internal_map(address_map &map);
+};
+
+
+// device type declarations
+DECLARE_DEVICE_TYPE(HPC46003, hpc46003_device)
+DECLARE_DEVICE_TYPE(HPC46104, hpc46104_device)
+
+#endif // MAME_CPU_HPC_HPC_H