backup.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. backup.h - backup support for uCON64
  3. Copyright (c) 2003 NoisyB
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef BACKUP_H
  17. #define BACKUP_H
  18. #include "misc/getopt2.h" // st_getopt2_t
  19. /*
  20. usage and init function for all unknown backup units/emulators
  21. */
  22. extern const st_getopt2_t unknown_backup_usage[];
  23. /*
  24. default header for unknown backup units
  25. */
  26. typedef struct // st_unknown_header
  27. {
  28. /*
  29. Don't create fields that are larger than one byte! For example size_low and
  30. size_high could be combined in one unsigned short int. However, this gives
  31. problems with little endian vs. big endian machines (e.g. writing the header
  32. to disk).
  33. */
  34. unsigned char size_low;
  35. unsigned char size_high;
  36. unsigned char emulation;
  37. unsigned char hirom;
  38. unsigned char emulation1;
  39. unsigned char emulation2;
  40. unsigned char pad[2];
  41. unsigned char id1;
  42. unsigned char id2;
  43. unsigned char type;
  44. unsigned char pad2[501];
  45. } st_unknown_backup_header_t;
  46. #define UNKNOWN_BACKUP_HEADER_START 0
  47. #define UNKNOWN_BACKUP_HEADER_LEN (sizeof (st_unknown_backup_header_t))
  48. #endif