• Please review our updated Terms and Rules here

Greaseweazle V4 reading M1 5.25 floppies on a SA400a drive

syzygy

Experienced Member
Joined
Apr 22, 2023
Messages
414
Location
North East USA
I have been trying to resurrect some M1 drives (see https://forum.vcfed.org/index.php?threads/resurrecting-model-1-floppy-drives-my-turn.1242850/). I made progress to the point that I wanted to start to attempt to read some old floppies.

I got a V4 Greaseweasel. Connection to the SA-400 drive [the original Tandy drive for the TRS-80 M1] was a little challenging. These drives have the shunts with no breaks on the drive select number. Instead, their cables remove the pins for signals, effectively letting the position on the cable determine the drive selected. Additionally, those cables are all edge card connectors. The Greaseweasel has a 34 pin socket and not an edge card. OK, no problem...I had plenty of old IBM cables and a few "universal" ones that had the 34 pin socket and two edge cards and sockets (I think these were for either 3.5 or 5.35). These are the old two-drive cables that have a flip in the cable for drive #0. By configuring the floppy as ds1, I can use the d1 connector as long as I tell Greaseweazel.

Now comes the reading and this is where I am at. First off (and this took a while to figure out), for me, the Greaseweasel needs to be reset after a full read attempt. At first, I thought I was dealing with a drive that had a heat issue such that subsequent reads were bombing even though the first cold read worked to some degree.

Now, how do I get Greaseweazle to understand that these are SS/SD 35 track and 10 sectors / track and 256 bytes/sector- right? That's what I remember and what some references agree with that.

Greaseweasel uses a diskdef.cfg file and, of course, there is no definition for these disks. So, I am trying to add one that works. Here it is:

cfg.jpg

To be thorough (mostly because I am flying blind), I am mostly using a Greaseweazle GUI in command line mode and with these options selected...

GWgui.jpg

Using that configuration I can consistently read disks with these errors.


diskerrors.jpg

To be clear:
I can read a disk multiple times with this error pattern.
I have received this error pattern reading two different disks, one of which is a flippy.

The identifiable content (browsing through the .img file) is exactly what I would expected. Both sides of the flippy have a wordprocessing files (probably scriptsit or something) and I can recognize the text. The other disk is a Z-80 assembly file (likely MZal) and I remember the program because I wrote it some 40 years ago - yikes.

It could be an alignment problem - I don't know and I have never had a real alignment disk and it is premature, I think, to go there first. I can try another drive at some point, but I feel strongly that I have something wrong in the cfg - especially with the the gaps. Additionally, it is notable that T17, which hold the directory, is smashed on all three. I vaguely recall theat the sectors on T17 had some special properties - maybe some ID bytes that other sectors don't have?

Here are the defs from the cfg file...
# A disk definition is declared by "disk <name>"; scope extends to
# the matching "end". Each disk definition must contain the following:
# cyls: Number of cylinders (1-255)
# heads: Number of heads/sides (1-2)
# Also, optionally:
# step: Number of physical drive steps per image step (1-4)
#
# Each non-empty track in a disk requires a track definition:
# "tracks <track-list> <format>"
# Where:
# format ::= ibm.fm | ibm.mfm
# track-list ::= * | <track-range>[,<track-list>]
# track-range ::= <cylinder>[.<head>] | <cylinder>-<cylinder>[.<head>]
# cylinder ::= [0-9][0-9]*
# head ::= 0|1
# "*" means match all otherwise-unmatched tracks (ie. this is the default track
# definition). If no head is specified in a track-range, then all heads are
# assumed. Scope of a track definition extends to the matching "end".
#
# The ibm.fm and ibm.mfm formats accept the following parameters:
# secs: Number of sectors (0-256, default: 0)
# bps: Bytes per sector (128, 256, 512, 1024, 2048, 4096, 8192)
# List all sizes if the size varies (eg. see "ensoniq.mirage" below)
# iam: Index Address Mark (yes|no, default: yes)
# cskew: Sector skew per cylinder (0-255, default: 0)
# hskew: Sector skew per head (0-255, default: 0)
# interleave: Sector interleave, N:1 (1-255, default: 1)
# id: Sector ID (aka R) of logical first sector (0-255, default: 1)
# h: Head (aka H) byte value in each sector header (0-255: default: auto)
# gap1: Post-IAM Gap size (0-255, default: auto)
# gap2: Post-IDAM Gap size (0-255, default: auto)
# gap3: Post-DAM Gap size (0-255, default: auto)
# gap4a: Post-Index Gap size (0-255, default: auto)
# rate: Data rate in kbps (1-2000, default: auto)
# eg. 250kbps is MFM DD, 500kbps is MFM HD, 1000kbps is MFM ED
# rpm: Disk spin speed in RPM (1-2000, default: 300)
# img_bps: Bytes per sector in IMG file (short sectors are padded)

Again - flying blind and needing help. I can save in different formats than a .img - is there one that can be used with just the flux or something that can be analyzed further toward getting that .cfg written better?

Also, I am surprised that there is no existing cfg for these disks - too old I suspect or something...but I think I am not alone in needing one.

Finally, I did try using fluxengine software with the Greaseweazle V4because there is a blurb on how easily fluxengine can read this format https://cowlark.com/fluxengine/doc/disk-trs80.html .
The problem is that it seems only some things in the fluxengine software work with Greaseweazle hardware - I get that and I could get nowhere but syntax error hell trying the approach on that page.

Pretty long post I guess :)
 

