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.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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_