EmuNewz Network
SNAPSHOT MIPS X86 Memory Alignment - Printable Version

+- EmuNewz Network (https://www.emunewz.net/forum)
+-- Forum: PSP Emulation (https://www.emunewz.net/forum/forumdisplay.php?fid=191)
+--- Forum: JPCSP Official Forum (https://www.emunewz.net/forum/forumdisplay.php?fid=51)
+---- Forum: General discussion (https://www.emunewz.net/forum/forumdisplay.php?fid=57)
+---- Thread: SNAPSHOT MIPS X86 Memory Alignment (/showthread.php?tid=3292)



SNAPSHOT MIPS X86 Memory Alignment - ultimatenokia - 01-08-2011

Huh I'm interested in How SNAPSHOT works?
Is it like this ?
SAVE SNAPSHOT-->JPCSP reads all the memory data,packs them,and write them into "Snap_ULJSxxxxxx.bin"
LOAD SNAPSHOT--> JPCSP reads all the data in "Snap_ULJSxxxxxx.bin",unpacks them,and write them into system memory ?

I happened to find some articles about memory alignment of MIPS Architecture (uh...PSP uses MIPS as its processor,uh..i'm not sure about this).

one CSDN user said that he met with strange problems when trying to move (or should i use "transplant" here?) the application,from ARM system to x86 PC system ,later he found that the cause was mem alignment( http://blog.csdn.net/alexxu_118/archive/2010/07/04/5711664.aspx.....i'm sorry it's in Chinese....google"MIPS Memory Alignment" may help)

...both ARM and MIPS request mem alignment...so i wonder whether the same problem occurs when trying to run a PSP\MIPS app on the x86 PC ? and is it the reason why SNAPSHOT doesn't work correctly ?


RE: SNAPSHOT MIPS X86 Memory Alignment - Hykem - 01-08-2011

The snapshot function performs a full copy of the RAM state, which is already properly aligned.
Your doubt is quite pertinent, and it could be a real case scenario, but the real reason behind why this isn't fully working is because we also have to save the state of Kernel Object Managers (event flags, semaphores, mutexes).
These are all handled inside the emulator and never written to memory, so I'm currently trying to figure out a way to save all this into a file without consuming a massive ammount of space.
The RAM snapshot alone is already about 20MB wide and we still need to add the state of the CPU registers and the state of the Kernel Object Managers. Undecided