From ffdc53748816c9bd7c5e514aa96a31a79af784d9 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 25 Dec 2008 09:51:14 +0000 Subject: [PATCH] Correctly setup the MC6845 device in the coinmstr driver. --- src/mame/drivers/coinmstr.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c index 427efc70601..01d2ca3fabb 100644 --- a/src/mame/drivers/coinmstr.c +++ b/src/mame/drivers/coinmstr.c @@ -140,8 +140,8 @@ static ADDRESS_MAP_START( quizmstr_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x50, 0x53) AM_READNOP AM_RANGE(0x50, 0x53) AM_WRITENOP AM_RANGE(0x58, 0x5b) AM_READWRITE(pia_2_r, pia_2_w) - AM_RANGE(0x70, 0x70) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) - AM_RANGE(0x71, 0x71) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) + AM_RANGE(0x70, 0x70) AM_DEVWRITE(H46505, "crtc", mc6845_address_w) + AM_RANGE(0x71, 0x71) AM_DEVWRITE(H46505, "crtc", mc6845_register_w) AM_RANGE(0xc0, 0xc3) AM_READNOP AM_RANGE(0xc0, 0xc3) AM_WRITENOP ADDRESS_MAP_END @@ -150,8 +150,8 @@ static ADDRESS_MAP_START( trailblz_io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_READ(question_r) AM_RANGE(0x00, 0x03) AM_WRITE(question_w) - AM_RANGE(0x40, 0x40) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) - AM_RANGE(0x41, 0x41) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) + AM_RANGE(0x40, 0x40) AM_DEVWRITE(H46505, "crtc", mc6845_address_w) + AM_RANGE(0x41, 0x41) AM_DEVWRITE(H46505, "crtc", mc6845_register_w) AM_RANGE(0x48, 0x48) AM_WRITE(ay8910_control_port_0_w) AM_RANGE(0x49, 0x49) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w) AM_RANGE(0x50, 0x53) AM_READWRITE(pia_0_r, pia_0_w) //? @@ -168,8 +168,8 @@ static ADDRESS_MAP_START( supnudg2_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x40, 0x41) AM_READNOP AM_RANGE(0x40, 0x43) AM_WRITENOP AM_RANGE(0x43, 0x43) AM_READNOP - AM_RANGE(0x48, 0x48) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) - AM_RANGE(0x49, 0x49) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) + AM_RANGE(0x48, 0x48) AM_DEVWRITE(H46505, "crtc", mc6845_address_w) + AM_RANGE(0x49, 0x49) AM_DEVWRITE(H46505, "crtc", mc6845_register_w) AM_RANGE(0x50, 0x51) AM_READNOP AM_RANGE(0x50, 0x53) AM_WRITENOP AM_RANGE(0x53, 0x53) AM_READNOP @@ -630,6 +630,19 @@ static const ay8910_interface ay8912_interface = NULL }; +static const mc6845_interface h46505_intf = +{ + "main", /* screen we are acting on */ + 8, /* number of pixels per video memory address */ + NULL, /* before pixel update callback */ + NULL, /* row update callback */ + NULL, /* after pixel update callback */ + NULL, /* callback for display state changes */ + NULL, /* HSYNC callback */ + NULL /* VSYNC callback */ +}; + + static MACHINE_DRIVER_START( coinmstr ) MDRV_CPU_ADD("cpu",Z80,8000000) // ? MDRV_CPU_PROGRAM_MAP(coinmstr_map,0) @@ -649,7 +662,7 @@ static MACHINE_DRIVER_START( coinmstr ) MDRV_VIDEO_START(coinmstr) MDRV_VIDEO_UPDATE(coinmstr) - MDRV_MC6845_ADD("crtc", MC6845, 0, mc6845_null_interface) + MDRV_MC6845_ADD("crtc", H46505, 14000000 / 16, h46505_intf) /* sound hardware */ MDRV_SPEAKER_STANDARD_MONO("mono")