[Stgt-devel] Prototype MMC DVD-ROM and burnable DVD+R implementation

FUJITA Tomonori fujita.tomonori
Tue Apr 15 02:23:48 CEST 2008

On Mon, 14 Apr 2008 20:25:10 +1000
"ronnie sahlberg" <ronniesahlberg at gmail.com> wrote:

> Hi List
> Please find attached a "small" (nothing is small when it comes to mmc)
> patch to the MMC emulation that adds
> support for three different profiles
> 1, NO_PROFILE    which is triggered by the lun being offline and
> causes the emulation to behave as a dvd drive with no disk in the bay.
> 2, PROFILE_DVD_ROM   which is triggered by the backing store being >0
> bytes in size when the lun is brought online.
>    In this mode it behaves as a DVD drive with a ROM disk in the bay.
> Reads are honoured but nor writes. It reports that the media contains
> embossed data.
> 3, PROFILE_DVD_PLUS_R which is triggered if the backing store file is
> ==0 in size when the lun is brought online. In this mode it behaves as
> a DVD drive with a blank
>     writeable +R disk is in the bay.
> In the +R profile,  I have tested it with DVDDecrypted from windows
> and it works well. I can write/burn iso images to this +R dvd disk.
> Once the disk is burned and the application finishes the process by
> issuing the CloseTrack CDB, the emulation will "morph" the device and
> change the mode into being DVD_ROM instead.

Sounds really nice features.

> There are controversial changes to the core in this patch wich
> involves changing of how online/offline is handleded and also adds the
> possibility to add a LUN with a nonexisting backing store
> (the lun will be created but it never goes online).
> These changes, which are a small part of the diff, is likely to break
> other non MMC device emulations  so you may NOT want to import this
> patch as it is into the tree.
> But please feel free to review and comment on it.

I will do some time this week. I'm fine with supporting nonexisting
backing store. I only care about how to implement it.

> The emulation adds several large MMC CDBs but only adds what is
> required for DVD_ROM and DVD+R profiles to wurk under DVDDecrupter
> when burning an iso to a blank disk.
> Later it will be necessary to add emulation of additional CDBs and
> fields in CDBs to enable other dvd burning tools to work as well.
> It is only tested with DVD decrypter and it sworks well.
> Now, the next question, would STGT want to have DVD_ROM/DVD+R
> emulation?

I think that there is no problem about supporting the emulation as
long as it doesn't break other stuff.

> If so, how should i proceed?   the patch is pretty (>2.6k lines) big
> since MMC is pretty enormous.
> What is the next step i need to do now, once i have shown a working prototype?
> (feel free to test it out, but dont add it to the git tree until the
> controversial parts have been resolved)
> I am willing to rework the patch into smaller pieces,
> maybe one piece with the online/offline changes, then one patch for
> each MMC CDB that is added ?

Let me review the changes to the core first.

Once we agree on the changes to the core, please send them as separate
patches. Then you can post mmc patches as you like, a single patch or
multiple patches. I'm fine with either way.

Thanks for your effort!

More information about the stgt mailing list