Attachments

  • cfg.jpg
    cfg.jpg
    109.3 KB · Views: 0
some progress - setting id=0 for sectors helps (the default is 1)

gwMapwid=0.jpg

Now I have to get to the business of recognizing directory sectors....
 
ahhh I have a bad feeling about this. Looks to me like the TRS80 format is to use 0xFB as the sector data mark on all sectors except for the directory [T17] where they use 0xFA. Looking at the Greaseweazel code (and I really don't know python) in ibm.py line 126, DAM is set at 0xFB. Now, if I could specify the DAM, the format could be done by just making T17 different and there are configs like that, so it could be done.

To make matters worse, if it doesn't acknowledge the sector as anything - not even as an error, but write whatever you got. If it did, the resulting file could be changed manually if need be.

I may need to take a different approach - *sigh* and *drat*.

I'm not sure the gaps are that big of a deal compared to this issue. Read through a "Super Utilty Plus" [I still have that program somewhere - it was great and the formatting is explained pretty well.
 
I thought the oddball DAM was pretty much common knowledge on the Model I--and there are patches to get it to use something else. The interesting thing is that FDCs later than the 1771 can see the sectors, but can't differentiate between the strange DAM and more normal ones.

Personally, I have a pretty low opinion of the SA-400 series, being very early. I'd use a better drive, myself.
 
syzygy,
You can connect your Floppy to a desktop, and run one of the several Emulators that
can read and write the floppy's.

XTRS by Tim Mann
SDLTRS by Jens Guenther
TRS80 by David Keil

Larry
 
Last night, I wrote a comment on this issue on Keir Fraser's Greaseweazel GitHub repository and he answered shortly afterwards. He noted, correctly afaik, that DAM=0xFA anywhere on the disk marks the sector as directory sector, with regard to the TRS-80, M1, 35T, SS/SD scheme (which was also used on 40T and varients like NEWDOS, afaik).

Of course ibm.py does not recognize 0xFA as a DAM so....I think what he is saying is that the easiest thing is to modify ibm.py to accept 0xFA as a DAM. So, iow, I should produce a fork... *double drat* because I don't know python...I spent maybe 2 hours on an esp32 version of micropython 2 years ago and that's it. OTOH, that would be a reasonable solution if using a Greaseweazle. I don't fault him at all and am happy that he responded.

I'm going to have to think on it.

Edit: I have to modify this because there were several emails from Keir Fraser (beyond the response on github) including something for me to test...stay tuned.
 
Last edited:
I am encouraged!

This is NOT [yet] a released version of the Greaseweasel tools, but testing this new preliminary version or fork or whatever it is called, version, and using the same disk as in a previous post, I just got this result

gw newtest1.jpg

I can see in ibm.py that he added a TRS80 DAM.

I looked at the .img briefly (did I mention that vscode is not the viewer to use? :) and it looks like it is all there!

Lots of testing and lots more to do but...

This is *very* cool!
 
syzygy,
You can connect your Floppy to a desktop, and run one of the several Emulators that
can read and write the floppy's.

XTRS by Tim Mann
SDLTRS by Jens Guenther
TRS80 by David Keil

Larry
So, let me ask you (or anyone if they know) what you would recommend for this specific task....

I want to optimize the configuration file for Greasweazle to read (and write) TRS80 35T SS/SD 5.25 floppies. As mention previously, I can specify the size of certain gaps in the configuration file, i.e.,
# gap1: Post-IAM Gap size (0-255, default: auto)
# gap2: Post-IDAM Gap size (0-255, default: auto)
# gap3: Post-DAM Gap size (0-255, default: auto)
# gap4a: Post-Index Gap size (0-255, default: auto)

I have been reading this reference to help figure out the gap values. But, it has also been recommended that I try to test this out empirically by writing a flux file (presumably, the strongest measure of the flux, or something like that, is the better write). I am interested in that approach.

Here are the file types available within Greaseweazle:

File storage1.jpg

Which do you suggest I use for this purpose?
 
/--/

Personally, I have a pretty low opinion of the SA-400 series, being very early. I'd use a better drive, myself.
Yeah, I have heard that before, and maybe even said as much decades ago. I do have some other SS/SD drives as I mention in this thread and they will probably get used at some time.
 
syzygy,
I typically write either a .SCP (because I have a Supercard Pro by Jim Drew), a
.0.raw (because I have my brother's Kryoflux), a .IMD (because I use IMAGEDISK),
or the standard GreaseWeazle file (because I have a F1 GreaseWeazle).

But, it's your choice. My selections are because I have more than one Flux Writer.

An Emulators will write a Floppy that Boots directly on your Model 1. I've even created
a Model 1 (NewDOS 80) floppy on Linux (Debian 11 - 64 Bit) and it booted on an emulator.

https://forums.debian.net/viewtopic.php?t=153973
https://forums.debian.net/viewtopic.php?p=766686&hilit=[HOWTO]+SDLTRS#p766686
https://forums.debian.net/viewtopic.php?p=385953&hilit=[HOWTO]+SDLTRS#p385953
https://forums.debian.net/viewtopic.php?p=359796&hilit=[HOWTO]+XTRS#p359796

I'm not sure David Keil's Emulator will write Floppy's since an upgrade to DOSBox or Debian.
I was successful in an earlier version of Debian.

Larry
 
@VERAULT et. al., To followup:

First, I have to say that I have put this aside for the last month or so and picked up on a PC XT. Project drift, I suppose, but so what? I have earned the right :)

All four of my drives work and tested ok using the greaseweazel - although I have not done much in the way of writing, largily becuse I don't have empty disks. The GW makes it particularly easy to check and recheck the RPM. That was a big accomplishment because I needed to have some idea that they were still viable for the resuscitation.

I can read TRSDOS M1 disks into a dsk file and I can use TRS80tools to extract individual files. When I look at the files and they are source code or text, I can largely verify that they came out ok. I had it in mind to write a little program to convert edt/asm and mzal files to "normal" text....it is on the list :)

