We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e86312 commit 23beec7Copy full SHA for 23beec7
lib/media/atari/diskTypeAtr.cpp
@@ -38,11 +38,11 @@ uint32_t MediaTypeATR::_sector_to_offset(uint16_t sectorNum)
38
else
39
offset = 272;
40
break;
41
- default:
+ default: // TODO: refactor this to generalize.
42
if (_disk_sector_size == 256)
43
offset = ((sectorNum - 3) * 256) + 16 + 128;
44
else if (_disk_sector_size == 512)
45
- offset = (sectorNum * 512) + 16;
+ offset = ((sectorNum - 1) * 512) + 16;
46
47
offset = ((sectorNum - 1) * 128) + 16;
48
0 commit comments