Skip to content

Commit

Permalink
ArtKar's mod
Browse files Browse the repository at this point in the history
  • Loading branch information
artkar0 committed Mar 1, 2019
1 parent 21828c2 commit 1213b3a
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 18 deletions.
7 changes: 7 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion console/qscan/qscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion console/qscan/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

2 changes: 2 additions & 0 deletions gui/include/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ struct MediaInfo {
QString mid;
QString layers;
int ilayers;
QString gbpl;
int igbpl;
QString prot;
QString regions;

Expand Down
2 changes: 1 addition & 1 deletion gui/include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

10 changes: 9 additions & 1 deletion gui/src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = "-";
Expand All @@ -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)) {
Expand Down
12 changes: 6 additions & 6 deletions gui/src/qpxgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

#include <sys/time.h>

#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<int>
{
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions lib/qpxtransport/include/qpx_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
26 changes: 20 additions & 6 deletions lib/qpxtransport/qpx_mmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions plugins/liteon/qscan_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 1213b3a

Please sign in to comment.