diff options
author | mamehaze <mamehaze@users.noreply.github.com> | 2015-03-08 22:09:40 +0000 |
---|---|---|
committer | mamehaze <mamehaze@users.noreply.github.com> | 2015-03-08 22:09:40 +0000 |
commit | 37b68453bad69916eaddd599c6094d771f3f0e38 (patch) | |
tree | 8e7cfad0c8f86d40fa735a773840079b58b60099 | |
parent | 41b78b9efde97c38e06b17f7019b60cfc7034c31 (diff) |
ok, register layout is different and it can do wider address range, so not quite a drop-in, and will need more work, but still seems to be related (nw)
-rw-r--r-- | src/emu/machine/am9517a.c | 29 | ||||
-rw-r--r-- | src/emu/machine/am9517a.h | 17 |
2 files changed, 41 insertions, 5 deletions
diff --git a/src/emu/machine/am9517a.c b/src/emu/machine/am9517a.c index ae36c6e5218..6fef3deadb0 100644 --- a/src/emu/machine/am9517a.c +++ b/src/emu/machine/am9517a.c @@ -54,7 +54,7 @@ const device_type UPD71071_V53 = &device_creator<upd71071_v53_device>; // MACROS / CONSTANTS //************************************************************************** -#define LOG 0 +#define LOG 1 enum @@ -360,6 +360,7 @@ inline void am9517a_device::dma_advance() if (MODE_ADDRESS_DECREMENT) { m_channel[m_current_channel].m_address--; + m_channel[m_current_channel].m_address &= m_address_mask; if ((m_channel[m_current_channel].m_address & 0xff) == 0xff) { @@ -369,6 +370,7 @@ inline void am9517a_device::dma_advance() else { m_channel[m_current_channel].m_address++; + m_channel[m_current_channel].m_address &= m_address_mask; if ((m_channel[m_current_channel].m_address & 0xff) == 0x00) { @@ -585,8 +587,16 @@ void am9517a_device::device_start() save_item(NAME(m_channel[i].m_base_count), i); save_item(NAME(m_channel[i].m_mode), i); } + + m_address_mask = 0xffff; + } +void upd71071_v53_device::device_start() +{ + am9517a_device::device_start(); + m_address_mask = 0x00ffffff; +} //------------------------------------------------- // device_reset - device-specific reset @@ -776,10 +786,12 @@ void am9517a_device::execute_run() if (MODE_ADDRESS_DECREMENT) { m_channel[m_current_channel].m_address--; + m_channel[m_current_channel].m_address &= m_address_mask; } else { m_channel[m_current_channel].m_address++; + m_channel[m_current_channel].m_address &= m_address_mask; } break; @@ -1062,3 +1074,18 @@ WRITE_LINE_MEMBER( am9517a_device::dreq3_w ) { dma_request(3, state); } + +//------------------------------------------------- +// upd71071 register layouts +//------------------------------------------------- + +READ8_MEMBER(upd71071_v53_device::read) +{ +// printf("upd71071_v53_device read %02x\n", offset); + return 0x00; +} + +WRITE8_MEMBER(upd71071_v53_device::write) +{ +// printf("upd71071_v53_device write %02x %02x\n", offset, data); +}
\ No newline at end of file diff --git a/src/emu/machine/am9517a.h b/src/emu/machine/am9517a.h index 3f7b9f61fe4..8e56ddc1a65 100644 --- a/src/emu/machine/am9517a.h +++ b/src/emu/machine/am9517a.h @@ -75,8 +75,8 @@ public: template<class _Object> static devcb_base &set_out_dack_2_callback(device_t &device, _Object object) { return downcast<am9517a_device &>(device).m_out_dack_2_cb.set_callback(object); } template<class _Object> static devcb_base &set_out_dack_3_callback(device_t &device, _Object object) { return downcast<am9517a_device &>(device).m_out_dack_3_cb.set_callback(object); } - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + virtual DECLARE_READ8_MEMBER( read ); + virtual DECLARE_WRITE8_MEMBER( write ); DECLARE_WRITE_LINE_MEMBER( hack_w ); DECLARE_WRITE_LINE_MEMBER( ready_w ); @@ -94,6 +94,7 @@ protected: virtual void execute_run(); int m_icount; + UINT32 m_address_mask; private: inline void dma_request(int channel, int state); @@ -129,13 +130,14 @@ private: struct { - UINT16 m_address; + UINT32 m_address; UINT16 m_count; - UINT16 m_base_address; + UINT32 m_base_address; UINT16 m_base_count; UINT8 m_mode; } m_channel[4]; + int m_msb; int m_hreq; int m_hack; @@ -157,6 +159,13 @@ class upd71071_v53_device : public am9517a_device public: // construction/destruction upd71071_v53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual DECLARE_READ8_MEMBER( read ); + virtual DECLARE_WRITE8_MEMBER( write ); + +protected: + // device-level overrides + virtual void device_start(); }; |