Hacker News new | ask | show | jobs
by signaru 2254 days ago
Was reading the PCem forums to figure out how to share files with the host. It seems disk images or getting networking up is necessary (which is not uncommon for similar emulating programs).

One thing I really like about DOSBOX, is how ordinary folders in the host can be mapped to drives in the guest OS. I wish pcem has something similar. This can make creating files with ancient software more convenient (e.g. new retro games).

1 comments

My approach is to transfer files to the emulated machine by creating an ISO with WinCDEmu (which integrates with Explorer and file managers that can use shell extensions like Total Commander) and mounting that ISO and then transfer files out of the emulated machine by opening the disk image with 7zip (with the machine turned off, of course).

For older machines and some other emulators i've written a tool to create floppy disk images from a list of files:

http://runtimeterror.com/tools/fat12img/

(though that can only do 1.44MB floppies, meaning that it only works with an emulated 286 and above)

You could borrow bximage from Bochs too to generate them easily :D.

Or in a Unix platform, with just dd and vnconfig under OpenBSD or kpartx under Linux.

    >dd if=/dev/zero of=a.img bs=1440k count=1

    >vnconfig vnd0 a.img

    >newfs_msdos -F 12 /dev/rvnd0c

    >vnconfig -u vnd0

    >file a.img
a.img: x86 boot sector

That's under OpenBSD, under Linux is similar.

As far as i can tell bximage can only create empty images, which isn't what i was after (86box, the fork of PCem i am using, has a command to generate empty images too). What i wrote about was creating floppy image files with files inside them.

Also i'm using Windows and wanted a GUI tool.