diff options
author | smf- <smf-@users.noreply.github.com> | 2014-01-06 13:17:32 +0000 |
---|---|---|
committer | smf- <smf-@users.noreply.github.com> | 2014-01-06 13:17:32 +0000 |
commit | 45d9761cad18873ac1a92e06c2604f1b451f591a (patch) | |
tree | 29439104cb775379b9974e1e7ef7a5cfecc394b0 /src/mame/drivers/funworld.c | |
parent | 735fa982fade40e52fed59003b5fd4488bda9ae8 (diff) |
Converted PIA6821 to DEVCB2 [smf]
Diffstat (limited to 'src/mame/drivers/funworld.c')
-rw-r--r-- | src/mame/drivers/funworld.c | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c index 4804f748576..582a035ade9 100644 --- a/src/mame/drivers/funworld.c +++ b/src/mame/drivers/funworld.c @@ -913,12 +913,12 @@ WRITE8_MEMBER(funworld_state::funworld_lamp_b_w) // popmessage("Lamps B: %02X", data); } -WRITE8_MEMBER(funworld_state::pia1_ca2_w) +WRITE_LINE_MEMBER(funworld_state::pia1_ca2_w) { /* TAB and Impera games are writing 0x01 constantly, and 0x00 with each screen change. This line is tied to sort of reset circuitery. */ -// popmessage("PIA1 CA2: %02X", data); +// popmessage("PIA1 CA2: %02X", state); } @@ -2408,7 +2408,6 @@ GFXDECODE_END * PIA Interfaces * ***********************/ -static const pia6821_interface pia0_intf = /* TAB light green board --------------------- @@ -2466,36 +2465,6 @@ static const pia6821_interface pia0_intf = '-----------------' '-----------------' */ -{ - DEVCB_INPUT_PORT("IN0"), /* port A in */ - DEVCB_INPUT_PORT("IN1"), /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_NULL, /* port A out */ - DEVCB_NULL, /* port B out */ - DEVCB_NULL, /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_NULL, /* IRQA */ - DEVCB_NULL /* IRQB */ -}; - -static const pia6821_interface pia1_intf = -{ - DEVCB_INPUT_PORT("IN2"), /* port A in */ - DEVCB_INPUT_PORT("DSW"), /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_NULL, /* port A out */ - DEVCB_NULL, /* port B out */ - DEVCB_DRIVER_MEMBER(funworld_state, pia1_ca2_w), /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_NULL, /* IRQA */ - DEVCB_NULL /* IRQB */ -}; /* these ports are set to output anyway, but this quietens the log */ READ8_MEMBER(funworld_state::funquiz_ay8910_a_r) @@ -2564,8 +2533,14 @@ static MACHINE_CONFIG_START( fw1stpal, funworld_state ) MCFG_NVRAM_ADD_0FILL("nvram") - MCFG_PIA6821_ADD("pia0", pia0_intf) - MCFG_PIA6821_ADD("pia1", pia1_intf) + MCFG_DEVICE_ADD("pia0", PIA6821, 0) + MCFG_PIA6821_READPA_HANDLER(IOPORT("IN0")) + MCFG_PIA6821_READPB_HANDLER(IOPORT("IN1")) + + MCFG_DEVICE_ADD("pia1", PIA6821, 0) + MCFG_PIA6821_READPA_HANDLER(IOPORT("IN2")) + MCFG_PIA6821_READPB_HANDLER(IOPORT("DSW")) + MCFG_PIA6821_CA2_HANDLER(WRITELINE(funworld_state, pia1_ca2_w)) /* video hardware */ |