Make the DOSVER function call return 6Fh in C in DOS 1 mode #128
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.
MSX-DOS doesn't modify the main registers when an unknown function call is invoked, and the Dutch Moonsound Veterans music disk uses this fact to detect the MSX-DOS version in use, like this:
However this MSX-DOS version detection method is technically incorrect. The MSX-DOS 2 function codes specification says the following regarding the
_DOSVER
function (emphasis mine):Nextor does corrupt the C register when
_DOSVER
is invoked in MSX-DOS 1 mode (unless the magic numbers are supplied, see the relevant documentation) and this is what causes the music disk to fail. So strictly speaking the reported issue is not a bug in Nextor but an incorrect usage of the function.However, the fix is trivial and makes Nextor work more consistently with how "pure" MSX-DOS 1 does, thus this pull request implements it: now when
_DOSVER
is invoked in MSX-DOS 1 mode without the magic numbers supplied, it will preserve the contents of register C.Closes #120.