Page 1 of 1
.CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 12:03 pm
by Marauder
Audio and video are out of sync on the .CHD I converted. Original I created it from is fine.
Not sure if this is the same for other PC Engine CD games, but its very obvious in this title. Tried with original Japanese and some English translations, result is the same.
Mega CD games I've converted are playing correctly as far as I can tell.
Could someone try Rondo and see if they get sync issues as a .CHD.
Thanks.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 2:39 pm
by 12characters
I recently noticed this as well. It appears that PREGAP is not handled correctly after conversion to CHD. I do not know whether it is a limitation of the format or due to the implementation in MiSTer.
Anyhow, my solution was to find CD images that have been ripped without using PREGAP. A such image of the original Japanese version of Rondo of Blood can be found on the Internet. I have not found one of the fan-translated version though. A working CD image has entries like these in the CUE file:
Code: Select all
TRACK 02 MODE1/2352
INDEX 00 00:00:00
INDEX 01 00:03:00
instead of:
Code: Select all
TRACK 02 MODE1/2048
PREGAP 00:03:00
INDEX 01 00:48:65
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 3:38 pm
by dshadoff
Does the non-CHD version still work properly, or has that also been affected ?
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 4:25 pm
by 12characters
dshadoff wrote: ↑Wed Jan 13, 2021 3:38 pm
Does the non-CHD version still work properly, or has that also been affected ?
The BIN/CUE version works properly.
Running the CHD-converted image appears to have the same sync issues as running the BIN/CUE version after deleting PREGAP entries in the CUE file. For example, the intro to Rondo of Blood starts mid-sentence.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 4:47 pm
by Marauder
Thats it, I've got a pile of CDRs for the Duo-R. I used Imgburn I think to rip them when support arrived on Mister, no problems with those rips until now.
Just tried a rip of translated Rondo CDR I have using CloneCD and it works fine when converted to chd.
I'll convert them all again over the next few days. Thanks for help.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 5:58 pm
by zakk4223
I'll take a look and make sure it isn't something I mishandled in converting the chd metainfo into a mister friendly TOC. Although the fact changing it from PREGAP to INDEX 00 might point at something going on with chdman. Perhaps there's something subtle I missed, though.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 6:05 pm
by dshadoff
Well, before playing around with all sorts of formats and modified files, I was hoping to understand about the CHD modifications - which seem to have caused a bug which needs to be fixed.
Two things I understand about the CHD modifications (which are not mine, and are very invasive - and I am not likely to be able to correct in any case):
1) There sounds like there is an issue with playing that image of that game as a CHD.
-> This should be stated as a bug in Main-MiSTer, as that's where the CHD code resides.
2) They not only implemented a large amount of functionality by creating CHD accessibility; they changed the existing access code. This is why I am asking whether the same image - used without CHD - has the same problem.
-> If images which worked fine prior to the CHD update no longer work properly - as was the case with SegaCD recently - this would be a major concern.
At the moment, I can't clearly understand what is being stated.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 6:39 pm
by 12characters
dshadoff wrote: ↑Wed Jan 13, 2021 6:05 pm
-> If images which worked fine prior to the CHD update no longer work properly - as was the case with SegaCD recently - this would be a major concern.
At the moment, I can't clearly understand what is being stated.
Sorry for not being clear. Images which worked fine prior to the CHD update still work properly as far as I can tell. There are only issues if converting them to CHD.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 6:43 pm
by Marauder
The image I created the CHD from still works fine.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 8:06 pm
by chimaera
I don't think you'll have to worry about official games that has been checked against redump .dat, my jap Rondo of Blood works perfectly with sound and speach in .chd format.
Fanpatches or hacks was sometimes applied to bad rips, and some rips floating around the internet seems to be bad.
Re: .CHD out of sync - Rondo of Blood
Posted: Wed Jan 13, 2021 11:17 pm
by dshadoff
Yes, this was my point - the TGFX/PC Engine core was in a very good working state with substantial coverage of games before the CHD change, and I haven't personally played much since it was released. I'm a little apprehensive and worry about the possibility of upsetting existing functionality for changes like that.
...And bad rips have been a source of problems/confusion for over 20 years...
Re: .CHD out of sync - Rondo of Blood
Posted: Thu Jan 14, 2021 4:20 am
by zakk4223
Ah, think I've fixed it. When chdman converts a PREGAP track the meta data is slightly different than if it uses INDEX 00. (Related to the pregap data being in the image or not). Requires adjusting the track start+end lba differently.
I'll do some more testing and submit a PR soon.
Re: .CHD out of sync - Rondo of Blood
Posted: Thu Jan 14, 2021 1:58 pm
by Marauder
That's good news you've found an issue.
I won't convert my CDRs, thanks.
Re: .CHD out of sync - Rondo of Blood
Posted: Fri Jan 22, 2021 7:19 pm
by Matsu
There are no issues when you have accurate rips. At least in my experience.
All my bin/cue rips to chd turned out fine.
Only ran into problems with iso/wav files from translations and hacks, those had missing seconds with audio tracks.
Mounted them with Deamontools lite, then used UltraIso to convert them to bin/cue and finally ran a chd conversion script. That way all audio problems were gone.
The reason why sega cd has no issues is because it doesn't need exact starting track data. Whereas PC-Engine does.
Many pce-cd rips floating around are created from mp3 files and have messed up track data. So find or make accurate rips.
If you want to know more. read about tocfixer here:
http://www.ysutopia.net/index.php?ind=d ... iew&iden=4
It's a tool used to fix bad cue data and wrong file sizes. Which I'm too lazy to explain here in detail. But it's a very interesting read.
Re: .CHD out of sync - Rondo of Blood
Posted: Fri Jan 22, 2021 8:35 pm
by zakk4223
Regardless of how accurate the rips are or not, they work with the existing Mister bin/cue support; therefore the issue was mine.
It should be fixed in the next main mister release; there was some (not well documented) differences in how I needed to handle TOC calculations for tracks where the pregap wasn't included in the ripped data. I wrote a bit of automation and verified around 500 rips produced the same TOC for the bin/cue and corresponding chd, so hopefully things are good now.
Re: .CHD out of sync - Rondo of Blood
Posted: Sun Feb 14, 2021 5:25 am
by bry111
Thank you for fixing the chd metadata handling! It helped with an odd dump (non-redump) I had.
I have found a very contrived case where chd handling disagrees with MiSTer's bin/cue support. I will only list it for reference and am not aware of any actual problems with anything anyone might reasonably try to do.
Recent homebrew Space Ava 201 (release candidate 1) was released as iso+wav/cue. It works as-is for me with MiSTer and Mednafen.
Convert it to chd via
Code: Select all
chdman createcd -i "Space Ava 201.cue" -o "Space Ava 201.chd"
and the resulting chd file still works with MiSTer.
Now the start of the contrived part, convert the chd to bin/cue via
Code: Select all
chdman extractcd -i "Space Ava 201.chd" -o test.cue
which produces a single bin file containing both audio tracks of 2352 bytes per sector, and data tracks of 2048 bytes per sector, all concatenated together. It also produces a matching cue file different from the original cue file referencing the single new bin file. This new bin/cue works for me with Mednafen which thinks it has the same TOC as the original iso+wav/cue. But it does not work with MiSTer; it hangs at the BIOS screen and occasionally briefly flashes "LOAD ERROR!" For all I know there might be a bug in chdman and/or Mednafen though and maybe this shouldn't work anywhere?
Finally, convert the new bin/cue back to chd via
Code: Select all
chdman createcd -i test.cue -o test.chd
which produces a new chd file that is byte-for-byte identical to the old chd file. So now we have two very different cue files, one works with MiSTer, one doesn't, and both convert to the same chd. The closest thing to a use case I can think of, is if there's a bin/cue that works elsewhere but not with MiSTer, I guess it's not impossible that converting to chd might be a workaround... but yeah, pretty contrived.