mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 15:04:03 +09:00
adding gzip/replaced bad base64 impl with libgdx's
This commit is contained in:
45
assets/tvdos/filesystem.md
Normal file
45
assets/tvdos/filesystem.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Syntax
|
||||
## Reserved directories
|
||||
* `$DEVICE<device_number>`
|
||||
|
||||
## Reserved files
|
||||
* `$DEVICE<device_number>/$BOOT` — associates to bootloader, exact filename depends on the filesystem the device uses
|
||||
|
||||
# Drivers
|
||||
Filesystem driver is just an executable that can do file I/O to one specific filesystem it supports.
|
||||
|
||||
Filesystem drivers, just as regular TVDOS drivers, resides in `<root>/TVDOS/DRIVERS/`
|
||||
|
||||
# Commands
|
||||
|
||||
## cp
|
||||
`[cp|copy] <source> <destination>`
|
||||
|
||||
Executes following command:
|
||||
```
|
||||
<filesystem>.fs cp <source> <dest>
|
||||
```
|
||||
|
||||
## mv
|
||||
`[mv|move] <from> <to>`
|
||||
|
||||
Executes following command:
|
||||
```
|
||||
<filesystem>.fs mv <from> <to>
|
||||
```
|
||||
|
||||
## touch
|
||||
`touch <path>`
|
||||
|
||||
Executes following command:
|
||||
```
|
||||
<filesystem>.fs touch <path>
|
||||
```
|
||||
|
||||
## format
|
||||
`format -f [tsvm|flat|tree] [ -b <path_to_bootloader> ] <device_number>`
|
||||
|
||||
Executes following command:
|
||||
```
|
||||
<filesystem>.fs format <device_number> [ <path_to_bootloader> ]
|
||||
```
|
||||
@@ -15,11 +15,9 @@ _fsh.scrdim = con.getmaxyx();
|
||||
_fsh.scrwidth = _fsh.scrdim[1];
|
||||
_fsh.scrheight = _fsh.scrdim[0];
|
||||
_fsh.brandName = "f\xb3Sh";
|
||||
_fsh.brandLogoTexSmall = new GL.Texture(24, 14, base64.atob("//////////////////////////////////////////j//////////////"+
|
||||
"/////////////////j////////////////////////z8/P///j///+hoaGhof+hof////////Pz//////j//6Gh//////+hof////////Pz//////j//6"+
|
||||
"Gh//////+hoaGhof//8/Pz8/P///j///+hoaH///+hof//oaH///Pz//////j//////6Gh//+hof//oaH///Pz//////j///////+hof+hof//oaH///P"+
|
||||
"z//////j///////+hof+hof//oaH///Pz//////j//6GhoaGh//+hof//oaH///////////j///////////////////////////////j/////////////"+
|
||||
"////////////////////////////////////////"));
|
||||
_fsh.brandLogoTexSmall = new GL.Texture(24, 14, gzip.decomp(base64.atob(
|
||||
"H4sIAAAAAAAAAPv/Hy/4Qbz458+fIeILQQBIwoSh6qECuMVBukCmIJkDVQ+RQNgLE0MX/w+1lyhxqIUwTLJ/sQMAcIXsbVABAAA="
|
||||
)));
|
||||
_fsh.scrlayout = ["com.fsh.clock","com.fsh.calendar","com.fsh.apps_n_files"];
|
||||
|
||||
_fsh.drawTitlebar = function(titletext) {
|
||||
@@ -61,56 +59,14 @@ _fsh.registerNewWidget = function(widget) {
|
||||
}
|
||||
|
||||
var clockWidget = new _fsh.Widget("com.fsh.clock", _fsh.scrwidth - 8, 7);
|
||||
clockWidget.numberSheet = new GL.SpriteSheet(19, 22, new GL.Texture(190, 22, base64.atob(
|
||||
"///////v7+/v7+/v7+//////////////////////7+//////////7+/v7+/v7+/v7+/v7+/v/////+/v7+/v7+/v7+/v7+/v7///////////////7+/v/"+
|
||||
"///////////7+/v7+/v7+/v7+/v7+/v7+//////////7+/v7+/v7+/v7+/////v7+/v7+/v7+/v7+/v7+/v7////////+/v7+/v7+/v7////////////+"+
|
||||
"/v7+/v7+/v7+/v/////////+/v7+/v7+/v7+/v7+/////////////////v7+/v////////7+/v7+/v7+/v7+/v7+/v7+/v/+/v7+/v7+/v7+/v7+/v7+/"+
|
||||
"v7///////////7+/v7///////////7+/v7+/v7+/v7+/v7+/v7+/v7//////v7+/v7+/v7+/v7+/v7//v7+/v7+/v7+/v7+/v7+/v7+/v////7+/v7+/v"+
|
||||
"7+/v7+/v7///////7+/v7+/v7+/v7+/v7+/v/////+/v7+/v///////v7+/v7////////////+/v7+/v7//////////////////////////v7+/v7+///"+
|
||||
"///////////////7+/v7+/v/////////+/v7////////////+/v7//////////////////////////v7+/v7/////////////////////////////////"+
|
||||
"/v7+/v////7+/v7+/v////7+/v7+/v////7+/v7+//////////7+/v7+///+/v7+/////////////v7+/v////////7+/v7+/v7+/////////////////"+
|
||||
"////////////v7+/v////////////////////7+/v7////////+/v7+/////////////v7+/////////////////////////v7+/v////////////////"+
|
||||
"////////////////////7+/v/////+/v7+//////////7+/v7///7+/v7///////////////7+/v7//v7+///////////////+/v7////////+/v7+/v7"+
|
||||
"+/v/////////////////////////////+/v7//////////////////////v7+/////////v7+//////////////7+/v///////////////////////v7+"+
|
||||
"/v////////////////////////////////////7+/v7//////v7+/////////////v7+///+/v7//////////////////v7+/v7+/v///////////////"+
|
||||
"v7+/v/////////////+/v7//////////////////////////////v7+//////////////////////7+/v///////v7+/v/////////////+/v7///////"+
|
||||
"////////////////7+/v/////////////////////////////////////+/v7///////7+/v////////////7+/v///v7+//////////////////7+/v7"+
|
||||
"+/v/////////////////+/v7//////////////v7+//////////////////////////////7+/v/////////////////////+/v7///////7+/v//////"+
|
||||
"/////////v7+//////////////////////7+/v7////////////////////////////////////+/v7+///////+/v7////////////+/v7///7+/v///"+
|
||||
"//////////////+/v7+/v7//////////////////v7+//////////////7+/v/////////////////////////////+/v7//////////////////////v"+
|
||||
"7+//////7+/v7///////////////7+/v/////////////////////+/v7//////////////////////////////////////v7+/////////v7+///////"+
|
||||
"//////v7+///+/v7//////////////////v7+/v7+//////////////////7+/v/////////////+/v7////////////////////////////+/v7+////"+
|
||||
"/////////////////v7+/v/////+/v7///////7+///////+/v7+/v7+/v7+/v7+/v7+/////v7+//7+/v7+/v7+/v7+/////////////////////v7+/"+
|
||||
"v////////7+/v7//////////v7+/v///v7+//////////////////7+/v7+/v/////////////////+/v7//////////////v7+//////////////////"+
|
||||
"////////7+/v7+/v/////////////////+/v7+/v/////+/v7+///////+/v7///////7+/v7+/v7+/v7+/v7+/v7+//7+/v7+/v7+/v7+/v7+/v7+///"+
|
||||
"///////////////7+/v/////////+/v7+/v7////+/v7+/v7///7+/v/////////////////+/v7+/v7//////////////////v7+//////////////7+"+
|
||||
"/v////////////7+/v7+/v7+/v7+/v7+/v///v7+/v7+/v7+/v7+/v7+/v///////v7+/////////v7+///////////////////////+/v7+/v7+/v7+/"+
|
||||
"v7//////////v7+/v7///////////////7+/v7////////+/v7+/v7+/v7+/v7+/v7+/v/+/v7+///////////////+/v7+/v7+//////////////////"+
|
||||
"7+/v/////////////+/v7//////////v7+/v7+/v7+/v7+/v7+//////7+/v7+/v7+/v7+/v7+/v7//////v7+/v////////7+/v/////////////////"+
|
||||
"////////+/v7+/v7+/v///////////////v7+/v/////////////+/v7//////////v7+/v7+/v7+/v7+/v7+/v7///7+/v7+//////////7+/v7+/v7+"+
|
||||
"/v/////////////////+/v7//////////////v7+/////////v7+/v7+///////////////////////////////////+/v7+/v////7+/v/////////+/"+
|
||||
"v7///////////////////////////7+/v7+/v/////////////////+/v7////////////+/v7+/////////v7+/v7+//////////7+/v7+/v///v7+/v"+
|
||||
"7+/v7+/v7+/v7+/v7+/v7//////////////////v7+//////////////7+/v////////7+/v7////////////////////////////////////////+/v7"+
|
||||
"+//7+/v7//////////v7+///////////////////////////+/v7+/v7//////////////////v7+/////////////v7+//////////7+/v7/////////"+
|
||||
"//////7+/v7//////v7+/v7+/v7+/v7//v7+/v7+//////////////////7+/v/////////////+/v7////////+/v7//////////////////////////"+
|
||||
"/////////////////7+/v/+/v7///////////7+/v///////////////////////////v7+/v7+//////////////////7+/v///////////v7+/v////"+
|
||||
"/////+/v7//////////////////v7+//////////////////////7+/v7+/v/////////////////+/v7//////////////v7+/////////v7+///////"+
|
||||
"////////////////////////////////////+/v7+/v7+///////////+/v7///////////////////////////7+/v7+/v/////////////////+/v7/"+
|
||||
"//////////7+/v///////////v7+//////////////////7+/v////////////////////7+/v7+/v7+///////////////+/v7+//////////////7+/"+
|
||||
"v////////7+/v///////////////////////////////////////////v7+/v7+/v7+/v7+/v7+/v7+/v7+/v/////////////////////+/v7+/v7///"+
|
||||
"///////////////v7+//////////7+/v7///////////7+/v/////////////////+/v7////////////////////+/v7//v7+/v///////////////v7"+
|
||||
"+///////////////+/v7////////+/v7///////////////////////////////////////////7+/v/+/v7+/v7+/v7+/v7+/v7+/v//////////////"+
|
||||
"/////////v7+/v7+//////////////////7+/v/////////+/v7////////////+/v7//////////////////v7+///////////////////+/v7+///+/"+
|
||||
"v7+/////////////v7+/v///////////////v7+/////////v7+//////////////////////////////////////////7+/v7////////////////+/v"+
|
||||
"7//////////////////////////v7+/v7+/v7///////////////7+/v7////////+/v7+/////////////v7+/v///////////////v7+/v/////////"+
|
||||
"////////+/v7+//////7+/v7+///////+/v7+/v////////////////7+/v////////7+/v///////////////////////////////////////v7+/v7+"+
|
||||
"/////////////////v7+///////////////////////+/v7+/v7//v7+/v7//////////v7+/v7//////////v7+//////////////7+/v7+/v///////"+
|
||||
"//+/v7+/v7///////////////7+/v7+/////////v7+/v7+/v7+/v7+/v/////////////////+/v7////////+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v"+
|
||||
"7+/v7+/v7+/v7+/v7+//////////////////7+/v/////+/v7+/v7+/v7+/v7+/v7+/v7////+/v7+/v7+/v7+/v7+/v7//////////v7+/v/////////"+
|
||||
"//////v7+/v7+/v7+/v7+/v7+/v7///7+/v7+/v7+/v7+/v7+/////////////v7+/v7+/v7+/////////////////////v7+//////////7+/v7+/v7+"+
|
||||
"/v7+/v7+/v7+///+/v7+/v7+/v7+/v7+/v7//////////////////////v7///////7+/v7+/v7+/v7+/v7+/v/////////+/v7+/v7+/v7+/v///////"+
|
||||
"/////7+/v///////////////////v7+/v7+/v7+/v7+/v///////v7+/v7+/v7+/v7////////w=="
|
||||
)));
|
||||
clockWidget.numberSheet = new GL.SpriteSheet(19, 22, new GL.Texture(190, 22, gzip.decomp(base64.atob(
|
||||
"H4sIAAAAAAAAAMWVW3LEMAgE739aHcFJJV5ZMD2I9ToVfcl4GBr80HF8r/FaR1ozMuIyoUu87lEXI0al5qVR5AebSwchSaNE6Nyo1Nw5HXF3SfPT4Bshl"+
|
||||
"EycA8RD96mLlHbuhTgOrfLnUDZspafbSQWk56WEGvQEtWaWwgb8iz7a8AOXhsraO/q9Qw2/GnXovfVN+q2wM/p/oddn2cjF239GX3y11+SWCtc6FTHC1v"+
|
||||
"TVPkDPWWn0w+DDz93UX9v9mF5KIsQ6OdN2KJoB4ui1bXXr0AMp0YfiQo//4XhpK8555dsNehAqVS5uhb5iHn3Kko769J59KmLBe/TSR7hcsd+hr+HnrwR"+
|
||||
"9uvRF9+D3MP14gN7lqx+8OuNT+uqt3NFX3SN9fTbeeHNq+C29pRWzX5+Rcm7SZyjOKJ/2hkSPqul4xN279DrSYvCrNu2NI7ZMp1ouBxK3KBVVnEeAUWbK"+
|
||||
"MUDn5DPsPxmUqHZQjGpy2hergM3EVBAAAA=="
|
||||
))));
|
||||
|
||||
clockWidget.clockColon = new GL.Texture(4, 3, base64.atob("7+/v7+/v7+/v7+/v"));
|
||||
clockWidget.monthNames = ["Spring", "Summer", "Autumn", "Winter"];
|
||||
clockWidget.dayNames = ["Mondag ", "Tysdag ", "Midtveke", "Torsdag ", "Fredag ", "Laurdag ", "Sundag ", "Verddag "];
|
||||
@@ -166,4 +122,7 @@ while (true) {
|
||||
|
||||
con.move(3,1);
|
||||
con.color_pair(201,255);
|
||||
print("cya!");
|
||||
print("cya!");
|
||||
|
||||
let konsht = 3412341241;
|
||||
print(konsht);
|
||||
@@ -6,12 +6,13 @@ Has no affiliation with OpenGL by Khronos Group
|
||||
|
||||
var GL = {};
|
||||
|
||||
// bytes should be able to handle both JSArray and Java ByteArray (toString = "[B")?
|
||||
GL.Texture = function(w, h, bytes) {
|
||||
this.width = w;
|
||||
this.height = h;
|
||||
this.texData = bytes;
|
||||
|
||||
if (!Array.isArray(bytes)) {
|
||||
if (!Array.isArray(bytes) && !bytes.toString().startsWith("[B")) {
|
||||
throw "Texture data is not an instance of array";
|
||||
}
|
||||
};
|
||||
@@ -52,7 +53,7 @@ GL.drawTexPatternOver = function(texture, x, y, width, height) {
|
||||
var tx = xx % texture.width;
|
||||
var ty = yy % texture.height;
|
||||
var c = texture.texData[ty * texture.width + tx];
|
||||
if (c != 255) {
|
||||
if (c != -1) {
|
||||
graphics.plotPixel(x + xx, y + yy, c);
|
||||
}
|
||||
}
|
||||
@@ -71,7 +72,7 @@ GL.drawTexImageOver = function(texture, x, y) {
|
||||
for (var ty = 0; ty < texture.height; ty++) {
|
||||
for (var tx = 0; tx < texture.width; tx++) {
|
||||
var c = texture.texData[ty * texture.width + tx];
|
||||
if (c != 255) {
|
||||
if (c != -1) {
|
||||
graphics.plotPixel(x + tx, y + ty, c);
|
||||
}
|
||||
}
|
||||
@@ -93,7 +94,7 @@ GL.drawSpriteOver = function(sheet, xi, yi, x, y) {
|
||||
for (var ty = 0; ty < sheet.tileHeight; ty++) {
|
||||
for (var tx = 0; tx < sheet.tileWidth; tx++) {
|
||||
var c = sheet.texture.texData[(ty + offy) * sheet.texture.width + (tx + offx)];
|
||||
if (c != 255) {
|
||||
if (c != -1) {
|
||||
graphics.plotPixel(x + tx, y + ty, c);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user