libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 77 forks source link

CHD v5 support #54

Closed Shoegzer closed 5 years ago

Shoegzer commented 6 years ago

With all the (incredibly awesome) new developments to the Reicast core, I'm wondering if CHD v5 can be added as @rtissera recently did for some of the other cores. This would really boost usefulness, especially given the massive additions recently made to the MAME Dreamcast software list such as this one.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/59867758-chd-v5-support?utm_campaign=plugin&utm_content=tracker%2F49543223&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F49543223&utm_medium=issues&utm_source=github).
rtissera commented 6 years ago

Well libchdr is already implemented in upstreamed reicast so it should not be a problem.

Shoegzer commented 6 years ago

That's so great to hear. I figured it wouldn't but didn't want to assume. Thanks in advance for considering this feature!

Shoegzer commented 6 years ago

@rtissera after some discussion today with others on the RA team, it seems this might also help RA to read gdrom-based arcade (naomi/atomiswave) games in their proper/MAME formats too (as opposed to reading from .lst files as RA now does). So it seems libchdr would be even more useful in this core if you can find time to get it in.

Also, there was some mention of using libzip for the rom-based arcade games, in case you know how to handle that library as well.

Thanks again.

saftle commented 6 years ago

CHDv5 is also not working in reicast standalone. I just tested it via the nightly build and found an already open issue: https://github.com/reicast/reicast-emulator/issues/676

Shoegzer commented 6 years ago

@rtissera just following up. Would you happen to have a little time to add this useful feature? Happy to help where I can.

Awakened0 commented 6 years ago

Looks like there is some action going on with this upstream: https://github.com/reicast/reicast-emulator/issues/18

Shoegzer commented 6 years ago

Ah, that's great news. Will close this issue whenever the result makes its way downstream.

inactive123 commented 6 years ago

Just backported this -

https://github.com/libretro/reicast-emulator/commit/59d5c7272d21ab78d0c33de06998e7ad4d086c7c

You guys might want to try this.

Shoegzer commented 6 years ago

Wow, fantastic @twinaphex . Unfortunately though, it doesn't seem to work quite yet. Just compiled a new build with this support merged and tried a (V5) CHD off of the mame DC software list, but reicast just booted to the BIOS. Selecting "Play" just results in being told to "Insert Game Disc".

inactive123 commented 6 years ago

@flyinghead You happen to know if I happened to have missed something while backporting this?

https://github.com/reicast/reicast-emulator/pull/1363

flyinghead commented 6 years ago

No, sorry. I haven't looked at this yet.

baka0815 commented 6 years ago

@Shoegzer what's the output of chdman info -i <rom file>?

Shoegzer commented 6 years ago

Using the latest chdman against "daytona" in the mame dc software list:

chdman - MAME Compressed Hunks of Data (CHD) manager 0.201 (unknown) Input file: daytona usa (usa).chd File Version: 5 Logical size: 1,344,333,888 bytes Hunk Size: 19,584 bytes Total Hunks: 68,645 Unit Size: 2,448 bytes Total Units: 549,156 Compression: cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC) CHD size: 410,431,495 bytes Ratio: 30.5% SHA1: 7d431a0aea7632045c6803916b25bd59a6ae50ec Data SHA1: a464f20a93a5c6c07bed18793891fb74e712c26c Metadata: Tag='CHGD' Index=0 Length=98 bytes TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:450 PAD:150 PREGA Metadata: Tag='CHGD' Index=1 Length=98 bytes TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44550 PAD:44024 PREGA Metadata: Tag='CHGD' Index=2 Length=99 bytes TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PAD:0 PREG

Also, performing a "chdman verify" against the chd gives:

Raw SHA1 verification successful! Overall SHA1 verification successful!

baka0815 commented 6 years ago

@twinaphex you have to specify -DÙSE_FLAC https://github.com/libretro/reicast-emulator/blob/59d5c7272d21ab78d0c33de06998e7ad4d086c7c/core/deps/chdr/chd.c#L47 and -DUSE_LZMA https://github.com/libretro/reicast-emulator/blob/59d5c7272d21ab78d0c33de06998e7ad4d086c7c/core/deps/chdr/chd.c#L51 in your (c)make file or it won't work. It currently doesn't work in my implementation since I forgot that in https://github.com/reicast/reicast-emulator/pull/1363/commits/0a40d20af615ce7ecf405cf626774278328a7586 unfortunately.

inactive123 commented 6 years ago

I have defined both USE_FLAC and USE_LZMA though - see this -

https://github.com/libretro/reicast-emulator/blob/master/Makefile#L601

and this for the JNI Android Makefile -

https://github.com/libretro/reicast-emulator/blob/master/jni/Android.mk#L78

baka0815 commented 6 years ago

Hmm, I checked two cases:

