MiSTer-devel / NES_MiSTer

GNU General Public License v3.0
172 stars 75 forks source link

Castlevania iii whip motion glitch #314

Closed patjohnny closed 2 years ago

patjohnny commented 2 years ago

Hi. The whip motion in castlevania iii seems to be glitching. You can easily notice it against most backgrounds. It’s noticeable on both hdmi and analog out. Please assist. Thanks.

Kitrinx commented 2 years ago

I believe this is an MMC5 related bug as it seems to be present in both different versions of the PPU that are written, maybe @paulb-nl or @greyrogue have some insights here.

paulb-nl commented 2 years ago

I only see it happen with Extra sprites enabled so it must be interfering with the MMC5 scanline detection/tile counter somehow even though chr_ain_orig is used.

paulb-nl commented 2 years ago

The problem was with the low tile byte fetch of the first extra sprite. in_split_area and is_sprite_fetch toggle during that time so the wrong byte was being fetched.

315

Kitrinx commented 2 years ago

that makes sense. I figured the extra sprite stuff would bit us in the butt eventually, it seemed surprisingly tame to manage so far :)

patjohnny commented 2 years ago

Hi. I just noticed wickerwaka’s 2560x1440 build in the test builds discord seems to have fixed this glitch. Could someone double-check please? Thanks.

Kitrinx commented 2 years ago

This glitch is completely unrelated to that. Paul already figured out it was caused by extra sprites being turned on, and added the correct signal filtering to the NES codebase. It's already fixed, just not released yet.