From 0b1dbe6bc25227c910a4dea2fadcdda540add969 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 27 Feb 2012 02:12:48 +0200 Subject: [PATCH 1/1] frontend: sync workaround for caanoo trying to deal with "save corruption", no idea if this helps as this never happens for me. --- frontend/320240/caanoo.gpe | 14 +++++++++++++- frontend/main.c | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/320240/caanoo.gpe b/frontend/320240/caanoo.gpe index 95a43d53..9d6154a4 100755 --- a/frontend/320240/caanoo.gpe +++ b/frontend/320240/caanoo.gpe @@ -2,10 +2,22 @@ # Wiz's timings are already good, apply this for Caanoo if [ -e /dev/accel ]; then -./pollux_set "ram_timings=3,9,4,1,1,1,1" + ./pollux_set "ram_timings=3,9,4,1,1,1,1" +fi + +# the sync mount causes problems when writing saves, +# probably due to many write calls, so have to get rid of it +if grep mmcblk /proc/mounts | grep -q '\'; then + oldmount=`grep mmcblk /proc/mounts | grep '\' | awk '{print $4}'` + mount /dev/mmcblk0p1 /mnt/sd/ -o remount,dirsync,noatime fi ./pcsx "$@" +sync + +if [ -n "$oldmount" ]; then + mount /dev/mmcblk0p1 /mnt/sd/ -o remount,$oldmount +fi cd /usr/gp2x exec ./gp2xmenu diff --git a/frontend/main.c b/frontend/main.c index 0dd488ef..a3053129 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -531,6 +531,9 @@ int emu_save_state(int slot) return ret; ret = SaveState(fname); +#ifndef __ARM_ARCH_7A__ /* XXX */ + sync(); +#endif printf("* %s \"%s\" [%d]\n", ret == 0 ? "saved" : "failed to save", fname, slot); return ret; } -- 2.39.2