Search
lxdream.org :: lxdream/src/gdrom/edc_crctable.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/edc_crctable.h
changeset 644:ccae4bfa5f82
author nkeynes
date Sun Mar 02 11:38:08 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Bug #59: Add provisional support for all CD read modes (not validated)
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/gdrom/edc_crctable.h Sun Mar 02 11:38:08 2008 +0000
1.3 @@ -0,0 +1,171 @@
1.4 +/* @(#)crctable.out 1.2 02/10/17 joerg */
1.5 +
1.6 +/*****************************************************************/
1.7 +/* */
1.8 +/* CRC LOOKUP TABLE */
1.9 +/* ================ */
1.10 +/* The following CRC lookup table was generated automagically */
1.11 +/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
1.12 +/* Program V1.0 using the following model parameters: */
1.13 +/* */
1.14 +/* Width : 4 bytes. */
1.15 +/* Poly : 0x8001801BL */
1.16 +/* Reverse : TRUE. */
1.17 +/* */
1.18 +/* For more information on the Rocksoft^tm Model CRC Algorithm, */
1.19 +/* see the document titled "A Painless Guide to CRC Error */
1.20 +/* Detection Algorithms" by Ross Williams */
1.21 +/* (ross@guest.adelaide.edu.au.). This document is likely to be */
1.22 +/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
1.23 +/* */
1.24 +/*****************************************************************/
1.25 +
1.26 +#ifdef PROTOTYPES
1.27 +
1.28 +static unsigned int EDC_crctable[256] =
1.29 +{
1.30 + 0x00000000U, 0x90910101U, 0x91210201U, 0x01B00300U,
1.31 + 0x92410401U, 0x02D00500U, 0x03600600U, 0x93F10701U,
1.32 + 0x94810801U, 0x04100900U, 0x05A00A00U, 0x95310B01U,
1.33 + 0x06C00C00U, 0x96510D01U, 0x97E10E01U, 0x07700F00U,
1.34 + 0x99011001U, 0x09901100U, 0x08201200U, 0x98B11301U,
1.35 + 0x0B401400U, 0x9BD11501U, 0x9A611601U, 0x0AF01700U,
1.36 + 0x0D801800U, 0x9D111901U, 0x9CA11A01U, 0x0C301B00U,
1.37 + 0x9FC11C01U, 0x0F501D00U, 0x0EE01E00U, 0x9E711F01U,
1.38 + 0x82012001U, 0x12902100U, 0x13202200U, 0x83B12301U,
1.39 + 0x10402400U, 0x80D12501U, 0x81612601U, 0x11F02700U,
1.40 + 0x16802800U, 0x86112901U, 0x87A12A01U, 0x17302B00U,
1.41 + 0x84C12C01U, 0x14502D00U, 0x15E02E00U, 0x85712F01U,
1.42 + 0x1B003000U, 0x8B913101U, 0x8A213201U, 0x1AB03300U,
1.43 + 0x89413401U, 0x19D03500U, 0x18603600U, 0x88F13701U,
1.44 + 0x8F813801U, 0x1F103900U, 0x1EA03A00U, 0x8E313B01U,
1.45 + 0x1DC03C00U, 0x8D513D01U, 0x8CE13E01U, 0x1C703F00U,
1.46 + 0xB4014001U, 0x24904100U, 0x25204200U, 0xB5B14301U,
1.47 + 0x26404400U, 0xB6D14501U, 0xB7614601U, 0x27F04700U,
1.48 + 0x20804800U, 0xB0114901U, 0xB1A14A01U, 0x21304B00U,
1.49 + 0xB2C14C01U, 0x22504D00U, 0x23E04E00U, 0xB3714F01U,
1.50 + 0x2D005000U, 0xBD915101U, 0xBC215201U, 0x2CB05300U,
1.51 + 0xBF415401U, 0x2FD05500U, 0x2E605600U, 0xBEF15701U,
1.52 + 0xB9815801U, 0x29105900U, 0x28A05A00U, 0xB8315B01U,
1.53 + 0x2BC05C00U, 0xBB515D01U, 0xBAE15E01U, 0x2A705F00U,
1.54 + 0x36006000U, 0xA6916101U, 0xA7216201U, 0x37B06300U,
1.55 + 0xA4416401U, 0x34D06500U, 0x35606600U, 0xA5F16701U,
1.56 + 0xA2816801U, 0x32106900U, 0x33A06A00U, 0xA3316B01U,
1.57 + 0x30C06C00U, 0xA0516D01U, 0xA1E16E01U, 0x31706F00U,
1.58 + 0xAF017001U, 0x3F907100U, 0x3E207200U, 0xAEB17301U,
1.59 + 0x3D407400U, 0xADD17501U, 0xAC617601U, 0x3CF07700U,
1.60 + 0x3B807800U, 0xAB117901U, 0xAAA17A01U, 0x3A307B00U,
1.61 + 0xA9C17C01U, 0x39507D00U, 0x38E07E00U, 0xA8717F01U,
1.62 + 0xD8018001U, 0x48908100U, 0x49208200U, 0xD9B18301U,
1.63 + 0x4A408400U, 0xDAD18501U, 0xDB618601U, 0x4BF08700U,
1.64 + 0x4C808800U, 0xDC118901U, 0xDDA18A01U, 0x4D308B00U,
1.65 + 0xDEC18C01U, 0x4E508D00U, 0x4FE08E00U, 0xDF718F01U,
1.66 + 0x41009000U, 0xD1919101U, 0xD0219201U, 0x40B09300U,
1.67 + 0xD3419401U, 0x43D09500U, 0x42609600U, 0xD2F19701U,
1.68 + 0xD5819801U, 0x45109900U, 0x44A09A00U, 0xD4319B01U,
1.69 + 0x47C09C00U, 0xD7519D01U, 0xD6E19E01U, 0x46709F00U,
1.70 + 0x5A00A000U, 0xCA91A101U, 0xCB21A201U, 0x5BB0A300U,
1.71 + 0xC841A401U, 0x58D0A500U, 0x5960A600U, 0xC9F1A701U,
1.72 + 0xCE81A801U, 0x5E10A900U, 0x5FA0AA00U, 0xCF31AB01U,
1.73 + 0x5CC0AC00U, 0xCC51AD01U, 0xCDE1AE01U, 0x5D70AF00U,
1.74 + 0xC301B001U, 0x5390B100U, 0x5220B200U, 0xC2B1B301U,
1.75 + 0x5140B400U, 0xC1D1B501U, 0xC061B601U, 0x50F0B700U,
1.76 + 0x5780B800U, 0xC711B901U, 0xC6A1BA01U, 0x5630BB00U,
1.77 + 0xC5C1BC01U, 0x5550BD00U, 0x54E0BE00U, 0xC471BF01U,
1.78 + 0x6C00C000U, 0xFC91C101U, 0xFD21C201U, 0x6DB0C300U,
1.79 + 0xFE41C401U, 0x6ED0C500U, 0x6F60C600U, 0xFFF1C701U,
1.80 + 0xF881C801U, 0x6810C900U, 0x69A0CA00U, 0xF931CB01U,
1.81 + 0x6AC0CC00U, 0xFA51CD01U, 0xFBE1CE01U, 0x6B70CF00U,
1.82 + 0xF501D001U, 0x6590D100U, 0x6420D200U, 0xF4B1D301U,
1.83 + 0x6740D400U, 0xF7D1D501U, 0xF661D601U, 0x66F0D700U,
1.84 + 0x6180D800U, 0xF111D901U, 0xF0A1DA01U, 0x6030DB00U,
1.85 + 0xF3C1DC01U, 0x6350DD00U, 0x62E0DE00U, 0xF271DF01U,
1.86 + 0xEE01E001U, 0x7E90E100U, 0x7F20E200U, 0xEFB1E301U,
1.87 + 0x7C40E400U, 0xECD1E501U, 0xED61E601U, 0x7DF0E700U,
1.88 + 0x7A80E800U, 0xEA11E901U, 0xEBA1EA01U, 0x7B30EB00U,
1.89 + 0xE8C1EC01U, 0x7850ED00U, 0x79E0EE00U, 0xE971EF01U,
1.90 + 0x7700F000U, 0xE791F101U, 0xE621F201U, 0x76B0F300U,
1.91 + 0xE541F401U, 0x75D0F500U, 0x7460F600U, 0xE4F1F701U,
1.92 + 0xE381F801U, 0x7310F900U, 0x72A0FA00U, 0xE231FB01U,
1.93 + 0x71C0FC00U, 0xE151FD01U, 0xE0E1FE01U, 0x7070FF00U,
1.94 +};
1.95 +
1.96 +/*****************************************************************/
1.97 +/* End of CRC Lookup Table */
1.98 +/*****************************************************************/
1.99 +
1.100 +#else /* PROTOTYPES */
1.101 +
1.102 +static unsigned int EDC_crctable[256] =
1.103 +{
1.104 + 0x00000000, 0x90910101, 0x91210201, 0x01B00300,
1.105 + 0x92410401, 0x02D00500, 0x03600600, 0x93F10701,
1.106 + 0x94810801, 0x04100900, 0x05A00A00, 0x95310B01,
1.107 + 0x06C00C00, 0x96510D01, 0x97E10E01, 0x07700F00,
1.108 + 0x99011001, 0x09901100, 0x08201200, 0x98B11301,
1.109 + 0x0B401400, 0x9BD11501, 0x9A611601, 0x0AF01700,
1.110 + 0x0D801800, 0x9D111901, 0x9CA11A01, 0x0C301B00,
1.111 + 0x9FC11C01, 0x0F501D00, 0x0EE01E00, 0x9E711F01,
1.112 + 0x82012001, 0x12902100, 0x13202200, 0x83B12301,
1.113 + 0x10402400, 0x80D12501, 0x81612601, 0x11F02700,
1.114 + 0x16802800, 0x86112901, 0x87A12A01, 0x17302B00,
1.115 + 0x84C12C01, 0x14502D00, 0x15E02E00, 0x85712F01,
1.116 + 0x1B003000, 0x8B913101, 0x8A213201, 0x1AB03300,
1.117 + 0x89413401, 0x19D03500, 0x18603600, 0x88F13701,
1.118 + 0x8F813801, 0x1F103900, 0x1EA03A00, 0x8E313B01,
1.119 + 0x1DC03C00, 0x8D513D01, 0x8CE13E01, 0x1C703F00,
1.120 + 0xB4014001, 0x24904100, 0x25204200, 0xB5B14301,
1.121 + 0x26404400, 0xB6D14501, 0xB7614601, 0x27F04700,
1.122 + 0x20804800, 0xB0114901, 0xB1A14A01, 0x21304B00,
1.123 + 0xB2C14C01, 0x22504D00, 0x23E04E00, 0xB3714F01,
1.124 + 0x2D005000, 0xBD915101, 0xBC215201, 0x2CB05300,
1.125 + 0xBF415401, 0x2FD05500, 0x2E605600, 0xBEF15701,
1.126 + 0xB9815801, 0x29105900, 0x28A05A00, 0xB8315B01,
1.127 + 0x2BC05C00, 0xBB515D01, 0xBAE15E01, 0x2A705F00,
1.128 + 0x36006000, 0xA6916101, 0xA7216201, 0x37B06300,
1.129 + 0xA4416401, 0x34D06500, 0x35606600, 0xA5F16701,
1.130 + 0xA2816801, 0x32106900, 0x33A06A00, 0xA3316B01,
1.131 + 0x30C06C00, 0xA0516D01, 0xA1E16E01, 0x31706F00,
1.132 + 0xAF017001, 0x3F907100, 0x3E207200, 0xAEB17301,
1.133 + 0x3D407400, 0xADD17501, 0xAC617601, 0x3CF07700,
1.134 + 0x3B807800, 0xAB117901, 0xAAA17A01, 0x3A307B00,
1.135 + 0xA9C17C01, 0x39507D00, 0x38E07E00, 0xA8717F01,
1.136 + 0xD8018001, 0x48908100, 0x49208200, 0xD9B18301,
1.137 + 0x4A408400, 0xDAD18501, 0xDB618601, 0x4BF08700,
1.138 + 0x4C808800, 0xDC118901, 0xDDA18A01, 0x4D308B00,
1.139 + 0xDEC18C01, 0x4E508D00, 0x4FE08E00, 0xDF718F01,
1.140 + 0x41009000, 0xD1919101, 0xD0219201, 0x40B09300,
1.141 + 0xD3419401, 0x43D09500, 0x42609600, 0xD2F19701,
1.142 + 0xD5819801, 0x45109900, 0x44A09A00, 0xD4319B01,
1.143 + 0x47C09C00, 0xD7519D01, 0xD6E19E01, 0x46709F00,
1.144 + 0x5A00A000, 0xCA91A101, 0xCB21A201, 0x5BB0A300,
1.145 + 0xC841A401, 0x58D0A500, 0x5960A600, 0xC9F1A701,
1.146 + 0xCE81A801, 0x5E10A900, 0x5FA0AA00, 0xCF31AB01,
1.147 + 0x5CC0AC00, 0xCC51AD01, 0xCDE1AE01, 0x5D70AF00,
1.148 + 0xC301B001, 0x5390B100, 0x5220B200, 0xC2B1B301,
1.149 + 0x5140B400, 0xC1D1B501, 0xC061B601, 0x50F0B700,
1.150 + 0x5780B800, 0xC711B901, 0xC6A1BA01, 0x5630BB00,
1.151 + 0xC5C1BC01, 0x5550BD00, 0x54E0BE00, 0xC471BF01,
1.152 + 0x6C00C000, 0xFC91C101, 0xFD21C201, 0x6DB0C300,
1.153 + 0xFE41C401, 0x6ED0C500, 0x6F60C600, 0xFFF1C701,
1.154 + 0xF881C801, 0x6810C900, 0x69A0CA00, 0xF931CB01,
1.155 + 0x6AC0CC00, 0xFA51CD01, 0xFBE1CE01, 0x6B70CF00,
1.156 + 0xF501D001, 0x6590D100, 0x6420D200, 0xF4B1D301,
1.157 + 0x6740D400, 0xF7D1D501, 0xF661D601, 0x66F0D700,
1.158 + 0x6180D800, 0xF111D901, 0xF0A1DA01, 0x6030DB00,
1.159 + 0xF3C1DC01, 0x6350DD00, 0x62E0DE00, 0xF271DF01,
1.160 + 0xEE01E001, 0x7E90E100, 0x7F20E200, 0xEFB1E301,
1.161 + 0x7C40E400, 0xECD1E501, 0xED61E601, 0x7DF0E700,
1.162 + 0x7A80E800, 0xEA11E901, 0xEBA1EA01, 0x7B30EB00,
1.163 + 0xE8C1EC01, 0x7850ED00, 0x79E0EE00, 0xE971EF01,
1.164 + 0x7700F000, 0xE791F101, 0xE621F201, 0x76B0F300,
1.165 + 0xE541F401, 0x75D0F500, 0x7460F600, 0xE4F1F701,
1.166 + 0xE381F801, 0x7310F900, 0x72A0FA00, 0xE231FB01,
1.167 + 0x71C0FC00, 0xE151FD01, 0xE0E1FE01, 0x7070FF00,
1.168 +};
1.169 +
1.170 +#endif /* PROTOTYPES */
1.171 +
1.172 +/*****************************************************************/
1.173 +/* End of CRC Lookup Table */
1.174 +/*****************************************************************/
.