pcjs/modules/diskdump
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2017-06-26 11:05:01 -07:00
..
bin Added directory listings to PCSIG08 shareware README 2017-06-20 15:56:29 -07:00
lib Changed the onclick handlers for Keyboard CLICKCODES to let updateFocus() scroll the canvas into view as needed, because (at least on iOS) the code that tries prevent the page from scrolling has an annoying "jerking" side-effect; also fixed the old Node web server code that would install onclick handlers for disk images, triggering automatic conversion of JSON to IMG files 2017-06-26 11:05:01 -07:00
package.json Replaced loadResource() with the more streamlined getResource(), for all your resource-getting needs (well, except for binary files, which should be coming soon) 2016-02-21 15:51:54 -08:00
README.md Fixed some lingering /pc references 2016-07-25 13:43:51 -07:00

layout title permalink
page DiskDump Module /modules/diskdump/

DiskDump Module

DiskDump is a Node module with both a command-line interface and a web server API for converting disk images to/from various formats (eg, JSON files, JSON files with comments, IMG disk images, etc).

Building Disk Images from Folders/Files

In addition to converting disk images to/from JSON, DiskDump can also create disk images from the contents of local files/folders.

For example, from the root directory of the project, you could run:

node modules/diskdump/bin/diskdump --path="apps/pcx86/1981/visicalc/README.md" --format=img --output=disk.img

to produce a disk.img containing one file, "README.md", which you could then mount on your local operating system or inside a PCjs machine.

To make the disk image more useful, you might want to download a copy of VisiCalc into that folder as well, so that you could then run:

node modules/diskdump/bin/diskdump --path="apps/pcx86/1981/visicalc/vc.com;README.md" --format=img --output=disk.img

to produce a disk.img containing both "VC.COM" and "README.md". In fact, this is exactly how the disk.json stored in the VisiCalc folder was generated.

The equivalent web server API request would look like:

http://localhost:8088/api/v1/dump?path=/apps/pcx86/1981/visicalc/vc.com;README.md&format=img

DiskDump is a port of the original JavaScript Machines convdisk.php utility.