John Elliot does it again! Re: TOS disks.
http://groups.google.co.uk/group/comp.sys.amstrad.8bit/browse_thread/thread/aa809b6f6b9c6f7f#
It is now possible (and easier) to extract files from 3" Timex FDD discs, thanks to John Elliot!
Using the same method but with different parameters it was possible to extract files from a Timex CP/M disk image:
http://groups.google.com/group/comp.sys.sinclair/browse_thread/thread/c9ba8b1e055da68d/486e97a07a16d7f5#486e97a07a16d7f5
Here's some quotes:
Who knows, maybe this will pave the way for Timex .DSK to +3 .DSK conversions. That way the FDD emulation won't be so needed.

And now Andy has another way to preserve Spectrum software that might be buried in Portuguese and Polish 3" discs.
It is now possible (and easier) to extract files from 3" Timex FDD discs, thanks to John Elliot!

Using the same method but with different parameters it was possible to extract files from a Timex CP/M disk image:
http://groups.google.com/group/comp.sys.sinclair/browse_thread/thread/c9ba8b1e055da68d/486e97a07a16d7f5#486e97a07a16d7f5
Here's some quotes:
Bruno Florindo <zxspectrum...@gmail.com> wrote:
: I'm afraid not. :(
: I kept searching and I found this page:
: http://timex.comboios.info/tos.html
: I'm not sure if the technical informationt there would help.
Interesting. The directory format's certainly CP/M, though the entries
starting with a 0xFF byte aren't standard. The software skew probably rules
out access with +3 CP/M or PCW CP/M, at least without patching; they tend to
assume hardware skewing.
I managed to read the files on the example .DSK file you sent me, using
a collection of tools under Unix:
1. Have libdsk and cpmtools installed.
2. Add the following definition to .libdskrc:
[FDD3000]
Description = Timex FDD3000
Sidedness = Alt
Cylinders = 40
Heads = 1
Sectors = 16
SecBase = 0
SecSize = 256
DataRate = SD
RWGap = 12
FmtGap = 23
FM = N
Multitrack =Y
SkipDeleted = Y
3. Add the following definition to /usr/local/share/diskdefs:
diskdef fdd3000
seclen 256
tracks 40
sectrk 16
blocksize 1024
maxdir 128
boottrk 4
os 2.2
skew 7
end
4. Convert from DSK to raw, to make life easy for cpmtools:
dsktrans -otype raw -format FDD3000 D01A.DSK D01A.ufi
5. Extract the files:
cpmcp -f fdd3000 0:\* .
I took a look at a couple of files with a hex editor to check they'd
arrived safely, which they seemed to have.
6. Convert the file headers to +3DOS. I wrote, in extreme haste, a C program
to do this, which you'll find at the end of this post. It's mucky and the
error checking is in serious need of improvement.
7. Stick the resulting +3DOS files in a .TAP so an emulator could get at
them:
tapcat -N all.tap *.zxb
And here's the source for the program that converts Timex headers to +3DOS.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned char p3dos[128];
unsigned char timex[7];
void convert(const char *tname)
{
char p3name[80];
FILE *fpi, *fpo;
long len, p3len;
int c, hl;
unsigned char sum;
memset(timex, 0, sizeof timex);
memset(p3dos, 0, sizeof p3dos);
fpi = fopen(tname, "rb");
if (!fpi) { perror(tname); return; }
fseek(fpi, 0, SEEK_END); len = ftell(fpi); fseek(fpi, 0, SEEK_SET);
c = fgetc(fpi); if (c == EOF) goto timexeof;
timex[0] = c;
if (c > 3)
{
fprintf(stderr, "%s: Unknown format\n", tname);
fclose(fpi);
return;
}
if (c == 0) hl = 7;
else hl = 5;
if (fread(timex + 1, 1, hl - 1, fpi) < (hl - 1)) goto timexeof;
/* Generate +3DOS header */
p3len = (len - hl) + 128;
memcpy(p3dos, "PLUS3DOS\032\001", 10);
p3dos[11] = p3len & 0xFF;
p3dos[12] = (p3len >> 8) & 0xFF;
p3dos[13] = (p3len >> 16) & 0xFF;
p3dos[14] = (p3len >> 24) & 0xFF;
p3dos[15] = timex[0];
if (timex[0] == 0)
{
memcpy(p3dos + 16, timex + 3, 2);
memcpy(p3dos + 18, timex + 1, 2);
memcpy(p3dos + 20, timex + 5, 2);
}
else
{
memcpy(p3dos + 16, timex + 1, 4);
}
for (c = sum = 0; c < 127; c++)
{
sum += p3dos[c];
}
p3dos[127] = sum;
sprintf(p3name, "%s.zxb", tname);
fpo = fopen(p3name, "wb");
if (!fpo) { perror(p3name); fclose(fpi); return; }
fwrite(p3dos, 1, 128, fpo);
while ((c = fgetc(fpi)) != EOF)
fputc(c, fpo);
fclose(fpo);
fclose(fpi);
return;
timexeof:
fprintf(stderr, "%s: Unexpected EOF\n", tname);
fclose(fpi);
return;
}
int main(int argc, char **argv)
{
int n;
for (n = 1; n < argc; n++)
{
convert(argv[n]);
}
return 0;
}
In comp.sys.amstrad.8bit Zbigniew Niedzwiedz <zoon@lu.onet.pl> wrote:
: http://8bit.computer.lublin.pl/files/cpmtimex.zip
I managed to read both disks using the technique I described in
<imo9hg.sm4.ln@seasip.demon.co.uk>, though the second one needed a different
entry in diskdefs (only two system tracks, and a different skew):
diskdef fdd3000_2
seclen 256
tracks 40
sectrk 16
blocksize 1024
maxdir 128
boottrk 2
os 2.2
skew 5
end
% cpmls -F -f fdd3000_2 ya3011.ufi
Name Bytes Recs Attr update create
----
ASM .COM 8K 64
BACKUP .COM 2K 12
BIOS .ASM 12K 96
CBIOS .MAC 26K 201
CONFIGUR.COM 3K 19
DDT .COM 5K 40
DUMP .COM 1K 4
ED .COM 7K 52
FORMAT .COM 2K 12
KSIAZKI .I01 1K 3
KSIAZKI .I02 1K 3
KSIAZKI .I04 1K 3
KSJAZKI .DSC 8K 57
KSJAZKI .DTA 1K 1
LOAD .COM 2K 14
MOVCPM .COM 12K 92
PIP .COM 8K 58
STAT .COM 6K 41
SUBMIT .COM 2K 10
SYSGEN .COM 1K 8
XSUB .COM 1K 6
21 Files occupying 110K, 38K Free.
--
John Elliott
Who knows, maybe this will pave the way for Timex .DSK to +3 .DSK conversions. That way the FDD emulation won't be so needed.

