On Fri, 6 Feb 1998, NYYRIKKI wrote:

> 
> Does anybody have info about PHYDIO routine? I know, what I must input to
> that routine, and what AF and B should contain, when it exits, but is
> there something, that I don't know? I'm trying to make disk-drive emulator
> for Novaxis SCSI system, and it is working quite a good under Disk Basic
> version 1.0 so that I can load cracked megarom games etc. but DOS1 is not
> working good. Sometimes it generates diskerrors, and when I try to load
> any proggram it hangs. Maybe there is also something in HD-reading
> routines, that will modify something important in system ram, but I don't
> know. I have used physical I/O routine from HD interface, so it should be
> accessed as close hardware as possibble. I also patched PHYDIO just after 
> jump to #4010
> 
> If anybody has any good ideas, please help. I'm really stucked.

Ok, you can use the PHYDIO routine in the following way:
HL=memory address where data will be read or written
DE=starting sector from disk, beginning from zero
B=number of sectors to be transfered
C=type of disk: FC=40 tracks single sided disk
                FD=40 tracks double sided disk
                F8=80 tracks single sided disk
                F9=80 tracks double sided disk
A=number of drive (0=A, 1=B, 2=C, 3=D) there's no drive default
if CARRY FLAG is reset, sectors will be read
if CARRY FLAG is set, sectors will be written

After load these registers with the desired values, you can call the
PHYDIO routine through addresses 0144h or FFA7h. I think that if you
modify the contents of the hook FFA7h, you can create your emulator.

The exit code of the PHYDIO routine is CARRY FLAG and register A. If carry
flag is reset, the operation was successfully completed. Else, register A
will have an error code. I don't know the error codes, but if you do some
tests, you can easily detect the write-protection detected code.

If you were using physical I/O, could you say me how do you do this using
a memory address-based disk-interface?

That's all!

  Marco Antonio
  [EMAIL PROTECTED]

****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to