new memory handling, but asm and mappers need update.

Some cleanup and magic bit removal as a bonus.


git-svn-id: file:///home/notaz/opt/svn/PicoDrive@768 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-09-02 16:05:54 +00:00
parent c238eec8f5
commit af37bca858
20 changed files with 1173 additions and 1720 deletions

View file

@ -303,7 +303,8 @@ void PicoPatchPrepare(void)
for (i = 0; i < PicoPatchCount; i++)
{
PicoPatches[i].addr &= ~1;
PicoPatches[i].data_old = PicoRead16(PicoPatches[i].addr);
if (PicoPatches[i].addr < Pico.romsize)
PicoPatches[i].data_old = *(unsigned short *)(Pico.rom + PicoPatches[i].addr);
if (strstr(PicoPatches[i].name, "AUTO"))
PicoPatches[i].active = 1;
}
@ -333,9 +334,7 @@ void PicoPatchApply(void)
}
else
{
/* RAM or some other weird patch */
if (PicoPatches[i].active)
PicoWrite16(addr, PicoPatches[i].data);
/* TODO? */
}
}
}