16 July 2014, 12:31 | #1 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
Converting between SuperCard Pro and Kryoflux raw/stream file formats
Is any software available to convert between the raw/stream file formats used by Kyroflux and SuperCard Pro?
If not, I'm hoping it wouldn't be impossibly hard to write my own converter... |
17 July 2014, 12:18 | #2 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
You are going to alias data that has already been aliased during sampling by each hardware... if you really want to do it, you need to do proper sampling conversion, like an audio software does, otherwise you introduce drifts and shifts that are not there in the first place in either original, unconverted data.
So if you are familiar with audio processing or dsp then it's not too difficult, if you are not, it's easy to do something that seems to work, but is incorrect and may render any later analysis unfeasible, due to cell jitter, peak shifts, compression etc introduced during conversion. Last edited by IFW; 17 July 2014 at 12:30. |
17 July 2014, 12:25 | #3 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
Ideally, you read and represent the samples in a very high numerical resolution reading the original data from any of the formats, then you resample to the selected target format.
This way you could avoid most of the artefacts introduced by anything simpler. |
20 July 2014, 12:13 | #4 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
Ah okay. To avoid a complex not-entirely-lossless conversion process, would it be possible for a future version of the Kryoflux software (DTC?) to also support reading/processing .scp image files?
So if a Kryoflux owner obtains some .scp image files (of normal Amiga disks for this example), they could use DTC to convert them to ADF prior to writing back to a real floppy disk. |
20 July 2014, 18:12 | #5 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
The HxC floppy emulator software can convert to/from SCP and KF image formats. No need to write anything, it's already done!
SCP can convert a .scp flux image into a .adf image. From there you can also use a variety of programs to write the adf back to a disk. I am testing the SCP's new .adf writing code right now. So, besides being able to go from disk->flux->adf, you will also be able to go adf->flux->disk. I assume you are just trying to write adf images back to disk? Last edited by JimDrew; 20 July 2014 at 18:18. |
20 July 2014, 19:11 | #6 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
I'll make note of this request.
|
25 July 2014, 18:14 | #7 | |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
Quote:
|
|
29 July 2014, 08:18 | #8 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
That is correct, however, keep in mind that when going from KryoFlux to SuperCard Pro format there will be a loss of resolution. SuperCard Pro samples flux at a 25ns resolution and KryoFlux samples flux at a 41.66ns resolution.
|
30 July 2014, 06:19 | #9 | |
Da Digger :)
Join Date: Nov 2008
Location: Monza, Italy
Posts: 2,822
|
Quote:
P.S. I asked this before but got no clear answers: where can these .scp images be found? Is there a repository or something? Thanks |
|
30 July 2014, 08:25 | #10 | |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Quote:
I am sure you won't get clear answers from anyone about this publicly if they are hosting copyrighted images. I know there are sites that exist, but I don't keep track of them. |
|
30 July 2014, 18:42 | #11 | |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 44
Posts: 4,190
|
Quote:
If so, it will be hard to convert back and forth without issues. One time may work, but it will quickly deteriorate. If one of the two flux formats is analog (=a significant number of bits), it will be much better since much more information will be retained as you will also have timing information in the amplitude (if resampled properly). This timing information is thrown away when you quantize the output to 2 levels. Notice that no matter how well it is done, resampling will always be lossy and converting back and forth several times will result in a successively degrading copy. |
|
31 July 2014, 01:43 | #12 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
It is the timing between flux reversals that is being sampled by any of these devices, as that is the only thing you can access without modifying the drive hardware.
In other words, there is no amplitude information, it's all sampling an analog signal quantized to digital by the drive head filtering/AGC - that is the digital signal being timed by all of the devices. The quantization varies from drive to drive. The sampling resolution simply refers to the aliasing factor in this case, not the number of samples taken per second. In other words, the time between two signals will be aliased to a multiple of whatever resolution is used for sampling plus the side effects of drive speed wobble etc. There is absolutely nothing you can do about this, quite simply because you'd need a drive that was writing exactly at the same speed (to the nanosecond level) as is the drive you are using to sample the data as well as identical filtering circuitry... which is plain impossible due to how these drives work. Any processing you do with the sampled digital data, such as resampling does introduce degradation, quality depending on how good the resampling you do is... but as you say each round trip would contribute to the loss of precision. |
31 July 2014, 01:51 | #13 | ||
Da Digger :)
Join Date: Nov 2008
Location: Monza, Italy
Posts: 2,822
|
Quote:
Quote:
I really don't understand why: - exchanging .adf files of copyrighted material: ALLOWED - exchanging .scp files of copyrighted material: NOT ALLOWED Copyrighted material is copyrighted material, regardless the media used. |
||
31 July 2014, 01:57 | #14 | |
Da Digger :)
Join Date: Nov 2008
Location: Monza, Italy
Posts: 2,822
|
Quote:
|
|
31 July 2014, 11:25 | #15 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
The sampling is already lossy for any device of this kind, but the "loss" is aliasing exact timings to nearby timings. The drive speed wobble contributes as well, not to mention the quantizing done by the filtering circuitry in the drive...
So no matter what you do, it's lossy by nature, just like saying sampling any analog source - while what you sample is the timing of a digital signal, but the digital signal has been converted from analog by the drive first and is subject to small deviations. The only thing you change with the sampling resolution is that where "rounding" (aliasing) will occur, ie every Nth sample - but again, this will constantly change. e.g. to demonstrate this, some random numbers: 10 10 11 10 10 10... vs 9 9 9 10 9 9... Or think about plotting a graph, where fractions are aliased to integer values and depending on the result they fall into a specific value. Another example is the jaggies in computer graphics, where you need anti-aliasing to compensate for the rounding because they cause visual artefacts - it's exactly same case as plotting graphs; you try to represent fractional values in a system where only integers are present. Notice the word "represent" - that does not imply that your data is incorrect; the original data is correct, and can be easily reconstructed. What does matter is that only the values alias, the sampling hardware itself does not - so the sum of timings stored in the samples are identical, where rounding happens and in what way is different. As for resampling, you can get it very good, if done properly. Thinking about it a bit more, if done at sufficiently high resolution, in the first round of the conversion you'll get some timings moving a bit (think in nanoseconds...) then you'll get a slight oscillating effect for each round-trip, but essentially two fixed variants of the second generation data as long as the resampling algorithm is consistent. A good example of this would be RGB <> HSV conversion where the exact values first don't match, but after a second conversion they become stable - as long as the conversion is done at least in floating point resolution, but ideally higher... We are talking about differences oscillating in the nanoseconds realm here, and to put this into perspective the data is represented in microseconds where 1us is 1000ns... and e.g. in MFM DD encoding (Amiga) the smallest valid flux reversal is 4us, ie 4000ns - so we are talking about a very small error here, a few ns vs 4000ns (min). So unless it is some next to unreadable data where the different recording bands are almost bleeding into each other, the conversion should make no difference to the actual content. I must stress the point here: "if done properly" Last edited by IFW; 31 July 2014 at 11:53. |
02 August 2014, 22:48 | #16 | ||
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 44
Posts: 4,190
|
Quote:
Quote:
|
||
03 August 2014, 06:53 | #17 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
I have found that any sampling faster than 20ns doesn't improve the image quality, but there is a significant differnce between 25ns and 50ns sampling.
I chose 25ns because the PIC is used runs at 160MHz internal to give 40 samples per microsecond. I made a new version with <15ns sample rate, but it was a waste so I kept it the same. |
03 August 2014, 06:57 | #18 | |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Quote:
I don't keep track of these sites, because I don't want to know. |
|
03 August 2014, 16:24 | #19 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
Yes, that pretty much sums up the effect you'd have with proper resampling
|
03 August 2014, 18:06 | #20 |
R.I.P Smudge 18-08-16
Join Date: Aug 2005
Location: Leicester/UK
Age: 66
Posts: 3,968
|
Have I got this right, the op has Kryoflux (.raw) & SuperCardPro (.scp) images and wants to convert them to either format?
Why would you want to do that? |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[REQUEST] - KryoFlux RAW image support | amigafreak68k | support.FS-UAE | 6 | 24 June 2014 07:48 |
SuperCard Pro disk recovery to ADF | JimDrew | News | 9 | 11 April 2014 23:05 |
Supercard Pro Case | kipper2k | Hardware mods | 4 | 25 March 2014 20:45 |
SuperCard Pro - Real disk images with WinUAE! | JimDrew | support.WinUAE | 72 | 22 March 2014 09:12 |
KryoFlux: STREAM file format documentation | mr.vince | project.SPS (was CAPS) | 1 | 26 May 2011 00:40 |
|
|