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.

Graphics > reading tiles off the edge?

#65855 - Dwedit - Fri Jan 06, 2006 6:19 am

What happens when you set a tilemap's staring location to C000, then use tile 512 or greater?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#65857 - poslundc - Fri Jan 06, 2006 6:28 am

I'm surprised I remember that this was discussed once a couple of years back in this thread.

The results were inconclusive, it seems. Cearn found that it worked in emulation but not on hardware.

Dan.

#65859 - Dwedit - Fri Jan 06, 2006 6:42 am

404 on that demo file... I just want to know if it draws blank tiles, garbage, tiles from sprite ram, or some mirror of tile vram.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#65860 - DekuTree64 - Fri Jan 06, 2006 7:11 am

I remember trying it once a long time ago. I think I got garbage data, although it's possible that I'd just placed my screen data at the start of VRAM, and was mirroring into it. In any case, I never got anything from sprite VRAM to show up.

Another test I ran was to see if you'd actually get any stalls by accessing VRAM at the same time as the graphics hardware. Turns out it does stall, except sprite and BG VRAM seem to be entirely seperate, so accessing one of them while the GPU accesses the other does NOT stall. Weird, since half of sprite VRAM is mapped to the BG in the bitmap modes.

Now that I think about it, I should have run those tests on the bitmap modes too.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#65861 - Dwedit - Fri Jan 06, 2006 7:19 am

I just tired it out... I got transparent tiles, which changed to junk as the screen scrolled or when there was blending.

I also tried it on a DS, and got transparent tiles. Looked very different from the GBA. I wonder what happens if you initialize the VRAM with stuff before running a GBA game?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#66204 - ScottLininger - Mon Jan 09, 2006 12:34 am

Dwedit wrote:
I also tried it on a DS, and got transparent tiles. Looked very different from the GBA. I wonder what happens if you initialize the VRAM with stuff before running a GBA game?


Did you run the exact same ROM on both the GBA and the DS? That's kinda interesting if you did, since the DS supposedly performs the same in GBA mode... Though maybe there are some differences in what "start state" the memory is in, since it sounds like the code isn't actually overwriting the sprite VRAM.

-Scott

#66241 - tepples - Mon Jan 09, 2006 6:30 am

"Start state" should be the same because the BIOS intro calls the same RegisterRamReset routine at the end. Perhaps the GBA and Nintendo DS work identically when running commercial games and homebrew games other than specific tests for this behavior because the result of running past the end of background VRAM is officially "undefined".
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.