And now Andy has another way to preserve Spectrum software that might be buried in Portuguese and Polish 3" discs.
Post edited by zxbruno on
Comments
I need help with some of these tools. If I understood correctly, cpmtools will only read TOS diks if libdsk is installed. I downloaded the win32 binaries for each one (yes, I'm a Windows user) but I can't figure out what to do next. Can anyone help me with the process?
You need to build cmptools to support libdsk, so you'll need the cmptools sources (http://www.moria.de/~michael/cpmtools/). And check the first heading in http://www.seasip.demon.co.uk/Unix/LibDsk/ for build instructions. You have mingw or Visual Studio? If not, I can probably build this for you and send you the binaries.
Now, the rest of John's comments seem to reflect the need to change some files from libdsk to support the new format. I don't know libdsk (or cmptools for that matter). But if these are only definition files that support the executables (like ini files), you should be set to go after you make the changes. This seems to be the case.
Otherwise, if they are source files, you'll need to make the changes and build libdsk too.
The two files that need changing are both plain-text configuration files. The .libdskrc file (note the leading dot) should be saved as a text file in your "My Documents" directory. The diskdefs file will be wherever cpmtools gets installed under Windows.
TIMEX2P3 on http://www.seasip.info/ZX/unix.html
I emphasise 'should' :)
I've tested the utility, and from the 18 TOS disk images I had, 12 appear to have been successfully converted! May I please e-mail you the other 6 to see if they present a different format?
I've tested the utility, and from the 18 TOS disk images I had, 12 appear to have been successfully converted! May I please e-mail you the other 6 to see if they present a different format?
edit: Ok, I can use CAT and see the contents of those 12 disks (on both sides), but the +3DOS says 'Bad Filename" when trying to load some of the files. Is there a way to change or truncate the filenames during conversion so that the +3 can load them, or is it easier to use a +3 tool to do this?
Here's an example of a listing:
SKETCH .BAS < 2 SPACES BEFORE EXTENSION
TIGRE .SCR < 3 SPACES BEFORE EXTENSION
I'm getting closer and closer to be able to run these programs again, but some cpdread had trouble reading some of them. I might have to try to rebuild a few things by hand.
And, yes, you can email me the other six to look at.
Work in progress and it looks promising. Anyone from Poland who has 3" or 5 1/4 disks and is reading this?
But now - only several (5?) ZX fans left in PL and... they all used mostly tapes. :) And nowadays they use divIDE or ZXVGS.
So - supposedly - most FDD3000 "fresh" infos is lost.
http://mister_beep.republika.pl/
Are you in Poland Mr. Beep?