From 98423c6e413b2eb6d1a15b9675a9fb42f6283d8d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 27 May 2017 16:19:15 -0400 Subject: [PATCH] Accepted FUSE's view of bits 3 & 5 from BIT and RES, reducing to 623 issues. --- OSBindings/Mac/Clock SignalTests/FUSETests.swift | 4 ---- Processors/Z80/Z80.hpp | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/OSBindings/Mac/Clock SignalTests/FUSETests.swift b/OSBindings/Mac/Clock SignalTests/FUSETests.swift index f9eb481bb..861c909ff 100644 --- a/OSBindings/Mac/Clock SignalTests/FUSETests.swift +++ b/OSBindings/Mac/Clock SignalTests/FUSETests.swift @@ -159,10 +159,6 @@ class FUSETests: XCTestCase { let name = itemDictionary["name"] as! String -// if name != "cb06" { -// continue -// } - let initialState = RegisterState(dictionary: itemDictionary["state"] as! [String: Any]) let targetState = RegisterState(dictionary: outputDictionary["state"] as! [String: Any]) diff --git a/Processors/Z80/Z80.hpp b/Processors/Z80/Z80.hpp index 8cb21fe92..cd7b8efc4 100644 --- a/Processors/Z80/Z80.hpp +++ b/Processors/Z80/Z80.hpp @@ -1026,7 +1026,8 @@ template class Processor: public MicroOpScheduler { case MicroOp::BIT: { uint8_t result = *(uint8_t *)operation->source & (1 << ((operation_ >> 3)&7)); - sign_result_ = zero_result_ = bit3_result_ = bit5_result_ = result; + sign_result_ = zero_result_ = result; + bit3_result_ = bit5_result_ = *(uint8_t *)operation->source; // This is a divergence between FUSE and The Undocumented Z80 Documented. half_carry_flag_ = Flag::HalfCarry; subtract_flag_ = 0; parity_overflow_flag_ = result ? 0 : Flag::Parity;