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

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? 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
Uneven 16-bit reads from IWRAM and EWRAM   Message List  
Reply | Forward Message #11635 of 15019 |
Re: [gbadev] Re: Uneven 16-bit reads from IWRAM and EWRAM

From: "James Daniels" <james.daniels@...>
> 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).

You can only perform 8-bit reads on odd addresses. 16-bit reads must be
on 16-bit boundaries. 32-bit reads on 32-bit boudaries. I believe that prior
discussions on this have indicated that if you perform a non-aligned read that
the memory read is performed as though the lower bits were 0 (i.e. a read from
2n+1 will read the 16 bits at 2n) and then the input data will be rotated within
the 32-bit register. For example, reading the from address 2n + 1 where the
16 bits at 2n = 0xabcd will result in a register containing 0xcd0000ab.

This is quite different from some CISC processors that will perform the
unaligned
read by issuing multiple reads.

- John






Sun Jun 2, 2002 2:50 am

johnse98072
Offline Offline
Send Email Send Email

Forward
Message #11635 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