X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffileio.h;h=62bdd046153d42a6af1e620cc1b5993d9b08b378;hb=6618dd130b72fa3c19b7583855f227160c3384c1;hp=3b42dbf02cf7cf3b5b0d8a74675834983ae4a156;hpb=d4af988d8210a0d2c505d663fd7fa8f175a89d3b;p=wozmaker diff --git a/src/fileio.h b/src/fileio.h index 3b42dbf..62bdd04 100644 --- a/src/fileio.h +++ b/src/fileio.h @@ -8,6 +8,13 @@ // may not be compiled on an architecture that supports little endian // natively. +struct Metadata +{ + uint8_t metaTag[4]; // "META" + uint32_t metaSize; // Size of the META chunk + uint8_t data[]; // Variable length array of metadata +}; + struct A2RStream { uint8_t location; // Quarter track for this stream @@ -17,13 +24,6 @@ struct A2RStream uint8_t data[]; // Variable length array for stream data }; -struct A2RMetadata -{ - uint8_t metaTag[4]; // "META" - uint32_t metaSize; // Size of the META chunk - uint8_t data[]; // Variable length array of metadata -}; - struct A2R { // Header @@ -56,13 +56,6 @@ struct WOZTrack uint16_t reserved; }; -struct WOZMetadata -{ - uint8_t metaTag[4]; // "META" - uint32_t metaSize; // Size of the META chunk - uint8_t data[]; // Variable length array of metadata -}; - struct WOZ { // Header @@ -141,6 +134,10 @@ uint32_t CRC32(const uint8_t * data, uint32_t length); uint8_t * ReadFile(const char * filename, uint32_t * size); bool LoadA2R(const char * filename); bool WriteWOZFile(const char * filename); +void UnpackMetadata(Metadata * data); +uint8_t * GetMetadata(const char * keyword); +uint16_t GetRequiredMachineBits(void); +uint16_t GetRequiredRAMInK(void); // Inline functions ("get" functions--need to write "set" functions)