Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
738e5828f6 | ||
|
|
9fa1c859ac | ||
|
|
d01b534a3d | ||
|
|
491b0ea5c3 | ||
|
|
de6fde05cc | ||
|
|
fb675a2299 | ||
|
|
aa374b6816 | ||
|
|
f427b7bcc7 | ||
|
|
4ba3c5b524 | ||
|
|
7180ad39d8 | ||
|
|
6c7bcc1911 | ||
|
|
e09c9b5595 | ||
|
|
9476bb0c8a | ||
|
|
8f7db8507b | ||
|
|
188b1aebb0 |
No files matched your search
+1
-2
@@ -15,5 +15,4 @@ localenv.json
|
||||
dockerout.txt
|
||||
AGENTS.md
|
||||
*.log
|
||||
/doc/*.md
|
||||
wasuro
|
||||
/doc/*.md
|
||||
@@ -24,7 +24,6 @@ declare -a run_steps=(
|
||||
"compile_stub.sh" "Failed to compile stub!"
|
||||
"compile_vergen.sh" "Versions failed to compile"
|
||||
"compile_lvgl.sh" "Failed to compile LVGL!"
|
||||
"compile_wasuro.sh" "Failed to pull Wasuro!"
|
||||
"compile_sources.sh" "Failed to compile FPC Sources!"
|
||||
"compile_link.sh" "Failed linking!"
|
||||
"compile_isogen.sh" "Failed to create ISO!"
|
||||
|
||||
+22
-8
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# compile_lvgl.sh — Download LVGL v9.2 source and compile into lib/liblvgl.a
|
||||
# Clone & compile in /tmp (fast container-local fs).
|
||||
# Copy source + objects to /lvgl (host mount) for debugging.
|
||||
# Cache liblvgl.a on host mount (/code/lvgl/) to skip rebuild.
|
||||
set -e
|
||||
|
||||
LVGL_VERSION="v9.2.2"
|
||||
@@ -10,6 +10,7 @@ LVGL_DIR="/tmp/lvgl"
|
||||
OBJ_DIR="/tmp/lvgl_obj"
|
||||
CONF_DIR="$(pwd)/lvglh"
|
||||
OUT_DIR="$(pwd)/lib"
|
||||
CACHE_DIR="/code/lvgl"
|
||||
|
||||
CC="gcc"
|
||||
CFLAGS="-m32 -march=i686 -ffreestanding \
|
||||
@@ -26,6 +27,17 @@ echo " "
|
||||
echo "Compiling LVGL..."
|
||||
echo " "
|
||||
|
||||
# If cached liblvgl.a exists on host mount, just copy it and skip everything
|
||||
if [ -f "${CACHE_DIR}/liblvgl.a" ]; then
|
||||
echo "Found cached liblvgl.a in ${CACHE_DIR}, copying to ${OUT_DIR}..."
|
||||
cp "${CACHE_DIR}/liblvgl.a" "${OUT_DIR}/liblvgl.a"
|
||||
echo "(Delete lvgl/liblvgl.a to force a full rebuild.)"
|
||||
echo " "
|
||||
echo "LVGL compilation complete (cached)."
|
||||
echo " "
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Clone LVGL into /tmp (container-local)
|
||||
rm -rf "$LVGL_DIR"
|
||||
echo "Downloading LVGL ${LVGL_VERSION}..."
|
||||
@@ -105,14 +117,16 @@ else
|
||||
echo "No custom LVGL files in lvglh/."
|
||||
fi
|
||||
|
||||
# Copy source + objects to /lvgl host mount for debugging
|
||||
echo "Copying LVGL source and objects to host mount..."
|
||||
mkdir /code/lvgl 2>/dev/null || true
|
||||
rm -rf /code/lvgl/* /code/lvgl/.[!.]* /code/lvgl/..?* 2>/dev/null || true
|
||||
cp -a "$LVGL_DIR/src" /code/lvgl/src
|
||||
cp -a "$OBJ_DIR" /code/lvgl/obj
|
||||
# Cache liblvgl.a and source to host mount for next build
|
||||
echo "Caching LVGL to host mount..."
|
||||
mkdir -p "$CACHE_DIR"
|
||||
rm -rf ${CACHE_DIR}/* ${CACHE_DIR}/.[!.]* ${CACHE_DIR}/..?* 2>/dev/null || true
|
||||
cp "${OUT_DIR}/liblvgl.a" "${CACHE_DIR}/liblvgl.a"
|
||||
cp -a "$LVGL_DIR/src" "${CACHE_DIR}/src"
|
||||
cp -a "$LVGL_DIR"/*.h "${CACHE_DIR}/" 2>/dev/null || true
|
||||
cp -a "$OBJ_DIR" "${CACHE_DIR}/obj"
|
||||
echo "Done."
|
||||
|
||||
echo " "
|
||||
echo "LVGL compilation complete."
|
||||
echo " "
|
||||
echo " "
|
||||
+1
-8
@@ -4,11 +4,4 @@ echo "======================="
|
||||
echo " "
|
||||
echo "Compiling FPC Sources..."
|
||||
echo " "
|
||||
|
||||
# Build -Fu flags for all directories under src/ and wasuro/
|
||||
FU_PATHS="-Fusrc -Fuwasuro"
|
||||
for dir in $(find src wasuro -type d 2>/dev/null); do
|
||||
FU_PATHS="$FU_PATHS -Fu$dir"
|
||||
done
|
||||
|
||||
fpc -Aelf -gw -g -gl -n -v0ew -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ $FU_PATHS src/kernel.pas
|
||||
fpc -Aelf -gw -g -gl -n -v0ew -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/include/* -Fusrc/driver/* -Fusrc/driver/net/* -Fusrc/driver/bus/* -Fusrc/driver/bus/usb/* -Fusrc/driver/hid/* src/kernel.pas
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# compile_wasuro.sh — Pull Wasuro WASM runtime source into wasuro/
|
||||
# Clones the repo (sparse, src/wasm only) and copies the Pascal sources
|
||||
# into $PWD/wasuro so the FPC build can reference them via -Fu.
|
||||
set -e
|
||||
|
||||
WASURO_REPO="https://gitea.spexeah.com/Spexeah/Wasuro.git"
|
||||
WASURO_BRANCH="develop"
|
||||
WASURO_TMP="/tmp/wasuro"
|
||||
WASURO_OUT="$(pwd)/wasuro"
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Pulling Wasuro WASM runtime..."
|
||||
echo " "
|
||||
|
||||
# Skip if wasuro/ already has .pas files (cached from previous build)
|
||||
if [ -n "$(find "${WASURO_OUT}" -name '*.pas' 2>/dev/null | head -1)" ]; then
|
||||
echo "Wasuro sources already present in ${WASURO_OUT}, skipping pull."
|
||||
echo " "
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Clone sparse checkout (only src/wasm)
|
||||
rm -rf "$WASURO_TMP"
|
||||
git clone --depth 1 --branch "${WASURO_BRANCH}" --filter=blob:none --sparse \
|
||||
"${WASURO_REPO}" "${WASURO_TMP}" 2>&1
|
||||
cd "$WASURO_TMP"
|
||||
git sparse-checkout set src/wasm 2>&1
|
||||
cd -
|
||||
|
||||
echo "Copying src/wasm to ${WASURO_OUT}..."
|
||||
rm -rf "$WASURO_OUT"
|
||||
mkdir -p "$WASURO_OUT"
|
||||
cp -a "${WASURO_TMP}/src/wasm/"* "$WASURO_OUT"/
|
||||
rm -rf "$WASURO_TMP"
|
||||
|
||||
TOTAL=$(find "$WASURO_OUT" -name '*.pas' | wc -l)
|
||||
echo "Copied ${TOTAL} Pascal source files."
|
||||
echo " "
|
||||
echo "Wasuro pull complete."
|
||||
echo " "
|
||||
@@ -29,14 +29,11 @@ unit contextswitcher;
|
||||
interface
|
||||
|
||||
uses
|
||||
idt, isrmanager, processmanager, proctypes, util, syslog, tracer;
|
||||
idt, isrmanager, processmanager, proctypes, util, tracer;
|
||||
|
||||
{ Initialise: overwrite IDT gate 32 with our custom ISR. }
|
||||
procedure init;
|
||||
|
||||
{ No idle ESP variable needed — idle is now a formal process (PID 0)
|
||||
with its SavedESP managed like any other process. }
|
||||
|
||||
implementation
|
||||
|
||||
{ -----------------------------------------------------------------------
|
||||
|
||||
@@ -957,11 +957,14 @@ end;
|
||||
procedure usb_check_hotplug;
|
||||
var
|
||||
i : uint32;
|
||||
count: uint32;
|
||||
hc : PUSBHCDriver;
|
||||
port : uint8;
|
||||
begin
|
||||
if HCList = nil then exit;
|
||||
for i := 0 to LL_Size(HCList) - 1 do begin
|
||||
count := LL_Size(HCList);
|
||||
if count = 0 then exit;
|
||||
for i := 0 to count - 1 do begin
|
||||
hc := PUSBHCDriver(LL_Get(HCList, i));
|
||||
if (hc <> nil) and hc^.PortChangePending then begin
|
||||
hc^.PortChangePending := false;
|
||||
|
||||
@@ -119,8 +119,12 @@ var
|
||||
x32, y32 : sint32;
|
||||
r : pchar;
|
||||
begin
|
||||
{ mouse_wait(0) checks OBF with a short timeout (100 iterations).
|
||||
When it returns true, data is ready — read it directly with inb($60).
|
||||
Do NOT call mouse_read here: it uses mouse_wait_long (100k iterations)
|
||||
and would spin-block the ISR if the next packet byte hasn't arrived yet. }
|
||||
while mouse_wait(0) do begin
|
||||
b := mouse_read;
|
||||
b := inb($60);
|
||||
if Cycle = 0 then begin
|
||||
if (b AND $08) = $08 then begin
|
||||
Mouse_Byte[Cycle] := b;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
{
|
||||
Driver->Timer->TMR_0_ISR - 1024hz Timer Driver.
|
||||
Driver->Timer->TMR_0_ISR - 8khz Timer Driver.
|
||||
|
||||
@author(Kieron Morris <[email protected]>)
|
||||
}
|
||||
@@ -37,7 +37,7 @@ var
|
||||
Hooks : Array[1..MAX_HOOKS] of pp_hook_method;
|
||||
Registered : boolean = false;
|
||||
|
||||
procedure Main; //IRQ0, 1024.19hz aprox
|
||||
procedure Main; //IRQ0, ~8001hz
|
||||
var
|
||||
i : integer;
|
||||
|
||||
@@ -54,7 +54,7 @@ procedure register();
|
||||
begin
|
||||
if not registered then begin
|
||||
asm
|
||||
mov ax, 1193
|
||||
mov ax, 149
|
||||
out $40, al
|
||||
mov al, ah
|
||||
out $40, al
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
Driver->Timer->GraphicsRefresh - Timer-driven graphics refresh at ~120FPS.
|
||||
|
||||
Hooks into the 1024Hz timer (TMR_0_ISR) and calls the desktop, uidebug,
|
||||
LVGL and video flush routines every ~9 ticks (1024/9 ≈ 113.8 FPS).
|
||||
|
||||
@author(Kieron Morris <[email protected]>)
|
||||
}
|
||||
unit graphicsrefresh;
|
||||
|
||||
interface
|
||||
|
||||
procedure init;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
util,
|
||||
TMR_0_ISR,
|
||||
desktop,
|
||||
uidebug,
|
||||
lvgl,
|
||||
video,
|
||||
windows,
|
||||
syslog;
|
||||
|
||||
const
|
||||
{ 1024 / 4 ≈ 256 FPS }
|
||||
TICKS_PER_FRAME = 4;
|
||||
|
||||
var
|
||||
TickCounter : uint32;
|
||||
|
||||
procedure on_tick(data : void);
|
||||
begin
|
||||
TickCounter := TickCounter + 1;
|
||||
if TickCounter >= TICKS_PER_FRAME then begin
|
||||
TickCounter := 0;
|
||||
windows.reapOrphanedWindows;
|
||||
desktop.update;
|
||||
uidebug.update;
|
||||
lvgl_handler;
|
||||
video.Flush;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure init;
|
||||
begin
|
||||
TickCounter := 0;
|
||||
TMR_0_ISR.hook(uint32(@on_tick));
|
||||
syslog.logln('GFXREFRESH', 'Hooked into 1024Hz timer (~120 FPS).');
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
Driver->Timer->USBHotplug - Timer-driven USB hotplug polling at ~1Hz.
|
||||
|
||||
Hooks into the 1024Hz timer (TMR_0_ISR) and calls
|
||||
usbcore.usb_check_hotplug every 1024 ticks (approximately once per second).
|
||||
|
||||
@author(Kieron Morris <[email protected]>)
|
||||
}
|
||||
unit usbhotplug;
|
||||
|
||||
interface
|
||||
|
||||
procedure init;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
util,
|
||||
TMR_0_ISR,
|
||||
usbcore,
|
||||
syslog;
|
||||
|
||||
const
|
||||
{ 1024 ticks at 1024Hz ≈ 1 second }
|
||||
TICKS_PER_POLL = 1024;
|
||||
|
||||
var
|
||||
TickCounter : uint32;
|
||||
|
||||
procedure on_tick(data : void);
|
||||
begin
|
||||
TickCounter := TickCounter + 1;
|
||||
if TickCounter >= TICKS_PER_POLL then begin
|
||||
TickCounter := 0;
|
||||
usbcore.usb_check_hotplug;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure init;
|
||||
begin
|
||||
TickCounter := 0;
|
||||
TMR_0_ISR.hook(uint32(@on_tick));
|
||||
syslog.logln('USBHOTPLUG', 'Hooked into 1024Hz timer (~1Hz polling).');
|
||||
end;
|
||||
|
||||
end.
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Loaded 20 of 30 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user