sram handling refactored

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@239 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-09-02 21:03:49 +00:00
parent f58f05d28a
commit 7969166ef6
5 changed files with 144 additions and 147 deletions

View file

@ -214,8 +214,19 @@ void OtherWrite16(u32 a,u32 d)
return;
}
OtherWrite8End(a, d>>8, 16);
OtherWrite8End(a+1,d&0xff, 16);
if (a >= SRam.start && a <= SRam.end) {
if ((a&0x16)==0x10) { // detected, not EEPROM, write not disabled
u8 *pm=(u8 *)(SRam.data-SRam.start+a);
*pm++=d>>8;
*pm++=d;
SRam.changed = 1;
}
else
SRAMWrite(a, d); // ??
return;
}
//OtherWrite8End(a, d>>8, 16);
//OtherWrite8End(a+1,d&0xff, 16);
}