gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Corrupted palette with large files...

#46770 - Locke - Thu Jun 30, 2005 11:16 am

I have a program wich uses one 256x256 8bit backgroung. It works fine most of the time, but when the size of my .ds.gba is bigger than 800kB it gets corrupted and I get ugly colors, like beeing overwritten...

Could this be possible? I don't know how to fix this, and can't make the file smaller, since the data itself is over 2MB...

Thanks.

EDIT:

A little code, just in case it helps...

Code:

  videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);
  vramSetBankC(VRAM_C_SUB_BG);

  SUB_BG3_CR = BG_BMP8_256x256;
 
  SUB_BG3_XDX = 1 << 8;
  SUB_BG3_XDY = 0;
  SUB_BG3_YDX = 0;
  SUB_BG3_YDY = 1 << 8;

  SUB_BG3_CX = 0;
  SUB_BG3_CY = 0;
           
  dmaCopy(splash_raw, BG_GFX_SUB, 256*256);
  dmaCopy(splash_pal, BG_PALETTE_SUB, 256*2);