core, chd support

This commit is contained in:
kub 2021-03-08 23:02:55 +01:00
parent 37631374df
commit 4bb0b70ec8
9 changed files with 57 additions and 28 deletions

View file

@ -754,7 +754,7 @@ void emu_handle_resume(void)
mp3_reopen_file();
#if 0 // TODO
if (!(Pico_mcd->s68k_regs[0x36] & 1)/* && (Pico_mcd->scd.Status_CDC & 1)*/)
if (!(Pico_mcd->s68k_regs[0x36] & 1))
cdd_change_track(cdd.index, cdd.lba);
#endif
}

View file

@ -452,24 +452,6 @@ void mp3_update(int *buffer, int length, int stereo)
}
int mp3_get_offset(void) // 0-1023
{
unsigned int offs1024 = 0;
int cdda_on;
cdda_on = (PicoIn.AHW & PAHW_MCD) && (PicoIn.opt & POPT_EN_MCD_CDDA) && !(Pico_mcd->s68k_regs[0x36] & 1) &&
/* TODO (Pico_mcd->scd.Status_CDC & 1) &&*/ mp3_handle >= 0;
if (cdda_on) {
offs1024 = mp3_src_pos << 7;
offs1024 /= mp3_src_size >> 3;
}
lprintf("offs1024=%u (%i/%i)\n", offs1024, mp3_src_pos, mp3_src_size);
return offs1024;
}
void mp3_reopen_file(void)
{
if (mp3_fname == NULL) return;

View file

@ -326,3 +326,14 @@ int _flush_cache (char *addr, const int size, const int op)
sceKernelIcacheInvalidateRange(addr, size);
return 0;
}
/* stubs for libflac (embedded in libchdr) */
int chown(const char *pathname, uid_t owner, gid_t group) { return -1; }
int chmod(const char *pathname, mode_t mode) { return -1; }
int utime(const char *filename, const struct utimbuf *times) { return -1; }
int fseeko64(FILE *stream, _off64_t offset, int whence)
{ return fseeko(stream, offset, whence); }
_off64_t ftello64(FILE *stream)
{ return ftello(stream); }
int posix_memalign(void **memptr, size_t alignment, size_t size)
{ *memptr = memalign(alignment, size); return 0; }