From 3c431794f0bf62132367eb0b8ebb5bbfef931418 Mon Sep 17 00:00:00 2001 From: SarahW Date: Tue, 9 Jan 2018 20:07:27 +0000 Subject: [PATCH] Cleared null count bit in PIT status byte. Fixes Wing Commander III, Wings of Fury and probably other Origin games. --- src/pit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pit.c b/src/pit.c index fdcb6c9..e479f31 100644 --- a/src/pit.c +++ b/src/pit.c @@ -353,17 +353,17 @@ void pit_write(uint16_t addr, uint8_t val, void *p) { if (val & 2) { - pit->read_status[0] = (pit->ctrls[0] & 0x3f) | 0x40 | (pit->out[0] ? 0x80 : 0); + pit->read_status[0] = (pit->ctrls[0] & 0x3f) | (pit->out[0] ? 0x80 : 0); pit->do_read_status[0] = 1; } if (val & 4) { - pit->read_status[1] = (pit->ctrls[1] & 0x3f) | 0x40 | (pit->out[1] ? 0x80 : 0); + pit->read_status[1] = (pit->ctrls[1] & 0x3f) | (pit->out[1] ? 0x80 : 0); pit->do_read_status[1] = 1; } if (val & 8) { - pit->read_status[2] = (pit->ctrls[2] & 0x3f) | 0x40 | (pit->out[2] ? 0x80 : 0); + pit->read_status[2] = (pit->ctrls[2] & 0x3f) | (pit->out[2] ? 0x80 : 0); pit->do_read_status[2] = 1; } }