comparison romdb.h @ 1411:780fbe0b97be

WIP support for handling S3 save RAM when locked on
author Michael Pavone <pavone@retrodev.com>
date Thu, 22 Jun 2017 09:49:41 -0700
parents efa7225e0f07
children d94855080529
comparison
equal deleted inserted replaced
1410:4cd4aa6be5f6 1411:780fbe0b97be
71 uint16_t save_product_id; 71 uint16_t save_product_id;
72 uint16_t mapper_start_index; 72 uint16_t mapper_start_index;
73 uint8_t save_type; 73 uint8_t save_type;
74 uint8_t save_bus; //only used for NOR currently 74 uint8_t save_bus; //only used for NOR currently
75 uint8_t regions; 75 uint8_t regions;
76 uint8_t is_save_lock_on; //Does the save buffer actually belong to a lock-on cart?
76 }; 77 };
77 78
78 #define GAME_ID_OFF 0x183 79 #define GAME_ID_OFF 0x183
79 #define GAME_ID_LEN 8 80 #define GAME_ID_LEN 8
80 81
83 rom_info configure_rom_heuristics(uint8_t *rom, uint32_t rom_size, memmap_chunk const *base_map, uint32_t base_chunks); 84 rom_info configure_rom_heuristics(uint8_t *rom, uint32_t rom_size, memmap_chunk const *base_map, uint32_t base_chunks);
84 uint8_t translate_region_char(uint8_t c); 85 uint8_t translate_region_char(uint8_t c);
85 void eeprom_init(eeprom_state *state, uint8_t *buffer, uint32_t size); 86 void eeprom_init(eeprom_state *state, uint8_t *buffer, uint32_t size);
86 void nor_flash_init(nor_state *state, uint8_t *buffer, uint32_t size, uint32_t page_size, uint16_t product_id, uint8_t bus_flags); 87 void nor_flash_init(nor_state *state, uint8_t *buffer, uint32_t size, uint32_t page_size, uint16_t product_id, uint8_t bus_flags);
87 char const *save_type_name(uint8_t save_type); 88 char const *save_type_name(uint8_t save_type);
89 //Note: free_rom_info only frees things pointed to by a rom_info struct, not the struct itself
90 //this is because rom_info structs are typically stack allocated
91 void free_rom_info(rom_info *info);
88 92
89 #endif //ROMDB_H_ 93 #endif //ROMDB_H_