Previous 199869 Revisions Next

r22868 Friday 17th May, 2013 at 15:02:16 UTC by Carl
pcxt.c: Just one pic (nw)
[src/mame/drivers]pcxt.c

trunk/src/mame/drivers/pcxt.c
r22867r22868
7272      : driver_device(mconfig, type, tag),
7373         m_pit8253(*this,"pit8253"),
7474         m_pic8259_1(*this,"pic8259_1"),
75         m_pic8259_2(*this,"pic8259_2"),
7675         m_dma8237_1(*this,"dma8237_1") ,
7776      m_maincpu(*this, "maincpu"),
7877      m_speaker(*this, "speaker") { }
r22867r22868
9392
9493   required_device<pit8253_device> m_pit8253;
9594   required_device<pic8259_device> m_pic8259_1;
96   required_device<pic8259_device> m_pic8259_2;
9795   required_device<am9517a_device> m_dma8237_1;
9896
9997   DECLARE_READ8_MEMBER(disk_iobank_r);
r22867r22868
120118   DECLARE_WRITE_LINE_MEMBER(pc_dack1_w);
121119   DECLARE_WRITE_LINE_MEMBER(pc_dack2_w);
122120   DECLARE_WRITE_LINE_MEMBER(pc_dack3_w);
123   DECLARE_WRITE_LINE_MEMBER(pic8259_1_set_int_line);
124   DECLARE_READ8_MEMBER(get_slave_ack);
125121   DECLARE_DRIVER_INIT(tetriskr);
126122   DECLARE_DRIVER_INIT(filetto);
127123   virtual void machine_reset();
r22867r22868
5175138259 IRQ controller
518514******************/
519515
520WRITE_LINE_MEMBER(pcxt_state::pic8259_1_set_int_line)
521{
522   m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
523}
524
525READ8_MEMBER(pcxt_state::get_slave_ack)
526{
527   if (offset==2) { // IRQ = 2
528      return m_pic8259_2->acknowledge();
529   }
530   return 0x00;
531}
532
533516IRQ_CALLBACK_MEMBER(pcxt_state::irq_callback)
534517{
535518   return m_pic8259_1->acknowledge();
r22867r22868
551534   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)  //PPI 8255
552535   AM_RANGE(0x0064, 0x0066) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)  //PPI 8255
553536   AM_RANGE(0x0080, 0x0087) AM_READWRITE(dma_page_select_r,dma_page_select_w)
554   AM_RANGE(0x00a0, 0x00af) AM_DEVREADWRITE("pic8259_2", pic8259_device, read, write )
555537   AM_RANGE(0x0278, 0x027f) AM_RAM //printer (parallel) port latch
556538   AM_RANGE(0x02f8, 0x02ff) AM_RAM //Modem port
557539   AM_RANGE(0x0378, 0x037f) AM_RAM //printer (parallel) port
r22867r22868
723705
724706   MCFG_I8237_ADD( "dma8237_1", XTAL_14_31818MHz/3, dma8237_1_config )
725707
726   MCFG_PIC8259_ADD( "pic8259_1", WRITELINE(pcxt_state,pic8259_1_set_int_line), VCC, READ8(pcxt_state,get_slave_ack) )
708   MCFG_PIC8259_ADD( "pic8259_1", INPUTLINE("maincpu", 0), VCC, NULL )
727709
728   MCFG_PIC8259_ADD( "pic8259_2", DEVWRITELINE("pic8259_1", pic8259_device, ir2_w), GND, NULL )
729
730710   MCFG_FRAGMENT_ADD( pcvideo_cga )
731711   MCFG_GFXDECODE(pcxt)
732712

Previous 199869 Revisions Next


© 1997-2024 The MAME Team