Add hidden title debug mode and pace menu polls

This commit is contained in:
gamer147
2026-07-20 23:38:19 -04:00
parent b8cf21245a
commit 0dfba316f1
10 changed files with 67 additions and 11 deletions

View File

@@ -50,4 +50,23 @@ public class ExitRequestTests
Assert.False(vm.Globals.ContainsKey(0x7001));
Assert.False(vm.Globals.ContainsKey(0x7002));
}
[Fact]
public void DebugIgnoreExitRequestFallsThroughToFollowingBytecode()
{
var table = OpcodeTableJson.Load(Paths.OpcodesJson);
var script = ScriptAssembler.Assemble(table, "TITLE.BIN", new List<(int, Operand[])>
{
(0x1, Array.Empty<Operand>()),
(0x55, new[] { G(0x7000), I(1) }),
(0x2, Array.Empty<Operand>()),
}, Array.Empty<string>());
var vm = new VirtualMachine(script, table, new RecordingHost(),
new VmOptions(IgnoreExitRequests: true));
vm.Run();
Assert.Equal("exit", vm.HaltReason);
Assert.Equal(1, vm.Globals[0x7000]);
}
}