View Single Post
Old 17 June 2018, 19:20   #19
Registered User
Join Date: Aug 2004
Posts: 2,974
Still on the subject of hardfiles (but not really related to the subject of this thread)...

If emulating a drive with more than 2^32 sectors (i.e. >2TB for 512-byte sectors), the max. LBA field returned in READ CAPACITY (10) data should be 0xFFFFFFFF.

In hardfile.cpp there is
case 0x25: /* READ CAPACITY */
			uae_u32 blocks;
			blocks = (uae_u32)(hfd->virtsize / hfd->ci.blocksize);
			if (hfd->ci.max_lba)
				blocks = hfd->ci.max_lba;
			wl (r, blocks - 1);
I think that means that with a >2TB 512-byte sector drive, blocks is set to the size modulo 2TB, so the max. LBA field won't be 0xFFFFFFFF?
mark_k is offline  
Page generated in 0.04087 seconds with 11 queries