diff --git a/MiSTer.vcxproj b/MiSTer.vcxproj
index 3738def..61f4136 100644
--- a/MiSTer.vcxproj
+++ b/MiSTer.vcxproj
@@ -30,7 +30,7 @@
MiSTer
git.lnk ./clean.sh
__arm__;__GNUC__;__USE_GNU ;_GNU_SOURCE;VDATE="000000";_FILE_OFFSET_BITS=64;_LARGEFILE64_SOURCE;$(NMakePreprocessorDefinitions)
- c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\libc\usr\include;c:\Work\Git\opt\gcc54\lib\gcc\arm-linux-gnueabihf\5.4.1\include;c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\include\c++\5.4.1;$(NMakeIncludeSearchPath);lib\libco;lib\miniz;lib\lodepng
+ c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\libc\usr\include;c:\Work\Git\opt\gcc54\lib\gcc\arm-linux-gnueabihf\5.4.1\include;c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\include\c++\5.4.1;c:\Work\Git\opt\gcc54\arm-linux-gnueabihf\include\c++\5.4.1\arm-linux-gnueabihf;$(NMakeIncludeSearchPath);lib\libco;lib\miniz;lib\lodepng
$(TEMP)
$(TEMP)
@@ -86,6 +86,7 @@
+
@@ -142,11 +143,13 @@
+
+
diff --git a/MiSTer.vcxproj.filters b/MiSTer.vcxproj.filters
index c3abb9b..dc907d1 100644
--- a/MiSTer.vcxproj.filters
+++ b/MiSTer.vcxproj.filters
@@ -196,6 +196,9 @@
Source Files
+
+ Source Files\support
+
@@ -369,5 +372,11 @@
Header Files
+
+ Header Files\support
+
+
+ Header Files\support
+
\ No newline at end of file
diff --git a/support.h b/support.h
index 884a2f9..ba004f1 100644
--- a/support.h
+++ b/support.h
@@ -3,6 +3,7 @@
#include "support/minimig/minimig_boot.h"
#include "support/minimig/minimig_fdd.h"
#include "support/minimig/minimig_hdd.h"
+#include "support/minimig/minimig_share.h"
// SharpMz support
#include "support/sharpmz/sharpmz.h"
diff --git a/support/minimig/miminig_fs_messages.h b/support/minimig/miminig_fs_messages.h
new file mode 100644
index 0000000..d65f906
--- /dev/null
+++ b/support/minimig/miminig_fs_messages.h
@@ -0,0 +1,378 @@
+#define ACTION_NIL 0
+#define ACTION_GET_BLOCK 2
+#define ACTION_SET_MAP 4
+#define ACTION_DIE 5
+#define ACTION_EVENT 6
+#define ACTION_CURRENT_VOLUME 7
+#define ACTION_LOCATE_OBJECT 8
+#define ACTION_RENAME_DISK 9
+#define ACTION_WRITE 'W'
+#define ACTION_READ 'R'
+#define ACTION_FREE_LOCK 15
+#define ACTION_DELETE_OBJECT 16
+#define ACTION_RENAME_OBJECT 17
+#define ACTION_MORE_CACHE 18
+#define ACTION_COPY_LOCK 19
+#define ACTION_WAIT_CHAR 20
+#define ACTION_SET_PROTECT 21
+#define ACTION_CREATE_DIR 22
+#define ACTION_EXAMINE_OBJECT 23
+#define ACTION_EXAMINE_NEXT 24
+#define ACTION_DISK_INFO 25
+#define ACTION_INFO 26
+#define ACTION_FLUSH 27
+#define ACTION_SET_COMMENT 28
+#define ACTION_PARENT 29
+#define ACTION_TIMER 30
+#define ACTION_INHIBIT 31
+#define ACTION_DISK_TYPE 32
+#define ACTION_DISK_CHANGE 33
+#define ACTION_SET_DATE 34
+#define ACTION_SCREEN_MODE 994
+#define ACTION_READ_RETURN 1001
+#define ACTION_WRITE_RETURN 1002
+#define ACTION_FINDUPDATE 1004
+#define ACTION_FINDINPUT 1005
+#define ACTION_FINDOUTPUT 1006
+#define ACTION_END 1007
+#define ACTION_SEEK 1008
+#define ACTION_TRUNCATE 1022
+#define ACTION_WRITE_PROTECT 1023
+
+#define ERROR_NO_FREE_STORE 103
+#define ERROR_TASK_TABLE_FULL 105
+#define ERROR_LINE_TOO_LONG 120
+#define ERROR_FILE_NOT_OBJECT 121
+#define ERROR_INVALID_RESIDENT_LIBRARY 122
+#define ERROR_NO_DEFAULT_DIR 201
+#define ERROR_OBJECT_IN_USE 202
+#define ERROR_OBJECT_EXISTS 203
+#define ERROR_DIR_NOT_FOUND 204
+#define ERROR_OBJECT_NOT_FOUND 205
+#define ERROR_BAD_STREAM_NAME 206
+#define ERROR_OBJECT_TOO_LARGE 207
+#define ERROR_ACTION_NOT_KNOWN 209
+#define ERROR_INVALID_COMPONENT_NAME 210
+#define ERROR_INVALID_LOCK 211
+#define ERROR_OBJECT_WRONG_TYPE 212
+#define ERROR_DISK_NOT_VALIDATED 213
+#define ERROR_DISK_WRITE_PROTECTED 214
+#define ERROR_RENAME_ACROSS_DEVICES 215
+#define ERROR_DIRECTORY_NOT_EMPTY 216
+#define ERROR_TOO_MANY_LEVELS 217
+#define ERROR_DEVICE_NOT_MOUNTED 218
+#define ERROR_SEEK_ERROR 219
+#define ERROR_COMMENT_TOO_BIG 220
+#define ERROR_DISK_FULL 221
+#define ERROR_DELETE_PROTECTED 222
+#define ERROR_WRITE_PROTECTED 223
+#define ERROR_READ_PROTECTED 224
+#define ERROR_NOT_A_DOS_DISK 225
+#define ERROR_NO_DISK 226
+#define ERROR_NO_MORE_ENTRIES 232
+
+#define SHARED_LOCK -2
+#define EXCLUSIVE_LOCK -1
+
+#define MODE_OLDFILE 1005
+#define MODE_NEWFILE 1006
+#define MODE_READWRITE 1004
+
+#define OFFSET_BEGINNING -1
+#define OFFSET_CURRENT 0
+#define OFFSET_END 1
+
+#define ST_ROOT 1
+#define ST_USERDIR 2
+#define ST_SOFTLINK 3
+#define ST_LINKDIR 4
+#define ST_FILE -3
+#define ST_LINKFILE -4
+#define ST_PIPEFILE -5
+
+#pragma pack(push, 1)
+
+struct GenericRequestResponse
+{
+ long sz;
+ union
+ {
+ struct
+ {
+ long type;
+ long key;
+ };
+
+ struct
+ {
+ long success;
+ long error_code;
+ };
+ };
+};
+
+struct LocateObjectRequest
+{
+ long sz;
+ long type;
+ long key;
+ long mode;
+ char name[1];
+};
+
+struct LocateObjectResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ long key;
+};
+
+struct FreeLockRequest
+{
+ long sz;
+ long type;
+ long key;
+};
+
+struct FreeLockResponse
+{
+ long sz;
+ long success;
+ long error_code;
+};
+
+struct CopyDirRequest
+{
+ long sz;
+ long type;
+ long key;
+};
+
+struct CopyDirResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ long key;
+};
+
+struct ParentRequest
+{
+ long sz;
+ long type;
+ long key;
+};
+
+struct ParentResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ long key;
+};
+
+struct ExamineObjectRequest
+{
+ long sz;
+ long type;
+ long key;
+ long disk_key;
+};
+
+struct ExamineObjectResponse
+{
+ long sz;
+ long success;
+ long error_code;
+
+ long disk_key;
+ long entry_type;
+ int size;
+ int protection;
+ int date[3];
+ char file_name[1];
+};
+
+struct FindXxxRequest
+{
+ long sz;
+ long type;
+ long key;
+ char name[1];
+};
+
+struct FindXxxResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ long arg1;
+};
+
+struct ReadRequest
+{
+ long sz;
+ long type;
+ long arg1;
+ int address;
+ int length;
+};
+
+struct ReadResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ int actual;
+};
+
+struct WriteRequest
+{
+ long sz;
+ long type;
+ long arg1;
+ int address;
+ int length;
+};
+
+struct WriteResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ int actual;
+};
+
+struct SeekRequest
+{
+ long sz;
+ long type;
+ long arg1;
+ int new_pos;
+ int mode;
+};
+
+struct SeekResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ int old_pos;
+};
+
+struct EndRequest
+{
+ long sz;
+ long type;
+ long arg1;
+};
+
+struct EndResponse
+{
+ long sz;
+ long success;
+ long error_code;
+};
+
+struct DeleteObjectRequest
+{
+ long sz;
+ long type;
+ long key;
+ char name[1];
+};
+
+struct DeleteObjectResponse
+{
+ long sz;
+ long success;
+ long error_code;
+};
+
+struct RenameObjectRequest
+{
+ long sz;
+ long type;
+ long key;
+ long target_dir;
+ unsigned char name_len;
+ unsigned char new_name_len;
+ char name[1];
+};
+
+struct RenameObjectResponse
+{
+ long sz;
+ long success;
+ long error_code;
+};
+
+struct CreateDirRequest
+{
+ long sz;
+ long type;
+ long key;
+ char name[1];
+};
+
+struct CreateDirResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ long key;
+};
+
+struct SetProtectRequest
+{
+ long sz;
+ long type;
+ long key;
+ long mask;
+ char name[1];
+};
+
+struct SetProtectResponse
+{
+ long sz;
+ long success;
+ long error_code;
+};
+
+struct SetCommentRequest
+{
+ long sz;
+ long type;
+ long key;
+ unsigned char name_len;
+ unsigned char comment_len;
+};
+
+struct SetCommentResponse
+{
+ long sz;
+ long success;
+ long error_code;
+};
+
+struct DiskInfoRequest
+{
+ long sz;
+ long type;
+ long key;
+ long dummy1;
+ long dummy2;
+};
+
+struct DiskInfoResponse
+{
+ long sz;
+ long success;
+ long error_code;
+ unsigned long total;
+ unsigned long used;
+ long update;
+};
+
+#pragma pack(pop)
diff --git a/support/minimig/minimig_config.cpp b/support/minimig/minimig_config.cpp
index 37176ea..1278e9b 100644
--- a/support/minimig/minimig_config.cpp
+++ b/support/minimig/minimig_config.cpp
@@ -15,6 +15,7 @@
#include "minimig_fdd.h"
#include "minimig_hdd.h"
#include "minimig_config.h"
+#include "minimig_share.h"
const char *config_memory_chip_msg[] = { "512K", "1M", "1.5M", "2M" };
const char *config_memory_slow_msg[] = { "none", "512K", "1M", "1.5M" };
@@ -502,6 +503,7 @@ void minimig_reset()
{
ApplyConfiguration(0);
user_io_rtc_reset();
+ minimig_share_reset();
}
void minimig_set_kickstart(char *name)
diff --git a/support/minimig/minimig_share.cpp b/support/minimig/minimig_share.cpp
new file mode 100644
index 0000000..86ea73f
--- /dev/null
+++ b/support/minimig/minimig_share.cpp
@@ -0,0 +1,751 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include