mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-11 11:16:58 +08:00
对于扩容的rom,修改扩容方案
This commit is contained in:
parent
402a71dc22
commit
f4a73b2901
@ -401,7 +401,13 @@ static CodeLocation rom_fit_newsize( CodeLocation rom, int realend, int totalsiz
|
|||||||
|
|
||||||
// grow cart volumn
|
// grow cart volumn
|
||||||
else if( szrom < size || nextPow2(size) != nextPow2(szrom) )
|
else if( szrom < size || nextPow2(size) != nextPow2(szrom) )
|
||||||
*newsize = size;
|
{
|
||||||
|
u32 sznrom = nextPow2(size);
|
||||||
|
u32 start = realend - INSTR_SIZE;
|
||||||
|
memset( &rom[INSTR_LEN(start)], 0, sznrom-start );
|
||||||
|
*newsize = sznrom;
|
||||||
|
return rom + sznrom - ( (totalsize+0x1f) & (~0xf) );
|
||||||
|
}
|
||||||
|
|
||||||
return rom + INSTR_LEN( realend );
|
return rom + INSTR_LEN( realend );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user