Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

TransDisk Disk Images

Last updated on 1 year ago
M
miker1264Software Dev
Posted 1 year ago
For the Amiga there are two very helpful little utilities called "TransDisk" & "TransRom". The first one is to read a disk from DF0: into an adf file. The second one is to read the kickstart rom into a rom file.

In the past I have used TransDisk quite a bit on my Amiga 1200 to make adf images. It can also write an adf file back to a disk in DF0: with a few added switches to control the output.

I recently discovered the source code for TransDisk. Although it is very compact it's very useful. I wonder if I can compile it to work with AROS to read high density disks such as from USB or internal floppy drives into disk images. It may work if I modify it a bit for AROS. It used trackdisk.device. Time to experiment.
Edited by miker1264 on 26-09-2023 15:57, 1 year ago
D
deadwoodAROS Dev
Posted 1 year ago
Interesting, looking forward to see what you experiments bring!
M
miker1264Software Dev
Posted 1 year ago
The TransDisk project & Icon Apps provide a reason to start compiling & testing AROS again. Smile

Last week I ordered a Dell Optiplex 7060 SFF that has support for m.2 SSD. Yesterday I bought a Crucial P5 Nvme m.2 SSD.

The old Toshiba P775 laptop I was using for programming had a 1TB SATA SSD (530 MB/s). The new Nvme SSD is up to 6600 MB/s. Of course I will need to re-install all my software, compilers & virtual machines. Moving from Windows 7 on the laptop to Windows 10 Pro on the Dell won't be easy. But the Nvme SSD will be much faster!

But I still have the P775 laptop to use while waiting to finish the upgrade. Smile
M
miker1264Software Dev
Posted 1 year ago
Oh! It has arrived.

The m.2 2280 SSD is so small.

The package it was in is a little larger than a 2.5" hard drive for comparison.

Normally on the old laptop which only had 8GB ram shared with VMWare for the cross-compilers when building the toolchain it took about 3 hours. Then it was about another hour to compile AROS. With the new Nvme SSD it should take 2 hours or less. It will be faster.
Edited by miker1264 on 27-09-2023 12:13, 1 year ago
You do not have access to view attachments
M
miker1264Software Dev
Posted 1 year ago
So far I have modified TransDisk.c in the following way to read Amiga disks or PC floppies...

The original code was setup as a command line app using switches. It could read or write adf files by accessing trackdisk.device for either df0: or df1: depending on the user parameters. By default it assumes Amiga dd disk with 11 sectors per track, 80 tracks per side, with 2 sides (11x80x2=1760 sectors/512=880kb). If -h is used it indicates high density so sectors = 22 instead of 11 for Amiga double density disks.

PC formatted floppy disks can be read on the Amiga using mount files such as PC0. But the sectors per track for the PC high density disks are different than for Amiga disks. So I added the -p switch right after the code for -h switch. The -h indicates high density and it sets sectors = 22 as mentioned. But then -p indicated PC floppy and it resets sectors = 18 for PC disks.

I have an external high density drive for my Amiga 1200 that can read Amiga disks or PC floppy disks. TransDisk only uses disk geometry to access the device using trackdisk.device so in theory it shouldn't care if it's an Amiga disk or a PC floppy disk as long as the geometry is ok.

So now I will use DevCPP to compile the new TransDisk program for Amiga 68k to test it. If it works with both Amiga disks and PC floppy disks then I will compile it for AROS. I will most likely use AROS One x86 to test it because my external USB floppy drive is recognized by AROS
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 1 year ago
Thanks miker now you will be able to manage not only images but also physical floppies.
Now thanks to your program I will finally be able to review and create images of my A4000/060 HD Floppies.

Once created ADF, DMS (AMiGA) or IMG (MS-DOS) images can be mounted "also" with MountDiskImage, on AROS One these image extensions are recognised automatically, and can be mounted with one click, same for ISO images, for HardFiles (HDF) I'm having some problems with mounting ... I'm missing some information to do it.
M
miker1264Software Dev
Posted 1 year ago
AMIGASYSTEM

The adf files can also be mounted using DiskImage GUI in AROS x86.

BTW I chose to use AROS One x86 to test the AROS version of TransDisk because of all the AROS distros AROS One x86 seems very compatible with my USB devices out of the box.

It recognizes my USB floppy drive, USB zip drive, USB dvd drive, and several USB flash drives. It does this automatically without a reboot which makes it convenient for testing purposes.

It looks hopeful but I'm not sure of the test results yet for the Amiga version or AROS version.

