Previous 199869 Revisions Next

r36326 Sunday 8th March, 2015 at 22:09:40 UTC by David Haywood
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)
[src/emu/machine]am9517a.c am9517a.h

trunk/src/emu/machine/am9517a.c
r244837r244838
5454//  MACROS / CONSTANTS
5555//**************************************************************************
5656
57#define LOG 0
57#define LOG 1
5858
5959
6060enum
r244837r244838
360360      if (MODE_ADDRESS_DECREMENT)
361361      {
362362         m_channel[m_current_channel].m_address--;
363         m_channel[m_current_channel].m_address &= m_address_mask;
363364
364365         if ((m_channel[m_current_channel].m_address & 0xff) == 0xff)
365366         {
r244837r244838
369370      else
370371      {
371372         m_channel[m_current_channel].m_address++;
373         m_channel[m_current_channel].m_address &= m_address_mask;
372374
373375         if ((m_channel[m_current_channel].m_address & 0xff) == 0x00)
374376         {
r244837r244838
585587      save_item(NAME(m_channel[i].m_base_count), i);
586588      save_item(NAME(m_channel[i].m_mode), i);
587589   }
590
591   m_address_mask = 0xffff;
592
588593}
589594
595void upd71071_v53_device::device_start()
596{
597   am9517a_device::device_start();
598   m_address_mask = 0x00ffffff;
599}
590600
591601//-------------------------------------------------
592602//  device_reset - device-specific reset
r244837r244838
776786         if (MODE_ADDRESS_DECREMENT)
777787         {
778788            m_channel[m_current_channel].m_address--;
789            m_channel[m_current_channel].m_address &= m_address_mask;
779790         }
780791         else
781792         {
782793            m_channel[m_current_channel].m_address++;
794            m_channel[m_current_channel].m_address &= m_address_mask;
783795         }
784796
785797         break;
r244837r244838
10621074{
10631075   dma_request(3, state);
10641076}
1077
1078//-------------------------------------------------
1079//  upd71071 register layouts
1080//-------------------------------------------------
1081
1082READ8_MEMBER(upd71071_v53_device::read)
1083{
1084//   printf("upd71071_v53_device read %02x\n", offset);
1085   return 0x00;
1086}
1087
1088WRITE8_MEMBER(upd71071_v53_device::write)
1089{
1090//   printf("upd71071_v53_device write %02x %02x\n", offset, data);
1091}
No newline at end of file
trunk/src/emu/machine/am9517a.h
r244837r244838
7575   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); }
7676   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); }
7777
78   DECLARE_READ8_MEMBER( read );
79   DECLARE_WRITE8_MEMBER( write );
78   virtual DECLARE_READ8_MEMBER( read );
79   virtual DECLARE_WRITE8_MEMBER( write );
8080
8181   DECLARE_WRITE_LINE_MEMBER( hack_w );
8282   DECLARE_WRITE_LINE_MEMBER( ready_w );
r244837r244838
9494   virtual void execute_run();
9595
9696   int m_icount;
97   UINT32 m_address_mask;
9798
9899private:
99100   inline void dma_request(int channel, int state);
r244837r244838
129130
130131   struct
131132   {
132      UINT16 m_address;
133      UINT32 m_address;
133134      UINT16 m_count;
134      UINT16 m_base_address;
135      UINT32 m_base_address;
135136      UINT16 m_base_count;
136137      UINT8 m_mode;
137138   } m_channel[4];
138139
140
139141   int m_msb;
140142   int m_hreq;
141143   int m_hack;
r244837r244838
157159public:
158160   // construction/destruction
159161   upd71071_v53_device(const machine_config &mconfig,  const char *tag, device_t *owner, UINT32 clock);
162
163   virtual DECLARE_READ8_MEMBER( read );
164   virtual DECLARE_WRITE8_MEMBER( write );
165
166protected:
167   // device-level overrides
168   virtual void device_start();
160169};
161170
162171


Previous 199869 Revisions Next


© 1997-2024 The MAME Team