From a95d1fae8b2d187295d41a708c07f49dae0d9d40 Mon Sep 17 00:00:00 2001 From: Massimiliano Zattera Date: Mon, 6 Feb 2023 17:40:35 +0100 Subject: Fixed VIA_IFR write (#10875) These 3 datasheets: http://archive.6502.org/datasheets/mos_6522_preliminary_nov_1977.pdf http://archive.6502.org/datasheets/synertek_sy6522_via_1978_jan.pdf http://archive.6502.org/datasheets/rockwell_r6522_via.pdf state that: The IFR bit 7 is not a flag. Therefore, this bit is not directly cleared by writing a logic 1 into it. It can only be cleared by clearing all the flags in the register or by disabling all the active interrupts as discussed in the next section. but this is what current code does. If more updated datasheets are available, please share the links. --- src/devices/machine/6522via.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp index 5224fc4fbd5..5bc514f81b6 100644 --- a/src/devices/machine/6522via.cpp +++ b/src/devices/machine/6522via.cpp @@ -1058,12 +1058,8 @@ void via6522_device::write(offs_t offset, u8 data) break; case VIA_IFR: - if (data & INT_ANY) - { - data = 0x7f; - } LOGINT("IFR INT "); - clear_int(data); + clear_int(data & 0x7f); break; } } -- cgit v1.2.3