summaryrefslogtreecommitdiff
path: root/system.h
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-01-02 21:46:26 -0800
committerMichael Pavone <pavone@retrodev.com>2017-01-02 21:46:26 -0800
commitf6ab2dad74b981bd9e222f771a62cad34ae35c34 (patch)
treed1bf83a75fdea30abe5bef8eb9b0c2869795bdc2 /system.h
parent7d1a9bbb9b343e128cbfbc3567ab329f22edbd5a (diff)
Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Diffstat (limited to 'system.h')
-rw-r--r--system.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/system.h b/system.h
index c1e74d3..d4e7ac3 100644
--- a/system.h
+++ b/system.h
@@ -5,6 +5,7 @@
#include "romdb.h"
typedef struct system_header system_header;
+typedef struct system_media system_media;
typedef enum {
SYSTEM_UNKNOWN,
@@ -45,9 +46,16 @@ struct system_header {
system_type type;
};
+struct system_media {
+ void *buffer;
+ char *extension;
+ system_media *chain;
+ uint32_t size;
+};
+
#define OPT_ADDRESS_LOG (1U << 31U)
-system_type detect_system_type(uint8_t *rom, long filesize);
-system_header *alloc_config_system(system_type stype, void *rom, uint32_t rom_size, void *lock_on, uint32_t lock_on_size, uint32_t opts, uint8_t force_region, rom_info *info_out);
+system_type detect_system_type(system_media *media);
+system_header *alloc_config_system(system_type stype, system_media *media, uint32_t opts, uint8_t force_region, rom_info *info_out);
#endif //SYSTEM_H_