mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
Correct ppc_init_memory_map()
This commit is contained in:
parent
f0357f29e2
commit
ca784197e6
@ -131,24 +131,22 @@ void ppc_init_memory_map()
|
||||
|
||||
unsigned long *base = *(unsigned long**)MACOS_MEMMAP_PTR_ADDR;
|
||||
unsigned long len = *(unsigned short*)MACOS_MEMMAP_SIZE_ADDR;
|
||||
int i;
|
||||
|
||||
if (len <= MACOS_MEMMAP_BANK_0FFSET)
|
||||
return;
|
||||
|
||||
base += MACOS_MEMMAP_BANK_0FFSET;
|
||||
base = (unsigned long*)((char*)base + MACOS_MEMMAP_BANK_0FFSET);
|
||||
len -= MACOS_MEMMAP_BANK_0FFSET;
|
||||
i = 0;
|
||||
|
||||
memory_map.bank_number = 0;
|
||||
while(len >= 8)
|
||||
{
|
||||
unsigned long addr = *(unsigned long*)base;
|
||||
unsigned long size = *(unsigned long*)(base+4);
|
||||
unsigned long addr = *(unsigned long*)base++;
|
||||
unsigned long size = *(unsigned long*)base++;
|
||||
|
||||
if (size)
|
||||
bank_add_mem(addr, addr, size);
|
||||
|
||||
base += 8;
|
||||
len -= 8;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user