/* save64m.cpp Copyright (C) 2008 somebody Copyright (C) 2009 yellow wood goblin This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #if defined(_STORAGE_rpg) || defined(_STORAGE_r4) #include "save64m.h" #include #include #include "dbgtool.h" #include "../../share/memtool.h" #if defined(_STORAGE_rpg) #include "savemngr.h" #include #elif defined(_STORAGE_r4) #include #endif void cSave64m::IterateFileCluster(int aFileDes,u32* aFatMap) { u32 sectorsPerCluster; u32 shift=isSDHC()?0:9; if(ELM_SectorsPerClusterFromHandle(aFileDes,§orsPerCluster)) { u32 cluster=1; while(true) { u32 sector; cluster=ELM_GetFAT(aFileDes,cluster,§or); if(!cluster) break; for(u32 ii=0;ii=0) { if(write(f,buffer,KMaxSave*sizeof(u32))==KMaxSave*sizeof(u32)) { success=true; aSaveName=result; } close(f); } } return success; } #endif #endif