Fixed another timing regression with the CB opcodes
This commit is contained in:
parent
96063fb0da
commit
e380a00b67
@ -125,7 +125,7 @@ DoubleBitsAndWriteRow:
|
|||||||
WaitFrame:
|
WaitFrame:
|
||||||
push hl
|
push hl
|
||||||
ld hl, $FF0F
|
ld hl, $FF0F
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
.wait
|
.wait
|
||||||
bit 0, [hl]
|
bit 0, [hl]
|
||||||
jr z, .wait
|
jr z, .wait
|
||||||
|
@ -1272,7 +1272,7 @@ static void bit_r(GB_gameboy_t *gb, uint8_t opcode)
|
|||||||
uint8_t value;
|
uint8_t value;
|
||||||
uint8_t bit;
|
uint8_t bit;
|
||||||
GB_advance_cycles(gb, 4);
|
GB_advance_cycles(gb, 4);
|
||||||
value = get_src_value(gb, opcode, 3);
|
value = get_src_value(gb, opcode, (opcode & 0xC0) == 0x40? 4 : 3);
|
||||||
bit = 1 << ((opcode >> 3) & 7);
|
bit = 1 << ((opcode >> 3) & 7);
|
||||||
if ((opcode & 0xC0) == 0x40) { /* Bit */
|
if ((opcode & 0xC0) == 0x40) { /* Bit */
|
||||||
gb->registers[GB_REGISTER_AF] &= 0xFF00 | GB_CARRY_FLAG;
|
gb->registers[GB_REGISTER_AF] &= 0xFF00 | GB_CARRY_FLAG;
|
||||||
|
Loading…
Reference in New Issue
Block a user