From 0ef66145dc52cd8d0e7dc6ba3acb089886315b8c Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Thu, 4 May 2017 00:58:29 +0200 Subject: [PATCH] igspoker: Hook up PPI --- src/mame/drivers/igspoker.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp index 5597e6280b2..bc73053b433 100644 --- a/src/mame/drivers/igspoker.cpp +++ b/src/mame/drivers/igspoker.cpp @@ -66,6 +66,7 @@ FIX: PK Tetris have an input named AMUSE which I couldn't map. Maybe it is #include "emu.h" #include "cpu/z80/z80.h" +#include "machine/i8255.h" #include "sound/ym2413.h" #include "sound/okim6295.h" #include "screen.h" @@ -382,9 +383,7 @@ static ADDRESS_MAP_START( igspoker_io_map, AS_IO, 8, igspoker_state ) AM_RANGE(0x4002, 0x4002) AM_READ_PORT("DSW3") /* DSW3 */ AM_RANGE(0x4003, 0x4003) AM_READ_PORT("DSW4") /* DSW4 */ AM_RANGE(0x4004, 0x4004) AM_READ_PORT("DSW5") /* DSW5 */ - AM_RANGE(0x5080, 0x5080) AM_WRITE(igs_nmi_and_coins_w) - AM_RANGE(0x5081, 0x5081) AM_READ_PORT("SERVICE") /* Services */ - AM_RANGE(0x5082, 0x5082) AM_READ_PORT("COINS") /* Coing & Kbd */ + AM_RANGE(0x5080, 0x5083) AM_DEVREADWRITE("ppi", i8255_device, read, write) AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w) AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) AM_WRITE(igs_lamps_w ) /* Keyboard */ AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("BUTTONS2") /* Not connected */ @@ -1786,6 +1785,11 @@ static MACHINE_CONFIG_START( igspoker, igspoker_state ) MCFG_CPU_IO_MAP(igspoker_io_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", igspoker_state, igs_interrupt, "screen", 0, 1) + MCFG_DEVICE_ADD("ppi", I8255A, 0) + MCFG_I8255_OUT_PORTA_CB(WRITE8(igspoker_state, igs_nmi_and_coins_w)) + MCFG_I8255_IN_PORTB_CB(IOPORT("SERVICE")) + MCFG_I8255_IN_PORTC_CB(IOPORT("COINS")) + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(57) @@ -1822,6 +1826,8 @@ static MACHINE_CONFIG_DERIVED( number10, igspoker ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(number10_io_map) + MCFG_DEVICE_REMOVE("ppi") + MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(igspoker_state, screen_update_cpokerpk) MCFG_VIDEO_START_OVERRIDE(igspoker_state,cpokerpk)