bugfixes related to mmap usage for ROM

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@867 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2010-01-27 15:16:25 +00:00
parent 1f1ff763e6
commit a736af3ecf
6 changed files with 38 additions and 24 deletions

View file

@ -592,6 +592,17 @@ int PicoCartInsert(unsigned char *rom, unsigned int romsize, const char *carthw_
return 0;
}
int PicoCartResize(int newsize)
{
void *tmp = plat_mremap(Pico.rom, rom_alloc_size, newsize);
if (tmp == NULL)
return -1;
Pico.rom = tmp;
rom_alloc_size = newsize;
return 0;
}
void PicoCartUnload(void)
{
if (PicoCartUnloadHook != NULL) {