Blitter Help


Ok, i have everything ready now.

It displays garbage now... Is there any issue with 8 bit color support? The pixels and the colors have no sense with the real image...

I have tried Squidge suggestion about using the 16 bit code and it is the same...

The garbage displayed changes during the time... It is very extrange...

Regards.
 
The blitter is just a fast memory copier, so if a standard "while (length--) *dest++ = *src++" works, then the blitter copy should work. Don't forget though that the srcstride and dststride must be the number of bytes to addon to the src/dst pointers at the end of each line. So eg, if you say your image is 320 pixels, then in 8 bit mode the stride will be 320, and in 16-bit mode it will be 640 (even if you are only copying 20 pixels from your source to your destination, the stride would still be 320/640, as this is the number of bytes required to reach the next vertical line in the destination frame buffer).

Also, because it's a simple memory copier, it doesn't care about palettes - you have to update these yourself.
 
paeryn posted on Mar 15 2006 at 03:31 AM said:
I've just run a quick test, it seems the blitter registers are shadowed for 0xe002 x000, I tried with 0000, 2000, 4000, 8000 and they all worked

That's just odd. Why would they do that?
 
Last edited by a moderator:
Franxis posted on Mar 15 2006 at 07:12 AM said:
Ok, i have everything ready now.

It displays garbage now... Is there any issue with 8 bit color support? The pixels and the colors have no sense with the real image...

I have tried Squidge suggestion about using the 16 bit code and it is the same...

The garbage displayed changes during the time... It is very extrange...

Regards.

Make sure you are passing the physical memory address, not a virtual address such as that returned by malloc() or mmap().
 
Last edited by a moderator:
slygamer posted on Mar 14 2006 at 11:21 PM said:
paeryn posted on Mar 15 2006 at 03:31 AM said:
I've just run a quick test, it seems the blitter registers are shadowed for 0xe002 x000, I tried with 0000, 2000, 4000, 8000 and they all worked
That's just odd. Why would they do that?
Probably any address starting 0xe002 is routed to the blitter, with only the lower address lines connected. It reduces chip compexity at the expense of addressable space.

I've put the databook up on my site, I'll keep it there as long as I can - I've only got 30MB but I don't use it for anything else other than gp2x-sdl.
MP2520F Version 1.0
 
Last edited by a moderator:
Back
Top