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

Rotating sprite shows garbage #18

Open
GValiente opened this issue Dec 1, 2020 · 4 comments
Open

Rotating sprite shows garbage #18

GValiente opened this issue Dec 1, 2020 · 4 comments

Comments

@GValiente
Copy link

Test ROM

Test ROM code

Test video

When rotating a sprite until its rotation is disabled, the emulator shows garbage.

It happens on v0.3.0 with and without a BIOS file.

@AntonioND
Copy link
Owner

The corruption happens when the angle reaches 0, as far as I can see. However, if you take a look at the VRAM viewers, the corruption pattern is correct for the values stored in VRAM. The tiles are correct, but the attributes of the sprite in OAM are wrong.

I suspect this has something to do with the CPU emulation, not with the video emulation. I remember I had a lot of trouble with the instructions that use the barrel shifter, and the fact that the corruption happens right when angle reaches 0 makes me think it's related to that. And I suspect that #17 is the same issue.

Maybe the C++ compiler is using instructions that I don't emulate correctly, and I've never hit that case because I never use C++ in my tests.

@AntonioND
Copy link
Owner

Actually, all of the demos that can hit angle = 0 crash when that happens...

@AntonioND
Copy link
Owner

Do you have the map or elf file of the ROM?

@GValiente
Copy link
Author

Test MAP.

Test ELF.

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

2 participants