Previous 199869 Revisions Next

r33535 Tuesday 25th November, 2014 at 21:45:09 UTC by Sandro Ronco
(MESS) dmv: added dipswitches to K235 for configure INT5 and INT7 source. (nw)
[src/emu/bus/dmv]dmvbus.c dmvbus.h k230.c k230.h
[src/mess/drivers]dmv.c

trunk/src/emu/bus/dmv/dmvbus.c
r242046r242047
320320      m_cart->switch16_w(state);
321321}
322322
323void dmvcart_slot_device::irq0_w(int state)
323void dmvcart_slot_device::timint_w(int state)
324324{
325325   if (m_cart)
326      m_cart->irq0_w(state);
326      m_cart->timint_w(state);
327327}
328328
329void dmvcart_slot_device::irq1_w(int state)
329void dmvcart_slot_device::keyint_w(int state)
330330{
331331   if (m_cart)
332      m_cart->irq1_w(state);
332      m_cart->keyint_w(state);
333333}
334334
335void dmvcart_slot_device::busint_w(int state)
336{
337   if (m_cart)
338      m_cart->busint_w(state);
339}
340
341void dmvcart_slot_device::flexint_w(int state)
342{
343   if (m_cart)
344      m_cart->flexint_w(state);
345}
346
335347void dmvcart_slot_device::irq2_w(int state)
336348{
337349   if (m_cart)
338350      m_cart->irq2_w(state);
339351}
340352
353void dmvcart_slot_device::irq2a_w(int state)
354{
355   if (m_cart)
356      m_cart->irq2a_w(state);
357}
358
341359void dmvcart_slot_device::irq3_w(int state)
342360{
343361   if (m_cart)
r242046r242047
361379   if (m_cart)
362380      m_cart->irq6_w(state);
363381}
364
365void dmvcart_slot_device::irq7_w(int state)
366{
367   if (m_cart)
368      m_cart->irq7_w(state);
369}
trunk/src/emu/bus/dmv/dmvbus.h
r242046r242047
3535   virtual bool av16bit() { return false; }
3636   virtual void hold_w(int state) { }
3737   virtual void switch16_w(int state) { }
38   virtual void irq0_w(int state) { }
39   virtual void irq1_w(int state) { }
38   virtual void timint_w(int state) { }
39   virtual void keyint_w(int state) { }
40   virtual void busint_w(int state) { }
41   virtual void flexint_w(int state) { }
4042   virtual void irq2_w(int state) { }
43   virtual void irq2a_w(int state) { }
4144   virtual void irq3_w(int state) { }
4245   virtual void irq4_w(int state) { }
4346   virtual void irq5_w(int state) { }
4447   virtual void irq6_w(int state) { }
45   virtual void irq7_w(int state) { }
4648};
4749
4850
r242046r242047
7476   virtual void io_write(address_space &space, int ifsel, offs_t offset, UINT8 data);
7577   virtual void hold_w(int state);
7678   virtual void switch16_w(int state);
77   virtual void irq0_w(int state);
78   virtual void irq1_w(int state);
79   virtual void timint_w(int state);
80   virtual void keyint_w(int state);
81   virtual void busint_w(int state);
82   virtual void flexint_w(int state);
7983   virtual void irq2_w(int state);
84   virtual void irq2a_w(int state);
8085   virtual void irq3_w(int state);
8186   virtual void irq4_w(int state);
8287   virtual void irq5_w(int state);
8388   virtual void irq6_w(int state);
84   virtual void irq7_w(int state);
8589   virtual bool av16bit();
8690
8791   // internal state
trunk/src/emu/bus/dmv/k230.c
r242046r242047
7878MACHINE_CONFIG_END
7979
8080
81static INPUT_PORTS_START( dmv_k235 )
82   PORT_START("DSW")
83   PORT_DIPNAME( 0x01, 0x00, "K235 INT7" )  PORT_DIPLOCATION("S:1")
84   PORT_DIPSETTING( 0x00, "Slot 5" )
85   PORT_DIPSETTING( 0x01, "Slot 6" )
86   PORT_DIPNAME( 0x02, 0x00, "K235 INT5" )  PORT_DIPLOCATION("S:2")
87   PORT_DIPSETTING( 0x00, "Slot 2a" )
88   PORT_DIPSETTING( 0x02, "Slot 2" )
89INPUT_PORTS_END
90
91
8192//**************************************************************************
8293//  GLOBAL VARIABLES
8394//**************************************************************************
r242046r242047
135146
136147dmv_k235_device::dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
137148      : dmv_k230_device(mconfig, DMV_K235, "K235 8088 with interrupt controller", tag, owner, clock, "dmv_k235", __FILE__),
138      m_pic(*this, "pic8259")
149      m_pic(*this, "pic8259"),
150      m_dsw(*this, "DSW")
139151{
140152}
141153
r242046r242047
216228   return ROM_NAME( dmv_k235 );
217229}
218230
231//-------------------------------------------------
232//  input_ports - device-specific input ports
233//-------------------------------------------------
234
235ioport_constructor dmv_k235_device::device_input_ports() const
236{
237   return INPUT_PORTS_NAME( dmv_k235 );
238}
239
219240bool dmv_k230_device::av16bit()
220241{
221242   return true;
trunk/src/emu/bus/dmv/k230.h
r242046r242047
115115   // construction/destruction
116116   dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
117117
118protected:
118119   // optional information overrides
119120   virtual const rom_entry *device_rom_region() const;
120121   virtual machine_config_constructor device_mconfig_additions() const;
122   virtual ioport_constructor device_input_ports() const;
121123
122   void irq0_w(int state) { m_pic->ir0_w(state); }
123   void irq1_w(int state) { m_pic->ir1_w(state); }
124   void irq2_w(int state) { m_pic->ir2_w(state); }
125   void irq3_w(int state) { m_pic->ir3_w(state); }
126   void irq4_w(int state) { m_pic->ir4_w(state); }
127   void irq5_w(int state) { m_pic->ir5_w(state); }
128   void irq6_w(int state) { m_pic->ir6_w(state); }
129   void irq7_w(int state) { m_pic->ir7_w(state); }
124   void timint_w(int state)  { m_pic->ir0_w(state); }
125   void keyint_w(int state)  { m_pic->ir1_w(state); }
126   void busint_w(int state)  { m_pic->ir2_w(state); }
127   void flexint_w(int state) { m_pic->ir6_w(state); }
128   void irq2a_w(int state)   { if (!(m_dsw->read() & 0x02))  m_pic->ir5_w(state); }
129   void irq2_w(int state)    { if ( (m_dsw->read() & 0x02))  m_pic->ir5_w(state); }
130   void irq3_w(int state)    { m_pic->ir3_w(state); }
131   void irq4_w(int state)    { m_pic->ir4_w(state); }
132   void irq5_w(int state)    { if (!(m_dsw->read() & 0x01))  m_pic->ir7_w(state); }
133   void irq6_w(int state)    { if ( (m_dsw->read() & 0x01))  m_pic->ir7_w(state); }
130134
131135private:
132136   required_device<pic8259_device> m_pic;
133
137   required_ioport m_dsw;
134138};
135139
136140// device type definition
trunk/src/mess/drivers/dmv.c
r242046r242047
422422         break;
423423      }
424424
425   m_slot7a->irq2_w(new_state);
426   m_slot7->irq2_w(new_state);
425   m_slot7a->busint_w(new_state);
426   m_slot7->busint_w(new_state);
427427   m_maincpu->set_input_line(0, new_state);
428428}
429429
r242046r242047
433433
434434   switch(slot)
435435   {
436   case 0: // slot 2
437      m_slot7->irq2_w(state);
438      m_slot7a->irq2_w(state);
439      break;
436440   case 1: // slot 2a
437      m_slot7->irq5_w(state);
438      m_slot7a->irq5_w(state);
441      m_slot7->irq2a_w(state);
442      m_slot7a->irq2a_w(state);
439443      break;
440444   case 2: // slot 3
441445      m_slot7->irq3_w(state);
r242046r242047
446450      m_slot7a->irq4_w(state);
447451      break;
448452   case 4: // slot 5
449      m_slot7->irq7_w(state);
450      m_slot7a->irq7_w(state);
453      m_slot7->irq5_w(state);
454      m_slot7a->irq5_w(state);
451455      break;
456   case 5: // slot 6
457      m_slot7->irq6_w(state);
458      m_slot7a->irq6_w(state);
459      break;
452460   }
453461}
454462
r242046r242047
537545WRITE8_MEMBER(dmv_state::kb_mcu_port2_w)
538546{
539547   m_speaker->level_w(BIT(data, 0));
540   m_slot7a->irq1_w(BIT(data, 4));
541   m_slot7->irq1_w(BIT(data, 4));
548   m_slot7a->keyint_w(BIT(data, 4));
549   m_slot7->keyint_w(BIT(data, 4));
542550}
543551
544552static ADDRESS_MAP_START( dmv_kb_ctrl_io, AS_IO, 8, dmv_state )
r242046r242047
652660
653661WRITE_LINE_MEMBER( dmv_state::timint_w )
654662{
655   m_slot7a->irq0_w(state);
656   m_slot7->irq0_w(state);
663   m_slot7a->timint_w(state);
664   m_slot7->timint_w(state);
657665}
658666
659667WRITE_LINE_MEMBER( dmv_state::fdc_irq )
660668{
661   m_slot7a->irq6_w(state);
662   m_slot7->irq6_w(state);
669   m_slot7a->flexint_w(state);
670   m_slot7->flexint_w(state);
663671
664672   if (state)
665673      m_fdc->tc_w(false);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team