Page 1 of 1

Question on 8 bit Backgrounds

Posted: Mon Feb 02, 2009 9:48 pm
by Sylus101
Okay, totally scrapping the old post in exchange for a quick and straight question. I found that writing to a single byte wasn't possibly with an 8 bit background. Should reads of one byte work correctly or might you always only get the upper or lower bits?

Re: Question on 8 bit Backgrounds

Posted: Sun Feb 08, 2009 11:36 pm
by gmiller1018
On the GBA you have to figure out what short the byte is in and read that short , change the byte, then write it back. Since the DS is a superset of the GBA then this would hold for video memory (i assume, not sure)

Re: Question on 8 bit Backgrounds

Posted: Sun Feb 08, 2009 11:47 pm
by Sylus101
Hi Gary, thanks for the reply. I'm pretty sure I ended up figuring this one out. What I've got is a 16bit game background and an 8 bit collision bg underneath. The way I got it working was basically like you said, reading in the whole short, checking if my sprites x position was odd or even and then checking the corresponding upper or lower bits. Works very well, actually.

The issue I have now, in another post, is with a scrolling method I worked on and the fact that I'm having trouble using DMA to get the collision bg to scroll the way I want.