Search
lxdream.org :: lxdream/src/gdrom/edc_crctable.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/edc_crctable.h
changeset 644:ccae4bfa5f82
author nkeynes
date Wed Jul 30 22:50:44 2008 +0000 (14 years ago)
permissions -rw-r--r--
last change Bug #61: OpenBSD support
(Modified) patch from bsdmaniak, thanks!
view annotate diff log raw
     1 /* @(#)crctable.out	1.2 02/10/17 joerg */
     3 /*****************************************************************/
     4 /*                                                               */
     5 /* CRC LOOKUP TABLE                                              */
     6 /* ================                                              */
     7 /* The following CRC lookup table was generated automagically    */
     8 /* by the Rocksoft^tm Model CRC Algorithm Table Generation       */
     9 /* Program V1.0 using the following model parameters:            */
    10 /*                                                               */
    11 /*    Width   : 4 bytes.                                         */
    12 /*    Poly    : 0x8001801BL                                      */
    13 /*    Reverse : TRUE.                                            */
    14 /*                                                               */
    15 /* For more information on the Rocksoft^tm Model CRC Algorithm,  */
    16 /* see the document titled "A Painless Guide to CRC Error        */
    17 /* Detection Algorithms" by Ross Williams                        */
    18 /* (ross@guest.adelaide.edu.au.). This document is likely to be  */
    19 /* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft".        */
    20 /*                                                               */
    21 /*****************************************************************/
    23 #ifdef	PROTOTYPES
    25 static unsigned int EDC_crctable[256] =
    26 {
    27  0x00000000U, 0x90910101U, 0x91210201U, 0x01B00300U,
    28  0x92410401U, 0x02D00500U, 0x03600600U, 0x93F10701U,
    29  0x94810801U, 0x04100900U, 0x05A00A00U, 0x95310B01U,
    30  0x06C00C00U, 0x96510D01U, 0x97E10E01U, 0x07700F00U,
    31  0x99011001U, 0x09901100U, 0x08201200U, 0x98B11301U,
    32  0x0B401400U, 0x9BD11501U, 0x9A611601U, 0x0AF01700U,
    33  0x0D801800U, 0x9D111901U, 0x9CA11A01U, 0x0C301B00U,
    34  0x9FC11C01U, 0x0F501D00U, 0x0EE01E00U, 0x9E711F01U,
    35  0x82012001U, 0x12902100U, 0x13202200U, 0x83B12301U,
    36  0x10402400U, 0x80D12501U, 0x81612601U, 0x11F02700U,
    37  0x16802800U, 0x86112901U, 0x87A12A01U, 0x17302B00U,
    38  0x84C12C01U, 0x14502D00U, 0x15E02E00U, 0x85712F01U,
    39  0x1B003000U, 0x8B913101U, 0x8A213201U, 0x1AB03300U,
    40  0x89413401U, 0x19D03500U, 0x18603600U, 0x88F13701U,
    41  0x8F813801U, 0x1F103900U, 0x1EA03A00U, 0x8E313B01U,
    42  0x1DC03C00U, 0x8D513D01U, 0x8CE13E01U, 0x1C703F00U,
    43  0xB4014001U, 0x24904100U, 0x25204200U, 0xB5B14301U,
    44  0x26404400U, 0xB6D14501U, 0xB7614601U, 0x27F04700U,
    45  0x20804800U, 0xB0114901U, 0xB1A14A01U, 0x21304B00U,
    46  0xB2C14C01U, 0x22504D00U, 0x23E04E00U, 0xB3714F01U,
    47  0x2D005000U, 0xBD915101U, 0xBC215201U, 0x2CB05300U,
    48  0xBF415401U, 0x2FD05500U, 0x2E605600U, 0xBEF15701U,
    49  0xB9815801U, 0x29105900U, 0x28A05A00U, 0xB8315B01U,
    50  0x2BC05C00U, 0xBB515D01U, 0xBAE15E01U, 0x2A705F00U,
    51  0x36006000U, 0xA6916101U, 0xA7216201U, 0x37B06300U,
    52  0xA4416401U, 0x34D06500U, 0x35606600U, 0xA5F16701U,
    53  0xA2816801U, 0x32106900U, 0x33A06A00U, 0xA3316B01U,
    54  0x30C06C00U, 0xA0516D01U, 0xA1E16E01U, 0x31706F00U,
    55  0xAF017001U, 0x3F907100U, 0x3E207200U, 0xAEB17301U,
    56  0x3D407400U, 0xADD17501U, 0xAC617601U, 0x3CF07700U,
    57  0x3B807800U, 0xAB117901U, 0xAAA17A01U, 0x3A307B00U,
    58  0xA9C17C01U, 0x39507D00U, 0x38E07E00U, 0xA8717F01U,
    59  0xD8018001U, 0x48908100U, 0x49208200U, 0xD9B18301U,
    60  0x4A408400U, 0xDAD18501U, 0xDB618601U, 0x4BF08700U,
    61  0x4C808800U, 0xDC118901U, 0xDDA18A01U, 0x4D308B00U,
    62  0xDEC18C01U, 0x4E508D00U, 0x4FE08E00U, 0xDF718F01U,
    63  0x41009000U, 0xD1919101U, 0xD0219201U, 0x40B09300U,
    64  0xD3419401U, 0x43D09500U, 0x42609600U, 0xD2F19701U,
    65  0xD5819801U, 0x45109900U, 0x44A09A00U, 0xD4319B01U,
    66  0x47C09C00U, 0xD7519D01U, 0xD6E19E01U, 0x46709F00U,
    67  0x5A00A000U, 0xCA91A101U, 0xCB21A201U, 0x5BB0A300U,
    68  0xC841A401U, 0x58D0A500U, 0x5960A600U, 0xC9F1A701U,
    69  0xCE81A801U, 0x5E10A900U, 0x5FA0AA00U, 0xCF31AB01U,
    70  0x5CC0AC00U, 0xCC51AD01U, 0xCDE1AE01U, 0x5D70AF00U,
    71  0xC301B001U, 0x5390B100U, 0x5220B200U, 0xC2B1B301U,
    72  0x5140B400U, 0xC1D1B501U, 0xC061B601U, 0x50F0B700U,
    73  0x5780B800U, 0xC711B901U, 0xC6A1BA01U, 0x5630BB00U,
    74  0xC5C1BC01U, 0x5550BD00U, 0x54E0BE00U, 0xC471BF01U,
    75  0x6C00C000U, 0xFC91C101U, 0xFD21C201U, 0x6DB0C300U,
    76  0xFE41C401U, 0x6ED0C500U, 0x6F60C600U, 0xFFF1C701U,
    77  0xF881C801U, 0x6810C900U, 0x69A0CA00U, 0xF931CB01U,
    78  0x6AC0CC00U, 0xFA51CD01U, 0xFBE1CE01U, 0x6B70CF00U,
    79  0xF501D001U, 0x6590D100U, 0x6420D200U, 0xF4B1D301U,
    80  0x6740D400U, 0xF7D1D501U, 0xF661D601U, 0x66F0D700U,
    81  0x6180D800U, 0xF111D901U, 0xF0A1DA01U, 0x6030DB00U,
    82  0xF3C1DC01U, 0x6350DD00U, 0x62E0DE00U, 0xF271DF01U,
    83  0xEE01E001U, 0x7E90E100U, 0x7F20E200U, 0xEFB1E301U,
    84  0x7C40E400U, 0xECD1E501U, 0xED61E601U, 0x7DF0E700U,
    85  0x7A80E800U, 0xEA11E901U, 0xEBA1EA01U, 0x7B30EB00U,
    86  0xE8C1EC01U, 0x7850ED00U, 0x79E0EE00U, 0xE971EF01U,
    87  0x7700F000U, 0xE791F101U, 0xE621F201U, 0x76B0F300U,
    88  0xE541F401U, 0x75D0F500U, 0x7460F600U, 0xE4F1F701U,
    89  0xE381F801U, 0x7310F900U, 0x72A0FA00U, 0xE231FB01U,
    90  0x71C0FC00U, 0xE151FD01U, 0xE0E1FE01U, 0x7070FF00U,
    91 };
    93 /*****************************************************************/
    94 /*                   End of CRC Lookup Table                     */
    95 /*****************************************************************/
    97 #else	/* PROTOTYPES */
    99 static unsigned int EDC_crctable[256] =
   100 {
   101  0x00000000, 0x90910101, 0x91210201, 0x01B00300,
   102  0x92410401, 0x02D00500, 0x03600600, 0x93F10701,
   103  0x94810801, 0x04100900, 0x05A00A00, 0x95310B01,
   104  0x06C00C00, 0x96510D01, 0x97E10E01, 0x07700F00,
   105  0x99011001, 0x09901100, 0x08201200, 0x98B11301,
   106  0x0B401400, 0x9BD11501, 0x9A611601, 0x0AF01700,
   107  0x0D801800, 0x9D111901, 0x9CA11A01, 0x0C301B00,
   108  0x9FC11C01, 0x0F501D00, 0x0EE01E00, 0x9E711F01,
   109  0x82012001, 0x12902100, 0x13202200, 0x83B12301,
   110  0x10402400, 0x80D12501, 0x81612601, 0x11F02700,
   111  0x16802800, 0x86112901, 0x87A12A01, 0x17302B00,
   112  0x84C12C01, 0x14502D00, 0x15E02E00, 0x85712F01,
   113  0x1B003000, 0x8B913101, 0x8A213201, 0x1AB03300,
   114  0x89413401, 0x19D03500, 0x18603600, 0x88F13701,
   115  0x8F813801, 0x1F103900, 0x1EA03A00, 0x8E313B01,
   116  0x1DC03C00, 0x8D513D01, 0x8CE13E01, 0x1C703F00,
   117  0xB4014001, 0x24904100, 0x25204200, 0xB5B14301,
   118  0x26404400, 0xB6D14501, 0xB7614601, 0x27F04700,
   119  0x20804800, 0xB0114901, 0xB1A14A01, 0x21304B00,
   120  0xB2C14C01, 0x22504D00, 0x23E04E00, 0xB3714F01,
   121  0x2D005000, 0xBD915101, 0xBC215201, 0x2CB05300,
   122  0xBF415401, 0x2FD05500, 0x2E605600, 0xBEF15701,
   123  0xB9815801, 0x29105900, 0x28A05A00, 0xB8315B01,
   124  0x2BC05C00, 0xBB515D01, 0xBAE15E01, 0x2A705F00,
   125  0x36006000, 0xA6916101, 0xA7216201, 0x37B06300,
   126  0xA4416401, 0x34D06500, 0x35606600, 0xA5F16701,
   127  0xA2816801, 0x32106900, 0x33A06A00, 0xA3316B01,
   128  0x30C06C00, 0xA0516D01, 0xA1E16E01, 0x31706F00,
   129  0xAF017001, 0x3F907100, 0x3E207200, 0xAEB17301,
   130  0x3D407400, 0xADD17501, 0xAC617601, 0x3CF07700,
   131  0x3B807800, 0xAB117901, 0xAAA17A01, 0x3A307B00,
   132  0xA9C17C01, 0x39507D00, 0x38E07E00, 0xA8717F01,
   133  0xD8018001, 0x48908100, 0x49208200, 0xD9B18301,
   134  0x4A408400, 0xDAD18501, 0xDB618601, 0x4BF08700,
   135  0x4C808800, 0xDC118901, 0xDDA18A01, 0x4D308B00,
   136  0xDEC18C01, 0x4E508D00, 0x4FE08E00, 0xDF718F01,
   137  0x41009000, 0xD1919101, 0xD0219201, 0x40B09300,
   138  0xD3419401, 0x43D09500, 0x42609600, 0xD2F19701,
   139  0xD5819801, 0x45109900, 0x44A09A00, 0xD4319B01,
   140  0x47C09C00, 0xD7519D01, 0xD6E19E01, 0x46709F00,
   141  0x5A00A000, 0xCA91A101, 0xCB21A201, 0x5BB0A300,
   142  0xC841A401, 0x58D0A500, 0x5960A600, 0xC9F1A701,
   143  0xCE81A801, 0x5E10A900, 0x5FA0AA00, 0xCF31AB01,
   144  0x5CC0AC00, 0xCC51AD01, 0xCDE1AE01, 0x5D70AF00,
   145  0xC301B001, 0x5390B100, 0x5220B200, 0xC2B1B301,
   146  0x5140B400, 0xC1D1B501, 0xC061B601, 0x50F0B700,
   147  0x5780B800, 0xC711B901, 0xC6A1BA01, 0x5630BB00,
   148  0xC5C1BC01, 0x5550BD00, 0x54E0BE00, 0xC471BF01,
   149  0x6C00C000, 0xFC91C101, 0xFD21C201, 0x6DB0C300,
   150  0xFE41C401, 0x6ED0C500, 0x6F60C600, 0xFFF1C701,
   151  0xF881C801, 0x6810C900, 0x69A0CA00, 0xF931CB01,
   152  0x6AC0CC00, 0xFA51CD01, 0xFBE1CE01, 0x6B70CF00,
   153  0xF501D001, 0x6590D100, 0x6420D200, 0xF4B1D301,
   154  0x6740D400, 0xF7D1D501, 0xF661D601, 0x66F0D700,
   155  0x6180D800, 0xF111D901, 0xF0A1DA01, 0x6030DB00,
   156  0xF3C1DC01, 0x6350DD00, 0x62E0DE00, 0xF271DF01,
   157  0xEE01E001, 0x7E90E100, 0x7F20E200, 0xEFB1E301,
   158  0x7C40E400, 0xECD1E501, 0xED61E601, 0x7DF0E700,
   159  0x7A80E800, 0xEA11E901, 0xEBA1EA01, 0x7B30EB00,
   160  0xE8C1EC01, 0x7850ED00, 0x79E0EE00, 0xE971EF01,
   161  0x7700F000, 0xE791F101, 0xE621F201, 0x76B0F300,
   162  0xE541F401, 0x75D0F500, 0x7460F600, 0xE4F1F701,
   163  0xE381F801, 0x7310F900, 0x72A0FA00, 0xE231FB01,
   164  0x71C0FC00, 0xE151FD01, 0xE0E1FE01, 0x7070FF00,
   165 };
   167 #endif	/* PROTOTYPES */
   169 /*****************************************************************/
   170 /*                   End of CRC Lookup Table                     */
   171 /*****************************************************************/
.