Fix c99 Z80 impl to accept ZEXALL test.

This commit is contained in:
romych committed 2026-03-10 16:37:30 +03:00
1 parent ed43a19a10
commit db6ca6e0f8
3 files changed
+3 -20

No files matched your search

-13
View File
@@ -2,19 +2,6 @@ package c99
import log "github.com/sirupsen/logrus"
// GetBit return bit "n" from byte "val"
func getBit(n byte, val byte) byte {
return ((val) >> (n)) & 1
}
func getBit3(val byte) bool {
return (val & 0x08) != 0
}
func getBit5(val byte) bool {
return (val & 0x20) != 0
}
func (z *Z80) rb(addr uint16) byte {
return z.core.MemRead(addr)
}
+2 -1
View File
@@ -356,7 +356,8 @@ func (z *Z80) ldi() {
// for the calculation of xf/yf on LDI
result := val + z.a
z.updateXY(result)
z.xf = result&0x08 != 0 // bit 3
z.yf = result&0x02 != 0 // bit 1
z.nf = false
z.hf = false