fix(headless): wait for memcard bootstrap IO progress
Intrepid/Prometeu/Runtime/pipeline/head There was a failure building this commit
Intrepid/Prometeu/Runtime/pipeline/head There was a failure building this commit
Coordinate bounded native publication progress during frame advance while preserving watchdogs, guest budgets and resource ownership. Add controlled and packaged reopen regressions, clarify the runtime specs, and retain qualification evidence.
This commit is contained in:
@@ -11,6 +11,7 @@ use std::collections::BTreeMap;
|
||||
pub enum MemcardFixture {
|
||||
Write,
|
||||
Read,
|
||||
ReadWithPresentation,
|
||||
Dirty,
|
||||
}
|
||||
#[derive(Default)]
|
||||
@@ -47,12 +48,14 @@ impl Code {
|
||||
/// 104 MEMORY_ONLY, 201 exact existing readback, 301 dirty/uncommitted RAM.
|
||||
/// Read never writes or submits a commit; a missing/wrong payload traps.
|
||||
pub fn memcard_program(kind: MemcardFixture) -> Vec<u8> {
|
||||
let reads = matches!(kind, MemcardFixture::Read | MemcardFixture::ReadWithPresentation);
|
||||
let mut main = Code::default();
|
||||
main.emit("HOSTCALL 0");
|
||||
main.check(0, true);
|
||||
main.emit("PUSH_I64 4\nARRAY_NEW 9\nSET_GLOBAL 1");
|
||||
if matches!(kind, MemcardFixture::Read) {
|
||||
main.emit("GET_GLOBAL 0\nPUSH_I32 0\nPUSH_I32 0\nGET_GLOBAL 1\nPUSH_I32 0\nPUSH_I32 4\nHOSTCALL 1");
|
||||
if reads {
|
||||
let read_import = if matches!(kind, MemcardFixture::Read) { 1 } else { 2 };
|
||||
main.emit(&format!("GET_GLOBAL 0\nPUSH_I32 0\nPUSH_I32 0\nGET_GLOBAL 1\nPUSH_I32 0\nPUSH_I32 4\nHOSTCALL {read_import}"));
|
||||
main.check(4, false);
|
||||
main.check(0, false);
|
||||
for (i, value) in [0, 127, 128, 255].into_iter().enumerate() {
|
||||
@@ -101,7 +104,9 @@ pub fn memcard_program(kind: MemcardFixture) -> Vec<u8> {
|
||||
imports.push(("presentation", 8, 1));
|
||||
}
|
||||
match kind {
|
||||
MemcardFixture::Read => imports.push(("slot_read", 6, 2)),
|
||||
MemcardFixture::Read | MemcardFixture::ReadWithPresentation => {
|
||||
imports.push(("slot_read", 6, 2));
|
||||
}
|
||||
MemcardFixture::Dirty => imports.push(("slot_write", 6, 2)),
|
||||
MemcardFixture::Write => {
|
||||
imports.extend([("slot_write", 6, 2), ("slot_commit", 2, 2), ("query", 2, 3)])
|
||||
|
||||
Reference in New Issue
Block a user