Transfer Utility For Mac

Posted on  by 




1 Year ago17 Jul 2019 11:10 pm by Dog Cow

Outline 'Image Transfer Utility 2' is an application that supports cameras with the 'Auto send images to computer' function. If you’ve already set up your Mac, open Migration Assistant, which is in the Utilities folder of your Applications folder. On your Mac, follow the onscreen prompts until you get to the migration pane of the assistant. Select the option to transfer your information “From a Windows PC,” then click Continue. The Trimble Data Transfer software transfers data from a range of devices to your PC. You can then import the data into the Trimble Geomatics Office™, Trimble Total Control™, Terramodel®, Trimble Business Center, GPS Pathfinder® Office software, or Trimble Link™, or the GPS Analyst™ extension for ESRI ArcGIS Desktop software.


Earlier this year, in March, I began working on my first real application for Macintosh, developed in 68000 assembly language using the Macintosh 68000 Development System. I decided that a disk transfer utility would be most useful to me and others. I wanted a simpler way of transferring an entire disk, or selected files, from my Mac 512K to my Mac mini (or other computer) over a serial line. I'm not aware of any other application for classic Macintosh that will send an entire disk over a serial line, so I believe this is the first of its kind.
I was still learning assembly language for Macintosh, but felt confident enough to start this project, after learning from Dan Weston's book, The Complete Book of Macintosh Assembly Language Programming. Before a single line of code is written, a Macintosh developer should first give thought to the user interface. In my case, I was of the opinion that TeleDisk, as I called it, should be controlled entirely via buttons in a dialog window. And as configuration is the root of all computer evil, there should be little or no configuration options, so the entire interface of the application will be simplified.
I used Dialog Creator, by Michael Bayer of Apple Canada, to layout the single dialog with its text and buttons. This application is quite handy for prototyping, as it will provide RMaker source for the dialog that you have created. The one downside is that it is in Apple Lisa Workshop's RMaker syntax, which differs a bit from the Macintosh version of RMaker. This differing syntax was a poor decision from Andy Hertzfeld, who was author of RMaker both on Lisa and Macintosh.

An early screenshot of TeleDisk's interface. More changes were made later.

With a dialog created and its resource definition copied into an RMaker file, it was time to begin the main assembly language portion of TeleDisk.
Writing TeleDisk
The nucleus of TeleDisk came from two assembly source code fragments: the first was found on page II-216 of Inside Macintosh, and showed how to read sector 4 from a disk in Drive 1. The second fragment was part of a sample application called 'Template Sample,' distributed with the Macintosh Development System. A subroutine in this application showed how to open the serial port and transmit data across it.
When I added the usual boiler-plate code to initialize all the toolbox managers and display the dialog, I had a full disk read and send working the next day. TeleDisk read one 512-byte disk block at a time and transmitted at 9600 baud. It was originally very slow, and it took over 2 minutes to transfer an entire 400K disk. The first disk that TeleDisk transmitted was of course its own disk.

Using RMaker to compile the resource fork for TeleDisk

Some experimentation and tweaking greatly improved TeleDisk's transfer speed. Bumping the baud rate up to 57600 reduced transfer time to 2 minutes for an entire disk. I then increased the data read from disk to 8KB per loop iteration. It just so happens that this amount keeps the drive motor spinning continuously, eliminating a pause for the motor to turn on. Time required to transmit a 400K disk was reduced by about 30 seconds, down to 1 minute and 30 seconds.
There were a few more optimizations that I had in mind, but I doubt they would have eliminated more than 2 or 3 seconds from the total time. On a Mac 512Ke, the time required to read and transmit a double-sided 800K disk is, as I anticipated, about double. I timed 2 minutes and 57 seconds to send an 800K disk.
Debugging TeleDisk
When developing in assembly language, there is much more opportunity for error compared to using a high-level language. I found that my most common errors were stack imbalances, off-by-one errors in loops, and specifying the wrong register.
It also took me a bit to understand when I should dereference a handle to a pointer using, for example,
Code:
MOVE.L (A0),A0
and when I should supply an address using
Code:
LEA paramBlock(A5),A0

