Lahrs Posted June 7 Share Posted June 7 This isn't a question on to how to make a .chd file but what is actually going on with it. For example, I have a Dreamcast ROM of NBA Hangtime, the cue/bin file size is roughly 1.1GB. I turned it into a .chd file, and it's down to 247mb. I run it through Flycast, and it runs just as well, loads up just as fast, and plays exactly like the cue/bin file but at 1/4 the HD space. It seems as long as the emulators themselves can play a .chd file, there is every reason to convert them. Am I missing something? How does a file reduce its size to 1/4 without losing anything? Amazing, but baffling. Quote Link to comment Share on other sites More sharing options...
dragon57 Posted June 7 Share Posted June 7 Not sure how this will help, and assuming you don't want to get down into weeds of the actual compression algorithm used to create the chd file (hint: there are different versions supported by chdman, the MAME utility originally used, mostly likely, to create the chd files). Think of chd as another type of compression format like zip, 7z, rar, etc. A utility like chdman is used to create the file, then the end user program like MAME, and the other emulators that now support CHD, decompress the CHD file 'on the fly' directly into memory so the emulator can use it. Does any of this help? Quote Link to comment Share on other sites More sharing options...
Lahrs Posted June 7 Author Share Posted June 7 To be fair, I don't even understand how zip files work, so I believe that will be my next Google search. It is all 1's and 0's and if you shrink them down, they have to go somewhere. That is just my thought process at the moment, and I need to read up and get informed. I do appreciate your reply. While the compression still wracks my brain, I do believe I understand the on-the-fly decompression into memory, and I assume that is why the game still plays at full speed. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted June 7 Share Posted June 7 49 minutes ago, Lahrs said: the cue/bin file size is roughly 1.1GB. I turned it into a .chd file, and it's down to 247mb. Prt of tht is tht its now cmpressd. (how's that for a visual? lol) Another factor is when converting .bin(s) to .chd, all the empty 'sections' are stripped out. They're basically just blank placeholders that serve no purpose to the actual game. Quote Link to comment Share on other sites More sharing options...
Lahrs Posted June 7 Author Share Posted June 7 (edited) I've spent the last few hours digging into file compression... and playing games. I have a better understand now, and I still find it impressive, though less baffling. If I'm understanding correctly, your "Prt of tht is tht its now cmpressd." would need a small set of instructions so the computer, emulator, etc. would know how to rebuild all the missing A's and the O in 'now' should not be there, but with another set of instructions on how to rebuild all the missing O's. I think I'm close, though surface level. That was a very helpful visual. Edited June 7 by Lahrs 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.