I was thinking about reading Amiga & PC floppy disks on Amiga 68k & AROS x86 as far as the possible difference. On Amiga we can in theory read/write Amiga DD & HD disks as well as PC DD & HD disks. On AROS x86 we could only read/write PC disks. Unless...

As a long term goal since I'm not familiar with AROS disk driver format maybe it would be possible to use an Arduino based floppy drive with an AROS driver to read/write Amiga floppies? I'm looking at the floppybridge driver for WinUAE. It uses the DrawBridge equipped PC floppy drive.

I contacted Rob Smith about writing an AROS version of his floppybridge driver. He said "that has not been planned". But perhaps it is quite possible. The DrawBridge hardware (controller) reads & writes raw data to the floppy drive. The floppybridge driver packages & handles the raw data that DrawBridge uses to read/write disks.

Just something to think about. :-)
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 1 year ago
The def_ADF.info, def_DMS.info, def_IMG.info and def_ISO.info included on AROS One, use "MountDiskImage" as a tool which is part of the "DiskImage GUI", there is also "MountHDF", but as mentioned it mounts the hardFiles, but I cannot see the content! I am missing some parameters!
M
miker1264Software Dev
Posted 1 year ago
AMIGASYSTEM

The mounting of disk images ties into my TransDisk project so maybe at some point I can help with mountHdf. My make adf project also ties into TransDisk. Make adf is an attempt to write a blank adf flie purely using C code. It works somewhat but it isn't finished yet.
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 1 year ago
OK, I don't know if you've seen my last video showing how ADF, DMS and IMG floppy images mount and dismount with one click, I'll repost it here:

M
miker1264Software Dev
Posted 1 year ago
AMIGASYSTEM

Very nice work.

AROS One makes it easy to mount the images.

It would be nice at some point to see if can include "Eject Floppy" & "Eject Cd-Dvd" as part of the Wanderer menu. That makes it even easier.
M
miker1264Software Dev
Posted 1 year ago
Some test results.

At first I connected my USB floppy drive to Icaros Desktop & I inserted a PC floppy disk to see what happens. It mounted the disk.

Next I used gcc to compile TransDisk for AROS. It compiled without errors. I copied the binary to Ram Disk. After I attached my USB floppy & disk again I waited for it to mount the disk.

The first time I ran TransDisk I used the same parameters as on my Amiga 1200.

transdisk >Ram:test.adf -d trackdisk 0 -s 0 -e 79

This command tells it to read tracks 0-79 & save the data in the filename provided. But there are two problems here. When I checked Trident it reported the USB floppy as using usbscsi.device unit 0. So it isn't using trackdisk.device which is only for internal floppy drives. The second issue is a problem with the syntax (user error).

So after studying the code I realized that trackdisk.device is not hard coded nor is the filename. So I changed it accordingly to satisfy AROS. I also noticed it uses standard Exec commands such as CMD_READ, CMD_WRITE, CMD_UPDATE & TD_MOTOR. That should work with trackdisk or usbscsi. But I wasn't sure about TD_MOTOR which turns off the drive motor.

So I ran it again with new parameters.

transdisk >Ram:test.img -d usbscsi 0 -s 0 -e 79

And guess what happened...it started reading the disk!

Notice in the screenshot I forgot to add the -p switch to indicate it's a PC disk with 18 sectors per track. By default it sets it to 11 sectors for an Amiga DD disk (880kb). So I ran it a third time to get the correct file length (2880 sectors).

I copied the resulting floppy image file & I opened it in my Disk Imaging program on my Windows PC. Everything was correct. It works!
Edited by miker1264 on 29-09-2023 13:32, 1 year ago
You do not have access to view attachments
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 1 year ago
Good work miker, transdisk I believe will also work from VMware if you connect a USB Floppy Reader! when it becomes available I will try to do some tests.
M
miker1264Software Dev
Posted 1 year ago
It will be available soon. It can read USB floppy drives with PC formatted disks. If they are AROS formatted we can read them into disk images if we know the disk geometry.

There is an Exec command to use IOreq to get disk geometry. I'll add an -l switch to list the disk geometry. I wonder how to verify if it uses scsi, usbscsi, or trackdisk? More research is needed.

Out of curiosity I attached my USB zip drive & I inserted a 250MB disk. After a short wait AROS mounted the disk. Trident reports it as using scsi.device which I believe is the same for hard disks. The same Exec commands should work. Just change usbscsi.device to scsi.device to read the zip disk to an image file.

Currently the program uses sectors per track & a specified number of tracks to read a floppy disk. I will adjust it to list geometry & use only total sectors rather than tracks. Then we can read several kinds of disks into disk images. :-)

