deltabeard / Peanut-GB

A Game Boy (DMG) emulator single header library written in C99. Performance is prioritised over accuracy.

Home Page:https://projects.deltabeard.com/peanutgb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lcd: use checksum to determine if line needs to be rendered again

deltabeard opened this issue · comments

Before rendering a line on the LCD, use a fast checksum on the tile data for the line to check whether any tiles or sprites have changes for that line. If they have not changed since the last render, then skip rendering that line.

LCD rendering is costly, so not having to render the line again may improve performance. Having to perform a hash on each line may reduce performance however.

This checksum could be calculated during the sort performed in #52.