2013-08-10 21:47:40 +04:00
|
|
|
#define MEMSIZE 0xA0000
|
2012-11-26 19:26:15 +04:00
|
|
|
#include "..\lib\kolibri.h"
|
2015-02-27 04:44:22 +03:00
|
|
|
#include "..\lib\mem.h"
|
|
|
|
#include "..\lib\strings.h"
|
2018-04-03 16:57:56 +03:00
|
|
|
#include "..\lib\fs.h"
|
2012-11-26 19:26:15 +04:00
|
|
|
|
2012-12-15 04:28:00 +04:00
|
|
|
#ifndef AUTOBUILD
|
|
|
|
#include "lang.h--"
|
|
|
|
#endif
|
2012-11-26 19:26:15 +04:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
2013-10-05 02:02:44 +04:00
|
|
|
///////////////////////// Program data ////////////////////
|
2012-11-26 19:26:15 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
struct ioctl_struct
|
|
|
|
{
|
|
|
|
dword handle;
|
|
|
|
dword io_code;
|
|
|
|
dword input;
|
|
|
|
dword inp_size;
|
|
|
|
dword output;
|
|
|
|
dword out_size;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DEV_ADD_DISK 1 //input = structure add_disk_struc
|
|
|
|
#define DEV_DEL_DISK 2 //input = structure del_disk_struc
|
|
|
|
|
|
|
|
struct add_disk_struc
|
|
|
|
{
|
|
|
|
dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data
|
|
|
|
unsigned char DiskId; // from 0 to 9
|
|
|
|
};
|
|
|
|
|
|
|
|
struct del_disk_struc
|
|
|
|
{
|
|
|
|
unsigned char DiskId; //from 0 to 9
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ioctl_struct ioctl;
|
|
|
|
add_disk_struc add_disk;
|
|
|
|
del_disk_struc del_disk;
|
|
|
|
|
|
|
|
int driver_handle;
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
2013-10-05 02:02:44 +04:00
|
|
|
///////////////////////// Code ////////////////////
|
2012-11-26 19:26:15 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "t_console.c"
|
2015-02-27 04:44:22 +03:00
|
|
|
#include "t_gui.c"
|
2012-11-26 19:26:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2020-05-26 03:59:44 +03:00
|
|
|
if (! driver_handle = LoadDriver("tmpdisk"))
|
2012-11-26 19:26:15 +04:00
|
|
|
{
|
2020-04-11 18:48:27 +03:00
|
|
|
notify("'TmpDisk\nError: /rd/1/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE");
|
2012-11-26 19:26:15 +04:00
|
|
|
ExitProcess();
|
|
|
|
}
|
2013-04-02 17:33:32 +04:00
|
|
|
|
2012-11-26 19:26:15 +04:00
|
|
|
if (param)
|
|
|
|
Console_Work();
|
|
|
|
else
|
|
|
|
Main_Window();
|
|
|
|
|
|
|
|
ExitProcess();
|
|
|
|
}
|
|
|
|
|
|
|
|
stop:
|