PHYDIO and external storage

By geijoenr

Champion (282)

Аватар пользователя geijoenr

17-03-2021, 15:10

Hi,
does anybody know how PHYDIO works with external storage devices?

I mean, if there is an external SD device running Nextor like MegaFlashROM or other; does PHYDIO provide an interface to read blocks from those devices? or only to original disk drive on the computer?

I am trying to figure out if I need a driver for each external storage device or the BIOS is going to just work.

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By gdx

Enlighted (5021)

Аватар пользователя gdx

17-03-2021, 16:15

I think PHYDIO is limited in FAT16. Other than that, it works for all logical drives.

By zeilemaker54

Champion (331)

Аватар пользователя zeilemaker54

17-03-2021, 17:41

gdx wrote:

I think PHYDIO is limited in FAT16. Other than that, it works for all logical drives.

PHYDIO works the same way as DSKIO (and is actually using DSKIO) including the parameters. But PHYDIO and DSKIO are sector based and have not knowledge of a file system.

Perhaps the question is targeted to hard disk partitions. A standard DOS2 had no knowledge of hard disk partitions, partitions are handled by the disk driver, included in the diskrom kernel. a partition is assigned to a driveid (generally a driveletter), which you can select (in register A) using PHYDIO.

By geijoenr

Champion (282)

Аватар пользователя geijoenr

27-03-2021, 22:18

Does anybody have an example on how to use PHYDIO? what is the media ID?

By geijoenr

Champion (282)

Аватар пользователя geijoenr

28-03-2021, 18:29

Does this actually work?
I am trying to run in on OpenMSX on a TurboR machine and the hook in H.PHYD (0xFFA7) is set to RET, so the call doesn't actually do anything. I tried some other machine an the same.

It looks like H.PHYD require some additional initialization that I am missing?

The machine has a disk drive for sure, but the hook is not initialized I guess because I am running from a ROM.

By geijoenr

Champion (282)

Аватар пользователя geijoenr

28-03-2021, 18:36

yes, if I let BASIC boot it sets an rst 0x30 on the hook.