diff --git a/README b/README index d2eb3e3..74b8625 100644 --- a/README +++ b/README @@ -1,3 +1,10 @@ +QPxTool 0.7.2 modded by ArtKar + - added support for BD-RE WH16NS58 ( only tested Blu Ray quality test ) + - added support for multilayer Blu Ray discs + - added support for BDXL + - changed graph style + + ************************************************************ QPxTool 0.7.2 diff --git a/console/qscan/qscan.cpp b/console/qscan/qscan.cpp index 09f1e65..85fda70 100644 --- a/console/qscan/qscan.cpp +++ b/console/qscan/qscan.cpp @@ -628,7 +628,9 @@ int main(int argc, char** argv) { } } printf(IMEDIA "Layers : %d\n", dev->media.layers); - + if ( dev->media.type & (DISC_BD) ) { + printf(IMEDIA "GB per Layer : %d\n", dev->media.gbpl); + } if ( dev->media.type & (DISC_DVD) ) { // read_disc_regions(drive); if (!dev->media.dvdcss.protection) { diff --git a/console/qscan/version.h b/console/qscan/version.h index d024eb2..6975dcc 100644 --- a/console/qscan/version.h +++ b/console/qscan/version.h @@ -9,5 +9,5 @@ * See the file "COPYING" for the exact licensing terms. */ -#define VERSION "0.7.2" +#define VERSION "0.7.2 modded by ArtKar" diff --git a/gui/include/device.h b/gui/include/device.h index 85cc9d2..7fa87a5 100644 --- a/gui/include/device.h +++ b/gui/include/device.h @@ -344,6 +344,8 @@ struct MediaInfo { QString mid; QString layers; int ilayers; + QString gbpl; + int igbpl; QString prot; QString regions; diff --git a/gui/include/version.h b/gui/include/version.h index b1ee4ba..e937e19 100644 --- a/gui/include/version.h +++ b/gui/include/version.h @@ -13,7 +13,7 @@ #ifndef _QPX_VERSION_H #define _QPX_VERSION_H -#define VERSION "0.7.2" +#define VERSION "0.7.2 modded by ArtKar" #endif diff --git a/gui/src/device.cpp b/gui/src/device.cpp index 3a68b2f..3c5573f 100644 --- a/gui/src/device.cpp +++ b/gui/src/device.cpp @@ -274,6 +274,8 @@ void device::clearMinfo() media.erasable = "-"; media.layers = "-"; media.ilayers = 1; + media.gbpl = "-"; + media.igbpl = 25; media.prot = "-"; media.regions = "-"; media.creads = 0; @@ -1335,6 +1337,7 @@ void device::qscan_process_line(QString& qout) #ifndef QT_NO_DEBUG // qDebug("|" + sl[0] + "|" + sl[1] + "|"); #endif + if (sl[0].contains("Media type", Qt::CaseInsensitive)) { if (sl[1].contains("No Media", Qt::CaseInsensitive)) { media.type = "-"; @@ -1357,7 +1360,12 @@ void device::qscan_process_line(QString& qout) media.layers = sl[1]; media.ilayers = sl[1].toInt(); if (media.ilayers <= 0) - media.ilayers = 1; + media.ilayers = 1; + } else if (sl[0].contains("GB per Layer", Qt::CaseInsensitive)) { + media.gbpl = sl[1]; + media.igbpl = sl[1].toInt(); + if (media.igbpl <= 0) + media.igbpl = 25; } else if (sl[0].contains("Protection", Qt::CaseInsensitive)) { media.prot = sl[1]; } else if (sl[0].contains("Regions", Qt::CaseInsensitive)) { diff --git a/gui/src/qpxgraph.cpp b/gui/src/qpxgraph.cpp index db523d4..104b5c5 100644 --- a/gui/src/qpxgraph.cpp +++ b/gui/src/qpxgraph.cpp @@ -23,15 +23,15 @@ #include -#define SHOW_P95ERRC +//#define SHOW_P95ERRC //#define SHOW_P95JB #define MARGIN_DEFL 40 #define MARGIN_DEFR 40 #define MARGIN_DEFB 18 -#define GRID_STYLE Qt::DotLine -//#define GRID_STYLE Qt::DashLine +//#define GRID_STYLE Qt::DotLine +#define GRID_STYLE Qt::DashLine class IntList : public QList { @@ -307,7 +307,7 @@ void QPxGraph::drawGraph(QPainter *p, QSize s, device *dev, int ttype, const QRe HscaleLBA = (1<<19) * 5 * dev->media.ilayers/sg.width(); Vscale1X = Vscale * 3; } else if (dev->media.type.startsWith("BD")) { - HscaleLBA = (1<<19) * 25 * dev->media.ilayers/sg.width(); + HscaleLBA = (1<<19) * dev->media.igbpl * dev->media.ilayers/sg.width(); Vscale1X = Vscale * 4; } @@ -516,7 +516,7 @@ void QPxGraph::drawErrc(QPainter* p, const QSize& s, device *dev, const QRect&) if (x!=xo || i==(dev->testData.errc.size()-1)) { // min-max p->setPen(QPen(*settings->col_errc.raw[e], 1)); - p->drawLine(xo, errc2h(s.height(), min), + p->drawLine(xo, errc2h(s.height(), 0), xo, errc2h(s.height(), max)); // P=0.95 @@ -866,7 +866,7 @@ void QPxGraph::drawGrid(QPainter* p, const QSize& s, device *dev, int ttype) GBperLayer = 5; } else if (dev->media.type.startsWith("BD")) { isCD = 0; - GBperLayer = 25; + GBperLayer = dev->media.igbpl; } if (isCD) { diff --git a/lib/qpxtransport/include/qpx_mmc.h b/lib/qpxtransport/include/qpx_mmc.h index 61a84c7..34538d6 100644 --- a/lib/qpxtransport/include/qpx_mmc.h +++ b/lib/qpxtransport/include/qpx_mmc.h @@ -144,6 +144,7 @@ typedef struct { uint8_t disc_size; // indicates 120/80mm disc uint8_t polarity; // Push-Pull polarity flags per layer for BD (indicates HtL or LtH) uint8_t layers; // Layers num (!CD) + uint8_t gbpl; // Layers num (!CD) int sectsize; int32_t capacity; // Recorded capacity in sectors msf capacity_msf; diff --git a/lib/qpxtransport/qpx_mmc.cpp b/lib/qpxtransport/qpx_mmc.cpp index d2f2dbd..ebccca1 100644 --- a/lib/qpxtransport/qpx_mmc.cpp +++ b/lib/qpxtransport/qpx_mmc.cpp @@ -2316,13 +2316,21 @@ int determine_disc_type(drive_info* drive) { } else if (drive->media.type & DISC_BD) { drive->rd_buf[4]=0; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; - drive->cmd[7] = 0;//0x11; //dvd_dash; - drive->cmd[9] = 36; - drive->cmd[11] = 0; + drive->cmd[1] = 1; + drive->cmd[7] = 0; + drive->cmd[9] = 66; + + if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,36))) if (!drive->silent) sperror ("READ_DVD_STRUCTURE",drive->err); drive->media.book_type = 0; - drive->media.layers = 1 + ((drive->rd_buf[6] & 0x60) >> 5); + drive->media.layers = 0 + ((drive->rd_buf[16] & 0xF0) >> 4); + if ((drive->rd_buf[17] & 0x0F) == 0) drive->media.gbpl = 25; + else if ((drive->rd_buf[17] & 0x0F) == 1) drive->media.gbpl = 25; + else if ((drive->rd_buf[17] & 0x0F) == 2) drive->media.gbpl = 27; + else if ((drive->rd_buf[17] & 0x0F) == 5) drive->media.gbpl = 33; + + read_mediaid_bd(drive); if (!drive->silent) printf("** MID: '%s'\n",drive->media.MID); } @@ -2691,7 +2699,10 @@ int set_cd_speed(drive_info* drive) { drive->cmd[11] = 0; if ((drive->err=drive->cmd.transport(NONE,NULL,0) )) { // if (drive->err != 0x23A02) drive->capabilities&=(NCAP_SET_CD_SPEED); - if (!drive->silent) sperror ("SET_CD_SPEED",drive->err); return (drive->err); + if (!drive->silent) { + sperror ("SET_CD_SPEED",drive->err); + return (drive->err); + } } return 0; } @@ -3119,7 +3130,10 @@ int plextor_px755_get_auth_code(drive_info* dev, unsigned char* auth_code) { if (!dev->silent) sperror ("PLEXTOR_PX755_GET_AUTH_CODE",dev->err); return dev->err;} if (!dev->silent) { printf("** Get PX755 auth: "); - for (int i=0; i<16; i++) printf("0x%02X ",dev->rd_buf[i]&0xFF); printf("\n"); + for (int i=0; i<16; i++) { + printf("0x%02X ",dev->rd_buf[i]&0xFF); + printf("\n"); + } } return 0; } diff --git a/plugins/liteon/qscan_plugin.h b/plugins/liteon/qscan_plugin.h index 75811fa..6764f26 100644 --- a/plugins/liteon/qscan_plugin.h +++ b/plugins/liteon/qscan_plugin.h @@ -112,14 +112,13 @@ static const drivedesclist drivelist = { "SONY ", DEV_LITEON, "DVD RW DW-Q58A", LTN_SDVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-Q60A", LTN_SDVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, - + { "HL-DT-ST", DEV_LITEON, "BD-RE WH16NS58 ", LTN_BDR, CHK_ERRC_CD | CHK_ERRC_DVD | CHK_ERRC_BD }, { "", 0, "", 0} }; static const drivedesclist blacklist = { { "TEAC ", DEV_TEAC, "CD-W552E", 0 }, - { "HL-DT-ST", DEV_LG, "", 0 }, { "TSSTcorp", DEV_TSST, "", 0 }, { "", 0, "", 0}