[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Launching MiNT from a DOS FAT partition



Hi Roger,

Sorry for not looking at this. Very busy at the moment.

But yes, I think the least path of resistance is bumping MIN_BLOCK to 32768.

Alan.

On 25/12/14 00:00, Roger Burrows wrote:
> Mark Duckworth reported a problem on the ACP forum when trying to launch MiNT 
> from a DOS FAT partition under EmuTOS.  MiNT did not boot, because the startup 
> code refused to login his big DOS-style FAT partitions.  Looking at the 
> relevant MiNT code, I see that MiNT's FATFS will not login a drive where the 
> cluster size in bytes is bigger than cache.max_size.  In init_block_IO(), 
> cache.max_size is calculated as:
> 	max(MIN_BLOCK,2*max_sect_siz)
> where MIN_BLOCK is 8192, and max_sect_siz is taken from the AHDI pun_info 
> structure, where it is the maximum logical sector size on any of the host's 
> drives.  For a system with only DOS-style partitions, this will be 512 bytes.
>
> So if you try to run MiNT from EmuTOS running on a DOS-style partition, 
> max_sect_siz will be set to 512, and thus cache.max_size to 8192.  Accessing a 
> partition with clusters larger than 8192 bytes (i.e. a partition larger than 
> 512MB) is not possible, so MiNT will not start.
>
> I'm not sure where the fix should be: perhaps MIN_BLOCK should be 32768?
>
> Roger
> P.S. This isn't a problem with FireTOS, since it lies about max_sect_siz, but I 
> don't think EmuTOS should be lying too.
>
>
>