mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-06 05:28:31 +09:00
TVDOS: minor improvements
This commit is contained in:
@@ -1 +1 @@
|
|||||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/hyve.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power")
|
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power")
|
||||||
@@ -1406,9 +1406,6 @@ let requireFromMemory = (ptr) => {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
var GL = require("A:/tvdos/include/gl.mjs")
|
|
||||||
|
|
||||||
|
|
||||||
// @param cmdsrc JS source code
|
// @param cmdsrc JS source code
|
||||||
// @param args arguments for the program, must be Array, and args[0] is always the name of the program, e.g.
|
// @param args arguments for the program, must be Array, and args[0] is always the name of the program, e.g.
|
||||||
// for command line 'echo foo bar', args[0] must be 'echo'
|
// for command line 'echo foo bar', args[0] must be 'echo'
|
||||||
@@ -1421,7 +1418,7 @@ var execApp = (cmdsrc, args, appname) => {
|
|||||||
`var ${appname}=function(exec_args){${injectIntChk(cmdsrc, intchkFunName)}\n};` +
|
`var ${appname}=function(exec_args){${injectIntChk(cmdsrc, intchkFunName)}\n};` +
|
||||||
`${appname}`); // making 'exec_args' a app-level global
|
`${appname}`); // making 'exec_args' a app-level global
|
||||||
|
|
||||||
execAppPrg(args);
|
return execAppPrg(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -686,7 +686,7 @@ require = function(path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shell.execute = function(line) {
|
shell.execute = function(line, nameOverride) {
|
||||||
if (0 == line.size) return
|
if (0 == line.size) return
|
||||||
let parsedTokens = shell.parse(line) // echo, "hai", |, less
|
let parsedTokens = shell.parse(line) // echo, "hai", |, less
|
||||||
let statements = [] // [[echo, "hai"], [less]]
|
let statements = [] // [[echo, "hai"], [less]]
|
||||||
@@ -835,7 +835,7 @@ shell.execute = function(line) {
|
|||||||
// replace $0
|
// replace $0
|
||||||
newLine = newLine.replaceAll('$0', tokens.slice(1).join(' '))
|
newLine = newLine.replaceAll('$0', tokens.slice(1).join(' '))
|
||||||
|
|
||||||
shell.execute(newLine)
|
shell.execute(newLine, cmd)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else if ("APP" == extension) {
|
else if ("APP" == extension) {
|
||||||
@@ -852,6 +852,10 @@ shell.execute = function(line) {
|
|||||||
errorlevel = 0 // reset the number
|
errorlevel = 0 // reset the number
|
||||||
|
|
||||||
if (_G.shellProgramTitles === undefined) _G.shellProgramTitles = []
|
if (_G.shellProgramTitles === undefined) _G.shellProgramTitles = []
|
||||||
|
if (nameOverride !== undefined) {
|
||||||
|
tokens[0] = (''+nameOverride)
|
||||||
|
cmd = tokens[0]
|
||||||
|
}
|
||||||
_G.shellProgramTitles.push(cmd.toUpperCase())
|
_G.shellProgramTitles.push(cmd.toUpperCase())
|
||||||
sendLcdMsg(_G.shellProgramTitles[_G.shellProgramTitles.length - 1])
|
sendLcdMsg(_G.shellProgramTitles[_G.shellProgramTitles.length - 1])
|
||||||
//serial.println(_G.shellProgramTitles)
|
//serial.println(_G.shellProgramTitles)
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ Timeline has two distinct modes: view and edit mode. Two modes are toggled using
|
|||||||
|
|
||||||
<b> GLOBAL EDIT</b>
|
<b> GLOBAL EDIT</b>
|
||||||
<b>\u00B7${'\u00B8'.repeat(11)}\u00B9</b>
|
<b>\u00B7${'\u00B8'.repeat(11)}\u00B9</b>
|
||||||
&bul;<b>Q</b> : <O>retune current song into different tuning</O>
|
&bul;<b>Q</b> : <O>retune current song into different tuning and strategy</O>
|
||||||
|
<O>In general, nearest-note works best for macrotonals, nearest-harmonic and nearest-delta works best for highly microtonals (31+); 17- and 19-TET takes nearest-harmonic pretty well, while 22-TET seem to only benefit from the nearest-note</O>
|
||||||
`
|
`
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const EXEC_FUNS = {
|
|||||||
"txt": (f) => _G.shell.execute(`less "${f}"`),
|
"txt": (f) => _G.shell.execute(`less "${f}"`),
|
||||||
"md": (f) => _G.shell.execute(`less "${f}"`),
|
"md": (f) => _G.shell.execute(`less "${f}"`),
|
||||||
"log": (f) => _G.shell.execute(`less "${f}"`),
|
"log": (f) => _G.shell.execute(`less "${f}"`),
|
||||||
"taud": (f) => _G.shell.execute(`taut "${f}"`),
|
"taud": (f) => _G.shell.execute(`microtone "${f}"`),
|
||||||
}
|
}
|
||||||
|
|
||||||
let windowMode = 0 // 0 == left, 1 == right
|
let windowMode = 0 // 0 == left, 1 == right
|
||||||
|
|||||||
@@ -561,7 +561,10 @@ class TestDiskDrive(private val vm: VM, private val driveNum: Int, theRootPath:
|
|||||||
statusCode.set(STATE_CODE_STANDBY)
|
statusCode.set(STATE_CODE_STANDBY)
|
||||||
}
|
}
|
||||||
else if (inputString.startsWith("USAGE")) {
|
else if (inputString.startsWith("USAGE")) {
|
||||||
recipient?.writeout(composePositiveAns("USED123456/TOTAL654321"))
|
val used = rootPath.walkTopDown().filter { it.isFile }.map { it.length() }.sum()
|
||||||
|
.coerceIn(0L, Int.MAX_VALUE.toLong())
|
||||||
|
val total = rootPath.totalSpace.coerceIn(0L, Int.MAX_VALUE.toLong())
|
||||||
|
recipient?.writeout(composePositiveAns("USED$used/TOTAL$total"))
|
||||||
statusCode.set(STATE_CODE_STANDBY)
|
statusCode.set(STATE_CODE_STANDBY)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user