From fd9f301339c23ba069e024fb28d8c36419e22de4 Mon Sep 17 00:00:00 2001 From: mariuszw1 Date: Tue, 13 Oct 2009 19:14:14 +0000 Subject: [PATCH] Fixed TRIG3 register handling in GTIA for Atari XL/XE [Mariusz Wojcieszek] (change for MESS). --- src/mame/video/atari.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c index 63baecc5b8c..5e8438cc161 100644 --- a/src/mame/video/atari.c +++ b/src/mame/video/atari.c @@ -1512,9 +1512,12 @@ static void generic_atari_interrupt(running_machine *machine, void (*handle_keyb gtia.r.but[i] &= (button_port >> i) & 1; } - /* specify buttons not relevant to this Atari variant */ - for (i = button_count; i < 4; i++) - gtia.r.but[i] = 1; + /* button registers for xl/xe */ + if (button_count == 2) + { + gtia.r.but[2] = 1; /* not used on xl/xe */ + gtia.r.but[3] = 0; /* 1 if external cartridge is inserted */ + } handle_keyboard(machine);