Compare commits

..
8 Commits
Author SHA1 Message Date
Aaron fde535d7c7 feat(filebrowser): add delete button to toolbar, fix FAT32 delete/rename with raw sector scanning
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
- Add SYM_TRASH toolbar button wired to fb_delete_cb (was missing entirely)
- Filter '.' and '..' entries in fb_collect_cb so they never appear
- Rewrite deleteFile/deleteDir/renameFile to use raw sector scanning
  instead of getDirEntries linked-list indices (fixes  gap mismatch)
- Handle root directory correctly (use bootRecord^.rootCluster instead
  of assuming entry 0 is '.')
2026-03-11 19:28:49 +00:00
Aaron 1633a1e76c fix: FAT32 >1024 byte read/write truncation, VFS write notifications & dir watch
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
- FAT32 writeFile: replace hardcoded spc=4 with bootRecord^.spc for
  cluster allocation and per-sector write loop
- FAT32 writeFile: update directory entry byteSize on disk after write
- FAT32 readFile: use dir^.byteSize instead of cluster-based estimate,
  fix off-by-one in read loop, remove spurious +sectorSize allocation
- VFS: fire VFS_OnMutation on sync/async writes (cache invalidate + watch)
- VFS: invalidate all cache entries for volume on mutation (relPath mismatch)
- VFS: add vfsParentDir helper, store VFSDir in file descriptors
- FDTable: add VFSDir field, free on close
- File browser: enable directory watch & poll timer, two-step new file
  creation (open + write), remove io.syslog import
- Linker: add --no-warn-execstack to suppress ld exit code 1 on warning
- Add core.strings.helpers unit (getFileExtension, fmtFileSize, sort)
2026-03-11 07:39:00 +00:00
Aaron b20b88abfd refactor: rename core.stringhelpers to core.strings.helpers
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2026-03-10 19:10:19 +00:00
Aaron 80f30d8e69 refactor: rename core.search to core.stringhelpers
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2026-03-10 19:07:13 +00:00
Aaron 587177f6bb remove debug file
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2026-03-10 18:56:55 +00:00
Aaron badcf8df5e removed unused icons
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2026-03-10 18:47:50 +00:00
Aaron 76eaf6c698 fix: replace raw mouse hook with LVGL long-press for file browser context menu
Removed driver.hid.mouse dependency that caused page fault on close.
Context menu now triggers via LV_EVENT_LONG_PRESSED on content rows.
Cleaned up onClose teardown ordering and removed debug syslog markers.
2026-03-10 18:47:09 +00:00
Aaron 2fb50a5366 feat: file dispatch system, file-type icons, multi-instance notepad
- Add extension-based dispatch to driver.storage.filedispatch with typed
  union (variant record THandlerKind = hkMagic/hkExtension)
- Extract file-type icon constants and mapping to core.gfx.fileicons
- Add core.search utility (getFileExtension, fmtFileSize, sortStringArray)
- Generate PUA bitmap icon fonts (32/64/128px) from Font Awesome via
  gen_file_icons.py + compile_icons.sh toolchain
- Integrate file dispatch into file browser (double-click triggers dispatch)
- Register notepad as handler for text file extensions
- Fix init order in app.mgr (filedispatch.init before app inits)
- Refactor notepad from singleton to multi-instance (up to 8 windows)
  using instance array, findStateByWid, and LVGL user_data on msgboxes
2026-03-10 18:47:08 +00:00
263 changed files with 8902 additions and 25998 deletions

No files matched your search

