Kryoflux: How to setup?

Anything related to the tools Tap2Wav, Tap2CD, Tap2Dsk, Sedoric Disc Manager, Tape Header Creator, WriteDsk, and generaly speaking tools related to the management of Oric data files and devices.
Post Reply
User avatar
Dbug
Site Admin
Posts: 3294
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Kryoflux: How to setup?

Post by Dbug » Sat Mar 23, 2019 8:52 pm

So, I got myself a Kryoflux device a few months ago, and since I'm planning on formating a few floppies for my own usages, I'd like first to archive whatever is already on the floppies in order to avoid lose potentially important data that could be of interest to some people.

I know that some floppies contains Amstrad stuff, some other contain some Jasmin TDOS data, and I have a few older Sedoric disks.

My question is: How do you use the Kryoflux (either the DTC command line tool or the UI tool) to read the content of our 3" floppies to save into something that could be converted back to some emulator format?

Random example: I have a 3" floppy with Barbitoric on it, how can I recreate a valid Oric Emulator DSK file from it?

Thanks!

User avatar
Symoon
Archivist
Posts: 1862
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Kryoflux: How to setup?

Post by Symoon » Sat Mar 23, 2019 9:59 pm

I think your best chance would be to ask someone like Brume, from the ST scene. He won't help you specifically on Oric disks but he's used it a lot for ST I think.

User avatar
iss
Wing Commander
Posts: 1033
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Kryoflux: How to setup?

Post by iss » Sun Mar 24, 2019 11:37 am

From what I've read quick in some Kryoflux docs, I think there is NO easy way to get directly Oric-DSK image.
IMO you need to use RAW MFM 300rpm format to capture 40+/80+, single/double side floppies.
Having these per-track-image files we can create a parser to extract the actual data and recreate Oric-DSK compatible file.
Unfortunately I don't know if such tool exist already (maybe it's worth to try HxC related software).

User avatar
Dbug
Site Admin
Posts: 3294
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Kryoflux: How to setup?

Post by Dbug » Sun Mar 24, 2019 2:00 pm

The HxC software can read DSK files, but not write them (it's not implemented):
http://torlus.com/floppy/forum/viewtopi ... 040#p20040

That being said, you may be right with the Kryoflux raw parser, that may be the simplest way to implement the converter.

User avatar
NekoNoNiaow
Flight Lieutenant
Posts: 272
Joined: Sun Jan 15, 2006 10:08 pm
Location: Montreal, Canadia

Re: Kryoflux: How to setup?

Post by NekoNoNiaow » Sat Mar 30, 2019 6:07 pm

iss wrote:
Sun Mar 24, 2019 11:37 am
From what I've read quick in some Kryoflux docs, I think there is NO easy way to get directly Oric-DSK image.
IMO you need to use RAW MFM 300rpm format to capture 40+/80+, single/double side floppies.
Having these per-track-image files we can create a parser to extract the actual data and recreate Oric-DSK compatible file.
Unfortunately I don't know if such tool exist already (maybe it's worth to try HxC related software).
My knowledge of the Kryoflux dates from one or two years but it echoes what you just said.
The IPF format output by Kryoflux does not translate in an obvious way to standard bit-based formats since it is composed of multiple readings of the magnetic flux so as to capture subtleties such as "random bits" (they change value randomly when read), which were used for floppy protections.
This allows to faithfully reproduce the behavior of protected floppy disks (such as Dungeon Master's random bits based protection) but makes translation to actual floppy bits difficult, especially because IPF is apparently more like a combination of flux generating scripts (if I remember it correctly) than actual data.

This said, it is perfectly possible to use Kryoflux scanned data inside emulators.
I think the Kryoflux guys wrote an IPF library which allows emulators to dynamically translate IPF "disks" into emulated floppy disks: the library will correctly re-generate the bit flux on demand when directed by the emulator.
The Amiga emulator WinUAE uses this to play protected games and this works great: scan your originals to IPF, then you can play them, including the protection inside your emulator, legally! ;)

I assume that this should be perfectly doable as well for Oric emulators.

Cf this English Amiga Board thread for info about the library: http://eab.abime.net/showthread.php?t=74143.

User avatar
Symoon
Archivist
Posts: 1862
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Kryoflux: How to setup?

Post by Symoon » Sat Mar 30, 2019 6:17 pm

In the end, it's more or less the same process than tapes: analogic reads and need for a clean reading (or multiple ones).
We could try building our own tools to read from the IPF file, as there's doc around that gives details about the file format.

User avatar
NekoNoNiaow
Flight Lieutenant
Posts: 272
Joined: Sun Jan 15, 2006 10:08 pm
Location: Montreal, Canadia

Re: Kryoflux: How to setup?

Post by NekoNoNiaow » Sat Mar 30, 2019 9:37 pm

For those who are interested by such support, I have just created corresponding feature requests for CLK and Oricutron that you can vote for and/or comment on. ;)
Here they are:
https://github.com/TomHarte/CLK/issues/614
https://github.com/pete-gordon/oricutron/issues/136

