comparison system.h @ 2076:3f29e2726522

Added basic support for ISO images for games that only have a data track
author Michael Pavone <pavone@retrodev.com>
date Mon, 31 Jan 2022 22:07:18 -0800
parents 6399a776e981
children bafb757e1cd2
comparison
equal deleted inserted replaced
2075:983f57d08eff 2076:3f29e2726522
96 uint32_t start_lba; 96 uint32_t start_lba;
97 uint32_t end_lba; 97 uint32_t end_lba;
98 track_type type; 98 track_type type;
99 } track_info; 99 } track_info;
100 100
101 typedef void (*seek_fun)(system_media *media, uint32_t sector);
102 typedef uint8_t (*read_fun)(system_media *media, uint32_t offset);
103
101 struct system_media { 104 struct system_media {
102 void *buffer; 105 void *buffer;
103 char *dir; 106 char *dir;
104 char *name; 107 char *name;
105 char *extension; 108 char *extension;
106 system_media *chain; 109 system_media *chain;
107 track_info *tracks; 110 track_info *tracks;
108 FILE *f; 111 FILE *f;
112 seek_fun seek;
113 read_fun read;
109 uint32_t num_tracks; 114 uint32_t num_tracks;
110 uint32_t size; 115 uint32_t size;
116 uint32_t cur_sector;
111 media_type type; 117 media_type type;
118 uint8_t in_fake_pregap;
112 }; 119 };
113 120
114 #define OPT_ADDRESS_LOG (1U << 31U) 121 #define OPT_ADDRESS_LOG (1U << 31U)
115 122
116 system_type detect_system_type(system_media *media); 123 system_type detect_system_type(system_media *media);