I found an error in the ABCD instruction. In the file cpu68k/gen68k.c:
Change at or around line 925:
OUT(" if (outdata_tmp > 0x90) {\n");
to
OUT(" if (outdata_tmp >= 0xa0) {\n");
In the unfixed state, the check for an overflow condition is determined to be true for BCD numbers in the range 90 to 99, even though the overflow shouldn't happen unless the sum exceeds 99. This modification fixes that error.
This will fix a variety of probably uncommon errors in emulation of games that use BCD numbers. In particular, Phantasy Star III uses BCDs all over the place, and various numbers will sometimes give incorrect displayed values.
The code in my patched versions looks a bit different for this instruction. I'm not sure whether it suffers from this bug. Could you point out a specific scene in whatever game that is easy to reach to check for this bug? I don't want to play PSIII just to search for this issue.