implements PR-025

This commit is contained in:
bQUARKz 2026-03-22 23:52:42 +00:00
parent fab5ed2c46
commit 67e7acf73b
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8
3 changed files with 15 additions and 6 deletions

View File

@ -91,6 +91,8 @@ Current high-level flow:
If VM initialization fails, firmware transitions to the crash path. If VM initialization fails, firmware transitions to the crash path.
POS selects the cartridge and its execution context, but the cartridge's initial callable is not chosen by firmware metadata. Execution starts from the cartridge boot protocol defined in [`13-cartridge.md`](13-cartridge.md), currently `func_id = 0`.
## 7 Firmware States ## 7 Firmware States
The current firmware state model includes: The current firmware state model includes:

View File

@ -28,8 +28,7 @@ The runtime currently expects the following manifest fields:
"app_id": 1234, "app_id": 1234,
"title": "My Game", "title": "My Game",
"app_version": "1.0.0", "app_version": "1.0.0",
"app_mode": "Game", "app_mode": "Game"
"entrypoint": "main"
} }
``` ```
@ -47,7 +46,6 @@ Current required manifest fields:
- `title` - `title`
- `app_version` - `app_version`
- `app_mode` - `app_mode`
- `entrypoint`
Current required file payloads: Current required file payloads:
@ -70,14 +68,22 @@ The current loader validates:
If validation fails, cartridge loading is rejected before execution. If validation fails, cartridge loading is rejected before execution.
## 5 App Mode and Entrypoint ## 5 App Mode and Boot Protocol
`app_mode` controls firmware launch behavior: `app_mode` controls firmware launch behavior:
- `Game` - `Game`
- `System` - `System`
`entrypoint` is passed to the VM initialization flow and may be resolved as a symbol or function identifier according to the VM/runtime contract. Cartridge boot is protocol-driven, not manifest-driven.
The executable entrypoint of a valid cartridge is always `func_id = 0`.
This means:
- `manifest.json` does not select the callable to execute;
- firmware/runtime loads the cartridge and starts execution from `func_id = 0`;
- nominal exports may exist for linking or introspection, but they do not hold boot authority.
## 6 Assets and Preload ## 6 Assets and Preload

View File

@ -33,7 +33,8 @@ When the boot target is `Cartridge`:
1. firmware loads the requested cartridge; 1. firmware loads the requested cartridge;
2. cartridge metadata is read; 2. cartridge metadata is read;
3. launch behavior follows cartridge `app_mode`. 3. launch behavior follows cartridge `app_mode`;
4. bytecode execution starts through the cartridge boot protocol defined by the cartridge contract, not by textual entry metadata.
## 3 Launch Resolution by App Mode ## 3 Launch Resolution by App Mode