Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/psx/mednadisc/cdrom/CDAccess.h
2 views
1
#ifndef __MDFN_CDROMFILE_H
2
#define __MDFN_CDROMFILE_H
3
4
#include <stdio.h>
5
#include <string>
6
7
#include "CDUtility.h"
8
9
class CDAccess
10
{
11
public:
12
13
CDAccess();
14
virtual ~CDAccess();
15
16
virtual void Read_Raw_Sector(uint8 *buf, int32 lba) = 0;
17
18
// Returns false if the read wouldn't be "fast"(i.e. reading from a disk),
19
// or if the read can't be done in a thread-safe re-entrant manner.
20
//
21
// Writes 96 bytes into pwbuf, and returns 'true' otherwise.
22
virtual bool Fast_Read_Raw_PW_TSRE(uint8* pwbuf, int32 lba) const noexcept = 0;
23
24
virtual void Read_TOC(CDUtility::TOC *toc) = 0;
25
26
private:
27
CDAccess(const CDAccess&); // No copy constructor.
28
CDAccess& operator=(const CDAccess&); // No assignment operator.
29
};
30
31
CDAccess* CDAccess_Open(const std::string& path, bool image_memcache);
32
33
#endif
34
35