I frequently referred to the sample applications in Dan Weston's book to keep me on track. I of course made extensive use of MacsBug, often stepping through my code, instruction-by-instruction, to track down a bug.
The debugging and reassembly cycle is what makes assembly development so time-consuming. Once you locate the problem, it often takes less than 30 seconds to correct the mistake, but then a couple minutes to reassemble, link, and run RMaker.
The disk drives are a real bottleneck, and at times I switched to using a Mac 512Ke or Mac Plus, whose 800K drives are noticeably faster.
Adding Features
By the end of March I had both features for sending an entire disk and selecting only a single file to send. I also added an Eject button for switching floppies. In mid-June I added support for the Hard Disk 20. This was fairly easy, as the HD20 is treated like floppy disk drive #3, and there is no other special code needed,
Because TeleDisk calls on the Disk Driver to read blocks, it will read non-Macintosh format disks, such as Apple II ProDOS and Apple Lisa. It will also read HFS disks, even if HFS is not loaded on the Mac 128K or 512K. And finally, it makes no distinction between single-sided, double-sided, and high-density, so it will happily read and transmit a 1.4 MB disk on a Mac SE/30.
Two further features which remain to be implemented are MacBinary encoding for single files, and Disk Copy 4.2 format. MacBinary encoding will allow both forks of a file to be sent, along with its metadata. Right now, TeleDisk only sends the 512-byte disk blocks, but does not transmit tag bytes nor any other disk metadata. A Disk Copy 4.2 format will probably require two passes to read the entire disk and checksum its data and tag bytes.
TeleDisk is presently one-way; it only sends data from the Macintosh to another computer. A version 2.0 of TeleDisk might have an option for receiving disk images or MacBinary-encoded files.
Compatibility
Having TeleDisk be compatible with as many models of classic Macintosh as possible was very important to me. TeleDisk is compact, less than 6KB on disk, and uses a small amount of memory. It will run on the Macintosh 128K, 512K, 512Ke, Plus, and SE/30. Around the time of the SE/30, Apple changed how the internal disk drives are numbered, which may break compatibility with newer models of Macintosh. TeleDisk uses hardcoded numbers 1, 2, and 3 to access the internal floppy, external floppy, and Hard Disk 20, respectively.
I have not tested it on a Mac SE, Classic, or Classic II.
Release
TeleDisk is almost finished, but still needs some more tweaks and testing. It is quite a useful application. I use it all the time to make backups and transfer data to my Mac mini. It can be used to archive floppy disks or a Hard Disk 20, but there are many more scenarios where it will come in handy.
This concludes today's Mac 512K Blog article. The next one will show how to use Andy Hertzfeld's Thunderscan, an ingenious hack which turns an Imagewriter printer into a grayscale scanner.
The Mac 512K Blog wrote:
This blog chronicles the Macintosh 512K and my projects with it. We will test software, fix hardware, program it, hack it, and generally take the 512K Macintosh to its limits.
Do leave any feedback you may have, either to my email dog_cow@macgui.com or by posting a comment to this article.

« Those Musical Sony 400K Drives • Thunderware Thunderscan for Macintosh »


1 Year ago17 Jul 2019 11:10 pm by Dog Cow


Earlier this year, in March, I began working on my first real application for Macintosh, developed in 68000 assembly language using the Macintosh 68000 Development System. I decided that a disk transfer utility would be most useful to me and others. I wanted a simpler way of transferring an entire disk, or selected files, from my Mac 512K to my Mac mini (or other computer) over a serial line. I'm not aware of any other application for classic Macintosh that will send an entire disk over a serial line, so I believe this is the first of its kind.
I was still learning assembly language for Macintosh, but felt confident enough to start this project, after learning from Dan Weston's book, The Complete Book of Macintosh Assembly Language Programming. Before a single line of code is written, a Macintosh developer should first give thought to the user interface. In my case, I was of the opinion that TeleDisk, as I called it, should be controlled entirely via buttons in a dialog window. And as configuration is the root of all computer evil, there should be little or no configuration options, so the entire interface of the application will be simplified.
I used Dialog Creator, by Michael Bayer of Apple Canada, to layout the single dialog with its text and buttons. This application is quite handy for prototyping, as it will provide RMaker source for the dialog that you have created. The one downside is that it is in Apple Lisa Workshop's RMaker syntax, which differs a bit from the Macintosh version of RMaker. This differing syntax was a poor decision from Andy Hertzfeld, who was author of RMaker both on Lisa and Macintosh.

An early screenshot of TeleDisk's interface. More changes were made later.

With a dialog created and its resource definition copied into an RMaker file, it was time to begin the main assembly language portion of TeleDisk.
Writing TeleDisk
The nucleus of TeleDisk came from two assembly source code fragments: the first was found on page II-216 of Inside Macintosh, and showed how to read sector 4 from a disk in Drive 1. The second fragment was part of a sample application called 'Template Sample,' distributed with the Macintosh Development System. A subroutine in this application showed how to open the serial port and transmit data across it.
When I added the usual boiler-plate code to initialize all the toolbox managers and display the dialog, I had a full disk read and send working the next day. TeleDisk read one 512-byte disk block at a time and transmitted at 9600 baud. It was originally very slow, and it took over 2 minutes to transfer an entire 400K disk. The first disk that TeleDisk transmitted was of course its own disk.

