PDP-10 / klh10

Community maintained version of Kenneth L. Harrenstien's PDP-10 emulator.
Other
60 stars 8 forks source link

Massbus serial number(s) #17

Closed hrlzm closed 6 years ago

hrlzm commented 7 years ago

The code to default the serial numbers of massbus devices seems wrong.

dvrpxx.c:

 RPREG(rp, RHR_SN) =                /* Serial Number register (BCD) */
               (((1    / 1000)%10) << 12)
             | (((6    /  100)%10) <<  8)
             | (((nrps /   10)%10) <<  4)
             | (((nrps       )%10)      );

dvtm03.c:

 TMREG(tm, RHR_SN) =                /* Serial Number register (BCD) */
               (((9    / 1000)%10) << 12)
             | (((9    /  100)%10) <<  8)
             | (((ntms /   10)%10) <<  4)
             | (((ntms       )%10)      );

The intention seems to be to set the serial number to 1600 + n and 9900 + n respectively. It does not...

larsbrinkhoff commented 7 years ago

It certainly doesn't. It's an easy fix.

Ideally there should be some attempt at testing, perhaps with some versions of TOPS-10, TOPS-20, and ITS. That's the hardest part. But maybe that's overdoing it.

Rhialto commented 7 years ago

That commit 22e336c should fix it, right? (At least if n < 100.)