Rev 8954 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8954 | Rev 9585 | ||
---|---|---|---|
1 | #define MEMSIZE 0xA0000 |
1 | #define MEMSIZE 0xA0000 |
2 | #include "..\lib\kolibri.h" |
2 | #include "..\lib\kolibri.h" |
3 | #include "..\lib\mem.h" |
3 | #include "..\lib\mem.h" |
4 | #include "..\lib\strings.h" |
4 | #include "..\lib\strings.h" |
5 | #include "..\lib\fs.h" |
5 | #include "..\lib\fs.h" |
6 | 6 | ||
7 | ///////////////////////////////////////////////////////////////////////////////////////// |
7 | ///////////////////////////////////////////////////////////////////////////////////////// |
8 | ///////////////////////// Program data //////////////////// |
8 | ///////////////////////// Program data //////////////////// |
9 | ///////////////////////////////////////////////////////////////////////////////////////// |
9 | ///////////////////////////////////////////////////////////////////////////////////////// |
10 | 10 | ||
11 | struct ioctl_struct |
11 | struct ioctl_struct |
12 | { |
12 | { |
13 | dword handle; |
13 | dword handle; |
14 | dword io_code; |
14 | dword io_code; |
15 | dword input; |
15 | dword input; |
16 | dword inp_size; |
16 | dword inp_size; |
17 | dword output; |
17 | dword output; |
18 | dword out_size; |
18 | dword out_size; |
19 | }; |
19 | }; |
20 | 20 | ||
21 | #define DEV_ADD_DISK 1 //input = structure add_disk_struc |
21 | #define DEV_ADD_DISK 1 //input = structure add_disk_struc |
22 | #define DEV_DEL_DISK 2 //input = structure del_disk_struc |
22 | #define DEV_DEL_DISK 2 //input = structure del_disk_struc |
23 | 23 | ||
24 | struct add_disk_struc |
24 | struct add_disk_struc |
25 | { |
25 | { |
26 | dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data |
26 | dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data |
27 | unsigned char DiskId; // from 0 to 9 |
27 | unsigned char DiskId; // from 0 to 9 |
28 | }; |
28 | }; |
29 | 29 | ||
30 | struct del_disk_struc |
30 | struct del_disk_struc |
31 | { |
31 | { |
32 | unsigned char DiskId; //from 0 to 9 |
32 | unsigned char DiskId; //from 0 to 9 |
33 | }; |
33 | }; |
34 | 34 | ||
35 | 35 | ||
36 | ioctl_struct ioctl; |
36 | ioctl_struct ioctl; |
37 | add_disk_struc add_disk; |
37 | add_disk_struc add_disk; |
38 | del_disk_struc del_disk; |
38 | del_disk_struc del_disk; |
39 | 39 | ||
40 | int driver_handle; |
40 | int driver_handle; |
41 | 41 | ||
42 | ///////////////////////////////////////////////////////////////////////////////////////// |
42 | ///////////////////////////////////////////////////////////////////////////////////////// |
43 | ///////////////////////// Code //////////////////// |
43 | ///////////////////////// Code //////////////////// |
44 | ///////////////////////////////////////////////////////////////////////////////////////// |
44 | ///////////////////////////////////////////////////////////////////////////////////////// |
45 | #include "t_console.c" |
45 | #include "t_console.c" |
46 | #include "t_gui.c" |
46 | #include "t_gui.c" |
47 | 47 | ||
48 | 48 | ||
49 | void main() |
49 | void main() |
50 | { |
50 | { |
51 | if (! driver_handle = LoadDriver("tmpdisk")) |
51 | if (! driver_handle = LoadDriver("tmpdisk")) |
52 | { |
52 | { |
53 | notify("'TmpDisk\nError: /rd/1/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE"); |
53 | notify("'TmpDisk\nError: /sys/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE"); |
54 | ExitProcess(); |
54 | ExitProcess(); |
55 | } |
55 | } |
56 | 56 | ||
57 | if (param) |
57 | if (param) |
58 | Console_Work(); |
58 | Console_Work(); |
59 | else |
59 | else |
60 | Main_Window(); |
60 | Main_Window(); |
61 | 61 | ||
62 | ExitProcess(); |
62 | ExitProcess(); |
63 | } |
63 | } |
64 | 64 | ||
65 | stop: |
65 | stop: |