I necroposted in an old topic, but I have updates so I'm going to post about it the right way. To quote
Hmm, I'm having a weird bug with v2.0. The following code isn't emulated correctly:
Code:
Expected result: This should set the carry flag. It does on hardware, but does not in the emulator. I don't know if this is the minimal code to reproduce the bug, but it is sufficient.
Well, I hit this bug again when I was trying to test a division routine and I've got a hunch as to what the problem is.
I stepped through and noticed that add ix,de was erroneously setting the carry flag this time. I had suspected it was an issue with the emulator using signed integers, and so I decided to try something: In the debug menu, I highlighted the contents of IX, erased it, and manually typed in the same exact value. This time, it didn't incorrectly set the carry flag.
On the left side is just stepping through the code, on the right is editing IX before stepping:
vs.
vs.
Whelp, this caused undue headaches XD
EDIT: Just making sure it isn't using the larger, cached images on Imgur's servers.
Quote:
Hmm, I'm having a weird bug with v2.0. The following code isn't emulated correctly:
Code:
ld bc,$E240
ld hl,3
ld ix,$C480
add ix,ix
adc hl,hl
add ix,bc
Expected result: This should set the carry flag. It does on hardware, but does not in the emulator. I don't know if this is the minimal code to reproduce the bug, but it is sufficient.
Well, I hit this bug again when I was trying to test a division routine and I've got a hunch as to what the problem is.
I stepped through and noticed that add ix,de was erroneously setting the carry flag this time. I had suspected it was an issue with the emulator using signed integers, and so I decided to try something: In the debug menu, I highlighted the contents of IX, erased it, and manually typed in the same exact value. This time, it didn't incorrectly set the carry flag.
On the left side is just stepping through the code, on the right is editing IX before stepping:
vs.
vs.
Whelp, this caused undue headaches XD
EDIT: Just making sure it isn't using the larger, cached images on Imgur's servers.