Cheers. ;)

User avatar
Dbug
Site Admin
Posts: 3294
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Kryoflux: How to setup?

Post by Dbug » Sun Mar 31, 2019 11:20 am

Integrating the Kryoflux format in the emulators would definitely simplify the archiving process: Rip a floppy, mount the stream in the emulator, if it works well save it into a DSK.

Does that work in the other direction as well, being able to generate Kryoflux files so you can rebuild physical floppies?

User avatar
NekoNoNiaow
Flight Lieutenant
Posts: 272
Joined: Sun Jan 15, 2006 10:08 pm
Location: Montreal, Canadia

Re: Kryoflux: How to setup?

Post by NekoNoNiaow » Sun Mar 31, 2019 3:42 pm

Dbug wrote:
Sun Mar 31, 2019 11:20 am
Integrating the Kryoflux format in the emulators would definitely simplify the archiving process: Rip a floppy, mount the stream in the emulator, if it works well save it into a DSK.

Does that work in the other direction as well, being able to generate Kryoflux files so you can rebuild physical floppies?
When I looked at Kryoflux two years ago, this was not possible at the time but I think they and the community (on the Amiga at least) have been actively working on such a feature. This said, I kinda remember the Kryoflux guys being wary of this allowing piracy so they may have refrained from implementing this.

For floppy disks with protection though, there are limitations to what can be written back to the disk though as that requires more magnetic head precision than what regular floppy drive allow. Reading is fine because it does not need to have a perfect recording of the magnetic flux since it does multiple passes to capture "irregular bits" but as far as I understand it normal disks may not be able to re-generate protections correctly.

This said, this is old knowledge and may be now wrong. ;)

ThomH
Flying Officer
Posts: 205
Joined: Thu Oct 13, 2016 9:55 pm

Re: Kryoflux: How to setup?

Post by ThomH » Tue Apr 02, 2019 2:02 pm

IPF support in Clock Signal would be a really useful thing, I think. I've so far deferred for two reasons: the library provided duplicates quite a lot of what Clock Signal already does, making its wholesale inclusion undesirable; and I tend to run from anything which has been overtly politicised.

That being said, I'm currently knee-deep in adding the 68000 as an emulated processor so IPF's new ubiquity in the world of 68000 micro emulators substantially increases the argument in favour.

So, one polite request: if any Oric (or, indeed, unknown Oric-or-CPC) IPFs exist or are soon created, it would be really useful to have copies.

In the meantime, don't forget that Clock Signal offers full HFE support, so if using that as an intermediary somehow fills in the missing link in an IPF to DSK pipeline for the time being, fill your boots.

EDIT: actually, it's better than that. Clock Signal will consider starting an Oric only if presented with a DSK or HFE, but once an Oric is running you can insert any supported disk image format into it. So, trying to restrict myself to image types that are likely fully to represent an Oric disk, if you can get to an Amstrad CPC-style DSK or a DMK then that might work.

ThomH
Flying Officer
Posts: 205
Joined: Thu Oct 13, 2016 9:55 pm

Re: Kryoflux: How to setup?

Post by ThomH » Thu Dec 26, 2019 6:50 pm

Belated follow-up on this: I'm currently working on the Atari ST in Clock Signal and there's a file-format in that world called 'Pasti' (extension STX) that I think could be a good fit for for an Oric.

Of course I'm applying my own spin to this, but it appears to be simply: all data that was interesting, that was found using any enquiry tool available on a real Atari ST. The Atari ST has a WD1772, which is very, very similar to the FDC used in both the Jasmin and the Microdisc. Included in the file, at most, is:
  • the raw result of a WD read track command;
  • a list of sectors that were found when trying to read sector, along with the bodies (indexed into the read track if they were captured accurately there) and final status information (so, whether there was a CRC error, mainly);
  • a fuzzy-bit mask indicating where different results were observed during multiple reads; and
  • a speed table, indicating how long each 16-byte chunk of data took to load (the ST uses DMA for floppy reads but transfers in 16-byte increments, so the CPU has time to accumulate this information, but only at that precision).
If there are no fuzzy bits, nothing interesting was observed in terms of speed variation, and the sector contents didn't throw up any unintended C1 syncs then it ends up looking a lot like the existing Oric .dsk format but with an explicit record as to where the syncs should go via the sectors table.

I would argue in favour of this format on the grounds that:
  • it has proven sufficient for all protected Atari ST software, which is a machine with an essentially similar FDC to the Oric and on which coming up with protection schemes had a high economic imperative;
  • it can be captured on an original machine (likely without speed information from an Oric, and I guess you'd probably need a dual drive machine that imaged one track at a time and wrote a partial STX to the other drive, or you'd have no way of exporting the data); and
  • as a consequence of containing in effect "this what you see with this WD command, this is what you see with that WD command", it's easy to wire up in an emulator that binds file formats and the WD emulation.
Alas my emulator is not one of those, so I'm having to work on reconstructing the original track, but I've made my own bed there. I don't think it'll be too hard to disambiguate Atari images and Oric images as the boot sectors look completely different, so I might just add this to Clock Signal of my own volition.

