diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-08-13 17:16:09 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-08-13 17:16:09 +0000 |
commit | cd7691de2261e84d3ee72ec3d585ab66680d04e2 (patch) | |
tree | b9aea6c27b4f68342a9ec87d77fddb682bff5385 /uisimulator/common/stubs.c | |
parent | 9872b66cd100dce18e2e6f4f77ee2beaa50b8075 (diff) | |
download | rockbox-cd7691de2261e84d3ee72ec3d585ab66680d04e2.tar.gz rockbox-cd7691de2261e84d3ee72ec3d585ab66680d04e2.zip |
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/stubs.c')
-rw-r--r-- | uisimulator/common/stubs.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index fc24346090..aacd277cb2 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include <stdio.h> | ||
20 | #include "debug.h" | ||
19 | 21 | ||
20 | void backlight_on(void) | 22 | void backlight_on(void) |
21 | { | 23 | { |
@@ -26,3 +28,50 @@ void backlight_time(int dummy) | |||
26 | { | 28 | { |
27 | (void)dummy; | 29 | (void)dummy; |
28 | } | 30 | } |
31 | |||
32 | int fat_startsector(void) | ||
33 | { | ||
34 | return 63; | ||
35 | } | ||
36 | |||
37 | int ata_write_sectors(unsigned long start, | ||
38 | unsigned char count, | ||
39 | void* buf) | ||
40 | { | ||
41 | int i; | ||
42 | |||
43 | for (i=0; i<count; i++ ) { | ||
44 | FILE* f; | ||
45 | char name[32]; | ||
46 | |||
47 | DEBUGF("Writing sector %X\n",start+i); | ||
48 | sprintf(name,"sector%lX.bin",start+i); | ||
49 | f=fopen(name,"w"); | ||
50 | if (f) { | ||
51 | fwrite(buf,512,1,f); | ||
52 | fclose(f); | ||
53 | } | ||
54 | } | ||
55 | return 1; | ||
56 | } | ||
57 | |||
58 | int ata_read_sectors(unsigned long start, | ||
59 | unsigned char count, | ||
60 | void* buf) | ||
61 | { | ||
62 | int i; | ||
63 | |||
64 | for (i=0; i<count; i++ ) { | ||
65 | FILE* f; | ||
66 | char name[32]; | ||
67 | |||
68 | DEBUGF("Reading sector %X\n",start+i); | ||
69 | sprintf(name,"sector%lX.bin",start+i); | ||
70 | f=fopen(name,"r"); | ||
71 | if (f) { | ||
72 | fread(buf,512,1,f); | ||
73 | fclose(f); | ||
74 | } | ||
75 | } | ||
76 | return 1; | ||
77 | } | ||