agg23 / openfpga-NES

NES for the Analogue Pocket
GNU General Public License v3.0
187 stars 7 forks source link

Incorrect, large OAM implementation #32

Open agg23 opened 9 months ago

agg23 commented 9 months ago

The MiSTer core has an extremely large OAM implementation that does not mirror the hardware at all. It wastes a ton of space and does simultaneous access to many addresses at once, requiring it to be implemented as a massive register instead of RAM. This consumes around 27% of the Pocket's resources.

image

This was introduced in https://github.com/MiSTer-devel/NES_MiSTer/commit/922cdcb56d84e2f4f50a9714b1c583701a6573a9, which added extra sprite functionality to the core.

dfilskov commented 9 months ago

Could it be optimized while retaining the extra functionality?

Great work btw!

naveedster commented 9 months ago

Will there ever be save states and a video crt scanline filters?

agg23 commented 9 months ago

Could it be optimized while retaining the extra functionality?

Theoretically, yes, but you have to design it very carefully for that purpose, which may be quite difficult given you're shoehorning in another 8 sprites while maintaining the same cycle timings. I would probably be more likely to drop the feature and have a more complete core, but I realize the extra sprite feature is very useful for NES.

agg23 commented 9 months ago

Will there ever be save states and a video crt scanline filters?

This is extremely off topic, so I will only allow this once, and future comments of this sort will be deleted.

The core already supports savestates, and video filters will come when Analogue releases general support for them.