Change background-color when BG-layer is disabled

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
Juliean123
Snes9x White Belt
Posts: 2
Joined: Tue Nov 07, 2023 6:09 pm

Change background-color when BG-layer is disabled

Post by Juliean123 »

Hello,

I want to be able to reproduce certain effects, that are being achieved with additive blending, using snes9x. I've attached a screenshot of one of those effects. I can try to calculate what the original sprite looked like, by subtracting it from the background, however with bright effects like in the screenshot, I get certain inaccuracies due to color-clip (when background + effect > 255).

Is there any way to change the background-graphic that is shown in this mode, where BG#2 is off, to be pure black? The color shown seems to depend on the scene/tileset loaded.

I am fully able to modify the emulators source myself and compile it, if this is not a native feature, however I haven't found the right point to make this modification so any pointers would be appreciated.

EDIT: I wasn't able to succesfully attach an image, however just think of a light brown background with a gradient-light circle being drawn on top, with the center clipping into a pure white value
Juliean123
Snes9x White Belt
Posts: 2
Joined: Tue Nov 07, 2023 6:09 pm

Re: Change background-color when BG-layer is disabled

Post by Juliean123 »

Solved it myself. It was in

Code: Select all

struct DrawBackdrop16
Had to simply change

Code: Select all

GFX.ScreenColors = GFX.ClipColors ? BlackColourMap : GFX.RealScreenColors;
To always select BlackColourMap.
Post Reply