DC2CD

Discussion in 'Sega Dreamcast Development and Research' started by iNub, Oct 24, 2011.

  1. iNub

    iNub Rapidly Rising Member

    Joined:
    May 29, 2010
    Messages:
    84
    Likes Received:
    0
    Location:
    Restaurant at the end of the universe
    DC2CD takes .gdi dumps from (WinCE and SegaOS) GD(-R)s, extracts the files, adds a dummy file to fit the selected CD-R size, does all the binary hacking (standard: add VGA and all regions) and outputs all that in selfbootable .raw/.bin/.cue format which can be burnt in one go with ImgBurn, and of course supports Win7 (x64).

    I think most of it should be self-explanatory (click "Open dump", select folder containing trackXX.bin and .raw files, click "Selfboot") - but beware, this is more of a preview than a normal release so if it works for the game(s) you tried good, if not, sorry. For example DO NOT try to convert multiple .gdis without restarting DC2CD, it WILL crash. You've been warned.

    So yeah, this took some time to make (and a LOT of more or less educated guessing and reversing) and is FAR from finished (very buggy, freezes because of missing threading, so far only works with ~75% of games I tested) but I'm not sure whether I should invest any more time in it so I want to ask for your input.
    Continue or not?

    [​IMG]

    What you need:
    - A Dreamcast with a BBA and a copy of ackmed's httpd-ack to dump your GD(-R)s with
    - A computer with a CD writer, .NET 4.0 and ImgBurn
    - An internet connection to share the love!

    Some of the other features I would like to implement in the future (after fixing the non-working games, the ugliest bugs and maybe giving the whole thing a good core rewrite):
    - automatic downsampling
    - creating and applying .diffs

    Some of the known problems:
    - File timestamps are not yet being set
    - Some menu items are not yet enabled
    - Many small cosmetic errors
    - Code is terribly messy and needs to be cleaned up
    - Only works with ~75% of the games I tried (standard settings):

    As reported by others:
    If you tried any other games please let me know how it went - but again, please DO NOT expect this to fully work yet! Don't waste CD-Rs!

    As for the source code, I plan to share that once it's in a state I see fit - or if I give up development.

    Oh yeah, this is meant to preserve GD-Rs, not for ugly dirty evil terrorist pirates!

    DC2CD 0.05 on VirusTotal
    Download DC2CD 0.05 (825 KiB)
    Download TOSEC .dat files (312 KiB) (= dc-tosec-datfiles-2010-05-10.zip + Sega Dreamcast - Games - PAL (TOSEC-v2011-05-04_CM).zip + manually added "Evolution 2 - Far Off Promise v1.001 (2002)(Ubi Soft)(PAL)(M5)[!]")

    Please share the love if it works for your unfinished games, like I do:
    Download selfbooting MagForce Racing V0.001 GD-R (CD-R 80, 337 MiB)

    Without the following people and groups this would not have been possible:
    - FairLight/Kalisto/Echelon Dreamcast division who figured out selfbooting in the first place and coded binhack
    - The authors of hack1/2/3/4.exe, dahack.exe, cdda.exe, bincon.exe and ipbin4win.exe who figured out the rest of the binary hacking stuff
    - Philip J. Erdelsky/Caltech for his "ISO9660 Simplified for DOS/Windows" article
    - The authors of cdrdao for the iso2bin ECC calculation code
    - Damien Guard and Truman @Myce for the iso2bin EDC calculation code
    - ElBucanero and contributing people for his DC rip database that helped learn about the binhacking
    - TuxTheWise whose selfboot tutorials helped me get a rough understanding of the processes involved
    - LIGHTNING UK! who helped getting the cues for combined audio files right... oh yeah, and wrote ImgBurn
    - ASSEMbler for the httpd-ack GD-R ripping method using the System Disc 2
    - Everyone I forgot. Sorry.

    Regards
     
    Last edited: Nov 1, 2011
  2. Mystical

    Mystical Fiery Member

    Joined:
    May 3, 2011
    Messages:
    874
    Likes Received:
    10
    Looks great mate, can i ask what you programmed it in?
     
  3. alphagamer

    alphagamer What is this? *BRRZZ*.. Ouch!

    Joined:
    Jun 25, 2008
    Messages:
    3,259
    Likes Received:
    7
    Location:
    Germany
    This is very appreciated, thanks!
     
  4. feder

    feder Gutsy Member

    Joined:
    Apr 3, 2007
    Messages:
    417
    Likes Received:
    2
    This is amazing, the other day I tried to convert a GDI to selfboot, but half the tools are incredibly old and don't work in Windows 7 x64, I had to set up a virtual machine to use those apps.

    This is just what I need, you should continue working on it, most of the tools already available don't work in modern OS.
     
    Last edited: Oct 24, 2011
  5. iNub

    iNub Rapidly Rising Member

    Joined:
    May 29, 2010
    Messages:
    84
    Likes Received:
    0
    Location:
    Restaurant at the end of the universe
    Mystical: It's written in C# (using VS2010), I'm not quite "there" yet with C/C++ (only programmed PIC MCUs with C so far). I am/was actually more of a web dev so I'm glad it works as well as it does :p

    alphagamer: Thanks, I appreciate your appreciation.

    feder: Yeah, I used Win7's XP Mode too before I had the tool... I found the whole process to be pretty tedious (and XP Mode doesn't seem to support CD writers...) so I thought I should simplify it.

    Also maybe I should mention that the "V0.001" of MagForce is probably much later in development, the version number is just what's written on the disc (and in the IP.BIN). Burn it anyway and enjoy the surprisingly cool soundtrack if you don't know it.

    Oh and if anyone's wondering why the exe is "so big" (801KiB), around 700KiB of that are just a "new" dummy audio file as a replacement for the Echelon one, which actually contains audio ("This is a dreamcast disc...").

    Also I'm open to any and all comments regarding (missing) features, other output formats (even though I'm pretty happy with the way it is now) etc.

    The feedback seems to be rather positive so far so maybe it is worth keeping development up.

    OT: I realized that I once uploaded a broken version of "DCFileListSort" which does exactly what the name suggests and is pretty much obsolete now, but if anyone has any use for it (were it not broken), here's a fixed version (on VirusTotal).

    Regards

    EDIT: Another request for input... should I add a function to split the one big .raw file that's created (if using the appropriate switch) back into the original files (and maybe convert them to wav)? That way one could listen to the CDDA tracks without burning the disc first. I like the "one big .raw" idea though because with some games you'd otherwise end up with up to ~100 output files (.bin, .cue, 98x .raw).
    EDIT: Scratch that, I'm already implementing it. In the meantime, here's the MagForce CDDA as MP3s (59MiB).
     
    Last edited: Oct 25, 2011
  6. runkthepunk

    runkthepunk <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Aug 13, 2010
    Messages:
    208
    Likes Received:
    0
    Location:
    England!
    Hi there

    I don't do much of this type of thing myself but I know a lot of people in the Dreamcast community would welcome this software with open arms.

    Anything that will help the Dreamcast scene is great news.

    Keep up the good work!
     
    Last edited: Oct 26, 2011
  7. bearkilla

    bearkilla Robust Member

    Joined:
    Feb 3, 2009
    Messages:
    269
    Likes Received:
    2
    great work
     
  8. sflynn

    sflynn Rising Member

    Joined:
    Jul 9, 2005
    Messages:
    69
    Likes Received:
    0
    Location:
    NC, USA
    I am a c# developer by trade, if you need any help send me a pm.
     
  9. -=FamilyGuy=-

    -=FamilyGuy=- Sex, Drug, and Rock N' Roll !!

    Joined:
    Mar 3, 2007
    Messages:
    1,699
    Likes Received:
    30
    Location:
    My basement
    Nice project!

    I've done something similar in the past, but in a very less user-friendly format, to automate the boring part of manually selfbooting a 45000lba game.

    Have you made your own version of binhack or are you using the original one? I've made a 32bit clone of it that you could use if you want.

    Feel free to ask any questions about selfboot/binhacking (specially data/data backups), I know a bit on the subject.


    Good luck on this project!

    FG
     
  10. RaZiel

    RaZiel Gutsy Member

    Joined:
    Oct 31, 2008
    Messages:
    410
    Likes Received:
    2
    Location:
    Ole Carolina
    Please continue, this is simply awesome!! I have been trying it out but keep getting errors trying to do my copy of Mag Force Racing. What settings did you use if you don't mind me asking.
     
  11. iNub

    iNub Rapidly Rising Member

    Joined:
    May 29, 2010
    Messages:
    84
    Likes Received:
    0
    Location:
    Restaurant at the end of the universe
    Thanks for your support, especially of course to anyone willing to help out - it's nice to see all the work was and keeps being worth it.


    First up I built a new version, 0.04. Not much has changed, especially nothing (or at least I hope so) regarding the actual selfbooting process.
    I just added raw2wav.exe functionality (except my version doesn't add a second RIFF header to files that already have one, like my MagForce GD-R .raw files) and made the "combine .raw files" thing available externally.
    Both can be found under "Tools".

    DC2CD 0.04 on VirusTotal
    Download DC2CD 0.04


    @sflynn:

    Thanks, I might just do that when more problems arise.


    @-=FamilyGuy=-:

    I know of your work and that many have successfully used your tools, unfortunately I personally wasn't quite too lucky with them and my limited knowledge back then though and that's one of the reasons I started doing this.

    As for binhack (which I combined with bincon) and actually all "tools" used in DC2CD, they're my own code - though obviously based on the old tools; except for what I call the "echelon.bin" which binhack inserts into all files (that I think originally came from Mr. Driller), the echelon dummy audio file (which is just 705.600 0x00 bytes) and the EDC/ECC calculation stuff for the .bin (whose original authors I mentioned in the first post).

    I mostly used a lot of lucky guessing and testing, calc, notepad, Hex Workshop and IDA to figure out what tool had what purpose.

    I'm interested in the data/data stuff but I'm also into keeping CDDA so at the moment that doesn't seem the right path to take, at least not by default. Maybe for rips without CDDA though... I'll look into that at some point.

    I might get back to you on some of the binhacking stuff, currently I think I have most of it figured out pretty well but it's good to know there's someone I can ask if I should encounter more problems.
    I should share my notes as well, I'll do that when I release the source code at the latest.

    Also I figured out I could get a 25 disc spindle of 100 minute CD-Rs for just 6€, who knew? That makes for interesting possibilities in keeping rips as close as possible to the original which is one of my goals.


    @RaZiel:

    I suppose you are talking about the retail version? Unfortunately I don't have a dump of that so I can't test it - but if anyone knows where to get it of course I'd test it, just send a PM.

    For the MagForce GD-R, like for ALL of the other games I tried, I used the standard settings, which always worked for me.

    What kind of errors are you getting? The more specific the easier for me.
    If you mean that DC2CD seems to hang, that's normal as I haven't implemented threading yet, just wait until it comes back to life.
    Also make sure your dump is correct (check the file sizes), DC2CD won't work with broken (data) files and can't check for them yet as it does not currently look at the .gdi file at all.


    For anyone else testing games (which you shouldn't get too much into just yet as there are 5 known not working games right now which I should fix first), here's a list of retail GD dumps I did a while back and still have around, which means I could test them if you get errors:
    Download dumps.txt


    Regards
     
    Last edited: Oct 31, 2011
  12. zouzzz

    zouzzz <B>Site Supporter 2013</B>

    Joined:
    Mar 24, 2008
    Messages:
    249
    Likes Received:
    4
    Thanks!
     
  13. Mystical

    Mystical Fiery Member

    Joined:
    May 3, 2011
    Messages:
    874
    Likes Received:
    10
    C# - my language of choice, if you need any help mate let me know, this is an amazing project and would like to see it fully working as i feel it will be heavily used by the community
     
  14. RaZiel

    RaZiel Gutsy Member

    Joined:
    Oct 31, 2008
    Messages:
    410
    Likes Received:
    2
    Location:
    Ole Carolina
    I dumped it from retail and would happily post it to Megaupload for you for testing purposes if you would like it. The game has three more CDDA tracks then your BETA so I think like you said it is much higher then v.001. If you would like the game or any that I may have for that matter. I have a little over 150 retail DC games so I have a few :lol: I was just uncertain what I should use for the binhacking as it has CDDA as you know and I have always used DAhack for that when going about a manual selfboot. That crashes on me under Win7x64.

    Please for the love of god don't quit because no one doesn't want this as I assure you it isn't the case, but if you see fit or get bored by all means. I just know a lot of folks out there would love to see this go as far as it could. Either way I am happy with what I have ATM.


    BTW backed up Sonic Adventure LE GD-R with your app to 99 minute disc and it works great!!


    EDIT

    Error log

     
    Last edited: Oct 28, 2011
  15. Basil

    Basil Guest

    Good work, do your utility keep original file order ?
     
    Last edited by a moderator: Oct 29, 2011
  16. Melchior

    Melchior Rising Member

    Joined:
    Jun 12, 2011
    Messages:
    74
    Likes Received:
    2
    C# you say?

    Where's your SVN/GIT/VSS/TF Repository?

    Or is it just a big tarball?

    ( tar.gz'ed MS Visual studio project directory - :rolleyes: )
     
  17. iNub

    iNub Rapidly Rising Member

    Joined:
    May 29, 2010
    Messages:
    84
    Likes Received:
    0
    Location:
    Restaurant at the end of the universe
    Hi again and sorry I didn't answer before, I was trying to get some stuff done on the program before returning... browsing the web is just too time consuming ;)

    @RaZiel: Thanks, your log reminds me I have not yet implemented any error catching at all... I will look at your case asap and yeah, a MegaUpload link would be extremely helpful for debugging (but please via PM, don't want to turn ASSEMbler (forums) into TPB).
    Glad to hear it worked on Sonic LE! I was beginning to think I'm the only one it works for at all.
    Thanks for the kind words.

    @Basil: Yes and no - yes as in all files are kept where they're supposed to be (directory wise and sector positioning wise), no as in when I was manually comparing ISO9660 directory records of Dreamon Volume 16 I found that the file records were sorted a little differently than they would be using mkisofs ("_" characters before or after alphanumeric characters and such, my guess is because mkisofs sorts Linux style while DC2CD sorts Windows style). But again, that has no merit on sector positioning. So the answer to your question is most likely yes.

    @Melchior: SVN on my local HDD. Sorry but the source is not yet ready for publication. It's just too embarassing - and far from easily understandable for an outside party. I will release it "when it's done" at the latest.

    What I've been doing lately:
    First of all, I happened to run into my old dump of Evolution 2 - Far Off Promise and can confirm that one works fine too (CD-R80, standard settings).

    Then there's DC2CD v0.05:
    - added settings
    - added dump sanity checking (during processing and as tool)
    - added TOSEC .dat verification (during processing and as tool)
    - sanitized output (delete unnecessary files when done)
    - fixed errors that occured when trying to convert multiple dumps without restarting DC2CD
    - several minor cosmetic fixes

    DC2CD 0.05 on VirusTotal
    Download DC2CD 0.05 (825 KiB)
    Download TOSEC .dat files (312 KiB) (= dc-tosec-datfiles-2010-05-10.zip + Sega Dreamcast - Games - PAL (TOSEC-v2011-05-04_CM).zip + manually added "Evolution 2 - Far Off Promise v1.001 (2002)(Ubi Soft)(PAL)(M5)[!]")

    Now when you open a dump (and activated the "Always check/verify dumps" setting) you'll have to wait a few seconds before being presented with a check of the track lengths of your dump, informing you which files are broken (if any).

    If you have also activated the "Always use TOSEC .dats" option and none of the track files seem broken, DC2CD will look in the TOSEC .dat folder (which you can specify via the "Set TOSEC .dat path" setting) and try to find your dump (based on number of tracks, size of tracks and SHA-1 of tracks).

    Of course you can replace old TOSEC .dat files with new ones in your TOSEC .dat folder and DC2CD will use those instead (if they're named "Sega Dreamcast*.dat").

    For the next version I'll try to fix some of the known not working games, but I think implementing dump verification first made sense to avoid false problem reports.

    Regards

    EDIT: If you downloaded the first "0.05" version of DC2CD I posted within 30 minutes after this post please redownload, that version was broken (verify dump tool didn't work in some cases).
     
    Last edited: Nov 1, 2011
  18. RaZiel

    RaZiel Gutsy Member

    Joined:
    Oct 31, 2008
    Messages:
    410
    Likes Received:
    2
    Location:
    Ole Carolina
    EDIT

    Fixed my problem. CDRTools needs ASPI in order to work, well I have been trying to make tools on Win7 and once I installed MekugiAspi your tool works like a charm now. So anyone having troubles might want to give it a go. Anyhow it makes a image now but once I try to boot it the game just reset's itself. Also could you add logotools when you can? I love seeing that on my rips. Also the fact that we can rip the data before hand then put it back is tops. And sorttxt is that supported or will be in the future? I am sorry i have so many questions but this is freakin awesome!!


    RE-EDIT

    Ok not sure WTF happened but it worked for one rip and now back to the error's again. Same ones so I am not sure and the one rip just reset's once it reaches the ip.bin over and over.
     
    Last edited: Nov 1, 2011
  19. iNub

    iNub Rapidly Rising Member

    Joined:
    May 29, 2010
    Messages:
    84
    Likes Received:
    0
    Location:
    Restaurant at the end of the universe
    RaZiel:
    - DC2CD doesn't use CDRTools/CDRecord or ASPI.
    - As for the game reset problem, I've had that too - happens for me with Nightmare Creatures II v1.004 (2000)(Konami)(PAL)(M4)[!] and Worms Armageddon v1.001 (1999)(MicroProse)(NTSC)(US)[!]; I believe I've found the cause of this problem now and will try to fix it with the next version (probably a really stupid bug in iso/bin creation).
    - I was not aware of logotools but I've just downloaded the source and a win32 exe of it; I'll try to implement it in the next version - though I kind of like the good old pirate logo :p
    - I'm not sure I know what you mean by "fact...we can rip the data...then put it back"? If you mean that you can change/downsample files in "data" before clicking "selfboot" - DON'T DO THAT, IT WILL MESS UP YOUR IMAGE. I wanted to implement that but now I'm planning a much better route to accomplish the same.
    - sorttxt (or filelist.txt as DC2CD creates during processing) is not needed, the file order gets extracted from the old track(s).
    - I'm all ears for questions and feature requests.

    The best advice I think I can give at this point is: stop using DC2CD <= 0.05 and wait for the next version, it WILL be better but WILL take some time.

    Remember, these early versions were just meant as a preview and to gauge interest.

    Regards

    EDIT: Whoops, logotools is for inserting a logo into the license screen (like Echelon did iirc), not for swapping the VMU image. If anyone knows how to do that I'd be glad to implement that too though.
     
    Last edited: Nov 3, 2011
  20. RaZiel

    RaZiel Gutsy Member

    Joined:
    Oct 31, 2008
    Messages:
    410
    Likes Received:
    2
    Location:
    Ole Carolina
    the command for the app is simple but you have to convert a PNG file to a MR file. It is included in the app pack. I would suggest like boot dreams maybe having a folder labeled iplogo and have pre converted MR files in there instead of your app needing to convert PNG to MR then insert as that app comes in two parts. One for PNG conversion and one to insert the MR file.


    http://www.dreamwell.pwp.blueyonder.co.uk/dcselfboot/Tutorial_Index/tutorial_index.htm

    Check that site out has been very helpful to me. And also I go that game to work once then it errors out again every time. I am a very patient man so take your time and I am happy to waste CDR's testing :lol: Can't wait to see next version.
     

Share This Page