chdman - MAME Compressed Hunks of Data (CHD) manager 0.200 (unknown)
Input file:   Crazy Taxi v1.000 (2000)(Sega)(PAL)[!].chd
File Version: 5
Logical size: 1,344,324,096 bytes
Hunk Size:    19,584 bytes
Total Hunks:  68,644
Unit Size:    2,448 bytes
Total Units:  549,152
Compression:  cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC)
CHD size:     77,032,510 bytes
Ratio:        5.7%
SHA1:         ca89a97f6943f83c90865bd171282962cc603cec
Data SHA1:    560edf6073fd64e7c7392e71b5836949d445b6f0
Metadata:     Tag='CHGD'  Index=0  Length=98 bytes
              TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:600 PAD:150 PREGA
Metadata:     Tag='CHGD'  Index=1  Length=98 bytes
              TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44400 PAD:38450 PREGA
Metadata:     Tag='CHGD'  Index=2  Length=99 bytes
              TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PAD:0 PREG
chdman - MAME Compressed Hunks of Data (CHD) manager 0.200 (unknown)
Input file:   F355 Challenge - Passione Rossa v1.001 (2000)(Acclaim)(PAL)[!].chd
File Version: 5
Logical size: 1,344,333,888 bytes
Hunk Size:    19,584 bytes
Total Hunks:  68,645
Unit Size:    2,448 bytes
Total Units:  549,156
Compression:  cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC)
CHD size:     261,911,362 bytes
Ratio:        19.5%
SHA1:         fabf77bcfdbed770039c7af82c048969de9a01b1
Data SHA1:    5d7fe6284746b1738245eeda84bd9ce1ff693a61
Metadata:     Tag='CHGD'  Index=0  Length=98 bytes
              TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:450 PAD:150 PREGA
Metadata:     Tag='CHGD'  Index=1  Length=98 bytes
              TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44550 PAD:38600 PREGA
Metadata:     Tag='CHGD'  Index=2  Length=99 bytes
              TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PAD:0 PREG

Both are created from a TOSEC verified GDI.

Using upstream reicast the former (Crazy Taxi) is working but the other one (F355) just boots the BIOS.

baka0815 commented 6 years ago

@twinaphex Support on upstream will probably be merged with https://github.com/reicast/reicast-emulator/pull/1400.

You want to take a look at this commit: https://github.com/reicast/reicast-emulator/pull/1400/commits/1d7ecda2af97dcd4a1d2140bdf4b78947fc51a49

The handling of extra (padding) frames was missing and therefore only some CHDs were working.

inactive123 commented 6 years ago

Thanks for the headsup!

So the only big difference vs. your previous PR and the current one is commit @1d7ecda that you alluded to? If so, I can backport that for sure. If not, let me know if there is anything more and I'll get that done as well.

baka0815 commented 6 years ago

Yes, that's all. I created a new pr to not include unnecessary files in the dependencies and to mv the chdr.cpp to chd.c to shrink the diff.

inactive123 commented 5 years ago

Backported the commit.

@baka0815 should I ask the participants in this thread to re-test their CHD images now, or should no additional compatibility be expected as a result of this commit?

Shoegzer commented 5 years ago

CHD support works fine now, tested against several CHDs that were failing before. Really nice job @baka0815, I think this can be safely reported to the masses now.

Out of curiosity, how close does this bring RA to supporting proper NAOMI/Atomiswave dumps as per the official MAME sets? There have been lots of requests for this and it would be great to see those old .lst-based files lost to time for preservation's sake (the sooner the better).

inactive123 commented 5 years ago

Hey @Shoegzer, @blackman9 posted the opposite here - saying that this commit broke some CHD dumps for him that were previously working -

https://github.com/libretro/reicast-emulator/commit/bb5144904b3ea21ee12af6adc7f952764705618c

https://www.reddit.com/r/emulation/comments/9itwr3/reicast_libretro_now_supports_online_multiplayer/e6n9mr4/

Can we find out what is up with that?

baka0815 commented 5 years ago

Would be interesting which they are that were working and aren't now.

Crazy Taxi worked before and works now, F355 didn't work before, but does now. Those were my test cases. If @blackman91 noticed regressions it would be nice to know in which games...

However I might not be able to look at the code for some time.

Would be nice to relay this information to https://github.com/reicast/reicast-emulator/pull/1400 also.

inactive123 commented 5 years ago

@baka0815 He posted his findings here -

https://github.com/libretro/reicast-emulator/issues/278

Shoegzer commented 5 years ago

@twinaphex That IS interesting, I've tested multiple chds and they all work fine, whereas they didn't before yesterday's commit. Then again, I'm testing on a x86/linux system, and he's using android.

@blackman91 several questions:

blackman91 commented 5 years ago

