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
Memory addresses?   Message List  
Reply | Forward Message #14823 of 15019 |
Re: [gbadev] Memory addresses?


Hi,

All types of RAM you described are physicaly seperated (they are accessed
through different busses). The CPU uses the '0x02', '0x03' (etc.) to
determine which chip you want to access. The lower bits will then be used as
an offset within the RAM/VRAM/ROM/I.O. registers you selected.

Other areas include: System ROM (0x00), Palette RAM (0x05), VRAM (0x06),
Sprite VRAM (0x07), Game ROM/Flash memory (0x08, 0x0A, 0x0C) and Game RAM
(0x0E).

The 32kB of RAM you mentioned (connected to a 32-bit bus) is the fastest
(both for random and sequential access, 1 wait-state). Use it to store 32
bit variables which are frequently used and 32 bit routines (ARM code).

The 256 kB of RAM (connected to a 16-bit bus) is slower than that; both
random and sequential access cost 2 wait-states (per 16 bit chunk). Use it
to store 16 bit variables or 32 bit variables which are not accessed that
often. If required you can also store executable code here (you'll need it
for multiboot for instance), but make sure it's Thumb code (16 bit per
instruction).

For comparison: ROM also uses a 16-bit bus and needs 3 waitstates for random
access. 1 waitstate for sequential access (this can be configured, though).
Note that there's a prefetch buffer available which can speed up the ROM
accesses.

To illustrate the difference:

reading 64 bits of ROM = 3+1+1+1 = 6 waitstates.
reading 64 bits of 32kB RAM = 1+1 = 2 waitstates.
reading 64 bits of 256kB RAM = 2+2+2+2 = 8 waitstates


Greetings,
Jan-Lieuwe

> I was looking at the memory map of the GBA (as in page two of
>
http://www.ziegler.desaign.de/GBA/gameboy_advance_for_nongaming_applications.pdf\
)
> and I guess I don't understand the convention. For instance:
>
> External 0x02000000 256 KB 16 bits
>
> Internal 0x03000000 32 KB 32 bits
>
> IO Ram 0x04000000 1 KB 32 bits
>
> Why does there seem to be equal distances between unequal sizes of
> memory? Are the addresses just arbitrary labels? Or do they refer to
> actual locations in the physical memory?







Tue Nov 9, 2004 6:34 pm

jan-lieuwe@...
Send Email Send Email

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

I was looking at the memory map of the GBA (as in page two of http://www.ziegler.desaign.de/GBA/gameboy_advance_for_nongaming_applications.pdf) and I guess I...
Bill DeWitt
williamjames...
Offline Send Email
Nov 9, 2004
5:11 pm

Hi, All types of RAM you described are physicaly seperated (they are accessed through different busses). The CPU uses the '0x02', '0x03' (etc.) to determine...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
Nov 9, 2004
7:36 pm

... accessed ... to ... be used as ... That makes sense. Why they don't just say that in the tutorials I can't imagine.... Thanks!...
Bill DeWitt
williamjames...
Offline Send Email
Nov 9, 2004
8:50 pm
Advanced

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