start of 3DS memory map

This commit is contained in:
ShizZy 2013-09-05 23:04:04 -04:00
parent d708e2d68a
commit 62d873da3e
5 changed files with 80 additions and 16 deletions

View file

@ -163,14 +163,6 @@ u8* MemArena::Find4GBBase()
}
// yeah, this could also be done in like two bitwise ops...
#define SKIP(a_flags, b_flags) \
if (!(a_flags & MV_WII_ONLY) && (b_flags & MV_WII_ONLY)) \
continue; \
if (!(a_flags & MV_FAKE_VMEM) && (b_flags & MV_FAKE_VMEM)) \
continue; \
static bool Memory_TryBase(u8 *base, const MemoryView *views, int num_views, u32 flags, MemArena *arena) {
// OK, we know where to find free space. Now grab it!
// We just mimic the popular BAT setup.
@ -189,7 +181,6 @@ static bool Memory_TryBase(u8 *base, const MemoryView *views, int num_views, u32
int i;
for (i = 0; i < num_views; i++)
{
SKIP(flags, views[i].flags);
if (views[i].flags & MV_MIRROR_PREVIOUS) {
position = last_position;
} else {
@ -230,7 +221,6 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena
for (int i = 0; i < num_views; i++)
{
SKIP(flags, views[i].flags);
if ((views[i].flags & MV_MIRROR_PREVIOUS) == 0)
total_mem += views[i].size;
}