< [Back](chapter-10.md) | [Summary](table-of-contents.md) | [Next](chapter-12.md) > # 🌍 **Portability Guarantees and Cross-Platform Execution** ## 1. Overview PROMETEU was designed from the beginning to be **portable by construction**, not by later adaptation. A PROMETEU cartridge: - executes the same way on any supported platform - produces the same results for the same inputs - maintains predictable technical behavior > PROMETEU does not depend on the platform. > The platform depends on PROMETEU. > This chapter defines the system's **portability contract**. --- ## 2. Fundamental Principle of Portability Portability in PROMETEU is based on a simple rule: > Only the PROMETEU VM defines the program's behavior. > This means: - source languages do not matter after compilation - real hardware does not influence logic - the operating system does not change semantics Everything that does not belong to the VM is **adaptation**, not execution. --- ## 3. Separation of Responsibilities PROMETEU strictly separates three layers: ``` +----------------------------+ | CARTRIDGE | | (bytecode + assets) | +-------------+--------------+ | +-------------v--------------+ | PROMETEU VM | | (logic, time, memory) | +-------------+--------------+ | +-------------v--------------+ | PLATFORM LAYER | | window, audio, input, FS | +----------------------------+ ``` ### What the VM controls - bytecode execution - logical time (frames, cycles) - memory (stack, heap) - determinism - costs and metrics ### What the platform provides - pixel display - audio output - physical input collection - access to the sandbox file system The platform **never decides behavior**. --- ## 4. Determinism as the Basis of Portability PROMETEU guarantees determinism through: - fixed logical clock (60 Hz) - abstract cycles, not real time - input sampled per frame - absence of implicit concurrency - absence of system-dependent operations This allows stating: > “If the cartridge is the same, the game is the same.” > --- ## 5. Independence from Real Hardware PROMETEU **does not use**: - operating system timers - high-resolution clocks - CPU-specific instructions - uncontrolled graphics acceleration All performance is measured in **PROMETEU cycles**, not in milliseconds. The real hardware: - only executes the VM - never interferes with semantics --- ## 6. Floating Point Precision To guarantee numerical consistency: - PROMETEU defines explicit mathematical operations - avoids dependence on specific FPUs - standardizes `number` behavior This avoids: - divergences between architectures - unpredictable cumulative errors - subtle differences between platforms --- ## 7. Cross-Platform Input PROMETEU abstracts physical input into **logical state**. - keyboard, gamepad, and touch are mapped externally - the cartridge only sees logical buttons and axes - the reading moment is fixed per frame The same cartridge: - reacts the same way on PC, mobile, or console - does not contain device-dependent logic --- ## 8. Cross-Platform Audio The audio system: - defines channels and mixing logically - uses native APIs only as output - maintains per-frame synchronization Hardware differences: - do not change logical timing - do not change sound sequence - do not affect certification --- ## 9. Cross-Platform Graphics The graphics system: - operates on a logical framebuffer - uses an indexed palette - does not depend on a specific GPU The platform layer: - only displays the framebuffer - does not reinterpret graphics commands PROMETEU **does not delegate graphics decisions to the hardware**. --- ## 10. File System and Persistence PROMETEU defines a **sandbox logical filesystem**: - virtual paths - size limits - deterministic behavior The platform maps this filesystem to: - disk - mobile storage - persistent memory Without changing semantics. --- ## 11. Certification and Portability The **PROMETEU Certification** is valid for all platforms. If a cartridge: - passes on one platform - with the same inputs It: - will pass on all - will produce the same reports This is possible because: > the certification validates the VM, not the environment. > --- ## 12. What PROMETEU DOES NOT guarantee PROMETEU **does not promise**: - identical absolute performance (real FPS) - identical physical latency - equivalent energy consumption PROMETEU promises: - **identical logical behavior** - **reproducible technical decisions** --- ## 13. Pedagogical Implications This model allows teaching: - the difference between logic and presentation - why modern engines break determinism - how to isolate systems - how to design portable software The student learns: > portability is not luck — it is architecture. > --- ## 14. Summary - PROMETEU defines behavior in the VM - platforms only execute - time is logical, not physical - input, audio, and graphics are abstracted - certification is universal - portability is guaranteed by design < [Back](chapter-10.md) | [Summary](table-of-contents.md) | [Next](chapter-12.md) >