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.

Coding > Tiles dissapearing!

#4027 - Lord Graga - Sun Mar 16, 2003 2:27 pm

Hey all, lately I have got a wierd problem with tiles.
The graphics that I have made is 8x712 big, that is (8*712)/1024 = 5,5625 Kbyte.
I am writing to CharMem0, defined as following:

Code:
u16* CharMem0 = (u16*)0x6000000;


The BG's (3) are all pointed to that charmemory, and in the start of the game everything works fine, i.e most of the the tiles that I need is showed correctly, but some of them (the first 23 or something like that), won't show up at all!
I continue the game, and suddenly 35+ tiles is missing, both from the start and the end of the charmen!.
I don't do any writes at all to the charmen but this:
Code:
for(i=0;i<tiles_size;i++)   CharMem0[i] = tilesData[i];


What could possibly be wrong? Does any of you guys know to lock all writing to the Charmem?

#4030 - Lord Graga - Sun Mar 16, 2003 5:21 pm

I found out what was wrong:

ScreenMem0 and CharMem0 has the same adresses.