The Module ID


Using the built-in support for TOY

As we have seen in the previous chapter we can access the RTC chip using Oleg Saffiulins program and you can set the RTC with my extension to the code to support the /SETTOY switch. On the other side the operating systems of digital already implement this support but it is not active or visible. When you look at the original STARTUP.CMD of RSX-11M-PLUS 4.2 then we can clearly see that such a support exists. It all depends on the features detected during startup.

.; See if the system has a known TOY clock

        .SETF $TOY
        .PARSE <FMASK> "," FMX FMX FMX FMX HFMSK FMX
        .SETN TEMPN 'HFMSK'
        .SETN TEMPN TEMPN&1400
        .SETS TEMPS "(HH:MM DD-MMM-YYYY)"
        .IF TEMPN EQ 0 .GOTO ASKTIM
        .ENABLE QUIET
        TIM /SYNC
        .DISABLE QUIET
        .IF <EXSTAT> NE 1 .GOTO ASKTIM
        .PARSE <TIME> ":" HH MM SS
        .SETS TEMPS "(Default:'<DATE4>' 'HH':'MM')"
        .SETT $TOY

.ASKTIM:
        .ASKS $TIME Please enter time and date 'TEMPS'
        .IFT $TOY .IF <STRLEN> EQ 0 .GOTO SETIME
        .IF <STRLEN> < 12 .GOTO ASKTIM
        TIME '$TIME'
        .IF <EXSTAT> <> <SUCCES> .GOTO ASKTIM
.SETIME:

After some reading it was clear, that this is related to the so called module ID. The module ID uses bits4..7 of the Maintenance Register available on the KDJ1x series of CPU boards. The Maintenance Register is mainly a copy of the power up configuration word, except that it can be ready using the address 17777750 and not only via the GPREAD cycle of the DCJ11 during startup.

The big question was, if the operating systems just need to see the correct module ID in the maintenance register or whether they require as well the other features and registers unique to the CPU boards with the TOY in hardware.

Indeed RSX-11Mplus and even RT-11 are happy with a partial implementation of the features of a KDJ11-E board. In my case it was sufficient to change the module code from 1 to 5 in the CPLD of my PDP-11/Hack and now RSX-11Mplus and RT-11 5.7 are using the RTC in my PDP-11/Hack system. I had to add some more wires to the CPU board in order to have the software think it is running on a Q-Bus and not on a Unibus system but that was all which was needed.

Now when you start RSX-11Mplus the STARTUP.CMD script defaults to the time stored in the RTC and RT-11 5.7 directly sets the time and date using the RTC.