Previous 15994 Revisions Next

r2238 Thursday 3rd April, 2008 at 20:13:42 UTC by Wilbert Pol
[AT] Updated for new 8253 device.
[src/mess/drivers]at.c

src/mess/drivers/at.c
r2237r2238
4242#include "machine/8237dma.h"
4343#include "machine/pci.h"
4444#include "memconv.h"
45#include "devconv.h"
4546
4647/* window resizing with dirtybuffering traping in xmess window */
4748
4849#define ym3812_StdClock 3579545
50#define AT_PIT8254   "at_pit8254"
4951
5052/*
5153  adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster)
r2237r2238
122124   write32le_with_write8_handler(at_dma8237_1_w, machine, offset, data, mem_mask);
123125}
124126
127DEV_READWRITE8TO32LE_LSB( at_pit8254_32le, pit8253_r, pit8253_w )
125128
126129
127130static ADDRESS_MAP_START(at_io, ADDRESS_SPACE_IO, 8)
128131   AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_0_r,            dma8237_0_w)
129132   AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_0_r,            pic8259_0_w)
130   AM_RANGE(0x0040, 0x005f) AM_READWRITE(pit8253_0_r,            pit8253_0_w)
133   AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, pit8253_r, pit8253_w)
131134   AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_8_r,            kbdc8042_8_w)
132135   AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port_r,         mc146818_port_w)
133136   AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page8_r,            at_page8_w)
r2237r2238
157160static ADDRESS_MAP_START(at386_io, ADDRESS_SPACE_IO, 32)
158161   AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_32le_0_r,         dma8237_32le_0_w)
159162   AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_32le_0_r,         pic8259_32le_0_w)
160   AM_RANGE(0x0040, 0x005f) AM_READWRITE(pit8253_32le_0_r,         pit8253_32le_0_w)
163   AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, at_pit8254_32le_r, at_pit8254_32le_w)
161164   AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_32le_r,         kbdc8042_32le_w)
162165   AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port32le_r,      mc146818_port32le_w)
163166   AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page32_r,            at_page32_w)
r2237r2238
179182static ADDRESS_MAP_START(at586_io, ADDRESS_SPACE_IO, 32)
180183   AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_32le_0_r,         dma8237_32le_0_w)
181184   AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_32le_0_r,         pic8259_32le_0_w)
182   AM_RANGE(0x0040, 0x005f) AM_READWRITE(pit8253_32le_0_r,         pit8253_32le_0_w)
185   AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, at_pit8254_32le_r, at_pit8254_32le_w)
183186   AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_32le_r,         kbdc8042_32le_w)
184187   AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port32le_r,      mc146818_port32le_w)
185188   AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page32_r,            at_page32_w)
r2237r2238
405408#endif
406409
407410
411static PIT8253_OUTPUT_CHANGED( pc_timer0_w )
412{
413   pic8259_set_irq_line(0, 0, state);
414}
408415
416
417static const struct pit8253_config at_pit8254_config =
418{
419   {
420      {
421         4772720/4,            /* heartbeat IRQ */
422         pc_timer0_w,
423         NULL
424      }, {
425         4772720/4,            /* dram refresh */
426         NULL,
427         NULL
428      }, {
429         4772720/4,            /* pio port c pin 4, and speaker polling enough */
430         NULL,
431         pc_sh_speaker_change_clock
432      }
433   }
434};
435
436
437
409438#define MDRV_CPU_ATPC(mem, port, type, clock)   \
410439   MDRV_CPU_ADD_TAG("main", type, clock)               \
411440   MDRV_CPU_PROGRAM_MAP(mem##_map, 0)            \
r2237r2238
416445   /* basic machine hardware */
417446   MDRV_CPU_ATPC(at, at, I80286, 12000000)
418447
448   MDRV_DEVICE_ADD( AT_PIT8254, PIT8254 )
449   MDRV_DEVICE_CONFIG( at_pit8254_config )
450
419451   MDRV_MACHINE_START( at )
420452   MDRV_MACHINE_RESET( at )
421453

Previous 15994 Revisions Next


© 1998-2018 The MESS Team