#53577 - Dan_attacker - Fri Sep 09, 2005 1:29 pm
In my game, I have the top part of the screen fade while the lower part stays bright. I'm doing this by using a vcount interrupt and then changing the REG_COLEY value to make the screen bright in the middle of drawing the screen. It works perfectly on VisualBoyAdvance, but when I run it on actual hardware, the left of the first line that I changed the brightness for is still dark. About 8 pixels are still dark, and it also wiggles (kind of hard to explain). I've tried disabling all other interrupts but the problem still exists. Here's the code that is run when the vcount interrupt is triggered...
If I can't resolve this problem then I will have to do fading using the palette. Any ideas?
Code: |
void dialogsprdim()
{ dialogirqon=1; WaitForHblank(); SetMode(MODE_0 | H_BLANK_OAM | OBJ_ENABLE | OBJ_MAP_2D | BG0_ENABLE | BG1_ENABLE | BG2_ENABLE | BG3_ENABLE); REG_COLY = 0; while (REG_VCOUNT!=161) { } SetMode(MODE_0 | H_BLANK_OAM | OBJ_ENABLE | OBJ_MAP_1D | BG0_ENABLE | BG1_ENABLE | BG2_ENABLE | BG3_ENABLE); REG_COLY = sintensity2; kramWorker(); dialogirqon=0; } |
If I can't resolve this problem then I will have to do fading using the palette. Any ideas?