NanoBoyAdvance
NanoBoyAdvance copied to clipboard
Noise on gba-niccc
NanoBoyAdvance 1.3 shows some noise on gba-niccc demo:
It is difficult to catch it on a screenshot, running the demo shows it better.
It didn't happen with 1.2 release.
Regression from this commit: https://github.com/fleroviux/NanoboyAdvance/commit/92779c876f287530372b355044e8f9ca8dbf5c8c
Ugh, will have to do some more investigation how this is supposed to work.
Seems like HDMA runs long enough to overlap with the H-draw period of the next scanline. Because NBA currently renders the whole scanline at the start of H-draw, it uses old settings for all OAMs that haven't been updated at the start of H-draw yet.
Probably works on hardware because OAM rendering isn't instantaneous and the higher entries in OAM are rendered later.
One fix might be to render OAM at the end of H-draw, but neither way it is really accurate. I guess this means I should finally implement a (sort of) cycle-accurate PPU for real.
Don't know if it helps, but Varooom 3D (https://gvaliente.itch.io/varooom-3d) shows similar issues with much less sprites rendered with HDMA (23 vs 38):