diff --git a/assets/disk0/tvdos/bin/command.js b/assets/disk0/tvdos/bin/command.js index de1f4a3..978f4ab 100644 --- a/assets/disk0/tvdos/bin/command.js +++ b/assets/disk0/tvdos/bin/command.js @@ -810,7 +810,7 @@ shell.execute = function(line) { } shell.pipes = {} // syntax: _G.shell.pipes[name] = contents; all pipes are named pipes just like in Windows shell.currentlyActivePipes = [] // Queue of pipe's names. Use shell.removePipe() to dequeue and shell.pushPipe() to enqueue. -shell._rndstr = '0123456789+qwfpgjluyarstdhneiozxcvbkm/QWFPGJLUYARSTDHNEIOZXCVBKM' +shell._rndstr = '0123456789+qwfpgjluyarstdhneiozxcvbkm&QWFPGJLUYARSTDHNEIOZXCVBKM' shell.generateAnonPipeName = function() { let name = '' while (true) { diff --git a/assets/disk0/tvdos/bin/lfs.js b/assets/disk0/tvdos/bin/lfs.js index db6f862..92ee7a3 100644 --- a/assets/disk0/tvdos/bin/lfs.js +++ b/assets/disk0/tvdos/bin/lfs.js @@ -1,10 +1,38 @@ +/* +TVDOS Linear File Strip. + +Format: + +- Header +- FileBlock... (repeatedly appended for every file collected) + +# Header + +Bytes "TVDOSLFS\x01" - header +Uint16 Encoding + 00 00 : Pure ASCII/CP437 + 01 00..0F : ISO 8859-1..16 + 10 00 : UTF-8 + 10 01 : UTF-16BE + 10 02 : UTF-16LE +Byte[5] Padding + +# FileBlocks +Uint8 File type (only 1 is used) +Uint16 Length of the Path +Bytes[*] Fully Qualified Path string +Uint32 Length of the binary +Bytes[*] Binary representation of the file, no extra compression (to reduce the size of the archive, gzip the entire LFS +instead of compressing individual files) + */ + function printUsage() { println(`Collects files under a directory into a single archive. Usage: lfs [-c/-x/-t] dest.lfs path\\to\\source To collect a directory into myarchive.lfs: lfs -c myarchive.lfs path\\to\\directory To extract an archive to path\\to\\my\\files: - lfs -x myarchive.lfs \\path\\to\\my\\files + lfs -x myarchive.lfs path\\to\\my\\files To list the collected files: lfs -t myarchive.lfs`) } diff --git a/tsvm_core/src/net/torvald/tsvm/peripheral/ClusteredDiskDrive.kt b/tsvm_core/src/net/torvald/tsvm/peripheral/ClusteredDiskDrive.kt new file mode 100644 index 0000000..a7ba00f --- /dev/null +++ b/tsvm_core/src/net/torvald/tsvm/peripheral/ClusteredDiskDrive.kt @@ -0,0 +1,34 @@ +package net.torvald.tsvm.peripheral + +import net.torvald.tsvm.VM +import java.util.UUID + +/** + * `theArchivePath` must always be specified (where to load/save) + * + * To denote formatted (=already created) disk: + * - specify diskUUIDstr + * - set sectorsForNewDisk as -1 + * - set deviceOrigin and deviceTier as 0 + * + * To denote unformatted (=not yet created) disk: + * - set diskUUIDstr as "" + * - specify sectorsForNewDisk + * - specify deviceOrigin and deviceTier + * + * Created by minjaesong on 2023-05-15. + */ +class ClusteredDiskDrive( + private val vm: VM, + private val driveNum: Int, + private val theArchivePath: String, + private val diskUUIDstr: String, + private val sectorsForNewDisk: Int, + private val deviceOrigin: Int, + private val deviceTier: Int +) { + + private var uuid: UUID? = if (diskUUIDstr.isEmpty()) null else UUID.fromString(diskUUIDstr) + + +} \ No newline at end of file