moving everything neatly into the assets directory

This commit is contained in:
minjaesong
2020-12-24 11:00:32 +09:00
parent 74b1279ed4
commit 608f61c617
111 changed files with 98 additions and 28 deletions

BIN
assets/8025_textonly.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
assets/EGA8x14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
assets/FontROM7x14.kra LFS Normal file

Binary file not shown.

BIN
assets/FontROM7x14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
assets/FontROM7x7.kra LFS Normal file

Binary file not shown.

View File

@@ -0,0 +1,30 @@
local args = {...}
-- bin file to JS source
local width = tonumber(args[2])
local height = tonumber(args[3])
local arrayname = args[4]
local arraydec = "var "..arrayname.."=[];"
local arrayopen = "["
local arrayclose = "]"
local lineend = ";"
-- row starts from zero
function arraypopulate(row, fulldata)
offset = width * row
ret = arrayopen..fulldata:byte(1 + offset)
for i = 1, (width - 1) do
ret = ret..","..tostring(fulldata:byte(1 + offset + i))
end
return arrayname..arrayopen..tostring(row)..arrayclose.."="..ret..arrayclose..lineend
end
local fi = assert(io.open(args[1], "rb"))
local content = fi:read("*all")
fi:close()
print(arraydec)
for k = 0, height - 1 do
print(arraypopulate(k, content))
end

39
assets/bios/tbasdist.js Normal file
View File

@@ -0,0 +1,39 @@
var _BIOS = {};
// Syntax: [Port, Drive-number]
// Port #0-3: Serial port 1-4
// #4+ : Left for future extension
// Drive-number always starts at 1
_BIOS.FIRST_BOOTABLE_PORT = [0,1]; // ah screw it
Object.freeze(_BIOS);
///////////////////////////////////////////////////////////////////////////////
// load basic.js
let p = _BIOS.FIRST_BOOTABLE_PORT;
com.sendMessage(0, "DEVRST\x17");
com.sendMessage(0, 'OPENR"tbas/basic.js",1');
let r = com.getStatusCode(0);
if (r == 0){
com.sendMessage(0, "READ");
r = com.getStatusCode(0);
if (r == 0) {
try {
let g=com.pullMessage(0);
let execAppPrg = eval("var _appStub=function(exec_args){"+g+"};_appStub;"); // making 'exec_args' a app-level global
execAppPrg();
return 0;
}
catch (e) {
printerrln("\n"+e.stack);
return 1;
}
}
else
printerrln("I/O Error");
}
else
printerrln("No bootable medium found.");

BIN
assets/cp437_fira_code.kra LFS Normal file

Binary file not shown.

BIN
assets/cp437_fira_code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/crt_grad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -11,6 +11,5 @@ for (i = indices.length - 1; i > 0; i--) {
}
for (i = 0; i < 250880; i++) {
graphics.plotPixel(indices[i] % 560, (indices[i] / 560)|0, image[indices[i]]);
graphics.plotPixel(indices[i] % 560, (indices[i] / 560)|0, image[indices[i]]);
}
con.color_fore(0);

View File

