ekeeke / Genesis-Plus-GX

An enhanced port of Genesis Plus - accurate & portable Sega 8/16 bit emulator
Other
699 stars 202 forks source link

Emulation of dots artefacts on CRAM writes #220

Open retrorepair opened 6 years ago

retrorepair commented 6 years ago

On a real Geneis/Megadrive, the VDP will spit out garbage (sprite data?) in the overscan area, usually the bottom right.

This is evedent in lots of games (all of them?) and if you load a game in the Exodus emulator you can see it there, as well as on real hardware but although Genesis Plus GX does draw the overscan area (borders) it doesn't show this garbage.

More a nit picky thing really but I feel it adds to the overall feeling of playing on a real console as I always remember this from my childhood. In the name of accuracy.....

ekeeke commented 6 years ago

Actually, this happens whenever the game tries to write the color palette (CRAM), this is not garbage sprite data but the color value that is being written. It happens because of bus access conflict with the current pixel readout. And it does not happen only in border area but can also occurs in active screen area if the game tries to update CRAM mid-screen, it's just more common (and more visible) in border area.

It was initially not emulated because:

That's said, there are some recent homebrew demos that kinda use this 'feature' to display pictures in 'direct-color' mode (by disabling the display then doing precisely timed and continuous DMA to CRAM) so emulating this could actually be interesting. That's why I will leave this request open as it might eventually be added sometime in the future (by me or someone else)

NTxC commented 4 years ago

Please consider working on this feature. This is the only feature that's missing from Genesis Plus GX that is implemented in Blastem. If you implement this my life will be complete.

getCursorsExe commented 3 years ago

On hardware Sega Mega Drive, the game can CRAM can be written at anytime, but on most emulators, CRAM can be only written during H-Blank or V-Blank. If it increases emulation processing requriements, then how about CRAM Dots as an option that will be disabled by default?

getCursorsExe commented 3 years ago

This explains why the 512 COLORS TITANIC RECORD in TiTAN Overdrive Beta is displayed as color scanlines. This is probably also because of the emulator unknowingly displaying only 16 colors in one scanline.

retrorepair commented 2 months ago

Is this still a possibility?