testing update #22

Merged
Astronand merged 1 commits from 1.2-dev into main 2026-08-21 07:36:55 -04:00
56 changed files with 668 additions and 94 deletions
+22 -66
View File
@@ -1,82 +1,38 @@
--:Minify:--
local lib = {}
--[[
Example framebuffer object
fb = {
r={
"","" -- repeat for # of rows length of string is the # of collums
},
g = {
"",""
},
b = {
"",""
}
}
Example font object
font = {
width=int,
hight=int,
data={
A={
"Ga","gs","Gk" -- length of string is byte alligned with the string being a binary bitmap
}
}
}
]]
function lib.newFbObj(fb)
function lib.frame(frame)
local handle = {}
function handle.setPixel(x,y,color24)
end
function handle.line(x1,y1,x2,y2,color24)
end
function handle.box(x1,y1,x2,y2,color24)
end
function handle.filledBox(x1,y1,x2,y2,color24)
end
function handle.tri(x1,y1,x2,y2,x3,y3,color24)
end
function handle.filledTri(x1,y1,x2,y2,x3,y3,color24)
end
function handle.window(id,x,y,w,h,writeonly)
end
function handle.editWindow(id,x,y,w,h)
end
function handle.text(x,y,font,color24)
end
function handle.draw()
end
function handle.getPixel(x,y)
end
function handle.getPixels(x1y1,x2,y2)
function handle.setPixels(x,y,framebuffer)
end
function handle.getPixels(x,y,w,h)
end
function handle.frame(x,y,w,h,writeonly)
end
function handle.framectl(id,x,y,w,h,writeonly)
end
function handle.drawframe()
end
function handle.line()
end
+256
View File
@@ -0,0 +1,256 @@
#000000
#0b0b0b
#222222
#444444
#555555
#777777
#888888
#aaaaaa
#bbbbbb
#dddddd
#eeeeee
#00000b
#000022
#000044
#000055
#000077
#000088
#0000aa
#0000bb
#0000dd
#0000ee
#000b00
#002200
#004400
#005500
#007700
#008800
#00aa00
#00bb00
#00dd00
#00ee00
#0b0000
#220000
#440000
#550000
#770000
#880000
#aa0000
#bb0000
#dd0000
#ee0000
#000033
#000066
#000099
#0000cc
#0000ff
#003300
#003333
#003366
#003399
#0033cc
#0033ff
#006600
#006633
#006666
#006699
#0066cc
#0066ff
#009900
#009933
#009966
#009999
#0099cc
#0099ff
#00cc00
#00cc33
#00cc66
#00cc99
#00cccc
#00ccff
#00ff00
#00ff33
#00ff66
#00ff99
#00ffcc
#00ffff
#330000
#330033
#330066
#330099
#3300cc
#3300ff
#333300
#333333
#333366
#333399
#3333cc
#3333ff
#336600
#336633
#336666
#336699
#3366cc
#3366ff
#339900
#339933
#339966
#339999
#3399cc
#3399ff
#33cc00
#33cc33
#33cc66
#33cc99
#33cccc
#33ccff
#33ff00
#33ff33
#33ff66
#33ff99
#33ffcc
#33ffff
#660000
#660033
#660066
#660099
#6600cc
#6600ff
#663300
#663333
#663366
#663399
#6633cc
#6633ff
#666600
#666633
#666666
#666699
#6666cc
#6666ff
#669900
#669933
#669966
#669999
#6699cc
#6699ff
#66cc00
#66cc33
#66cc66
#66cc99
#66cccc
#66ccff
#66ff00
#66ff33
#66ff66
#66ff99
#66ffcc
#66ffff
#990000
#990033
#990066
#990099
#9900cc
#9900ff
#993300
#993333
#993366
#993399
#9933cc
#9933ff
#996600
#996633
#996666
#996699
#9966cc
#9966ff
#999900
#999933
#999966
#999999
#9999cc
#9999ff
#99cc00
#99cc33
#99cc66
#99cc99
#99cccc
#99ccff
#99ff00
#99ff33
#99ff66
#99ff99
#99ffcc
#99ffff
#cc0000
#cc0033
#cc0066
#cc0099
#cc00cc
#cc00ff
#cc3300
#cc3333
#cc3366
#cc3399
#cc33cc
#cc33ff
#cc6600
#cc6633
#cc6666
#cc6699
#cc66cc
#cc66ff
#cc9900
#cc9933
#cc9966
#cc9999
#cc99cc
#cc99ff
#cccc00
#cccc33
#cccc66
#cccc99
#cccccc
#ccccff
#ccff00
#ccff33
#ccff66
#ccff99
#ccffcc
#ccffff
#ff0000
#ff0033
#ff0066
#ff0099
#ff00cc
#ff00ff
#ff3300
#ff3333
#ff3366
#ff3399
#ff33cc
#ff33ff
#ff6600
#ff6633
#ff6666
#ff6699
#ff66cc
#ff66ff
#ff9900
#ff9933
#ff9966
#ff9999
#ff99cc
#ff99ff
#ffcc00
#ffcc33
#ffcc66
#ffcc99
#ffcccc
#ffccff
#ffff00
#ffff33
#ffff66
#ffff99
#ffffcc
#ffffff
@@ -0,0 +1,350 @@
term.setGraphicsMode(2)
local w,h = term.getSize(2)
local fb={}
for i=1, h do
fb[i]={}
for x=1, w do
fb[i][x]=0
end
end
local function setPixel(x,y,c)
--local old=fb[y]
--fb[y]=string.sub(old,1,x-1)..string.char(c)..string.sub(old,x+1)
fb[y][x]=c
end
local function setPixels(x,y,frame)
local w,h = #fb[1], #fb
for i=1, #frame do
for j=1, #frame[i] do
fb[y+i-1][x+j-1]=frame[i][j]
end
end
end
local function getPixel(x,y)
return fb[y][x]
end
local function getPixels(x,y,w,h)
local ret={}
for i=y, y+h do
ret[#ret+1] = {table.unpack(fb[i], x, x+w)}
end
return ret
end
local colors = {
[0]=0x000000,
0x0b0b0b,
0x222222,
0x444444,
0x555555,
0x777777,
0x888888,
0xaaaaaa,
0xbbbbbb,
0xdddddd,
0xeeeeee,
0x00000b,
0x000022,
0x000044,
0x000055,
0x000077,
0x000088,
0x0000aa,
0x0000bb,
0x0000dd,
0x0000ee,
0x000b00,
0x002200,
0x004400,
0x005500,
0x007700,
0x008800,
0x00aa00,
0x00bb00,
0x00dd00,
0x00ee00,
0x0b0000,
0x220000,
0x440000,
0x550000,
0x770000,
0x880000,
0xaa0000,
0xbb0000,
0xdd0000,
0xee0000,
0x000033,
0x000066,
0x000099,
0x0000cc,
0x0000ff,
0x003300,
0x003333,
0x003366,
0x003399,
0x0033cc,
0x0033ff,
0x006600,
0x006633,
0x006666,
0x006699,
0x0066cc,
0x0066ff,
0x009900,
0x009933,
0x009966,
0x009999,
0x0099cc,
0x0099ff,
0x00cc00,
0x00cc33,
0x00cc66,
0x00cc99,
0x00cccc,
0x00ccff,
0x00ff00,
0x00ff33,
0x00ff66,
0x00ff99,
0x00ffcc,
0x00ffff,
0x330000,
0x330033,
0x330066,
0x330099,
0x3300cc,
0x3300ff,
0x333300,
0x333333,
0x333366,
0x333399,
0x3333cc,
0x3333ff,
0x336600,
0x336633,
0x336666,
0x336699,
0x3366cc,
0x3366ff,
0x339900,
0x339933,
0x339966,
0x339999,
0x3399cc,
0x3399ff,
0x33cc00,
0x33cc33,
0x33cc66,
0x33cc99,
0x33cccc,
0x33ccff,
0x33ff00,
0x33ff33,
0x33ff66,
0x33ff99,
0x33ffcc,
0x33ffff,
0x660000,
0x660033,
0x660066,
0x660099,
0x6600cc,
0x6600ff,
0x663300,
0x663333,
0x663366,
0x663399,
0x6633cc,
0x6633ff,
0x666600,
0x666633,
0x666666,
0x666699,
0x6666cc,
0x6666ff,
0x669900,
0x669933,
0x669966,
0x669999,
0x6699cc,
0x6699ff,
0x66cc00,
0x66cc33,
0x66cc66,
0x66cc99,
0x66cccc,
0x66ccff,
0x66ff00,
0x66ff33,
0x66ff66,
0x66ff99,
0x66ffcc,
0x66ffff,
0x990000,
0x990033,
0x990066,
0x990099,
0x9900cc,
0x9900ff,
0x993300,
0x993333,
0x993366,
0x993399,
0x9933cc,
0x9933ff,
0x996600,
0x996633,
0x996666,
0x996699,
0x9966cc,
0x9966ff,
0x999900,
0x999933,
0x999966,
0x999999,
0x9999cc,
0x9999ff,
0x99cc00,
0x99cc33,
0x99cc66,
0x99cc99,
0x99cccc,
0x99ccff,
0x99ff00,
0x99ff33,
0x99ff66,
0x99ff99,
0x99ffcc,
0x99ffff,
0xcc0000,
0xcc0033,
0xcc0066,
0xcc0099,
0xcc00cc,
0xcc00ff,
0xcc3300,
0xcc3333,
0xcc3366,
0xcc3399,
0xcc33cc,
0xcc33ff,
0xcc6600,
0xcc6633,
0xcc6666,
0xcc6699,
0xcc66cc,
0xcc66ff,
0xcc9900,
0xcc9933,
0xcc9966,
0xcc9999,
0xcc99cc,
0xcc99ff,
0xcccc00,
0xcccc33,
0xcccc66,
0xcccc99,
0xcccccc,
0xccccff,
0xccff00,
0xccff33,
0xccff66,
0xccff99,
0xccffcc,
0xccffff,
0xff0000,
0xff0033,
0xff0066,
0xff0099,
0xff00cc,
0xff00ff,
0xff3300,
0xff3333,
0xff3366,
0xff3399,
0xff33cc,
0xff33ff,
0xff6600,
0xff6633,
0xff6666,
0xff6699,
0xff66cc,
0xff66ff,
0xff9900,
0xff9933,
0xff9966,
0xff9999,
0xff99cc,
0xff99ff,
0xffcc00,
0xffcc33,
0xffcc66,
0xffcc99,
0xffcccc,
0xffccff,
0xffff00,
0xffff33,
0xffff66,
0xffff99,
0xffffcc,
0xffffff,
}
for i=0,255 do
term.setPaletteColor(i,colors[i])
end
term.drawPixels(0,0,fb)
for i=0,255 do
for y=1+i, h-i do
for x=1+i, w-i do
setPixel(x,y,i)
end
end
term.drawPixels(1,1,fb)
os.queueEvent("nosleep")
os.pullEvent()
end
for i=1, 1000 do
pcall(function()
setPixels(math.random(1,w),math.random(1,h),getPixels(math.random(1,w),math.random(1,h),math.random(1,w),math.random(1,h)))
end)
term.drawPixels(1,1,fb)
os.queueEvent("nosleep")
os.pullEvent()
end
setPixels(1,1,getPixels(w-50,h-50,50,50))
term.drawPixels(0,0,fb)
local i=0
for x=1, 16*4, 4 do
for y=1, 16*4, 4 do
setPixel(x,y,i)
setPixel(x+1,y,i)
setPixel(x+2,y,i)
setPixel(x+3,y,i)
setPixel(x,y+1,i)
setPixel(x+1,y+1,i)
setPixel(x+2,y+1,i)
setPixel(x+3,y+1,i)
setPixel(x,y+2,i)
setPixel(x+1,y+2,i)
setPixel(x+2,y+2,i)
setPixel(x+3,y+2,i)
setPixel(x,y+3,i)
setPixel(x+1,y+3,i)
setPixel(x+2,y+3,i)
setPixel(x+3,y+3,i)
i=i+1
end
end
term.drawPixels(0,0,fb)
sleep(5)
term.setGraphicsMode(false)
+14 -2
View File
@@ -699,15 +699,27 @@ local spm = function(...)
content.hash=v.hash
fs.writeAllText("var/spm/db/installed/"..i, json.encode(content))
end
w("Writing changes...")
w("Writing files...")
for i,v in pairs(files) do
w("Writing "..i)
w("Writing package "..i)
for f,c in pairs(v.data) do
if not block[f] then
fs.writeAllText(f,c)
end
end
end
w("Proccessing control files...")
for i,v in pairs(files) do
for f,c in pairs(v.control) do
if f=="symlinks.json" then
local symlinks=json.decode(c)
for src,dest in pairs(symlinks) do
w(src.." -> "..dest)
syscall.symlink(dest, src)
end
end
end
end
w("Install complete")
log.close()
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "8c5cd772a7f2369cd013a592f9af9735",
"hash": "af3fa83604356e01837ef388e5ea363a",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-core.tar.gz"
}
+1 -1
View File
@@ -8,6 +8,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "80a565f47149dc3fe8dac43129d926e2",
"hash": "82e3fa59d3fb04c867b623d9a6a150ac",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-ac.tar.gz"
}
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": [],
"dependencies": [],
"version": "0.0.0",
"hash": "9f1f7f0667ec678d544ee08c6e2e644d",
"hash": "58aecd4f830670f8885987848b9abdf8",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-addon-cct.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "a57fa8c133267f2bd4da564640b4cd2b",
"hash": "f064c4564e596e884c5b9e9abe2008e6",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-ccpc.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.3.0",
"hash": "20b907135b9917c3f718291480d05da5",
"hash": "d0e086d322e07bb60822294857ccc7f6",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-cct.tar.gz"
}
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": [],
"dependencies": [],
"version": "0.0.0",
"hash": "ece345ad01466fbcb828b1fc972c0440",
"hash": "6e9aef51eb3f4d0c202ec4135b5a8de2",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-lua.tar.gz"
}
+1 -1
View File
@@ -6,6 +6,6 @@
],
"dependencies": [],
"version": "0.1.0",
"hash": "60804b53c7d7d8dd69afc33fad930727",
"hash": "c3f760d7997c6d913f0c2ce8f61627ce",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-oc.tar.gz"
}
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": [],
"dependencies": [],
"version": "0.0.0",
"hash": "753cd941da3c38f1d4350abc944f6e87",
"hash": "3a6b960a217aca9e1d2e3547fe5afcaf",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-vm.tar.gz"
}
+1 -1
View File
@@ -8,6 +8,6 @@
],
"dependencies": [],
"version": "1.5.0",
"hash": "447e8663723d28d03c951f347494b750",
"hash": "1c7e260453de521e90d68855d8f7d416",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-kernel.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "812e11b5ee4cfc2096b9b4326fd1773e",
"hash": "0842e57bd3a76687f68ea01f9ccd4f23",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/bit32.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "296979e95c6ff4ef89f5ee211d64e69c",
"hash": "75df789d1d9d72bf958c31f3c8167f2e",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/blake2s.tar.gz"
}
+1 -1
View File
@@ -8,6 +8,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "2d7afba8394e2f2cb574bcc96e042ef6",
"hash": "2e23edbc1f537971ff5e59e4fbe47ea0",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/coreutils.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0-release",
"hash": "c1b0ebb35d786793442663ae5d7ff384",
"hash": "6df4e0439eb721a4c1ea8b37796aafd9",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/deflate.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "af09f814eb4b0ff24085ce9022b5f135",
"hash": "ea8adbf3f614647990a628a7f9c67488",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/gfxterm.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.3.0",
"hash": "1974e196fade22bafb94789883bb6841",
"hash": "5810e20de2568a072f48c5fd0364abd3",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/hysh.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "b35ff313352ba8f1d4399a22f6616015",
"hash": "a3492bf4185d5d4d5cc140619d1e03fa",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/iniparse.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "e0ab0768f51cde02820f1ec456e88ee9",
"hash": "4151d8db4e6fd6b6f6de1f87cdb08137",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/installer.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "464350121b7cc02dba96f15d2c584d29",
"hash": "ea9cabab165595bb50cc34306832d6a2",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/json.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.2.0",
"hash": "4530588587327821be46e46bcb64edaf",
"hash": "9c94a610906c21d369ce1ff173adafac",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/lua.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "2fb19eeac778528f0ebf4843bd8ca2aa",
"hash": "095330f4599e0a4607a24ccb141b58b5",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/micro.tar.gz"
}
+1 -1
View File
@@ -8,6 +8,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "77327d7d90d17316afaca2ee14945596",
"hash": "6e2cf617969c9faa15a3ab712c74930a",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/minify.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "0a0f515b64d2dca9cc0e1a9162cd90d9",
"hash": "4a07e6c4cf138b239e8c97985a212c21",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/pid.tar.gz"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -14,6 +14,6 @@
"Hyperion-core"
],
"version": "1.0.0",
"hash": "b98b74face55bd4feedb312aa638795d",
"hash": "36055f8aea21098ca120f648292505b0",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/spm.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.1.0",
"hash": "7c4a2e241b7ced224084471b219390bf",
"hash": "d46f83d262d515921ba300bfe081922b",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/sysinit.tar.gz"
}
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "",
"hash": "2f0419446840e85b5142252c28da35d9",
"hash": "d92473f303903d807e53276a6819f150",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/tar.tar.gz"
}
+1 -1
View File
@@ -10,6 +10,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "7de373a2272d21a58a1d9c7fcd462781",
"hash": "fe9b62794a71bf0ecae6e93eefde1b55",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/xz.tar.gz"
}