PDP11: 11/70 read-only registers must not return NXM on write #306
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
17 777 740
-17 777 742
, read-only error address registers, and17 777 764
, a read-only System ID register,are not handled in the
CPU70_wr()
routine, which means for these addresses the routine returnsNXM
, which then translates to "bus timeout" (no response to address), and then, as a result, trap to vector 4.That is incorrect, IMO.
These locations are read-only yet the address gets decoded, and even though writing does not have any effect, the write routine for these addresses should return
SCPE_OK
.This patch fixes the issue.
Background:
I was trying to run DEC/X11 diagnostic and, instead of getting the "
CMD>
" prompt, when started it was throwing a lot of VECTOR 4 errors for the following instruction, endlessly (only the simulator stop and reboot would help):177740-42
is an 11/70's error address register. Obviously, DEC/X11 was checking that the register exists (because 11/70 was a declared configuration), but the address appeared "unresponsive".When I added a NO-OP handling for both
177740
and177742
in simh, the DEC/X11 diagnostics showed me the prompt and I was able to (successfully) test the simulated hardware. I suppose that returningNXM
for an address that actually exists but read-only, is not the correct behavior, and the fix just proves it. Going a bit further, and using the same logic, I figured out that yet another 11/70's register, the System ID register, was not handled in the write routine (same, returningNXM
) so I added the NO-OP handling for that, too. With this change, it looks like all the special 11/70 registers (per the Handbook that I have) are covered in the simh code now, as "recognized addresses".