Co-authored-by: Nilton Constantino <nilton.constantino@visma.com> Reviewed-on: #6
1.9 KiB
1.9 KiB
Boot Profiles
Version: 1.0 Status: Proposal
1. Objective
Define how Prometeu decides what to execute at startup:
- Hub
- Automatic cartridge
- Debug mode
2. BootTarget Concept
At the beginning of boot, the POS resolves a target:
enum BootTarget {
Hub,
Cartridge { path: String, debug: bool },
}
3. General Rules
If BootTarget == Hub
- Firmware enters
HubHome - No cartridge is automatically loaded
If BootTarget == Cartridge
- Load cartridge
- Read
app_modein the manifest - Apply rules:
-
Game:- Enter
RunningGame
- Enter
-
System:- Stay in
HubHome - Open the app as a window/system tool
- Stay in
4. Host CLI
Default boot
prometeu
Result: enters the Hub
Run cartridge
prometeu run <cartridge>
Result:
- Game → enters directly into the game
- System → opens as a tool in the Hub
Run with debugger
prometeu debug <cartridge>
Result:
- Same flow as
run - Runtime starts in debug mode
- Waits for connection from the Java Debugger
5. Firmware States
Firmware maintains only:
BootHubHomeRunningGameAppCrashed
System apps never change the firmware state.
6. Behavior on Real Hardware (future)
-
If miniSD/physical cartridge is present at boot:
-
POS can:
- always go to the Hub, or
- auto-execute according to user configuration
-
7. Integration with Debugger
When debug == true:
-
Runtime:
- Initializes
- Opens DevTools socket
- Waits for
startcommand
-
Only after that does it start cartridge execution
8. Stability
- BootTarget is an internal POS contract
- Host CLI must respect these rules
- New boot modes must be compatible extensions