fix a bunch of opcodes + add halt callback
A Z80 emulation library
Status: Beta
Brought to you by:
ggambett
I've been hacking away at libz80 to get it to play .sgc files. So far my player manages to play the music for "Sonic the Hedgehog 2" and seems to screw up some of the volumes in "Sonic Chaos", both for the Sega Master System.
Things that are patched:
- fixed weird and potentially dangerous C syntax in RET cc
- added a HALT callback
- fixed 16-bit INC/DEC
- fixed LD rr,(nn) (was acting like LD rr,nn)
- fixed condition codes: Z/NZ around right way, not so literal definition of positive, I assume the PE/PO checks were around the wrong way (but I could be wrong)
- fixed DAA by adding in an "& 15"
There is still more work to be done. This is just what I have so far.
one patch to rule them all