So I've been speedrunning for a few years now and gained a reputation for running Spectrum games (even though I run lots of other games too, it's just that not many other people do Spectrum games); I decided to get into tool-assisted runs of the games I'm more familiar with, as there aren't many of those for the Spectrum either (especially when it comes to the more classic games) and submitted a couple of movies already. But I have a query which affects future submissions of mine...
The Spectrum, like many microcomputers of the era, boots into a BASIC prompt. This allows the user to enter programs and modify memory with simple commands, as normal and expected usage of the computer. On a few occasions, developers have issued patches to their games in the form of programs you type in and run before loading the game, and it would seem silly to not allow it for these cases. On the other hand, this also means you can write your own patches to do literally anything, and completely trivialise any game by removing all enemies, starting in the end room, or just overwriting the code with an entirely new game, and this would obviously not be in the spirit of the game - they're effectively the same as Game Genie codes, which are typically banned.
The grey area comes with manipulating memory before loading a game. The aforementioned patches typically work by writing a custom loader, which then ignores the original game's loader and runs its own instructions after loading the game data. If the original game's loader is used, and isn't modified in any way, it's not possible to patch the game as the game data will overwrite data currently in memory. However, it's rare for game data to load and fill the entire RAM, and usually certain areas of memory are deliberately left untouched; especially system variables.
Many games use the FRAMES variable (3 bytes at 0x5C78), which counts the number of frames since the computer was turned on, to seed the random number generator. This variable can be set by the user manually before loading the game to manipulate RNG; this doesn't require a special loader and doesn't change any of the game data - should this be allowed?
Some games use built-in system routines and fail to set system variables before using them (e.g. using the BASIC keyboard interpreter without setting auto-repeat times); these could easily be changed before loading the game to modify behaviour without modifying the game itself. Should this be allowed?
Some games read general memory not loaded or initialised by the game itself; it could easily be the case that, in normal and expected usage of the system, this memory just happens to be set to something beneficial to the run. Should this be allowed?
We discussed this a couple of years ago with regards to RTA speedrunning in the Speedtrum Specrunning Discord, and came to the conclusion that as long as the game is loaded from the very start, using the standard LOAD "" in regular Spectrum BASIC, the built-in Tape Loader (for 128K machines and later), or using a type-in program provided by the developer themselves, any prior activity is allowed, including any arbitrary setting of system variables. However, all custom loaders (save for the aforementioned developer provided ones) are prohibited, as is interrupting the loading process to modify memory during or after loading.
There are a couple of justifications for this:
1. RNG manipulation can make or break some runs, and runners playing on real hardware are already at a massive disadvantage when it comes to waiting four minutes for the game to load between attempts - imagine if they had to load the game dozens of times just to get the right seed! Allowing the FRAMES variable to be set reduces this discrepancy significantly. (There are still issues with getting the right seed due to tape loading times, and we don't recommend loading from tape as a result, but still...)
2. Other memory addresses not being initialised correctly is an existing bug in the game; no bug or glitch is being introduced or added, merely exploited, and exploiting bugs is a natural part of speedrunning.
Obviously 1 is not a consideration for a TAS; but even so I lean towards allowing this as it massively lowers the discrepancy between minimising actual gameplay time and minimising the TAS frame count. (What if waiting 20 minutes before loading the game means you can complete it a few seconds faster? An extreme example for sure, but possible.)
I haven't tagged this as [ZXS] as this can also apply to C64 games, as well as CPC in the future.
TL;DR: do I have to load a game with LOAD "" or can I load it with POKE 23673,42: LOAD "" ?