.CHD out of sync - Rondo of Blood

Marauder
Posts: 6
Joined: Tue May 26, 2020 5:42 am

.CHD out of sync - Rondo of Blood

Unread post 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.
12characters
Posts: 112
Joined: Wed Jun 03, 2020 5:39 pm
Has thanked: 8 times
Been thanked: 30 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: .CHD out of sync - Rondo of Blood

Unread post by dshadoff »

Does the non-CHD version still work properly, or has that also been affected ?
12characters
Posts: 112
Joined: Wed Jun 03, 2020 5:39 pm
Has thanked: 8 times
Been thanked: 30 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
Marauder
Posts: 6
Joined: Tue May 26, 2020 5:42 am

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
zakk4223
Posts: 270
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 107 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
12characters
Posts: 112
Joined: Wed Jun 03, 2020 5:39 pm
Has thanked: 8 times
Been thanked: 30 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
Marauder
Posts: 6
Joined: Tue May 26, 2020 5:42 am

Re: .CHD out of sync - Rondo of Blood

Unread post by Marauder »

The image I created the CHD from still works fine.
chimaera
Posts: 92
Joined: Sat Aug 01, 2020 10:53 am
Has thanked: 12 times
Been thanked: 17 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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...
zakk4223
Posts: 270
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 107 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
Marauder
Posts: 6
Joined: Tue May 26, 2020 5:42 am

Re: .CHD out of sync - Rondo of Blood

Unread post by Marauder »

That's good news you've found an issue.
I won't convert my CDRs, thanks.
Matsu
Posts: 25
Joined: Tue Oct 27, 2020 1:02 pm
Has thanked: 8 times
Been thanked: 7 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
zakk4223
Posts: 270
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 107 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
bry111
Posts: 26
Joined: Tue Jul 21, 2020 12:31 am
Has thanked: 1 time
Been thanked: 2 times

Re: .CHD out of sync - Rondo of Blood

Unread post 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.
Post Reply