diff system.h @ 2116:cd057d6fe030

Initial stab at subcode emulation
author Michael Pavone <pavone@retrodev.com>
date Sun, 06 Mar 2022 22:03:52 -0800
parents 2449c88cea36
children 9a8dd4ba2753
line wrap: on
line diff
--- a/system.h	Sat Mar 05 14:17:59 2022 -0800
+++ b/system.h	Sun Mar 06 22:03:52 2022 -0800
@@ -90,6 +90,12 @@
 	TRACK_DATA
 } track_type;
 
+enum {
+	SUBCODES_NONE,
+	SUBCODES_RAW,
+	SUBCODES_COOKED
+};
+
 typedef struct {
 	FILE       *f;
 	uint32_t   file_offset;
@@ -99,6 +105,7 @@
 	uint32_t   end_lba;
 	uint16_t   sector_bytes;
 	uint8_t    need_swap;
+	uint8_t    has_subcodes;
 	track_type type;
 } track_info;
 
@@ -112,8 +119,10 @@
 	char         *extension;
 	system_media *chain;
 	track_info   *tracks;
+	uint8_t      *tmp_buffer;
 	seek_fun     seek;
 	read_fun     read;
+	read_fun     read_subcodes;
 	uint32_t     num_tracks;
 	uint32_t     cur_track;
 	uint32_t     size;