Game Boy: What constitutes a “half-carry”?
It’s the carry from bit 3 to bit 4, just like the normal carry flag records carry from bit 7. So, e.g. to get the half carry bit in an add: ((a&0xf) + (value&0xf))&0x10 Which gives 0x10 if half carry should be set, 0 otherwise. Getting half carry from the other relevant ops follows naturally … Read more