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

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

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
Uneven 16-bit reads from IWRAM and EWRAM   Message List  
Reply | Forward Message #11634 of 15019 |
Re: Uneven 16-bit reads from IWRAM and EWRAM

--- In gbadev@y..., James Daniels <james.daniels@a...> wrote:
> Hi yerricde,
>
> > I interpret "even" to mean "4n" and "odd" as "4n + 2". Reads
> > from "odd" addresses from IWRAM should not be any different than
> > reads from "even" addresses because the whole 32-bit quantity
> > gets placed on the CPU's bus.
>
> I meant odd and even in the traditional sense - i.e. an even
> address is exactly divisible by 2 (2n) whereas an odd address is
> not (2n+1).
>
> > For fun, I added in an unaligned (odd-byte-address)
> > EWRAM read, and its color bar was the same height.
>
> This answers my question - thanks! (Did you get the same result
> for IWRAM?)

You should, as a read from an odd (4n + c where 1 <= c <= 3) address
is merely a read from 4n followed by a rotation.

However, note that unlike on x86, you're really not supposed to
do unaligned reads or writes on ARM. The results are well-defined
but not what you'd think at first.

Consult the ARM Architecture Reference Manual and the ARM7TDMI
documentation for more information.

--
Damian





Sun Jun 2, 2002 2:25 am

yerricde
Offline Offline
Send Email Send Email

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

Hi all, Has anyone here timed 16-bit reads from IWRAM and EWRAM on a real GBA? Are reads from odd addresses just as fast as those from even addresses? -- ...
James Daniels
j_r_daniels
Offline Send Email
Jun 1, 2002
8:26 pm

... I interpret "even" to mean "4n" and "odd" as "4n + 2". Reads from "odd" addresses from IWRAM should not be any different than reads from "even" addresses...
yerricde
Offline Send Email
Jun 2, 2002
12:15 am

Hi yerricde, ... I meant odd and even in the traditional sense - i.e. an even address is exactly divisible by 2 (2n) whereas an odd address is not (2n+1). ... ...
James Daniels
j_r_daniels
Offline Send Email
Jun 2, 2002
1:04 am

... You should, as a read from an odd (4n + c where 1 <= c <= 3) address is merely a read from 4n followed by a rotation. However, note that unlike on x86,...
yerricde
Offline Send Email
Jun 2, 2002
10:23 am

From: "James Daniels" <james.daniels@...> ... You can only perform 8-bit reads on odd addresses. 16-bit reads must be on 16-bit boundaries....
John Seghers
johnse98072
Offline Send Email
Jun 2, 2002
10:23 am
Advanced

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