summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/smpc.h
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-10-04 21:05:48 +0200
committer angelosa <salese_corp_ltd@email.it>2017-10-05 05:10:29 +0200
commitb6f6b3bfd16f7172d2bc10c71cfe3ab1bc93cca0 (patch)
tree03c9b2237780f67d98150e0ff2430fe0cf2a4dea /src/devices/machine/smpc.h
parent27f564762ab67b879745fafbce5dd797b553bfce (diff)
smpc.cpp: move IREG & OREG to internal device state (nw)
Diffstat (limited to 'src/devices/machine/smpc.h')
-rw-r--r--src/devices/machine/smpc.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/devices/machine/smpc.h b/src/devices/machine/smpc.h
index f5bcdc1144e..359194bfe6b 100644
--- a/src/devices/machine/smpc.h
+++ b/src/devices/machine/smpc.h
@@ -74,6 +74,8 @@ public:
virtual space_config_vector memory_space_config() const override;
// I/O operations
+ DECLARE_WRITE8_MEMBER( ireg_w );
+ DECLARE_READ8_MEMBER( oreg_r );
DECLARE_READ8_MEMBER( status_register_r );
DECLARE_WRITE8_MEMBER( status_flag_w );
DECLARE_READ8_MEMBER( status_flag_r );
@@ -86,6 +88,7 @@ public:
DECLARE_WRITE8_MEMBER( iosel_w );
DECLARE_WRITE8_MEMBER( exle_w );
+
// TODO: public stuff & trampolines that should be internal to the device
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ8_MEMBER( read );
@@ -94,7 +97,7 @@ public:
void sf_ack(bool cd_enable);
void sf_set();
void master_sh2_reset(bool state);
- void master_sh2_nmi(bool state);
+ void master_sh2_nmi();
void slave_sh2_reset(bool state);
void sound_reset(bool state);
void system_reset(bool state);
@@ -104,7 +107,9 @@ public:
bool get_iosel(bool which);
uint8_t get_ddr(bool which);
-
+ uint8_t get_ireg(uint8_t offset);
+ void set_oreg(uint8_t offset,uint8_t data);
+
// system delegation
template <class Object> static devcb_base &set_master_reset_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_mshres.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_master_nmi_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_mshnmi.set_callback(std::forward<Object>(cb)); }
@@ -143,6 +148,8 @@ private:
uint8_t m_pdr1_readback, m_pdr2_readback;
bool m_iosel1, m_iosel2;
bool m_exle1, m_exle2;
+ uint8_t m_ireg[7];
+ uint8_t m_oreg[32];
devcb_write_line m_mshres;
devcb_write_line m_mshnmi;