I'm pretty sure bb51449 broke them. I use the tool GDI to CHD from here: https://www.reddit.com/r/emulation/comments/3g933n/guide_reduce_the_size_of_your_ps2_gc_wii_x360_ds/

There is no reicast oit for Android but this bug happens on Windows normal reicast core too

So far broken chd: Cannon Spike Marvel vs Capcom 2 Alone in the dark new nightmare Capcom vs SNK 2 Elemental Gimmick Gear Ikaruga Soul reaver Outtrigger Power Stone 2 Prince of Persia Arabian Nights Rayman 2 Record of Lodoss War Shenmue Skies of Arcadia (US) Soul Calibur Soul fighter Underdefeat Zombie Revenge

chd that still work: Spiderman 2000 Crazy Taxi Jet grind radio Dino crisis Dynamite Cop

This should be easy to reproduce just download this and try to play it using latest reicast libretro core: https://www.mediafire.com/file/sgwl1a3x0o9ivf1/Cannon_Spike_%2528USA%2529.chd/file

DJoneK commented 5 years ago

These are my findings on W10x64. I used redump.org matching gdi images to convert to chd. I was hoping to find a pattern but I really don't know if there's any. I included the number of tracks of each disc just for that.

Crazy Taxi (USA) - 3 tracks - Loads GigaWing (USA) - 12 tracks - Doesn't Load GigaWing 2 (USA) - 3 tracks - Doesn't Load House of the Dead 2, The (USA) - 3 tracks - Loads NBA 2K (USA) - 5 tracks - Doesn't Load Power Stone (USA) - 3 tracks - Doesn't Load Ready 2 Rumble Boxing (USA) - 7 tracks - Loads but core crashes after Sega Logo screen Ready 2 Rumble Boxing (USA) (RE) - 7 tracks - Loads but core crashes after Sega Logo screen Resident Evil - Code - Veronica (USA) (Disc 1) - 3 tracks - Doesn't Load Resident Evil - Code - Veronica (USA) (Disc 2) - 3 tracks - Doesn't Load Re-Volt (USA) - 18 tracks - Loads but freezes after Sega Logo screen Shenmue (USA) (Disc 1) - 6 tracks - Doesn't Load Shenmue (USA) (Disc 2) - 6 tracks - Doesn't Load Shenmue (USA) (Disc 3) - 6 tracks - Doesn't Load Skies of Arcadia (USA) (Disc 1) - 3 tracks - Loads Skies of Arcadia (USA) (Disc 2) - 3 tracks - Loads Sonic Adventure (USA) (En,Ja,Fr,De,Es) (Rev A) - 3 tracks - Doesn't Load Tokyo Xtreme Racer (USA) - 21 tracks - Doesn't Load Tokyo Xtreme Racer 2 (USA) - 3 tracks - Doesn't Load Toy Commander (USA) (En,Fr,De,Es) - 15 tracks - Loads but freezes after Sega Logo screen

Only ones that seem to work for me so far are some 3 track ones. The others all have some issue. Was wondering if it had anything to do with reading things mentioned here: http://mc.pp.se/dc/ip.bin.html

blackman91 commented 5 years ago

Could you revert that change to test for sure if that caused it? All those chd use to run perfectly.

Awakened0 commented 5 years ago

I just tested my CHDv5 converted Redump images and here's what I've found with the latest OIT Win64 build:

Working: Capcom vs. SNK 2 - Millionaire Fighting 2001 (Including Capcom Taisen Fan Disc) (Japan) - (Disc 1 of 2) Psychic Force 2012 (USA) Tech Romancer (USA)

Crash After BIOS Logo: Bangai-O (USA)

Freeze on White Screen After BIOS Logo, Then "retroarch.exe Not Responding": Re-Volt (USA)

Stuck on BIOS (as if no disc is inserted): Power Stone (USA) Puyo Puyoon (Japan) Sonic Adventure (USA) (En,Ja,Fr,De,Es) Soulcalibur (USA) Tennis 2K2 (USA) (En,Ja,Fr,De,Es) (Rev A)

Here's the output of "chdman info" on one image:

chdman - MAME Compressed Hunks of Data (CHD) manager 0.189 (mame0189) Input file: Soulcalibur (USA).chd File Version: 5 Logical size: 1,344,324,096 bytes Hunk Size: 19,584 bytes Total Hunks: 68,644 Unit Size: 2,448 bytes Total Units: 549,152 Compression: cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC) CHD size: 621,158,635 bytes Ratio: 46.2% SHA1: 7734508a59d55931292a1eeec8f11ff68d0122fc Data SHA1: a8d74533b32c936db4462f5b125632d5630fed60 Metadata: Tag='CHGD' Index=0 Length=96 bytes TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:300 PAD:0 PREGAP: Metadata: Tag='CHGD' Index=1 Length=98 bytes TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44700 PAD:44024 PREGA Metadata: Tag='CHGD' Index=2 Length=99 bytes TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PAD:0 PREG

