libretro / Genesis-Plus-GX-Wide

Widescreen modification of Genesis Plus GX
Other
22 stars 17 forks source link

Plane B X-scrolling is off by 1 pixel #15

Closed vladikcomper closed 2 years ago

vladikcomper commented 2 years ago

I discovered a serious bug that is specific to Gens-Plus-GX-Wide (the original Gensplus-GX core works correctly). Basically, there are many instances where Plane B horizontal position will be off by 1 pixel related to its actual value stored in HSRAM.

To confirm this bug, I quickly programmed a test ROM that draws a column of tiles, which alternate between Planes A and B respectively. Both planes are being scrolled at the same time and pace.

In Gensplus-GX-Wide, Plane B is always 1 pixel behind its actual position (the second image), when compared to other emulators or the real hardware (the first image).

Test ROM in other emulators Test ROM in Gensplus-GX-Wid

Interestingly, after reaching certain magnitude, scrolling quickly fixes itself and starts behaving correctly. Unfortunately, I didn't have enough time to test it properly, but the bug seems to occur only for negative scrolling values (in HSRAM).

Here's the test ROM I made for the reference: ROM.zip