Modding CD firmware to read GD-ROMs

Discussion in 'Sega Dreamcast Development and Research' started by Myria, Oct 3, 2012.

  1. Myria

    Myria Peppy Member

    Joined:
    Aug 21, 2012
    Messages:
    341
    Likes Received:
    14
    I think it would be feasible to make a hacked CD writer firmware that allows reading of GD-ROMs on a PC. In fact, it's possible that it'd work so well that Windows would recognize the filesystem's contents.

    I believe that these are the changes to the firmware that'd be required in order to read GD-ROMs:

    * Modify the MSF-to-LBA and vice versa conversion algorithm to treat 9x:xx:xx as positive LBAs coming after 89:59:74, instead of the usual negative LBAs used to encode positions within lead-in.
    * Modify the MSF-to-LBA and vice versa conversion algorithm to allow MSFs of Ax:xx:xx, Bx:xx:xx and Cx:xx:xx as coming after 99:59:74. I believe that Dreamcast disks end at C2:02:00 or something like that.
    * After reading lead-in, check the table of contents it just read in. If lead-out starts before say 07:00:00, and there is no B0 pointer, act as if there were a B0 pointer set to 09:00:00. This would then lead to looking for a second lead-in at 09:00:00.

    In theory, this would work. Dreamcast disks have a second lead-in with the "real" table of contents, with the first data track starting at (I believe) 10:02:00.

    It might also be necessary to patch algorithms used by the CD firmware to calculate how far it should move the laser head in order to seek to a sector. This depends on how the firmware implements seeking and its tolerance for error.
     
  2. Teancum

    Teancum Intrepid Member

    Joined:
    Aug 2, 2010
    Messages:
    663
    Likes Received:
    5
  3. Myria

    Myria Peppy Member

    Joined:
    Aug 21, 2012
    Messages:
    341
    Likes Received:
    14
    I'm curious how that technique on the Redump thread works at all. Dreamcast disks are 122 minutes, but the fake TOC on the "audio trap disk" says 99 minutes? How are they reading minutes 100-120? Do those drives not reject reading past the end of the TOC's lead out pointer?
     
  4. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    I made a tutorial for that in french: http://dreamagain.free.fr/index.php...ft-ripper-un-gd-rom-avec-le-lecteur-de-son-pc
    It works well as long as your dvd drive has no problem reading the disc. Lite-On ltd-165h is a nice working drive for that. I don't know if the reading problem on some drive is a limitation of the bios or of the hardware.

    In fact, you can see a gd-rom simply as a High Density CD with it's session starting at 45000LBA (45150 Physical Address).

    Good luck with that!

    FG
     
    Last edited: Oct 4, 2012
  5. Teancum

    Teancum Intrepid Member

    Joined:
    Aug 2, 2010
    Messages:
    663
    Likes Received:
    5
    I wonder if with custom firmware the trap disc and swap wouldn't be needed. Would be nice would make dreamcast dumping ALOT easier.
     
  6. atreyu187

    atreyu187 Intrepid Member

    Joined:
    May 13, 2012
    Messages:
    625
    Likes Received:
    16
    DC SD Ripper v1.1 by jj1d0m and a SD card adapter, takes 25 minutes and only requires pressing down once and "X" button twice. Cost $16 and gives TOSEC perfect dumps every time just like the BBA at a fraction of the cost. Check out their forums I have dumped over 100 disc using this method alone. Redump method is (Re)tarded and a waste of time, one must also have a deskto pand do the tricky swapping of disc, screw that simplicity and price win for me every time.
     
    Last edited: Oct 5, 2012
  7. Myria

    Myria Peppy Member

    Joined:
    Aug 21, 2012
    Messages:
    341
    Likes Received:
    14
    GD-ROMs are just slightly-modified CD-ROMs. These are the differences I know of:

    * Starting at around 9 minutes, after the Sega logo area if present, the data density becomes about double that of a regular CD. I don't know whether this was done by shortening the pit and land distance or lowering the track pitch; possibly both.
    * At the point at which the density increases, a second session lead-in starts. This second lead-in contains the table of contents for the high-density area. Lead-out starts at 122:02:00 on all disks, if I remember from a decade ago correctly. Data is pushed as far outward as possible for performance, and any CD audio tracks are inward from the data areas.
    * The definition of the MSF location markers in sub-Q was changed slightly to account for the larger size. This has two parts:
    ** In standard CD formats, MSF values from 90:00:00 to 99:59:74 are considered negative. 9x:xx:xx is used to identify sectors in lead-in, such that 99:59:74 is the last sector (LBA -151) before track 1 pre-gap starts. This is bad in a 122-minute format, so 90:00:00 is redefined as simply being after 89:59:74. This is also why 99 minute CD-R media compatibility blows on PC drives.
    ** MSF values are encoded in sub-Q as binary-coded decimal. To support 122-minute media, the MSF format is extended by using letter hex digits: A0:00:00 follows 99:59:74 and represents 100:00:00. C2:02:00 would then be the start of lead-out.

    The second lead-in is encoded like any other lead-in. In fact, it's just like a typical multisession disk, except that the first TOC doesn't say that there might be a second TOC at around 9 minutes. This is why the B0 firmware patch should work: if the drive knew that a second TOC were present, it could read it, because it's just a multisession format.

    The hard part in providing "transparent" GD-ROM support is random seeking. In previous experience with GD-ROMs, I noticed that it was easy to read the entire disk if you start at 10 minutes, but drives won't seek to random locations properly. Like I said in my first post, this is presumably because the firmware is trying to calculate how far it should move the laser head, and getting too high of a value. The drive might smack the head against the outer edge, or might point it to a different part of the disk so far away from its intended destination that it gives up.
     
  8. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  9. Myria

    Myria Peppy Member

    Joined:
    Aug 21, 2012
    Messages:
    341
    Likes Received:
    14
    I never said that I was a sane woman =^_^=
     
  10. Teancum

    Teancum Intrepid Member

    Joined:
    Aug 2, 2010
    Messages:
    663
    Likes Received:
    5
    ^^^ I know we have redump bashers but regardless of how you feel about the project. IF we managed to make custom firmware it would just be one more helpful tool for people wanting to dump games. Simple as that.
     
  11. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    I'd like a dvd-rom/cd-rom firmware, mainly as it'd make dumping betas easier as it wouldn't require ring check and that's the only pertinent difference between gd-roms and gd-rs. But yeah sd-cable is the most simple way to go! Btw, the swap method also works with betas, it has already been tested extensively. The same swap trick can also be done with the DC itself using BBArip/http-ack to dump CDDA betas, it has yet to be tested with an sd-cable, but hardware-wise it certainly can works, maybe a sight modification to jj1odm's sdrip would be required though.

    (btw I'm the one who contacted jj1odm some years ago and made him re-launch his parrallel-port and sd-card projects.)
     
    Last edited: Oct 5, 2012
  12. atreyu187

    atreyu187 Intrepid Member

    Joined:
    May 13, 2012
    Messages:
    625
    Likes Received:
    16
    A cfw for a dvd would be simple but redumps methods are just outlandish to accomplish the same thing in the end. The trap disc is just silly having to tear apart your pc to dump a disc when there are much easier methods. Im just glad they got away from compressing all the audio.raw files to ape before posting. Their project has many dumps of the same game with same ring codes without matching hashes so i see their methods unreliable. In tosec we do have mis matches but usually one file from a bad dump not every single track. Now that is only how i feel about their approach to DC titles as i prefer to submit my Saturn games to redump and sega cd to darkwater.

    Simplicity is needed to get more dumpers involved not to mention consistently producing accurate dumps. But as for gd-rs they are pointless to submit to these projects as none match up, is it nice to do so to share yes but we will never know if it is a true 1:1 dump as there is no standard to compare with on betas so they will never be added to the database.
     
  13. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  14. atreyu187

    atreyu187 Intrepid Member

    Joined:
    May 13, 2012
    Messages:
    625
    Likes Received:
    16
    It is why i have dumped solely for TOSEC as i have games that they need in redump but out if six submissions for previously dumped games i could not get the correct hashes. Btw i will be testing a gd-r with the sd card soon as it arrives because it simply looks for the barcode before it starts to rip so if i tape the lid sensor after removing the app disc it shoukd work.
     
  15. APE

    APE Site Supporter 2015

    Joined:
    Dec 5, 2005
    Messages:
    6,416
    Likes Received:
    138
    Realistically there are probably a handful of candidates out there that, if you knew what you were looking for, you could find relatively easily. Somehow the XBox scene figured out about the iHAS drives as well as the handful that Kreon modified firmware for. The fact that there are only that handful doesn't make it a bad solution, it makes it impractical in the long run. Finding brand new drives to flash the Kreon firmware onto is difficult at best and at worst you have to buy them from people like me.

    The big difference from the Kreon drive to a DVD-ROM modified for Dreamcast use would be that the Kreon drive is old tech with a still in use standard that is being modified as we speak in Redmond while the GD-ROM format is likely dead for good. The Kreon drives can't rip SSv2 IIRC and it sure doesn't handle ripping or XGD3(?) discs properly. I still rip my games and extract the data from the ISO to dump onto my RGH modified 360 but the resulting ISO surely won't pass through ABGX. GD-ROMs have no real protection on them and surely any new Dreamcast games coming out will have custom protections unrelated to being pressed on GD-ROMs.

    In the long run the reality is that optical drives may go the way of the dinosaur and at the very least I could see CD-ROM support being dropped if it wasn't for people still buying music CDs. Apple did it with the MacBook Air, why not BMW? Might have better luck doing what the XBox scene did with the 0800 firmware and simply build a board that allows you to use the GD-ROM on the SATA/IDE bus. Personally I'd like it if I could browse a GD-ROM like I can CDs and DVDs but cest la vie. Even in this case the number of GD-ROMs is limited and it'd take a technical mind to build such a board and a relatively technical mind to be able to use it. I don't even know if you could accurately rip anything this way either.
     
  16. atreyu187

    atreyu187 Intrepid Member

    Joined:
    May 13, 2012
    Messages:
    625
    Likes Received:
    16
    Well the gd-rom drive is just a modified Yamaha cd rom drive so it would be feesible to do so but as for accurate dumping im not sure. Im still excited the pressed mil cds are going to have a new ripping method so we can verify them. So all the after market games like geist force or gun lord can be properly preserved as well as the handful of retail mil cds sega produced . Those did have protection and some games like rush rush have protection. Without clone cd we wouldnt have seen a working backup of any red spot produced games.
     
  17. Myria

    Myria Peppy Member

    Joined:
    Aug 21, 2012
    Messages:
    341
    Likes Received:
    14
    atreyu: There exist Dreamcast games that haven't been dumped? Other than like prototypes and such?
     
  18. atreyu187

    atreyu187 Intrepid Member

    Joined:
    May 13, 2012
    Messages:
    625
    Likes Received:
    16
    Of course there are quite a few japanese ones and still ones from every country that arent in playable form on the dreamcast. That and a lot if the older rips used some vastly inferior software compared to what we can do today quality wise.
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page