Shoegzer commented 5 years ago

Hmmm... well I don't have all those games you both mentioned, but I do have Gigawing, and I can confirm that that game freezes at the Sega logo. I'm not sure if it's related to this commit though - moments earlier I tested an unconverted GDI game "Typing of the Dead" and noticed it also froze at the Sega logo, but then started the game up again and it worked fine.

To be sure: @blackman91 please do a git bisect to confirm that @baka0815's latest commit caused the issue, or at least use the build immediately preceding that one and verify that it works there. Being "pretty sure" is really not enough.

Also: @blackman91 and @Awakened0, for these sorts of tests I recommend both of you to use the latest version of chdman (0.202 as of today), and certainly not ANY other chd conversion tool. There have been major changes to chdman to fix various issues including a notorious "round-trip" problem in earlier releases, that are likely also problems with other conversion tools relying on earlier versions of the chd library. Note this is irrespective of the image versioning scheme - not all CHD V5s are created equally!

Awakened0 commented 5 years ago

I tried recompressing Bangai-O with chdman 0.202 and still got the crash. I would think as long as my images were in the v5 format they would be OK even if they were made with 0.189, but I'm not sure if there were any changes since then.

I think the conversion tool @blackman91 used uses a very old version of chdman that creates v4 or older CHDs. Those are supposedly lossy, while v5 is lossless.

blackman91 commented 5 years ago

I am sure because the build previous to that one loaded all my chd fine on the reicast RetroArch core and all my chd work on standalone reicast and on flying head branch from here: http://builds.reicast.com/

I could recompress all gdi again with newest but they would not be playable on those reicast.

Shoegzer commented 5 years ago

@Awakened0 thanks for testing against 0.202, that helps. And given what @blackman91 just said I think we can finally assume there's an issue with the latest chd commit indeed (really kicking myself for not discovering this earlier).

In any event, again not all V5-format chds are created the same - chd V5s converted using an earlier chdman (not sure if .189 is early enough) have a really nasty "round-trip" bug where you will not get the same uncompressed image back going in reverse from the chd! That's just an example, there are other flaws. V4s have even more issues - so yeah, @blackman91 should definitely not be using a tool that creates V4s - not only does that cloud the test scenario here, but he's getting badly broken chds as a result compared to the clean versions you get with the latest chdman (IIRC there are no known bugs with the latest). At least he's holding onto his original images.

Incidentally, here is the MAME official hash list of dc chds in case you want to compare your dumps.

baka0815 commented 5 years ago

@blackman91 the chdman tool you referred to is from 2010, are you sure it produces v5 images? Could you try again with the latest version from MAME (0.200+)?

blackman91 commented 5 years ago

I never said my chd were v5, before these changes there wasn't even support for chdv5 on reicast right?

Just said that all my chd I created using that tool all worked on main reicast and RetroArch core and stopped working in RetroArch with that change.

Will try to test with newest chdman.

Awakened0 commented 5 years ago

You can extract chdman.exe from the latest MAME release on mamedev.org and pair it with this in a .bat file to easily convert a folder full of gdi dumps FYI:

for /r %%i in (*.cue, *.gdi) do chdman createcd -i "%%i" -o "%%~ni.chd

baka0815 commented 5 years ago

@blackman91 ok, so they may be CHDv4 or something. Those shouldn't be affected.

Could you check using chdman info -i <filename>.chd which version of the CHD format is in use and paste the output here?

DJoneK commented 5 years ago

I'm reposting this because I added some new ones and they might've gone unnoticed if I just edited my previous comment.

These are my findings on W10x64. I used redump.org matching GDI images to convert to CHDv5 (using chdman.exe from MAME 0.202). I was hoping to find a pattern but I really don't know if there's any. I included the number of tracks of each disc just in case.