User avatar
iss
Wing Commander
Posts: 1033
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Kryoflux: How to setup?

Post by iss » Thu Dec 26, 2019 9:44 pm

ThomH wrote:
Thu Dec 26, 2019 6:50 pm
... file-format in that world called 'Pasti' (extension STX) that I think could be a good fit for for an Oric.
Hi, @ThomH! I'm happy to "see" you around and thanks for the interesting info.
I follow your updates in CLK regularly, compiling after every commit with hope to find a way to load DSK file in the second drive ;)...

ThomH
Flying Officer
Posts: 205
Joined: Thu Oct 13, 2016 9:55 pm

Re: Kryoflux: How to setup?

Post by ThomH » Thu Dec 26, 2019 10:15 pm

iss wrote:
Thu Dec 26, 2019 9:44 pm
ThomH wrote:
Thu Dec 26, 2019 6:50 pm
... file-format in that world called 'Pasti' (extension STX) that I think could be a good fit for for an Oric.
Hi, @ThomH! I'm happy to "see" you around and thanks for the interesting info.
I follow your updates in CLK regularly, compiling after every commit with hope to find a way to load DSK file in the second drive ;)...
Easy, just drag and drop two at the same time. It can't fit them both into the first drive!

Yeah, though, my obsession with being the click-and-play emulator does sometimes go a bit too far in terms of not pushing the user through a UI, by just not offering things that users might want. To my mind the proper interface here would be: when you drag a file over the window, a bunch of logical buckets fade in over the UI, in the Oric's case if it had realised you were dragging in a disk image it might bring up four of them, labelled as Drives 1 to 4. Possibly also with some sort of indication as to which are currently occupied. Just drop on whichever drive you like. It doesn't affect File -> Open... as the way just to load a game, who cares for which machine, and it displays the extra complexity only when it's contextually appropriate.

That said, my next Oric change was just going to be support for the Jasmin disk interface. It'll probably have to disassemble the boot sector to recognise that it's for the Jasmin but that's no problem. It uses disassembly to decide between BASIC 1.0 and BASIC 1.1 when you load a tape so everything is already there to do that.

Although I'm never completely sure which way development is going to arc, I definitely need a polish and consolidation phase soon.

User avatar
iss
Wing Commander
Posts: 1033
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Kryoflux: How to setup?

Post by iss » Thu Dec 26, 2019 11:09 pm

ThomH wrote:
Thu Dec 26, 2019 10:15 pm
Easy, just drag and drop two at the same time. It can't fit them both into the first drive!
Cool! I just recently discovered the drag-n-drop feature (macOS/Linux) :).
I'm trying to finish the triple-boot (actually quadruple-boot with Telestrat) which in past was detected by CLK as Apple][ because of Pravetz-8D boot code in first sector but now it defaults to Microdisc and IMO it's the best case!
See it HERE in action ;)

ThomH
Flying Officer
Posts: 205
Joined: Thu Oct 13, 2016 9:55 pm

Re: Kryoflux: How to setup?

Post by ThomH » Thu Dec 26, 2019 11:47 pm

iss wrote:
Thu Dec 26, 2019 11:09 pm
ThomH wrote:
Thu Dec 26, 2019 10:15 pm
Easy, just drag and drop two at the same time. It can't fit them both into the first drive!
Cool! I just recently discovered the drag-n-drop feature (macOS/Linux) :).
I'm trying to finish the triple-boot (actually quadruple-boot with Telestrat) which in past was detected by CLK as Apple][ because of Pravetz-8D boot code in first sector but now it defaults to Microdisc and IMO it's the best case!
See it HERE in action ;)
Well naturally I'm going to try to work out how you spotted that you're in an emulator and possibly try to ensure that you can't, but only within certain bounds. E.g. if you're spotting that Clock Signal has a certain interpretation of DSK files that is identifiably unique but is nevertheless within the spec then I don't see a problem. But if you've spotted that I'm getting a WD flag wrong or something like that then that'd be a bug. I actually only just added an observable index pulse, for example — it was previously completely instantaneous. I also dare imagine that ramping up on the Atari ST will provoke a multitude of further WD fixes, and possibly some new AY insight. Though that's sort of the point of being a multi-machine emulator.

On Apple GCR disks, hopefully in the past you mean before last May which was when I finally added the Pravetz; since then the process has been: if Apple II-style GCR, try to load track 0, sector 0. Assuming that loads, disassemble it. Then look for a BPL loop that is polling 0x31c, where the data register lives in an Oric. If there is one, classify as a Pravetz image. Also if there are any JSRs or JMPs to the region 0x320 to 0x400, where the Pravetz boot ROM lives, classify as a Pravetz image. The Apple has RAM in that area and doesn't load the boot sector there, so neither thing is likely on an Apple II, indeed both would be expected to crash the machine. So if neither of those things is found, treat as an Apple image.

Prior to implementation of the Pravetz the logic was simply: if this is an Apple II-style GCR disk, launch an Apple II.

Post Reply