giibiiadvance
giibiiadvance copied to clipboard
Rotating sprite shows garbage
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.
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 https://github.com/AntonioND/giibiiadvance/issues/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.
Actually, all of the demos that can hit angle = 0 crash when that happens...
Do you have the map or elf file of the ROM?