summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-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 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
20void backlight_on(void) 22void 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
32int fat_startsector(void)
33{
34 return 63;
35}
36
37int 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
58int 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}