Cheat mode
Stormbringer has a cheat / debug mode built in. Address 23728 is the cheat-mode-enabled flag, and if this is set (i.e. contains any non-zero value) then cheat mode becomes available:
POKE 23728,255
When cheat mode is enabled, pressing DOWN while controlling Magic Knight will result in a prompt sound being played, and the border turning red. After this, it is possible to change Magic Knight's current room. Pressing LEFT or RIGHT decreases or increases, respectively, Magic Knight's current room index by one. Pressing UP or DOWN increases or decreases, respectively, Magic Knight's current room index by eight. After Magic Knight's current room index is changed, the new room is drawn. Pressing FIRE causes a return to the game.
LOCATE command
Although the 128k version of Stormbringer includes the LOCATE command, the 48k version does not. Despite this, there remain some data and instructions in the 48k version that appear to be related to the LOCATE command. Much of the code is similar to that related to the LOCATE command in Spellbound:
Leftover debug code, part 1
The routine at 37689 displays and handles the input device selection menu, and the instructions from 37722 onward are executed when the currently selected input device is changed. The instructions between 37723 and 37742 seem to be set up to highlight the control device that was previously selected whenever a new one is chosen. The previously selected menu item is highlighted via a change in attribute for a character cell to the left of that item in the menu. The attribute used is 71 (white INK, black PAPER, BRIGHT), so the change will normally not be visible since there is nothing drawn in the cell in question and its PAPER is already black. Changing the value at 37741 to a different value can make the highlighting visible.
Leftover debug code, part 2
The flag at 23461 determines whether or not only the top two character cells in 2 × 2 blocks are drawn. This flag is never modified anywhere in the game code, and so presumably exists only for debugging or development purposes. In order for the 2 × 1 drawing mode to function correctly (i.e. to move to the top-left cell of the next block to the right), an otherwise redundant instruction at 41322 advances the bitmap virtual text cursor right by one character. When the draw-2-×-1-blocks flag is reset, this advancing to the top-left cell of the next block to the left occurs at 41423 and 41426.
Password number
Whenever a new game is started, the routine at 38024 is jumped to. This routine initialises data for the new game, including the password number which is required to activate the teleport from the castle to the spaceship. One of Magic Knight's tasks is to encode this number to a series of bits and pull those main levers that correspond to the number's set bits. Two of the levers, representing bits 5 (59798) and 6 (59772) of the number, lie beyond the security door (59841). The code that generates the number (38024 - 38034 inclusive) is set up to ensure that at least one of bits 5 and 6 is set, thereby forcing Magic Knight to have to deal with the security door.
Redundant instructions / code
There are many instances of redundant code, or redundant instructions in several texts. Some examples are:
Commanding a character makes him or her happier
When Magic Knight uses the Wand of Command to command a character, that character's happiness is increased by two points (see 43092-43094). This is the opposite effect to that in Knight Tyme, where characters' happiness is decreased when Magic Knight commands them. It is possible that this is intended behaviour, however it diminishes the effect of the lower limit on happiness before a character will obey Magic Knight, as he can repeatedly command an unhappy and unwilling character until that character's happiness is raised above the threshold for compliance.
Drawing Off-White Knight
The instructions between 39904 - 39907 inclusive (part of the character drawing routine at 39883) are executed only if the character being drawn has a graphic index of zero, i.e. the character should not be drawn. For any other character, these instructions skip over the block of code that draws the character to screen. Off-White, however, is drawn even if his graphic index has been set to zero, in which case, he would appear as a jumbled bitmap:
The purpose of this check is not clear as Off-White's graphic index cannot be set to zero by any means other than a POKE.
Unreadable sword
Certain objects in the game are not readable unless Magic Knight is holding the Crystal Ball. If he attempts to read one of these objects without the Crystal Ball, a message is shown stating that there is writing present in a magic language that cannot be read. The instructions between 43541 - 43590 check whether the object being read is one of these objects, and if so allow Magic Knight to read the language if he is also carrying the Crystal Ball. The instructions between 43568 - 43572 deal with the Sword, however the index of the text revealed is 3, corresponding to the original unreadable text message! One of the two unused texts, which is located at 53294, seems a likely, if silly, candidate for the true text on the sword. Perhaps this was ultimately rejected because it is a little too silly.
Unreadable teddy bear
When the Teddy Bear is read, the text shown is "TNORF OT KCAB" (52964). Given that some objects have texts that cannot be read unless Magic Knight is in possession of the Crystal Ball, one would assume that the Mirror would reveal the Teddy Bear's text, however this is not the case. Although the Teddy Bear's true text is in the game (53607), it cannot be accessed. This text contains a spelling error ("HUNNEY" instead of "HONEY"). The name of the bear, Milne, is undoubtedly a reference to A. A. Milne and "HUNNEY" is close to Winnie-the-Pooh's spelling, "HUNNY". See also this bug.
Placeholder data is used in a number of locations:
Smashable objects thrown
When an object is thrown, a check is made at 43830 to see if that object is the Mirror. If so, a special message is displayed, describing how the object has smashed. This message is only shown for the Mirror, even though other objects (i.e. the Bottles of Liquid and the Empty Bottles) will also smash when thrown.
Axe frame numbers
The routine 46560 that draws the axes to screen relies on offset frame numbers (116, 117, 118 and 119) rather than absolute frame numbers (e.g. 0, 1, 2 and 3). These are the same frame numbers used by the Odd Ball in Spellbound.
Common code for 48k and 128k versions
There appear to be some code fragments that aren't necessary for the 48k version of the game. Generally speaking, these appear to be indications that the 48k version and the 128k version use much code in common. A few examples are:
Missed opportunities for optimisation
There are a few instances where savings in memory use could have been made by taking advantage of the common words table:
Reused data
The values in the table of characters' default happiness levels at 43486 are taken unmodified from Spellbound.
Useless spell
The Melt Granite spell does not do anything. The routine at 43998 that handles this spell simply displays a message stating that this spell cannot be cast.
Not so useless spell
The Spell of Wonder is not quite as useless as the in-game text suggests. In fact it slightly increases Magic Knight's current strength!
Reused architecture graphics
The table of 2 × 2 block style definitions contains several blocks that are taken from a previous Magic Knight game, Finders Keepers:
2 3 5 7 8 9
These blocks are also defined in Spellbound.
In addition, several blocks from Spellbound are also defined here:
1 11 12 13
Evil never sleeps
One of the requirements for the success of Magic Knight's mission is that Off-White is asleep when Dimension Merge is cast. An essential task for Magic Knight to complete is to put Off-White to sleep by throwing the Magic Missile. Unlike other characters, Off-White does not tire while awake; in fact he continually regenerates. The rates of change of his stats while awake are all positive ensuring he never falls asleep independently.