#140242 - ShadowX - Fri Sep 14, 2007 7:39 pm
I tried to display a picture in mode 4.
I first tried to display it without Dougle Buffering. OK.
I tried to display it using Double Buffering. Error.
Result of Double Buffering in GBA:
http://img74.imageshack.us/my.php?image=errogbayu2.png
The code:
I used the headers from "the Pern Project".
I first tried to display it without Dougle Buffering. OK.
I tried to display it using Double Buffering. Error.
Result of Double Buffering in GBA:
http://img74.imageshack.us/my.php?image=errogbayu2.png
The code:
Code: |
#include <gba.h>
#include "m374lx.c" int main() { SetMode(MODE_4 | BG2_ENABLE); int i; for (i=0;i<256;i++) { BGPaletteMem[i]=m374lx_pal[i]; } int x; for (x=0; x<(240*160);x++) { BackBuffer[x]=m374lx_data[x]; } REG_DISPCNT ^= BACKBUFFER; while (1) {} return 0; } |
I used the headers from "the Pern Project".