[FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Discussion of development and patch submission.
Post Reply
Windows9xFan
Posts: 20
Joined: Fri 04 Jul, 2014 7:01 pm

[FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by Windows9xFan »

For floppy drives, PCem should allow mounting images only when the drive is empty.
But as for optical drives, PCem should emulate their tray states (and allow mounting/unmounting images only with the tray ejected).

Just like a real PC!
I'm your biggest fan, Windows 9x series of operating systems!
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by omarsis81 »

So... what do you mean here? If there is a disc or a floppy inserted and you want to insert another one an error message should pop?
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by SarahWalker »

Windows9xFan wrote: Wed 11 Nov, 2020 3:55 am For floppy drives, PCem should allow mounting images only when the drive is empty.
Why on earth would you want this?
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by omarsis81 »

SarahWalker wrote: Wed 11 Nov, 2020 3:30 pm
Windows9xFan wrote: Wed 11 Nov, 2020 3:55 am For floppy drives, PCem should allow mounting images only when the drive is empty.
Why on earth would you want this?
At least it would be the easiest request to do :D :lol:
Windows9xFan
Posts: 20
Joined: Fri 04 Jul, 2014 7:01 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by Windows9xFan »

SarahWalker wrote: Wed 11 Nov, 2020 3:30 pm
Windows9xFan wrote: Wed 11 Nov, 2020 3:55 am For floppy drives, PCem should allow mounting images only when the drive is empty.
Why on earth would you want this?
Because that's the way a real floppy drive works.
I'm your biggest fan, Windows 9x series of operating systems!
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by leilei »

and a real computer has knobs, buttons, wheels, and wires all over the place. Should PCem transform into looking like a VST plugin interface too?
DOS
Posts: 10
Joined: Thu 12 Nov, 2020 2:28 am

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by DOS »

leilei wrote: Mon 16 Nov, 2020 2:28 am Should PCem transform into looking like a VST plugin interface too?
Sounds great, thanks! :D

But seriously, I have wondered about some things related to this topic before with regards to various emulators.

For instance, I'm pretty sure a floppy drive controller has a disk changed indication that the operating system can read. If I don't explicitly tell the emulator to eject the disk before supplying a new image, will it update that indicator properly? I took a look at the PCem source and I couldn't figure it out in a few seconds so I gave up :)

I also wonder how this kind of thing works with CD-ROM drives. Do they have disk change indicators or just a "tray open" indicator? How does the operating system notice when the disk has been changed so it can do the auto run steps, etc.? If the OS does some polling and I change the .iso image without the tray being in an "ejected" state for at least one polling cycle with the OS not notice that I changed disks?

I'm not expecting anyone to answer all of my questions, those are just things I've pondered previously since I'm pretty sure I've had issues with disk changes not being detected properly.

Apologies for my cluelessness!
Apologies in advance for not responding, I don't check back here very often.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by SarahWalker »

There is a disc changed indicator on the AT and later FDCs, and yes, PCem does update that when you load a new disc image in without ejecting the old one first. If this wasn't implemented, then in DOS you could DIR a disc, load a new disc, DIR again and still get the old disc contents.

CD drives have a similar status bit, and there's a chunk of code to ensure that gets updated correctly.

I'm very tempted to give Windows9xFan his wish, then get him to install Windows NT 3.51 (22 discs) and see quite how quickly he gets sick of it!
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by omarsis81 »

SarahWalker wrote: Tue 17 Nov, 2020 7:42 am I'm very tempted to give Windows9xFan his wish, then get him to install Windows NT 3.51 (22 discs) and see quite how quickly he gets sick of it!
:lol:
DOS
Posts: 10
Joined: Thu 12 Nov, 2020 2:28 am

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by DOS »

SarahWalker wrote: Tue 17 Nov, 2020 7:42 am There is a disc changed indicator on the AT and later FDCs, and yes, PCem does update that when you load a new disc image in without ejecting the old one first. If this wasn't implemented, then in DOS you could DIR a disc, load a new disc, DIR again and still get the old disc contents.

CD drives have a similar status bit, and there's a chunk of code to ensure that gets updated correctly.
Great, thanks for the info!
I'm very tempted to give Windows9xFan his wish, then get him to install Windows NT 3.51 (22 discs) and see quite how quickly he gets sick of it!
:lol:

One thing I noticed is if you try to change a disk that is mounted, the file selection dialog defaults to the directory containing the current disk, but if you eject and then try to mount a new disk, it defaults to PCem's working directory. That means that ejecting first doesn't just involve the extra clicks to eject, it involves even more clicks to navigate back to the directory containing your disk images, which makes it more painful. I'm glad I know now that ejecting first shouldn't be necessary!
Apologies in advance for not responding, I don't check back here very often.
Windows9xFan
Posts: 20
Joined: Fri 04 Jul, 2014 7:01 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by Windows9xFan »

As a self-imposed challenge, I eject first... because on a real PC only one medium per drive can be inside.
I'm your biggest fan, Windows 9x series of operating systems!
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [FEATURE REQUEST] Removable Media Drive Emulation Overhaul

Post by omarsis81 »

even if didn't reject first there'd still one image per drive at once
Post Reply