I may write a disk imager for AROS based on my "Floppy Disk Image" program from C# that reads floppies & superfloppies (zip & ls-120) to images. You can also write disk images back to disks
M
miker1264Software Dev
Posted 1 year ago
This may also be possible.

Rob Smith wrote the floppybridge driver for Windows to use a PC floppy drive equipped with DrawBridge to read/write genuine Amiga disks in WinUAE.

Attach the DrawBridge USB floppy drive & connect it in WinUAE. Start Amiga OS 3.x then insert an Amiga floppy disk. Wait for it to appear on workbench. Then open a shell & use TransDisk with trackdisk.device to read Amiga disks in real time using DrawBridge.

That would be cool.
Edited by miker1264 on 29-09-2023 15:11, 1 year ago
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 1 year ago
I have a 'Standard' USB Floppy Drive, if I understand correctly you have to make a hardware modification 'DrawBridge' which I would not like to do on my USB Floppy Drive
M
miker1264Software Dev
Posted 1 year ago
No. Standard USB PC floppy drive will read PC floppies on AROS x86 using TransDisk program to save disk images.

On Amiga TransDisk reads Amiga floppies using the same source code for transdisk as for AROS. On Amiga TransDisk should also read DD & HD Amiga floppies as well as HD PC floppies where DD means double-density & HD means high density (1760kb for Amiga, 1440kb for PC). The Amiga using TransDisk to save the adf images.
Edited by miker1264 on 29-09-2023 19:38, 1 year ago
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 1 year ago
OK, I was talking about WinUAE, whereas on VMware the USB Floppy Drive is only detected at the hardware level, but cannot be mounted!


www.arosworld.org/infusions/forum/attachments/usb.jpg
You do not have access to view attachments
M
miker1264Software Dev
Posted 1 year ago
AMIGASYSTEM

I'm not sure why the USB floppy drive isn't recognized.

BTW - TransDisk is working happily on my Amiga 1200 in Amiga OS 3.9+ aka Caffeine OS. I tried to compile it with the few slight changes I made yesterday but I think there's something wrong with gcc 2.95 in Caffeine OS. It complained about an illegal "struct Semaphore" in clib. So I compiled with AmiDevCPP on my laptop instead. It complained again because...

UBYTE *buffer;
buffer = AllocMem(512, MEMF_CHIP);

It didn't like converting void* to UBYTE* so I had to change it to APTR buffer instead to allow the Amiga version to compile. The AROS x86 version should also accept that change. I wonder though if I should change MEMFCHIP to MEMF_CLEAR. AROS doesn't seem to care & Amiga works ok.

As you can see in the screenshot the Amiga version is reading disks for High Seas Trader & it is saving them as ADF files. I'm glad my pcmcia CF card is working with Caffeine OS. I have noticed reading the disk to ADF on Amiga is a lot faster than reading a PC disk to image on AROS x86.
You do not have access to view attachments
M
miker1264Software Dev
Posted 1 year ago
AMIGASYSTEM

I'm not sure why the USB floppy drive isn't recognized.

BTW - TransDisk is working happily on my Amiga 1200 in Amiga OS 3.9+ aka Caffeine OS. I tried to compile it with the few slight changes I made yesterday but I think there's something wrong with gcc 2.95 in Caffeine OS. It complained about an illegal "struct Semaphore" in clib. So I compiled with AmiDevCPP on my laptop instead. It complained again because...

UBYTE *buffer;
buffer = AllocMem(512, MEMF_CHIP);

It didn't like converting void* to UBYTE* so I had to change it to APTR buffer instead to allow the Amiga version to compile. The AROS x86 version should also accept that change. I wonder though if I should change MEMF_CHIP to MEMF_CLEAR. AROS doesn't seem to care & Amiga works ok.

As you can see in the screenshot the Amiga version is reading disks for High Seas Trader & it is saving them as ADF files. I'm glad my pcmcia CF card is working with Caffeine OS. I have noticed reading the disk to ADF on Amiga is a lot faster than reading a PC disk to image on AROS x86.

On the Amiga I'm using trackdisk.device unit 0 but on AROS x86 with the same source code I'm using usbscsi.device unit 0 to read from my USB floppy drive. I think that's simply amazing!
Edited by miker1264 on 30-09-2023 19:14, 1 year ago
You do not have access to view attachments
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: deadwood, AMIGASYSTEM, Amiwell79, miker1264
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 13
Members Online 0

Total Members: 265
Newest Member: metaneutrons
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]