mvdnes / rboy

A Gameboy Emulator in Rust
MIT License
605 stars 39 forks source link

fix mask of add16 for half carry #22

Closed van3ll0pe closed 2 months ago

van3ll0pe commented 2 months ago

it was 0x7ff but need to be 0xfff because the pandoc of gameboy says that "Set if overflow from bit 11."

van3ll0pe commented 2 months ago

Hello, I read your file, and nice jobs for the emulator but I change the mask to check the half carry flag from the function add16 for ADD HL, r16

mvdnes commented 2 months ago

From the description you seem to be correct. And I see SameBoy does this the same way as your patch.

It is unfortunate the tests did not pick this out. I might need to look for better ones.

Thanks! :+1: