Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return value of DEV_RW not correctly checked in DOS1 mode #110

Open
S0urceror opened this issue Sep 11, 2022 · 1 comment
Open

Return value of DEV_RW not correctly checked in DOS1 mode #110

S0urceror opened this issue Sep 11, 2022 · 1 comment
Labels
due in next version This will be fixed/implemented in the next version

Comments

@S0urceror
Copy link

The following use-case:

  • A 32Kb .COM file is loaded in MSX DOS 1.0
  • Nextor on MSX1 without built-in DISKROM
  • Start address in page 0 => 0x0100
  • End address in page 2 => 0x8100

In DRV.MAC:

  • Since the above file (partly) has to be loaded in page1 it uses: DIO_RD_LOOP
  • After:
	ld	ix,DV_DSKIO##	;Or DEV_RW (they are at the same address)
	ex	af,af'
	ld	a,DV_BANK##
	call	CALBNK##
	jr	nc,DIO_RD_OK
  • It checks for no-carry but the spec for DEV_RW only says to return an error-code in A
  • It should be:
	ld	ix,DV_DSKIO##	;Or DEV_RW (they are at the same address)
	ex	af,af'
	ld	a,DV_BANK##
	call	CALBNK##
	and a
	jr	z,DIO_RD_OK

For now, I adapted my driver to set carry when A>0. And the problem is now solved.

A very special border-case I would call this.

I think DRV.MAC: DIO_RD_LOOP has to check the contents of A like CONV_ERR does for DIO_NOP1.

@S0urceror
Copy link
Author

Created a PR.

@Konamiman Konamiman added the due in next version This will be fixed/implemented in the next version label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
due in next version This will be fixed/implemented in the next version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants