Repository navigation
UsingTheDiagnosticFeatures
At the bottom-right of the Control Panel is a G-15 logo. Double-clicking this logo will open the emulator's Diagnostic Panel in a separate window.

This panel is a retro-g15 emulator-specific addition. It is intended primarily as a monitoring and debugging tool for the emulator, but it can be useful to view during normal operations for debugging or monitoring program execution. It shows the following:
- Word-time counter and run-time clock
- Current drum location
- Current command location
- Several significant flip-flops
- The fields of the current command word, both as PPR-like format and as bit registers
- The AR and two-word registers
- A single 108-word (long) drum line, selected using the Line text box
- The four-word (fast) drum lines
- A breakpoint insertion tool
The red lamps show individual bits in the registers, while the register captions show the value of those registers. For smaller registers, the value is shown in "PPR hex," e.g., 64 represents decimal 64, but u4 represents decimal 104. For full-word registers, the value is shown both as a decimal integer and as a decimal fraction, i.e., the integer value divided by 228 for AR and the even words of two-word registers or the integer value divided by 229 for the odd words of two-word registers.
In the upper-right of the window are two representations of the run-time clock, one stated in drum word-times and one in seconds. The clock is initialized when the emulator is loaded and runs whenever the processor is running. You can reset the word-time and run-time counters to zero at any time by double-clicking anywhere in the top line of the panel.
Below the display of the four-word lines is a breakpoint insertion tool. Entering a drum line (or track) number and a word position in their respective text boxes will load that word from the drum memory into the field following the Word box and display the word in a PPR-like format. If the breakpoint (BP) bit in the word is set, the BP check box will be ticked. Only lines 0-23 can be accessed using this tool.
By ticking and unticking the BP check box, you can change the breakpoint bit in the corresponding word on the drum. Changing the state of the check box changes the word in drum memory immediately.
You can use this tool simply to examine words on drum lines and disassemble them in PPR format. This doesn't affect anything on the drum unless you toggle the BP check box.
At the bottom-left of the window are buttons that can be used to start, stop, and single-step the processor.
At the bottom-right of the window is a text box labeled Sound:. This is used to control Bill Kuker's music-playing enhancement to the emulator. If the box is blank, the player is disabled. To enable it, enter a comma-delimited list of drum line numbers. The player will then continuously convert the bit patterns in all of the words of those lines to sound waves and send them to your system's current audio output device. The data from the lines are played in parallel. The contents of this text box are preserved across closing and re-opening the Diagnostic Panel, but not across emulator restarts.
You can open, close, and re-open the Diagnostic Panel as often as desired. Double-clicking the OFF button on the Control Panel will automatically close the Diagnostic Panel window if it is open.
The emulator can generate a trace of instruction activity as instructions execute. The trace is written to the JavaScript Console log, which in most browsers is part of the Developer Tools facility.
To do a trace, open the Developer Tools and select the Console item. If the Tools display as a panel in your main browser window, you may want to undock the panel as a separate window.
Then on the emulator Control Panel, double-click the emulator version number to activate tracing. The version number is to the right of and below the AS lamp. The version number will turn yellow while tracing is activated. Double-click the version number again to deactivate tracing.
As instructions execute, each one will be written to the JavaScript console log as one or more lines. The first line will be an interpretation of the instruction in a PPR-like format. Subsequent lines will show the register or drum line activity during the instruction's Transfer state. For example:
<TRACE 6> 58104: 19.u7: u.04.04.0.22.02
TR: 22: 0= 110 0> 2: 0= 110
TR: 22: 1= x0 0> 2: 1= x0
TR: 22: 2= 34 0> 2: 2= 34
TR: 22: 3=800000x 0> 2: 3=800000x
-
<TRACE 6>indicates that this line was written when the currently-mounted paper tape was positioned within or immediately after block number 6 (1-relative) of the currently-mounted paper tape. The block number will be zero if the tape is presently fully rewound or no tape is loaded. -
58104is the drum word-time counter at the point that the command was read and loaded into the processor and prepared for execution. -
19.u7is the location of the instruction (line 19, word u7=107) -
u.is termed the "prefix" and in this case indicates an "urgent" (immediate-mode) instruction.w.indicates a "wait" (deferred-mode) instruction. If there is nouorwprefix, then the instruction is in deferred mode, unless either the destination (D) field is 31 (special command) or the T (timing number) field is equal to the instruction word location on the line plus one word (i.e., T=L+1). These special cases are due to convenience optimizations that PPR performs when assembling an instruction and a prefix has not been specified. -
04.04.0.22.02represents the remaining fields of the instruction in T, N, CH, S, D order. The 4-bit of the CH field represents the single/double-precision indicator in the low-order (sign) bit of the word. The two low-order bits of the word indicate the characteristic for the instruction. [Welcome to the coding conventions of 1950s programming.]
Below the instruction line, the trace shows any register or drum-line activity that took place during the instruction's Transfer state. The first item indicates the type of transfer or type of data:
-
TR– ordinary transfer -
AR– transfer to AR (no addition) -
AR+– transfer to AR (with addition) -
VA– transfer via AR (CH=2, word precession) -
ID– transfer to Multiplicand/Denominator register -
MQ– transfer to Multiplier/Quotient register -
PN– transfer to Product/Numerator register -
REG– transfers involving arithmetic registers (1- and 2-word) -
<Div>– transfer during Divide instructions -
RET– transfer during Return Exit instructions -
MRK– transfer during Mark Exit instructions
A notation such as n> where n is 0-3 indicates the characteristic transformation that takes place during transfer:
- 0 = TR: no transformation
- 1 = AD: convert to/from 2-s complement representation
- 2 = TVA: Transfer via AR (for sources and destinations 0-27) or AV: Transfer Absolute Value (for sources and destinations 28-31)
- 3 = AVA: Add via AR (for sources and destinations 0-27) or SU: Subtract (for sources and destination 28-31)
FO is the state of the overflow flip-flop after the instruction executes. A * suffix indicates overflow occurred during this operation.
The G-15 has a very unusual architecture, heavily influenced by the NPL Pilot Ace, and uses a source-to-destination command model rather than the more common operation-code/operand-address model. Because of this, the command words have a lot of configurations for which the behavior is not specified in the documentation, although they could probably be deduced with some, perhaps significant, effort from the logic diagrams. This sort of thing is very difficult to deal with in an emulator like retro-g15, which operates more or less at a word level, not a bit level.
The user documentation for the system describes what might be referred to as "standard commands" for which the behavior was reasonably well defined. When programmers departed from those standard patterns (and in the 1950s, programmers did whatever they could get away with to optimize their code), that may have resulted in predictable behavior at the time, but that specific behavior is quite difficult to determine with the information we have available 70 years later.
When the emulator recognizes such a situation, an entry that identifies the command being executed is written to the emulator's JavaScript console log. This log can be inspected using the browser's Developer Tools facility.
This standard-usage violation detection mechanism is a work in progress and is intended to assist in improving the emulator's support of G-15 software over time. It is likely not accurate in all cases and should not be relied upon.