Floppy media change detection

News, questions and bugs reports about CosmosEx by Jookie. Now we have a Raspberry Pi in our machines!

Moderators: Jookie, Moderator Team

User avatar
Mr Nours
Captain Atari
Captain Atari
Posts: 203
Joined: Mon Jun 17, 2002 11:10 am
Location: Montpellier, France
Contact:

Floppy media change detection

Postby Mr Nours » Sun Jan 24, 2016 4:43 pm

Hi all,

Since the last version i experience problems with floppy media change detection. Here's the story :

My STE has CE on floppy cable A: and an external fdd on B:
If i put a floppy on B: and open it on the desktop all is ok.
I eject the floppy, close the B: windows, load another floppy and open it. The content of the first floppy is displayed even if it is not in the drive. :shrug:

I experience the same bug when i use A: CE Fdd drive.
Load an image in slot 1, open in desktop, close Windows, change image for slot 2, open it. Content of slot 1 is displayed.

I had to soft reboot my STE to get the media change.

Cheers,

Nrs.

PS: Jookie, is there a place where i could download old firmwares version? it would be helpful for checking regression.
______
Fuzion, the best french Atari CD crew ->The Fuzion Shrine!
ST emulation and more ->Emulation Atari ST(fr)!

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2798
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Floppy media change detection

Postby AtariZoll » Sun Jan 24, 2016 6:38 pm

Press Esc to update window content. And pls. do not use word Windows - Microsoft can sue you :-)
Negative feedback has usually positive effect.

User avatar
Mr Nours
Captain Atari
Captain Atari
Posts: 203
Joined: Mon Jun 17, 2002 11:10 am
Location: Montpellier, France
Contact:

Re: Floppy media change detection

Postby Mr Nours » Sun Jan 24, 2016 8:01 pm

Thanks for the tip! I didn't know ESC would update the disk content. It works fine.
But It forces media change detection, we must not had to press this key in my scenario for displaying new content.

Cheers,

Nrs.
______

Fuzion, the best french Atari CD crew ->The Fuzion Shrine!

ST emulation and more ->Emulation Atari ST(fr)!

User avatar
Jookie
Hardware Guru
Hardware Guru
Posts: 1245
Joined: Wed Feb 04, 2004 6:54 pm
Location: Kosice, Slovakia
Contact:

Re: Floppy media change detection

Postby Jookie » Sun Jan 24, 2016 9:01 pm

Mr Nours wrote:Thanks for the tip! I didn't know ESC would update the disk content. It works fine.


Yes, there's some issue with the floppy change for a longer time... I've tried several things, e.g. to put the R/W floppy signal up and down, I've also streamed different data for a while, but TOS somehow didn't recognize that the floppy changed. If you might have any idea how and why it works with the real drive, but doesn't with my emulated drive, let me know, because I'm clueless now...

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 675
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Floppy media change detection

Postby mfro » Sun Jan 24, 2016 9:24 pm

TOS Media change detection is done based on the disk serial number stored within the boot sector.

If TOS is unsure whether the disk was changed and the serial number didn't change, it assumes its the same disk. Third party format programs that always create the same serial number during format can easily confuse the operating system...

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2798
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Floppy media change detection

Postby AtariZoll » Sun Jan 24, 2016 9:28 pm

Jookie wrote:Yes, there's some issue with the floppy change for a longer time... I've tried several things, e.g. to put the R/W floppy signal up and down, I've also streamed different data for a while, but TOS somehow didn't recognize that the floppy changed. If you might have any idea how and why it works with the real drive, but doesn't with my emulated drive, let me know, because I'm clueless now...

Atari used not exactly standard solution for floppy change detection, as is described here: http://atari.8bitchip.info/flomodam.html
So, you need to lower line WP when user changes floppy image. TOS checks it in vertical blank interrupts, and will give media change signal if there is low detected while no active disk access.
Negative feedback has usually positive effect.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Floppy media change detection

Postby exxos » Sun Jan 24, 2016 9:33 pm

Thats same method I used on my HD6 floppy design, I wrote a quick app to check, and it does work, At least on TOS104 it does :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
Jookie
Hardware Guru
Hardware Guru
Posts: 1245
Joined: Wed Feb 04, 2004 6:54 pm
Location: Kosice, Slovakia
Contact:

Re: Floppy media change detection

Postby Jookie » Sun Jan 24, 2016 9:36 pm

mfro wrote:TOS Media change detection is done based on the disk serial number stored within the boot sector.

If TOS is unsure whether the disk was changed and the serial number didn't change, it assumes its the same disk. Third party format programs that always create the same serial number during format can easily confuse the operating system...


Aah, I remember that discussion, about the possibility of modifying the serial number on the fly, as the Automation floppy images have the same serial (and same bootsector), but as it could create some issues, this wasn't done...

AtariZoll wrote:So, you need to lower line WP when user changes floppy image. TOS checks it in vertical blank interrupts, and will give media change signal if there is low detected while no active disk access.


This is what it's done there, but it isn't enough in some cases, I guess...

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2798
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Floppy media change detection

Postby AtariZoll » Mon Jan 25, 2016 9:02 am

Jookie wrote:...
AtariZoll wrote:So, you need to lower line WP when user changes floppy image. TOS checks it in vertical blank interrupts, and will give media change signal if there is low detected while no active disk access.

This is what it's done there, but it isn't enough in some cases, I guess...

It works on real HW only with not write protected floppies well. Test is done in every 8-th V-blank, so need to lower WP line for little more than 1/20 sec :D
And I can say that it works reliable, even if serial of floppies is same - I have lot of such, and change detection is 100% when not write protected.
Negative feedback has usually positive effect.

User avatar
Mr Nours
Captain Atari
Captain Atari
Posts: 203
Joined: Mon Jun 17, 2002 11:10 am
Location: Montpellier, France
Contact:

Re: Floppy media change detection

Postby Mr Nours » Mon Feb 01, 2016 12:27 pm

My STE has CE on floppy cable A: and an external fdd on B:
If i put a floppy on B: and open it on the desktop all is ok.
I eject the floppy, close the B: windows, load another floppy and open it. The content of the first floppy is displayed even if it is not in the drive. :shrug:


What i think is strange is that B: (real hardware) is affected by CE on A: . Media change detection won't work on B: is CE is plugged as A:

Done some test yesterday that confirm this behaviour. I wonder that multi floppy game can't be played on my configuration as my system as no option to detect the media change... ?

Nrs.
______

Fuzion, the best french Atari CD crew ->The Fuzion Shrine!

ST emulation and more ->Emulation Atari ST(fr)!


Social Media

     

Return to “CosmosEx”

Who is online

Users browsing this forum: No registered users and 1 guest