savestates works

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@26 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-01-29 23:39:15 +00:00
parent 51a902ae25
commit 7573607016
16 changed files with 219 additions and 161 deletions

View file

@ -576,3 +576,22 @@ void mp3_start_play(FILE *f, int pos) // pos is 0-1023
}
int mp3_get_offset(void)
{
int offs1024 = 0;
int cdda_on;
cdda_on = (PicoMCD & 1) && (currentConfig.EmuOpt&0x800) && !(Pico_mcd->s68k_regs[0x36] & 1) &&
(Pico_mcd->scd.Status_CDC & 1) && loaded_mp3 && shared_ctl->mp3_offs < shared_ctl->mp3_len;
if (cdda_on) {
offs1024 = shared_ctl->mp3_offs << 7;
offs1024 /= shared_ctl->mp3_len;
offs1024 <<= 3;
}
printf("offs1024=%i (%i/%i)\n", offs1024, shared_ctl->mp3_offs, shared_ctl->mp3_len);
return offs1024;
}