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 > weird arrays

#8188 - whodoo - Fri Jul 04, 2003 2:17 am

here we go again..I was just wondering.. I put a tileset in an array (unsigned short array[19200]... 600 tiles)... and the program acted crazy..
then i put the tiledata directly into the memory (made a program that gave an ouput like tileMEM[0] = 12321 ...and it worked.. but it?s exactly the same values but when putting them into an array the whole program?s turning upsidedown

#8189 - pollier - Fri Jul 04, 2003 2:39 am

are your arrays being placed in ROM? try "const unsigned short array[19200]" etc etc
_________________
(Works for me!)

#8191 - whodoo - Fri Jul 04, 2003 2:51 am

Thanks dude, cant believe I didnt see that myself