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

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

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
accessing memory   Message List  
Reply | Forward Message #13598 of 15019 |
i've been looking at various gba.h files and have a question about setting up
memory locations. I've notived 3 main ways people are doing this....

#define OBJPaletteMem 0x5000200
#define OBJPaletteMem (u16*)0x5000200
u16* OBJPaletteMem = (u16*)0x5000200;

Can someone please explain which method is best? Am i right in assuming one
method is faster?

thanks






Wed Jan 1, 2003 9:52 pm

PurpleDecay@...
Send Email Send Email

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

i've been looking at various gba.h files and have a question about setting up memory locations. I've notived 3 main ways people are doing this.... #define...
PurpleDecay@...
Send Email
Jan 1, 2003
10:15 pm

... up ... Using this method you have an integer which still needs to be casted to a pointer, so if you want to change color entry 0 to white, you'd do: ...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
Jan 1, 2003
10:36 pm

#define OBJPaletteMem ((volatile u16 *)0x5000200) Is fastest and proper. If you don't declare it volatile, the compiler may optimize out references to the...
Mike Schwartz
mykes@...
Send Email
Jan 1, 2003
10:49 pm

... while that statement is true for some cisc-cpus, it doesnt apply to most (if not all) risc cpus.... ie, risc-cpus always do memory access indirect anyway ...
Groepaz
groepaz2000
Offline Send Email
Jan 2, 2003
8:57 pm
Advanced

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