# IODD TRIM Tool - Version History
## 0.2.0.4
- Added pre-TRIM step before file creation in Real Test STEP1 to optimize SSD write performance
- Added TRIM result logging with batch/sector statistics after each TRIM operation
- Added write speed chart: 2-second interval time-series data recorded during test, viewable via "Speed Chart" button after completion
- Speed chart supports Save CSV export and displays step boundary markers
- Fixed speed drop detection: replaced fixed-window average with Exponential Moving Average (EMA) for accurate detection
- Fixed speed drop wait not triggering due to 60-second cooldown blocking legitimate detections across steps
- Removed cooldown mechanism (unnecessary with EMA-based averaging)
- Display total disk sectors alongside GiB in Drive Inspection summary
- Changed "Last free start LBA" to "Last used LBA" for clearer disk usage display
- DSM TRIM initial failure and multi-descriptor SCSI UNMAP rejection now logged as WARN instead of ERROR
- Deferred volume Lock/Dismount to preserve mounted state for DSM TRIM (fixes ACCESS_DENIED on first attempt)
## 0.2.0.3
- Implemented 3-stage UASP TRIM strategy: DSM TRIM ā SCSI UNMAP ā ATA Pass-Through
- Added SCSI UNMAP single-descriptor fallback when multi-descriptor batch is rejected
- Volume Lock/Dismount now performed once before the batch loop and held for the entire operation (UASP and BOT)
- Improved cancel responsiveness: added cancellation checks inside UNMAP and ATA PT inner loops
- Changed default SCSI timeout from 20s to 5s (minimum 1s)
- Added UASP TRIM method selector in DEBUG_MODE builds (Auto / SCSI UNMAP / ATA Pass-Through)
## 0.2.0.2
- Added "Size (GB)" column after "Total Sectors" in the Inspect tab grid
- Added percentage display to "Free Sectors" and "Used Sectors" columns (e.g. `920664 (1.5%)`)
- Added auto-size columns after inspection to prevent data from being clipped
## 0.2.0.1
- Bug fixes across 7 source files (25 issues resolved)
- **Critical**: Fixed use-after-free in logger destructor when queued UI callbacks reference freed object
- **High**: Fixed SCSI sense data parsing to distinguish fixed-format (0x70/0x71) vs descriptor-format (0x72/0x73)
- **High**: Fixed worker thread accessing UI controls directly ā TRIM options now captured on main thread before execution
- **High**: Fixed shared `TVolumeBitmapReader` concurrent access from worker thread ā now uses dedicated instance
- **High**: Fixed `FreeOnTerminate=True` threads causing race condition in `FormDestroy` ā properly stopped and freed
- **High**: Fixed Debug-build range-check crash on flexible array (`array[0..0]`) access in disk extent enumeration
- **High**: Added `{$packrecords 8}` for `LARGE_INTEGER`-containing records to prevent 32-bit build field misalignment
- **Medium**: Fixed `GetLastError` being clobbered before capture in `ProbeIdentifyDevice`
- **Medium**: Added minimum size guard (36 bytes) for `TStorageDeviceDescriptor` before accessing fields
- **Medium**: Added null terminator to device descriptor buffer to prevent unbounded string reads
- **Medium**: Fixed all early exits in real test `Execute` to set `FResultMessage` (previously silent failures)
- **Medium**: Fixed `FillFiles` batch directory logic ā files 1000+ now correctly placed in `batch_N/` subdirectories
- **Medium**: Moved `CloseFile` into `finally` blocks to prevent TextFile handle leaks on exceptions
- **Medium**: Fixed logger deadlock potential ā UI callback now invoked outside critical section lock
- **Medium**: Wrapped `AppendLineToFile` in `try..except` to prevent I/O exceptions from crashing worker threads
- **Low**: Fixed `FIsWriting` flag not being reset on early exit from file fill operations
- **Low**: Fixed `FileCrc` returning partial CRC on cancellation, causing false verification failures
- **Low**: Removed duplicate `FreeStatsSummary` append in disk selection change handler
- **Low**: Fixed `FlushVolumesIfRequested` using wrong field (`VolumePath` ā `DriveLetter`) for device path
- **Low**: Fixed `GetFileSize` mishandling exact 4GB-1 byte files ā added `GetLastError = NO_ERROR` check
- **Low**: Added thread safety to `SetUiSink` and `DisableFileOutput` (lock acquisition)
- **Low**: Fixed Chinese Traditional users incorrectly mapped to Simplified Chinese
- **Low**: Added `ERROR_INVALID_FUNCTION` as permanent ATA failure code to avoid useless retries
- **Low**: Fixed empty `MessageText` when all ATA retries exhausted without hitting permanent error
- **Low**: Capped retry backoff delay at 30 seconds to prevent `Cardinal` overflow
- **Low**: Fixed `JsonEscape` to handle control characters (`\n`, `\r`, `\t`, etc.)
- **Low**: Replaced O(n²) bubble sort with QuickSort in `MergeRanges` for fragmented volume performance
- **Low**: Protocol detection heuristic now scans only raw device properties, skipping binary header
## 0.1.0.5
- Added UASP (USB Attached SCSI) support with dual-path TRIM strategy
- UASP devices: SCSI UNMAP first, automatic fallback to ATA Pass-Through if UNMAP fails
- BOT devices: ATA Pass-Through (unchanged)
## 0.1.0.4
- Changed "Flush Volumes before TRIM" checkbox default to checked
## 0.1.0.3
- Changed Dry Run checkbox default to unchecked
## 0.1.0.2
- Added logical drive selector in the Real Test tab, allowing users to choose which volume to use for testing
- Added read-only drive detection: log and CSV files are no longer created when running from a read-only drive
- Unified version definition into a single `version.inc` file with automatic RC/RES generation via pre-build script
## 0.1.0.1
- Initial release
- USB-SATA bridge ATA Pass-Through support for SSD TRIM
- TRIM execution with Full Device and Free Space Only modes
- Drive inspection tab with volume bitmap analysis and free-range CSV export
- Real test tab with 4-step write/delete/TRIM/verify cycle
- Multi-language support: Korean, English, Japanese, Chinese, Spanish, German, French, Russian
- Automatic OS language detection with manual language selection
- TRIM and ATA Pass-Through capability detection displayed in disk info
- Partition file system type shown in disk selection combo box
- GiB display alongside raw byte values in disk info
- Top toolbar buttons: IODD Product, IODD Manual, How to Use, TRIM Info, License
- Success/failure popup notifications for TRIM execution and real test verification
- Stop button support during Verify Only mode
- EXE version info embedding via Windows VERSIONINFO resource
- Administrator privilege requirement via application manifest