Added the ability to install external ROMs (eg, M9312 ROM images) into the IOPAGE

This commit is contained in:
Jeff 2016-11-05 12:01:56 -07:00 • committed by Jeff Parsons
commit c67176eab0
25 changed files with 1143 additions and 346 deletions

View file

@ -10,3 +10,83 @@ machines:
{% include machine.html id="test1170" %}
This machine is also available with our built-in [Debugger](debugger/).
Front Panel Basics
------------------
From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10, p. 325:
> ### CONSOLE OPERATION
> The PDP-11/70 console allows direct control of the computer system. It contains a power switch for the CPU,
which is also usually used as the Master Switch for the system. The console is used for starting, stopping, resetting,
and debugging. Lights and switches provide the facilities for monitoring operation, system control, and maintenance.
Debugging and detailed tracing of operations can be accomplished by having the computer execute single instructions or
single cycles. Contents of all locations can be examined, and data can be entered manually from the console switches.
The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Front Panel. The switches, which
PDPjs displays as green to make them stand out from the rest of the pink-and-magenta controls, are summarized below.
### 0-21
These control bits 0 to 21 of the SWITCH register. The UP position represents a ONE, and the DOWN position
represents a ZERO. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the
ADDRESS register (as displayed by the top row of LEDs), or directly into the memory location referenced by the ADDRESS
register (where it will become the DATA displayed by the second row of LEDs).
The SWITCH, ADDRESS, and DATA (aka DISPLAY) registers are all internal to the Front Panel hardware, and should not be
confused with CPU registers.
### TEST
This is a momentary switch that is normally in the DOWN position. When held in the UP position, it turns on all LEDs.
This "lamp test" was more important in the days when the lights were produced by bulbs with filaments that could burn out,
and if you didn't realize that a particular light was "burned out", you could mistake it for a zero.
While the TEST switch is more "cute" than useful on a virtual Front Panel, we have added one "innovation" to the switch:
pressing it also returns all the SWITCH register switches (0-21) to their DOWN position.
### LOAD
This is a momentary switch that is normally in the UP position. When pressed DOWN, it copies the SWITCH register to the
ADDRESS register.
### EXAM
This is a momentary switch that is normally in the UP position. When pressed DOWN, it reads the memory location referenced
by the ADDRESS register and displays it in the DATA register. If pressed repeatedly, each repetition also automatically
adds 2 to the ADDRESS register, making it easier to examine a series of words. Note that if the CPU registers are being
examined (starting at address 177700), the ADDRESS register will advance by 1 instead of 2.
Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM operations
will decrease the ADDRESS register instead of increasing it.
### DEP
This is a momentary switch that is normally in the DOWN position. When pressed UP, it writes the contents of the SWITCH
register to the memory location referenced by the ADDRESS register, and displays the result in the DATA register. Like the
EXAM switch, if DEP is pressed repeatedly, each repetition also automatically adds 2 to the ADDRESS register, making it easier
to deposit the same value to a series of words.
### CONT
This is a momentary switch that is normally in the UP position. When pressed DOWN, it will start the CPU if it's currently
halted. If the CPU is already running, CONT has no effect. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position,
then the CPU will continue for only ONE instruction and then stop again.
### ENABLE/HALT
This switch is a toggle that is normally in the UP (ENABLE) position. If it pressed DOWN while the CPU is running, the CPU will
stop. Once the CPU is stopped, this switch has no effect, other than determining what CONT will do when pressed.
### STEP
On a real PDP-11, this would select between cycle-stepping vs. instruction-stepping. Since PDPjs doesn't support cycle-stepping,
this switch has no effect (except as described above when the EXAM or DEP switches are pressed repeatedly).
### START
The START switch is similar to CONT, but it also performs the equivalent a RESET instruction before starting the CPU, so
unless you're starting execution at the beginning of a program, using START instead of CONT to continue execution is probably
not a good idea. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, START will still reset the machine but not
execute anything.

View file

@ -10,11 +10,19 @@ machines:
{% include machine.html id="test1170" %}
Other interesting things to know about this machine:
* It includes an [M9312 ROM](/devices/pdp11/rom/M9312/) at address 165000. The exact ROM is [23-616F1](/devices/pdp11/rom/M9312/23-616F1.txt).
Toggle-Ins
----------
As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf),
Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below.
Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. If you're
not sure how "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/machine/1170/panel/#front-panel-basics).
However, since the above machine also includes the PDPjs Debugger, you'll find that it's much easier to use the Debugger commands
described below to load and execute these "toggle-ins".
### Memory Management
@ -186,7 +194,7 @@ If you also want to see all the hardware register activity, use the Debugger's "
17772262 021311 CMP (R3),(R1) ; Top of Memory?
17772264 003402 BLE 2$
17772266 005000 CLR R0 ; Start at Virtual Address 0
17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --@jeffpar]
17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --JP]
17772272 005312 2$: DEC (R2) ; Disable Relocation
17772274 000000 HLT
@ -310,8 +318,8 @@ As the **Maintenance Service Guide** goes on to say:
Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will
slow execution to a crawl.
If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address,
not one of the physical (22-bit) addresses shown above. For example, to break on this instruction:
If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address.
For example, to break on this instruction:
17772256 062711 ADD #200,(R1) ; Step Page

View file

@ -5,6 +5,7 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667"/>
<ram id="ram" addr="0x00000" size="0x3E000" file="/apps/pdp11/boot/monitor/PDPJSMON.json"/>
<rom id="m9312" addr="0xEA00" size="0x200" file="/devices/pdp11/rom/M9312/23-616F1.json"/>
<device id="default" type="default"/>
<serial id="dl11" adapter="0" binding="print" upperCase="true"/>
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>

View file

@ -5,6 +5,7 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" autoStart="true"/>
<ram id="ram" addr="0x00000" size="0x3E000" file="/apps/pdp11/boot/monitor/PDPJSMON.json"/>
<rom id="m9312" addr="0xEA00" size="0x200" file="/devices/pdp11/rom/M9312/23-616F1.json"/>
<device id="default" type="default"/>
<serial id="dl11" adapter="0" binding="print" upperCase="true"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>