I am attaching the config entries that I have been using - as I said, I have only casually tried different gaps and not systematically. Both of the TRSDOS entries 35T and 40T work for me.

I have not yet been able to read a NEWDOS disk and the other entries are what I have tried. NEWDOS let you specify a lot and I can't remember what I did. I think the starting sector # ID=0 / ID=1 had to be '1' for MIII disks, but I don't have the luxury of knowing for sure what I wrote on the label. IOW I am pretty sure that I have been able to read a MIII disk.

Hope it helps.
 

Attachments

  • TRS80configs.txt
    951 bytes · Views: 16
@VERAULT et. al., To followup:

First, I have to say that I have put this aside for the last month or so and picked up on a PC XT. Project drift, I suppose, but so what? I have earned the right :)

All four of my drives work and tested ok using the greaseweazel - although I have not done much in the way of writing, largily becuse I don't have empty disks. The GW makes it particularly easy to check and recheck the RPM. That was a big accomplishment because I needed to have some idea that they were still viable for the resuscitation.

I can read TRSDOS M1 disks into a dsk file and I can use TRS80tools to extract individual files. When I look at the files and they are source code or text, I can largely verify that they came out ok. I had it in mind to write a little program to convert edt/asm and mzal files to "normal" text....it is on the list :)

I am attaching the config entries that I have been using - as I said, I have only casually tried different gaps and not systematically. Both of the TRSDOS entries 35T and 40T work for me.

