No Flux Area located over index

A forum about Atari protected floppy disks analysis, preservation, emulation, tools

Moderators: DrCoolZic, Brume

User avatar
DrCoolZic
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2144
Joined: Mon Oct 03, 2005 7:03 pm
Location: France
Contact:

No Flux Area located over index

Postby DrCoolZic » Thu Jan 01, 2015 5:00 pm

This information presented here is primarily for developers and normal user should not care.
I want to review the difficult to handle case of having an NFA located over the index.
It might be interesting for Jeff to modify the way HxC currently works to better handle this case when reading information from raw stream file.
It might be also interesting for Jim if he finally decides to fix the SCP format and SCP sampling behavior in order to provides correct information in this case.

Description of NFA over index
It is possible to have the No Flux Area located over the Index pulse.

This is a hard to handle case for programs that reads the flux transitions produced by devices like Kryoflux and SuperCard Pro. These devices sample the index pulse and data pulse produced by floppy drives.
It is good to know that, for obvious reasons, in (almost) all cases the index pulse and the data pulse are not synchronized. In order to correctly interpret the information sampled, it is therefore necessary to know the position of the index pulses relative to the data pulse.

In “normal” cases (i.e. for data pulse in range 4 to 8 µs) it is acceptable to ignore the position of the index relative to the current flux transition, but in case where a no flux area is located over the index it is mandatory to get and interpret correctly this information.

Here is a typical case of an NFA over index. As we can see we have a huge area without flux transition located just above the index. In the figure we show three important values: one is the “NFA flux value” (typically around 4 to 5 ms.), the pre-Index time value, and the post-Index time value (only 2 of these three values are required as the third can be easily computed from the other two).
sample-to-index.png


For a practical example I use the Turrican game. On my version track 8 has a NFA of about 4.3 ms located on top of the index. The pre-index value is about 3 ms and therefore the post-index is about 1.3 ms.

Here is the correct display of this track by Aufit using Kryoflux raw stream file
KF-Aufit-T08.0.png


