QL Net server to back-up Spectrum files?

A place to discuss general QL issues.
stephen_usher
Trump Card
Posts: 160
Joined: Tue Mar 11, 2014 8:00 pm

QL Net server to back-up Spectrum files?

Postby stephen_usher » Sun Sep 29, 2019 4:58 pm

I'm trying to think of ways to back-up the data on my Spectrum Microdrives once I re-felt them, assuming that the vDriveQL can't talk to an Interface 1 (once it arrives).

I'm wondering if I could run the TK2 fserve on a QL with connected GoTek and use the ZXNet/QLNet to transfer the files onto a virtual floppy. Any idea if it'll work?


User avatar
dex
Trump Card
Posts: 208
Joined: Thu Dec 23, 2010 1:40 pm

Re: QL Net server to back-up Spectrum files?

Postby dex » Sun Sep 29, 2019 5:38 pm

I'm trying to think of ways to back-up the data on my Spectrum Microdrives once I re-felt them, assuming that the vDriveQL can't talk to an Interface 1 (once it arrives).

I have what I believe is paper printout of the source of routines for reading a ZX Spectrum formatted microdrive cartridge on a QL.
But it is uncertain, if it will run with vDrive (meaning the ZX version).
I'm wondering if I could run the TK2 fserve on a QL with connected GoTek and use the ZXNet/QLNet to transfer the files onto a virtual floppy. Any idea if it'll work?

No. Only the base ROM commands (LOAD/SAVE/INPUT/PRINT) are compatible.
ZX Interface 1 does not handle the TK II based extensions (FSERVE, request for file, ...).

You have to handle it other way.
E.g., write your own "server" program, listening for a command (to send a file or receive one) from ZX Spectrum.
On ZX Spectrum, you will first PRINT# the command to the QL and then capture the file using LOAD from network (or SAVE the file to network).


stephen_usher
Trump Card
Posts: 160
Joined: Tue Mar 11, 2014 8:00 pm

Re: QL Net server to back-up Spectrum files?

Postby stephen_usher » Sun Sep 29, 2019 5:49 pm

dex wrote:
I'm trying to think of ways to back-up the data on my Spectrum Microdrives once I re-felt them, assuming that the vDriveQL can't talk to an Interface 1 (once it arrives).

I have what I believe is paper printout of the source of routines for reading a ZX Spectrum formatted microdrive cartridge on a QL.
But it is uncertain, if it will run with vDrive (meaning the ZX version).


Well, at the moment the data is on the original cartridges, so if they can be read by the QL that's a bonus. The final destination will be on a modern filesystem somewhere, using a QL emulator to read the floppy image produced on the Flashfloppy'd GoTek probably.

dex wrote:
I'm wondering if I could run the TK2 fserve on a QL with connected GoTek and use the ZXNet/QLNet to transfer the files onto a virtual floppy. Any idea if it'll work?

No. Only the base ROM commands (LOAD/SAVE/INPUT/PRINT) are compatible.
ZX Interface 1 does not handle the TK II based extensions (FSERVE, request for file, ...).

You have to handle it other way.
E.g., write your own "server" program, listening for a command (to send a file or receive one) from ZX Spectrum.
On ZX Spectrum, you will first PRINT# the command to the QL and then capture the file using LOAD from network (or SAVE the file to network).


Hmm... OK. Shouldn't be *too* difficult I imagine.


User avatar
dilwyn
Mr QL
Posts: 1513
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: QL Net server to back-up Spectrum files?

Postby dilwyn » Sun Sep 29, 2019 7:46 pm

In case it helps, there was a listing from G P Clark who used the network to transfer program files from QL to Spectrum:
QL User January 1986, page 13

There were also articles on linking QL and Spectrum by RS232 for file transfer:
QL User Oct, Nov, Dec 1986

Quanta Library has a program called convertor_bas on disk CT 02

Most people say that Spectrum to QL networking is, well, more notworking than networking, but some peole have said over the years they've managed to get some degree of communication going. At least these listings give you a start point for testing what your setup can achieve.


Dilwyn
All things QL: see www.dilwyn.me.uk
User avatar
tofro
QL Wafer Drive
Posts: 1647
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: QL Net server to back-up Spectrum files?

Postby tofro » Sun Sep 29, 2019 10:20 pm

At the last German meeting in Mahlerts we on-the-fly-connected a QLAN-enabled Q68 and a Spectrum with Interface 1. It seemed to work relatively flawlessly. Transfer back and forth was fine.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Peter
Aurora
Posts: 903
Joined: Sat Jan 22, 2011 8:47 am

Re: QL Net server to back-up Spectrum files?

Postby Peter » Mon Sep 30, 2019 10:19 am

It was only the Q68 though, the original QL showing the old problems also at Mahlerts. Martyn's Q68 driver is actually closer to specification, but I forgot which specific aspect explained the better communication with the Spectrum.


martyn_hill
Super Gold Card
Posts: 523
Joined: Sat Oct 25, 2014 9:53 am

Re: QL Net server to back-up Spectrum files?