Crazy Taxi (USA) - 3 tracks - **Loads**
Crazy Taxi 2 (USA) - 3 tracks - Doesn't Load
Daytona USA (USA) - 3 tracks - Doesn't Load
Dead or Alive 2 (USA) - 3 tracks - Doesn't Load
Dino Crisis (USA) - 3 tracks - **Loads**
Dynamite Cop! (USA) - 3 tracks - **Loads**
F355 Challenge - Passione Rossa (USA) - 3 tracks - Doesn't Load
GigaWing (USA) - 12 tracks - Doesn't Load
GigaWing 2 (USA) - 3 tracks - Doesn't Load
Grandia II (USA) - 5 tracks - Doesn't Load
Hidden & Dangerous (USA) - 5 tracks - Doesn't Load
House of the Dead 2, The (USA) - 3 tracks - **Loads** 
Jet Grind Radio (USA) - 3 tracks - Doesn't Load
Marvel vs. Capcom - Clash of Super Heroes (USA) - 3 tracks - **Loads**
MDK2 (USA) - 31 tracks - _Loads but freezes on Sega License screen_
NBA 2K (USA) - 5 tracks - Doesn't Load
Power Stone (USA) - 3 tracks - Doesn't Load
Power Stone 2 (USA) - 3 tracks - Doesn't Load
Psychic Force 2012 (USA) - 3 tracks - **Loads**
Ready 2 Rumble Boxing (USA) - 7 tracks - _Loads but core crashes on/after Sega License screen_
Ready 2 Rumble Boxing (USA) (RE) - 7 tracks - _Loads but core crashes on/after Sega License screen_
Resident Evil - Code - Veronica (USA) (Disc 1) - 3 tracks - Doesn't Load
Resident Evil - Code - Veronica (USA) (Disc 2) - 3 tracks - Doesn't Load
Re-Volt (USA) - 18 tracks - _Loads but freezes on Sega License screen_
Shenmue (USA) (Disc 1) - 6 tracks - Doesn't Load
Shenmue (USA) (Disc 2) - 6 tracks - Doesn't Load
Shenmue (USA) (Disc 3) - 6 tracks - Doesn't Load
Silent Scope (USA) - 3 tracks - **Loads**
Skies of Arcadia (USA) (Disc 1) - 3 tracks - **Loads**
Skies of Arcadia (USA) (Disc 2) - 3 tracks - **Loads**
Slave Zero (USA) - 5 tracks - _Loads but freezes on Sega License screen_
Sonic Adventure (USA) (En,Ja,Fr,De,Es) (Rev A) - 3 tracks - Doesn't Load
Soulcalibur (USA) - 3 tracks - Doesn't Load
Tokyo Xtreme Racer (USA) - 21 tracks - Doesn't Load
Tokyo Xtreme Racer 2 (USA) - 3 tracks - Doesn't Load
Toy Commander (USA) (En,Fr,De,Es) - 15 tracks - _Loads but freezes on Sega License screen_

chdman info log for all the above: https://pastebin.com/zwV52xZi

Only ones that seem to work for me so far are some 3 track ones. The others all have some issue. For a moment, I thought I had narrowed it down to images with Logical size: 1,344,333,888 bytes worked, but then found some that didn't load like Jet Grind Radio (USA) and then also found Psychic Force 2012 (USA) with Logical size: 1,344,324,096 bytes that loads properly. So I can't seem to find something to clearly point at.

The ones that don't load just go into the BIOS menu. You can use the audio player to play back Track 2 which just makes some loud static noises. So it's detecting the disc, it's just not recognizing it as a proper DC disc and not booting it correctly.

blackman91 commented 5 years ago

@baka0815

Here: 16:21:59.688: Info: starting process 16:21:59.723: Info: process started: PID = 7336 16:21:59.756: Info: stdout: chdman - MAME Compressed Hunks of Data (CHD) manager 0.200 (mame0200) 16:21:59.757: Info: stdout: Input file: Cannon Spike (USA).chd 16:21:59.757: Info: stdout: File Version: 4 16:21:59.757: Info: stdout: Logical size: 1,344,333,888 bytes 16:21:59.757: Info: stdout: Hunk Size: 9,792 bytes 16:21:59.758: Info: stdout: Total Hunks: 137,289 16:21:59.758: Info: stdout: Unit Size: 2,448 bytes 16:21:59.758: Info: stdout: Total Units: 549,156 16:21:59.758: Info: stdout: Compression: zlib (Deflate) 16:21:59.758: Info: stdout: CHD size: 187,177,359 bytes 16:21:59.758: Info: stdout: Ratio: 13.9% 16:21:59.758: Info: stdout: SHA1: 6647f6d16e770e09c355b86d9a90bd865a01821f 16:21:59.759: Info: stdout: Data SHA1: b411085c63da5c35fc25fae335d8f8e57c665f38 16:21:59.759: Info: stdout: Metadata: Tag='CHT2' Index=0 Length=88 bytes 16:21:59.759: Info: stdout: TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:674 PREGAP:0 PGTYPE:MODE1 PGSUB:RW POSTGAP:0. 16:21:59.760: Info: stdout: Metadata: Tag='CHT2' Index=1 Length=86 bytes 16:21:59.760: Info: stdout: TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44326 PREGAP:0 PGTYPE:MODE1 PGSUB:RW POSTGAP:0. 16:21:59.760: Info: stdout: Metadata: Tag='CHT2' Index=2 Length=91 bytes 16:21:59.760: Info: stdout: TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PREGAP:0 PGTYPE:MODE1 PGSUB:RW POSTGAP:0. 16:21:59.761: Info: stdout: Hunks Percent Name 16:21:59.761: Info: stdout: ---------- ------- ------------------------------------ 16:21:59.761: Info: stdout: 11,048 8.0% Legacy 8-byte mini 16:21:59.762: Info: stdout: 126,241 92.0% Deflate 16:21:59.762: Info: process finished: exitCode = 0, exitStatus = normal, execTime = 00:00:00.039

