Any gotchas reading tile buffer/pattern table?

I've read several VDP docs and I don't see any gotchas. However in my side-scrolling engine I (seem to) have issues with reading tile values at the edges of the buffer. Say the screen is set up as 64x64 tiles I'd have trouble reading values at the 64th column or row.

Probably chasing a red herring (or my own sloppy code) but I thought I'd ask if reading tile values from vram can have issues.
 
I'm not aware of any issues with that. Make sure you don't accidentally have a 64 in there somewhere as 64 wide means the index is 0 to 63. If you accidentally tried reading index 64, you'd really get index 0 of the next line.
 
Chilly Willy said:
I'm not aware of any issues with that. Make sure you don't accidentally have a 64 in there somewhere as 64 wide means the index is 0 to 63. If you accidentally tried reading index 64, you'd really get index 0 of the next line.

Thanks for the sanity check! I'm now starting to suspect my own map data loading code. I'm probably triggering the map drawing code over and over again thus borking the tile reading. Being a newbie means rewriting your entire engine over and over again
tongue.gif
 
slobu said:
Thanks for the sanity check! I'm now starting to suspect my own map data loading code. I'm probably triggering the map drawing code over and over again thus borking the tile reading. Being a newbie means rewriting your entire engine over and over again
tongue.gif

biggrin.gif


Yes, I've done that myself any number of times.
 
Back
Top