Jump to content
IGNORED

Using Linux fdutils to format/copy 5.25" diskettes/images


Lee Stewart

Recommended Posts

Has anyone used Linux fdutils (or similar) to copy TI diskette files or images to 5.25" diskettes?

 

I am not having any luck with TI99-PC or OmniFlop on windows XP; so, I thought I would try Linux options. I have Ubuntu 14.04 loaded on one of my computers and am about to attach a 5.25", 360KiB drive to it, but thought I would check for information from old pros before I move the drive.

 

...lee

Link to comment
Share on other sites

Hi Lee,

 

did you change your floppy- and fd-ctrl-drivers on windows´systemmanager against the new ones from OmniFlop ? (recommended)

/edit/ only running OmniFlop does not work /

 

schmitzi

Edited by schmitzi
Link to comment
Share on other sites

@Lee,

 

I'm attaching my tools to read and write TI disks on a Linux PC using a PC floppy. I used these tools to create all of my image disks, and I was also able to write floppy disks with them.

 

I created these tools starting from fdutils, and adapting it to our needs. G. Wiesinger joined me later so we could make them more comfortable and safe.

fdutil_ti.tar.gz

Edited by mizapf
  • Like 1
Link to comment
Share on other sites

Hi Lee,

 

did you change your floppy- and fd-ctrl-drivers on windows´systemmanager against the new ones from OmniFlop ? (recommended)

/edit/ only running OmniFlop does not work /

 

schmitzi

 

Yes—two different drives fail on both OmniFlop and Paolo Bagnaresi's TI99-PC.

 

...lee

  • Like 1
Link to comment
Share on other sites

@Lee,

 

I'm attaching my tools to read and write TI disks on a Linux PC using a PC floppy. I used these tools to create all of my image disks, and I was also able to write floppy disks with them.

 

I created these tools starting from fdutils, and adapting it to our needs. G. Wiesinger joined me later so we could make them more comfortable and safe.

 

Thanks, Michael. I will give them a try.

 

...lee

Link to comment
Share on other sites

@Lee,

 

I'm attaching my tools to read and write TI disks on a Linux PC using a PC floppy. I used these tools to create all of my image disks, and I was also able to write floppy disks with them.

 

I created these tools starting from fdutils, and adapting it to our needs. G. Wiesinger joined me later so we could make them more comfortable and safe.

 

I guess I am going to need a little help with this. :dunce:

 

I ran make in the directory where I put the two C files and “Makefile”. GCC gave some warnings about unused variables and functions, but appeared to compile successfully. Running either executable with no parameters in a terminal window from the directory where the executables reside gives me “command not found”. I expected to get a usage message. I am obviously missing something. Any ideas.

 

...lee

Link to comment
Share on other sites

You ran the command as

./readti

or

./writeti

?

 

You know I didn't. :P

 

I've been using Linux, on an off, for many years; but, this may be the first time I compiled my “own” program on a Linux system. I did not realize :woozy: (or had forgotten—haven't I said I was old!) that to run a program, not in a directory Linux normally searches for commands, you must tell Linux where it is, even if that is the current directory!

 

Thanks, Michael. I got the usage messages. After I attach a 5.25" drive to my Linux box, I will let you know how I fare.

 

...lee

Link to comment
Share on other sites

 

you must tell Linux where it is, even if that is the current directory!

Just to explain why:

 

It is a security risk to have the current path (".") in the search path. This could very easily be abused by attackers to override system commands. For instance, imagine that you unpack some archive file, or in this case, you build some application, and this brings you a customized "ls" command (known as "dir" to DOS/Win users). If you don't come aware of that, you'd type "ls" next time, believing this to be the system command, but you execute an unknown program, with unknown effects.

 

For that reason, it is always good advice to get used to execute local files with "./xxxx" rather than adding the local path to PATH.

Link to comment
Share on other sites

Just to explain why:

 

It is a security risk to have the current path (".") in the search path. This could very easily be abused by attackers to override system commands. For instance, imagine that you unpack some archive file, or in this case, you build some application, and this brings you a customized "ls" command (known as "dir" to DOS/Win users). If you don't come aware of that, you'd type "ls" next time, believing this to be the system command, but you execute an unknown program, with unknown effects.

 

For that reason, it is always good advice to get used to execute local files with "./xxxx" rather than adding the local path to PATH.

 

You've dusted off a spot in the far reaches of my memory. I do now remember reading that a long time ago. Thanks again.

 

...lee

Link to comment
Share on other sites

By the way, I noticed that you can remove the creation of that "new" subdirectory in the makefile. This seems to be some remnant. Gerhard inserted those lines when he patched my files, but since the patch is now committed, there is no more use of it.

 

It's been some time since I last tried those tools. I remember I had best results for reading disks into the PC (readti), which worked pretty well for me; I could read almost all disks in my collection, apart from some few ones with bad surface or lost magnetism. Other users reported some problems, though, in particular for reading the first sectors of each track.

 

If I remember correctly, writing on a disk is most successful when it is pre-formatted on a TI drive.

 

As I said, readti and writeti are customized fdutils; so if they don't work for you, fdutils also most likely won't.

Link to comment
Share on other sites

From the default values listed in writeti.c, it looks like they should work; but, I get an I/O error immediately upon writing to the first track:

...$ sudo ./writeti ./CFHDX_V12.dsk /dev/fd0
Writing track 0, head 0, status 0
error executing command: Input/output error
...$ 

...lee

Link to comment
Share on other sites

Just to explain why:

 

It is a security risk to have the current path (".") in the search path. This could very easily be abused by attackers to override system commands. For instance, imagine that you unpack some archive file, or in this case, you build some application, and this brings you a customized "ls" command (known as "dir" to DOS/Win users). If you don't come aware of that, you'd type "ls" next time, believing this to be the system command, but you execute an unknown program, with unknown effects.

 

For that reason, it is always good advice to get used to execute local files with "./xxxx" rather than adding the local path to PATH.

 

I also make /home, /local, /tmp, and various other filesystems as non-executable. Not a perfect solution, but it has helped more than once (bastard script kiddies.)

Link to comment
Share on other sites

Maybe try to read a disk first; if that does not work, writing will definitely fail. Also, try a "-v" for a verbose output.

 

It appears to read a blank, TI-formatted disk. It won't read it by track—it changes to sector reads for each head. I interrupted it at head 10.

 

If it matters, I am using a V9T9 image.

 

...lee

Link to comment
Share on other sites

I noticed that I don't have a floppy drive in my PC any longer. :-) ... did not care about that the during the past years. I still have some drives on the shelf, so I'll be able to try it on my side, maybe tomorrow.

 

Still, it would be important to see whether it correctly reads a TI disk. If you have sectors filled with 0xDEAD, then this sector could not be read.

 

The result is a sector dump; vice versa, you need such a sector dump for writing. You know that this is the proper format when its size is a multiple of 256.

 

You should have the program "xxd" on your Linux distribution. When readti has terminated, have a look at the resulting dsk file with xxd.

Link to comment
Share on other sites

I noticed that I don't have a floppy drive in my PC any longer. :-) ... did not care about that the during the past years. I still have some drives on the shelf, so I'll be able to try it on my side, maybe tomorrow.

 

Drive on the shelf is good, but even better would be a connector on the main board. :(

 

So beware when you upgrade your hardware, you may lose your last chance to connect certain devices. Beside the missing floppy connector, my current PC does not even have IDE connectors (PATA) anymore.

 

I'll have to look for some dusted old hardware in the cellar, maybe I can find one to host a floppy drive.

 

[Edit: Just found my old Shuttle barebone, have to check whether I can revive it.]

Edited by mizapf
Link to comment
Share on other sites

I have assembled 2 very old PCs in the last weeks, because for that reason :) One is a Asus P2L97 with P2-300, for 2 floppies.

Please be aware that the not-so-old mainboards may have a FDD-connector on board,

BUT that you maybe only can connect ONE drive, as is restricted by BIOS. (ie Asus P5LD2)

The CatWeazle-Card is an option to update for FDD, but very seldom and expensive.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...