TGFX16: Initial CD+G support

Requires corresponding updates to TurboGrafx16_MiSTer.
Currently works when audio is running; pause/stop will need further updates.
Currently only supports a single, *.sub file which represents the whole disc.
This commit is contained in:
David Shadoff
2025-05-26 01:30:45 -04:00
committed by GitHub
parent 71ecbd7408
commit b69c1ab0c1
2 changed files with 49 additions and 19 deletions

View File

@@ -73,6 +73,7 @@ public:
int has_status;
bool data_req;
bool can_read_next;
FILE * subcode_file;
pcecdd_t();
int Load(const char *filename);
@@ -110,12 +111,13 @@ private:
uint8_t comm[14];
uint8_t sec_buf[2352 + 2];
uint8_t subcd_buf[98 + 2];
int LoadCUE(const char* filename);
int SectorSend(uint8_t* header);
void ReadData(uint8_t *buf);
int ReadCDDA(uint8_t *buf);
void ReadSubcode(uint16_t* buf);
void ReadSubcode(int lba, uint8_t* buf);
void LBAToMSF(int lba, msf_t* msf);
void MSFToLBA(int* lba, msf_t* msf);
void MSFToLBA(int* lba, uint8_t m, uint8_t s, uint8_t f);