summaryrefslogtreecommitdiffstatshomepage
path: root/trunk/src/lib/util/chdcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/lib/util/chdcd.h')
-rw-r--r--trunk/src/lib/util/chdcd.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/trunk/src/lib/util/chdcd.h b/trunk/src/lib/util/chdcd.h
new file mode 100644
index 00000000000..df799371603
--- /dev/null
+++ b/trunk/src/lib/util/chdcd.h
@@ -0,0 +1,39 @@
+/***************************************************************************
+
+ CDRDAO TOC parser for CHD compression frontend
+
+ Copyright Nicola Salmoria and the MAME Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __CHDCD_H__
+#define __CHDCD_H__
+
+#include "cdrom.h"
+
+struct chdcd_track_input_entry
+{
+ chdcd_track_input_entry() { reset(); }
+ void reset() { fname.reset(); offset = idx0offs = idx1offs = 0; swap = false; }
+
+ astring fname; // filename for each track
+ UINT32 offset; // offset in the data file for each track
+ bool swap; // data needs to be byte swapped
+ UINT32 idx0offs;
+ UINT32 idx1offs;
+};
+
+struct chdcd_track_input_info
+{
+ void reset() { for (int i = 0; i < CD_MAX_TRACKS; i++) track[i].reset(); }
+
+ chdcd_track_input_entry track[CD_MAX_TRACKS];
+};
+
+
+chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc &outtoc, chdcd_track_input_info &outinfo);
+
+#endif /* __CHDCD_H__ */