blackman91 commented 5 years ago

Created a Marvel vs Capcom 2 chd v5 using using latest chdman.exe from MAME 0.202 and it runs on RetroArch reicast core but there is noticeable stuttering when the capcom logo appears, in the title screen and after selecting your characters that is not present when using the normal .gdi in both pc and Android, is this because of the compression? Has anyone else experienced this?

baka0815 commented 5 years ago

Thanks @DJoneK and @blackman91 for the feedback. I might get some time this weekend to verify and check this against upstream reicast.

andres-asm commented 5 years ago

I have several CHDs converted with the latest chdman but none are working. I either get a crash or the DC Bios Menu. I used chdman 0.197.

Project Justice:

Loaded D:\GameData\EmulatorData\System\dc\dc_nvmem.bin as nvram

[libretro INFO] Using Recompiler
Sh4 Reset
recSh4 Init
Freeing fpcb
chd: parsing file W:\roms\Emulated\Console\Sega Dreamcast\Project Justice (USA).chd
TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:300 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44700 PAD:44024 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
chd: Unable to find metadata, 19
gdrom: Opened image "W:\roms\Emulated\Console\Sega Dreamcast\Project Justice (USA).chd"
Initializing VMU data...
Initializing VMU data...
Sh4 Reset
reios: IP.bin is ''
reios: Hardware ID is:
reios: Maker ID is:
reios: Device info is:
reios: Area symbols is:
reios: Peripherals is:
reios: Product number is:
reios: Product version is:
reios: Release date is:
reios: Boot filename is:
reios: Software company is:
reios: Software name is:
reios: loading ip.bin from FAD: 45150
reios: bootfile is ''
[libretro ERROR] Failed to locate bootfile.
[libretro INFO] [LUT]: Product number: .
[libretro INFO] [LUT]: Found game in LUT database..
[libretro INFO] [Hack]: Applying update mode type hack.
Get MemPtr unsupported area : addr=0xA0000000
Get MemPtr unsupported area : addr=0xA0000018
Freeing fpcb
Get MemPtr unsupported area : addr=0x80000080
Get MemPtr unsupported area : addr=0x800000A8
Get MemPtr unsupported area : addr=0x800000BE
Get MemPtr unsupported area : addr=0x800000C6
Freeing fpcb
[INFO] [Discord] updating (2)
Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
MODEM Reset
sh4io: Invalid read access @@ 00000030
Freeing fpcb
Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
Freeing fpcb
Freeing fpcb
new tactx
new tactx
Freeing fpcb
Freeing fpcb
Freeing fpcb
Freeing fpcb

Cannon Spike


Loaded D:\GameData\EmulatorData\System\dc\dc_nvmem.bin as nvram

[libretro INFO] Using Recompiler
Sh4 Reset
recSh4 Init
Freeing fpcb
chd: parsing file W:\roms\Emulated\Console\Sega Dreamcast\Cannon Spike (USA).chd
TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:524 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44476 PAD:43800 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:504150 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
chd: Unable to find metadata, 19
gdrom: Opened image "W:\roms\Emulated\Console\Sega Dreamcast\Cannon Spike (USA).chd"
Initializing VMU data...
Initializing VMU data...
Sh4 Reset
reios: IP.bin is ''
reios: Hardware ID is:
reios: Maker ID is:
reios: Device info is:
reios: Area symbols is:
reios: Peripherals is:
reios: Product number is:
reios: Product version is:
reios: Release date is:
reios: Boot filename is:
reios: Software company is:
reios: Software name is:
reios: loading ip.bin from FAD: 45150
reios: bootfile is ''
[libretro ERROR] Failed to locate bootfile.
[libretro INFO] [LUT]: Product number: .
[libretro INFO] [LUT]: Found game in LUT database..
[libretro INFO] [Hack]: Applying update mode type hack.
Get MemPtr unsupported area : addr=0xA0000000
Get MemPtr unsupported area : addr=0xA0000018
Freeing fpcb
Get MemPtr unsupported area : addr=0x80000080
Get MemPtr unsupported area : addr=0x800000A8
Get MemPtr unsupported area : addr=0x800000BE
Get MemPtr unsupported area : addr=0x800000C6
Freeing fpcb
[INFO] [Discord] updating (2)
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0
[GPF]Unhandled access to : 0x13DE5EB0

