Results 1 to 6 of 6

Thread: How to determine MASK & MaxTransfer ?

  1. #1
    Overmann's Avatar
    Join Date
    May 2014
    Country
    Norway
    Region:
    Oslo
    Posts
    188
    Feedback
    16 (100%)

    Default How to determine MASK & MaxTransfer ?

    Hi there,

    I've been struggling with these settings for YEARS! I've read what I can find about it and for the most part I've managed to get good results, but I'm wondering if anyone would take the time to explain HOW mask and maxtransfer can be determined? Calculated?

    I see a LOT of threads asking for help regarding settings for a particular system, and the most common reply is "check the manual, most products have the settings there" but I don't own a single SCSI/IDE-kontroller that has these settings in the manual (except perhaps the GVP HC series II, but it's kind of cryptic). It seems that many members on the forums are able to just calculate, or figure out good values, but I've never understood how thats done.

    It has to do with memory adressing? The MASK represents which segment of the memory should be used for DMA? And maxtransfer represents how many bytes can be moved at once? Yeah, I don't know? And I would GREATLY appreciate it if someone took the time to give a proper explenation, or link to one (something might have gone under the radar). How technical is it? Is it really as difficult to understand as it seems?

  2. #2
    Online Gangster Amibayer! fitzsteve's Avatar
    Join Date
    Aug 2009
    Country
    UK
    Region:
    Sevenoaks, Kent
    Age
    40
    Posts
    21,693
    Feedback
    1022 (100%)
    Blog Entries
    2

    Default

    Hi, sorry to point you to another manual lol but this thread had absolutely all the information you could ever need on the subject:

    http://eab.abime.net/showthread.php?t=61666

    Once you get past the basics I think it does start to get a bit complex.
    My YouTube Channel:
    https://www.youtube.com/user/fitzsteve

    CD32 + TF330, A500+ Vampire V2, A1200T Black Box + Mediator B1260 + Killer K1 PPC

  3. #3
    Overmann's Avatar
    Join Date
    May 2014
    Country
    Norway
    Region:
    Oslo
    Posts
    188
    Feedback
    16 (100%)

    Default

    I did stumbled across that thread when looking for info. Lot's of great info on maxtransfer and filesystems, DirectSCSI etc. but I didn't find that much on MASK values for DMA capable controllers. It might be I skimmed it too quickly?
    I have three or four DMA capable controllers (A3000, GVP Impact A2000-HC+8 Series II, Masoboshi 702 and Blizzard SCSI kit) and none of them have the MASK values clearly stated (to a lay person like myself) in the manual.

    It seems to me that it depends on a number of factors, so giving clear answers would be difficult, but I can't find anything about how to work out a correct MASK value for any given system anywhere. Is it so complicated that such information simply doesn't exist (isn't really all that meaningful/useful)?

  4. #4
    vibros's Avatar
    Join Date
    Sep 2009
    Country
    Italy
    Region:
    Emilia-Romagna
    Posts
    2,054
    Feedback
    108 (100%)

    Default

    Hello,

    your question about how determine values is right, anyway i can only point you to the manual ( you guess?) of the filesystem you use (i.e. PFS, that explain some things about what are you looking for, inside the guide).
    I have coded a device driver for an IDE card, but never seen (at least, by the point of view of the device driver, like buddha.device, scsi.device and so on) this values; so never encountered lines of code where manage MASK and MAXTRANSFER.
    So, seems to be a question of FileSystem and old DMA controllers or controllers inside motherboards.

    Regards
    Stefano
    Last edited by vibros; 13th May 2020 at 23:57.

  5. #5
    vibros's Avatar
    Join Date
    Sep 2009
    Country
    Italy
    Region:
    Emilia-Romagna
    Posts
    2,054
    Feedback
    108 (100%)

    Default

    Hello,

    as reported from the manual of ProfessionalFileSystem 2

    .....................

    > DMAMask

    If you don't have memory problems you should use the same mask as FFS/AFS did. The mask is filesystem independent. For the A1200/A4000 internal IDE controller use 0xfffffffc. For ZorroIII boards (Fastlane, Phase5, 4091) use 0xffffffff. For ZorroII boards and Oktagon 4008 use 0x7ffffffc.

    > MaxTransfer

    Use the same maxtransfer as FFS/AFS did. Maxtransfer is filesystem independent.

    .....................

    Seems that Mask is related to memory alignment and addressing capabilities of the controller (i.e. a Zorro II card, that has 24 bit width address bus, needs a Mask of $FFFFFC, that is the union of 'max address' and 'alignment to longword', $FFFFFF&$FFFFFC); MaxTransfer means how much can be transfered in a shoot (it is a limitation of the device driver of the controller; i.e. my ide.device of my IDE card, has no limit).

    Regards

    Stefano
    Last edited by vibros; 14th May 2020 at 00:02.

  6. #6
    vibros's Avatar
    Join Date
    Sep 2009
    Country
    Italy
    Region:
    Emilia-Romagna
    Posts
    2,054
    Feedback
    108 (100%)

    Default

    Hello,

    the MaxTransfer value could be a pretty test to see how good is a device driver (i mean how much good is his code).
    For the IDE port of the A1200, the value to use is $1FE00 (as reported in some documents); you can try to use $FFFF instead. A good code work properly in both cases, because the 'strange' value used for the A1200, tell just to the device driver to use multiple values of 512 (bytes), the size of an hard-disk sector; but this is obvious, because it is not possible to fall in the half of a sector! A good code takes every value and does a mask itself (it means does not expect any MaxTransfer value at all!); it maskes the amount to transfer, and sees if this value is multiple of 512; if not, reject to do the job!

    Try this by yourself!

    About Mask, this is specific of DMA card, and, maybe, with ram onboard. In PIO mode, when CPU does Read and Write, it knows what to do and does not need any Mask at all...at least, this is my opinion.

    Stefano

Similar Threads

  1. C64 BASIC line to determine SD2IEC device number
    By SimonLCFC in forum Programming
    Replies: 30
    Last Post: 13th October 2013, 09:25

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •