frederic-mahe / Analogue-Pocket

An issue tracker for Analogue's Pocket, a handheld FPGA device released in December 2021
58 stars 1 forks source link

Sprites close to the right edge of screen in GB/GBC games have pixels cut-off in the rightmost column #112

Open Blaziken257 opened 1 year ago

Blaziken257 commented 1 year ago

Firmware versions

First seen on Pocket OS v1.1 beta 7 and still remains as of v1.1, v1.2, v2.0, and v2.1. Untested on versions prior to v1.1 beta 7.

This issue is also present in spiritualized1997's openFPGA GBC core, but not in budude's core.

Description

In various games for Game Boy and Game Boy Color, whenever a sprite is close to the edge of the screen, the rightmost column of pixels is not visible on the screen. This appears to happen when the sprite's X-position (e.g. OAM addresses 0xFE01, 0xFE05, 0xFE09, etc.) is 0xA7. This is easier to spot in some situations than others, and is easiest to see if the sprite doesn't move horizontally or moves at a consistent pace, and if there are multiple sprites adjacent to one another vertically.

Below are some examples of comparison screenshots: The left is a screenshot from the Pocket, and the right is a screenshot from the BGB emulator. BGB is consistent with real hardware in this situation.

Keitai Denjuu Telefang

Pocket bgb
Telefang_Sprite_Issue_Pocket bgb00813

This example is particularly easy to spot, and can be seen a cutscene that appears if the user doesn't press anything on the title screen. The Shigeki metasprite is made up of several smaller 8x8 sprites and these move left at a consistent pace, making this issue easily visible several times in the cutscene.

Super Mario Bros. Deluxe

Pocket bgb
SMBDX_Sprite_Issue_Pocket bgb00814

Notice that on the Pocket, the white pixels on the Paratroopa are missing since these pixels are on the rightmost column.

Wario Land: Super Mario Land 3

Pocket bgb
Wario_Land_Sprite_Issue_Pocket bgb00812

Pixels on the right of the door to the treasure room are missing (see to the right of the eyes of the unlocked door).