Bangai-O

Loaded D:\GameData\EmulatorData\System\dc\dc_nvmem.bin as nvram

[libretro INFO] Using Recompiler
Sh4 Reset
recSh4 Init
Freeing fpcb
chd: parsing file W:\roms\Emulated\Console\Sega Dreamcast\Bangai-O (USA).chd
TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:450 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:44550 PAD:38450 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:3 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:195061 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:4 TYPE:AUDIO SUBTYPE:NONE FRAMES:9914 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:5 TYPE:AUDIO SUBTYPE:NONE FRAMES:1273 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:6 TYPE:AUDIO SUBTYPE:NONE FRAMES:4940 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:7 TYPE:AUDIO SUBTYPE:NONE FRAMES:4045 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:8 TYPE:AUDIO SUBTYPE:NONE FRAMES:5485 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:9 TYPE:AUDIO SUBTYPE:NONE FRAMES:13827 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:10 TYPE:AUDIO SUBTYPE:NONE FRAMES:12963 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:11 TYPE:AUDIO SUBTYPE:NONE FRAMES:6149 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:12 TYPE:AUDIO SUBTYPE:NONE FRAMES:13418 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:13 TYPE:AUDIO SUBTYPE:NONE FRAMES:12414 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:14 TYPE:AUDIO SUBTYPE:NONE FRAMES:14536 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:15 TYPE:AUDIO SUBTYPE:NONE FRAMES:7418 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:16 TYPE:AUDIO SUBTYPE:NONE FRAMES:8192 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:17 TYPE:AUDIO SUBTYPE:NONE FRAMES:4548 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:18 TYPE:AUDIO SUBTYPE:NONE FRAMES:9763 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:19 TYPE:AUDIO SUBTYPE:NONE FRAMES:9891 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:20 TYPE:AUDIO SUBTYPE:NONE FRAMES:10932 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:21 TYPE:AUDIO SUBTYPE:NONE FRAMES:4846 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:22 TYPE:AUDIO SUBTYPE:NONE FRAMES:5616 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:23 TYPE:AUDIO SUBTYPE:NONE FRAMES:5152 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:24 TYPE:AUDIO SUBTYPE:NONE FRAMES:4637 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:25 TYPE:AUDIO SUBTYPE:NONE FRAMES:1062 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:26 TYPE:AUDIO SUBTYPE:NONE FRAMES:4016 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:27 TYPE:AUDIO SUBTYPE:NONE FRAMES:5271 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:28 TYPE:AUDIO SUBTYPE:NONE FRAMES:5391 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:29 TYPE:AUDIO SUBTYPE:NONE FRAMES:14339 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:30 TYPE:AUDIO SUBTYPE:NONE FRAMES:7902 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:31 TYPE:AUDIO SUBTYPE:NONE FRAMES:8377 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:32 TYPE:AUDIO SUBTYPE:NONE FRAMES:9655 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:33 TYPE:AUDIO SUBTYPE:NONE FRAMES:10773 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:34 TYPE:AUDIO SUBTYPE:NONE FRAMES:9226 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:35 TYPE:AUDIO SUBTYPE:NONE FRAMES:6860 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:36 TYPE:AUDIO SUBTYPE:NONE FRAMES:5953 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
TRACK:37 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:50305 PAD:0 PREGAP:0 PGTYPE:MODE1 PGSUB:NONE POSTGAP:0
chd: Unable to find metadata, 19
gdrom: Opened image "W:\roms\Emulated\Console\Sega Dreamcast\Bangai-O (USA).chd"
Initializing VMU data...
Initializing VMU data...
Sh4 Reset
reios: IP.bin is 'SEGA SEGAKATANA SEGA ENTERPRISESBA9B GD-ROM1/1   U      0799800 T40217N   V1.00120001214        1ST_READ.BIN    SEGA LC-T-402   BANGAI-O                                                                                                                        D:\GameData\EmulatorData\System\dc\'
reios: Hardware ID is: SEGA SEGAKATANA
reios: Maker ID is:    SEGA ENTERPRISES
reios: Device info is: BA9B GD-ROM1/1
reios: Area symbols is:  U
reios: Peripherals is: 0799800
reios: Product number is: T40217N
reios: Product version is: V1.001
reios: Release date is: 20001214
reios: Boot filename is: 1ST_READ.BIN
reios: Software company is: SEGA LC-T-402
reios: Software name is: BANGAI-O
reios: loading ip.bin from FAD: 45150
reios: bootfile is '1ST_READ.BIN    '
reios: iso9660 PVD found
reios: iso9660 root_directory, FAD: 45170, len: 2048
Found 1ST_READ.BIN at 000065
filename len: 14
file LBA: 546054
file LEN: 564160
[libretro INFO] [LUT]: Product number: T40217N   .
Get MemPtr unsupported area : addr=0xA0000000
Get MemPtr unsupported area : addr=0xA0000018
Freeing fpcb
Get MemPtr unsupported area : addr=0x80000080
Get MemPtr unsupported area : addr=0x800000A8
Get MemPtr unsupported area : addr=0x800000BE
Get MemPtr unsupported area : addr=0x800000C6
Freeing fpcb
[INFO] [Discord] updating (2)
Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
MODEM Reset
sh4io: Invalid read access @@ 00000030
Freeing fpcb
Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
Freeing fpcb
Freeing fpcb
new tactx
new tactx
Freeing fpcb
Freeing fpcb
Freeing fpcb
Freeing fpcb
Freeing fpcb
Freeing fpcb