+1 -4
View File
@@ -1,8 +1,6 @@
/lib/*.ppu
/lib/*.a
/lib/*.o
/lib/x86_64/
/bin/x86_64/
/release/*.svg
/release/*.iso
/bin/*.bin
@@ -17,9 +15,8 @@ localenv.json
dockerout.txt
AGENTS.md
lessons_learnt.md
/plan.md
*.log
wasuro
src/core/core.version.pas
site/*
!site/.gitkeep
!site/.gitkeep
+3 -3
View File
@@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get install -y \
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
python3 python3-pip python3-pil fp-compiler && \
python3 python3-pip python3-pil && \
apt-get clean my room
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
@@ -20,6 +20,6 @@ RUN curl -sL https://sourceforge.net/projects/freepascal/files/Linux/$FPC_VERSIO
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
RUN chmod +x /usr/bin/semver
WORKDIR /code
# Sources are mounted at runtime; the CMD below normalizes build scripts.
RUN find . -type f -print0 | xargs -0 dos2unix
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
+10 -10
View File
@@ -22,12 +22,12 @@ type
THeapPageHeader = memory.heap.THeapPageHeader;
procedure init;
function kalloc(size : SizeUInt) : void;
function klalloc(size : SizeUInt) : void;
procedure klfree(address : PtrUInt);
function kpalloc(address : PtrUInt) : void;
function kalloc(size : uint32) : void;
function klalloc(size : uint32) : void;
procedure klfree(address : uint32);
function kpalloc(address : uint32) : void;
procedure kfree(area : void);
function lmm_total_free : SizeUInt;
function lmm_total_free : uint32;
function lmm_page_count : uint32;
implementation
@@ -37,22 +37,22 @@ begin
memory.heap.init;
end;
function kalloc(size : SizeUInt) : void; inline;
function kalloc(size : uint32) : void; inline;
begin
kalloc := memory.heap.kalloc(size);
end;
function klalloc(size : SizeUInt) : void; inline;
function klalloc(size : uint32) : void; inline;
begin
klalloc := memory.heap.klalloc(size);
end;
procedure klfree(address : PtrUInt); inline;
procedure klfree(address : uint32); inline;
begin
memory.heap.klfree(address);
end;
function kpalloc(address : PtrUInt) : void; inline;
function kpalloc(address : uint32) : void; inline;
begin
kpalloc := memory.heap.kpalloc(address);
end;
@@ -62,7 +62,7 @@ begin
memory.heap.kfree(area);
end;
function lmm_total_free : SizeUInt; inline;
function lmm_total_free : uint32; inline;
begin
lmm_total_free := memory.heap.lmm_total_free;
end;
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -205,7 +205,7 @@ Key constants:
- `DATA_OFFSET = $10000` — data area starts at 64 KB into each page
- `LARGE_ALLOC_MAGIC = $FFFFFFFE` — sentinel for klalloc'd multi-page allocations
Interrupt safety: `pushfd; cli; pop saved_flags` (stack-balanced) + `arch.platform.cpu.unlock(saved_flags)`
Interrupt safety: `pushfd; cli; pop saved_flags` (stack-balanced) + `restore_if(saved_flags)`
inline procedure that only restores IF via `sti`, avoiding dangerous EFLAGS restoration
(IOPL, NT, VM, AC bits that caused Bad-TSS on IRET).
@@ -256,7 +256,7 @@ list, fixes Search_Page, calls `free_page_at_address`). Skips Root_Page.
| Bug | Root Cause | Fix |
|-----|-----------|-----|
| Bad TSS exception during network processing | `pushfd`/`popfd` across separate asm blocks: FPC doesn't track ESP changes in asm, causing EFLAGS corruption (NT=1, IOPL wrong) → Bad TSS on IRET | Stack-balanced `pushfd; cli; pop local_var` + `arch.platform.cpu.unlock()` that only does `sti` if IF was set |
| Bad TSS exception during network processing | `pushfd`/`popfd` across separate asm blocks: FPC doesn't track ESP changes in asm, causing EFLAGS corruption (NT=1, IOPL wrong) → Bad TSS on IRET | Stack-balanced `pushfd; cli; pop local_var` + `restore_if()` that only does `sti` if IF was set |
| GPF from SSE MOVAPS in doublebuffer flush | `SIZE_PREFIX=4`→8 gave 8-byte alignment; `MOVAPS` needs 16-byte. `klalloc` returned `page+8` (not 16-aligned) | `SIZE_PREFIX=16` (4B size + 12B pad), klalloc header expanded to 16 bytes |
| Pages never freed (historic) | `free_page` extracted wrong block index from PDE Address field | Fixed extraction to `Address SHR 10` — page freeing works for the first time |
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-4
View File
@@ -17,10 +17,6 @@ Central initialization manager for all baked-in terminal programs and kernel-lev
- `core.version`, `arch.x86.cpu`
- `app.diskcmd`, `driver.bus.usb.core`, `app.diskutil`, `app.notepad`, `app.partcmd`, `app.volcmd`
## Boot Registration
Registered with `boot.mgr` as `app.mgr` at the `late` barrier.
## Functions and Procedures
### init
-28
View File
@@ -1,28 +0,0 @@
# app.wasm
WebAssembly VM backend initialiser.
## Overview
This unit initialises the Wasuro WebAssembly virtual machine backend. It wires up the VM's character output to the syslog interface and calls the main `wasm_init` entry point.
## Boot Registration
Registered with `boot.mgr` as `app.wasm` at the `final` barrier.
## Dependencies
- `boot.mgr`
- `io.syslog`
- `wasm.vm.io`
- `wasm`
## Procedures
### init
```pascal
procedure init;
```
Sets the WASM VM's write-character callback to `io.syslog.logchar` and calls `wasm.wasm_init` to initialise the VM runtime.
-4
View File
@@ -13,10 +13,6 @@ This unit probes the processor using the CPUID instruction to discover the vendo
- `driver.timer.rtc`
- `io.stdio`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.cpu` at the `early` barrier.
## Types
### TCapabilities_Old / PCapabilities_Old
-4
View File
@@ -10,10 +10,6 @@ This unit defines the GDT data structures and provides procedures to set individ
- `io.syslog`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.gdt` at the `early` barrier.
## Types
### TGDT_Entry / PGDT_Entry
-4
View File
@@ -12,10 +12,6 @@ This unit defines the 256-entry IDT used by the x86 interrupt system. It provide
- `arch.x86.util`
- `io.syslog`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.idt`, depending on `arch.x86.gdt`.
## Constants
### ISR_RING_0
-4
View File
@@ -12,10 +12,6 @@ This unit reinitialises and remaps the two 8259A Programmable Interrupt Controll
- `arch.x86.util`
- `io.syslog`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.irq`, depending on `arch.x86.idt`.
## Functions and Procedures
### init
-4
View File
@@ -6,10 +6,6 @@ ISR driver initialisation stub.
This is a minimal stub unit that satisfies compile-time dependencies on an ISR initialisation entry point. The `init` procedure body is empty; actual ISR handler registration and IDT gate setup are performed by `arch.x86.isr.mgr` and the individual handler units in the `isr/` and `fault/` subdirectories.
## Boot Registration
Registered with `boot.mgr` as `asuro.x86.isr`, depending on glob `driver.storage.*.mgr` (waits for all matching entries).
## Functions and Procedures
### init
-4
View File
@@ -12,10 +12,6 @@ This unit acts as the glue layer between the x86 interrupt subsystem and the arc
- `arch.x86.util` (implementation)
- `arch.x86.isr.types` (implementation)
## Boot Registration
Registered with `boot.mgr` as `arch.x86.panic`, depending on glob `driver.video*` (waits for all matching entries).
## Functions and Procedures
### init
-4
View File
@@ -22,10 +22,6 @@ A minimal TSS is installed in GDT gate 5 so the CPU can locate the ring-0 stack
- `arch.x86.idt`
- `arch.x86.isr.types`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.v86` at the `early` barrier.
## Constants
| Constant | Value | Description |
-4
View File
@@ -28,10 +28,6 @@ This unit is the single entry point for registering all x86 CPU exception handle
- `arch.x86.fault.snpe`
- `arch.x86.fault.uie`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.fault`, depending on `arch.x86.isr.mgr`.
## Functions and Procedures
### init
-4
View File
@@ -18,10 +18,6 @@ Each ISR stub is declared with the Free Pascal `interrupt` directive, which caus
- `io.syslog` (implementation)
- `arch.x86.isr.ioapic` (implementation)
## Boot Registration
Registered with `boot.mgr` as `arch.x86.isr.mgr`, depending on `arch.x86.irq`.
## Constants
`MAX_HOOKS` is imported from `arch.x86.isr.types` and defines the maximum number of callbacks per vector.
@@ -16,10 +16,6 @@ During initialisation, the Multiboot memory map is walked to populate `PhysPrese
- `core.util`
- `arch.x86.util`
## Boot Registration
Registered with `boot.mgr` as `arch.x86.memory.physical`, depending on `arch.x86.idt`.
## Constants
| Constant | Value | Description |
@@ -17,10 +17,6 @@ During `init`, the current page directory loaded by the bootloader is adopted as
- `debug.tracer`
- `memory.heap` (implementation)
## Boot Registration
Registered with `boot.mgr` as `arch.x86.memory.virtual`, depending on `arch.x86.memory.physical`.
## Types
### TPageDirEntry / PPageDirEntry
Loaded 20 of 263 files, more files were not shown because too many files have changed in this diff. Show more