[Linux/WSL] Host to guest mapping tool

Support and general discussion.
Post Reply
User avatar
TheMechanist
Posts: 71
Joined: Mon 03 Apr, 2017 6:59 pm
Contact:

[Linux/WSL] Host to guest mapping tool

Post by TheMechanist »

Hi,

creating images, mounting them and file sharing can be annoying, especially with MSDOS as guest OS without network sharing, so I coded this little tool to map a host directory to a raw hdd image, which could be refreshed from inside the guest, so cross development and testing is possible like with DOSBox .. maybe the idea behind could be integrated in PCem itself ...

swap42 mapper tool

Greetz

Asato
Last edited by TheMechanist on Mon 03 May, 2021 4:14 pm, edited 1 time in total.
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] Host to guest mapping tool

Post by szadycbr »

Thanks Bro! will check it later, but it will be Awsome!!! :)
User avatar
TheMechanist
Posts: 71
Joined: Mon 03 Apr, 2017 6:59 pm
Contact:

Re: [Linux] Host to guest mapping tool

Post by TheMechanist »

Good news! Tested it with Windows 98. If you change the properties of the drive, which is associated with the swap42 image, to "removable" (hardware manager) Windows detects filesystem changes by itself so it's possible to do a rescan even for Windows 98 as guest OS (if windows monitors it by volume serial I'll have to change the function, because it now sets a human readable volume serial (DDMM-HHMM) and not the fat16/msdos way of calculation so the serial only changes after minutes).

Unfortunately the swap42 rescan.com for MSDOS doesn't work (windows detects that it wants to low level access disk) ... but it's possible to access disk sectors under windows (found some example codes) .. since I have no clue about win32 programming somebody else has to write a tool for Windows ..

I'll add a possibility to perform a rescan from swap42 host application ...
User avatar
TheMechanist
Posts: 71
Joined: Mon 03 Apr, 2017 6:59 pm
Contact:

Re: [Linux/WSL] Host to guest mapping tool

Post by TheMechanist »

Although the tool was developed on and for Linux and it uses a lot of "non portable linux functions" like mmap, fallocate or fstatfs, so compiling with cygwin/mingw isn't unfortunately an option, the tool runs flawlessly with WSL (Windows subsystem for Linux, tested with debian, but should work with all WSL-distributions), so creating images from host directories is possible on Windows 10 too!

The only drawback is, that windows locks the image file, so it can't be refreshed by host/guest like it's possible on linux.
Post Reply