summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <pheenoh@gmail.com>2020-09-30 18:21:35 -0400
committerunknown <pheenoh@gmail.com>2020-09-30 18:21:35 -0400
commit5549775c466a3ffb62a14ea94d7358a45f9245e4 (patch)
tree9ea3ca70c055e19e774798a4fc01985bc24324b6
parent553aa6f2bc78420c9bb501eb6f6f0633dfd7043d (diff)
add dvd
-rw-r--r--include/dvd.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/dvd.h b/include/dvd.h
new file mode 100644
index 0000000..e2f8a7e
--- /dev/null
+++ b/include/dvd.h
@@ -0,0 +1,40 @@
+#pragma once
+#include <stdint.h>
+
+struct DVDDiskID {
+ char game_name[4];
+ char company[2];
+ uint8_t disk_number;
+ uint8_t game_version;
+ uint8_t is_streaming;
+ uint8_t streaming_buffer_size;
+ uint8_t padding[22];
+};
+
+struct DVDCommandBlock {
+ DVDCommandBlock* next;
+ DVDCommandBlock* previous;
+ uint32_t command;
+ signed int state;
+ uint32_t offset;
+ uint32_t length;
+ void* buffer;
+ uint32_t current_transfer_size;
+ uint32_t transferred_size;
+ DVDDiskID* disk_id;
+ void (*DVDCBCallback)(signed int result, DVDCommandBlock* block);
+ void* user_data;
+};
+
+struct DVDFileInfo {
+ DVDCommandBlock block;
+ uint32_t start_address;
+ uint32_t length;
+ void (*DVDCallback)(signed int result, DVDFileInfo* fileInfo);
+};
+
+extern "C" {
+bool DVDOpen(const char* fileName, DVDFileInfo* fileInfo);
+signed long DVDReadPrio(DVDFileInfo* fileInfo, void* buffer, signed long length, signed long offset, signed long prio);
+bool DVDClose(DVDFileInfo* fileInfo);
+} \ No newline at end of file