How to detect a "simulated" floppy disk drive?

بواسطة konamiman

Paragon (1173)

صورة konamiman

16-03-2011, 09:13

Is there any way to know wether a given DOS drive letter is mapped to a phyiscal drive or is a simulated floppy disk drive? That is, a drive that will show a "Insert disk for drive X:" message when trying to access it.

Login أوregister لوضع تعليقاتك

بواسطة Sonic_aka_T

Enlighted (4130)

صورة Sonic_aka_T

16-03-2011, 13:11

I think you can trap the "Insert disk" message. I know it's possible, because I did this once (remember it was a pain indeed), but what I'm not sure of is if my final version trapped that routine or used some other solution... Sorry I can't be of more help, but I do remember being able to do it (somehow) in the end... Smile

بواسطة NYYRIKKI

Enlighted (5939)

صورة NYYRIKKI

16-03-2011, 15:32

As stupid as it may sound, there is no standard way to know if drive is physical or simulated.

I suggest that you populate #F24F (Prompt to insert disk) hook with your own routine. On the hook register A contains drive letter as ASCII. Please note that space for the hook is only 3 bytes.

If you just want to get rid of the prompt, you can do something like POKE &HF24F,&HF1

بواسطة konamiman

Paragon (1173)

صورة konamiman

16-03-2011, 16:17

@NYYRIKKI: As usual, you are the boss Hannibal

بواسطة msd

Paragon (1472)

صورة msd

16-03-2011, 19:56

I made some code for this a while ago Big smile. It's quite long, but it works. I didn't use the hook.I can send you the code if you want konamiman.I made for a 'norton' clone. I didn't want the user to be able to select a virtual drive.

بواسطة konamiman

Paragon (1173)

صورة konamiman

16-03-2011, 21:57

@msd: The trick pointed out by NYYRIKKI has worked fine for me, but anyway it would be nice if you can send me your code as well.

بواسطة NYYRIKKI

Enlighted (5939)

صورة NYYRIKKI

18-03-2011, 08:14

@msd: Yes, it would be nice if you could share your code or idea behind the code.

بواسطة msd

Paragon (1472)

صورة msd

18-03-2011, 09:36

I have made some code which returns a list with what kind of devices are connected (HDD,FDD,CD-ROM and RAMDISK) which excludes virtual drivers. Somewhere in the memory there is a description of every diskrom and the number of physical driver connected. The vitrual drive is not listed in there. The diskroms (max 4) are in order of the drive names. So if there are two drives a and b and the controller has only one physical drive you will know that the second one is virtual. There is some more to it than I list here but that will be made clear by the code Wink