Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text in "Animal Race" is incorrect #22

Open
tobiasvl opened this issue Feb 13, 2020 · 6 comments
Open

Text in "Animal Race" is incorrect #22

tobiasvl opened this issue Feb 13, 2020 · 6 comments

Comments

@tobiasvl
Copy link

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.

@tobiasvl
Copy link
Author

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.

@LittleCube-hax
Copy link

LittleCube-hax commented Jun 15, 2020

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;
	}
}

@tobiasvl
Copy link
Author

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: Chromatophore/HP48-Superchip#2

@tobiasvl
Copy link
Author

Note that I also edited the Wikipedia article about CHIP-8 to reflect this.

@tobiasvl
Copy link
Author

Probably not a good idea to close this before kiwi-8 has incorporated the fix, hehe. Maybe someone should attach a PR.

@tobiasvl tobiasvl reopened this Jun 15, 2020
@tomdaley92
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants