kiwi-8
kiwi-8 copied to clipboard
Text in "Animal Race" is incorrect
If you load up "Animal Race", the text is not correct. The first sprite of the text seems to be repeated.
Reported by @cassianoperin here in #9.
I looked quickly through the implementation of the relevant opcodes, and found one error with FX1E. VF should not be modified (currently it's set to 1 if the value overflows 0xFFF, and 0 otherwise, but the original COSMAC VIP interpreter did not behave this way). Not sure if it's related though.
I can confirm that changing this literally fixes ALL the text in Animal Race. All of it. The title screen, the bet screen, and the win screen (for I had this very issue).
Essentially, the part that contains this code in FX1E:
if ((I.get() + V[X]) > 0xFFF)
{
V[0xF] = 1;
}
else
{
V[0xF] = 0;
}
Gets changed to this:
if (!animalraces) // or however you choose to check for it
{
if ((I.get() + V[X]) > 0xFFF)
{
V[0xF] = 1;
}
else
{
V[0xF] = 0;
}
}
Great to hear!
However, you don't need to check for animalrace there. Animal Race isn't the only game that doesn't expect this behavior, it's the other way around – no games expect this behavior, except for Spacefight! 2091 (and perhaps other games made for CHIP-8 for the Amiga, but I don't know of any). See the discussion here: https://github.com/Chromatophore/HP48-Superchip/issues/2
Note that I also edited the Wikipedia article about CHIP-8 to reflect this.
Probably not a good idea to close this before kiwi-8 has incorporated the fix, hehe. Maybe someone should attach a PR.
Hey @tobiasvl and @LittlestCube , Sorry for being so quiet for the last few years, been busy with real life and work. I am sincerely hoping to get back into this project eventually (and others) and port it to linux (im thinking apt package for debian) and fix all the issues described etc. Thanks for being supportive and bringing some of these issues to my attention. It has been quite some time since I have even thought about emulation in general and written anything in C, so it will take some time to get back into the swing of things, but know that your suggestions have been heard!
I am also open to anyone else that would like to contribute or make PRs :)