Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: DMA problems   Message List  
Reply | Forward Message #12619 of 15019 |
DMA problems

I'm not sure what's causing these problems but DMA is giving me a lot
of headaches. Basically, consecutive DMAs seem to be screwing up.
Using Mappy I can see that DMAs are firing, but sometimes they don't
transfer the right info. For example, I have a function LoadMapData
(), it takes a pointer, a word count, and a destination to load the
tile map into. I call it twice, the first time I fill the map with
info for layer0, the second time for layer1... I look in memory and I
see at both blocks in memory the info from layer1.

This seems like such an elementary problem, but I have no idea why it
is happening. As near as I can tell when I do consecutive DMAs the
DMA doesn't start for a bit, and when it does start I've already
changed the source and/or dest regs with the addresses for the next
transfer.

I have no idea how to prevent this... I really can't do unrelated
stuff between this unless I invent some useless code to stick in. I
have the calls to DMA wrapped in functions, but this doesn't seem to
introduce a delay. For each DMA I set the source, dest, control +
enable, and lastly word count regs in that order, but that doesn't
seem to introduce the desired delay.

If I'm doing something wrong or if anyone has a tried and tested
function of theirs for DMA that works I'd appreciate having a look at
it. If you think that my problem is something else, by all means,
chime in.

Thanks.





Fri Sep 6, 2002 5:11 am

y_mohamoud
Offline Offline
Send Email Send Email

Forward
Message #12619 of 15019 |
Expand Messages Author Sort by Date

Never mind about that DMA problems post a few hours ago. It turns out that this: "&Map[256]" is somehow different from "(&Map + 256)". I don't know why, but...
Daniel Papenburg
dfpercush
Offline Send Email
Feb 11, 2002
9:31 am

yes it will be &map[n] is &(map[n]) i.e the address of the n'th element in array map (or from pointer map) the same as saying (map+n) (*(map+n) is the same as...
Mike Wynn
mike.wynn@...
Send Email
Feb 11, 2002
10:04 am

well, it was declared u8 Map[65536];. That should mean that the address of the first element plus N will be the same as the address of the Nth element in the...
Daniel Papenburg
dfpercush
Offline Send Email
Feb 11, 2002
12:20 pm

in C pointer arithmetics work like this pointer + integer evaluates as (pointer integer value) + (integer * sizeof element pointer points to) &map is a pointer...
Mike Wynn
mike.wynn@...
Send Email
Feb 12, 2002
1:22 pm

I'm not sure what's causing these problems but DMA is giving me a lot of headaches. Basically, consecutive DMAs seem to be screwing up. Using Mappy I can see...
y_mohamoud
Offline Send Email
Sep 6, 2002
10:52 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help