From 75a9904b0ee27e0111e48bd3268d9adba8edb707 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 18 Nov 2011 10:03:37 +0000 Subject: [PATCH] fix for some naming conflicts between mame and mess (no whatsnew) --- src/mame/drivers/maxaflex.c | 31 ++++++++++++++++++++++++++++++- src/mame/includes/atari.h | 6 ++---- src/mame/machine/atari.c | 6 +++--- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c index 6032a8ae8d5..715838362b9 100644 --- a/src/mame/drivers/maxaflex.c +++ b/src/mame/drivers/maxaflex.c @@ -368,6 +368,35 @@ static const pokey_interface pokey_config = { atari_interrupt_cb }; +READ8_DEVICE_HANDLER(maxaflex_atari_pia_pa_r) +{ + return atari_input_disabled(device->machine()) ? 0xFF : input_port_read_safe(device->machine(), "djoy_0_1", 0); +} + +READ8_DEVICE_HANDLER(maxaflex_atari_pia_pb_r) +{ + return atari_input_disabled(device->machine()) ? 0xFF : input_port_read_safe(device->machine(), "djoy_2_3", 0); +} + + +const pia6821_interface maxaflex_atarixl_pia_interface = +{ + DEVCB_HANDLER(maxaflex_atari_pia_pa_r), /* port A in */ + DEVCB_HANDLER(maxaflex_atari_pia_pb_r), /* 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_HANDLER(a600xl_pia_pb_w), /* port B out */ + DEVCB_NULL, /* line CA2 out */ + DEVCB_LINE(atari_pia_cb2_w), /* port CB2 out */ + DEVCB_NULL, /* IRQA */ + DEVCB_NULL /* IRQB */ +}; + + + static MACHINE_CONFIG_START( a600xl, maxaflex_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, FREQ_17_EXACT) @@ -377,7 +406,7 @@ static MACHINE_CONFIG_START( a600xl, maxaflex_state ) MCFG_CPU_ADD("mcu", M68705, 3579545) MCFG_CPU_PROGRAM_MAP(mcu_mem) - MCFG_PIA6821_ADD("pia", atarixl_pia_interface) + MCFG_PIA6821_ADD("pia", maxaflex_atarixl_pia_interface) MCFG_TIMER_ADD("mcu_timer", mcu_timer_proc) /* video hardware */ diff --git a/src/mame/includes/atari.h b/src/mame/includes/atari.h index 98ded5b91a0..727eb51a6d4 100644 --- a/src/mame/includes/atari.h +++ b/src/mame/includes/atari.h @@ -22,6 +22,8 @@ extern const pia6821_interface atarixl_pia_interface; READ8_DEVICE_HANDLER(atari_pia_pa_r); READ8_DEVICE_HANDLER(atari_pia_pb_r); WRITE8_DEVICE_HANDLER(a600xl_pia_pb_w); +WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w); + /* This is needed in MESS as well for Atari 8bit drivers */ void atari_machine_start(running_machine &machine); @@ -595,9 +597,5 @@ INTERRUPT_GEN( a5200_interrupt ); extern PALETTE_INIT( atari ); -/*----------- defined in drivers/maxaflex.c -----------*/ - -int atari_input_disabled(running_machine &machine); - #endif /* ATARI_H */ diff --git a/src/mame/machine/atari.c b/src/mame/machine/atari.c index edfb2aa3077..7e02c0011c3 100644 --- a/src/mame/machine/atari.c +++ b/src/mame/machine/atari.c @@ -64,17 +64,17 @@ void atari_interrupt_cb(device_t *device, int mask) READ8_DEVICE_HANDLER(atari_pia_pa_r) { - return atari_input_disabled(device->machine()) ? 0xFF : input_port_read_safe(device->machine(), "djoy_0_1", 0); + return input_port_read_safe(device->machine(), "djoy_0_1", 0); } READ8_DEVICE_HANDLER(atari_pia_pb_r) { - return atari_input_disabled(device->machine()) ? 0xFF : input_port_read_safe(device->machine(), "djoy_2_3", 0); + return input_port_read_safe(device->machine(), "djoy_2_3", 0); } WRITE8_DEVICE_HANDLER(a600xl_pia_pb_w) { a600xl_mmu(device->machine(), data); } -static WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w) { } // This is used by Floppy drive on Atari 8bits Home Computers +WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w) { } // This is used by Floppy drive on Atari 8bits Home Computers const pia6821_interface atarixl_pia_interface = {