snes.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* sd2snes - SD card based universal cartridge for the SNES
  2. Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
  3. AVR firmware portion
  4. Inspired by and based on code from sd2iec, written by Ingo Korb et al.
  5. See sdcard.c|h, config.h.
  6. FAT file system access based on code by ChaN, Jim Brain, Ingo Korb,
  7. see ff.c|h.
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; version 2 of the License only.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. snes.h: SNES hardware control and monitoring
  19. */
  20. #ifndef SNES_H
  21. #define SNES_H
  22. #define SNES_CMD_LOADROM (1)
  23. #define SNES_CMD_SETRTC (2)
  24. #define SNES_CMD_SYSINFO (3)
  25. #define SNES_CMD_LOADLAST (4)
  26. #define SNES_CMD_LOADSPC (5)
  27. #define SNES_CMD_RESET (6)
  28. #define MENU_ERR_OK (0)
  29. #define MENU_ERR_NODSP (1)
  30. #define MENU_ERR_NOBSX (2)
  31. #define SNES_RESET_PULSELEN_MS (100)
  32. uint8_t crc_valid;
  33. void prepare_reset( void );
  34. void snes_init( void );
  35. void snes_reset_pulse( void );
  36. void snes_reset( int state );
  37. uint8_t get_snes_reset( void );
  38. void snes_main_loop( void );
  39. uint8_t menu_main_loop( void );
  40. void get_selected_name( uint8_t *lfn );
  41. void snes_bootprint( void *msg );
  42. void snes_menu_errmsg( int err, void *msg );
  43. #endif