summaryrefslogtreecommitdiff
path: root/uisimulator/common
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-08-13 17:16:09 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-08-13 17:16:09 +0000
commitcd7691de2261e84d3ee72ec3d585ab66680d04e2 (patch)
treeb9aea6c27b4f68342a9ec87d77fddb682bff5385 /uisimulator/common
parent9872b66cd100dce18e2e6f4f77ee2beaa50b8075 (diff)
downloadrockbox-cd7691de2261e84d3ee72ec3d585ab66680d04e2.zip
rockbox-cd7691de2261e84d3ee72ec3d585ab66680d04e2.tar.gz
rockbox-cd7691de2261e84d3ee72ec3d585ab66680d04e2.tar.bz2
rockbox-cd7691de2261e84d3ee72ec3d585ab66680d04e2.tar.xz
Enabled saving settings to disk on player
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1717 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common')
-rw-r--r--uisimulator/common/stubs.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index fc24346..aacd277 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -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;
+}