@@ -15,18 +15,19 @@ if (exec_args !== undefined && exec_args[1] !== undefined && exec_args[1].starts
let INDEX_BASE = 0;
let TRACEON = true;
let DBGON = true;
let TRACEON = false;
let DBGON = false;
let DATA_CURSOR = 0;
let DATA_CONSTS = [];
let DEFUNS_BUILD_DEFUNS = true;
const DEFUNS_BUILD_DEFUNS = true;
const BASIC_HOME_PATH = "/home/basic/"
if (system.maxmem() < 8192) {
println("Out of memory. BASIC requires 8K or more User RAM");
throw Error("Out of memory");
}
let vmemsize = system.maxmem() - 5236;
let vmemsize = system.maxmem();
let cmdbuf = []; // index: line number
let gotoLabels = {};
@@ -132,7 +133,7 @@ fs.open = function(path, operationMode) {
throw Error("Unknown file opening mode: " + mode);
}
com.sendMessage(port[0], "OPEN"+mode+'"'+path+'",'+port[1]);
com.sendMessage(port[0], "OPEN"+mode+'"'+BASIC_HOME_PATH+path+'",'+port[1]);
let response = com.getStatusCode(port[0]);
return (response == 0);
};
@@ -196,8 +197,14 @@ let reNumber = /([0-9]*[.][0-9]+[eE]*[\-+0-9]*[fF]*|[0-9]+[.eEfF][0-9+\-]*[fF]?)
let reNum = /[0-9]+/;
let tbasexit = false;
const greetText = "Terran BASIC 1.0 "+String.fromCharCode(179)+" Scratchpad Memory: "+vmemsize+" bytes";
const greetLeftPad = (80 - greetText.length) >> 1;
const greetRightPad = 80 - greetLeftPad - greetText.length;
println("Terran BASIC 1.0 "+vmemsize+" bytes free");
con.color_pair(0,253);
print(" ".repeat(greetLeftPad)+greetText+" ".repeat(greetRightPad));
con.color_pair(239,255);
println();
println(prompt);
// variable object constructor
@@ -1887,7 +1894,7 @@ bF.isSemanticLiteral = function(token, state) {
return undefined == token || "]" == token || ")" == token ||
"qot" == state || "num" == state || "bool" == state || "lit" == state;
}
bF.parserDoDebugPrint = true;
bF.parserDoDebugPrint = false;
bF.parserPrintdbg = any => { if (bF.parserDoDebugPrint) serial.println(any) };
bF.parserPrintdbg2 = function(icon, lnum, tokens, states, recDepth) {
if (bF.parserDoDebugPrint) {
@@ -2611,8 +2618,8 @@ bF._troNOP = function(lnum, stmtnum) { return new SyntaxTreeReturnObj("null", un
bF._executeSyntaxTree = function(lnum, stmtnum, syntaxTree, recDepth) {
if (lnum === undefined || stmtnum === undefined) throw Error(`Line or statement number is undefined: (${lnum},${stmtnum})`);
let _debugExec = true;
let _debugPrintCurrentLine = true;
let _debugExec = false;
let _debugPrintCurrentLine = false;
let recWedge = ">".repeat(recDepth) + " ";
if (_debugExec || _debugPrintCurrentLine) serial.println(recWedge+"@@ EXECUTE @@");
@@ -3050,7 +3057,7 @@ bF.catalog = function(args) { // CATALOG function
};
Object.freeze(bF);
if (exec_args[1] !== undefined) {
if (exec_args !== undefined && exec_args[1] !== undefined) {
bF.load(["load", exec_args[1]]);
try {
bF.run();

View File

@@ -206,11 +206,11 @@ Functions are a form of expression that may taks input arguments surrounded by p
\subsection{PEEK}
\codeline{BYTE \textbf{= PEEK(}MEM\_ADDR\textbf{)}}\par
Returns whatever the value stored in the \code{MEM\_ADDR} of the scratchpad-memory.\par
Returns whatever the value stored in the \code{MEM\_ADDR} of the Scratchpad Memory.\par
Address mirroring, illegal access, etc. are entirely up to the virtual machine which the BASIC interpreter is running on.
\subsection{POKE}
\codeline{\textbf{POKE(}MEM\_ADDR \textbf{,} BYTE\textbf{)}}\par
Puts a \code{BYTE} into the \code{MEM\_ADDR} of the scratchpad-memory.
Puts a \code{BYTE} into the \code{MEM\_ADDR} of the Scratchpad Memory.
\section{Higher-order Function}

View File

@@ -15,7 +15,7 @@ _TVDOS.getPath = function() {
_TVDOS.variables = {
DOSDIR: "\\tvdos",
LANG: "EN",
PATH: "\\tvdos\\bin",
PATH: ";\\tvdos\\bin;\\tbas;\\home",
PATHEXT: ".com;.bat;.js",
HELPPATH: "\\tvdos\\help",
OS_NAME: "Terrarum Virtual DOS",

BIN
assets/fox.base64 LFS Normal file

Binary file not shown.

BIN
assets/fox.bytes LFS Normal file

Binary file not shown.

BIN
assets/fox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

BIN
assets/fox.tga LFS Normal file

Binary file not shown.

BIN
assets/fsh_clockdigits.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 B

BIN
assets/fsh_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

BIN
assets/guicursor.kra LFS Normal file

Binary file not shown.

BIN
assets/guicursor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
assets/hp2640.kra LFS Normal file

Binary file not shown.

BIN
assets/hp2640.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
assets/lcd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
assets/pal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

255
assets/palette.txt Normal file
View File

@@ -0,0 +1,255 @@
#000000
#000044
#000088
#0000bb
#0000ff
#002200
#002244
#002288
#0022bb
#0022ff
#004400
#004444
#004488
#0044bb
#0044ff
#006600
#006644
#006688
#0066bb
#0066ff
#009900
#009944
#009988
#0099bb
#0099ff
#00bb00
#00bb44
#00bb88
#00bbbb
#00bbff
#00dd00
#00dd44
#00dd88
#00ddbb
#00ddff
#00ff00
#00ff44
#00ff88
#00ffbb
#00ffff
#330000
#330044
#330088
#3300bb
#3300ff
#332200
#332244
#332288
#3322bb
#3322ff
#334400
#334444
#334488
#3344bb
#3344ff
#336600
#336644
#336688
#3366bb
#3366ff
#339900
#339944
#339988
#3399bb
#3399ff
#33bb00
#33bb44
#33bb88
#33bbbb
#33bbff
#33dd00
#33dd44
#33dd88
#33ddbb
#33ddff
#33ff00
#33ff44
#33ff88
#33ffbb
#33ffff
#660000
#660044
#660088
#6600bb
#6600ff
#662200
#662244
#662288
#6622bb
#6622ff
#664400
#664444
#664488
#6644bb
#6644ff
#666600
#666644
#666688
#6666bb
#6666ff
#669900
#669944
#669988
#6699bb
#6699ff
#66bb00
#66bb44
#66bb88
#66bbbb
#66bbff
#66dd00
#66dd44
#66dd88
#66ddbb
#66ddff
#66ff00
#66ff44
#66ff88
#66ffbb
#66ffff
#990000
#990044
#990088
#9900bb
#9900ff
#992200
#992244
#992288
#9922bb
#9922ff
#994400
#994444
#994488
#9944bb
#9944ff
#996600
#996644
#996688
#9966bb
#9966ff
#999900
#999944
#999988
#9999bb
#9999ff
#99bb00
#99bb44
#99bb88
#99bbbb
#99bbff
#99dd00
#99dd44
#99dd88
#99ddbb
#99ddff
#99ff00
#99ff44
#99ff88
#99ffbb
#99ffff
#cc0000
#cc0044
#cc0088
#cc00bb
#cc00ff
#cc2200
#cc2244
#cc2288
#cc22bb
#cc22ff
#cc4400
#cc4444
#cc4488
#cc44bb
#cc44ff
#cc6600
#cc6644
#cc6688
#cc66bb
#cc66ff
#cc9900
#cc9944
#cc9988
#cc99bb
#cc99ff
#ccbb00
#ccbb44
#ccbb88
#ccbbbb
#ccbbff
#ccdd00
#ccdd44
#ccdd88
#ccddbb
#ccddff
#ccff00
#ccff44
#ccff88
#ccffbb
#ccffff
#ff0000
#ff0044
#ff0088
#ff00bb
#ff00ff
#ff2200
#ff2244
#ff2288
#ff22bb
#ff22ff
#ff4400
#ff4444
#ff4488
#ff44bb
#ff44ff
#ff6600
#ff6644
#ff6688
#ff66bb
#ff66ff
#ff9900
#ff9944
#ff9988
#ff99bb
#ff99ff
#ffbb00
#ffbb44
#ffbb88
#ffbbbb
#ffbbff
#ffdd00
#ffdd44
#ffdd88
#ffddbb
#ffddff
#ffff00
#ffff44
#ffff88
#ffffbb
#ffffff
#000000
#111111
#222222
#333333
#444444
#555555
#666666
#777777
#888888
#999999
#aaaaaa
#bbbbbb
#cccccc
#dddddd
#eeeeee

BIN
assets/shell_mockup.kra LFS Normal file

Binary file not shown.

BIN
assets/smpte_bars.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

259
assets/tsvm-default.gpl Normal file
View File

@@ -0,0 +1,259 @@
GIMP Palette
Name: tsvm-default
Columns: 0
#
0 0 0 Untitled
0 0 68 Untitled
0 0 136 Untitled
0 0 187 Untitled
0 0 255 Untitled
0 34 0 Untitled
0 34 68 Untitled
0 34 136 Untitled
0 34 187 Untitled
0 34 255 Untitled
0 68 0 Untitled
0 68 68 Untitled
0 68 136 Untitled
0 68 187 Untitled
0 68 255 Untitled
0 102 0 Untitled
0 102 68 Untitled
0 102 136 Untitled
0 102 187 Untitled
0 102 255 Untitled
0 153 0 Untitled
0 153 68 Untitled
0 153 136 Untitled
0 153 187 Untitled
0 153 255 Untitled
0 187 0 Untitled
0 187 68 Untitled
0 187 136 Untitled
0 187 187 Untitled
0 187 255 Untitled
0 221 0 Untitled
0 221 68 Untitled
0 221 136 Untitled
0 221 187 Untitled
0 221 255 Untitled
0 255 0 Untitled
0 255 68 Untitled
0 255 136 Untitled
0 255 187 Untitled
0 255 255 Untitled
51 0 0 Untitled
51 0 68 Untitled
51 0 136 Untitled
51 0 187 Untitled
51 0 255 Untitled
51 34 0 Untitled
51 34 68 Untitled
51 34 136 Untitled
51 34 187 Untitled
51 34 255 Untitled
51 68 0 Untitled
51 68 68 Untitled
51 68 136 Untitled
51 68 187 Untitled
51 68 255 Untitled
51 102 0 Untitled
51 102 68 Untitled
51 102 136 Untitled
51 102 187 Untitled
51 102 255 Untitled
51 153 0 Untitled
51 153 68 Untitled
51 153 136 Untitled
51 153 187 Untitled
51 153 255 Untitled
51 187 0 Untitled
51 187 68 Untitled
51 187 136 Untitled
51 187 187 Untitled
51 187 255 Untitled
51 221 0 Untitled
51 221 68 Untitled
51 221 136 Untitled
51 221 187 Untitled
51 221 255 Untitled
51 255 0 Untitled
51 255 68 Untitled
51 255 136 Untitled
51 255 187 Untitled
51 255 255 Untitled
102 0 0 Untitled
102 0 68 Untitled
102 0 136 Untitled
102 0 187 Untitled
102 0 255 Untitled
102 34 0 Untitled
102 34 68 Untitled
102 34 136 Untitled
102 34 187 Untitled
102 34 255 Untitled
102 68 0 Untitled
102 68 68 Untitled
102 68 136 Untitled
102 68 187 Untitled
102 68 255 Untitled
102 102 0 Untitled
102 102 68 Untitled
102 102 136 Untitled
102 102 187 Untitled
102 102 255 Untitled
102 153 0 Untitled
102 153 68 Untitled
102 153 136 Untitled
102 153 187 Untitled
102 153 255 Untitled
102 187 0 Untitled
102 187 68 Untitled
102 187 136 Untitled
102 187 187 Untitled
102 187 255 Untitled
102 221 0 Untitled
102 221 68 Untitled
102 221 136 Untitled
102 221 187 Untitled
102 221 255 Untitled
102 255 0 Untitled
102 255 68 Untitled
102 255 136 Untitled
102 255 187 Untitled
102 255 255 Untitled
153 0 0 Untitled
153 0 68 Untitled
153 0 136 Untitled
153 0 187 Untitled
153 0 255 Untitled
153 34 0 Untitled
153 34 68 Untitled
153 34 136 Untitled
153 34 187 Untitled
153 34 255 Untitled
153 68 0 Untitled
153 68 68 Untitled
153 68 136 Untitled
153 68 187 Untitled
153 68 255 Untitled
153 102 0 Untitled
153 102 68 Untitled
153 102 136 Untitled
153 102 187 Untitled
153 102 255 Untitled
153 153 0 Untitled
153 153 68 Untitled
153 153 136 Untitled
153 153 187 Untitled
153 153 255 Untitled
153 187 0 Untitled
153 187 68 Untitled
153 187 136 Untitled
153 187 187 Untitled
153 187 255 Untitled
153 221 0 Untitled
153 221 68 Untitled
153 221 136 Untitled
153 221 187 Untitled
153 221 255 Untitled
153 255 0 Untitled
153 255 68 Untitled
153 255 136 Untitled
153 255 187 Untitled
153 255 255 Untitled
204 0 0 Untitled
204 0 68 Untitled
204 0 136 Untitled
204 0 187 Untitled
204 0 255 Untitled
204 34 0 Untitled
204 34 68 Untitled
204 34 136 Untitled
204 34 187 Untitled
204 34 255 Untitled
204 68 0 Untitled
204 68 68 Untitled
204 68 136 Untitled
204 68 187 Untitled
204 68 255 Untitled
204 102 0 Untitled
204 102 68 Untitled
204 102 136 Untitled
204 102 187 Untitled
204 102 255 Untitled
204 153 0 Untitled
204 153 68 Untitled
204 153 136 Untitled
204 153 187 Untitled
204 153 255 Untitled
204 187 0 Untitled
204 187 68 Untitled
204 187 136 Untitled
204 187 187 Untitled
204 187 255 Untitled
204 221 0 Untitled
204 221 68 Untitled
204 221 136 Untitled
204 221 187 Untitled
204 221 255 Untitled
204 255 0 Untitled
204 255 68 Untitled
204 255 136 Untitled
204 255 187 Untitled
204 255 255 Untitled
255 0 0 Untitled
255 0 68 Untitled
255 0 136 Untitled
255 0 187 Untitled
255 0 255 Untitled
255 34 0 Untitled
255 34 68 Untitled
255 34 136 Untitled
255 34 187 Untitled
255 34 255 Untitled
255 68 0 Untitled
255 68 68 Untitled
255 68 136 Untitled
255 68 187 Untitled
255 68 255 Untitled
255 102 0 Untitled
255 102 68 Untitled
255 102 136 Untitled
255 102 187 Untitled
255 102 255 Untitled
255 153 0 Untitled
255 153 68 Untitled
255 153 136 Untitled
255 153 187 Untitled
255 153 255 Untitled
255 187 0 Untitled
255 187 68 Untitled
255 187 136 Untitled
255 187 187 Untitled
255 187 255 Untitled
255 221 0 Untitled
255 221 68 Untitled
255 221 136 Untitled
255 221 187 Untitled
255 221 255 Untitled
255 255 0 Untitled
255 255 68 Untitled
255 255 136 Untitled
255 255 187 Untitled
255 255 255 Untitled
0 0 0 Untitled
17 17 17 Untitled
34 34 34 Untitled
51 51 51 Untitled
68 68 68 Untitled
85 85 85 Untitled
102 102 102 Untitled
119 119 119 Untitled
136 136 136 Untitled
153 153 153 Untitled
170 170 170 Untitled
187 187 187 Untitled
204 204 204 Untitled
221 221 221 Untitled
238 238 238 Untitled

BIN
assets/tsvm_graphics_mockup.kra LFS Normal file

Binary file not shown.

BIN
assets/tsvm_graphics_mockup2.kra LFS Normal file

Binary file not shown.

BIN
assets/tty.kra LFS Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More