The Kryoflux raw stream format provides the NFA value as well as the pre-index timing (see my documentation KryoFlux Stream File Documentation at http://info-coach.fr/atari/documents/_m ... otocol.pdf).
The only way to be able to provide this kind information is to start to sample flux before the index as the Kryoflux device does.

It is the responsibility of the program reading the raw stream to use correctly this information. For example the HxC program currently seems to ignore the pre-index value
KF-Hxc-T08.0.PNG

As you can see the complete NFA is passed as the first flux in the revolution, but as the pre-index value is ignored the complete NFA is positioned at the beginning of the track resulting in an incorrect display and incorrect position values in Pasti file.


Unfortunately the SCP format does not provide any information about the positioning of the index pulse relative to data pulse. I have requested this feature to Jim several times on Atari-Forum as well as on the SCP forum without success. The situation is bad because it is doubled by several problems:
  • The sampling of transitions on the SCP device starts at the index pulse. If this behavior is not changed it will never be possible to detect the position of the index in the transition happening before the index.
  • The results is the No Flux Area is just not transmitted on the first revolution (one more reason to sample several revolutions). On the second revolution the NFA is passed as the first transition.
  • Normally it is expected that the sum of the length of all the transitions in one revolution is equal to the revolution time given as the time between two indexes. But this does not work in SCP format because the sum does not include the post-index part of the NFA and therefore the value in that case is much smaller than the expected value. This is to compare to the exact value transmitted by KF raw stream as explained page 14 of KryoFlux Stream File Documentation.

Because of all the reasons explained above it is impossible to get correct information from the SCP file in this case. However Aufit take advantage of the last reported problem to compute the post-value that is added in front of the transitions. But as mentioned the first revolution is nevertheless not displayed correctly as the NFA is not transmitted in this revolution resulting in a truncated last sector. In the subsequent revolutions the display is also not correct because the complete NFA is transmitted incorrectly as the first transition of the revolution with no position of index.
SCP-Aufit-T08.0.png

As you can see both the start and the end of the NFA are incorrectly displayed. If you select revolution 2 the complete NFA is now placed entirely as the first transition.

Of course the HxC software cannot do better as you can see here:
SCP-HxC-T08.0.png

Here we can see that the first revolution does not indicates any NFA (as not stored in the SCP file) and the second revolution has the complete NFA in the first position.

Fortunately for the end user it seems that in all the games using the NFA protection that I have tested the relative position of the NFA is not relevant. Therefore even though the information displayed and saved in the Pasti STX file is incorrect the test of the protection seems to work in all my test cases.
You do not have the required permissions to view the files attached to this post.

JimDrew
Atari Super Hero
Atari Super Hero
Posts: 646
Joined: Mon Nov 04, 2013 5:23 pm

Re: No Flux Area located over index

Postby JimDrew » Fri Jan 02, 2015 4:04 am

Unfortunately the SCP format does not provide any information about the positioning of the index pulse relative to data pulse. I have requested this feature to Jim several times on Atari-Forum as well as on the SCP forum without success.


That is simply not accurate. That information is most certainly present. You just read two revolutions and ignore the data from the 1st revolution if you must know this information. SCP uses the index as a reference for all data.
I am the flux ninja

Jeff_HxC2001
Captain Atari
Captain Atari
Posts: 309
Joined: Fri Sep 21, 2007 7:35 pm
Location: Paris - France
Contact:

Re: No Flux Area located over index

Postby Jeff_HxC2001 » Wed Jan 21, 2015 8:56 pm

Where i can found this test case ?

User avatar
DrCoolZic
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2144
Joined: Mon Oct 03, 2005 7:03 pm
Location: France
Contact:

Re: No Flux Area located over index

Postby DrCoolZic » Thu Jan 22, 2015 10:05 am

I have created an archive for you to test. The NFA over index is located in track 8.
Note I also have an image from Jim of Turrican but the NFA are located at different positions and none overlap index.
This seems to indicate that the "NFA protection" does not care about the position of the NFA on the track. And therefore if during decode the NFA is shifted it work. So you might just say "then who cares if the content/display is not accurate"?

Again few things to know. It is not by accident that the Kryoflux device samples data before the index! Currently SCP does not and therefore cannot provide correct information for NFA over index (and actually first transition is always lost - but in normal case nobody care) because in that case the NFA transition starts long time before the index. So in the first revolution SCP starts at the first transition after the index i.e. after the end of the NFA. In the "next NFA" would normally be at the end of the first revolution as it starts before the index but in practice SCP place it in the second revolution (this make sense as the SCP format does not provide a transition-to-index time. In latest version of Aufit viewtopic.php?f=104&t=25906&p=266034#p266034 I compute "the missing information" relatively close to reality. Try to compare the SCP with the KF version.

I suspect that solving this problem would require a big change in SCP and seems like nobody care anyway :oops:

Test case can be downloaded here https://mega.co.nz/#!xwgAlIbK!pv8GvXv-O ... mOHJZtOufE

JimDrew
Atari Super Hero
Atari Super Hero
Posts: 646
Joined: Mon Nov 04, 2013 5:23 pm

Re: No Flux Area located over index

Postby JimDrew » Thu Jan 22, 2015 7:08 pm

DrCoolZic wrote:Currently SCP does not and therefore cannot provide correct information for NFA over index (and actually first transition is always lost - but in normal case nobody care) because in that case the NFA transition starts long time before the index. So in the first revolution SCP starts at the first transition after the index i.e. after the end of the NFA. In the "next NFA" would normally be at the end of the first revolution as it starts before the index but in practice SCP place it in the second revolution (this make sense as the SCP format does not provide a transition-to-index time.


No, SCP places it in the exact location in reference to the index. However, the NFA is not reported ever before the first revolution *if* the NFA occurs between revolutions, because there is no revolution 0 (only 1 through 5). You CAN determine the exact time from the index of the start of the NFA, even if it passes over the index pulse location, just not before the first revolution. I can tell you right down to the nanosecond (25ns resolution, which is nearly twice the resolution of Kryoflux) where the NFA occurs in reference to the index pulse. So, this is not a "problem", and as such there is no reason to change anything.

You can calculate the transition to index or index to transition time for any bitcell using the data that .scp image file format provides.
I am the flux ninja

Jeff_HxC2001
Captain Atari
Captain Atari
Posts: 309
Joined: Fri Sep 21, 2007 7:35 pm
Location: Paris - France
Contact:

Re: No Flux Area located over index

Postby Jeff_HxC2001 » Tue Jan 27, 2015 10:47 pm

DrCoolZic wrote:I have created an archive for you to test. The NFA over index is located in track 8.
Note I also have an image from Jim of Turrican but the NFA are located at different positions and none overlap index.
This seems to indicate that the "NFA protection" does not care about the position of the NFA on the track. And therefore if during decode the NFA is shifted it work. So you might just say "then who cares if the content/display is not accurate"?

Again few things to know. It is not by accident that the Kryoflux device samples data before the index! Currently SCP does not and therefore cannot provide correct information for NFA over index (and actually first transition is always lost - but in normal case nobody care) because in that case the NFA transition starts long time before the index. So in the first revolution SCP starts at the first transition after the index i.e. after the end of the NFA. In the "next NFA" would normally be at the end of the first revolution as it starts before the index but in practice SCP place it in the second revolution (this make sense as the SCP format does not provide a transition-to-index time. In latest version of Aufit viewtopic.php?f=104&t=25906&p=266034#p266034 I compute "the missing information" relatively close to reality. Try to compare the SCP with the KF version.

I suspect that solving this problem would require a big change in SCP and seems like nobody care anyway :oops:

Test case can be downloaded here https://mega.co.nz/#!xwgAlIbK!pv8GvXv-O ... mOHJZtOufE


Thanks. the NFA over index is now supported for KF streams:
http://hxc2001.com/download/floppy_driv ... t_beta.zip


Social Media

     

Return to “Floppy Disk Preservation”

Who is online

Users browsing this forum: No registered users and 1 guest