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.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

35 строки
637B

  1. #ifndef NES_CART_H_
  2. #define NES_CART_H_
  3. #include <stdint.h>
  4. #include <stdio.h>
  5. typedef enum {
  6. Cart_Flag_Vertical = 0b00000000,
  7. Cart_Flag_Horizontal = 0b00000001,
  8. Cart_Flag_Battery = 0b00000010,
  9. } nes_Cart_Flags;
  10. typedef struct nes_cart_t {
  11. uint8_t* prg_rom;
  12. int prg_rom_banks;
  13. uint8_t* chr_rom;
  14. int chr_rom_banks;
  15. nes_Cart_Flags flags;
  16. struct nes_mapper_t* mapper;
  17. void* map_data;
  18. void* ines_mem;
  19. int ines_size;
  20. } nes_cart;
  21. int nes_cart_init_file(nes_cart*, FILE* file);
  22. int nes_cart_init_mem(nes_cart*, void*, int len);
  23. void nes_cart_done(nes_cart*);
  24. #endif // NES_CART_H_