diff --git a/assets/disk0/AUTOEXEC.BAT b/assets/disk0/AUTOEXEC.BAT index 1b2e864..eff70d3 100644 --- a/assets/disk0/AUTOEXEC.BAT +++ b/assets/disk0/AUTOEXEC.BAT @@ -5,4 +5,4 @@ set PATH=\tvdos\installer;\tvdos\tuidev;$PATH set KEYBOARD=us_colemak rem this line specifies which shell to be presented after the boot precess: -command /fancy +command -fancy diff --git a/assets/disk0/home/commandko.js b/assets/disk0/home/commandko.js index af608f4..e95cca5 100644 --- a/assets/disk0/home/commandko.js +++ b/assets/disk0/home/commandko.js @@ -460,21 +460,21 @@ _G.shell = shell; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (exec_args[1] !== undefined) { - // only meaningful switches would be either /c or /k anyway + // only meaningful switches would be either -c or -k anyway var firstSwitch = exec_args[1].toLowerCase(); - // command /c + // command -c // ^[0] ^[1] ^[2] - if ("/c" == firstSwitch) { + if ("-c" == firstSwitch) { if ("" == exec_args[2]) return 0; // no commands were given, just exit successfully return shell.execute(exec_args[2]); } - else if ("/k" == firstSwitch) { + else if ("-k" == firstSwitch) { if ("" == exec_args[2]) return 0; // no commands were given, just exit successfully shell.execute(exec_args[2]); goInteractive = true; } - else if ("/fancy" == firstSwitch) { + else if ("-fancy" == firstSwitch) { graphics.setBackground(2,3,4); goFancy = true; goInteractive = true; diff --git a/assets/disk0/root.bootable/AUTOEXEC.BAT b/assets/disk0/root.bootable/AUTOEXEC.BAT index 7f37bc8..0e53665 100644 --- a/assets/disk0/root.bootable/AUTOEXEC.BAT +++ b/assets/disk0/root.bootable/AUTOEXEC.BAT @@ -5,4 +5,4 @@ rem e.g. set PATH=\home\my-cool-project;$PATH set KEYBOARD=us_qwerty rem this line specifies which shell to be presented after the boot precess: -command /fancy +command -fancy diff --git a/assets/disk0/tvdos/TVDOS.SYS b/assets/disk0/tvdos/TVDOS.SYS index 255d115..f602918 100644 --- a/assets/disk0/tvdos/TVDOS.SYS +++ b/assets/disk0/tvdos/TVDOS.SYS @@ -1236,4 +1236,4 @@ serial.println(`TVDOS.SYS initialised on VM ${sys.getVmId()}, running boot scrip var _G = {}; let cmdfile = files.open("A:/tvdos/bin/command.js") eval(`var _AUTOEXEC=function(exec_args){${cmdfile.sread()}\n};` + - `_AUTOEXEC`)(["", "/c", "\\AUTOEXEC.BAT"]) + `_AUTOEXEC`)(["", "-c", "\\AUTOEXEC.BAT"]) diff --git a/assets/disk0/tvdos/bin/command.js b/assets/disk0/tvdos/bin/command.js index f0778a4..945a3ec 100644 --- a/assets/disk0/tvdos/bin/command.js +++ b/assets/disk0/tvdos/bin/command.js @@ -848,21 +848,21 @@ _G.shell = shell /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (exec_args[1] !== undefined) { - // only meaningful switches would be either /c or /k anyway + // only meaningful switches would be either -c or -k anyway var firstSwitch = exec_args[1].toLowerCase() - // command /c + // command -c // ^[0] ^[1] ^[2] - if ("/c" == firstSwitch) { + if ("-c" == firstSwitch) { if ("" == exec_args[2]) return 0 // no commands were given, just exit successfully return shell.execute(exec_args[2]) } - else if ("/k" == firstSwitch) { + else if ("-k" == firstSwitch) { if ("" == exec_args[2]) return 0 // no commands were given, just exit successfully shell.execute(exec_args[2]) goInteractive = true } - else if ("/fancy" == firstSwitch) { + else if ("-fancy" == firstSwitch) { graphics.setBackground(34,51,68) goFancy = true goInteractive = true diff --git a/assets/disk0/tvdos/bin/decodeipf.js b/assets/disk0/tvdos/bin/decodeipf.js index 880fe23..7f3d6db 100644 --- a/assets/disk0/tvdos/bin/decodeipf.js +++ b/assets/disk0/tvdos/bin/decodeipf.js @@ -3,7 +3,7 @@ if (exec_args[1] == undefined) { return 1 } -const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i" +const interactive = exec_args[2] && exec_args[2].toLowerCase() == "-i" let infile = files.open(_G.shell.resolvePathInput(exec_args[1]).full) // read input file diff --git a/assets/disk0/tvdos/bin/encodeipf.js b/assets/disk0/tvdos/bin/encodeipf.js index 1ac8d3a..9f5501f 100644 --- a/assets/disk0/tvdos/bin/encodeipf.js +++ b/assets/disk0/tvdos/bin/encodeipf.js @@ -1,9 +1,9 @@ if (exec_args[3] == undefined) { - println("encodeipf <1/2> [/noalpha]") + println("encodeipf <1/2> [-noalpha]") return 1 } -let noalpha = exec_args[4] != undefined && exec_args[4].toLowerCase() == "/noalpha" +let noalpha = exec_args[4] != undefined && exec_args[4].toLowerCase() == "-noalpha" let infile = files.open(_G.shell.resolvePathInput(exec_args[2]).full) let outfile = files.open(_G.shell.resolvePathInput(exec_args[3]).full) diff --git a/assets/disk0/tvdos/bin/gzip.js b/assets/disk0/tvdos/bin/gzip.js index 0f6c90b..e11358f 100644 --- a/assets/disk0/tvdos/bin/gzip.js +++ b/assets/disk0/tvdos/bin/gzip.js @@ -1,13 +1,13 @@ function printUsage() { - println(`Usage: gzip [/d /c] file + println(`Usage: gzip [-c] [-d] file To compress a file, replacing it with a gzipped compressed version: gzip file.ext To decompress a file, replacing it with the original uncompressed version: - gzip /d file.ext.gz + gzip -d file.ext.gz To compress a file specifying the output filename: - gzip /c file.ext > compressed_file.ext.gz + gzip -c file.ext > compressed_file.ext.gz To decompress a gzipped file specifying the output filename: - gzip /c /d file.ext.gz > uncompressed_file.ext`) + gzip -c -d file.ext.gz > uncompressed_file.ext`) } if (exec_args[1] === undefined) { @@ -23,8 +23,8 @@ if (filePath === undefined) { return 0 } -const decompMode = (options.indexOf("/D") >= 0) -const toStdout = (options.indexOf("/C") >= 0) +const decompMode = (options.indexOf("-D") >= 0) +const toStdout = (options.indexOf("-C") >= 0) const file = files.open(_G.shell.resolvePath(filePath).full) diff --git a/assets/disk0/tvdos/bin/playmov.js b/assets/disk0/tvdos/bin/playmov.js index 1fcf250..9d3d4c7 100644 --- a/assets/disk0/tvdos/bin/playmov.js +++ b/assets/disk0/tvdos/bin/playmov.js @@ -1,6 +1,6 @@ // usage: playmov moviefile.mov [/i] const SND_BASE_ADDR = audio.getBaseAddr() -const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i" +const interactive = exec_args[2] && exec_args[2].toLowerCase() == "-i" const WIDTH = 560 const HEIGHT = 448 const FBUF_SIZE = WIDTH * HEIGHT diff --git a/assets/disk0/tvdos/bin/playmp2.js b/assets/disk0/tvdos/bin/playmp2.js index 77a151c..1d3a446 100644 --- a/assets/disk0/tvdos/bin/playmp2.js +++ b/assets/disk0/tvdos/bin/playmp2.js @@ -5,7 +5,7 @@ if (!SND_BASE_ADDR) return 10 const MP2_BITRATES = ["???", 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384] const MP2_CHANNELMODES = ["Stereo", "Joint", "Dual", "Mono"] const pcm = require("pcm") -const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i" +const interactive = exec_args[2] && exec_args[2].toLowerCase() == "-i" function printdbg(s) { if (0) serial.println(s) } diff --git a/assets/disk0/tvdos/bin/playmp3.js b/assets/disk0/tvdos/bin/playmp3.js index 62f8f3a..4ff1cd4 100644 --- a/assets/disk0/tvdos/bin/playmp3.js +++ b/assets/disk0/tvdos/bin/playmp3.js @@ -5,7 +5,7 @@ return 1 const Mp3 = require('mp3dec') const pcm = require("pcm") -const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i" +const interactive = exec_args[2] && exec_args[2].toLowerCase() == "-i" function printdbg(s) { if (0) serial.println(s) } diff --git a/assets/disk0/tvdos/bin/playpcm.js b/assets/disk0/tvdos/bin/playpcm.js index eeda612..cc82ae2 100644 --- a/assets/disk0/tvdos/bin/playpcm.js +++ b/assets/disk0/tvdos/bin/playpcm.js @@ -3,7 +3,7 @@ let fileeeee = files.open(_G.shell.resolvePathInput(exec_args[1]).full) let filename = fileeeee.fullPath function printdbg(s) { if (0) serial.println(s) } -const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i" +const interactive = exec_args[2] && exec_args[2].toLowerCase() == "-i" const pcm = require("pcm") const FILE_SIZE = files.open(filename).size diff --git a/assets/disk0/tvdos/bin/playwav.js b/assets/disk0/tvdos/bin/playwav.js index 00e346a..6c9ae6d 100644 --- a/assets/disk0/tvdos/bin/playwav.js +++ b/assets/disk0/tvdos/bin/playwav.js @@ -5,7 +5,7 @@ function printdbg(s) { if (0) serial.println(s) } const WAV_FORMATS = ["LPCM", "ADPCM"] const WAV_CHANNELS = ["Mono", "Stereo", "3ch", "Quad", "4.1", "5.1", "6.1", "7.1"] -const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i" +const interactive = exec_args[2] && exec_args[2].toLowerCase() == "-i" const seqread = require("seqread") const pcm = require("pcm") diff --git a/assets/disk0/tvdos/bin/touch.js b/assets/disk0/tvdos/bin/touch.js index 40763b1..e527d08 100644 --- a/assets/disk0/tvdos/bin/touch.js +++ b/assets/disk0/tvdos/bin/touch.js @@ -8,7 +8,7 @@ if (exec_args[1] === undefined) { return 1; } -let noNewFile = (exec_args[1] == "/c" || exec_args[1] == "/C"); +let noNewFile = (exec_args[1] == "-c" || exec_args[1] == "-C"); let file = files.open(`${_G.shell.resolvePathInput(exec_args[2] || exec_args[1]).full}`) if (!file.exists && noNewFile) { printerrln("TOUCH: Can't open "+file.fullPath+" due to IO error"); diff --git a/assets/disk0/tvdos/installer/AUTOEXEC.BAT b/assets/disk0/tvdos/installer/AUTOEXEC.BAT index 7f37bc8..0e53665 100644 --- a/assets/disk0/tvdos/installer/AUTOEXEC.BAT +++ b/assets/disk0/tvdos/installer/AUTOEXEC.BAT @@ -5,4 +5,4 @@ rem e.g. set PATH=\home\my-cool-project;$PATH set KEYBOARD=us_qwerty rem this line specifies which shell to be presented after the boot precess: -command /fancy +command -fancy diff --git a/doc/tvdos.tex b/doc/tvdos.tex index b446974..f8289fb 100644 --- a/doc/tvdos.tex +++ b/doc/tvdos.tex @@ -76,7 +76,7 @@ This chapter will only briefly list and describe the applications. \1\dossynopsis{basica}{Invokes a BASIC interpreter stored in the ROM. If no BASIC rom is present, nothing will be done.} \1\dossynopsis{basic}{If your system is bundled with a software-based BASIC, this command will invoke the BASIC interpreter stored in the disk.} \1\dossynopsis{color}{Changes the background and the foreground of the active session.} -\1\dossynopsis{command}{The default text-based DOS shell. Call with \code{command /fancy} for more \ae sthetically pleasing looks.} +\1\dossynopsis{command}{The default text-based DOS shell. Call with \code{command -fancy} for more \ae sthetically pleasing looks.} \1\dossynopsis{decodeipf}[file]{Decodes the IPF-formatted image to the framebuffer using the graphics processor.} \1\dossynopsis{drives}{Shows the list of the connected and mounted disk drives.} \1\dossynopsis{edit}[file]{The interactive full-screen text editor.} @@ -85,10 +85,10 @@ This chapter will only briefly list and describe the applications. \1\dossynopsis{geturl}[url]{Reads contents on the web address and store it to the disk. Requires Internet adapter.} \1\dossynopsis{hexdump}[file]{Prints out the contents of a file in hexadecimal view. Supports pipe.} \1\dossynopsis{less}[file]{Allows user to read the long text, even if they are wider and/or taller than the screen. Supports pipe.} -\1\dossynopsis{playmov}[file]{Plays tsvmmov-formatted video. Use /i flag for playback control.} -\1\dossynopsis{playmp2}[file]{Plays MP2 (MPEG-1 Audio Layer II) formatted audio. Use /i flag for playback control.} -\1\dossynopsis{playpcm}[file]{Plays raw PCM audio. Use /i flag for playback control.} -\1\dossynopsis{playwav}[file]{Plays linear PCM/ADPCM audio. Use /i flag for playback control.} +\1\dossynopsis{playmov}[file]{Plays tsvmmov-formatted video. Use -i flag for playback control.} +\1\dossynopsis{playmp2}[file]{Plays MP2 (MPEG-1 Audio Layer II) formatted audio. Use -i flag for playback control.} +\1\dossynopsis{playpcm}[file]{Plays raw PCM audio. Use -i flag for playback control.} +\1\dossynopsis{playwav}[file]{Plays linear PCM/ADPCM audio. Use -i flag for playback control.} \1\dossynopsis{printfile}[file]{Prints out the contents of a textfile with line numbers. Useful for making descriptive screenshots.} \1\dossynopsis{touch}[file]{Updates a file's modification date. New file will be created if the specified file does not exist.} \1\dossynopsis{true}{Returns errorlevel 0 upon execution.}