Welcome, Guest. Please login or register.

Author Topic: HDToolbox: What should the "Mask" setting be set at?  (Read 6800 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: HDToolbox: What should the "Mask" setting be set at?
« on: September 30, 2011, 10:53:09 PM »
Try 0xFFFFFFFC - any 32 bit RAM, 32 bit aligned. Fast RAM priority will take care of using the fastest chunk first. That mask is also fine with PIO/IDE controllers.
Zorro II DMA controllers need to be restricted to 24 bit address (in case you've got or may get 32 bit RAM), so it'll be 0x00FFFFFC.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: HDToolbox: What should the "Mask" setting be set at?
« Reply #1 on: October 01, 2011, 10:44:52 AM »
As it seems, your values have been swapped...

As mask you can use 0x7FFFFFFC as well (haven't been doing this for a while), the upper 2 GB address space isn't used anyway.

The function of the mask value is quite simple: it is applied (bitwise AND) to the address of a potential buffer and if it matches (the address value isn't changed) that address is good.

However, the implications are not so simple. Essentially, zeroing leading bits forces the buffer to a lower address. A mask of 0x001FFFFF (2x 1M - 1) forces the buffer to the lowest 2 MB - chip RAM; 0x00FFFFFF (16x 1M - 1) to the lowest 16 MB (24 bit space) etc.
Zeroing trailing bits affects the alignment of the buffer. 0x.......F matches any address, so there's no alignment (which usually slows down 16 or 32 bit transfers). 0x.......E (lowest bit zeroed) makes the address divisible by 2 so it's 16 bit aligned; 0x.......C makes it 32 bit aligned - depending of the hardware in use this may not be a benefit but it doesn't hurt.