Cheat mode
Knight Tyme 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 both Magic Knight's current room, and the current location of the USS Pisces. Pressing LEFT or RIGHT decreases or increases, respectively, Magic Knight's current room index by one, and draws the new room. Pressing UP or DOWN increases or decreases, respectively, the index of the current location of the USS Pisces by one. Pressing FIRE causes a return to the game.
If this POKE is entered after the game has loaded, but before execution has reached 26640, then in addition to enabling cheat mode, the Valid I.D. Card will be placed in The Recreation Room aboard the USS Pisces, meaning that Magic Knight will not have to have his photograph taken or validate the Blank I.D. Card.
Extra data copied
The instructions between 27029 - 27035 copy inventory data from the characters' initial inventories table at 36805 to the characters' current inventories table at 25164. However these instructions also copy an additional 10 bytes after this (first 10 bytes of the characters' initial positions table at 36875) into 25234 - 25243.
The instructions after this (27037 - 27043) then copy position data from the characters' initial positions table at 36875 to the characters' current positions table at 25244. Again, an extra six bytes (first six bytes of the objects' initial positions table at 36911) are copied as well.
Combined magic level / attribute data
Characters' attributes and magic levels are both encoded in a single value.
Drawing the strength bar
In drawing the strength bar, if Magic Knight's strength is not a multiple of eight, then the strength bar is drawn as groups of eight pixels, then the remainder over and above a multiple of eight is drawn. If the Magic Knight's strength IS a multiple of eight, however, the second part of the routine (draw the remainder over and above a multiple of eight) is still executed, but draws nothing (see JR 34619 instruction at 34611 - it seems more logical to have JR 34626 here to skip over the "fractional part drawing").
Common code for 48k and 128k versions
There appear to be many data structures and code fragments that aren't necessary, or have different lengths than is required, 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:
Unused code
The routine at 33952 will display a list of objects in a window for a given group of inventory slots. Before anything is displayed, the first slot in the group is checked (instructions at 33961 and 33964), and if it is empty, then a jump occurs to 34087. The code at 34087 appears to display the "YOU HAVE DESTROYED YOURSELF..." text that is usually seen upon dropping the Quark Bomb, however it displays this text in a normal information window and then returns to the main game loop.
Fortunately, this strange behaviour should never occur because an empty inventory is already checked for before the routine at 33952 is ever reached. If an empty inventory is detected then this routine is never reached.
Redundant instructions / code
There are many instances of redundant code, or redundant instructions in several texts. These may or may not be related to the entry above. Some examples are:
Is-artificial flag
For the purposes of this disassembly, the flag held in bit 1 of byte 6 of the characters' stats data has been labelled the "is-artificial flag". This flag determines whether or not a character can see through the Cloak of Invisibility, and also whether or not that character will also respond to Magic Knight's commands without him wearing the Valid I.D. Card. Most of the artificial characters (i.e. Klink, S3 E3 and Derby IV) have this flag set, so they will happily obey Magic Knight's commands whether or not he is invisible / wearing the Valid I.D. Card. The obvious exception, however, is Julie 8 who, despite being an android, does not have her is-artificial flag set.
It is possible that there is a logical reason why Julie 8 does not have her is-artificial flag set, but it is also possible that this flag actually signifies something else!
Leftover debug code, part 1
The routine at 26670 displays and handles the input device selection menu, and the instructions from 26704 onward are executed when the currently selected input device is changed. The instructions between 26705 and 26724 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 26723 to a different value can make the highlighting visible.
No spell effect for Consult Oracle
When casting the Consult Oracle spell, no colour-cycling / sound effects are shown, i.e. there is no call to 55651.
No restriction on magic level for casting fortify character / yourself
Unlike the other spells, there is no minimum magic level requirement for casting Fortify Yourself or Fortify Character. Regardless of Magic Knight's magic level when he casts these spells, the amount by which the target is fortified is always the same, and the spell always costs ALL of Magic Knight's magic reserves.
Leftover debug code, part 2
The routine at 53731 handles characters' movement, however execution of this routine is dependent upon whether or not bit 7 of Gordon's stamina is set. If this bit is set, then all characters become frozen in place.