I have not yet been able to read a NEWDOS disk and the other entries are what I have tried. NEWDOS let you specify a lot and I can't remember what I did. I think the starting sector # ID=0 / ID=1 had to be '1' for MIII disks, but I don't have the luxury of knowing for sure what I wrote on the label. IOW I am pretty sure that I have been able to read a MIII disk.

Hope it helps.
Thank you!
 
An Emulators will write a Floppy that Boots directly on your Model 1. I've even created
a Model 1 (NewDOS 80) floppy on Linux (Debian 11 - 64 Bit) and it booted on an emulator.
I keep seeing people say this, but how are we supposed to hook up a 5.25" floppy drive to a modern machine?
 
So far my method of using a kryoflux and/or greaseweazle to write trs80 disks mostly works. I take the disk image convert it to a raw format using hxc software then write it to an actual disk. Many disk imagea dont work.. maybe 1 in 8 I try works. Cant explain why.
 
oktology,
You can't write them with a Desktop that doesn't have floppy drive support, and it must be a
Operating system other than Wndows. So, your choices are using a DOS such as DOS 6.22,
or DOS 7.1 (My Choice for My Desktop's), or a version of Linux that still supports Floppy Drives.
I happen to use Debian Linux - 64 Bit as it still supports Floppy Drives. Any Debian Install
comes up supporting the Floppy Configurations displayed in /etc/mediaprm. (My file is attached)

These floppy's can easily be written. There are detailed tutorials on the Debian Fourm for
writing floppy's in Linux.


You can also an Emulator in DOS or in Linux using DOSBox and write floppy's using that Method.
Detailed tutorials are also on the Debian Forum.

https://forums.debian.net/viewtopic.php?p=609667&hilit=DOSbox#p609667

https://forums.debian.net/viewtopic.php?t=61891
https://forums.debian.net/viewtopic.php?t=61890




Larry
 

Attachments

  • mediaprm-11-Bullseye.txt
    11.9 KB · Views: 2
Last edited:
Hi,

I share knowledge and a concrete example. I checked all this yesterday in my museum
🙂
The floppy disks work on a real computer, the correct images are created from floppy (replace write with read and everything works). I am very happy!

Everything worked out fine, under Windows. Back to burning floppy disks for TRS-80, and Osborne/Jantar (CP/M) with Panasonic disk drive (model Panasonic JU-475-3) and Greaseweazle interface. Previous attempts were missing the --dd L parameter. Missing this parameter caused a lot of write/read errors. The floppy disks seemed to be corrupted. I also checked the re-created floppy disk images in TRSTools and CP/M Image File Explore


Here is the command to write a floppy disk for the TRS-80 (LDOS 5.31)

gw.exe write --diskdefs "C:\greaseweazle\diskdefs.cfg" --format=TRS80NDSSDD.40T --dd L --tracks=step=2 --device=COM4 "c:\TRS\Ldos.imd"


Here for Osborne/Jantar and a floppy with CP/M:
gw.exe write --diskdefs "C:\greaseweazle\diskdefs.cfg" --format=occ1.dd --dd L --tracks=step=2 --device=COM4 "c:\Jantar\Jantar_CPM.imd"

diskdefs.cfg file:

disk TRS80NDSSSD.40T
cyls = 40
heads = 1
tracks * ibm.fm
secs = 10
id=0
bps = 256
gap1=20
gap2=20
gap3=20
rate = 125
end
end
 
This is an interesting thread. I just learned about KryoFlux, am thinking about getting one.

I am working on restoring a vintage Model III drive and would love to have a Dysan alignment diskette. I wondered if the KryoFlux might be flexible enough to allow me to create my own alignment diskette. Has anyone tried working with it at that low a level?

In a fantasy world, someone would raise their hand and say "Yes, and in fact I have dumped a Dysan alignment diskette using KryoFlux, and you can download the dump from here!"

Hey a guy can dream...

Any comments or advice?
 
Won't work. It takes special equipment to write an alignment disk. Now, if you're mechanically handy, you can probably gin up a rig. We did it for our weird 100 tpi floppies. I suspect there's not a huge market for alignment floppies.
 
Back
Top