Repository navigation
Foundation: 最低限のシェル(PCG 表示) - #11
Merged
Merged
Conversation
Implements the parts of doc/spec_Foundation_shell.md that run on the phase 1 kernel without IPC, fs or proc_spawn: lexing and syntax (§3, §4), variables (§5.1), the interactive line editor with history (§9.2), messages (§11.1) and the built-ins CLS, ECHO, SET, VER, MEM, PS, HELP, EXIT and bare CD. fs-dependent features report FND_E_UNSUPPORTED. - libfnd subset (api.h, fnd.h, lib/fnd): startup roles, fnd_write, console calls, fnd_strerror. Until the console service exists, the console (lib/fnd/con_pcg.c, PCG mode 1 80x30 and PeC keyboard) is linked into the shell. - Kernel: MMIO grants for fnd_proc_spawn_wax (§9.2, §10.3) and sys_info sel 0 and 1. - foundation/boot: boot image that spawns the shell in slot 4 with the console grants and restarts it after EXIT. - llvm-src32 --protected: fill alignment gaps between same-permission blocks so programs with many globals stay within 7 WAX blocks. - src32_testbench: --type FRAME=TEXT injects keys, --dump-pcg prints the visible PCG text screen; foundation/tests/shell compares whole screens. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GUREaMPoYP4UaYgUKAhsJo
Owner
Author
|
This branch has conflicts that must be resolved |
…-szl0vk # Conflicts: # MEMORY.md
Owner
Author
|
CI の この PR が原因ではないと判断しています。
この競合はまだ修正されていません。 Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by src3453 · project thread
概要
シェル仕様 のうち、フェーズ1カーネル(IPC・fs・proc_spawn なし)で動く部分を実装し、PCG に表示します。
foundation/shell/shell.c(PROTECTED WAX v2、スロット 4、APP): 字句・構文(§3, §4。構文エラーの行は何も実行しない)、変数(§5.1)、行編集(§9.2。←→/Home/End/BS/Del/16 行履歴/Ctrl+C)、エラーメッセージ(§11.1)、組み込みCLSECHOSETVERMEMPSHELPEXIT、引数なしのCD。DIRTYPE等、CD path)はFND_E_UNSUPPORTED、外部コマンドはcommand not found。api.h、fnd.h、lib/fnd/): 起動・役割・fnd_write・コンソール関数・fnd_strerror。lib/fnd/con_pcg.c(PCG mode 1 の 80×30 表示と PeC キーボード)をシェルにリンクし、起動イメージfoundation/bootが VDP・PCG テキスト面・PeC 入力の MMIO を付与します。仕様上シェルは caps=0・MMIO なしなので、console サービスができたら置き換える前提です(README の「シェル」節に一覧)。fnd_proc_spawn_waxに MMIO 付与の引数を追加(§9.2 grants、§10.3 の窓。VRAM/PCMRAM の重複はFND_E_BUSY)、sys_infosel 0/1 を実装。--protectedが整列の隙間で WAX ブロックを分割し、グローバルが多いと 7 ブロック制限に当たっていたのを修正(回帰テスト追加)。src32_testbenchに--type FRAME=TEXT(キー注入)と--dump-pcg(画面ダンプ)を追加。テスト
python -m unittest discover -s foundation/tests/shell -v: キー入力を送り PCG 画面全体を比較するシナリオ 8 件。-O0/-O1/-O2、release/debug testbench で通過。CI の toolchain ジョブに追加。test_toolchain.py -k "protected or foundation"、pytest tools/waxが通過。config.yamlのpcg.fontが必要。Generated by Claude Code