A faster processor should give a game more room to work, not change the rules of its world. As Dystopian Pixel grows from individual experiments into a family of cooperating drivers, CPU speed needs to become an explicit part of the agreement between the game and its services.
Four speeds, one game
The native Spectrum Next environment offers nominal CPU settings of 3.5, 7, 14 and 28 MHz. These are selected in NextBASIC using RUN AT with values 0, 1, 2 and 3 respectively. The parameter is a mode number, not a frequency: RUN AT 3 selects 28 MHz. Moving from 3.5 to 28 MHz gives eight times the nominal clock frequency, but that is not a promise that an entire game will run eight times faster.
Memory access, instruction costs, interrupts, display activity and time spent waiting for other devices all affect useful throughput. A loop that spends most of its time waiting for a frame boundary gains little visible speed from a faster CPU. A routine that has too much work to finish before that boundary may gain something far more useful: the ability to finish on time.
For a developer, this makes CPU speed a capacity decision. How many collisions, tile updates and sound-service tasks can fit into the available time? It should not be an accidental difficulty setting that changes how quickly a player walks or how long a countdown lasts.
Processing capacity is not game time
Consider a game that moves its player one step whenever a BASIC loop completes. Accelerating the CPU shortens the loop, so the character moves more often. Enemies may become faster, animations flicker and timers expire sooner. The programme is tying fictional time to the rate at which instructions happen to execute.
A timed design separates those ideas. Movement is defined against an intentional timebase; the CPU calculates the result and prepares the next display. Additional capacity can support more objects, better collision handling or extra visual effects without making the player sprint. If a deadline is missed, the game needs a deliberate recovery policy rather than silently redefining time.
This does not mean an overloaded game can always maintain perfect motion. It means overload should be observable. Reducing decorative work, limiting a supported configuration or refusing an unsupported mode can be more honest than letting an apparently valid setup behave unpredictably.
CPU MHz and video Hz answer different questions
CPU speed describes the rate of processor clock cycles. A nominal 50 Hz display presents roughly fifty frames each second; a nominal 60 Hz display presents roughly sixty. The corresponding frame intervals are about 20 ms and 16.67 ms. Raising the CPU setting does not itself select a different video refresh mode.
A game moving two pixels every frame covers 100 pixels per second at an exact 50 Hz and 120 at an exact 60 Hz. That difference remains even if both machines use the same CPU setting. Frame synchronisation prevents some presentation problems, but it does not automatically normalise gameplay across refresh rates. A fixed simulation clock or a fractional accumulator can help preserve a chosen movement rate.
The word nominal matters. Output mode, machine timing and core behaviour can affect the precise refresh frequency. Cycle-sensitive code must use the relevant specifications and measurements rather than treating every display configuration as an exact laboratory clock. A driver should know which timing assumptions its implementation supports.
One owner for a global setting
Our architectural principle is explicit: NextBASIC owns CPU-speed configuration. Drivers detect the operating environment, adapt where appropriate and report performance limitations, but never silently change global CPU settings.
A resident driver shares the processor with the game and every other installed driver. If scrolling raises the speed during installation, audio lowers it during cleanup and another service assumes the initial setting never changes, the result depends on installation order. Saving and restoring a private copy is not sufficient: that saved value may be stale by the time the driver restores it.
The game can make the decision with the full picture. Its NextBASIC startup code can choose a documented operating mode before enabling services. It can also decide whether a reduced-effects mode is acceptable. A driver may explain that it needs a different configuration; it must not make that global decision behind the caller’s back. This principle applies during initialisation, normal operation, errors and shutdown.
Detect conditions, then make limitations useful
The CPU-speed register distinguishes the programmed speed from the current actual speed. Recording both helps avoid the assumption that a requested mode is always the mode in effect. A useful diagnostic also records the core and NextZXOS versions, video configuration, driver build and workload. A clock reading alone is not a benchmark.
For the shared standard, each driver should document its supported conditions and how a caller can recognise a limitation. Possible future reporting includes an unsupported configuration, a missed processing deadline or a request for a lower workload. These are design requirements, not newly published API names or numeric error codes.
Adaptation must respect ownership. A presentation service could eventually reduce decorative density under an approved profile. A movement service must not silently alter collision rules, and an audio service must not disguise overload by changing the music’s tempo. Where no acceptable fallback exists, a clear refusal or report is preferable to damaged state.
Different drivers need different budgets
scrollingControl must prepare world and camera presentation work at the right time. Tile-boundary crossings can cost more than an ordinary pixel step. playerControl needs predictable movement and collision behaviour; shipControl’s planned movement and combat work may vary with active entities. Their budgets cannot be inferred from an empty demonstration scene.
audioControl has recurring playback work whose deadlines should be protected. speechControl also interacts with an external service, so faster local execution does not remove transport or service latency. particleControl and uiControl are natural candidates for optional presentation budgets, but neither should change authoritative scores, lives or game rules when resources become tight.
These are reasons for a shared policy, not identical internals. A platformer combining camera movement, player motion, audio, particles and a HUD should have one coherent startup decision. Each service still needs its own documented limits. Passing an isolated test is not proof that all those services meet their deadlines together.
Compatibility is a recorded configuration
KS1, KS2 and KS3 are important hardware targets, but a generation label alone is not a complete compatibility test. Record the board, installed native Next core, operating-system version, display mode and expansion configuration. Use the correct supported update for that board rather than assuming a core image is interchangeable merely because it belongs to the same generation of development.
The core documentation contains version-specific timing history, including wait-state behaviour at 28 MHz. That makes it reasonable to investigate timing after an update, but it does not establish that any particular visual fault was caused by a core change. Likewise, a successful test on an updated KS1 does not certify KS2 or KS3 hardware.
Our compatibility ambition is to support clearly stated configurations across the generations. Actual claims must name the hardware and builds exercised. Native Next facilities discussed here also should not be assumed to exist when an unrelated alternative core is running.
Performance profiles without hidden compromises
Future profiles could give a game a documented starting point: a full-effects configuration, a lighter presentation configuration or a diagnostic configuration. Such profiles could bound particle counts, animation work or optional scenery updates while preserving the same gameplay timebase. Their names, thresholds and interfaces still need design and testing.
The important distinction is between a profile the game chooses and an invisible driver decision. A developer must know what changes, what remains guaranteed and what happens if the requested workload cannot be supported. A profile is only useful when its limits are measurable and repeatable.
This policy is agreed architecture. It is not an announcement that all seven drivers already perform automatic detection, share a reporting API or support every CPU/video combination. The scrollingControl work has produced hardware-tested scrolling milestones at 50 and 60 Hz; those results cover the tested build and setup, not the entire future ecosystem.
A standard that earns its claims
The practical next step is to make operating conditions part of each test record and bring drivers into the policy in stages. Test the worst credible workload, combine services, exercise failures and shutdown, and check that none of those paths changes the selected global CPU mode. The published requirements should emerge from that evidence.
The discovery that prompted this change has its own scrollingControl Development Story. The broader lesson is about dependable cooperation: a game chooses its operating environment, drivers explain what they can deliver within it, and extra CPU capacity buys headroom rather than accidental changes to the game itself.
Technical references
Spectrum Next User Manual: CPU speed selection; NextBASIC register access; CPU Speed Register; 50/60 Hz selection; Refresh-rate qualifications. Documentation checked 6 November 2026. These references describe platform facilities; the shared Dystopian Pixel policy above is our design decision.


