06-26-2020, 06:10 AM
@sodthor did some testing, and confirmed that a stock lcd works fine with combined hblank effects.
My guess is that the timing of the backlit lcd mod is different enough to cause an issue.
The good news is that I figured out that if I add a slight bit of a delay timer (i.e. a while loop that checks timer variable is less than a max and adds to the timer until the condition is not true) at the beginning of the hblank interrupt before any code that affects the display, I can get it to display the effects on the backlit lcd without artifacts at the seams. I am unsure if such a delay would cause issues on the stock screen, but the emulator I'm using doesn't seem to have an issue with it.
It remains to be seen if I can get acceptable performance on a fully drawn gradient, where every single line on the screen is assigned a background color from a list. At the moment, doing this is really slowing things down in my game.
My guess is that the timing of the backlit lcd mod is different enough to cause an issue.
The good news is that I figured out that if I add a slight bit of a delay timer (i.e. a while loop that checks timer variable is less than a max and adds to the timer until the condition is not true) at the beginning of the hblank interrupt before any code that affects the display, I can get it to display the effects on the backlit lcd without artifacts at the seams. I am unsure if such a delay would cause issues on the stock screen, but the emulator I'm using doesn't seem to have an issue with it.
It remains to be seen if I can get acceptable performance on a fully drawn gradient, where every single line on the screen is assigned a background color from a list. At the moment, doing this is really slowing things down in my game.