summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/tmp68301.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/tmp68301.h')
-rw-r--r--src/devices/machine/tmp68301.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h
index c350b9b0be6..e019387802b 100644
--- a/src/devices/machine/tmp68301.h
+++ b/src/devices/machine/tmp68301.h
@@ -16,19 +16,27 @@
-class tmp68301_device : public m68000_device
+class tmp68301_device : public device_t,
+ public device_memory_interface
{
public:
tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ template <typename T> void set_cputag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } // FIXME: M68000 ought to be a parent class, not an external object
auto in_parallel_callback() { return m_in_parallel_cb.bind(); }
auto out_parallel_callback() { return m_out_parallel_cb.bind(); }
+ // Hardware Registers
+ DECLARE_READ16_MEMBER( regs_r );
+ DECLARE_WRITE16_MEMBER( regs_w );
+
// Interrupts
void external_interrupt_0();
void external_interrupt_1();
void external_interrupt_2();
+ IRQ_CALLBACK_MEMBER(irq_callback);
+
private:
DECLARE_READ16_MEMBER(imr_r);
DECLARE_WRITE16_MEMBER(imr_w);
@@ -45,18 +53,13 @@ private:
DECLARE_READ8_MEMBER(icr_r);
DECLARE_WRITE8_MEMBER(icr_w);
- // Hardware Registers
- DECLARE_READ16_MEMBER( regs_r );
- DECLARE_WRITE16_MEMBER( regs_w );
-
void tmp68301_regs(address_map &map);
- IRQ_CALLBACK_MEMBER(irq_callback);
-
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ virtual space_config_vector memory_space_config() const override;
private:
TIMER_CALLBACK_MEMBER(timer_callback);
@@ -75,6 +78,11 @@ private:
static constexpr uint16_t TIMER1_IRQ = 1 << 9;
static constexpr uint16_t TIMER2_IRQ = 1 << 10;
+ inline uint16_t read_word(offs_t address);
+ inline void write_word(offs_t address, uint16_t data);
+
+ required_device<m68000_base_device> m_cpu;
+
devcb_read16 m_in_parallel_cb;
devcb_write16 m_out_parallel_cb;
@@ -92,6 +100,8 @@ private:
uint16_t m_pdir;
uint16_t m_pdr;
uint8_t m_icr[10];
+
+ const address_space_config m_space_config;
};
DECLARE_DEVICE_TYPE(TMP68301, tmp68301_device)