diff options
| author | user <user@clank> | 2026-07-16 11:42:38 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-16 11:42:38 +0200 |
| commit | 057e5377af2d086917b9cd0ffb336231d7d098cb (patch) | |
| tree | fd814d32d88a0eede32a69f45b729310b182e13a /Makefile | |
| parent | jobs: background execution (&), non-blocking reap, spin demo (diff) | |
| download | gbos-057e5377af2d086917b9cd0ffb336231d7d098cb.tar.gz gbos-057e5377af2d086917b9cd0ffb336231d7d098cb.tar.xz gbos-057e5377af2d086917b9cd0ffb336231d7d098cb.zip | |
fs rewrite stage 1: persistent block device (bounce buffer, cart SRAM)
- blk.asm: read_block/write_block move 256-byte blocks between battery-backed
cart-RAM banks (8-11, the 'disk') and a WRAM bounce buffer. Banking is hidden
in those two routines; they inline the 'restore my bank' step so they never
touch the stack while the disk bank is mapped over the process's $A000 window
(the stack lives there too -- a call/ret would rug-pull it).
- format-on-first-boot: superblock magic in block 0; otherwise the disk persists.
- cart RAM bumped to 128 KiB (-r 4); process banks 0-7, disk banks 8-11.
- debug tool 'blk fill/peek' + syscalls to validate round-trip and persistence.
- verified: round-trip incl. cross-bank (block 100 -> bank 11); block survives a
reboot via .sav; magic intact (no reformat on 2nd boot).
- old WRAM 8-slot FS still backs the tools until stages 2-3.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8,7 +8,7 @@ OBJS := $(patsubst src/%.asm,$(BUILD)/%.o,$(SRCS)) ASFLAGS := -I include -Wall # MBC5 + RAM + battery; -r 3 = 32 KiB cart RAM (bump for more task banks) -FIXFLAGS := -v -m MBC5+RAM+BATTERY -r 3 -p 0xFF -t GBOS +FIXFLAGS := -v -m MBC5+RAM+BATTERY -r 4 -p 0xFF -t GBOS .PHONY: all clean run @@ -20,7 +20,7 @@ $(BUILD)/%.o: src/%.asm | $(BUILD) # C programs: compiled with SDCC into ROM-bank blobs and INCBIN'd by programs.asm CBLOBS := c/chello.bin c/echo.bin c/true.bin c/false.bin c/uname.bin \ c/pid.bin c/cat.bin c/wc.bin c/head.bin c/args.bin \ - c/ls.bin c/save.bin c/rm.bin c/sh.bin c/ps.bin c/kill.bin c/spin.bin + c/ls.bin c/save.bin c/rm.bin c/sh.bin c/ps.bin c/kill.bin c/spin.bin c/blk.bin $(BUILD)/programs.o: $(CBLOBS) # C programs also depend on the shared libc sources |
