Previous 15994 Revisions Next

r8928 Saturday 28th August, 2010 at 07:30:06 UTC by Miodrag Milanović
[MZ2500] Connected PIT
[src/mess/drivers]mz2500.c

src/mess/drivers/mz2500.c
r8927r8928
2727#include "machine/z80pio.h"
2828#include "machine/i8255a.h"
2929#include "machine/wd17xx.h"
30#include "machine/pit8253.h"
3031#include "sound/2203intf.h"
3132
3233//#include "devices/cassette.h"
r8927r8928
528529   }
529530}
530531
532static WRITE8_HANDLER( timer_w )
533{
534   running_device *pit8253 = space->machine->device("pit");
535
536   pit8253_gate0_w(pit8253, 1);
537   pit8253_gate1_w(pit8253, 1);
538   pit8253_gate0_w(pit8253, 0);
539   pit8253_gate1_w(pit8253, 0);
540   pit8253_gate0_w(pit8253, 1);
541   pit8253_gate1_w(pit8253, 1);   
542}
543   
531544static ADDRESS_MAP_START(mz2500_io, ADDRESS_SPACE_IO, 8)
532545   ADDRESS_MAP_GLOBAL_MASK(0xff)
533546//  AM_RANGE(0x60, 0x63) AM_WRITE(w3100a_w)
r8927r8928
556569   AM_RANGE(0xd8, 0xdb) AM_DEVREADWRITE("mb8877a", mz2500_wd17xx_r, mz2500_wd17xx_w)
557570   AM_RANGE(0xdc, 0xdd) AM_WRITE(mz2500_fdc_w)
558571   AM_RANGE(0xe0, 0xe3) AM_DEVREADWRITE("i8255_0", i8255a_r, i8255a_w)
559//  AM_RANGE(0xe4, 0xe7) AM_READWRITE(pit_r,pit_w)
572    AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("pit", pit8253_r, pit8253_w)
560573   AM_RANGE(0xe8, 0xe9) AM_DEVREADWRITE("z80pio_1", z80pio_c_r, z80pio_c_w)
561574   AM_RANGE(0xea, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_d_r, z80pio_d_w)
562575//  AM_RANGE(0xef, 0xef) AM_READWRITE(joystick_r,joystick_w)
563//  AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w)
576    AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w)
564577   AM_RANGE(0xf4, 0xf7) AM_READ(mz2500_crtc_hvblank_r) AM_WRITE(mz2500_txt_crtc_w)
565578//  AM_RANGE(0xf8, 0xf9) AM_READWRITE(extrom_r,extrom_w)
566579ADDRESS_MAP_END
r8927r8928
11501163   // ...
11511164}
11521165
1166/* PIT8253 Interface */
1167
1168static const struct pit8253_config mz2500_pit8253_intf =
1169{
1170   {
1171      {
1172         31250,
1173         DEVCB_NULL,
1174         DEVCB_LINE(pit8253_clk1_w)
1175      },
1176      {
1177         0,
1178         DEVCB_NULL,
1179         DEVCB_LINE(pit8253_clk2_w)
1180      },
1181      {
1182         0,
1183         DEVCB_NULL,
1184         DEVCB_NULL
1185      }
1186   }
1187};
1188
11531189static MACHINE_DRIVER_START( mz2500 )
11541190    /* basic machine hardware */
11551191    MDRV_CPU_ADD("maincpu", Z80, 6000000)
r8927r8928
11841220   MDRV_SOUND_ADD("ym", YM2203, 6000000/2) //unknown clock / divider
11851221   MDRV_SOUND_CONFIG(ym2203_interface_1)
11861222   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
1223   
1224   MDRV_PIT8253_ADD("pit", mz2500_pit8253_intf)
11871225MACHINE_DRIVER_END
11881226
11891227

Previous 15994 Revisions Next


© 1998-2018 The MESS Team