/* Mednafen - Multi-system Emulator1*2* This program is free software; you can redistribute it and/or modify3* it under the terms of the GNU General Public License as published by4* the Free Software Foundation; either version 2 of the License, or5* (at your option) any later version.6*7* This program is distributed in the hope that it will be useful,8* but WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10* GNU General Public License for more details.11*12* You should have received a copy of the GNU General Public License13* along with this program; if not, write to the Free Software14* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA15*/1617#include "../FileStream.h"18#include "../MemoryStream.h"19#include "CDAccess.h"20#include <memory>2122class CDAccess_CCD : public CDAccess23{24public:2526CDAccess_CCD(const std::string& path, bool image_memcache);27virtual ~CDAccess_CCD();2829virtual void Read_Raw_Sector(uint8 *buf, int32 lba);3031virtual bool Fast_Read_Raw_PW_TSRE(uint8* pwbuf, int32 lba) const noexcept;3233virtual void Read_TOC(CDUtility::TOC *toc);3435private:3637void Load(const std::string& path, bool image_memcache);38void Cleanup(void);3940void CheckSubQSanity(void);4142std::unique_ptr<Stream> img_stream;43std::unique_ptr<uint8[]> sub_data;4445size_t img_numsectors;46CDUtility::TOC tocd;47};484950