NanoBoyAdvance icon indicating copy to clipboard operation
NanoBoyAdvance copied to clipboard

Noise on gba-niccc

Open GValiente opened this issue 3 years ago • 3 comments

NanoBoyAdvance 1.3 shows some noise on gba-niccc demo:

NBA

It is difficult to catch it on a screenshot, running the demo shows it better.

It didn't happen with 1.2 release.

GValiente avatar Feb 06 '21 22:02 GValiente

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.

fleroviux avatar Feb 06 '21 23:02 fleroviux

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.

fleroviux avatar Jun 09 '22 20:06 fleroviux

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

GValiente avatar Jun 10 '22 05:06 GValiente