Unimplemented opcode: 00008C01 next_pc: AC010004 pr: AC00E0B2 msg: Unknown opcode
[libretro INFO] Fatal error : iNimp reached

 in cpu_iNimp -> core/hw/sh4/interpr/sh4_opcodes.cpp : 66
DEBUGBREAK!
blackman91 commented 5 years ago

I think it would be best to revert that change for the time being, It completely broke chd v4 support and only a few chd v5 are working and have stuttering because of the compression, it decreases functionality too much.

flyinghead commented 5 years ago

I might have a temporary fix to restore CHD v4 support for the time being. My only problem is to generate CHD v4 to test it. What tool can I use on linux x64?

blackman91 commented 5 years ago

I used the tool linked here: https://github.com/libretro/reicast-emulator/issues/278

Not sure if it works on linux though, maybe using wine.

There is also a link to a chd v4 there if that is all you need to test.

Shoegzer commented 5 years ago

@flyinghead Well first I have to say, I strongly recommend NOT reverting as the mame team has highly discouraged the use (and propagation!) of v4 chds given the major problems with that version, especially the "round-trip" problem which stands in the way of media preservation efforts. In fact, people should really just delete any v4s they own and make v5s from their original media again. So yeah, lack of v4 support in reicast is actually a Good Thing - so my advice is to tough it up, be patient and wait for cool things to happen courtesy @baka0815, perhaps you, and others.

With that said - if you really must do this, I also recommend not using the tool @blackman91 is suggesting. As I've warned him before, such tools frequently yield unpredictable results. Not good especially in cases like this where precision (and your sanity?) is key.

Looking here it seems v5 support was added at some point soon after February 2012. Then, going here you will see that MAME 0.145 was released in February 2012. It seems safe to compile a linux version from that.

More specifically, the source to the chdman tool necessary to create chds will be in src/tools/chdman.c. Either that, or you should be able to "make TOOLS=1" to get the tool - though given how old that source is, I can't recall if that particular procedure was used back then - so YMMV.

Though again - please don't do this... I'm really only mentioning it in the off chance such a version might help to diagnose and fix the v5 problem.

flyinghead commented 5 years ago

I am not recommending the use of CHDv4.

I am just proposing a quick and dirty patch which, I think, will temporarily restore a previously working feature, that is the support of CHDv4. And this until the problems with CHD v5 are solved and both are supported.

I don't know much about the CHD format but I agree with your point about lossless compression. However I don't think it's realistic to remove support for a previously working format because it's not optimal. Or you might as well remove support for CDI...

Shoegzer commented 5 years ago

I know you aren't recommending it. Regardless, it's your call of course, and Github is hardly a place to carry on a debate at length as I'm sure you'd agree. At least I've spoken my piece about it. Honestly the idea that "both are supported" is also bad - v4 should be removed, not preserved. There's just no point at all - chdman is free, and anyone can use the latest, bug-free version to purge their collections of garbage that is bound to be propagated and "pee in the preservation pool".

The v4 "round-trip" issue isn't related to lossless compression per se, just that you don't get the original media back as you expect - even if the conversion process was supposed to be lossless. My point being that people who use the chd format expect to be able to recover their original media bit for bit going in reverse - and not being able to do so is deceptive. Assuming cdi is supposed to be a lossy format (I can't recall off the top) then at least you already know what you're in for there, and can avoid it if it suits your needs. So, I have no problem keeping cdi in there.

Again, I do hope you reconsider and I know there are others who would too, but in the end, it's your call and I'll respect your decision.

blackman91 commented 5 years ago

The change seems pretty minor and doesn't affect chd v5 support at all and it is just about restoring previous functionality: https://github.com/libretro/reicast-emulator/commit/a2cb036f8fcd7b5b14fabb9f4eb0561c360e42a8

inactive123 commented 5 years ago

I merged this PR by @flyinghead.

https://github.com/libretro/reicast-emulator/pull/306

Can everybody retest their images now and see if there are any outstanding issues remaining?