smc.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. smc.h - Super Magic Card support for uCON64
  3. Copyright (c) 2003 dbjh
  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 SMC_H
  17. #define SMC_H
  18. #ifdef HAVE_CONFIG_H
  19. #include "config.h"
  20. #endif
  21. #include "misc/getopt2.h" // st_getopt2_t
  22. extern const st_getopt2_t smc_usage[];
  23. typedef struct st_smc_header
  24. {
  25. unsigned char emulation1;
  26. unsigned char emulation2;
  27. unsigned char pad[6];
  28. unsigned char id1;
  29. unsigned char id2;
  30. unsigned char type;
  31. unsigned char pad2[501];
  32. } st_smc_header_t;
  33. #define SMC_HEADER_START 0
  34. #define SMC_HEADER_LEN (sizeof (st_smc_header_t))
  35. #define SMC_TRAINER 0x40
  36. #ifdef USE_PARALLEL
  37. extern int smc_write_rom (const char *filename, unsigned short parport);
  38. extern int smc_read_rts (const char *filename, unsigned short parport);
  39. extern int smc_write_rts (const char *filename, unsigned short parport);
  40. #endif
  41. #endif