Updated the CRCs of INIR->NOP'/INDR->NOP'
for z80memptr.
#3
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.
I've discovered a new undocumented behavior of the
inir/indr/otir/otdr
instructions:As in
cpir/cpdr/ldir/lddr
, when the repeat condition is met, the CPU generates an extra M-cycle of 5 T-states to decrement PC. This M-cycle performs additional flag changes, but until now it was not known that MEMPTR is also modified, being set, as in all other block instructions during this M-cycle, to PCi + 1 (PCi = value of PC at the start of the instruction, before it is incremented).After adding this behavior to my Z80 core,
z80memptr.tap
fails in the following 2 steps:Which matches the results obtained on real hardware by Richard Chandler, who kindly tried the test at my request on one of his machines with NEC CPU:
Of course, this "new" behavior has been tested on Visual Z80 Remix.