[Main Page]

Xbox360Hl3120PatchIde-cdDriver

From EurAsiaWiki

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy
Category: Xbox360

probutus @ http://www.xboxhacker.net/index.php?option=com_smf&Itemid33&topic=350.msg3802#msg3802


I got the GDR-3120L drive running in linux without using ide-scsi but only patching the ide-cd driver== (And I could browse the VIDEO_TS and AUDIO_TS part of an 360 disc-> someone will have to add some unlock code into the "faking capabilities section"...)==

I could mount and access several standard discs just like in every other cdrom (still used my sata->pata converter)

The only thing I had to do was to prevent the ide-cd module to send the GPMODE_CAPABILITIES_PAGE sense-package to the cdrom but fake the capabilities instead.

See the code to change in linux/drivers/ide/ide-cd.c below. (All other attached cd/dvd drives will continue working unaffected)

exchange the function ide_cdrom_get_capabilities() with this one:

static int ide_cdrom_get_capabilities(ide_drive_t _drive, struct atapi_capabilities_page _cap)
{
        struct cdrom_info *info = drive->driver_data;
        struct cdrom_device_info *cdi = &info->devinfo;
        struct packet_command cgc;
        int stat=0, attempts  3, size = sizeof(*cap);
        /*
         * ACER50 (and others?) require the full spec length mode sense
         * page capabilities size, but older drives break.
         */
        if (=(!strcmp(drive->id->model, "ATAPI CD ROM DRIVE 50X MAX") |||=
            =strcmp(drive->id->model, "WPI CDS-32X")))=
                size -= sizeof(cap->pad);

        if (strcmp(drive->id->model, "HL-DT-STDVD-ROM GDR3120L"))
        {
                init_cdrom_command(&cgc, cap, size, CGC_DATA_UNKNOWN);
                do { /_ we seem to get stat=0x01,err0x00 the first time (??) _/
                        stat = cdrom_mode_sense(cdi, &cgc, GPMODE_CAPABILITIES_PAGE, 0);
                        if (=stat)=
                                break;
                } while (--attempts);
        }
        else
        {

                /_ the GDR3120L does not support the GPMODE_CAPABILITIES_PAGE command so we have to fake it _/
                printk("GDR3120L detected=->faking capabilities
");=
                memset(cap,0,sizeof(struct atapi_capabilities_page));
                cap->dvd_r_read=1;
                cap->dvd_rom=1;
                cap->method2=1;
                cap->cd_rw_read=1;
                cap->cd_r_read=1;
                cap->multisession=1;
                cap->mode2_form2=1;
                cap->mode2_form1=1;
                cap->audio_play=1;
                cap->composite=1;
                cap->isrc=1;
                cap->cdda=1;
                cap->upc=1;
                cap->maxspeed=35344;
                cap->buffer_size=8;
                cap->curspeed=35844;
        }
        return stat;
}

Retrieved from "http://www.eurasia.nu/wiki/index.php/Xbox360Hl3120PatchIde-cdDriver"

This page has been accessed 742 times. This page was last modified 12:33, 16 February 2010.