Question on 8 bit Backgrounds

Post Reply
Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Question on 8 bit Backgrounds

Post by Sylus101 » Mon Feb 02, 2009 9:48 pm

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?
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

gmiller1018
Posts: 11
Joined: Mon Nov 12, 2007 10:47 pm
Location: Winter Springs Florida, USA

Re: Question on 8 bit Backgrounds

Post by gmiller1018 » Sun Feb 08, 2009 11:36 pm

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)
Gary Miller
CD Machine Architecture II, Operating System Concepts
Full Sail

http://www.fullsail.com

Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Re: Question on 8 bit Backgrounds

Post by Sylus101 » Sun Feb 08, 2009 11:47 pm

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.
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests