PDA

View Full Version : Serial Transfer from a Hard Disk, In C..



Marty
February 10th, 2015, 06:43 PM
Hi All;
Would/Could someone who is knowledgeable In C, write a Program that (If the compiler is working) I can Compile and Assemble in my Charles River Universe 68 System, that I can use to Transfer (Copy) any Program or File from my Hard Disk to my PC, Via a Serial Port.. Not the same Port that I have the Console attached to, but a Second Port that the System Supports.. It supports four ports at the present..
It could be on the Same Port, Just to make sure it is working Correctly..
I know almost nothing about C and even something to others that might be as simple as this might seem to them to be, I could Not do..
It would need to be in C and Not C++, as this computer at present only supports C and Possibly FORTRAN..
And as I seem to be making NO progress with the Floppy Controller part of the OMTI 20D Board..
And before I loose what I have on the Hard Disk, I do not want the possibility of it being lost as well..

THANK YOU Marty

Wormetti
February 11th, 2015, 01:56 AM
I know nothing about μnOS. What tools are on the hard drive? Maybe one of them already supports serial file transfers.

MattisLind
February 11th, 2015, 03:00 AM
Hi All;
Would/Could someone who is knowledgeable In C, write a Program that (If the compiler is working) I can Compile and Assemble in my Charles River Universe 68 System, that I can use to Transfer (Copy) any Program or File from my Hard Disk to my PC, Via a Serial Port.. Not the same Port that I have the Console attached to, but a Second Port that the System Supports.. It supports four ports at the present..
It could be on the Same Port, Just to make sure it is working Correctly..
I know almost nothing about C and even something to others that might be as simple as this might seem to them to be, I could Not do..
It would need to be in C and Not C++, as this computer at present only supports C and Possibly FORTRAN..
And as I seem to be making NO progress with the Floppy Controller part of the OMTI 20D Board..
And before I loose what I have on the Hard Disk, I do not want the possibility of it being lost as well..

THANK YOU Marty

First I don't know much about your system and what hardware there is, but as far as I understand you have the CPU connected using SASI/SCSI via an SMS OMTI SCSI-ST506 bridge to a ST506 drive, right?
Then you could either try connecting the OMTI board to LINUX SCSI host and just use dd to recover an image of the disk. Or possibly connect the ST506 directly to an old ISA ST506 MFM controller attached to your Linux host. Then do dd to save an image of the disk.

Then you have to deal with understanding the file system present in the image. As far as I understand there are support for Unix Sys V fs in Linux. I haven't tried it. You shall be able to mount a disk image as device using loop devices.

At least this is the way I have tried to do it. Maybe I am missing things in your setup that prevents this?

Marty
February 11th, 2015, 03:32 AM
Hi All;
Wormetti, Thank You for Your reply.. Just think of UnOS as Unix, and it should work..
MattisLind, Thank Your for Your answer.. "" First I don't know much about your system and what hardware there is, but as far as I understand you have the CPU connected using SASI/SCSI via an SMS OMTI SCSI-ST506 bridge to a ST506 drive, right? "" YES !!
"" Then you could either try connecting the OMTI board to LINUX SCSI host and just use dd to recover an image of the disk. Or possibly connect the ST506 directly to an old ISA ST506 MFM controller attached to your Linux host. Then do dd to save an image of the disk. ""
So, far, even though I have both a Windows Box and a Linux Box, and I have multiple PCI to SCSI Cards, None of them, can be seen or used in either Box, My quess is that they are too Old and so there are No Support Drivers for them.. Or else, I Don't know enough about Linux to set it up when I put in a new to it PCI Card.. Which is also a possibility.. About all I know about Linux is how to do a Dir and see what is there.. Much beyond that I am lost at doing, just like C..
"" You shall be able to mount a disk image as device using loop devices. "" I have No Idea of what a Loop Device is .. Nor what to do with it, even if I could find such a thing..

THANK YOU Marty

MattisLind
February 11th, 2015, 05:10 AM
So, far, even though I have both a Windows Box and a Linux Box, and I have multiple PCI to SCSI Cards, None of them, can be seen or used in either Box, My quess is that they are too Old and so there are No Support Drivers for them..

I have used the Adaptec AHA2940 with Linux without any problem. I don't remember the Linux version I used, but I think it still is supported, or can be supported by loading the right kernel module.

