#19185 - RaBBi - Tue Apr 13, 2004 4:38 pm
Hi all,
In order to add a scanline effect managed by a window to my project, I needed to change the enable bits of the 04Ah - WINOUT register.
But it seems that I can't during the HBLANK period.
Here's my code :
I commented the lines where I try to set the display out of the window (cause it doesn't seem to work during HBLANK).
----
Other linked question :
Now, I'll try to do it using the Blend Mode and the blend coefficient, without window.
But before this, do you know if it's possible to change this coeff during HBLANK too?
Or if I'll get the same problem above.
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
In order to add a scanline effect managed by a window to my project, I needed to change the enable bits of the 04Ah - WINOUT register.
But it seems that I can't during the HBLANK period.
Here's my code :
Code: |
void gbl_Screen_Scanlines(u8 used_win, u8 starting_line, u8 ending_line, u8 clearline_height, u8 scanline_height) { static u8 s_win_posY1 = 0; static u8 s_win_posY2 = 0; /* Black line or Normal Line */ /* Black : outside window and Normal : inside window */ static u8 s_next_mode_line = 0; /*if (LCD_Y == ending_line) return;*/ /* start when Line Counter reaches the starting line or change mode line */ if(LCD_Y == starting_line || (LCD_Y == s_next_mode_line && LCD_Y < ending_line)) { /* Nothing Visible Outside the Window 1 GBL_WINOUT_WIN0AND1_DISPLAY_SET(0,0,0,0,0,0);*/ s_win_posY1 = LCD_Y + scanline_height; s_win_posY2 = s_win_posY1 + clearline_height; s_next_mode_line = s_win_posY2; } if (LCD_Y >= ending_line) { /* All Visible Outside the Window 1 GBL_WINOUT_WIN0AND1_DISPLAY_SET(1,1,1,1,1,1); */ } GBL_WINX_CREATE(used_win,0,240,s_win_posY1,s_win_posY2); } |
I commented the lines where I try to set the display out of the window (cause it doesn't seem to work during HBLANK).
----
Other linked question :
Now, I'll try to do it using the Blend Mode and the blend coefficient, without window.
But before this, do you know if it's possible to change this coeff during HBLANK too?
Or if I'll get the same problem above.
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^