// The chunk5 scenery interpreter (SceneryInterpreterStep and its // opcode handlers), running over the RAM image with the stream cursor // at $8B/$8C exactly as the 6502 code does. #ifndef SCENERY_VM_H #define SCENERY_VM_H #include #include // Bind the vertex pipeline to fs2Ram. Call once at start-up. void sceneryInit(void); // ProcessScenery (L6006): latch the per-frame lookup gates and run the // stream at $8B. void sceneryProcessScenery(void); // SceneryInterpreterEntry: clear the clip flags and run the stream. void sceneryInterpreterEntry(void); // SceneryInterpreterStep: run the stream at $8B until it ends or an // opcode returns ($19, or $0E on 48K). void sceneryInterpreterStep(void); // FlipPagesFillViewport turns EmitClippedLine's `jsr DrawColorLine` // into a harmless ORA while it projects the horizon polygon. void scenerySetEmitLineEnabled(bool enabled); // SceneryOpAdvanceAndContinue: advance $8B by `n`; the following // SceneryInterpreterEntry clears the clip flags. void sceneryAdvance(uint8_t n); #endif