NESe (pronounced "Nessie") is a NES emulator based on the e6502 emulator, also written in C with a focus on speed and portability for use on embedded platforms, especially ARM.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
743B

  1. #ifndef NESE_SAVE_H_
  2. #define NESE_SAVE_H_
  3. #include "nes.h"
  4. int load_sram(nes_cart* cart, const char* filename);
  5. int save_sram(const nes_cart* cart, const char* filename);
  6. int state_size(const nes*);
  7. int state_read(nes*, const void* mem, int size);
  8. int state_write(const nes*, void* mem, int size);
  9. int load_state(nes*, const char* filename);
  10. int save_state(const nes*, const char* filename);
  11. /*
  12. // Chunking
  13. typedef struct {
  14. int offset;
  15. int size;
  16. } nese_io_chunk;
  17. int write_chunks(void* dst, int dst_len, const void* src,
  18. const nese_io_chunk* chunks, int n_chunks);
  19. int read_chunks(const void* src, int src_len, void* dst,
  20. const nese_io_chunk* chunks, int n_chunks);
  21. */
  22. #endif // NESE_SAVE_H_