Using RMaker to compile the resource fork for TeleDisk

Some experimentation and tweaking greatly improved TeleDisk's transfer speed. Bumping the baud rate up to 57600 reduced transfer time to 2 minutes for an entire disk. I then increased the data read from disk to 8KB per loop iteration. It just so happens that this amount keeps the drive motor spinning continuously, eliminating a pause for the motor to turn on. Time required to transmit a 400K disk was reduced by about 30 seconds, down to 1 minute and 30 seconds.
Transfer There were a few more optimizations that I had in mind, but I doubt they would have eliminated more than 2 or 3 seconds from the total time. On a Mac 512Ke, the time required to read and transmit a double-sided 800K disk is, as I anticipated, about double. I timed 2 minutes and 57 seconds to send an 800K disk.
Debugging TeleDisk
When developing in assembly language, there is much more opportunity for error compared to using a high-level language. I found that my most common errors were stack imbalances, off-by-one errors in loops, and specifying the wrong register.
It also took me a bit to understand when I should dereference a handle to a pointer using, for example,
Code:
MOVE.L (A0),A0
and when I should supply an address using
Code:
LEA paramBlock(A5),A0

I frequently referred to the sample applications in Dan Weston's book to keep me on track. I of course made extensive use of MacsBug, often stepping through my code, instruction-by-instruction, to track down a bug.Transfer Utility For Mac
The debugging and reassembly cycle is what makes assembly development so time-consuming. Once you locate the problem, it often takes less than 30 seconds to correct the mistake, but then a couple minutes to reassemble, link, and run RMaker.
The disk drives are a real bottleneck, and at times I switched to using a Mac 512Ke or Mac Plus, whose 800K drives are noticeably faster.
Adding Features
By the end of March I had both features for sending an entire disk and selecting only a single file to send. I also added an Eject button for switching floppies. In mid-June I added support for the Hard Disk 20. This was fairly easy, as the HD20 is treated like floppy disk drive #3, and there is no other special code needed,
Because TeleDisk calls on the Disk Driver to read blocks, it will read non-Macintosh format disks, such as Apple II ProDOS and Apple Lisa. It will also read HFS disks, even if HFS is not loaded on the Mac 128K or 512K. And finally, it makes no distinction between single-sided, double-sided, and high-density, so it will happily read and transmit a 1.4 MB disk on a Mac SE/30.
Two further features which remain to be implemented are MacBinary encoding for single files, and Disk Copy 4.2 format. MacBinary encoding will allow both forks of a file to be sent, along with its metadata. Right now, TeleDisk only sends the 512-byte disk blocks, but does not transmit tag bytes nor any other disk metadata. A Disk Copy 4.2 format will probably require two passes to read the entire disk and checksum its data and tag bytes.
TeleDisk is presently one-way; it only sends data from the Macintosh to another computer. A version 2.0 of TeleDisk might have an option for receiving disk images or MacBinary-encoded files.
Compatibility
Having TeleDisk be compatible with as many models of classic Macintosh as possible was very important to me. TeleDisk is compact, less than 6KB on disk, and uses a small amount of memory. It will run on the Macintosh 128K, 512K, 512Ke, Plus, and SE/30. Around the time of the SE/30, Apple changed how the internal disk drives are numbered, which may break compatibility with newer models of Macintosh. TeleDisk uses hardcoded numbers 1, 2, and 3 to access the internal floppy, external floppy, and Hard Disk 20, respectively.
I have not tested it on a Mac SE, Classic, or Classic II.
Release
TeleDisk is almost finished, but still needs some more tweaks and testing. It is quite a useful application. I use it all the time to make backups and transfer data to my Mac mini. It can be used to archive floppy disks or a Hard Disk 20, but there are many more scenarios where it will come in handy.
This concludes today's Mac 512K Blog article. The next one will show how to use Andy Hertzfeld's Thunderscan, an ingenious hack which turns an Imagewriter printer into a grayscale scanner.

Pixela Transfer Utility For Mac

The Mac 512K Blog wrote:
This blog chronicles the Macintosh 512K and my projects with it. We will test software, fix hardware, program it, hack it, and generally take the 512K Macintosh to its limits.
Do leave any feedback you may have, either to my email dog_cow@macgui.com or by posting a comment to this article.

Transfer From Mac To Mac


Canon Transfer Utility For Mac

« Those Musical Sony 400K Drives • Thunderware Thunderscan for Macintosh »





Coments are closed