comparison system.h @ 2059:6399a776e981 segacd

Add basic support for BIN/CUE images
author Michael Pavone <pavone@retrodev.com>
date Fri, 21 Jan 2022 21:59:46 -0800
parents 3414a4423de1
children 3f29e2726522
comparison
equal deleted inserted replaced
2058:70260f6051dd 2059:6399a776e981
1 #ifndef SYSTEM_H_ 1 #ifndef SYSTEM_H_
2 #define SYSTEM_H_ 2 #define SYSTEM_H_
3 #include <stddef.h> 3 #include <stddef.h>
4 #include <stdint.h> 4 #include <stdint.h>
5 #include <stdio.h>
5 6
6 typedef struct system_header system_header; 7 typedef struct system_header system_header;
7 typedef struct system_media system_media; 8 typedef struct system_media system_media;
8 9
9 typedef enum { 10 typedef enum {
82 typedef enum { 83 typedef enum {
83 MEDIA_CART, 84 MEDIA_CART,
84 MEDIA_CDROM 85 MEDIA_CDROM
85 } media_type; 86 } media_type;
86 87
88 typedef enum {
89 TRACK_AUDIO,
90 TRACK_DATA
91 } track_type;
92
93 typedef struct {
94 uint32_t fake_pregap;
95 uint32_t pregap_lba;
96 uint32_t start_lba;
97 uint32_t end_lba;
98 track_type type;
99 } track_info;
100
87 struct system_media { 101 struct system_media {
88 void *buffer; 102 void *buffer;
89 char *dir; 103 char *dir;
90 char *name; 104 char *name;
91 char *extension; 105 char *extension;
92 system_media *chain; 106 system_media *chain;
107 track_info *tracks;
108 FILE *f;
109 uint32_t num_tracks;
93 uint32_t size; 110 uint32_t size;
94 media_type type; 111 media_type type;
95 }; 112 };
96 113
97 #define OPT_ADDRESS_LOG (1U << 31U) 114 #define OPT_ADDRESS_LOG (1U << 31U)