Enabled saving settings to disk on player

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1717 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-08-13 17:16:09 +00:00
parent 9872b66cd1
commit cd7691de22
6 changed files with 136 additions and 111 deletions

View file

@ -16,6 +16,8 @@
* KIND, either express or implied.
*
****************************************************************************/
#include <stdio.h>
#include "debug.h"
void backlight_on(void)
{
@ -26,3 +28,50 @@ void backlight_time(int dummy)
{
(void)dummy;
}
int fat_startsector(void)
{
return 63;
}
int ata_write_sectors(unsigned long start,
unsigned char count,
void* buf)
{
int i;
for (i=0; i<count; i++ ) {
FILE* f;
char name[32];
DEBUGF("Writing sector %X\n",start+i);
sprintf(name,"sector%lX.bin",start+i);
f=fopen(name,"w");
if (f) {
fwrite(buf,512,1,f);
fclose(f);
}
}
return 1;
}
int ata_read_sectors(unsigned long start,
unsigned char count,
void* buf)
{
int i;
for (i=0; i<count; i++ ) {
FILE* f;
char name[32];
DEBUGF("Reading sector %X\n",start+i);
sprintf(name,"sector%lX.bin",start+i);
f=fopen(name,"r");
if (f) {
fread(buf,512,1,f);
fclose(f);
}
}
return 1;
}