/* dvdisaster: Additional error correction for optical media. * Copyright (C) 2004-2007 Carsten Gnoerlich. * Project home page: http://www.dvdisaster.com * Email: carsten@dvdisaster.com -or- cgnoerlich@fsfe.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, * or direct your browser at http://www.gnu.org. */ #ifndef DVDISASTER_H #define DVDISASTER_H /* "Dare to be gorgeous and unique. * But don't ever be cryptic or otherwise unfathomable. * Make it unforgettably great." * * From "A Final Note on Style", * Amiga Intuition Reference Manual, 1986, p. 231 */ /*** *** I'm too lazy to mess with #include dependencies. *** Everything #includeable is rolled up herein... */ //#include "../types.h" #include "emuware/emuware.h" #include #include #include #include #include #include #include #include #include #include #include //#include /*** *** dvdisaster.c ***/ void PrepareDeadSector(void); void CreateEcc(void); void FixEcc(void); void Verify(void); uint32 EDCCrc32(const unsigned char*, int); /*** *** galois.c *** * This is currently the hardcoded GF(2**8). * int32 gives abundant space for the GF. * Squeezing it down to uint8 won't probably gain much, * so we implement this defensively here. * * Note that some performance critical stuff needs to * be #included from galois-inlines.h */ /* Galois field parameters for 8bit symbol Reed-Solomon code */ #define GF_SYMBOLSIZE 8 #define GF_FIELDSIZE (1<