Make ADF Program

miker1264 · 1506

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
on: May 03, 2020, 11:39:39 PM
In the last few days I have been trying to come up with a good program to write a Hollywood Plugin for since I intend to purchase Hollywood.

Make ADF will be a very simple program with a few buttons to "Make ADF" and "Make HDF" files.

After researching the ADF file format I realize that making a Common ADF (DD) that is not bootable is very easy.
There are three parts to a blank ADF - BootBlock (1024 bytes) , RootBlock  (512 bytes) and following the RootBlock is the Bitmap (220 bytes).
An ADF (HD) is 1760kb and simply has a different chs geometry. A bootable ADF (DD or HD) has a BootBlock filled with Boot Code.

For a while I was puzzled by the data in the last sector (1759) of ADF's made by ADFOpus and ADFView . What was it?
When you create an empty disk file it has zero bytes. For Set EOF (End of File) both programs were calculating the location of the last block.
Then they both wrote a 512 byte random byte array to that last block to set the End of the File to be precisely 901,120 bytes. WinUAE doesn't.
It probably uses the Windows method of writing a single byte (0) to the last offset of the file to Set EOF using all zeroes instead.

Since I now know the full structure of a Simple ADF it is much easier to write the ADF Plugin and other programs to make blank ADF's.
For example FileMaster which works on AROS has a GUI button called "Make ADF" but it doesn't work yet for some reason. Now it will work.
After I attempt to make the ADF Plugin I might also try to make a Simple MUI Program as well that does the same thing - Make ADF/Make HDF.
But then something like DiskImage GUI which also works on AROS seems to lack the ability to make blank ADF files as well. Lots of possibilities!

I will surely modify my Disk Image Explorer program in C# for Windows to quickly and easily make blank ADF files now that I know the format.
« Last Edit: May 03, 2020, 11:45:13 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #1 on: May 03, 2020, 11:55:27 PM
My C# program is already set up to make ADF files. It just needs the code to make them now. But that's easy enough.  :)



paolone

  • Moderator
  • Legendary Member
  • *****
    • Posts: 568
    • Karma: +90/-0
Reply #2 on: May 04, 2020, 02:24:11 AM
Good!


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #3 on: May 04, 2020, 04:26:03 PM
Thanks miker, WinUAE also creates good ADFs


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #4 on: May 04, 2020, 05:35:56 PM
AMIGASYSTEM

WinUAE makes nice ADF files. The last block in the disk file is filled with zeroes. That's the way it should be.

But if you use ADFOpus or ADFView the last block is filled with 512 bytes of random data because that's how ADFLib crudely sets End of File length.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #5 on: May 07, 2020, 09:45:25 AM
The first place that I will attempt Make ADF is a new Command Button for FileMaster. Then I can put together an MUI GUI for it.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #6 on: February 02, 2021, 02:50:35 PM
I'm still working on this project along with several others.