1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-29 16:55:59 +00:00

Accepted FUSE's view of bits 3 & 5 from BIT and RES, reducing to 623 issues.

This commit is contained in:
Thomas Harte 2017-05-27 16:19:15 -04:00
parent 33c3fa21e3
commit 98423c6e41
2 changed files with 2 additions and 5 deletions

View File

@ -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])

View File

@ -1026,7 +1026,8 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
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;