diff --git a/assets/disk0/tvdos/bin/playmov.js b/assets/disk0/tvdos/bin/playmov.js index e8ba0ff..1fcf250 100644 --- a/assets/disk0/tvdos/bin/playmov.js +++ b/assets/disk0/tvdos/bin/playmov.js @@ -12,6 +12,8 @@ const fullFilePath = _G.shell.resolvePathInput(exec_args[1]) const FILE_LENGTH = files.open(fullFilePath.full).size con.clear();con.curs_set(0) +graphics.clearPixels(255) +graphics.clearPixels2(240) let seqread = require("seqread") diff --git a/assets/disk0/tvdos/bin/playmp2.js b/assets/disk0/tvdos/bin/playmp2.js index 3ff3ddb..77a151c 100644 --- a/assets/disk0/tvdos/bin/playmp2.js +++ b/assets/disk0/tvdos/bin/playmp2.js @@ -2,7 +2,7 @@ const SND_BASE_ADDR = audio.getBaseAddr() if (!SND_BASE_ADDR) return 10 -const MP2_BITRATES = ["VBR", 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384] +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" diff --git a/assets/disk0/tvdos/sbin/sysctl.js b/assets/disk0/tvdos/sbin/sysctl.js new file mode 100644 index 0000000..3917d45 --- /dev/null +++ b/assets/disk0/tvdos/sbin/sysctl.js @@ -0,0 +1,54 @@ +// synopsis: sysctl {reset|...} target + + +const verbs = { + "reset": ["Reset", "Resetting"] +} +const actions = { + "reset": { + "mmu": ()=>{ + for (let k = 0; k < sys.maxmem(); k += 64) { + try { + sys.free(k) + } + catch (e) {} + } + }, + "graphics": ()=>{ + graphics.resetPalette() + con.reset_graphics() + graphics.clearPixels(255) + graphics.clearPixels2(240) + graphics.setGraphicsMode(0) + graphics.setBackground(34,51,68) + sys.poke(-1299460, 20) + sys.poke(-1299460, 21) + } + "audio": ()=>{ + for (let k = 0; k < 4; k++) { + audio.stop(k) + audio.purgeQueue(k) + audio.resetParams(k) + } + } + } +} + +const verb = exec_args[1] +const target = exec_args[2] + +if (verb && !target) { + println(`sysctl: no target specified for ${verbs[verb][1]}`) + return 1 +} +if (!verb) { + println("Usage: sysctl {reset|...} target") + return 10 +} + +let actionfun = actions[verb][target] +if (actionfun) actionfun() +else { + printerrln(`sysctl: unknown target ${target}`) + return 1 +} diff --git a/doc/implementation.tex b/doc/implementation.tex index ad8b59f..647f18c 100644 --- a/doc/implementation.tex +++ b/doc/implementation.tex @@ -971,14 +971,15 @@ Address & RW & Description \\ -131086 & RW & Current Layer Arrangement Index \\ -131087..-131088 & RW & Framebuffer Horizontal Scroll \\ -131089..-131090 & RW & Framebuffer Vertical Scroll \\ --132097..-131120 & RW & Scanline Offsets \\ +-132097..-133120 & RW & Scanline Offsets \\ +-133121..-135168 & RW & Font ROM Mapping Area \\ +-196609..-262144 & RW & Draw Instructions Area \\ -1048577..-1299456 & RW & First Framebuffer \\ -1299457 & RW & Screen Background RED \\ -1299458 & RW & Screen Background GREEN \\ -1299459 & RW & Screen Background BLUE \\ -1299460 & RW & Command \\ -1299461..-1299472 & RW & Command Arguments \\ --1300607..-1302526 & RW & Font ROM Mapping Area \\ -1302527..-1302528 & RW & Text Cursor Position in $row \times 80 + col$ \\ -1302529..-1305088 & RW & Text Foreground Colours \\ -1305089..-1307648 & RW & Text Background Colours \\