Jan Lönnberg - MOD Fixing

I've received a lot of questions regarding Protracker MOD files that seem to play incorrectly on some players. Often, they've been extracted from a game or demo carelessly, and the resulting file may thus be of the wrong length. This problem is compounded by the fact that different trackers misuse the ProTracker format differently, and thus the player used may be unable to tell how many patterns the file actually includes, meaning that the sample data that follows the patterns is misread. This can often be corrected by setting the values of unused order entries to zero - the problem being that some trackers ignore any orders after the end of the song, while some use these to indicate unused patterns. Most problems with ripped files arise from the fact that rippers assume the former interpretation, even when the latter is correct.

Specifically, to correct a file with this problem, read the value of byte number 950, add 952 to the resulting value, and set all bytes from that offset onwards up to 1079 to 0. This procedure has been automated by Matthew Wright through a Perl script which can be downloaded here.