Postby martyn_hill » Mon Sep 30, 2019 10:36 am

Hi Stephen!

Your current requirement poses a very interesting use-case that I have been investigating myself as a spin-off from my on-going research in to the QL NET capability.

To add to what has already been suggested, here are some thoughts to get you moving...

The fundamental issues to be addressed would be:

a) Getting a reliable connection between QL and Spectrum/Int-1:
- My testing has highlighted very slight timing differences between the two platforms that renders receiving FROM Spectrum TO QL quite unreliable.
- There is also an (undocumented) bug in the Int-1 ROM (v1 or v2) that further exacerbates an unreliable transfer (I can provide details separately.)
- The different QL Issue boards can have an impact here, as much as it does between QLs (v6 or v7 being more reliable.)
- To-date, the most reliable method is between a Q68 and Spectrum - which is rock-solid! A (Super)GoldCard equipped QL as well as the QXL with its native NET ports can also be made pretty reliable when communicating with Spectrum (due tho their revised NET driver with adjustable timing constants.)

b) Understanding the different file-header formats between QDOS and Spectrum:
- The onous will be on the QL-side to account for the differences, feeding the Spectrum just what it expects and correctly interpreting what Speccy sends-back, instead of the other way (Int-1 ROM code is difficult to adjust - though not impossible.)
- QDOS uses a 15/64-byte Fileheader, whereas Spectrum uses a 9-byte equivalent.
- From the QLs perspective, the Spectrum files would be pure byte/LBYTES-like files, with the first 9-bytes just happening to contain the Spectrum's fileheader.
- The QL's fileheader would need to be stripped from the byte-stream when sent TO Spectrum, either by sending the file-contents over a simple NET channel (thus no fileheader being appended) - and adjusting the Spectrum's MOVE command (see below), or else devising a simple BASIC prog on the Spectrum to read as a PRINT file in to memory, then SAVE as the appropriate filetype (code, screen, basic, array etc) to local MDV.

c) As per Dex - given that Spectrum can't speak FSERVE's client-server protocol directly, some out-of-band means is needed to alert the QL that Spectrum wants to send or receive files, or else to get a directory/CAT listing of available files.
- Using a PRINT channel to send 'commands' before each transfer is a good approach, as Dex suggested.

d) Transfer of non-PRINT files:
- Unfortunately, the otherwise powerful MOVE command on the Spectrum is deliberately crippled to make the actual transfer of non-PRINT files tedious - there is the 'Any MOVE' add-on command for the Spectrum that can circumvent this and would prove pivotal in this context. The Z80 assembler for this command is available from both the two authoritative ZX Spectrum ROM/Int-1 books that were published (and still available on line if you know where to look!)

- Eventually, I'd like to see a full QL/Spectrum fileserver developed with supporting code at both ends - I have several ideas for this, but it would be a longer term project.

Don't let the detail above put you off - there are some simpler ways to achieve what you're attempting, but you will at least need a reliable 2-way connection before making any progress.

The route of native reading/writing Spectrum MDV tapes is an alternative. Unfortunately, the MDV IO-Toolkit available on Dilwyn's site, whilst it includes the documentation for the Spectrum reading/writing commands, does not include the version of the Toolklit needed to support those commands.

Good luck!


stephen_usher
Trump Card
Posts: 160
Joined: Tue Mar 11, 2014 8:00 pm

Re: QL Net server to back-up Spectrum files?

Postby stephen_usher » Mon Sep 30, 2019 9:03 pm

Hmm... Interesting.

Well, I think I've found a way of manually transferring the files one at a time to a virtual MDV on the PC.

Basically:

MDV->Spectrum128K->* MOVE "m";1;"filename" TO "c"->audio cable->PC->Spectaculator emulator->virtual 128K->* MOVE "c";;"filename" TO "m";1->virtual MDV

A bit annoying though.

Once it's in an MDR file I can use utilities to extract the files if needs be. There are one or two screen files I'd certainly want to extract and make into BMP files.

Note: "* MOVE" is a BASIC extension loaded by the "copier" program on the ZX Microdrive demo cart.


User avatar
Andrew
Gold Card
Posts: 261
Joined: Tue Jul 17, 2018 9:10 pm

Re: QL Net server to back-up Spectrum files?

Postby Andrew » Mon Sep 30, 2019 9:58 pm

stephen_usher wrote:Hmm... Interesting.

Well, I think I've found a way of manually transferring the files one at a time to a virtual MDV on the PC.

...

Wouldn't a vDriveZX be a simpler approach ?


stephen_usher
Trump Card
Posts: 160
Joined: Tue Mar 11, 2014 8:00 pm

Re: QL Net server to back-up Spectrum files?

Postby stephen_usher » Mon Sep 30, 2019 10:17 pm

Well, I only really want to extract the data once. A vDriveZX is quite expensive for that one-off job.

I do have a vDriveQL on its way from New Zealand at the moment, however, I don't think that will work with the Spectrum even with a twisted cable. I did ask in another thread about this but got no answer.



Who is online

Users browsing this forum: No registered users and 2 guests