But if you have an old ISA MFM (not mine) (http://www.ebay.com/itm/DISK-CONTROLLER-CARD-FOR-IBM-AT-MFM-1003-WA2-/261770374464?pt=LH_DefaultDomain_0&hash=item3cf2baed40) controller in an machine with an ISA slot? You may need to disable one of the IDE ports though on the motherboard. The MFM disk in an an AT style machine should work like any IDE disk.


I have No Idea of what a Loop Device is .. Nor what to do with it, even if I could find such a thing..

Loop devices (http://en.wikipedia.org/wiki/Loop_device) is for making a image files accessible as a standard block device. Then it would be possible to mount it if there is a file system handler that supports the FS type.

krebizfan
February 11th, 2015, 05:52 AM
If you insist on going the serial port route, check if the hard disk has a copy of Kermit. That will do what you wish and according to the Kermit documentation there was a version of Kermit that worked with Charles River Systems with unOS. Otherwise, the Unix implementations of Kermit are mostly written in C and unOS is almost Unix so the adaption shouldn't be impossible.

kyeakel
February 11th, 2015, 05:54 AM
You could try this as a starting point: http://stackoverflow.com/questions/11619664/sending-files-over-serial-port
It should allow you to see if your compiler is working, and how close to unix your OS is. You will need to change the port "/dev/ttyUSB0" to whatever you have in your /dev directory.

Kipp

Marty
February 11th, 2015, 06:11 AM
Hi All;
MattisLind, Thank You for Your Reply..

"" I have used the Adaptec AHA2940 with Linux without any problem. I don't remember the Linux version I used, but I think it still is supported, or can be supported by loading the right kernel module. ""
I have tried an AHA2940W/UW that I have and it, with a SCSI drive (50 pin) does Not show up, as being there.. When I use one of the Utilities, that show what Drives and CD's are Connected to it.. The Computer is an older Dell with Fedora 20 on it..

THANK YOU Marty

Marty
February 11th, 2015, 06:20 AM
Hi All;
Krebizfan, Thank You for Your Answer..
I will check and see IF I have anything with Kermit, Since my Unos is an Early version 3b to 5, it might not have Kermit on it as of yet..
Kyeakel, Thank You for the Link, I will take a better look at it, but It looks like it is a good starting point..

THANK YOU Marty

MattisLind
February 11th, 2015, 06:48 AM
Marty, it all depends what purpose this rescue operation has. Is it just to save certain files and/or binaries that you like to store in a safe place or would you like to be able to run your system if the hard disk crashes? If it is the former then kermit is a possible way forward, or xmodem or zmodem or uucp. uucp is usually a good choice since it is native in most old unixes.
But if you like to run the system if the hard disk crashes you need to do an image of the drive. I think it would be very complicated to recreate a bootable environment without an image unless you have good knowledge how the boot process takes place. But maybe this is not necessary since you already have install media that works?

Marty
February 11th, 2015, 08:38 AM
Hi All;
MattisLind, Thank You for You Answer..
"" Marty, it all depends what purpose this rescue operation has. Is it just to save certain files and/or binaries that you like to store in a safe place or would you like to be able to run your system if the hard disk crashes? ""
Actually, its Both.. As well as a third, Which I cannot do With the Charles River System, at present, with the Floppy Controller not working at the Present..
1. I want to save ALL of the Files that I have, in the Hard Disk, as well as the Multiple 8" floppies..
I possibly can "Read" my Floppies, on my Altair, Using the Z-80 Board, and the ZFDC Board from Andrew and John, it all Depends, on whether the Inter-leaving is the same and whether it the Z-80 Software can Read the Whole diskette or even Individual Files..
Or even if I have to Read Each Sector and Each Track and then copy that Over and then put them in the right/correct order and figure out where the file begins and where it ends.. Since the files are Not CPM, I don't know what it would take to do what I want it to do..
2. Be able to Copy and Boot the necessary files to make a Bootable System, If this Hard Drive fails.. Which CAN be done from an 8" Floppy, but having the Floppy system not working, I cannot do the same.. So, I would need another way of doing this, Which is Why I thought maybe some kind of a Serial Transfer might/maybe work..
3. Be able to Copy to my PC any files that are Corrupted, and either from other versions or other copies of the same version, make a non-corrupted final copy.. And to be able to then copy that to my Hard Disk..

THANK YOU Marty