English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.Other (http://eab.abime.net/forumdisplay.php?f=74)
-   -   Some HD Toolbox Questions (http://eab.abime.net/showthread.php?t=89154)

BJH 24 October 2017 18:48

Some HD Toolbox Questions
 
Amiga fans,

I am quite used to setting up hard drives on the AMIGA and I know what to do. But I am aware that I don't understand some of the settings I make - I simply learned to make those settings from other people.

I would like to ask my fellow Amiga fans to help me to dispel my ignorance.

  1. When adding a new file system, you have to change the "Identifier". e.g. for PFS3 the identifier needs to be changed to 50465303.
    What is this identifier exactly, and what does it do?
  2. After setting the correct identifier you can change a partition to the file system of choice. One of the options here is called "Mask". I understand what a bitmask is and what it does. But what is its application here?
  3. Another setting is called "Max Transfer". I understand I should set it to
    0x0001FE00. Why? What does this do?
  4. Regarding file system block size, I always set it to 512. But what are the pros and cons to other settings here?
Many thanks in advance!

thomas 24 October 2017 19:18

Quote:

What is this identifier exactly, and what does it do?
The identifier is the unique key of the file system in Filesystem.resource. There can be only one file system with the same identifier in the system. The identifier also selects the file system for a partition. Like the one-byte partition type on a PC you have a 4-byte partition type on the Amiga. The main difference is that PC's partition types are well defined while on the Amiga you can freely choose the identifier.


Quote:

One of the options here is called "Mask". I understand what a bitmask is and what it does. But what is its application here?
By the mask a file system can decide whether the device driver is able to do DMA from a buffer or not. If the start address of the buffer fits the mask, then the buffer can be used for DMA, otherwise the file system has to allocate a new buffer and copy the contents there.

Quote:

Another setting is called "Max Transfer". I understand I should set it to
0x0001FE00. Why? What does this do?
The MaxTransfer value defines the largest amount of data which can be sent over the bus in one chunk. Like MTU in networking. Normally a device driver should be able to deal with any chunk sizes. Too big buffers have to be split into several transfers. But if the implementation is buggy, you can let the file system do the split by specifying a small MaxTransfer.

0x1fe00 is 255 times 512. The ATA bus can transfer a maximum of 256 blocks of 512 bytes. This would be 0x20000. One reduces the value by one block for safety.


Quote:

Regarding file system block size, I always set it to 512. But what are the pros and cons to other settings here?
Generally larger blocks are faster but waste more space.

If the file system limits the partition size by a maximum number of blocks, you can also increase the partition size limit by specifying larger blocks.

Especially when it comes to flash memory and SSDs it might be a good idea to align file system blocks to physical sectors.

BJH 25 October 2017 10:15

Thanks very much indeed for your response Thomas!

I am satisfied with the answers to my 3rd and 4th questions, and I am happy that I understand it now.

I still don't feel like I fully understand the identifier or mask but your response has given me something to go on. I'll read into it based on what you've told me and try to further my understanding before I post any follow-up questions :)

Thanks for sharing your knowledge.

patrik 25 October 2017 11:48

The Mask is also used to circumvent bugs/limits in the driver/hardware. It should be 0xFFFFFFFF unless there is a bug/limit.

The file system will do a bitwise and with the Mask and the address of the buffer used for a read/write and if the result doesnt match the address, it will transfer data via an intermediary buffer in “safe” memory, usually chip memory - very slow both because of extra copy and slow chip memory.

An example can be if the driver+hardware does not handle transfers to/from odd addresses, then you can set the Mask to 0xFFFFFFFE to mask away odd addresses, forcing the “safe” transfer for those.

Another example can be if the driver driver+hardware doesn’t handle transfers to memory above Zorro2 space (first 16MB), then you can set Mask to 0xFFFFFF to mask such addresses away, forcing “safe” transfers for them.

You can also of course combine the above to 0xFFFFFE to mask away both odd addresses and addresses above Zorro2 space.


All times are GMT +2. The time now is 20:02.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.

Page generated in 0.07903 seconds with 11 queries