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 kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

31 Zeilen
826B

  1. #ifndef NESE_MAPPER_H_
  2. #define NESE_MAPPER_H_
  3. #include <stdbool.h>
  4. #include "ines.h"
  5. struct nes_Memory;
  6. struct nes_Mapper {
  7. int max_chr_banks;
  8. int (*init)(struct nes_Mapper*, const ines_Header*, struct nes_Memory*);
  9. bool (*write_rom)(struct nes_Mapper*, uint16_t addr, uint8_t val);
  10. bool (*write_sram)(struct nes_Mapper*, uint16_t addr, uint8_t val);
  11. bool (*write_apu)(struct nes_Mapper*, uint16_t addr, uint8_t val);
  12. uint8_t (*read_apu)(struct nes_Mapper*, uint16_t addr);
  13. void (*hsync)(struct nes_Mapper*);
  14. void (*vsync)(struct nes_Mapper*);
  15. void (*ppu_bus)(struct nes_Mapper*, uint16_t addr);
  16. void (*ppu_mem_mode)(struct nes_Mapper*, uint8_t mode);
  17. void* data;
  18. };
  19. typedef struct nes_Mapper nes_Mapper;
  20. extern const nes_Mapper* nes_mappers[256];
  21. #endif // NESE_MAPPER_H_