HS Format (Major Stryker)
The Major Stryker high score format is used to store the top ten scores in Major Stryker.
The file begins with a single byte checksum in order to prevent tampering. The checksum is generated by summing most of the bytes in the high score file into a byte value, and throwing away the overflow. The first byte (the checksum itself) and the last two bytes of the file are excluded from this sum. The same algorithm is used to calculate the checksum of the Major Stryker Save Game Format.
|BYTE||checksum||Checksum of the file.|
The data consists of a list of ten scores.
|CHAR[...]||score||Player's score. Space (0x20) terminating.|
|CHAR[...]||name||Player's name. \r\n (0x0D, 0x0A) terminating. Maximum 12 characters.|
The list contains an eleventh score which is really just an unnecessarily long end of file marker.
|CHAR||score||Always "1000". Space (0x20) terminating.|
|CHAR||name||Always "..". \r\n (0x0D, 0x0A) terminating.|
This FreeBASIC program will generate a new high score file with whatever names and scores you like, and prefix the proper checksum header.
' Major Stryker High Score Generator. ' ------------------------------------------ ' This program generates a high score file ' with the proper checksum value. ' Declare work variables. Dim Table As String Dim File As String Dim Checksum As Byte ' Change this file path to the location of your Major Stryker high score file. File = "D:\Documents\Games\Stryker\HS.MS1" ' Generate the high score list. ' Change any of the scores and names to the value you desire, ' but keep your scores less than 7 digits and your names ' less that 12 characters long. Table = "" Table = Table + "50000 Hudson " + Chr(13) + Chr(10) Table = Table + "45000 Hicks D. " + Chr(13) + Chr(10) Table = Table + "40000 Vasquez J. " + Chr(13) + Chr(10) Table = Table + "35000 Bishop L. " + Chr(13) + Chr(10) Table = Table + "30000 Apone A. " + Chr(13) + Chr(10) Table = Table + "25000 Spunkmeyer " + Chr(13) + Chr(10) Table = Table + "20000 Dietrich C. " + Chr(13) + Chr(10) Table = Table + "15000 Wierzbowski " + Chr(13) + Chr(10) Table = Table + "10000 Berk C. " + Chr(13) + Chr(10) Table = Table + "5000 Ripley E. " + Chr(13) + Chr(10) Table = Table + "1000 .." + Chr(13) + Chr(10) ' Generate the checksum. ' The checksum simply adds the ASCII value of each character in the high ' score file to a byte value, while throwing away the overflow. ' The checksum value is salted with 233 to make it harder to reverse ' engineer. But that didn't stop me! ;-) Checksum = 233 ' Sum up each character in the file. Dim X As UShort For X = 1 To Len(Table) Checksum = Checksum + Asc(Mid(Table, X, 1)) Next X ' Attach the checksum to the front of the high score list. Table = Chr(Checksum) + Table ' Delete the high score file if it already exists. Kill File ' Open the high score file, store the new list, and save it. Open File For Binary As #1 Put #1, , Table Close #1
This high score format was reverse engineered by TheAlmightyGuru. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)