Previous 199869 Revisions Next

r22867 Friday 17th May, 2013 at 14:46:15 UTC by Carl
pcxt.c: Fix Filetto [Carl]
pcxt.c: xt has no RTC and switch to new ISA DMAC (nw)
[src/mame/drivers]pcxt.c

trunk/src/mame/drivers/pcxt.c
r22866r22867
5858#include "cpu/i86/i86.h"
5959#include "machine/pit8253.h"
6060#include "machine/i8255.h"
61#include "machine/8237dma.h"
61#include "machine/am9517a.h"
6262#include "machine/pic8259.h"
63#include "machine/mc146818.h"
6463#include "sound/hc55516.h"
6564#include "sound/speaker.h"
6665#include "video/pc_cga.h"
r22866r22867
9594   required_device<pit8253_device> m_pit8253;
9695   required_device<pic8259_device> m_pic8259_1;
9796   required_device<pic8259_device> m_pic8259_2;
98   required_device<i8237_device> m_dma8237_1;
97   required_device<am9517a_device> m_dma8237_1;
9998
10099   DECLARE_READ8_MEMBER(disk_iobank_r);
101100   DECLARE_WRITE8_MEMBER(disk_iobank_w);
102101   DECLARE_READ8_MEMBER(fdc765_status_r);
103102   DECLARE_READ8_MEMBER(fdc765_data_r);
104103   DECLARE_WRITE8_MEMBER(fdc765_data_w);
105   DECLARE_WRITE8_MEMBER(drive_selection_w);
104   DECLARE_WRITE8_MEMBER(fdc_dor_w);
106105   DECLARE_READ8_MEMBER(pc_dma_read_byte);
107106   DECLARE_WRITE8_MEMBER(pc_dma_write_byte);
108107   DECLARE_READ8_MEMBER(dma_page_select_r);
r22866r22867
403402READ8_MEMBER(pcxt_state::fdc765_data_r)
404403{
405404   m_status = (FDC_READ);
405   machine().device<pic8259_device>("pic8259_1")->ir6_w(0);
406406   return 0xc0;
407407}
408408
r22866r22867
412412}
413413
414414
415WRITE8_MEMBER(pcxt_state::drive_selection_w)
415WRITE8_MEMBER(pcxt_state::fdc_dor_w)
416416{
417417   /* TODO: properly hook-up upd765 FDC there */
418418   machine().device<pic8259_device>("pic8259_1")->ir6_w(1);
r22866r22867
428428   m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
429429
430430   /* Assert HLDA */
431   m_dma8237_1->i8237_hlda_w( state );
431   m_dma8237_1->hack_w( state );
432432}
433433
434434
r22866r22867
545545
546546static ADDRESS_MAP_START( pcxt_io_common, AS_IO, 8, pcxt_state )
547547   ADDRESS_MAP_GLOBAL_MASK(0x3ff)
548   AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237_1", i8237_device, i8237_r, i8237_w ) //8237 DMA Controller
548   AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237_1", am9517a_device, read, write ) //8237 DMA Controller
549549   AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259_1", pic8259_device, read, write ) //8259 Interrupt control
550550   AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w)    //8253 PIT
551551   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)  //PPI 8255
552552   AM_RANGE(0x0064, 0x0066) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)  //PPI 8255
553   AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE("rtc", mc146818_device, read, write)
554553   AM_RANGE(0x0080, 0x0087) AM_READWRITE(dma_page_select_r,dma_page_select_w)
555554   AM_RANGE(0x00a0, 0x00af) AM_DEVREADWRITE("pic8259_2", pic8259_device, read, write )
556555   AM_RANGE(0x0278, 0x027f) AM_RAM //printer (parallel) port latch
557556   AM_RANGE(0x02f8, 0x02ff) AM_RAM //Modem port
558557   AM_RANGE(0x0378, 0x037f) AM_RAM //printer (parallel) port
559558   AM_RANGE(0x03bc, 0x03bf) AM_RAM //printer port
560   AM_RANGE(0x03f2, 0x03f2) AM_WRITE(drive_selection_w)
559   AM_RANGE(0x03f2, 0x03f2) AM_WRITE(fdc_dor_w)
561560   AM_RANGE(0x03f4, 0x03f4) AM_READ(fdc765_status_r) //765 Floppy Disk Controller (FDC) Status
562561   AM_RANGE(0x03f5, 0x03f5) AM_READWRITE(fdc765_data_r,fdc765_data_w)//FDC Data
563562   AM_RANGE(0x03f8, 0x03ff) AM_RAM //rs232c (serial) port
r22866r22867
728727
729728   MCFG_PIC8259_ADD( "pic8259_2", DEVWRITELINE("pic8259_1", pic8259_device, ir2_w), GND, NULL )
730729
731   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
732
733730   MCFG_FRAGMENT_ADD( pcvideo_cga )
734731   MCFG_GFXDECODE(pcxt)
735732

Previous 199869 Revisions Next


© 1997-2024 The MAME Team