qpxtool-0.7.1_002/0000755000175000001440000000000011353430602013053 5ustar shultzusersqpxtool-0.7.1_002/gui/0000755000175000001440000000000011352127612013642 5ustar shultzusersqpxtool-0.7.1_002/gui/moc/0000755000175000001440000000000011352127612014420 5ustar shultzusersqpxtool-0.7.1_002/gui/obj/0000755000175000001440000000000011352127612014414 5ustar shultzusersqpxtool-0.7.1_002/gui/src/0000755000175000001440000000000011352127612014431 5ustar shultzusersqpxtool-0.7.1_002/gui/src/progresswidget.cpp0000644000175000001440000000453111352117770020214 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include "progresswidget.h" ProgressWidget::ProgressWidget(int iblocks, int ishown, QWidget *p) :QWidget(p, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) { QPoint offs = p->mapToGlobal( p->rect().topLeft() ); blocks = iblocks; if (ishown>=blocks) shown = blocks-1; else shown = ishown; idx = 0; dir = DirectionBoth; dir2 = 0; setGeometry(offs.x() + p->width()/2-150, offs.y() + p->height()/2-30, 300, 60); setMinimumSize(300,60); setMaximumSize(300,60); } ProgressWidget::~ProgressWidget() { } void ProgressWidget::step() { switch (dir) { case DirectionForward: idx++; if ((idx+shown) > blocks) idx=0; break; case DirectionBackward: idx--; if (idx < 0) idx=blocks-shown; break; case DirectionBoth: if (!dir2) { if (idx+shown >= blocks) dir2=1; else idx++; } else { if (idx<=0) dir2=0; else idx--; } break; } update(); } void ProgressWidget::setDirection(ProgressWidget::Direction idir) { dir = idir; } void ProgressWidget::setText(QString t) { text = t; setWindowTitle(text); } void ProgressWidget::paintEvent(QPaintEvent*) { QPainter p(this); int blkw = (width() - 20) / blocks; int offs = 10 + (int)(blkw * ( idx + 0.1 )); p.setPen(QPen(palette().color(QPalette::Text),1)); p.drawRect(0,0,width()-1,height()-1); if (text.isEmpty()) { for (int i=0; i> 1 , (int)(blkw*0.8), (int)(blkw*0.8), QBrush(palette().color(QPalette::Highlight))); } else { p.setPen(QPen(palette().color(QPalette::Text),1)); QFont f = p.font(); p.setFont(f); p.drawText(0,0, width(), height()>>1, Qt::AlignHCenter | Qt::AlignVCenter, text); for (int i=0; i> 1, (int)(blkw*0.8), (int)(blkw*0.8), QBrush(palette().color(QPalette::Highlight))); } } qpxtool-0.7.1_002/gui/src/pref_colors.cpp0000644000175000001440000002670611334746216017474 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include #include #include "pref_colors.h" #include prefColors::prefColors(QPxSettings *iset, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { QAction *tact; #ifndef QT_NO_DEBUG qDebug("STA: prefColors()"); #endif set = iset; QFrame *f; int idx=0; layout = new QGridLayout(this); layout->setMargin(0); layout->setSpacing(3); lc_bg = new ColorLabel(set->col_bg, tr("Background"), 1, this); layout->addWidget(lc_bg,idx,0); lc_grid = new ColorLabel(set->col_grid, tr("Grid"), 1, this); layout->addWidget(lc_grid,idx,1); idx++; f = new QFrame(this); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(f,idx,0,1,2); idx++; lc_rspeed = new ColorLabel(set->col_rspeed, tr("Read Speed"), 1, this); layout->addWidget(lc_rspeed,idx,0); lc_wspeed = new ColorLabel(set->col_wspeed, tr("Write Speed"), 1, this); layout->addWidget(lc_wspeed,idx,1); idx++; f = new QFrame(this); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(f,idx,0,1,2); idx++; lc_jitter = new ColorLabel(set->col_jitter, tr("Jitter"), 1, this); layout->addWidget(lc_jitter,idx,0); lc_asymm = new ColorLabel(set->col_asymm, tr("Asymmetry"), 1, this); layout->addWidget(lc_asymm,idx,1); idx++; f = new QFrame(this); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(f,idx,0,1,2); idx++; lc_errc[0] = new ColorLabel(*set->col_errc.raw[0], "BLER", 1, this); layout->addWidget(lc_errc[0],idx,0); lc_errc[4] = new ColorLabel(*set->col_errc.raw[4], "E12/POE", 1, this); layout->addWidget(lc_errc[4],idx,1); idx++; lc_errc[1] = new ColorLabel(*set->col_errc.raw[1], "E11/PIE", 1, this); layout->addWidget(lc_errc[1],idx,0); lc_errc[5] = new ColorLabel(*set->col_errc.raw[5], "E22/POsum8", 1, this); layout->addWidget(lc_errc[5],idx,1); idx++; lc_errc[2] = new ColorLabel(*set->col_errc.raw[2], "E21/PIsum8", 1, this); layout->addWidget(lc_errc[2],idx,0); lc_errc[6] = new ColorLabel(*set->col_errc.raw[6], "E32/POF", 1, this); layout->addWidget(lc_errc[6],idx,1); idx++; lc_errc[3] = new ColorLabel(*set->col_errc.raw[3], "E31/PIF", 1, this); layout->addWidget(lc_errc[3],idx,0); lc_errc[7] = new ColorLabel(*set->col_errc.raw[7], "UNCR", 1, this); layout->addWidget(lc_errc[7],idx,1); idx++; f = new QFrame(this); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(f,idx,0,1,2); idx++; lc_fe = new ColorLabel(set->col_fe, tr("Focus Errors"), 1, this); layout->addWidget(lc_fe,idx,0); lc_te = new ColorLabel(set->col_te,tr("Tracking errors"), 1, this); layout->addWidget(lc_te,idx,1); idx++; f = new QFrame(this); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(f,idx,0,1,2); idx++; lc_tapit = new ColorLabel(set->col_tapit, "TA pits", 1, this); layout->addWidget(lc_tapit,idx,0); lc_taland = new ColorLabel(set->col_taland,"TA lands", 1, this); layout->addWidget(lc_taland,idx,1); idx++; layout->setRowStretch(idx, 10); idx++; f = new QFrame(this); f->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(f,idx,0,1,2); idx++; loadPresets(); pb_preset = new QPushButton(tr("Presets"),this); // pb_preset->setFlat(true); menu_preset = new QMenu(this); act_default = menu_preset->addAction(tr("Default"), this, SLOT(usePreset())); menu_preset->addSeparator(); for (int i=0; iaddAction(presets[i].name, this, SLOT(usePreset())); act_presets.append(tact); } pb_preset->setMenu(menu_preset); e_preset = new QLineEdit(this); e_preset->setMinimumWidth(120); e_preset->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); pb_add = new QPushButton(QIcon(":images/add.png"),"",this); pb_del = new QPushButton(QIcon(":images/x.png"),"",this); pb_replace = new QPushButton(QIcon(":images/save.png"),"",this); connect(pb_add, SIGNAL(clicked()), this, SLOT(addPreset())); connect(pb_del, SIGNAL(clicked()), this, SLOT(delPreset())); connect(pb_replace, SIGNAL(clicked()), this, SLOT(replacePreset())); connect(e_preset, SIGNAL(textChanged(QString)), this, SLOT(presetNameValidate(QString))); pb_add->setEnabled(false); pb_del->setEnabled(false); pb_replace->setEnabled(false); layout_presets = new QHBoxLayout(); layout->addLayout(layout_presets, idx, 0, 1, 2); layout_presets->addWidget(pb_preset); layout_presets->addWidget(e_preset); layout_presets->addWidget(pb_replace); layout_presets->addWidget(pb_add); layout_presets->addWidget(pb_del); #ifndef QT_NO_DEBUG qDebug("END: prefColors()"); #endif } prefColors::~prefColors() { #ifndef QT_NO_DEBUG qDebug("STA: ~prefColors()"); #endif savePresets(); set->col_bg = lc_bg->color(); set->col_bginv = QColor( (~set->col_bg.red()) & 0xFF, (~set->col_bg.green()) & 0xFF, (~set->col_bg.blue()) & 0xFF ); set->col_grid = lc_grid->color(); set->col_rspeed = lc_rspeed->color(); set->col_wspeed = lc_wspeed->color(); for (int i=0;i<8;i++) *set->col_errc.raw[i] = lc_errc[i]->color(); set->col_jitter = lc_jitter->color(); set->col_asymm = lc_asymm->color(); set->col_fe = lc_fe->color(); set->col_te = lc_te->color(); set->col_tapit = lc_tapit->color(); set->col_taland = lc_taland->color(); #ifndef QT_NO_DEBUG qDebug("END: ~prefColors()"); #endif } void prefColors::addPreset() { QAction *act; colorSet newSet; newSet.name = e_preset->text(); newSet.bg = lc_bg->color(); newSet.grid = lc_grid->color(); newSet.rspeed = lc_rspeed->color(); newSet.wspeed = lc_wspeed->color(); for (int i=0;i<8;i++) newSet.errc[i] = lc_errc[i]->color(); newSet.jitter = lc_jitter->color(); newSet.asymm = lc_asymm->color(); newSet.fe = lc_fe->color(); newSet.te = lc_te->color(); newSet.tapit = lc_tapit->color(); newSet.taland = lc_taland->color(); act = menu_preset->addAction(newSet.name, this, SLOT(usePreset())); presets.append(newSet); act_presets.append(act); presetNameValidate(newSet.name); } void prefColors::delPreset() { QString name = e_preset->text(); QAction *act; int idx = -1; for (int p=0; idx<0 && premoveAction(act); delete act; presetNameValidate(name); } void prefColors::replacePreset() { QString name = e_preset->text(); colorSet *newSet; int idx = -1; for (int p=0; idx<0 && pname = e_preset->text(); newSet->bg = lc_bg->color(); newSet->grid = lc_grid->color(); newSet->rspeed = lc_rspeed->color(); newSet->wspeed = lc_wspeed->color(); for (int i=0;i<8;i++) newSet->errc[i] = lc_errc[i]->color(); newSet->jitter = lc_jitter->color(); newSet->asymm = lc_asymm->color(); newSet->fe = lc_fe->color(); newSet->te = lc_te->color(); newSet->tapit = lc_tapit->color(); newSet->taland = lc_taland->color(); } void prefColors::presetNameValidate(QString name) { int idx = -1; if (name.isEmpty() || name == "Default") { pb_add->setEnabled(false); pb_del->setEnabled(false); pb_replace->setEnabled(false); return; } for (int p=0; idx<0 && psetEnabled( (idx<0) ); pb_del->setEnabled( (idx>=0) ); pb_replace->setEnabled( (idx>=0) ); } void prefColors::usePreset() { int idx=-1; QAction *act = (QAction*) sender(); const colorSet *preset; colorSet newSet; if (act == act_default) { preset = &defColors; e_preset->setText(preset->name); #ifndef QT_NO_DEBUG qDebug() << "Preset: default"; #endif } else { for (int p=0; psetText(preset->name); #ifndef QT_NO_DEBUG qDebug() << "Preset #" << idx << ":" << preset->name; #endif } lc_bg->setColor(preset->bg); lc_grid->setColor(preset->grid); lc_rspeed->setColor(preset->rspeed); lc_wspeed->setColor(preset->wspeed); for (int i=0;i<8;i++) lc_errc[i]->setColor(preset->errc[i]); lc_jitter->setColor(preset->jitter); lc_asymm->setColor(preset->asymm); lc_fe->setColor(preset->fe); lc_te->setColor(preset->te); lc_tapit->setColor(preset->tapit); lc_taland->setColor(preset->taland); } void prefColors::loadPresets() { QSettings *settings; QStringList list; colorSet newSet; #ifndef QT_NO_DEBUG qDebug("Loading color presets..."); #endif // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); settings->beginGroup("/colors"); list = settings->value("presets_list", 0).toStringList(); for (int p=0; pbeginGroup("/preset_"+newSet.name); newSet.bg = settings->value("graph_bg", defColors.bg).toInt(); newSet.grid = settings->value("graph_grid", defColors.grid).toInt(); newSet.rspeed = settings->value("rspeed", defColors.rspeed).toInt(); newSet.wspeed = settings->value("wspeed", defColors.wspeed).toInt(); for(int i=0; i<8; i++) newSet.errc[i] = settings->value(QString("errc%1").arg(i), defColors.errc[i]).toInt(); newSet.jitter = settings->value("jitter", defColors.jitter).toInt(); newSet.asymm = settings->value("asymm", defColors.asymm).toInt(); newSet.fe = settings->value("fe", defColors.fe).toInt(); newSet.te = settings->value("te", defColors.te).toInt(); newSet.tapit = settings->value("ta_pit", defColors.tapit).toInt(); newSet.taland = settings->value("ta_land", defColors.taland).toInt(); settings->endGroup(); presets.append(newSet); } settings->endGroup(); delete settings; } void prefColors::savePresets() { QSettings *settings; QStringList list; #ifndef QT_NO_DEBUG qDebug("Saving color presets..."); #endif // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); settings->beginGroup("/colors"); for (int p=0; pbeginGroup("/preset_"+presets[p].name); settings->setValue("graph_bg", presets[p].bg.rgb()); settings->setValue("graph_grid", presets[p].grid.rgb()); settings->setValue("rspeed", presets[p].rspeed.rgb()); settings->setValue("wspeed", presets[p].wspeed.rgb()); for(int i=0; i<8; i++) settings->setValue(QString("errc%1").arg(i), presets[p].errc[i].rgb()); settings->setValue("jitter", presets[p].jitter.rgb()); settings->setValue("asymm", presets[p].asymm.rgb()); settings->setValue("fe", presets[p].fe.rgb()); settings->setValue("te", presets[p].te.rgb()); settings->setValue("ta_pit", presets[p].tapit.rgb()); settings->setValue("ta_land", presets[p].taland.rgb()); settings->endGroup(); } settings->setValue("presets_list", list); settings->endGroup(); delete settings; } qpxtool-0.7.1_002/gui/src/hostedit_dialog.cpp0000644000175000001440000000411011202252207020264 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include "hostedit_dialog.h" hostEditDialog::hostEditDialog(QString host, int port, QWidget* p, Qt::WindowFlags f) : QDialog(p,f) { setWindowTitle(tr("Add host")); layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); l_host = new QLabel(tr("Host:"), this); layout->addWidget(l_host, 0, 0); e_host = new QLineEdit(this); e_host->setText(host); // e_host->setInputMask("000.000.000.000; "); layout->addWidget(e_host, 0, 1, 1, 2); l_port = new QLabel(tr("Port:"), this); layout->addWidget(l_port, 1, 0); e_port = new QSpinBox(this); e_port->setMinimum(1); e_port->setMaximum(65535); e_port->setValue(port); layout->addWidget(e_port, 1, 1); bdef = new QPushButton(this); bdef->setMaximumSize(22,22); bdef->setIcon(QIcon(":images/edit-undo.png")); layout->addWidget(bdef, 1, 2); bbox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal , this); layout->addWidget(bbox, 2, 1, 1, 2); layout->setColumnStretch(0,2); layout->setColumnStretch(1,20); layout->setColumnStretch(2,1); connect(e_host, SIGNAL(textChanged(QString&)), this, SLOT(hostChanged(QString&))); connect(bdef, SIGNAL(clicked()), this, SLOT(setPortDfl())); connect(bbox, SIGNAL(accepted()), this, SLOT(accept())); connect(bbox, SIGNAL(rejected()), this, SLOT(reject())); } hostEditDialog::~hostEditDialog() { } void hostEditDialog::setPortDfl() { e_port->setValue(46660); } void hostEditDialog::hostChanged(QString& h) { QPushButton *pb = bbox->button(QDialogButtonBox::Ok); if (!pb) return; pb->setEnabled(!h.isEmpty()); } qpxtool-0.7.1_002/gui/src/mcapwidget.cpp0000644000175000001440000000462411157456307017300 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include "mcapwidget.h" #define MAX_ICON_SIZE 16 MediaCapWidget::MediaCapWidget(QString itext, bool tri, quint64 df, QWidget *p, Qt::WindowFlags f) : QWidget(p,f) { tristate = tri; text = itext; cf = df; rd=0, wr=0; setMinimumSize(128, MAX_ICON_SIZE+4); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); }; MediaCapWidget::~MediaCapWidget() {}; void MediaCapWidget::setText(QString itext) { text=itext; update(); }; QSize MediaCapWidget::sizeHint() const { return QSize( MAX_ICON_SIZE + 20 + fontMetrics().width(text), MAX_ICON_SIZE+2); } void MediaCapWidget::setR(quint64 r) { if (!tristate) return; rd= ((cf & r)); setRW(); }; void MediaCapWidget::setW(quint64 w) { if (!tristate) return; wr= ((cf & w)); setRW(); }; void MediaCapWidget::setRW() { if (wr) { icon.load(":images/cdwriter.png"); //icon = QImage(":images/cdwriter.png"); } else if (rd) { icon.load(":images/disc.png"); //icon = QImage(":images/disc.png"); } else { #ifdef SHOW_X icon.load(":images/x.png"); //icon = QImage(":images/x.png"); #else icon = QImage(); //icon.clear(); #endif } icon = icon.scaled( QSize(MAX_ICON_SIZE, MAX_ICON_SIZE), Qt::KeepAspectRatio, Qt::SmoothTransformation ); update(); }; void MediaCapWidget::setCap(quint64 s) { if (tristate) return; rd= (( cf & s)); if (rd) { icon.load(":images/ok.png"); icon = QImage(":images/ok.png"); } else { #ifdef SHOW_X icon.load(":images/x.png"); //icon = QImage(":images/x.png"); #else icon = QImage(); //icon.clear(); #endif } icon = icon.scaled( QSize(MAX_ICON_SIZE, MAX_ICON_SIZE), Qt::KeepAspectRatio, Qt::SmoothTransformation ); update(); }; void MediaCapWidget::clear() { icon = QImage(); //icon.clear(); update(); }; void MediaCapWidget::paintEvent(QPaintEvent*) { QPainter p(this); if (cf) p.drawImage( 4, ((height()-icon.height()) >> 1) + 2, icon); p.drawText(MAX_ICON_SIZE + 9, 4, width()-MAX_ICON_SIZE-13, height()-4, Qt::AlignLeft | Qt::AlignVCenter, text); }; qpxtool-0.7.1_002/gui/src/images_list.cpp0000644000175000001440000001016611352122567017445 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include "images_list.h" #include ImagesList::ImagesList(int iminW, QWidget *parent, ListDir orient) :QScrollArea(parent) { #ifdef __images_list_debug qDebug("ImagesList()"); #endif iconw = 64; iconh = 64; minW = qMax(iconw+4, iminW); winit(orient); } ImagesList::ImagesList(int iminW, QSize isize, QWidget *parent, ListDir orient) :QScrollArea(parent) { #ifdef __images_list_debug qDebug("ImagesList()"); #endif iconw = isize.width(); iconh = isize.height(); minW = qMax(iconw+4, iminW); winit(orient); } ImagesList::ImagesList(int iminW, int iw, int ih, QWidget *parent, ListDir orient) :QScrollArea(parent) { #ifdef __images_list_debug qDebug("ImagesList()"); #endif iconw = iw; iconh = ih; minW = qMax(iconw+4, iminW); winit(orient); } void ImagesList::winit(ListDir orient) { if (iconw<0) iconw=0; if (iconh<0) iconh=0; current = -1; cwidget = new QWidget(this); // cwidget->resize(80,700); setWidget(cwidget); if (orient == Vertical) { setMaximumWidth(minW + 30); setMinimumWidth(minW + 30); setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding)); clayout = new QVBoxLayout(cwidget); } else { setMaximumHeight(iconh + 26); setMinimumHeight(iconh + 26); setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); clayout = new QHBoxLayout(cwidget); } clayout->setMargin(1); clayout->setSpacing(4); cwidget->setLayout(clayout); }; ImagesList::~ImagesList() { #ifdef __images_list_debug qDebug("~ImagesList()"); #endif clear_img(); }; int ImagesList::addLabel(QString label, QImage image, int imgid) { #ifndef QT_NO_DEBUG qDebug("Adding ImageLabel..."); #endif ImageLabel* l; int idx = images_l.size(); //cwidget->resize(70, images_l.size() * 94 - 4); cwidget->resize(minW+8, (idx+1) * (iconh+30) - 4); l = new ImageLabel( minW, iconw,iconh, label, image.scaled(iconw, iconh, Qt::KeepAspectRatio, Qt::SmoothTransformation), (imgid < 0) ? idx : imgid, cwidget ); images_l.append(l); clayout->addWidget(l); if (current<0) current=0; QObject::connect(l, SIGNAL(selected(int)), this, SLOT(clicked(int)) ); QObject::connect(this, SIGNAL(selected(int)), l, SLOT(select(int)) ); return idx; }; void ImagesList::clicked(int idx) { current = idx; // for (int i=0; iselect(idx); emit selected(idx); }; void ImagesList::clear() { clear_img(); // hide(); }; void ImagesList::clear_img() { // return; ImageLabel *l; int s = images_l.size(); #ifdef __images_list_debug qDebug("ImagesView::clear_img()"); #endif for (int i=0 ; i < s ; i++) { #ifdef __images_list_debug qDebug(QString("Removing img #%1").arg(i)); #endif l = images_l.takeFirst(); l->disconnect(); clayout->removeWidget(l); delete(l); } images_l.clear(); // cwidget->adjustSize(); } void ImagesList::keyPressEvent(QKeyEvent* e) { #ifndef QT_NO_DEBUG // qDebug("ImagesList::keyPressEvent()"); #endif switch (e->key()) { case Qt::Key_Up: if (current>0) { current--; ensureWidgetVisible(images_l[current],0,0); emit selected(current); } e->accept(); break; case Qt::Key_Down: if (current<(images_l.size()-1)) { current++; ensureWidgetVisible(images_l[current],0,0); emit selected(current); } e->accept(); break; /* case Qt::Key_Home: e->accept(); current= (images_l.size()) ? 0 : -1; emit selected(current); break; case Qt::Key_End: e->accept(); current=images_l.size()-1; emit selected(current); break; */ case Qt::Key_Escape: QScrollArea::keyPressEvent(e); break; default: e->ignore(); } } qpxtool-0.7.1_002/gui/src/tab_fete.cpp0000644000175000001440000000663211334746266016731 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include "tab_fete.h" #include tabFETE::tabFETE(QPxSettings *iset, devlist *idev, QString iname, QWidget *p, Qt::WindowFlags fl) : GraphTab(iset, idev, iname, TEST_FT, p, fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabFETE()"); #endif layout_info = new QVBoxLayout(infow); layout_info->setMargin(0); layout_info->setSpacing(3); #ifdef __LEGEND_SHOW_SPEED pl_spd = new ColorLabel(QColor(Qt::black),"Speed", 0, infow); pl_spd->setMinimumSize(100,20); layout_info->addWidget(pl_spd); #endif pl_fmax = new ColorLabel(settings->col_fe, tr("FE max"), 0, infow); // pl_fmax->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_fmax->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); pl_fmax->setMinimumSize(80,20); layout_info->addWidget(pl_fmax); l_fmax = new QLabel(infow); l_fmax->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_fmax->setMinimumSize(80,22); layout_info->addWidget(l_fmax); pl_tmax = new ColorLabel(settings->col_te,tr("TE max"), 0, infow); // pl_tmax->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_tmax->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); pl_tmax->setMinimumSize(80,20); layout_info->addWidget(pl_tmax); l_tmax = new QLabel(infow); l_tmax->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_tmax->setMinimumSize(80,22); layout_info->addWidget(l_tmax); layout_info->addStretch(10); clear(); #ifndef QT_NO_DEBUG qDebug("END: tabFETE()"); #endif } tabFETE::~tabFETE() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabFETE()"); qDebug("END: ~tabFETE()"); #endif } /* void tabFETE::clear() { qDebug("tabFETE::clear()"); } */ void tabFETE::selectDevice() { #ifndef QT_NO_DEBUG qDebug("tabFETE::selectDevice()"); #endif device *dev = devices->current(); GraphTab::updateLast((int)dev->testData.ft_time, NULL, 1); updateSummary(); QObject::connect( dev, SIGNAL(doneMInfo(int)), this, SLOT(updateAll()) ); QObject::connect( dev, SIGNAL(block_FT()), this, SLOT(updateLast()) ); } void tabFETE::updateLast() { bool show; device *dev = devices->current(); GraphTab::updateLast((int)dev->testData.ft_time, &show); if (!show) return; updateSummary(); } void tabFETE::updateAll() { GraphTab::updateLast((int)devices->current()->testData.ft_time, NULL, 1); updateSummary(); } void tabFETE::updateLegend() { pl_fmax->setColor(settings->col_fe); pl_tmax->setColor(settings->col_te); } void tabFETE::updateGraph() { graph->update(); } void tabFETE::updateSummary() { device *dev = devices->current(); if (!dev->testData.jb.size()) { l_fmax->clear(); l_tmax->clear(); #ifdef FT_AVG l_favg->clear(); l_tavg->clear(); #endif return; } // setting values... l_fmax->setText(QString::number(dev->testData.ftMAX.fe,'f',2)); l_tmax->setText(QString::number(dev->testData.ftMAX.te,'f',2)); #ifdef FT_AVG l_favg->setText(QString::number(dev->testData.ftMAX.favg,'f',2)); l_tavg->setText(QString::number(dev->testData.ftMAX.tavg,'f',2)); #endif } qpxtool-0.7.1_002/gui/src/device.cpp0000644000175000001440000021532411336737617016421 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include "device.h" #include #include #include #ifndef QT_NO_DEBUG #include static int devcnt=0; #endif #if defined(_WIN32) #include //#if !defined(__MINGW32__) //#endif #endif #define RECALC_ON_LOAD 1 void ErrcADD(Errc *tot, const Errc& o) { for (int i=0; i<8; i++) if (o.raw.err[i] > 0) tot->raw.err[i] += o.raw.err[i]; }; void ErrcMAX(Errc *max, const Errc& o) { for (int i=0; i<8; i++) if (max->raw.err[i] < o.raw.err[i]) max->raw.err[i] = o.raw.err[i]; }; void CDErrcAVG(Errc *avg, Errc *tot, uint64_t blocks) { if (!blocks) blocks=1; for (int i=0; i<8; i++) avg->raw.err[i] = (float) tot->raw.err[i] / blocks; }; void DVDErrcAVG(Errc *avg, Errc *tot, uint64_t blocks) { avg->dvd.pie = (float) tot->dvd.pie / blocks; avg->dvd.pif = (float) tot->dvd.pif / blocks; avg->dvd.poe = (float) tot->dvd.poe / blocks; avg->dvd.pof = (float) tot->dvd.pof / blocks; avg->dvd.uncr = (float) tot->dvd.uncr / blocks; if (blocks >= 8) { avg->dvd.pi8 = (float) tot->dvd.pi8 / ( blocks >> 3); avg->dvd.po8 = (float) tot->dvd.po8 / ( blocks >> 3); } }; static device NullDev(NULL); /* * * Device List * */ devlist::devlist() : QList() { #ifndef QT_NO_DEBUG qDebug("* STA: devlist()"); #endif devidx=-1; #ifndef QT_NO_DEBUG qDebug("* END: devlist()"); #endif }; devlist::~devlist() { #ifndef QT_NO_DEBUG qDebug("* STA: ~devlist()"); #endif clear(); #ifndef QT_NO_DEBUG qDebug("* END: ~devlist()"); #endif }; int devlist::idx() { return devidx; }; void devlist::setIdx(int iidx) { if (iidx<0 || iidx>=size()) { devidx=-1; return; } devidx=iidx; }; void devlist::clear() { device *dev; while (size()) { dev = takeLast(); dev->stopWatcher(); delete dev; } devidx=-1; }; device* devlist::current() { if (devidx<0 || devidx>=size()) return &NullDev; return (*this)[devidx]; }; /* * * Device * */ device::device(QObject* p) : QObject(p) { #ifndef QT_NO_DEBUG qDebug() << "* STA: device(): " << this << " #"<< devcnt++ << " parent: "<< p; #endif preserveMediaInfo=0; running=0; type = DevtypeNone; host = ""; port = 0; info_set = 0; rpc_phase = -1; rpc_reg = -1; rpc_ch = -1; rpc_rst = -1; plextor_lock = 0; asdb.clear(); clearMinfo(); cap = 0; cap_rd = 0; cap_wr = 0; life_dn = -1; features.supported = 0; features.enabled = 0; features.grec = 1.0; features.vrec_cd_pwr = 0; features.vrec_cd_str = 0; features.vrec_dvd_pwr = 0; features.vrec_dvd_str = 0; features.tattoo_inner = 22; features.tattoo_outer = 54; features.sm_cd_rd = 0; features.sm_cd_wr = 0; features.sm_dvd_rd = 0; features.psm_cd_rd = 0; features.psm_cd_wr = 0; features.psm_dvd_rd = 0; features.as_mode = AS_MODE_AUTO; features.pioq_quiet = PIOQ_STD; autoupdate = 0; test_cap=0; test_req=0; tests = 0; ctest = 0; WT_simul = 1; tspeeds.rt = 1; tspeeds.wt = 1; tspeeds.errc = 1; tspeeds.jb = 1; tspeeds.ft = 1; io = new QPxIODevice(this); proc = NULL; sock = NULL; mwatcher = NULL; mutex = new QMutex(); io_mutex = new QMutex(); if (!p) { #ifndef QT_NO_DEBUG qDebug() << "device: NULL parent!"; #endif } else { connect(this, SIGNAL(doneMInfo(int)), p, SLOT(mediaUpdated(int))); connect(this, SIGNAL(process_started()), p, SLOT(process_started())); connect(this, SIGNAL(process_finished()), p, SLOT(process_finished())); connect(this, SIGNAL(process_progress()), p, SLOT(process_progress())); } #ifndef QT_NO_DEBUG qDebug("* END: device()"); #endif }; device::~device() { #ifndef QT_NO_DEBUG qDebug() << "* STA: ~device(): " << this << " #"<< --devcnt; #endif stopWatcher(); if (mwatcher) { delete mwatcher; } QTreeWidgetItem* item; #ifdef MINFO_TREE while (info_media.size()) { item = info_media.takeLast(); if (item) delete item; } /* if (running) { qDebug() << "device: waiting for child process..."; while (running) { msleep(100); } } */ #endif // mutex->unlock(); delete mutex; #ifndef QT_NO_DEBUG qDebug() << "* END: ~device()"; #endif }; bool device::isRunning() { return running; }; void device::clearMinfo() { QTreeWidgetItem* item; testData.clear(); // media.isCD = 0; // media.isDVD = 0; media.type = "-"; media.category = "-"; media.mid = "-"; media.erasable = "-"; media.layers = "-"; media.ilayers = 1; media.prot = "-"; media.regions = "-"; media.creads = 0; media.creadm = 0; media.creadmsf = ""; media.cfrees = 0; media.cfreem = 0; media.cfreemsf = ""; media.ctots = 0; media.ctotm = 0; media.ctotmsf = ""; media.dstate = "-"; media.sstate = "-"; media.writer = "-"; media.grec = 0.0; media.rspeeds.clear(); media.wspeedsd.clear(); media.wspeedsm.clear(); media.tdata_errc = 0; media.tspeeds_errc.clear(); media.tspeeds_jb.clear(); #ifdef MINFO_TREE while (info_media.size()) { item = info_media.takeLast(); if (item) delete item; } #endif }; bool device::start() { #ifndef QT_NO_DEBUG qDebug() << "STA: device::start(" << threadType << ")"; #endif if (!mutex->tryLock()) { #ifndef QT_NO_DEBUG qDebug() << "Device busy: " << id; qDebug() << "END: device::start()"; #endif return false; } stop=0; running=1; switch (threadType) { case threadDevice: case threadMedia: case threadGetFeatures: case threadGetASDB: case threadMQCK: case threadAScre: case threadDestruct: case threadTattoo: start_update_info(); break; case threadTest: next_test(); break; default: mutex->unlock(); #ifndef QT_NO_DEBUG qDebug() << "END: device::start()"; #endif running=0; return false; } #ifndef QT_NO_DEBUG qDebug() << "END: device::start()"; #endif return true; } bool device::start_update_info() { #ifndef QT_NO_DEBUG qDebug() << "STA: device::start_update_info(" << threadType << ")"; #endif if (threadType==threadMedia && !preserveMediaInfo) { clearMinfo(); // mwidget->update(); #warning !!! mwidget->clearMedia() call //mwidget->clearMedia(); } //if (devices.idx()<0 || devices.idx()>= devices.size() || (threadType!=infoDevice && threadType!=infoMedia)) { if (type == DevtypeNone) { goto update_info_err; } // if (threadType == infoDevice) { // // } if (proc) { delete proc; proc = NULL; } if (sock) { delete sock; sock = NULL; } QObject::connect(io, SIGNAL(readyReadLine()), this, SLOT(qscan_process_info())); if (type == DevtypeLocal) { #ifndef QT_NO_DEBUG qDebug() << "device: LOCAL"; #endif proc = new QProcess(this); #ifndef QT_NO_DEBUG qDebug() << "process created"; #endif io->setIODevice(proc); proc->setReadChannel(QProcess::StandardOutput); // QObject::connect(proc, SIGNAL(readyReadStandardOutput()), // this, SLOT(qscan_process_info())); switch (threadType) { case threadDevice: proc->start("qscan", QStringList() << "-d" << path << "-Ip"); break; case threadMedia: if (plugin.isEmpty()) { proc->start("qscan", QStringList() << "-d" << path << "-m"); } else { proc->start("qscan", QStringList() << "-d" << path << "--force-plugin" << plugin << "-m"); } break; case threadGetFeatures: proc->start("cdvdcontrol", QStringList() << "-d" << path << "-c"); break; case threadGetASDB: proc->start("cdvdcontrol", QStringList() << "-d" << path << "--as-list"); break; case threadMQCK: { QStringList cdvdopts; cdvdopts << "-d" << path; cdvdopts << "--mqck" << ((features.as_act_mode & ASMQCK_ADV) ? "advanced" : "quick"); cdvdopts << "--mqck-speed" << QString::number(features.as_mqckspd); #ifndef QT_NO_DEBUG qDebug() << cdvdopts; #endif proc->start("cdvdcontrol", cdvdopts ); } break; case threadAScre: { QStringList cdvdopts; cdvdopts << "-d" << path << "--as-create"; cdvdopts << ((features.as_act_mode & ASCRE_FULL) ? "f" : "q"); cdvdopts << ((features.as_act_mode & ASCRE_REPLACE) ? "r" : "a"); #ifndef QT_NO_DEBUG qDebug() << cdvdopts; #endif proc->start("cdvdcontrol", cdvdopts ); } break; case threadDestruct: proc->start("cdvdcontrol", QStringList() << "-d" << path << "--destruct" << (features.as_act_mode ? "full" : "quick")); break; case threadTattoo: proc->start("f1tattoo", QStringList() << "-d" << path << "--tattoo-raw" << features.tattoo_file); break; default: goto update_info_err; } if (!proc->waitForStarted(10000)) { #ifndef QT_NO_DEBUG qDebug("Can't start qscan!"); #endif goto update_info_err; } QObject::connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(qscan_callback_info())); #ifndef QT_NO_DEBUG qDebug("qscan (local) started"); #endif goto update_info_end; } else if (type == device::DevtypeTCP) { if ((threadType != threadDevice) && (threadType != threadMedia)) goto update_info_err; #ifndef QT_NO_DEBUG qDebug("device: TCP"); #endif sock = new QTcpSocket(this); #ifndef QT_NO_DEBUG qDebug("socket created"); #endif io->setIODevice(sock); // QObject::connect(sock, SIGNAL(readyRead()), // this, SLOT(qscan_process_info())); sock->connectToHost(host, port); if (!sock->waitForConnected(5000)) { #ifndef QT_NO_DEBUG qDebug("Unable to connect to host!"); #endif goto update_info_err; } sock->write("set dev=" + path.toLatin1() + "\n"); switch (threadType) { case threadDevice: sock->write("dinfo\n"); sock->write("close\n"); break; case threadMedia: sock->write("minfo\n"); sock->write("close\n"); break; default: goto update_info_err; } QObject::connect(sock, SIGNAL(disconnected()), this, SLOT(qscan_callback_info())); #ifndef QT_NO_DEBUG qDebug("qscan (TCP) started"); #endif goto update_info_end; } update_info_err: qscan_callback_info(); #ifndef QT_NO_DEBUG qDebug() << "END: device::start_update_info(" << threadType << ")"; #endif return false; update_info_end: #ifndef QT_NO_DEBUG qDebug() << "END: device::start_update_info(" << threadType << ")"; #endif return true; } void device::qscan_callback_info() { int xcode = 0; ThreadType ttype = threadType; #ifndef QT_NO_DEBUG qDebug() << "STA: device::qscan_callback_info() " << this; #endif io_mutex->lock(); QObject::disconnect(io, SIGNAL(readyReadLine()), this, SLOT(qscan_process_info())); if (type == DevtypeLocal) { // QObject::disconnect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), // this, SLOT(qscan_callback_info())); xcode = proc->exitCode(); #ifndef QT_NO_DEBUG qDebug() << "qscan (local) finished: " << xcode; #endif disconnect(proc); io->setIODevice(NULL); } else if (type == device::DevtypeTCP) { // QObject::disconnect(sock, SIGNAL(disconnected()), // this, SLOT(qscan_callback_info())); sock->disconnectFromHost(); #ifndef QT_NO_DEBUG qDebug("qscan (TCP) finished"); #endif disconnect(sock); io->setIODevice(NULL); } io_mutex->unlock(); threadType = threadNone; running=0; mutex->unlock(); nprocess = ""; emit process_finished(); switch (ttype) { case threadDevice: emit doneDInfo(xcode); break; case threadMedia: emit doneMInfo(xcode); break; case threadGetFeatures: emit doneGetFeatures(xcode); break; case threadGetASDB: emit doneGetASDB(xcode); break; default: break; } #ifndef QT_NO_DEBUG qDebug("END: device::qscan_callback_info()"); #endif } bool device::update_device_info() { if (running) return false; plugin_names.clear(); plugin_infos.clear(); threadType = threadDevice; return start(); } bool device::update_media_info() { #ifndef QT_NO_DEBUG qDebug("device::update_media_info()"); #endif if (running) return false; preserveMediaInfo = false; threadType = threadMedia; nprocess = tr("Updating media info..."); emit process_started(); return start(); } void device::clear_media_info() { #ifndef QT_NO_DEBUG qDebug("device::clear_media_info()"); #endif clearMinfo(); emit doneMInfo(0); } bool device::update_plugin_info() { if (running) return false; preserveMediaInfo = true; threadType = threadMedia; return start(); } bool device::getFeatures() { if (running) return false; threadType = threadGetFeatures; return start(); } bool device::getASDB() { if (running) return false; threadType = threadGetASDB; asdb.clear(); return start(); } bool device::startMqck() { if (running) return false; threadType = threadMQCK; return start(); } bool device::startAScre() { if (running) return false; threadType = threadAScre; return start(); } bool device::startDestruct() { if (running) return false; threadType = threadDestruct; return start(); } bool device::startTattoo() { if (running) return false; threadType = threadTattoo; return start(); } bool device::setFeature(int f, bool en) { int r=1; #ifndef QT_NO_DEBUG qDebug() << "device::setFeature: " << f << en; #endif if (!mutex->tryLock()) { #ifndef QT_NO_DEBUG qDebug() << "Device busy: " << id; #endif return false; } if (type == DevtypeLocal) { QStringList cdvdopts; pauseWatcher(); cdvdopts << "-d" << path; switch(f) { case FEATURE_LOEJ: if (en) { cdvdopts << "--load" << "--loej-immed"; } else { cdvdopts << "--eject" << "--loej-immed"; } break; case FEATURE_LOEJ_TOGGLE: cdvdopts << "--loej" << "--loej-immed"; break; case FEATURE_LOCK: if (en) { cdvdopts << "--lock"; } else { cdvdopts << "--unlock"; } break; case FEATURE_LOCK_TOGGLE: cdvdopts << "--lockt"; break; case FEATURE_POWEREC: cdvdopts << "--powerec"; cdvdopts << (en ? "on" : "off"); break; case FEATURE_HIDECDR: cdvdopts << "--hcdr"; cdvdopts << (en ? "on" : "off"); break; case FEATURE_SINGLESESSION: cdvdopts << "--sss"; cdvdopts << (en ? "on" : "off"); break; case FEATURE_SPEEDREAD: cdvdopts << "--spdread"; cdvdopts << (en ? "on" : "off"); break; case FEATURE_BITSETR: cdvdopts << "--bitset+r"; cdvdopts << (en ? "on" : "off"); break; case FEATURE_BITSETRDL: cdvdopts << "--bitset+rdl"; cdvdopts << (en ? "on" : "off"); break; case FEATURE_SIMULPLUS: cdvdopts << "--dvd+testwrite"; cdvdopts << (en ? "on" : "off"); break; default: mutex->unlock(); startWatcher(); return false; } #ifndef QT_NO_DEBUG qDebug() << cdvdopts.join(" "); #endif r = QProcess::execute("cdvdcontrol", cdvdopts); unpauseWatcher(); } else if (type == device::DevtypeTCP) { switch(f) { default: mutex->unlock(); return false; } } mutex->unlock(); return !!r; } bool device::setComplexFeature(int f, DevFeatures* data) { int r=1; #ifndef QT_NO_DEBUG qDebug() << "device::setComplexFeature: " << f; #endif if (!data) { #ifndef QT_NO_DEBUG qDebug() << "Data pointer is NULL"; #endif return 1; } if (!mutex->tryLock()) { qDebug() << "Device busy: " << id; return 1; } if (type == DevtypeLocal) { QStringList cdvdopts; cdvdopts << "-d" << path; switch(f) { case FEATURE_GIGAREC: if (data->enabled & FEATURE_GIGAREC) { cdvdopts << "--gigarec" << QString("%1").arg(data->grec, 3, 'f', 1); } else { cdvdopts << "--gigarec" << "off"; } break; case FEATURE_VARIREC_CD: if (data->enabled & FEATURE_VARIREC_CD) { cdvdopts << "--varirec-cd" << QString::number(data->vrec_cd_pwr); if (data->supported & FEATURE_VARIREC_CDEXT) { cdvdopts << "--varirec-cd-strategy" << QString::number(data->vrec_cd_str-1); } } else { cdvdopts << "--varirec-cd" << "off"; } break; case FEATURE_VARIREC_DVD: if (data->enabled & FEATURE_VARIREC_DVD) { cdvdopts << "--varirec-dvd" << QString::number(data->vrec_dvd_pwr); cdvdopts << "--varirec-dvd-strategy" << QString::number(data->vrec_dvd_str-1); } else { cdvdopts << "--varirec-dvd" << "off"; } break; case FEATURE_SECUREC: if (data->enabled & FEATURE_SECUREC) { cdvdopts << "--securec" << data->sr_pass; } else { cdvdopts << "--nosecurec"; } break; case FEATURE_SILENT: if (data->enabled & FEATURE_SILENT) { cdvdopts << "--silent" << "on"; cdvdopts << "--sm-cd-rd" << QString::number(data->sm_cd_rd); cdvdopts << "--sm-cd-wr" << QString::number(data->sm_cd_wr); if (cap_rd & DEVICE_DVD) { cdvdopts << "--sm-dvd-rd" << QString::number(data->sm_dvd_rd); // cdvdopts << "--sm-dvd-wr" << QString::number(data->sm_dvd_wr); } cdvdopts << "--sm-access" << (data->sm_access ? "fast" : "slow"); cdvdopts << "--sm-load" << QString::number(data->sm_trayl); cdvdopts << "--sm-eject" << QString::number(data->sm_traye); } else { cdvdopts << "--silent" << "off"; } if (data->sm_nosave) cdvdopts << "--sm-nosave"; break; case FEATURE_AS: switch (data->as_action) { case AS_ACTION_MODE: cdvdopts << "--as-mode"; switch (data->as_mode) { case AS_MODE_OFF: cdvdopts << "off"; break; case AS_MODE_AUTO: cdvdopts << "auto"; break; case AS_MODE_ON: cdvdopts << "on"; break; case AS_MODE_FORCED: cdvdopts << "forced"; break; default: mutex->unlock(); return 1; } break; case AS_ACTION_ACT: cdvdopts << "--as-on" << QString::number(data->as_idx); break; case AS_ACTION_DEACT: cdvdopts << "--as-off" << QString::number(data->as_idx); break; case AS_ACTION_DEL: cdvdopts << "--as-del" << QString::number(data->as_idx); break; case AS_ACTION_CLEAR: cdvdopts << "--as-clear"; break; default: mutex->unlock(); return 1; } break; case FEATURE_PIOQUIET: cdvdopts << "--pio-quiet"; switch(data->pioq_quiet) { case PIOQ_QUIET: cdvdopts << "quiet"; break; case PIOQ_STD: cdvdopts << "std"; break; case PIOQ_PERF: cdvdopts << "perf"; break; default: mutex->unlock(); return 1; } cdvdopts << "--pio-limit"; cdvdopts << ((features.enabled & FEATURE_PIOLIMIT) ? "on" : "off"); if (data->pioq_nosave) cdvdopts << "--pio-nosave"; break; default: mutex->unlock(); return 1; } #ifndef QT_NO_DEBUG qDebug() << cdvdopts.join(" "); #endif r = QProcess::execute("cdvdcontrol", cdvdopts); } else if (type == device::DevtypeTCP) { switch(f) { default: mutex->unlock(); return 1; } } mutex->unlock(); return !!r; } bool device::start_tests() { if (running) return false; threadType = threadTest; tests = test_req; return start(); } bool device::stop_tests() { if (!running) return false; tests = 0; if (type == DevtypeLocal) { if (!proc) return false; Q_PID pid = proc->pid(); #if defined(__unix) || defined(__unix__) kill(pid, SIGINT); #elif defined(_WIN32) TerminateProcess(pid, 0); #endif } else if (type == device::DevtypeTCP) { if (!sock) return false; #ifndef QT_NO_DEBUG qDebug("Scan terminate not implemented on network devices"); #endif sock->disconnectFromHost(); } return true; } bool device::next_test() { ctest=0; QString stest; #ifndef QT_NO_DEBUG qDebug("STA: device::next_test()"); #endif pprocess = 0.0; if (tests & TEST_RT) { ctest = TEST_RT; stest = "rt"; nprocess = tr("Read Transfer"); testData.clearRT(); test_spd = tspeeds.rt; } else if (tests & TEST_WT) { ctest = TEST_WT; stest = "wt"; nprocess = tr("Write Transfer"); testData.clearWT(); test_spd = tspeeds.wt; } else if (tests & TEST_ERRC) { ctest = TEST_ERRC; stest = "errc"; nprocess = tr("Error Correction"); testData.clearErrc(); test_spd = tspeeds.errc; } else if (tests & TEST_JB) { ctest = TEST_JB; stest = "jb"; nprocess = tr("Jitter/Asymmetry"); testData.clearJB(); test_spd = tspeeds.jb; } else if (tests & TEST_FT) { ctest = TEST_FT; stest = "ft"; nprocess = tr("Focus/Tracking"); testData.clearFT(); test_spd = tspeeds.ft; } else if (tests & TEST_TA) { ctest = TEST_TA; stest = "ta"; nprocess = tr("Time Analyser"); testData.clearTA(); // test_spd = tspeeds.ta; } tests &= ~ctest; if (!ctest) { threadType = threadNone; running=0; mutex->unlock(); #ifndef QT_NO_DEBUG qDebug("END: device::next_test(): to tests remaining"); #endif // nprocess = ""; emit testsDone(); return false; } #ifndef QT_NO_DEBUG qDebug() << "device::next_test(): starting test " << stest << " at speed " << test_spd; #endif /* run_test("rt"); run_test("errc"); run_test("jb"); run_test("ft"); run_test("ta"); */ if (type == DevtypeNone) { goto next_test_err; } if (proc) { delete proc; proc = NULL; } if (sock) { delete sock; sock = NULL; } emit process_started(); QObject::connect(io, SIGNAL(readyReadLine()), this, SLOT(qscan_process_test())); if (type == DevtypeLocal) { QStringList qopts; #ifndef QT_NO_DEBUG qDebug("device: LOCAL"); #endif proc = new QProcess(this); #ifndef QT_NO_DEBUG qDebug("process created"); #endif io->setIODevice(proc); proc->setReadChannel(QProcess::StandardOutput); // QObject::connect(proc, SIGNAL(readyReadStandardOutput()), // this, SLOT(qscan_process_test())); qopts << "-d" << path << "-t" << stest << "-s" << QString::number(test_spd); if (stest == "wt" && !WT_simul) qopts << "-W"; if (stest != "rt" && stest != "wt" && !plugin.isEmpty()) { qopts << "--force-plugin" << plugin; } #if (!defined(QT_NO_DEBUG) && 0) for (int i=0;istart("qscan", qopts); if (!proc->waitForStarted(10000)) { #ifndef QT_NO_DEBUG qDebug("Can't run qscan!"); #endif goto next_test_err; } QObject::connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(qscan_callback_test())); gettimeofday(&timeSta, NULL); #ifndef QT_NO_DEBUG qDebug("qscan (local) started"); #endif goto next_test_end; } else if (type == device::DevtypeTCP) { #ifndef QT_NO_DEBUG qDebug("device: TCP"); #endif sock = new QTcpSocket(this); #ifndef QT_NO_DEBUG qDebug("socket created"); #endif io->setIODevice(sock); // QObject::connect(sock, SIGNAL(readyRead()), // this, SLOT(qscan_process_test())); sock->connectToHost(host, port); if (!sock->waitForConnected(5000)) { #ifndef QT_NO_DEBUG qDebug("Unable to connect to host!"); #endif goto next_test_err; } QObject::connect(sock, SIGNAL(disconnected()), this, SLOT(qscan_callback_test())); sock->write("set dev=" + path.toLatin1() + "\n"); sock->write("set test=" + stest.toLatin1() + "\n"); sock->write("set speed=" + QString::number(test_spd).toLatin1() + "\n"); if (stest == "wt") sock->write("set simul=" + QString::number(WT_simul).toLatin1() + "\n"); sock->write("run\n"); sock->write("close\n"); gettimeofday(&timeSta, NULL); #ifndef QT_NO_DEBUG qDebug("qscan (TCP) started"); #endif goto next_test_end; } next_test_err: qscan_callback_info(); #ifndef QT_NO_DEBUG qDebug("END: device::next_test()"); #endif return false; next_test_end: #ifndef QT_NO_DEBUG qDebug("END: device::next_test()"); #endif return true; } void device::qscan_process_info() { QString qout; #ifndef QT_NO_DEBUG qDebug("STA: qscan_process_info()"); #endif if (!io->IODevice()) { #ifndef QT_NO_DEBUG qDebug("END: qscan_process_info(): QIODevice is NULL"); #endif return; } if (!io_mutex->tryLock()) { #ifndef QT_NO_DEBUG qDebug("END: qscan_process_info(): Can't lock I/O Mutex"); #endif return; } while (io->linesAvailable() ) { qout = io->readLine(); // qout.remove("\n"); switch (threadType) { case threadDevice: case threadMedia: qscan_process_line(qout); break; case threadGetFeatures: cdvdcontrol_process_line(qout); break; case threadGetASDB: cdvdcontrol_process_asdb(qout); break; case threadMQCK: case threadAScre: case threadDestruct: cdvdcontrol_process_line(qout); case threadTattoo: default: #ifndef QT_NO_DEBUG qDebug() << qout; #endif break; } // qDebug(qout.remove("\n")); } // while (io->bytesAvailable() ) io_mutex->unlock(); #ifndef QT_NO_DEBUG qDebug("END: qscan_process_info()"); #endif } void device::qscan_process_line(QString& qout) { QStringList sl; #ifdef MINFO_TREE QTreeWidgetItem *info; #endif QIcon ico_ok(":images/ok.png"); QIcon ico_x (":images/x.png"); QIcon ico_rd(":images/disc.png"); QIcon ico_wr(":images/cdwriter.png"); if (threadType==threadMedia && preserveMediaInfo) { if (!qout.startsWith("IM:")) return; // device inquiry string qout.remove(0,4); #ifndef QT_NO_DEBUG qDebug() << qout; #endif sl = qout.split(':'); if (sl.size() <2 ) return; sl[1].remove('\''); while (!sl[1].isEmpty() && sl[1][0] == ' ') sl[1].remove(0,1); if (sl[0].contains("Available quality tests", Qt::CaseInsensitive)) { if (sl.size()>=2) { QStringList slt = sl[1].split(' ', QString::SkipEmptyParts); test_cap = 0; for (int ii=0; ii=2 ) { sl[1].remove('\''); while (!sl[1].isEmpty() && sl[1][0] == ' ') sl[1].remove(0,1); if (sl[0].contains("Device", Qt::CaseInsensitive) && !sl[0].contains("capabilities", Qt::CaseInsensitive)) { // l_dev->setText(sl[1]); #if 0 } else if (sl[0].contains("Vendor", Qt::CaseInsensitive)) { l_vendor->setText(sl[1]); } else if (sl[0].contains("Model", Qt::CaseInsensitive)) { l_model->setText(sl[1]); } else if (sl[0].contains("F/W", Qt::CaseInsensitive)) { l_fw->setText(sl[1]); #endif } else if (sl[0].contains("TLA", Qt::CaseInsensitive)) { if (sl[1].isEmpty()) { tla = "N/A"; } else { tla = sl[1]; } } else if (sl[0].contains("Discs loaded", Qt::CaseInsensitive)) { life_dn = sl[1].toInt(); } else if (sl[0].contains("CD Rd", Qt::CaseInsensitive)) { sl.removeAt(0); life_cr = sl.join(":"); } else if (sl[0].contains("CD Wr", Qt::CaseInsensitive)) { sl.removeAt(0); life_cw = sl.join(":"); } else if (sl[0].contains("DVD Rd", Qt::CaseInsensitive)) { sl.removeAt(0); life_dr = sl.join(":"); } else if (sl[0].contains("DVD Wr", Qt::CaseInsensitive)) { sl.removeAt(0); life_dw = sl.join(":"); } else if (sl[0].contains("S/N", Qt::CaseInsensitive)) { if (sl[1].isEmpty()) { sn = "N/A"; } else { sn = sl[1]; } } else if (sl[0].contains("Buffer", Qt::CaseInsensitive)) { buf = sl[1]; } else if (sl[0].contains("IFace", Qt::CaseInsensitive)) { iface = sl[1]; } else if (sl[0].contains("Loader", Qt::CaseInsensitive)) { loader = sl[1]; } else if (sl[0].contains("RPC Phase", Qt::CaseInsensitive)) { rpc_phase = sl[1].toInt(); } else if (sl[0].contains("Region", Qt::CaseInsensitive)) { if (sl[1].contains("not set", Qt::CaseInsensitive)) rpc_reg = -2; else rpc_reg = sl[1].toInt(); } else if (sl[0].contains("Changes left", Qt::CaseInsensitive)) { rpc_ch = sl[1].toInt(); } else if (sl[0].contains("Resets left", Qt::CaseInsensitive)) { rpc_rst = sl[1].toInt(); } else if (sl[0].contains("Device Generic capabilities", Qt::CaseInsensitive)) { cap = sl[1].toULongLong(0,16); } else if (sl[0].contains("Device Read capabilities", Qt::CaseInsensitive)) { cap_rd = sl[1].toULongLong(0,16); } else if (sl[0].contains("Device Write capabilities", Qt::CaseInsensitive)) { cap_wr = sl[1].toULongLong(0,16); } } } else if (qout.startsWith("CD:")) { // generic device capabilities /* qout.remove(0,4); proc->setReadChannel(QProcess::StandardOutput); sl = qout.split(':'); if (sl.size() >=2 ) { } */ } else if (qout.startsWith("CM:")) { // media R/W capabilities /* bool rd,wr; qout.remove(0,4); sl = qout.split(':'); if (sl.size() >=2 ) { sl[1].remove('\''); rd = sl[1].contains('R', Qt::CaseInsensitive); wr = sl[1].contains('W', Qt::CaseInsensitive); #ifndef QT_NO_DEBUG // qDebug("|" + sl[0] + "|" + sl[1]); #endif } */ } else if (qout.startsWith("IM:")) { // device inquiry string qout.remove(0,4); #ifndef QT_NO_DEBUG qDebug() << qout; #endif sl = qout.split(':'); if (sl.size() >=2 ) { sl[1].remove('\''); while (!sl[1].isEmpty() && sl[1][0] == ' ') sl[1].remove(0,1); #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 = "-"; media.spd1X = 1; } else { media.type = sl[1]; if (media.type.startsWith("CD")) { media.spd1X = 150; } else if (media.type.startsWith("DDCD")) { media.spd1X = 150; } else if (media.type.startsWith("DVD")) { media.spd1X = 1385; } else if (media.type.startsWith("BD")) { media.spd1X = 4495; } } } else if (sl[0].contains("Disc Category", Qt::CaseInsensitive)) { media.category = sl[1]; } else if (sl[0].contains("Layers", Qt::CaseInsensitive)) { media.layers = sl[1]; media.ilayers = sl[1].toInt(); if (media.ilayers <= 0) media.ilayers = 1; } else if (sl[0].contains("Protection", Qt::CaseInsensitive)) { media.prot = sl[1]; } else if (sl[0].contains("Regions", Qt::CaseInsensitive)) { media.regions = sl[1]; } else if (sl[0].contains("Erasable", Qt::CaseInsensitive)) { media.erasable = sl[1]; } else if (sl[0].contains("Disc state", Qt::CaseInsensitive)) { media.dstate = sl[1]; } else if (sl[0].contains("Session state", Qt::CaseInsensitive)) { media.sstate = sl[1]; } else if (sl[0].contains("Read capacity", Qt::CaseInsensitive)) { sl.removeFirst(); QStringList sl2 = sl.join(":").split("/"); if (sl2.size()>=3) { media.creads = sl2[0].remove("sectors").toInt(); media.creadm = sl2[1].remove("MB").toInt(); media.creadmsf = sl2[2]; } } else if (sl[0].contains("Free capacity", Qt::CaseInsensitive)) { sl.removeFirst(); QStringList sl2 = sl.join(":").split("/"); if (sl2.size()>=3) { media.cfrees = sl2[0].remove("sectors").toInt(); media.cfreem = sl2[1].remove("MB").toInt(); media.cfreemsf = sl2[2]; } } else if (sl[0].contains("Total capacity", Qt::CaseInsensitive)) { sl.removeFirst(); QStringList sl2 = sl.join(":").split("/"); if (sl2.size()>=3) { media.ctots = sl2[0].remove("sectors").toInt(); media.ctotm = sl2[1].remove("MB").toInt(); media.ctotmsf = sl2[2]; } } else if (sl[0].contains("Media ID", Qt::CaseInsensitive)) { sl.removeFirst(); media.mid = sl.join(":"); if (media.type.startsWith("DVD")) media.mid.remove(' '); } else if (sl[0].contains("Written on", Qt::CaseInsensitive)) { media.writer = sl[1]; #ifdef SHOW_SPEEDS } else if (sl[0].contains("RD speed max", Qt::CaseInsensitive)) { l_rd_max->setText(sl[1]); } else if (sl[0].contains("RD speed #", Qt::CaseInsensitive)) { c_rd_lst->addItem(sl[1]); } else if (sl[0].contains("D WR speed max", Qt::CaseInsensitive)) { l_wr_max->setText(sl[1]); } else if (sl[0].contains("D WR speed #", Qt::CaseInsensitive)) { c_wr_lst->addItem(sl[1]); #endif /* } else if (sl[0].contains("Available quality tests", Qt::CaseInsensitive)) { if (sl.size()>=2) { QStringList slt = sl[1].split(' ', QString::SkipEmptyParts); test_cap = 0; for (int ii=0; ii=2 ) { sl[1].remove('\''); if (sl[0].contains("RD speed #", Qt::CaseInsensitive)) { sl[1].remove(QRegExp("\\([a-z,A-Z,0-9, /]*\\)")); sl[1].remove(' '); media.rspeeds.append(sl[1]); } else if (sl[0].contains("D WR speed #", Qt::CaseInsensitive)) { sl[1].remove(QRegExp("\\([a-z,A-Z,0-9, /]*\\)")); sl[1].remove(' '); media.wspeedsd.prepend(sl[1]); } else if (sl[0].contains("M WR speed #", Qt::CaseInsensitive)) { sl[1].remove(' '); media.wspeedsm.append(sl[1]); } #ifdef MINFO_TREE info = new QTreeWidgetItem(QStringList(qout)); info_media.append(info); #endif } } else if (qout.startsWith("Found plugin:")) { int spidx; QString pn,pi; qout.remove(0,13); qout = qout.simplified(); spidx = qout.indexOf(" "); pn = qout.mid(0,spidx); pi = qout.mid(spidx+1); pi.remove("("); pi.remove(")"); if (!preserveMediaInfo) { #ifndef QT_NO_DEBUG qDebug() << "Plugin: " << pn << pi; #endif plugin_names.append(pn); plugin_infos.append(pi); } } else if (qout.contains("WARNING!!! Detected locked PX-755/PX-760")) { plextor_lock = 1; } } void device::cdvdcontrol_process_line(QString& qout) { QStringList sl; // vendor-specific device features #ifndef QT_NO_DEBUG qDebug() << qout; #endif sl = qout.split(':'); if (sl.size() >=2 ) { sl[1] = sl[1].simplified(); if (sl[0].contains("Lock state", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_LOCK; features.enabled |= (sl[1].contains("ON") ? FEATURE_LOCK : 0); } } else if (sl[0].contains("Hide-CDR", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_HIDECDR; features.enabled |= (sl[1].contains("ON") ? FEATURE_HIDECDR : 0); } } else if (sl[0].contains("SingleSession", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_SINGLESESSION; features.enabled |= (sl[1].contains("ON") ? FEATURE_SINGLESESSION : 0); } } else if (sl[0].contains("SpeedRead", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_SPEEDREAD; features.enabled |= (sl[1].contains("ON") ? FEATURE_SPEEDREAD : 0); } } else if (sl[0].contains("PSM Silent State", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_SILENT; features.enabled |= (sl[1].contains("ON") ? FEATURE_SILENT : 0); } } else if (sl[0].contains("PSM CD Read speed", Qt::CaseInsensitive)) { features.psm_cd_rd = sl[1].remove("X").toInt(); } else if (sl[0].contains("PSM CD Write speed", Qt::CaseInsensitive)) { features.psm_cd_wr = sl[1].remove("X").toInt(); } else if (sl[0].contains("PSM DVD Read speed", Qt::CaseInsensitive)) { features.psm_dvd_rd = sl[1].remove("X").toInt(); // } else if (sl[0].contains("SM DVD Write speed", Qt::CaseInsensitive)) { // features.sm_dvd_wr = sl[1].toInt(); } else if (sl[0].contains("PSM Access time", Qt::CaseInsensitive)) { features.psm_access = !!sl[1].contains("FAST"); } else if (sl[0].contains("PSM Load speed", Qt::CaseInsensitive)) { features.psm_trayl = sl[1].toInt(); } else if (sl[0].contains("PSM Eject speed", Qt::CaseInsensitive)) { features.psm_traye = sl[1].toInt(); } else if (sl[0].contains("SM Read speed", Qt::CaseInsensitive)) { if (media.type.startsWith("DVD")) { features.sm_dvd_rd = sl[1].remove("X").toInt(); } else { features.sm_cd_rd = sl[1].remove("X").toInt(); } } else if (sl[0].contains("SM Write speed", Qt::CaseInsensitive)) { if (!media.type.startsWith("DVD")) { features.sm_cd_wr = sl[1].remove("X").toInt(); } } else if (sl[0].contains("SM Access time", Qt::CaseInsensitive)) { features.sm_access = !!sl[1].contains("FAST"); } else if (sl[0].contains("SM Load speed", Qt::CaseInsensitive)) { features.sm_trayl = sl[1].toInt(); } else if (sl[0].contains("SM Eject speed", Qt::CaseInsensitive)) { features.sm_traye = sl[1].toInt(); } else if (sl[0].contains("PoweRec", Qt::CaseInsensitive) && !sl[0].contains("Speed", Qt::CaseInsensitive) ) { if (sl[1] != "-") { features.supported |= FEATURE_POWEREC; features.enabled |= (sl[1].contains("ON") ? FEATURE_POWEREC : 0); } } else if (sl[0].contains("PoweRec Speed", Qt::CaseInsensitive)) { features.prec_spd = sl[1].remove("X").remove("(CD)").remove("(DVD)").toInt(); } else if (sl[0].contains("VariRec CD power", Qt::CaseInsensitive)) { features.vrec_cd_pwr = (char) sl[1].toInt(); } else if (sl[0].contains("VariRec CD strategy", Qt::CaseInsensitive)) { int offs = sl[1].indexOf('['); if (offs>=0) { sl[1].remove(0,offs+1); sl[1].remove(']'); features.vrec_cd_str = (char) sl[1].toInt(); } } else if (sl[0].contains("VariRec CD", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_VARIREC_CDBASE; if (dev.startsWith("DVDR") || dev.startsWith("CD-R PREMIUM")) features.supported |= FEATURE_VARIREC_CDEXT; features.enabled |= (sl[1].contains("OFF") ? 0 : FEATURE_VARIREC_CD); } } else if (sl[0].contains("VariRec DVD power", Qt::CaseInsensitive)) { features.vrec_dvd_pwr = (char) sl[1].toInt(); } else if (sl[0].contains("VariRec DVD strategy", Qt::CaseInsensitive)) { int offs = sl[1].indexOf('['); if (offs>=0) { sl[1].remove(0,offs+1); sl[1].remove(']'); features.vrec_dvd_str = (char) sl[1].toInt(); } } else if (sl[0].contains("VariRec DVD", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_VARIREC_DVD; features.enabled |= (sl[1].contains("OFF") ? 0 : FEATURE_VARIREC_DVD); } } else if (sl[0].contains("GigaRec state", Qt::CaseInsensitive)) { features.supported |= FEATURE_GIGAREC; if (sl[1].contains("OFF")) { features.enabled &= ~FEATURE_GIGAREC; features.grec = 1.0; } else { features.enabled |= FEATURE_GIGAREC; features.grec = sl[1].toFloat(); } } else if (sl[0].contains("Disc GigaRec rate", Qt::CaseInsensitive)) { if (sl[1].contains("OFF")) { media.grec = 1.0; } else { media.grec = sl[1].toFloat(); } } else if (sl[0].contains("SecuRec", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_SECUREC; features.enabled |= (sl[1].contains("ON") ? FEATURE_SECUREC : 0); } } else if (sl[0].contains("DVD+R bitset", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_BITSETR; features.enabled |= (sl[1].contains("ON") ? FEATURE_BITSETR : 0); } } else if (sl[0].contains("DVD+R DL bitset", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_BITSETRDL; features.enabled |= (sl[1].contains("ON") ? FEATURE_BITSETRDL : 0); } } else if (sl[0].contains("DVD+R(W) testwrite", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_SIMULPLUS; features.enabled |= (sl[1].contains("ON") ? FEATURE_SIMULPLUS : 0); } } else if (sl[0].contains("AutoStrategy mode", Qt::CaseInsensitive)) { features.supported |= FEATURE_AS_BASE; if (dev.startsWith("DVDR PX-755") || dev.startsWith("DVDR PX-760")) features.supported |= FEATURE_AS_EXT; if (sl[1].contains("OFF", Qt::CaseInsensitive)) { features.as_mode = AS_MODE_OFF; } else if (sl[1].contains("AUTO", Qt::CaseInsensitive)) { features.as_mode = AS_MODE_AUTO; } else if (sl[1].contains("ON", Qt::CaseInsensitive)) { features.as_mode = AS_MODE_ON; } else if (sl[1].contains("FORCED", Qt::CaseInsensitive)) { features.as_mode = AS_MODE_FORCED; } } else if (sl[0].contains("Pioneer QuietMode", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_PIOQUIET; features.supported |= FEATURE_PIOLIMIT; } } else if (sl[0].contains("PlexEraser", Qt::CaseInsensitive)) { if (sl[1] != "-") { features.supported |= FEATURE_DESTRUCT; } } else if (sl[0].contains("Yamaha DiscT@2", Qt::CaseInsensitive)) { sl[1].remove("inner"); sl[1].replace("outer", " "); sl[1].replace("image", " "); QStringList sl2 = sl[1].split(" ", QString::SkipEmptyParts); #ifndef QT_NO_DEBUG qDebug () << "*** DISC T@2 ***\nsl[1]: " << sl[1] << "\nsl2 size: " << sl2.size(); #endif if (sl2.size() >= 3) { features.supported |= FEATURE_F1TATTOO; features.tattoo_inner = sl2[0].toInt(); features.tattoo_outer = sl2[1].toInt(); qDebug() << "Yamaha DiscT@2 radius: inner " << features.tattoo_inner << ", outer " << features.tattoo_outer; } // } else if (sl[0].contains("MQCK", Qt::CaseInsensitive)) { } else if (sl[0] == "MQCK") { features.as_mqckres = sl[1]; } } } void device::cdvdcontrol_process_asdb(QString& qout) { ASDB_item it; QStringList sl; /* it.present=1; it.active = 1; it.type = "DVD+R"; it.speed = QString::number(8); it.mid = "TYG02"; it.writes = QString::number(25); asdb.append(it); */ #ifndef QT_NO_DEBUG qDebug("process_asdb"); #endif if (!qout.startsWith("S#")) return; qout.remove(0,2); qout.remove(" "); sl = qout.split('|'); if (sl.size() <6) return; it.present=1; it.active = sl[1] == "*"; // it.type = sl[2].remove(QRegExp("[]")); it.type = sl[2].remove("[A1]").remove("[25]"); it.speed = sl[3]; it.mid = sl[4]; it.writes = sl[5]; asdb.append(it); } void device::qscan_callback_test() { int xcode = 0; #ifndef QT_NO_DEBUG qDebug("STA: qscan_callback_test()"); #endif timeval timeEnd; int time; qscan_process_test(); io_mutex->lock(); QObject::disconnect(io, SIGNAL(readyReadLine()), this, SLOT(qscan_process_test())); if (type == DevtypeLocal) { // QObject::disconnect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), // this, SLOT(qscan_callback_info())); xcode = proc->exitCode(); #ifndef QT_NO_DEBUG qDebug() << "qscan (local) finished" << xcode; #endif disconnect(proc); io->setIODevice(NULL); } else if (type == device::DevtypeTCP) { // QObject::disconnect(sock, SIGNAL(disconnected()), // this, SLOT(qscan_callback_info())); sock->disconnectFromHost(); #ifndef QT_NO_DEBUG qDebug("qscan (TCP) finished"); #endif disconnect(sock); io->setIODevice(NULL); } io_mutex->unlock(); nprocess = ""; emit process_finished(); gettimeofday(&timeEnd, NULL); time = (int) ((timeEnd.tv_sec - timeSta.tv_sec) + (timeEnd.tv_usec - timeSta.tv_usec)/1000000.0); switch(ctest) { case TEST_RT: testData.rt_time = time; emit block_RT(); break; case TEST_WT: testData.wt_time = time; emit block_WT(); break; case TEST_ERRC: testData.errc_time = time; emit block_ERRC(); break; case TEST_JB: testData.jb_time = time; emit block_JB(); break; case TEST_FT: testData.ft_time = time; emit block_FT(); break; case TEST_TA: testData.ta_time = time; emit block_TA(); break; default: break; } if (xcode) { emit testsError(); } next_test(); #ifndef QT_NO_DEBUG qDebug("END: qscan_callback_test()"); #endif } void device::qscan_process_test() { timeval timeEnd; float time; QString qout; QStringList sl; #ifndef QT_NO_DEBUG // qDebug("STA: qscan_process_test()"); #endif if (!io->IODevice()) { #ifndef QT_NO_DEBUG qDebug("END: qscan_process_test(): QIODevice is NULL"); #endif return; } if (!io_mutex->tryLock()) { #ifndef QT_NO_DEBUG qDebug("END: qscan_process_test(): Can't lock I/O Mutex"); #endif return; } while (io->linesAvailable()) { qout = io->readLine(); qout.remove("\n"); qout.remove("\r"); #ifndef QT_NO_DEBUG qDebug() << qout; #endif gettimeofday(&timeEnd, NULL); time = (timeEnd.tv_sec - timeSta.tv_sec) + (timeEnd.tv_usec - timeSta.tv_usec)/1000000.0; switch(ctest) { case TEST_RT: #ifndef DISABLE_INTERNAL_WT case TEST_WT: #endif if (qout.startsWith("lba") && qout.contains("speed")) { // qDebug("RT"); DI_Transfer di; sl = qout.split(" ", QString::SkipEmptyParts); // for (int i=0; i=6) { di.lba = sl[1].toLongLong(); di.spdx = sl[3].toDouble(); di.spdk = sl[5].toInt(); #ifndef DISABLE_INTERNAL_WT if (ctest == TEST_WT) { testData.wt.append(di); testData.wt_time = time; emit block_WT(); pprocess = 100.0 * (float) di.lba / media.ctots; emit process_progress(); } else if (ctest == TEST_RT) #endif { testData.rt.append(di); testData.rt_time = time; emit block_RT(); pprocess = 100.0 * (float) di.lba / media.creads; emit process_progress(); } } // qDebug(QString("lba: %1, spdx: %2, spdk: %3").arg(di.lba).arg(di.spdx).arg(di.spdk)); } else if (qout.startsWith("Reading blocks") || qout.startsWith("Starting write")) { gettimeofday(&timeSta, NULL); } break; #ifdef DISABLE_INTERNAL_WT case TEST_WT: if (qout.startsWith("Track ") && qout.contains("MB written")) { DI_Transfer di; sl = qout.split(" ", QString::SkipEmptyParts); // for (int i=0; i=10) { di.lba = sl[2].toLongLong() << 9; if (sl[3] == "of") { if (sl.size() >=12) { di.spdx = sl[11].remove("x.").toDouble(); di.spdk = (uint32_t)(di.spdx * media.spd1X); testData.wt.append(di); testData.wt_time = time; emit block_WT(); } } else { if (sl.size() >=10) { di.spdx = sl[9].remove("x.").toDouble(); di.spdk = (uint32_t)(di.spdx * media.spd1X); testData.wt.append(di); testData.wt_time = time; emit block_WT(); } } pprocess = 100.0 * (float) di.lba / media.ctots; emit process_progress(); // qDebug( sl[1] + " " + sl[3] + " " + sl[5] ); } // qDebug(QString("lba: %1, spdx: %2, spdk: %3").arg(di.lba).arg(di.spdx).arg(di.spdk)); } break; #endif case TEST_ERRC: if (qout.startsWith("cur")) { DI_Errc di; sl = qout.split(QRegExp("[:\\ |]"), QString::SkipEmptyParts); // for (int i=0; i=14) { di.cd.lba = sl[1].toInt(); di.cd.spdx= sl[2].toFloat(); di.cd.bler = sl[6].toInt(); di.cd.e11 = sl[7].toInt(); di.cd.e21 = sl[8].toInt(); di.cd.e31 = sl[9].toInt(); di.cd.e12 = sl[10].toInt(); di.cd.e22 = sl[11].toInt(); di.cd.e32 = sl[12].toInt(); di.cd.uncr = sl[13].toInt(); ErrcADD(&testData.errcTOT, di); ErrcMAX(&testData.errcMAX, di); CDErrcAVG(&testData.errcAVG, &testData.errcTOT, di.cd.lba/75); testData.errc.append(di); testData.errc_time = time; emit block_ERRC(); pprocess = 100.0 * (float) di.cd.lba / media.creads; emit process_progress(); } else if (media.type.startsWith("DVD") && sl.size()>=13) { di.dvd.lba = sl[1].toInt(); di.dvd.spdx = sl[2].toFloat(); di.dvd.res = 0; di.dvd.pie = sl[6].toInt(); di.dvd.pi8 = sl[7].toInt(); di.dvd.pif = sl[8].toInt(); di.dvd.poe = sl[9].toInt(); di.dvd.po8 = sl[10].toInt(); di.dvd.pof = sl[11].toInt(); di.dvd.uncr = sl[12].toInt(); ErrcADD(&testData.errcTOT, di); ErrcMAX(&testData.errcMAX, di); DVDErrcAVG(&testData.errcAVG, &testData.errcTOT, di.dvd.lba >> 4); testData.errc.append(di); testData.errc_time = time; emit block_ERRC(); pprocess = 100.0 * (float) di.dvd.lba / media.creads; emit process_progress(); } } break; case TEST_JB: if (qout.startsWith("cur")) { DI_JB di; sl = qout.split(QRegExp("[:\\ |]"), QString::SkipEmptyParts); // for (int i=0; i=8) { di.lba = sl[1].toInt(); di.spdx = sl[2].toFloat(); di.jitter = sl[6].toFloat(); di.asymm = sl[7].toFloat(); if (!testData.jb.size()) { testData.jbMM.jmin = di.jitter; testData.jbMM.jmax = di.jitter; testData.jbMM.bmin = di.asymm; testData.jbMM.bmax = di.asymm; } else { if (testData.jbMM.jmin > di.jitter) testData.jbMM.jmin = di.jitter; if (testData.jbMM.jmax < di.jitter) testData.jbMM.jmax = di.jitter; if (testData.jbMM.bmin > di.asymm) testData.jbMM.bmin = di.asymm; if (testData.jbMM.bmax < di.asymm) testData.jbMM.bmin = di.asymm; } testData.jb.append(di); testData.jb_time = time; emit block_JB(); pprocess = 100.0 * (float) di.lba / media.creads; emit process_progress(); } } break; case TEST_FT: if (qout.startsWith("cur")) { DI_FT di; sl = qout.split(QRegExp("[:\\ |]"), QString::SkipEmptyParts); // for (int i=0; i=8) { di.lba = sl[1].toInt(); di.spdx= sl[2].toFloat(); di.fe = sl[6].toInt(); di.te = sl[7].toInt(); if (testData.ftMAX.fe < di.fe) testData.ftMAX.fe = di.fe; if (testData.ftMAX.te < di.te) testData.ftMAX.te = di.te; testData.ft.append(di); testData.ft_time = time; emit block_FT(); pprocess = 100.0 * (float) di.lba / media.ctots; emit process_progress(); } } break; case TEST_TA: if (qout.startsWith("TA")) { if (taIdx <0 || taIdx>5) break; DI_TA di; sl = qout.split(" ", QString::SkipEmptyParts); if (sl.size() >=4) { di.idx = sl[1].toInt(); di.pit = sl[2].toInt(); di.land = sl[3].toInt(); // if (!di.idx) testData.ta[taIdx].clear(); testData.ta[taIdx].append(di); testData.ta_time = time; emit block_TA(); } } else if (qout.startsWith("Running TA on")) { int taLayer=0; int taZone=0; sl = qout.split(" ", QString::SkipEmptyParts); if (sl.size() >=6) { sl[3].remove("L"); #ifndef QT_NO_DEBUG qDebug() << "TA Layer: " << sl[3]; #endif taLayer = sl[3].toInt(); if (sl[4] == "inner") { taZone = 0; } else if (sl[4] == "middle") { taZone = 1; } else if (sl[4] == "outer") { taZone = 2; } taIdx = taLayer*3 + taZone; pprocess = 100.0 * (float) taIdx / ( media.ilayers*3); emit process_progress(); } } // parsing TA test output... break; default: break; } } io_mutex->unlock(); #ifndef QT_NO_DEBUG // qDebug("END: qscan_process_test()"); #endif } bool device::save(QIODevice *f) { #ifndef QT_NO_DEBUG qDebug("device::save()"); #endif QXmlStreamWriter xml; if (!f->isOpen()) return false; xml.setDevice(f); xml.writeStartDocument("1.0"); xml.writeCharacters("\n"); xml.writeStartElement("qpxdata"); xml.writeCharacters("\n"); // writing metadata // device info... xml.writeStartElement("device"); xml.writeCharacters("\n\t"); xml.writeStartElement("identify"); switch (type) { case DevtypeLocal: xml.writeAttribute("type","local"); break; case DevtypeTCP: xml.writeAttribute("type","tcp"); xml.writeAttribute("host", host); xml.writeAttribute("port", QString::number(port)); break; default: break; } xml.writeAttribute("path", path); // xml.writeAttribute("id", id); xml.writeAttribute("ven", ven); xml.writeAttribute("dev", dev); xml.writeAttribute("sn", sn); xml.writeAttribute("fw", fw); xml.writeAttribute("tla", tla); xml.writeEndElement(); xml.writeCharacters("\n\t"); xml.writeStartElement("info"); xml.writeAttribute("buf", buf); xml.writeAttribute("iface",iface); xml.writeAttribute("loader",loader); xml.writeAttribute("cap", QString("%1").arg(cap,0,16)); xml.writeAttribute("cap_rd", QString("%1").arg(cap_rd,0,16)); xml.writeAttribute("cap_wr", QString("%1").arg(cap_wr,0,16)); xml.writeEndElement(); xml.writeCharacters("\n"); if (cap & CAP_DVD_CSS) { xml.writeCharacters("\t"); xml.writeStartElement("rpc"); xml.writeAttribute("phase", QString::number(rpc_phase)); xml.writeAttribute("region", QString::number(rpc_reg)); xml.writeAttribute("changes", QString::number(rpc_ch)); xml.writeAttribute("resets", QString::number(rpc_rst)); xml.writeEndElement(); xml.writeCharacters("\n"); } // if (life_dn) { xml.writeCharacters("\t"); xml.writeStartElement("lifetime"); xml.writeAttribute("count", QString::number(life_dn)); xml.writeAttribute("cd_rd", life_cr); xml.writeAttribute("cd_wr", life_cw); xml.writeAttribute("dvd_rd", life_dr); xml.writeAttribute("dvd_wr", life_dw); xml.writeEndElement(); xml.writeCharacters("\n"); // } xml.writeEndElement(); // device xml.writeCharacters("\n"); xml.writeStartElement("media"); // media info xml.writeCharacters("\n\t"); xml.writeStartElement("identify"); xml.writeAttribute("type", media.type); xml.writeAttribute("category", media.category); xml.writeAttribute("mid", media.mid); xml.writeEndElement(); xml.writeCharacters("\n\t"); xml.writeStartElement("capacity"); xml.writeAttribute("read", QString::number(media.creads)); xml.writeAttribute("free", QString::number(media.cfrees)); xml.writeAttribute("tot", QString::number(media.ctots)); xml.writeAttribute("read_m", QString::number(media.creadm)); xml.writeAttribute("free_m", QString::number(media.cfreem)); xml.writeAttribute("tot_m", QString::number(media.ctotm)); xml.writeAttribute("read_msf", media.creadmsf); xml.writeAttribute("free_msf", media.cfreemsf); xml.writeAttribute("tot_msf", media.ctotmsf); xml.writeEndElement(); // capacity xml.writeCharacters("\n\t"); xml.writeStartElement("speeds"); xml.writeAttribute("rspeeds", media.rspeeds.join(" ")); xml.writeAttribute("wspeedsd", media.wspeedsd.join(" ")); xml.writeAttribute("wspeedsm", media.wspeedsm.join(" ")); xml.writeEndElement(); // misc xml.writeCharacters("\n\t"); xml.writeStartElement("misc"); xml.writeAttribute("writer", media.writer); xml.writeAttribute("protection",media.prot); xml.writeAttribute("regions", media.regions); xml.writeAttribute("gigarec", QString("%1").arg(media.grec,0,'f',1)); xml.writeAttribute("spd1X", QString::number(media.spd1X)); xml.writeAttribute("layers", QString::number(media.ilayers)); xml.writeAttribute("erasable", media.erasable); xml.writeAttribute("dstate", media.dstate); xml.writeAttribute("sstate", media.sstate); xml.writeEndElement(); // misc xml.writeCharacters("\n"); xml.writeEndElement(); // media xml.writeCharacters("\n"); // test speeds xml.writeStartElement("tests"); xml.writeCharacters("\n"); if (testData.rt.size()) { xml.writeCharacters("\t"); int s = testData.rt.size(); xml.writeStartElement("rt"); xml.writeAttribute("speed", QString::number(tspeeds.rt)); xml.writeAttribute("time", QString("%1").arg(testData.rt_time,0,'f',2)); for (int i=0; iisOpen()) return false; xml.setDevice(f); // xml.version(); clearMinfo(); while(!xml.atEnd()) { switch (xml.readNext()) { case QXmlStreamReader::StartElement: name = xml.name().toString(); if (xml.name() == "qpxdata") { dataFound = 1; isQpxData = 1; } if (isQpxData) { if (test && (xml.name() == "d")) { data = xml.readElementText().split(","); switch (test) { case TEST_RT: if (data.size() == 3) { d_tr.lba = data[0].toLongLong(); d_tr.spdx = data[1].toFloat(); d_tr.spdk = data[2].toInt(); testData.rt << d_tr; } break; case TEST_WT: if (data.size() == 3) { d_tr.lba = data[0].toLongLong(); d_tr.spdx = data[1].toFloat(); d_tr.spdk = data[2].toInt(); testData.wt << d_tr; } break; case TEST_ERRC: if (data.size() == 10) { d_errc.raw.lba = data[0].toLongLong(); d_errc.raw.spdx = data[1].toFloat(); for (int i=0; i<8; i++) d_errc.raw.err[i] = data[2+i].toInt(); #if RECALC_ON_LOAD ErrcADD(&testData.errcTOT, d_errc); ErrcMAX(&testData.errcMAX, d_errc); if (media.type.startsWith("CD")) { CDErrcAVG(&testData.errcAVG, &testData.errcTOT, d_errc.cd.lba/75); } else { DVDErrcAVG(&testData.errcAVG, &testData.errcTOT, d_errc.dvd.lba >> 4); } #endif testData.errc << d_errc; } break; case TEST_JB: if (data.size() == 4) { d_jb.lba = data[0].toLongLong(); d_jb.spdx = data[1].toFloat(); d_jb.jitter = data[2].toFloat(); d_jb.asymm = data[3].toFloat(); #if RECALC_ON_LOAD if (!testData.jb.size()) { testData.jbMM.jmin = d_jb.jitter; testData.jbMM.jmax = d_jb.jitter; testData.jbMM.bmin = d_jb.asymm; testData.jbMM.bmax = d_jb.asymm; } else { if (testData.jbMM.jmin > d_jb.jitter) testData.jbMM.jmin = d_jb.jitter; if (testData.jbMM.jmax < d_jb.jitter) testData.jbMM.jmax = d_jb.jitter; if (testData.jbMM.bmin > d_jb.asymm) testData.jbMM.bmin = d_jb.asymm; if (testData.jbMM.bmax < d_jb.asymm) testData.jbMM.bmin = d_jb.asymm; } #endif testData.jb << d_jb; } break; case TEST_FT: if (data.size() == 4) { d_ft.lba = data[0].toLongLong(); d_ft.spdx= data[1].toFloat(); d_ft.fe = data[2].toInt(); d_ft.te = data[3].toInt(); #if RECALC_ON_LOAD if (testData.ftMAX.fe < d_ft.fe) testData.ftMAX.fe = d_ft.fe; if (testData.ftMAX.te < d_ft.te) testData.ftMAX.te = d_ft.te; #endif testData.ft << d_ft; } break; case TEST_TA: if (taZone>=0 && taZone<6 && data.size() == 3) { d_ta.idx = data[0].toInt(); d_ta.pit = data[1].toInt(); d_ta.land = data[2].toInt(); testData.ta[taZone] << d_ta; } break; } } else if (isDevice) { // device information attr = xml.attributes(); if (xml.name() == "identify") { // type = attr.value("type").toInt(); path = attr.value("path").toString(); host = attr.value("host").toString(); port = attr.value("port").toString().toInt(); path = attr.value("path").toString(); // id = attr.value("id").toString(); ven = attr.value("ven").toString(); dev = attr.value("dev").toString(); sn = attr.value("sn").toString(); fw = attr.value("fw").toString(); tla = attr.value("tla").toString(); } else if (xml.name() == "info") { buf = attr.value("buf").toString(); iface = attr.value("iface").toString(); loader = attr.value("loader").toString(); cap = attr.value("cap").toString().toULongLong(NULL, 16); cap_rd = attr.value("cap_rd").toString().toULongLong(NULL, 16); cap_wr = attr.value("cap_wr").toString().toULongLong(NULL, 16); } else if (xml.name() == "rpc") { rpc_phase = attr.value("phase").toString().toInt(); rpc_reg = attr.value("region").toString().toInt(); rpc_ch = attr.value("changes").toString().toInt(); rpc_rst = attr.value("resets").toString().toInt(); } else if (xml.name() == "lifetime") { life_dn = attr.value("count").toString().toInt(); life_cr = attr.value("cd_rd").toString(); life_cw = attr.value("cd_wr").toString(); life_dr = attr.value("dvd_rd").toString(); life_dw = attr.value("dvd_wr").toString(); } } else if (isMedia) { // media information attr = xml.attributes(); if (xml.name() == "identify") { media.type = attr.value("type").toString(); media.category = attr.value("category").toString(); media.mid = attr.value("mid").toString(); } else if (xml.name() == "capacity") { media.creads = attr.value("read").toString().toInt(); media.cfrees = attr.value("free").toString().toInt(); media.ctots = attr.value("tot").toString().toInt(); media.creadm = attr.value("read_m").toString().toInt(); media.cfreem = attr.value("free_m").toString().toInt(); media.ctotm = attr.value("tot_m").toString().toInt(); media.creadmsf = attr.value("read_msf").toString(); media.cfreemsf = attr.value("free_msf").toString(); media.ctotmsf = attr.value("tot_msf").toString(); } else if (xml.name() == "speeds") { media.rspeeds = attr.value("rspeeds" ).toString().split(" ", QString::SkipEmptyParts); media.wspeedsd = attr.value("wspeedsd").toString().split(" ", QString::SkipEmptyParts); media.wspeedsm = attr.value("wspeedsm").toString().split(" ", QString::SkipEmptyParts); } else if (xml.name() == "misc") { media.writer = attr.value("writer").toString(); media.prot = attr.value("protection").toString(); media.regions = attr.value("regions").toString(); media.grec = attr.value("gigarec").toString().toDouble(); media.spd1X = attr.value("spd1X").toString().toInt(); media.layers = attr.value("layers").toString(); media.erasable= attr.value("erasable").toString(); media.ilayers = media.layers.toInt(); media.dstate = attr.value("dstate").toString(); media.sstate = attr.value("sstate").toString(); } } else if (isTests) { attr = xml.attributes(); if (xml.name() == "rt") { test = TEST_RT; tspeeds.rt = attr.value("speed").toString().toInt(); testData.rt_time = attr.value("time").toString().toDouble(); } else if (xml.name() == "wt") { test = TEST_WT; tspeeds.wt = attr.value("speed").toString().toInt(); testData.wt_time = attr.value("time").toString().toDouble(); } else if (xml.name() == "errc") { test = TEST_ERRC; tspeeds.errc = attr.value("speed").toString().toInt(); testData.errc_time = attr.value("time").toString().toDouble(); media.tdata_errc = attr.value("data").toString().toInt(); } else if (xml.name() == "jb") { test = TEST_JB; tspeeds.jb = attr.value("speed").toString().toInt(); testData.jb_time = attr.value("time").toString().toDouble(); } else if (xml.name() == "ft") { test = TEST_FT; tspeeds.ft = attr.value("speed").toString().toInt(); testData.ft_time = attr.value("time").toString().toDouble(); } else if (xml.name() == "ta") { test = TEST_TA; // tspeeds.ta = attr.value("speed").toString().toInt(); testData.ta_time = attr.value("time").toString().toDouble(); } else if ((test == TEST_TA) && (xml.name() == "zone")) { taZone = attr.value("idx").toString().toInt(); } } else if (xml.name() == "device") { isDevice = 1; } else if (xml.name() == "media") { isMedia = 1; } else if (xml.name() == "tests") { isTests = 1; } } break; case QXmlStreamReader::EndElement: if (isQpxData && xml.name() == "qpxdata") { isQpxData = 0; } else if (isDevice && xml.name() == "device") { isDevice = 0; } else if (isMedia && xml.name() == "media") { isMedia = 0; } else if (isTests && xml.name() == "tests") { isTests = 0; } else if (isTests) { if (test == TEST_RT && xml.name() == "rt") { test = 0; } else if (test == TEST_WT && xml.name() == "wt") { test = 0; } else if (test == TEST_ERRC && xml.name() == "errc") { test = 0; } else if (test == TEST_JB && xml.name() == "jb") { test = 0; } else if (test == TEST_FT && xml.name() == "ft") { test = 0; } else if (test == TEST_TA && xml.name() == "ta") { test = 0; } else if (test == TEST_TA && xml.name() == "zone") { taZone = -1; } } break; // case QXmlStreamReader::Characters: // break; default: break; } } // while ( readData(s) ) {} emit doneDInfo(0); emit doneMInfo(0); return dataFound; } void device::startWatcher() { if (mwatcher) return; mwatcher = new MediaWatcher(this); connect(mwatcher, SIGNAL(started()), this, SLOT(watcherStarted())); connect(mwatcher, SIGNAL(finished()), this, SLOT(watcherStoped())); connect(mwatcher, SIGNAL(mediaLoading()), this, SLOT(watcherEventLoading())); connect(mwatcher, SIGNAL(mediaRemoved()), this, SLOT(watcherEventRemoved())); connect(mwatcher, SIGNAL(mediaNew()), this, SLOT(watcherEventNew())); connect(mwatcher, SIGNAL(mediaNoMedia()), this, SLOT(watcherEventNoMedia())); mwatcher->start(); } void device::stopWatcher() { if (!mwatcher) return; mwatcher->stop(); mwatcher->wait(3000); } void device::pauseWatcher() { if (!mwatcher) return; mwatcher->pause(); } void device::unpauseWatcher() { if (!mwatcher) return; mwatcher->unPause(); } void device::watcherStarted() { #ifndef QT_NO_DEBUG qDebug() << "device: " << path << ": watcher started"; #endif } void device::watcherStoped() { #ifndef QT_NO_DEBUG qDebug() << "device: " << path << ": watcher stoped"; #endif mwatcher->disconnect(); mwatcher->deleteLater(); mwatcher = NULL; } void device::watcherEventLoading() { nprocess = tr("Loading media..."); emit process_started(); } void device::watcherEventRemoved() { #ifndef QT_NO_DEBUG qDebug("device::watcherEventRemoved()"); #endif autoupdate = 1; clear_media_info(); } void device::watcherEventNew() { #ifndef QT_NO_DEBUG qDebug("device::watcherEventNew()"); #endif autoupdate = 1; update_media_info(); } void device::watcherEventNoMedia() { nprocess = ""; emit process_finished(); } qpxtool-0.7.1_002/gui/src/mainwidget.cpp0000644000175000001440000001233211345715620017272 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include //#define bstyle "QPushButton::flat { border: none; }" // pb->setStyleSheet(bstyle); #define addTabButton(pb,icon,name,tabidx,layout) \ { \ pb = new QPushButton(QIcon(icon),name,bframe); \ pb->setFlat(true); \ pb->setCheckable(true); \ pb->setIconSize(QSize(24,24)); \ pb->setMinimumHeight(26); \ pb->setFocusPolicy(Qt::NoFocus); \ QFont f = pb->font(); \ f.setPointSize(f.pointSize()+1); \ pb->setFont(f); \ grp->addButton(pb,tabidx++); \ layout->addWidget(pb); \ } #include #include #include #include #include #include #include #include #include #include "mainwidget.h" #include QPxMainWidget::QPxMainWidget(QPxSettings *iset, devlist *idev, QWidget *p) : QWidget(p) { int tabidx=0; #ifndef QT_NO_DEBUG qDebug("STA: QPxMainWidget()"); #endif settings = iset; devices = idev; QPushButton *pb; layout = new QHBoxLayout(this); layout->setMargin(3); layout->setSpacing(3); bframe = new QFrame(this); bframe->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(bframe); layout_buttons = new QVBoxLayout(bframe); layout_buttons->setMargin(3); layout_buttons->setSpacing(0); // layout->addLayout(layout_buttons); grp = new QButtonGroup(bframe); stack = new QStackedLayout(); layout->addLayout(stack); tab_DevInfo = new tabDevInfo(iset, idev, this); stack->addWidget(tab_DevInfo); addTabButton(pb,":images/device.png", "Device", tabidx,layout_buttons); pb->setChecked(true); connect(this, SIGNAL(deviceSelected()), tab_DevInfo, SLOT(selectDevice())); tab_MediaInfo = new tabMediaInfo(iset, idev, this); stack->addWidget(tab_MediaInfo); addTabButton(pb,":images/disc.png", "Media", tabidx,layout_buttons); connect(this, SIGNAL(deviceSelected()), tab_MediaInfo, SLOT(selectDevice())); tab_RT = new tabTransfer(iset, idev, "RT", 0, this); stack->addWidget(tab_RT); addTabButton(pb,":images/test_rt.png", "Read Transfer", tabidx,layout_buttons); connect(this, SIGNAL(configured()), tab_RT, SLOT(reconfig())); connect(this, SIGNAL(deviceSelected()), tab_RT, SLOT(selectDevice())); tab_WT = new tabTransfer(iset, idev, "WT", 1, this); stack->addWidget(tab_WT); addTabButton(pb,":images/test_wt.png", "Write Transfer", tabidx,layout_buttons); connect(this, SIGNAL(configured()), tab_WT, SLOT(reconfig())); connect(this, SIGNAL(deviceSelected()), tab_WT, SLOT(selectDevice())); tab_ERRC = new tabERRC(iset, idev, "ERRC", this); stack->addWidget(tab_ERRC); addTabButton(pb,":images/test_errc.png", "Error Correction", tabidx,layout_buttons); connect(this, SIGNAL(configured()), tab_ERRC, SLOT(reconfig())); connect(this, SIGNAL(deviceSelected()), tab_ERRC, SLOT(selectDevice())); tab_JB = new tabJB(iset, idev, "JB", this); stack->addWidget(tab_JB); addTabButton(pb,":images/test_jb.png", "Jitter/Asymmetry", tabidx,layout_buttons); connect(this, SIGNAL(configured()), tab_JB, SLOT(reconfig())); connect(this, SIGNAL(deviceSelected()), tab_JB, SLOT(selectDevice())); tab_FETE = new tabFETE(iset, idev, "FETE", this); stack->addWidget(tab_FETE); addTabButton(pb,":images/test_ft.png", "FE/TE", tabidx,layout_buttons); connect(this, SIGNAL(configured()), tab_FETE, SLOT(reconfig())); connect(this, SIGNAL(deviceSelected()), tab_FETE, SLOT(selectDevice())); tab_TA = new tabTA(iset, idev, "TA", this); stack->addWidget(tab_TA); addTabButton(pb,":images/test_ta.png", "Time Analyser", tabidx,layout_buttons); connect(this, SIGNAL(configured()), tab_TA, SLOT(reconfig())); connect(this, SIGNAL(deviceSelected()), tab_TA, SLOT(selectDevice())); connect(grp, SIGNAL(buttonClicked(int)), stack, SLOT(setCurrentIndex(int))); layout_buttons->addStretch(10); #ifndef QT_NO_DEBUG qDebug("END: QPxMainWidget()"); #endif } QPxMainWidget::~QPxMainWidget() { #ifndef QT_NO_DEBUG qDebug("STA: ~QPxMainWidget()"); qDebug("END: ~QPxMainWidget()"); #endif } void QPxMainWidget::reconfig() { emit configured(); } void QPxMainWidget::clearDev() { tab_MediaInfo->clear(); tab_DevInfo->clear(); } void QPxMainWidget::clearMedia() { tab_MediaInfo->clear(); } void QPxMainWidget::selectDevice() { emit deviceSelected(); } void QPxMainWidget::drawGraph(QImage& img, device *dev, int ttype, int eflags) { switch(ttype) { case TEST_RT: tab_RT->drawGraph(img, dev, TEST_RT); break; case TEST_WT: tab_WT->drawGraph(img, dev, TEST_WT); break; case TEST_ERRC: tab_ERRC->drawGraph(img, dev, TEST_ERRC, eflags); break; case TEST_JB: tab_JB->drawGraph(img, dev, TEST_JB); break; case TEST_FT: tab_FETE->drawGraph(img, dev, TEST_FT); break; case TEST_TA: tab_TA->drawGraph(img, dev, TEST_TA, eflags); break; } } qpxtool-0.7.1_002/gui/src/splitbutton.cpp0000644000175000001440000000310111160172572017521 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include "splitbutton.h" SplitButton::SplitButton(Qt::Orientation o, QWidget *p, Qt::WindowFlags f) : QWidget(p,f) { orient = o; mouseFocus=0; if (orient == Qt::Vertical) { setMinimumWidth(6); setMaximumWidth(6); } else { setMinimumHeight(6); setMaximumHeight(6); } } SplitButton::~SplitButton() {} void SplitButton::paintEvent(QPaintEvent*) { // wDebug("SplitButton::paintEvent()"); QPainter p(this); p.setRenderHint(QPainter::Antialiasing, true); if (mouseFocus) { p.fillRect(0, 0, width(), height(), QBrush(palette().color(QPalette::Light))); } else { p.fillRect(0, 0, width(), height(), QBrush(palette().color(QPalette::Button))); } p.setPen(QPen(palette().color(QPalette::Dark),1)); p.drawRect(0, 0, width(), height()); } void SplitButton::mousePressEvent(QMouseEvent*) { // wDebug("SplitButton::mousePressEvent()"); emit clicked(); } void SplitButton::mouseReleaseEvent(QMouseEvent*) { } void SplitButton::enterEvent(QEvent*) { // wDebug("SplitButton::enterEvent()"); mouseFocus=1; update(); } void SplitButton::leaveEvent(QEvent*) { // wDebug("SplitButton::leaveEvent()"); mouseFocus=0; update(); } qpxtool-0.7.1_002/gui/src/colorlabel.cpp0000644000175000001440000000326011334746147017266 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include "colorlabel.h" #include ColorLabel::ColorLabel(QColor icol, QString itext, bool ieditable, QWidget *p, Qt::WindowFlags f) : QWidget(p,f) { col = icol; text = itext; editable = ieditable; setMinimumSize(40,20); } ColorLabel::~ColorLabel() { } void ColorLabel::mousePressEvent(QMouseEvent* e) { if (!editable) return; #ifndef QT_NO_DEBUG qDebug() << "x: " << e->x() << " y: " << e->y(); #endif // if (e->x() < height() && e->x() > 1 && e->y() > 1 && e->y() < height()) { if (e->button() == Qt::LeftButton && e->x() < (height()+2)) { col = QColorDialog::getRgba(col.rgba(), NULL, this); update(); } } void ColorLabel::paintEvent(QPaintEvent*) { //#ifndef QT_NO_DEBUG // wDebug("ColorLabel::paintEvent()"); //#endif QRect rect(1, 1, height()-2, height()-2); QRect trect(height()+4, 1, width()-height()-6, height()-2); QPainter p(this); p.setRenderHint(QPainter::Antialiasing, true); p.setRenderHint(QPainter::TextAntialiasing, true); p.setPen( QPen(col, 2)); p.fillRect(rect.adjusted(1,1,-1,-1), QBrush(col) ); p.setPen( QPen(QColor(Qt::black), 2)); p.drawRoundRect(rect, 20, 20); p.drawText(trect, Qt::AlignLeft | Qt::AlignVCenter, text); //p.drawRect(rect); } qpxtool-0.7.1_002/gui/src/testdialog.cpp0000644000175000001440000003216011334746322017303 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include #include #include "testdialog.h" #include #include #include #include #include #include TestDialog::TestDialog(QPxSettings *iset, device *idev, QWidget *p, Qt::WindowFlags f) : QDialog(p,f) { settings = iset; dev = idev; setWindowTitle(tr("Select tests...")); winit(); checkSimul(); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); // setting default selection for tests autostart dev->test_req = 0; if(!dev->media.creads || dev->media.type.startsWith("DVD+RW") || dev->media.type.startsWith("DVD-RAM")) { dev->test_req |= (settings->actions_flags & AFLAG_DTEST_WT) ? TEST_WT : 0; dev->test_req |= (settings->actions_flags & AFLAG_DTEST_FT_W) ? TEST_FT : 0; } if (!dev->media.creads || dev->media.type.startsWith("DVD+RW")) { dev->WT_simul = (settings->actions_flags & AFLAG_DTEST_WT_SIMUL) ? !!noSimul : 0; } if(dev->media.creads) { dev->test_req |= (settings->actions_flags & AFLAG_DTEST_RT) ? TEST_RT : 0; dev->test_req |= (settings->actions_flags & AFLAG_DTEST_ERRC) ? TEST_ERRC : 0; dev->test_req |= (settings->actions_flags & AFLAG_DTEST_JB) ? TEST_JB : 0; dev->test_req |= (settings->actions_flags & AFLAG_DTEST_FT_B) ? TEST_FT : 0; dev->test_req |= (settings->actions_flags & AFLAG_DTEST_TA) ? TEST_TA : 0; } updateData(false); } TestDialog::~TestDialog() { } device* TestDialog::getDevice() { return dev; } void TestDialog::winit() { layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(6); /* layout_dev = new QHBoxLayout(); layout_dev->setMargin(3); layout_dev->setSpacing(3); layout->addLayout(layout_dev, 0,0,1,4); */ ldev = new QLabel(tr("Device:"),this); ldev->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(ldev,0,0); devid = new QLabel(this); devid->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(devid,0,1); lmedia = new QLabel(tr("Media:"),this); lmedia->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(lmedia,1,0); media = new QLabel(this); media->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(media,1,1); // tests selection // grp_tests = new QGroupBox(tr("Tests"),this); grp_tests = new QGroupBox(this); layout->addWidget(grp_tests, 2,0, 1,2); layout_tests = new QGridLayout(grp_tests); layout_tests->setMargin(3); layout_tests->setSpacing(3); // grp_tests->setLayout(layout_tests); l_tests = new QLabel(tr("Tests:"),this); layout_tests->addWidget(l_tests, 0,0); l_speeds = new QLabel(tr("Speeds:"),this); layout_tests->addWidget(l_speeds, 0,1); ck_RT = new QCheckBox(tr("Read Transfer Rate"), this); layout_tests->addWidget(ck_RT, 1,0); spd_RT = new QComboBox(this); layout_tests->addWidget(spd_RT, 1,1); ck_WT = new QCheckBox(tr("Write Transfer Rate"), this); layout_tests->addWidget(ck_WT, 2,0); spd_WT = new QComboBox(this); layout_tests->addWidget(spd_WT, 2,1); ck_WT_simul = new QCheckBox(tr("Simulation"), this); ck_WT_simul->setEnabled(false); layout_tests->addWidget(ck_WT_simul, 3,1); hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout_tests->addWidget(hline0, 4,0,1,2); ck_ERRC = new QCheckBox(tr("Error Correction"), this); layout_tests->addWidget(ck_ERRC, 5,0); spd_ERRC = new QComboBox(this); layout_tests->addWidget(spd_ERRC, 5,1); ck_JB = new QCheckBox(tr("Jitter/Asymmetry"), this); layout_tests->addWidget(ck_JB, 6,0); spd_JB = new QComboBox(this); layout_tests->addWidget(spd_JB, 6,1); ck_FT = new QCheckBox(tr("Focus/Tracking"), this); layout_tests->addWidget(ck_FT, 7,0); spd_FT = new QComboBox(this); layout_tests->addWidget(spd_FT, 7,1); ck_TA = new QCheckBox(tr("Time Analyser"), this); layout_tests->addWidget(ck_TA, 8,0); /* spd_TA = new QComboBox(this); layout_tests->addWidget(spd_TA, 5,1); */ hline1 = new QFrame(this); hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout_tests->addWidget(hline1, 9,0,1,2); l_plugin = new QLabel(tr("qScan plugin:"), this); layout_tests->addWidget(l_plugin, 10,0); cb_plugin = new QComboBox(this); // cb_plugin->setEnabled(false); layout_tests->addWidget(cb_plugin, 10,1); l_plugin_info = new QLabel(this); layout_tests->addWidget(l_plugin_info, 11,0,1,2); layout_tests->setRowStretch(12,10); /* // media summary grp_media = new QGroupBox(tr("Media summary:"),this); layout->addWidget(grp_media, 1,2, 1,2); layout_media = new QHBoxLayout(grp_media); layout_media->setMargin(3); layout_media->setSpacing(3); // grp_media->setLayout(layout_media); media = new QTextBrowser(grp_media); layout_media->addWidget(media); layout->setRowStretch(1,10); */ layout_butt = new QHBoxLayout; layout_butt->setMargin(0); layout_butt->setSpacing(3); layout->addLayout(layout_butt, 3, 0, 1, 2); layout_butt->addStretch(3); butt_run = new QPushButton(tr("Run"),this); butt_run->setIcon(QIcon(":images/scan.png")); layout_butt->addWidget(butt_run,1); butt_cancel = new QPushButton(tr("Cancel"),this); butt_cancel->setIcon(QIcon(":images/x.png")); layout_butt->addWidget(butt_cancel,1); layout->setRowStretch(0,1); layout->setRowStretch(1,1); layout->setRowStretch(2,20); layout->setRowStretch(3,1); connect( ck_RT, SIGNAL(clicked(bool)), spd_RT,SLOT(setEnabled(bool))); connect( ck_WT, SIGNAL(clicked(bool)), spd_WT,SLOT(setEnabled(bool))); connect( ck_WT, SIGNAL(clicked(bool)), this,SLOT(WTchecked(bool))); connect( ck_ERRC, SIGNAL(clicked(bool)), spd_ERRC,SLOT(setEnabled(bool))); connect( ck_JB, SIGNAL(clicked(bool)), spd_JB,SLOT(setEnabled(bool))); connect( ck_FT, SIGNAL(clicked(bool)), spd_FT,SLOT(setEnabled(bool))); // connect( ck_TA, SIGNAL(clicked(bool)), spd_TA,SLOT(setEnabled(bool))); // connect( ck_plugin, SIGNAL(clicked(bool)), cb_plugin,SLOT(setEnabled(bool))); connect( cb_plugin, SIGNAL(activated(int)), this, SLOT(pluginChanged(int))); connect( butt_run, SIGNAL(clicked()), this, SLOT(start()) ); connect( butt_cancel, SIGNAL(clicked()), this, SLOT(reject()) ); } void TestDialog::WTchecked(bool en) { if (noSimul) return; ck_WT_simul->setEnabled(en); } void TestDialog::checkSimul() { noSimul = 1; if ((dev->media.type.startsWith("CD-") && (dev->cap & CAP_TEST_WRITE_CD)) || (dev->media.type.startsWith("DVD-") && !dev->media.type.startsWith("DVD-RAM") && (dev->cap & CAP_TEST_WRITE_DVD)) || (dev->media.type.startsWith("DVD+") && (dev->cap & CAP_TEST_WRITE_DVD_PLUS)) ) { noSimul = 0; ck_WT_simul->setEnabled( ck_WT->isChecked() ); } else { ck_WT_simul->setEnabled(false); } } void TestDialog::start() { saveData(); if (!dev->test_req) { QMessageBox::information(this, tr("No tests selected!"), tr("You have selected no tests!")); return; } #ifndef QT_NO_DEBUG qDebug() << "Selected plugin: "<< dev->plugin; #endif accept(); } void TestDialog::mediaChanged() { qDebug() << "TestDialog::mediaChanged()"; updateData(true, true); } void TestDialog::updateData(bool save, bool setPlugin) { if (save) saveData(); devid->setText(dev->id); if (dev->media.type == "-") { grp_tests->setEnabled(false); butt_run->setEnabled(false); media->setText("No Media"); return; } butt_run->setEnabled(true); media->setText(dev->media.dstate + " "+ dev->media.type); grp_tests->setEnabled(true); ck_RT->setEnabled(dev->media.creads); ck_RT->setChecked(dev->test_req & TEST_RT); ck_WT->setEnabled(dev->media.dstate.contains("Blank", Qt::CaseInsensitive) || dev->media.type.startsWith("DVD+RW") || dev->media.type.startsWith("DVD-RAM") ); ck_WT->setChecked(dev->test_req & TEST_WT); ck_WT_simul->setChecked(dev->WT_simul); ck_ERRC->setEnabled(dev->test_cap & TEST_ERRC && dev->media.creads); ck_ERRC->setChecked(ck_ERRC->isEnabled() && (dev->test_req & TEST_ERRC)); ck_JB->setEnabled(dev->test_cap & TEST_JB && dev->media.creads); ck_JB->setChecked(ck_JB->isEnabled() && (dev->test_req & TEST_JB)); ck_FT->setEnabled(dev->test_cap & TEST_FT && dev->media.type!="-" && !dev->media.type.contains("-ROM", Qt::CaseInsensitive)); ck_FT->setChecked(ck_FT->isEnabled() && (dev->test_req & TEST_FT)); ck_TA->setEnabled(dev->test_cap & TEST_TA && dev->media.creads); ck_TA->setChecked(ck_TA->isEnabled() && (dev->test_req & TEST_TA)); spd_RT->clear(); spd_RT->setEnabled(ck_RT->isChecked()); spd_WT->clear(); spd_WT->setEnabled(ck_WT->isChecked()); ck_WT_simul->setEnabled(ck_WT->isChecked()); spd_ERRC->clear(); spd_ERRC->setEnabled(ck_ERRC->isChecked()); spd_JB->clear(); spd_JB->setEnabled(ck_JB->isChecked()); spd_FT->clear(); spd_FT->setEnabled(ck_FT->isChecked()); // spd_TA->clear(); spd_TA->setEnabled(ck_TA->isChecked()); int idx; spd_RT->addItems(dev->media.rspeeds); spd_RT->addItem("Maximum"); idx = spd_RT->findText(QString::number(dev->tspeeds.rt)+".",Qt::MatchStartsWith); #ifndef QT_NO_DEBUG qDebug() << "spd_RT: " << dev->tspeeds.rt <<"idx:" << idx; #endif if (idx > 0) spd_RT->setCurrentIndex( idx ); spd_WT->addItems(dev->media.wspeedsd); spd_WT->addItem("Maximum"); idx = spd_WT->findText(QString::number(dev->tspeeds.wt)+".",Qt::MatchStartsWith); #ifndef QT_NO_DEBUG qDebug() << "spd_WT: " << dev->tspeeds.wt <<"idx:" << idx; #endif if (idx > 0) spd_WT->setCurrentIndex( idx ); spd_ERRC->addItems(dev->media.tspeeds_errc); spd_ERRC->addItem("Maximum"); idx = spd_ERRC->findText(QString::number(dev->tspeeds.errc)+"X",Qt::MatchStartsWith); #ifndef QT_NO_DEBUG qDebug() << "spd_ERRC: " << dev->tspeeds.errc <<"idx:" << idx; #endif if (idx > 0) spd_ERRC->setCurrentIndex( idx ); spd_JB->addItems(dev->media.tspeeds_jb); spd_JB->addItem("Maximum"); idx = spd_JB->findText(QString::number(dev->tspeeds.jb)+"X",Qt::MatchStartsWith); #ifndef QT_NO_DEBUG qDebug() << "spd_JB: " << dev->tspeeds.jb <<"idx:" << idx; #endif if (idx > 0) spd_JB->setCurrentIndex( idx ); spd_FT->addItems(dev->media.wspeedsd); spd_FT->addItem("Maximum"); idx = spd_FT->findText(QString::number(dev->tspeeds.ft)+".",Qt::MatchStartsWith); #ifndef QT_NO_DEBUG qDebug() << "spd_FT: " << dev->tspeeds.ft <<"idx:" << idx; #endif if (idx > 0) spd_FT->setCurrentIndex( idx ); // spd_TA->addItems(dev->media.rspeeds); if (setPlugin) { cb_plugin->addItem(tr("< Autodetect >")); cb_plugin->addItems(dev->plugin_names); idx = cb_plugin->findText(dev->plugin); if (idx > 0) cb_plugin->setCurrentIndex( idx ); else pluginChanged(0); } } void TestDialog::saveData() { dev->test_req = (ck_RT->isChecked() ? TEST_RT : 0) | (ck_WT->isChecked() ? TEST_WT : 0) | (ck_ERRC->isChecked() ? TEST_ERRC : 0) | (ck_JB->isChecked() ? TEST_JB : 0) | (ck_FT->isChecked() ? TEST_FT : 0) | (ck_TA->isChecked() ? TEST_TA : 0); dev->WT_simul = noSimul ? 0 : ck_WT_simul->isChecked(); dev->tspeeds.rt = (int) spd_RT->currentText().remove(QRegExp("[Xx]")).toFloat(); dev->tspeeds.wt = (int) spd_WT->currentText().remove(QRegExp("[Xx]")).toFloat(); dev->tspeeds.errc = (int) spd_ERRC->currentText().remove(QRegExp("[Xx]")).toFloat(); dev->tspeeds.jb = (int) spd_JB->currentText().remove(QRegExp("[Xx]")).toFloat(); dev->tspeeds.ft = (int) spd_FT->currentText().remove(QRegExp("[Xx]")).toFloat(); dev->plugin = (cb_plugin->currentIndex() ? cb_plugin->currentText() : ""); // dev->tspeeds.ta = (int) spd_TA->currentText().remove(QRegExp("[Xx]")).toFloat(); #ifndef QT_NO_DEBUG qDebug() << "spd RT : " << dev->tspeeds.rt; qDebug() << "spd WT : " << dev->tspeeds.wt; qDebug() << "spd ERRC: " << dev->tspeeds.errc; qDebug() << "spd JB : " << dev->tspeeds.jb; qDebug() << "spd FT : " << dev->tspeeds.ft; #endif } void TestDialog::pluginChanged(int idx) { ProgressWidget *progress; bool relock=0; // bool preservePluginsList = dev->preservePluginsList; #ifndef QT_NO_DEBUG qDebug() << "pluginChanged()"; #endif if (idx > (dev->plugin_infos.size()+2)) { l_plugin_info->setText(tr("plugin info error")); return; } if (!idx) { l_plugin_info->setText(tr("qScan will probe plugin for your drive")); } else { if (!dev->plugin_infos[idx-1].isEmpty()) { l_plugin_info->setText(dev->plugin_infos[idx-1]); } else { l_plugin_info->setText(tr("no plugin info")); } } saveData(); /* if (!dev->mutex->tryLock()) { relock = 1; dev->mutex->unlock(); } */ progress = new ProgressWidget(10,3, isVisible() ? this : (QWidget*)parent() ); progress->setText(tr("Retrieving test capabilities...")); progress->show(); dev->update_plugin_info(); while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } delete progress; // dev->preservePluginsList = preservePluginsList; // if (relock) dev->mutex->lock(); updateData(false, false); } qpxtool-0.7.1_002/gui/src/main.cpp0000644000175000001440000000312211337441030016053 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include "../config.h" int main(int ac, char** av) { int r; QApplication *QPxTool; QPxToolMW *mainwin; QTranslator *translator; QSplashScreen *splash; QString locale = QLocale::system().name(); QPixmap *pix; QPxTool = new QApplication(ac,av); #ifndef QT_NO_DEBUG qDebug("Creating splash screen..."); #endif pix = new QPixmap (":images/splash.png"); splash = new QSplashScreen( *pix ); splash->show(); translator = new QTranslator; #ifndef QT_NO_DEBUG qDebug("* Loading translator..."); #endif if (!translator->load("qpxtool."+locale, INSTALL_PREFIX"/share/qpxtool/locale")) { qDebug() << "** Can't load translation for current locale: " << locale; } else { QPxTool->installTranslator(translator); } QPxTool->setWindowIcon( QIcon(":images/q.png") ); mainwin = new QPxToolMW(ac,av); splash->finish(mainwin); mainwin->show(); r = QPxTool->exec(); delete mainwin; delete translator; delete splash; delete pix; delete QPxTool; return r; } qpxtool-0.7.1_002/gui/src/abstractpreview.cpp0000644000175000001440000014212711334224670020353 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Maxim Aldanov , Gennady "ShultZ" Kozlov * Copyright (C) 2008 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include "abstractpreview.h" //-------------------------------------------------------------- #define DEFAULT_MARGIN_LEFT 15 #define DEFAULT_MARGIN_RIGHT 10 #define DEFAULT_MARGIN_TOP 10 #define DEFAULT_MARGIN_BOTTOM 10 //-------------------------------------------------------------- #define DEFAULT_SCALE_STEP 1.414213562 #define TILE_MAX_WIDTH 512 #define TILE_MAX_HEIGHT 512 #define CACHE_SIZE_MAX (16 << 20) #define PRINTER_USE_FULLPAGE 1 #ifndef QT_NO_DEBUG //#define DEBUG_PAINT_TIME #define DEBUG_PRINT_TIME #endif //-------------------------------------------------------------- class AbstractPreview; class AbstractPreviewPrivate; //-------------------------------------------------------------- int QPageInfo::page() const { return fpage; } QRect QPageInfo::rect() const { return frect; } //-------------------------------------------------------------- class QMousePressData { public: QMousePressData() {press = false;} bool press; QPoint pos; }; //-------------------------------------------------------------- class QPageData { public: QPageData() { reDraw = true; index = -1; } QPageData(const QPageData &data) { index = data.index; reDraw = data.reDraw; this->data = data.data; } ~QPageData() {} QPageData &operator=(const QPageData &data) { if(this == &data)return *this; index = data.index; reDraw = data.reDraw; this->data = data.data; return *this; } bool isValid() { return (bool)(index == -1); } int index; QVariant data; bool reDraw; protected: private: }; //-------------------------------------------------------------- //-------------------------------------------------------------- class TilesCache { private: class Tile { public: Tile(QPixmap *pix, int p, int x, int y) : data(pix), page(p), xidx(x), yidx(y) {}; ~Tile() { if (data) delete data; }; QPixmap *data; int page, xidx, yidx; }; public: TilesCache(); ~TilesCache(); void clear(); void setTileSize(int maxW, int maxH); void insertPages(int start, int count); void deletePages(int start, int count); void addTile(QPixmap*, int page, int x, int y); QPixmap* getTile(int page, int x, int y); private: int maxWidth, maxHeight; int maxTiles; QList tiles; }; //-------------------------------------------------------------- class AbstractPreviewPrivate { friend class AbstractPreview; public: AbstractPreviewPrivate(AbstractPreview *preview, QPrinter *printer); ~AbstractPreviewPrivate(); void changeScale(); void setPageDefaults(); void setup(); void calcParamDraw(); inline int paperWidthToScale(); inline int paperHeightToScale(); inline int paperWidth(); inline int paperHeight(); int addPages(int count = 1); int insertPages(int &index, int count = 1); int deletePages(int index, int count = 1); QPageData *pageData(int index); void clear(); void flushCache(); void flushPage(int page); protected: void inits(); void recalcMarginsFromMM(); private: int tileWidth, tileHeight; int tileCols, tileRows; TilesCache cache; AbstractPreview *preview; QPrinter *printer; QPaintDevice *currentDevice; //Определение цветов Ð´Ð»Ñ Ñ€Ð°Ð¼ÐºÐ¸ Ñтраницы и тени QColor bgc; QColor cl; QColor sh1, sh2, sh3; qreal s1, s2, s3; //Параметры размера Ñтраницы QSizeF paperSizeMM; //Оригинальный размер Ñтраницы в мм QSize paperSize; //Размер Ñтраницы Ñ Ð¾ÐºÑ€ÑƒÐ³Ð»ÐµÐ½Ð¸ÐµÐ¼ и в пикÑелах QSize paperSizeScaled; //Размер Ñтраницы Ñ ÑƒÑ‡Ñ‘Ñ‚Ð¾Ð¼ округлений и маÑштаба QSizeF pageSizeMM; //ПрÑмоугольник рабочей облаÑти Ñтраницы в мм QSize pageSize; //то же, но Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ Ð¾ÐºÑ€ÑƒÐ³Ð»ÐµÐ½Ð¸Ñ Ð¸ в пикÑелах QSize pageSizeScaled; // Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ маÑштаба QVector marginRects; int w, h; //выÑота и ширина рабочей облаÑти Ñ ÑƒÑ‡Ñ‘Ñ‚Ð¾Ð¼ Ð¾ÐºÑ€ÑƒÐ³Ð»ÐµÐ½Ð¸Ñ //ОтÑтупы Ñтраницы и раÑÑтоÑние между Ñтраницами int pageMargin, interPageSpacing; int pageLabelHeight; QRect pageLabelRect; // отÑтупы на лиÑте в мм qreal mm_left, mm_right, mm_top, mm_bottom; // то же, но в пикÑелах int mp_left, mp_right, mp_top, mp_bottom; // Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ маÑштаба int ms_left, ms_top; // int ms_right, // ms_bottom; //Общее количеÑтво Ñтраниц, колонок и Ñтрок Ñтраниц int cols, rows; //Параметры Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ´Ð²Ð¸Ð¶ÐµÐ½Ð¸Ñ Ñтраниц мышкой QMousePressData mousePressData; QPoint scrollBarValueOnMousePress; //МаÑтштаб double scale, scaleStep, scaleMax, scaleMin; //Координаты Ð´Ð»Ñ Ð½Ð°Ñ‡Ð°Ð»ÑŒÐ½Ð¾Ð¹ Ñтраницы qreal xx, yy; int offsXpage; int offsYpage; //Ðеобходимое количеÑтво Ñтрок Ñтраниц Ð´Ð»Ñ Ð¾Ñ‚Ñ€Ð¸Ñовки и номер начальной //Ñтраницы Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ начинаетÑÑ Ð¾Ñ‚Ñ€Ð¸Ñовка документа int countPagesRow, beginPageNumber; QList pagesData; AbstractPreview::PreviewMode viewMode; int selectPageIndex; QPoint topLeftPage; QVector pagesRect; QRect currentPageRect; QPageInfo enterPageInfo; bool mouseTrackingPage; bool mouseEnterLeavePage; bool movedContents; }; //-------------------------------------------------------------- TilesCache::TilesCache() { maxWidth = TILE_MAX_WIDTH; maxHeight = TILE_MAX_HEIGHT; maxTiles = CACHE_SIZE_MAX / maxWidth / maxHeight; #ifndef QT_NO_DEBUG qDebug() << "maxTiles: " << maxTiles; #endif } TilesCache::~TilesCache() { clear(); } void TilesCache::clear() { #ifndef QT_NO_DEBUG qDebug() << "TilesCache::clear()"; #endif for (int i=tiles.size(); i>0; i--) delete tiles.takeLast(); tiles.clear(); } void TilesCache::setTileSize(int maxW, int maxH) { #ifndef QT_NO_DEBUG qDebug() << "TilesCache::setTileSize() " << maxW << "x" << maxH; #endif clear(); maxWidth = maxW; maxHeight = maxH; maxTiles = CACHE_SIZE_MAX / maxWidth / maxHeight; #ifndef QT_NO_DEBUG qDebug() << "maxTiles: " << maxTiles; #endif } void TilesCache::insertPages(int start, int count) { #ifndef QT_NO_DEBUG qDebug() << "TilesCache::insertPages() start: " << start << " count: " << count; #endif for (int i=tiles.size()-1; i>=0; i--) if (tiles[i]->page >= start) tiles[i]->page+=count; } void TilesCache::deletePages(int start, int count) { int end = start+count-1; #ifndef QT_NO_DEBUG qDebug() << "TilesCache::deletePages() start: " << start << " count: " << count; #endif for (int i=tiles.size()-1; i>=0; i--) { if (tiles[i]->page > end) tiles[i]->page-=count; else if (tiles[i]->page >= start) delete tiles.takeAt(i); } } QPixmap* TilesCache::getTile(int page, int xidx, int yidx) { Tile *tile; #ifndef QT_NO_DEBUG // qDebug() << "TilesCache::getTile(): " << page << " x:" << xidx << " y:" << yidx; #endif for (int i=0; ipage == page && tile->xidx == xidx && tile->yidx == yidx) { if (i) { tile = tiles.takeAt(i); tiles.prepend(tile); } #ifndef QT_NO_DEBUG // qDebug() << "Tile found at index " << i; #endif return tile->data; } } return NULL; } void TilesCache::addTile(QPixmap *pix, int page, int x, int y) { Tile *tile = new Tile(pix,page,x,y); #ifndef QT_NO_DEBUG // qDebug() << "TilesCache::addTile(): " << tile->page << " x:" << tile->xidx << " y:" << tile->yidx; #endif tiles.prepend(tile); if (tiles.size()>maxTiles) { #ifndef QT_NO_DEBUG qDebug() << "maxTiles reached. removing last"; #endif delete tiles.takeLast(); } } //-------------------------------------------------------------- AbstractPreviewPrivate::AbstractPreviewPrivate(AbstractPreview *preview, QPrinter *printer) { mouseTrackingPage = false; mouseEnterLeavePage = true; movedContents = true; this->preview = preview; this->printer = printer; interPageSpacing = 8; pageMargin = 5; pageLabelHeight = 0; offsXpage = pageMargin; offsYpage = pageMargin; scale = 1.0; scaleStep = DEFAULT_SCALE_STEP; scaleMax = 2; scaleMin = 0.25; viewMode = AbstractPreview::Mode_Normal; selectPageIndex = 0; currentDevice = preview; setPageDefaults(); changeScale(); } //-------------------------------------------------------------- AbstractPreviewPrivate::~AbstractPreviewPrivate() { clear(); } //-------------------------------------------------------------- void AbstractPreviewPrivate::inits() { preview->viewport()->setBackgroundRole(QPalette::Dark); bgc = preview->viewport()->palette().color(QPalette::Dark); cl = QColor(bgc.red() * 0.9, bgc.green() * 0.9, bgc.blue() * 0.9); sh1 = QColor(bgc.red() * 0.4, bgc.green() * 0.4, bgc.blue() * 0.4); sh2 = QColor(bgc.red() * 0.6, bgc.green() * 0.6, bgc.blue() * 0.6); sh3 = cl; interPageSpacing = 8; pageMargin = 5; } //-------------------------------------------------------------- void AbstractPreviewPrivate::recalcMarginsFromMM() { mp_left = inchesToPixelsX ( mmToInches(mm_left), currentDevice); mp_right = inchesToPixelsX ( mmToInches(mm_right), currentDevice); mp_top = inchesToPixelsY ( mmToInches(mm_top), currentDevice); mp_bottom = inchesToPixelsY ( mmToInches(mm_bottom), currentDevice); } //-------------------------------------------------------------- void AbstractPreviewPrivate::changeScale() { qreal fw,fh,pw,ph; // QRect rect; flushCache(); ms_left = mp_left * scale; ms_top = mp_top * scale; // ms_right = mp_right * scale; // ms_bottom = mp_bottom * scale; s1 = 1 / scale; s2 = 2 / scale; s3 = 3 / scale; fw = paperSize.width() * scale; if(fw - ((qreal)(int)fw) > 0.0) paperSizeScaled.setWidth((int)fw + 1); else paperSizeScaled.setWidth((int)fw); fh = paperSize.height() * scale; if(fh - ((qreal)(int)fh) > 0.0) paperSizeScaled.setHeight((int)fh + 1); else paperSizeScaled.setHeight((int)fh); pw = pageSize.width() * scale; if(pw - ((qreal)(int)pw) > 0.0) pageSizeScaled.setWidth((int)pw + 1); else pageSizeScaled.setWidth((int)pw); ph = pageSize.height() * scale; if(ph - ((qreal)(int)ph) > 0.0) pageSizeScaled.setHeight((int)ph + 1); else pageSizeScaled.setHeight((int)ph); fh = paperSizeScaled.height(); fw = paperSizeScaled.width(); ph = pageSizeScaled.height(); pw = pageSizeScaled.width(); marginRects.clear(); marginRects << QRect( QPoint(1,1), QSize( ms_left-1, fh-1)); marginRects << QRect( QPoint(ms_left + pw,1), QSize( fw - pw - ms_left, fh-1)); marginRects << QRect( QPoint(ms_left,1), QSize( pw, ms_top-1)); marginRects << QRect( QPoint(ms_left, ph + ms_top), QSize( pw, fh - ph - ms_top)); tileWidth = qMin(pageSizeScaled.width()+1, TILE_MAX_WIDTH); tileCols = pageSizeScaled.width() / tileWidth; if (pageSizeScaled.width() % tileWidth) tileCols++; tileHeight = qMin(pageSizeScaled.height()+1, TILE_MAX_HEIGHT); tileRows = pageSizeScaled.height() / tileHeight; if (pageSizeScaled.height() % tileHeight) tileRows++; cache.setTileSize(tileWidth, tileHeight); #ifndef QT_NO_DEBUG qDebug() << "page tiles: " << tileCols << "x" << tileRows; #endif } //-------------------------------------------------------------- void AbstractPreviewPrivate::setPageDefaults() { mm_left = DEFAULT_MARGIN_LEFT; mm_right = DEFAULT_MARGIN_RIGHT; mm_top = DEFAULT_MARGIN_TOP; mm_bottom = DEFAULT_MARGIN_BOTTOM; recalcMarginsFromMM(); printer->setPaperSize(QPrinter::A4); printer->setPageMargins(mm_left, mm_top, mm_right, mm_bottom, QPrinter::Millimeter); #ifdef PRINTER_USE_FULLPAGE printer->setFullPage(true); #else printer->setFullPage(false); #endif setup(); } //-------------------------------------------------------------- void AbstractPreviewPrivate::setup() { paperSizeMM = printer->paperRect(QPrinter::Millimeter).size(); paperSize = QSize( inchesToPixelsX ( mmToInches(paperSizeMM.width()), currentDevice) +1, inchesToPixelsY ( mmToInches(paperSizeMM.height()), currentDevice) +1 ); // if(paperSizeMM.width() - ((qreal)(int)paperSize.width()) > 0.0) paperSize.setWidth ((int)paperSize.width() + 1); // if(paperSizeMM.height() - ((qreal)(int)paperSize.height()) > 0.0) paperSize.setHeight((int)paperSize.height() + 1); // if(pageSizeMM.width() - ((qreal)(int)pageSize.width()) > 0.0) pageSize.setWidth ((int)pageSize.width() + 1); // if(pageSizeMM.height() - ((qreal)(int)pageSize.height()) > 0.0) pageSize.setHeight((int)pageSize.height() + 1); printer->getPageMargins(&mm_left, &mm_top, &mm_right, &mm_bottom, QPrinter::Millimeter); recalcMarginsFromMM(); #if (PRINTER_USE_FULLPAGE == 1) || (QT_VERSION < 0x040500) pageSizeMM = QSize( paperSizeMM.width() - mm_left - mm_right, paperSizeMM.height() - mm_top - mm_bottom ); #else pageSizeMM = printer->pageRect(QPrinter::Millimeter).size(); #endif pageSize = QSize( inchesToPixelsX ( mmToInches(pageSizeMM.width()), currentDevice) + 1, inchesToPixelsY ( mmToInches(pageSizeMM.height()), currentDevice) + 1 ); w = paperSize.width(); h = paperSize.height(); #ifndef QT_NO_DEBUG qDebug() << "device DPI (phy) X:" << currentDevice->physicalDpiX() << " Y:" << currentDevice->physicalDpiY(); qDebug() << "device DPI (log) X:" << currentDevice->logicalDpiX() << " Y:" << currentDevice->logicalDpiY(); qDebug() << "paperSize (mm): " << paperSizeMM.width() << "x" << paperSizeMM.height(); qDebug() << "pageSize (mm): " << pageSizeMM.width() << "x" << pageSizeMM.height(); qDebug() << "pageSize (px): " << w << "x"<< h; #endif } //-------------------------------------------------------------- void AbstractPreviewPrivate::calcParamDraw() { #ifndef QT_NO_DEBUG // qDebug() << "calcParamRedraw(): preview @ "<< preview; #endif const int startRow = (preview->verticalScrollBar()->value() - pageMargin) / (paperHeightToScale() + interPageSpacing + pageLabelHeight); const double hsp = paperHeightToScale() + interPageSpacing; const int vph = preview->viewport()->height(); yy = ((paperHeightToScale() + interPageSpacing + pageLabelHeight) * startRow + pageMargin); yy = (qreal)preview->verticalScrollBar()->value() - yy; xx = offsXpage; if(!preview->horizontalScrollBar()->value()) { if(preview->viewport()->width() < paperWidthToScale()) xx = offsXpage; else { if(cols == 1) xx = (preview->viewport()->width() - paperWidthToScale()) / 2; else xx = (preview->viewport()->width() - (paperWidthToScale() * cols + interPageSpacing * (cols - 1))) / 2; } } countPagesRow = 1; int t = (qreal)(-yy); t += hsp; while(t < vph) { t += hsp; countPagesRow++; } beginPageNumber = startRow * cols; } //-------------------------------------------------------------- int AbstractPreviewPrivate::paperWidthToScale() { return paperSizeScaled.width(); } int AbstractPreviewPrivate::paperHeightToScale() { return paperSizeScaled.height(); } int AbstractPreviewPrivate::paperWidth() { return paperSize.width(); } int AbstractPreviewPrivate::paperHeight() { return paperSize.height(); } //-------------------------------------------------------------- void AbstractPreviewPrivate::flushCache() { cache.clear(); } //-------------------------------------------------------------- int AbstractPreviewPrivate::addPages(int count/* = 1*/) { if(count < 1)return 0; int c = 0; for(int i = 0; i < count; i++) { QPageData *pd = new QPageData; pd->index = pagesData.count(); pd->reDraw = true; pagesData.append(pd); c++; } return c; } //-------------------------------------------------------------- int AbstractPreviewPrivate::insertPages(int &index, int count/* = 1*/) { if(count < 1)return 0; if(index >= pagesData.count()) { index = pagesData.count(); return addPages(count); } index = qMax(index, 0); int c = 0; for(int i = 0; i < count; i++) { QPageData *pd = new QPageData; pd->index = pagesData.count(); pd->reDraw = true; pagesData.insert(index, pd); c++; } cache.insertPages(index, c); return c; } //-------------------------------------------------------------- int AbstractPreviewPrivate::deletePages(int index, int count/* = 1*/) { if(count < 1)return 0; if(index >= pagesData.count())return 0; int c = 0; while(count) { delete pagesData.takeAt(index); count--; c++; } cache.deletePages(index, c); return c; } //-------------------------------------------------------------- void AbstractPreviewPrivate::flushPage(int page) { cache.deletePages(page, 1); } //-------------------------------------------------------------- QPageData *AbstractPreviewPrivate::pageData(int index) { if(index < 0 || index >= pagesData.count())return NULL; return pagesData[index]; } //-------------------------------------------------------------- void AbstractPreviewPrivate::clear() { flushCache(); while(pagesData.count()) { delete pagesData.takeLast(); } } //-------------------------------------------------------------- AbstractPreview::AbstractPreview(QWidget *parent, QPrinter *printer) : QAbstractScrollArea(parent) { setMouseTracking(true); dv = new AbstractPreviewPrivate(this, printer); dp = NULL; d = dv; verticalScrollBar()->setSingleStep(20); horizontalScrollBar()->setSingleStep(20); // d->addPage(); d->inits(); } //-------------------------------------------------------------- AbstractPreview::AbstractPreview(QWidget *parent, QPrinter *printer, int _countPage) : QAbstractScrollArea(parent) { setMouseTracking(true); dv = new AbstractPreviewPrivate(this, printer); dp = NULL; d = dv; verticalScrollBar()->setSingleStep(20); horizontalScrollBar()->setSingleStep(20); if(_countPage < 0)_countPage = 1; d->addPages(_countPage); d->inits(); sizeToCountPage(); } //-------------------------------------------------------------- AbstractPreview::~AbstractPreview() { delete d; } //-------------------------------------------------------------- int AbstractPreview::sizeToCountPage() { if(!d->pagesData.count()) { verticalScrollBar()->setRange(0, 0); horizontalScrollBar()->setRange(0, 0); d->cols = 0; d->rows = 0; return 0; } int cols; if(d->viewMode == AbstractPreview::Mode_Normal) { cols = (int)(viewport()->width() - 2 * d->pageMargin + d->interPageSpacing) / (d->paperSize.width() * d->scale + d->interPageSpacing); } else { cols = 1; } if(!cols)cols = 1; if(cols > d->pagesData.count())cols = d->pagesData.count(); int rows = (d->pagesData.count() + cols - 1) / cols; int h = qRound(rows * (d->paperHeightToScale() + d->pageLabelHeight) + (rows - 1) * d->interPageSpacing + 2 * d->pageMargin); int w = qRound(cols * d->paperWidthToScale() + 2 * d->pageMargin); horizontalScrollBar()->setRange(0, w - viewport()->width()); horizontalScrollBar()->setPageStep(viewport()->width()); verticalScrollBar()->setRange(0, h - viewport()->height()); verticalScrollBar()->setPageStep(viewport()->height()); d->cols = cols; d->rows = rows; return 0; } //-------------------------------------------------------------- void AbstractPreview::autoscaleThumbs() { // qDebug() << "autoscaleThumbs(): w=" << d->w << " viewport()->width()=" << viewport()->width(); int w = viewport()->width() - 2 * d->pageMargin + d->interPageSpacing - 10; if (w<1) w=1; qreal scale = w / (float) d->paperSize.width(); if (scale != d->scale) { d->scale = scale; d->changeScale(); d->pageLabelRect = QRect(1,d->paperSizeScaled.height() + 3, d->paperSizeScaled.width(), d->pageLabelHeight); } sizeToCountPage(); } //-------------------------------------------------------------- void AbstractPreview::resizeEvent(QResizeEvent *) { d->enterPageInfo = QPageInfo(); if(d->viewMode == AbstractPreview::Mode_Thumbs) { autoscaleThumbs(); } else { sizeToCountPage(); } d->calcParamDraw(); } //-------------------------------------------------------------- void AbstractPreview::scrollContentsBy(int dx, int dy) { d->enterPageInfo = QPageInfo(); d->offsXpage += dx; d->offsYpage += dy; if(dx || dy) d->calcParamDraw(); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::paintBorder(QPainter *p) { #if 0 p->setPen(d->cl); p->drawRect( QRect( QPoint(0,0), d->paperSize) ); // p->setPen(Qt::red); // p->drawRect( QRect( QPoint(d->mp_left, d->mp_top), d->pageSize - QSize(1,1) ) ); #endif p->setPen(d->sh1); p->drawLine(QLineF(d->w + d->s1, d->s3, d->w + d->s1, d->h + d->s1)); p->drawLine(QLineF(d->s3, d->h + d->s1, d->w + d->s1, d->h + d->s1)); p->setPen(d->sh2); p->drawLine(QLineF(d->w + d->s2, d->s3, d->w + d->s2, d->h + d->s2)); p->drawLine(QLineF(d->s3, d->h + d->s2, d->w + d->s2, d->h + d->s2)); p->setPen(d->sh3); p->drawLine(QLineF(d->w + d->s3, d->s3, d->w + d->s3, d->h + d->s3)); p->drawLine(QLineF(d->s3, d->h + d->s3, d->w + d->s3, d->h + d->s3)); } //-------------------------------------------------------------- QPixmap* AbstractPreview::getTile(int page, int tx, int ty) { QPixmap *pix = d->cache.getTile(page,tx,ty); if(!pix) { #ifndef QT_NO_DEBUG // qDebug() << "Tile not found in cache, rendering new one"; #endif // tile->data = new QPixmap(d->paperWidthToScale() + 1, d->paperHeightToScale() + 1); pix = new QPixmap( qMin(d->tileWidth, (d->pageSizeScaled.width() - d->tileWidth * tx)), qMin(d->tileHeight, (d->pageSizeScaled.height() - d->tileHeight * ty)) ); // qDebug() << "page " << page << " tile: " << ty << "," << tx << " " << pix->width() << "x" << pix->height(); //tile->data->fill(d->bkg); QPainter pp(pix); // pp.setPen(d->cl); pp.setPen(Qt::white); pp.setBrush(Qt::white); pp.drawRect( QRect(QPoint(0,0), pix->size()) ); pp.scale(d->scale, d->scale); // pp.translate(d->mp_left, d->mp_top); paintPage(&pp, page, QRect( QPoint(d->tileWidth * tx, d->tileHeight * ty) / d->scale, pix->size() / d->scale ) ); d->cache.addTile(pix, page, tx, ty); } /* #ifndef QT_NO_DEBUG qDebug() << "QPainter @" << (void*)p; qDebug() << "Tile @" << (void*)tile; if (tile) { qDebug() << "Tile data @" << (void*)tile->data; } #endif */ return pix; } void AbstractPreview::updatePage(int page, QRect rect) { //Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑ‡Ð°Ñтка Ñтраницы QPixmap pix(rect.size()); pix.fill(Qt::white); QPainter p(&pix); paintPage(&p, page, rect); QPageInfo info = pageInfo(page); int ty_sta, ty_end, tx_sta, tx_end; const int yy = info.rect().top(), xx = info.rect().left(); const int yy2 = yy + d->pageSizeScaled.height(), xx2 = xx + d->pageSizeScaled.width(); ty_sta = (yy < 0) ? (-yy / d->tileHeight) : 0; ty_end = (yy2 < viewport()->height()) ? d->tileRows : ((viewport()->height() - yy) / d->tileHeight) + 1; tx_sta = (xx<0) ? (-xx / d->tileWidth) : 0; tx_end = (xx2 < viewport()->width()) ? d->tileCols : ((viewport()->width() - xx) / d->tileWidth) + 1; for(int ty = ty_sta; ty < ty_end; ty++) { for(int tx = tx_sta; tx < tx_end; tx++) { QRect tileRect(d->tileWidth * tx, d->tileHeight * ty, d->tileWidth, d->tileHeight); QRect sec = tileRect.intersected(rect); if(!sec.isValid()) continue; QPixmap *px = getTile(page, tx, ty); if(!px)continue; QPainter pp(px); pp.drawPixmap(sec.topLeft() - tileRect.topLeft(), pix, QRect(sec.topLeft() - rect.topLeft(), sec.size())); } } viewport()->update(); } void AbstractPreview::paintEvent(QPaintEvent *) { d->pagesRect.clear();//Буфер координат текущих отриÑованных Ñтраниц QPainter *p = new QPainter(viewport()); // QPixmap *pix = NULL; int page = d->beginPageNumber; const QColor bkg = viewport()->backgroundRole(); int xx = d->xx, yy = -d->yy; int xx2,yy2; int ty_sta,ty_end,tx_sta,tx_end; QRect mrect; p->save(); p->translate(xx, yy); yy += (d->ms_top); for(int y = 0; y < d->countPagesRow; y++) { xx = d->xx + d->ms_left; yy2 = yy+d->pageSizeScaled.height(); ty_sta = (yy<0) ? (-yy / d->tileHeight) : 0; ty_end = (yy2height()) ? d->tileRows : ( (viewport()->height()-yy) / d->tileHeight)+1; p->save(); for(int x = 0; x < d->cols; x++) { xx2 = xx+d->pageSizeScaled.width(); tx_sta = (xx<0) ? (-xx / d->tileWidth) : 0; tx_end = (xx2width()) ? d->tileCols : ( (viewport()->width()-xx) / d->tileWidth)+1; p->save(); p->translate(d->ms_left, d->ms_top); #ifdef DEBUG_PAINT_TIME timeval tb,te; gettimeofday(&tb, NULL); #endif for(int ty=ty_sta; tydrawPixmap(d->tileWidth * tx, d->tileHeight * ty, *(getTile(page, tx, ty))); } } #ifdef DEBUG_PAINT_TIME gettimeofday(&te, NULL); qDebug() << "Page: " << page << " " << tx_sta << "." << ty_sta << " - " << tx_end << "." << ty_end << QString(" time: %1 s").arg(te.tv_sec - tb.tv_sec + (te.tv_usec - tb.tv_usec)/1000000.0,0,'f',4); #endif // p->drawPixmap(0, 0, *(getTile(page, 0, 0))); p->restore(); mrect = QRect( QPoint(-xx + d->ms_left, -yy + d->ms_top), viewport()->size() ); for (int i=0; imarginRects.size(); i++) { if (!i && d->viewMode == AbstractPreview::Mode_Normal) { // qDebug() << "page #" << page << mrect << d->marginRects[i] << d->marginRects[i].intersected(mrect); } p->fillRect(d->marginRects[i].intersected(mrect), QBrush(Qt::white)); } p->save(); p->scale(d->scale, d->scale); if(d->viewMode == AbstractPreview::Mode_Thumbs && d->selectPageIndex == page) { #ifndef QT_NO_DEBUG qDebug() << "Thumbs selected page: " << page; #endif QRect rr = QRect( QPoint(0,0), d->paperSize); //p->setCompositionMode(QPainter::CompositionMode_Multiply); //p->setCompositionMode(QPainter::CompositionMode_Xor); QColor col = palette().color(QPalette::Highlight); QColor colb = palette().color(QPalette::Highlight); colb.setAlpha(0x80); p->setPen(col); p->setBrush(colb); p->drawRect(rr); //p->setCompositionMode(QPainter::CompositionMode_SourceOver); } paintBorder(p); //СохранÑем параметры прориÑованных Ñтраниц QPageInfo pg(page, QRect(xx - d->ms_left, yy - d->ms_top, d->paperWidthToScale(), d->paperHeightToScale())); d->pagesRect.append(pg); //Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ñ€Ð¸Ñовка Ñтраницы QRect rr(0, 0, viewport()->width() - 1, viewport()->height() - 1); QRect rr1 = pg.rect().intersected(rr); p->save(); additionalPaintEvent(p, page, rr1); //Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ñ€Ð¸Ñовка Ñтраниц p->restore(); p->restore(); if (d->pageLabelHeight) { p->setPen(palette().color(QPalette::Text)); p->drawText( d->pageLabelRect, Qt::AlignCenter, QString::number(page+1)); } page++; if(page == d->pagesData.count()) break; xx += (d->paperWidthToScale() + d->interPageSpacing); p->translate((d->paperWidthToScale() + d->interPageSpacing), 0); } //end for(int x = 0; x < d->cols; x++) if(d->viewMode != Mode_Thumbs) { int _y = yy - d->ms_top; if(_y < (viewport()->height()>>1)) { d->selectPageIndex = page - 1; } } p->restore(); if(page == d->pagesData.count())break; p->translate(0, d->paperHeightToScale() + d->interPageSpacing + d->pageLabelHeight); yy += (d->paperHeightToScale() + d->interPageSpacing + d->pageLabelHeight); } //end for(int y = 0; y < d->countPagesRow; y++) p->restore(); // for(int i = 0; i < d->pagesRect.count(); i++) { // p->setPen(Qt::red); // p->drawRect(d->pagesRect[i].rect()); // } delete p; if(d->viewMode != Mode_Thumbs && d->selectPageIndex >= 0) { emit currentPage(d->selectPageIndex); } } //-------------------------------------------------------------- void AbstractPreview::additionalPaintEvent(QPainter *p, int page, const QRect &rect) { Q_UNUSED(p); Q_UNUSED(page); } //-------------------------------------------------------------- QSize AbstractPreview::getPaperSize() { return d->paperSize; } QSize AbstractPreview::getPageSize() { return d->pageSize; } //-------------------------------------------------------------- int AbstractPreview::page(QPoint point) { const int count = d->pagesRect.count(); int sel = -1; for(int i = 0; i < count; i++) { if(d->pagesRect[i].rect().contains(point)) { sel = d->pagesRect[i].page(); break; } } if(sel >= 0) return sel; return -1; } //-------------------------------------------------------------- QRect AbstractPreview::pageRect(QPoint point) { const int count = d->pagesRect.count(); int sel = -1; for(int i = 0; i < count; i++) { if(d->pagesRect[i].rect().contains(point)) { return d->pagesRect[i].rect(); break; } } return QRect(); } //-------------------------------------------------------------- QPoint AbstractPreview::toPage(QPoint point) { const int count = d->pagesRect.count(); for(int i = 0; i < count; i++) { if(d->pagesRect[i].rect().contains(point)) { return point - d->pagesRect[i].rect().topLeft(); } } return QPoint(); } //-------------------------------------------------------------- QPoint AbstractPreview::toCurrentPage(QPoint point) { if(!d->currentPageRect.contains(point))return QPoint(); return point - d->currentPageRect.topLeft(); } //-------------------------------------------------------------- QPageInfo AbstractPreview::pageInfo(int page) { if(d->enterPageInfo.isValid() && d->enterPageInfo.page() == page) return d->enterPageInfo; const int count = d->pagesRect.count(); QPageInfo info; //QRect rect; for(int i = 0; i < count; i++) { if(d->pagesRect[i].page() == page) { info = QPageInfo(page, d->pagesRect[i].rect()); return info; } } return info; } //-------------------------------------------------------------- QPageInfo AbstractPreview::pageInfo(const QPoint &point) { int page = -1; QRect rect; if(!d->enterPageInfo.rect().contains(point)) { const int count = d->pagesRect.count(); for(int i = 0; i < count; i++) { rect = d->pagesRect[i].rect(); if(rect.contains(point)) { page = d->pagesRect[i].page(); break; } } if(page == -1) d->enterPageInfo = QPageInfo(); else d->enterPageInfo = QPageInfo(page, rect); } return d->enterPageInfo; } //-------------------------------------------------------------- QVector AbstractPreview::visiblePages() { return d->pagesRect; } //-------------------------------------------------------------- void AbstractPreview::startMoveContext(const QPoint &point) { d->mousePressData.press = true; d->mousePressData.pos = point; d->scrollBarValueOnMousePress.rx() = horizontalScrollBar()->value(); d->scrollBarValueOnMousePress.ry() = verticalScrollBar()->value(); //d->scrollBarValueOnMousePress = point; } //-------------------------------------------------------------- void AbstractPreview::moveContext(const QPoint &point) { if(!d->mousePressData.press && d->scrollBarValueOnMousePress.isNull())return; horizontalScrollBar()->setValue(d->scrollBarValueOnMousePress.x() - point.x() + d->mousePressData.pos.x()); verticalScrollBar()->setValue(d->scrollBarValueOnMousePress.y() - point.y() + d->mousePressData.pos.y()); d->calcParamDraw(); horizontalScrollBar()->update(); } //-------------------------------------------------------------- void AbstractPreview::endMoveContext() { d->mousePressData.press = false; d->mousePressData.pos = QPoint(); d->scrollBarValueOnMousePress = QPoint(); } //-------------------------------------------------------------- void AbstractPreview::mousePressEvent(QMouseEvent *e) { startMoveContext(e->pos()); const int count = d->pagesRect.count(); int sel = -1; for(int i = 0; i < count; i++) { if(d->pagesRect[i].rect().contains(e->pos())) { sel = d->pagesRect[i].page(); d->currentPageRect = d->pagesRect[i].rect(); break; } } if(sel >= 0) { #warning disabled due to enable multiple selection of same page (i.e. to return to viewed page) // if(d->selectPageIndex == sel) return; d->selectPageIndex = sel; //Вызываем Ñобытие клика мышкой на Ñтранице mousePressPageEvent(e, d->selectPageIndex, d->currentPageRect, toCurrentPage(e->pos())); emit pageSelected(d->selectPageIndex); updatePreview(); } else { if(d->selectPageIndex == -1) return; d->selectPageIndex = -1; updatePreview(); } } //-------------------------------------------------------------- void AbstractPreview::mouseMoveEvent(QMouseEvent *e) { if(!d->mousePressData.press) { pageInfo(e->pos()); if(d->enterPageInfo.isValid()) mouseMovePageEvent(e, d->enterPageInfo); e->ignore(); return; } if(d->movedContents) moveContext(e->pos()); } //-------------------------------------------------------------- void AbstractPreview::mouseReleaseEvent(QMouseEvent *e) { Q_UNUSED(e); endMoveContext(); } //-------------------------------------------------------------- void AbstractPreview::mousePressPageEvent(QMouseEvent *event, int page, QRect rect, QPoint point) { Q_UNUSED(event); Q_UNUSED(page); Q_UNUSED(rect); Q_UNUSED(point); } //-------------------------------------------------------------- void AbstractPreview::mouseMovePageEvent(QMouseEvent *event, const QPageInfo &info) { Q_UNUSED(event); Q_UNUSED(info); } //-------------------------------------------------------------- void AbstractPreview::wheelEvent(QWheelEvent * event) { if(event->modifiers() != Qt::ControlModifier) { QAbstractScrollArea::wheelEvent(event); return; } if (event->delta() > 0) scaleIn(); else scaleOut(); } //-------------------------------------------------------------- void AbstractPreview::setInterPageSpacing(int spacing) { if(d->interPageSpacing == spacing)return; d->interPageSpacing = spacing; sizeToCountPage(); updatePreview(); } //-------------------------------------------------------------- int AbstractPreview::interPageSpacing() { return d->interPageSpacing; } //-------------------------------------------------------------- void AbstractPreview::setPageMargin(int margin) { if(d->pageMargin == margin)return; d->pageMargin = margin; sizeToCountPage(); updatePreview(); } //-------------------------------------------------------------- int AbstractPreview::pageMargin() { return d->pageMargin; } //-------------------------------------------------------------- int AbstractPreview::pageCount() { return d->pagesData.count(); } //-------------------------------------------------------------- void AbstractPreview::setMargins(qreal ml, qreal mt, qreal mr, qreal mb) { if(d->mm_left == ml && d->mm_right == mr && d->mm_top == mt && d->mm_bottom == mb)return; d->mm_left = ml; d->mm_right = mr; d->mm_top = mt; d->mm_bottom = mb; d->mp_left = inchesToPixelsX ( mmToInches(d->mm_left), this); d->mp_right = inchesToPixelsX ( mmToInches(d->mm_right), this); d->mp_bottom = inchesToPixelsX ( mmToInches(d->mm_bottom), this); d->mp_top = inchesToPixelsX ( mmToInches(d->mm_top), this); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::setMarginLeft(qreal ml) { if(d->mm_left == ml)return; d->mm_left = ml; d->mp_left = inchesToPixelsX ( mmToInches(d->mm_left), this); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::setMarginTop(qreal mt) { if(d->mm_top == mt)return; d->mm_top = mt; d->mp_top = inchesToPixelsX ( mmToInches(d->mm_top), this); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::setMarginRight(qreal mr) { if(d->mm_right == mr)return; d->mm_right = mr; d->mp_right = inchesToPixelsX ( mmToInches(d->mm_right), this); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::setMarginBottom(qreal mb) { if(d->mm_bottom == mb)return; d->mm_bottom = mb; d->mp_bottom = inchesToPixelsX ( mmToInches(d->mm_bottom), this); updatePreview(); } //-------------------------------------------------------------- qreal AbstractPreview::marginLeft() { return d->mm_left; } qreal AbstractPreview::marginTop() { return d->mm_top; } qreal AbstractPreview::marginRight() { return d->mm_right; } qreal AbstractPreview::marginBottom() { return d->mm_bottom; } int AbstractPreview::marginLeftPx() { return d->mp_left; } int AbstractPreview::marginTopPx() { return d->mp_top; } int AbstractPreview::marginRightPx() { return d->mp_right; } int AbstractPreview::marginBottomPx() { return d->mp_bottom; } //-------------------------------------------------------------- void AbstractPreview::addedPages(int count, int begin) { } //-------------------------------------------------------------- int AbstractPreview::addPages(int count/* = 1*/) { int cc = d->pagesData.count(); int c = d->addPages(count); addedPages(c, cc); sizeToCountPage(); updatePreview(); return c; } //-------------------------------------------------------------- int AbstractPreview::insertPages(int index, int count/* = 1*/) { int c = d->insertPages(index, count); addedPages(c, index); updatePreview(); return c; } //-------------------------------------------------------------- int AbstractPreview::deletePages(int index, int count/* = 1*/) { int c = d->deletePages(index, count); updatePreview(); return c; } //-------------------------------------------------------------- void AbstractPreview::pageSetup() { QPageSetupDialog dlg(d->printer, this); if (dlg.exec() == QDialog::Accepted) { setupPageFormat(); emit pageFormatChanged(); } } //-------------------------------------------------------------- void AbstractPreview::setPageData(int index, QVariant data) { if(index < 0 || index >= d->pagesData.count())return; d->pagesData[index]->data = data; } //-------------------------------------------------------------- QVariant AbstractPreview::pageData(int index) { if(index < 0 || index >= d->pagesData.count())return QVariant(); return d->pagesData[index]->data; } //-------------------------------------------------------------- void AbstractPreview::setViewMode(AbstractPreview::PreviewMode mode) { if(d->viewMode == mode)return; if (mode == Mode_Thumbs) { setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); d->pageLabelHeight = 18; } else { setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); d->pageLabelHeight = 0; } d->viewMode = mode; sizeToCountPage(); d->calcParamDraw(); updatePreview(); } //-------------------------------------------------------------- AbstractPreview::PreviewMode AbstractPreview::viewMode() { return d->viewMode; } //-------------------------------------------------------------- #ifdef PRINTER_CHANGE_DEVICE void AbstractPreview::changeDevice(QPaintDevice* device) { if (device == d->printer) { if (!dp) dp = new AbstractPreviewPrivate(this, d->printer); d = dp; d->currentDevice = device; deviceChanged(d->currentDevice); setupPageFormat(); } else { d = dv; if (dp) { delete dp; dp = NULL; } d->currentDevice = device; deviceChanged(d->currentDevice); } } #endif //-------------------------------------------------------------- void AbstractPreview::print() { #ifndef QT_NO_DEBUG qDebug("STA: AbstractPreview::print()"); #endif QPrintDialog *dlg = new QPrintDialog(d->printer, NULL); // d->printer->setOutputFormat(QPrinter::PdfFormat); if(dlg->exec() == QDialog::Accepted) { printPages(d->printer); } delete dlg; #ifndef QT_NO_DEBUG qDebug("END: AbstractPreview::print()"); #endif } void AbstractPreview::print(QPrinter *printer) { printPages(printer); } void AbstractPreview::printPages(QPrinter *printer) { #ifdef DEBUG_PRINT_TIME timeval tpb,tpe; #ifdef PRINTER_CHANGE_DEVICE timeval tsb; #endif #endif int fromPage = printer->fromPage(); int toPage = printer->toPage(); int count = d->pagesData.count(); if (fromPage) fromPage--; if (!toPage || toPage>count) toPage = count; #ifdef PRINTER_CHANGE_DEVICE #ifdef DEBUG_PRINT_TIME gettimeofday(&tsb, NULL); #endif changeDevice(printer); #endif #ifdef DEBUG_PRINT_TIME gettimeofday(&tpb, NULL); #endif QPainter p; p.begin(printer); #ifndef PRINTER_CHANGE_DEVICE float scaleX = (float) d->printer->logicalDpiX() / d->preview->logicalDpiX(); float scaleY = (float) d->printer->logicalDpiY() / d->preview->logicalDpiY(); qDebug() << "Printer scale: "<< scaleX << "x" << scaleY; p.scale(scaleX, scaleY); #endif #if (PRINTER_USE_FULLPAGE == 1) p.translate(d->mp_left, d->mp_top); #endif for(int i = fromPage; i < toPage; i++) { #ifndef QT_NO_DEBUG qDebug() << "printing page " << i << " ..."; #endif if (i != fromPage) d->printer->newPage(); paintPage(&p, i, QRect( QPoint(0,0), d->pageSize)); } p.end(); #ifdef DEBUG_PRINT_TIME gettimeofday(&tpe, NULL); #endif #ifdef PRINTER_CHANGE_DEVICE changeDevice(d->preview); #ifdef DEBUG_PRINT_TIME qDebug() << "Setup time: " << QString(" %1 s").arg(tpb.tv_sec - tsb.tv_sec + (tpb.tv_usec - tsb.tv_usec)/1000000.0,0,'f',4); #endif #endif #ifdef DEBUG_PRINT_TIME qDebug() << "Pages time: " << QString(" %1 s").arg(tpe.tv_sec - tpb.tv_sec + (tpe.tv_usec - tpb.tv_usec)/1000000.0,0,'f',4); #endif } //-------------------------------------------------------------- void AbstractPreview::repaintPreview() { d->flushCache(); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::repaintPage(int page) { d->flushPage(page); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::scaleIn() { if(d->scale >= d->scaleMax)return; setScale( d->scale * d->scaleStep ); } //-------------------------------------------------------------- void AbstractPreview::scaleOut() { if(d->scale <= d->scaleMin)return; setScale( d->scale / d->scaleStep ); } //-------------------------------------------------------------- void AbstractPreview::scaleOrig() { setScale(1.0); } void AbstractPreview::setScale(double z) { if(d->scale == z) return; qSwap(d->scale, z); d->changeScale(); sizeToCountPage(); d->calcParamDraw(); updatePreview(); scaleEvent(z, d->scale); } //-------------------------------------------------------------- void AbstractPreview::setScaleStep(double step) { d->scaleStep = step; } //-------------------------------------------------------------- double AbstractPreview::scaleStep() { return d->scaleStep; } //-------------------------------------------------------------- void AbstractPreview::setScaleRange(double zmin, double zmax) { if (zmin > zmax) { qSwap(zmin,zmax); } d->scaleMin = zmin; d->scaleMax = zmax; if(d->scale < zmin) { setScale(zmin); return; } if(d->scale > zmax) { setScale(zmax); return; } } //-------------------------------------------------------------- void AbstractPreview::setScaleMaximum(double zmax) { if (zmax < d->scaleMin) zmax = d->scaleMin; d->scaleMax = zmax; if(d->scale > zmax) setScale(zmax); } //-------------------------------------------------------------- void AbstractPreview::setScaleMinimum(double zmin) { if (zmin > d->scaleMax) zmin = d->scaleMax; d->scaleMin = zmin; if(d->scale < zmin) setScale(zmin); } //-------------------------------------------------------------- double AbstractPreview::scaleMaximum() { return d->scaleMax; } //-------------------------------------------------------------- double AbstractPreview::scaleMinimum() { return d->scaleMin; } //-------------------------------------------------------------- void AbstractPreview::scaleEvent(const double &scaleOld, const double &scaleNew) { Q_UNUSED(scaleOld); emit scaleChanged(scaleNew); } //-------------------------------------------------------------- void AbstractPreview::gotoPage(int index) { int row = index / d->cols; int y = row * (d->paperHeightToScale() + d->interPageSpacing + d->pageLabelHeight); int y2 = height() - d->paperHeightToScale() - 2*d->pageLabelHeight; if (d->viewMode == Mode_Thumbs) { d->selectPageIndex = index; updatePreview(); if (y<=verticalScrollBar()->value()) { verticalScrollBar()->setValue(y); } else if (y-y2 > verticalScrollBar()->value()) { verticalScrollBar()->setValue(y-y2); } } else { verticalScrollBar()->setValue(y); } } //-------------------------------------------------------------- QSize AbstractPreview::paperSize() { return d->paperSize; } //-------------------------------------------------------------- void AbstractPreview::clear() { d->clear(); clearEvent(); d->changeScale(); sizeToCountPage(); d->calcParamDraw(); updatePreview(); } //-------------------------------------------------------------- void AbstractPreview::setupPageFormat() { #ifndef QT_NO_DEBUG qDebug("setupPageFormat()"); #endif d->setup(); if (d->viewMode == Mode_Thumbs) { autoscaleThumbs(); } updatePageFormat(); d->changeScale(); sizeToCountPage(); d->calcParamDraw(); updatePreview(); } //-------------------------------------------------------------- int AbstractPreview::currentPage() { return d->selectPageIndex; } //-------------------------------------------------------------- qreal AbstractPreview::scale() { return d->scale; } //-------------------------------------------------------------- QPixmap *AbstractPreview::grabPage(int page, const QRectF &rect) { if(!(page >= 0 && page < pageCount()))return NULL; return NULL; } //-------------------------------------------------------------- QPixmap *AbstractPreview::grabPage(int page, qreal left, qreal top, qreal width, qreal height) { if(!(page >= 0 && page < pageCount()))return NULL; return NULL; } //-------------------------------------------------------------- void AbstractPreview::setMouseTrackingPage(bool mtp) { d->mouseTrackingPage = mtp; setMouseTracking(d->mouseTrackingPage); } //-------------------------------------------------------------- bool AbstractPreview::isMouseTrackingPage() { return d->mouseTrackingPage; } QPageInfo AbstractPreview::enterPageInfo() { return d->enterPageInfo; } void AbstractPreview::setMouseEnterLeavePage(bool melp) { d->mouseEnterLeavePage = melp; } bool AbstractPreview::mouseEnterLeavePage() { return d->mouseEnterLeavePage; } //-------------------------------------------------------------- void AbstractPreview::setMovedContents(bool move) { d->movedContents = move; } bool AbstractPreview::movedContents() { return d->movedContents; } //-------------------------------------------------------------- qpxtool-0.7.1_002/gui/src/tab_mediainfo.cpp0000644000175000001440000002337111334746277017742 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include "tab_mediainfo.h" #include tabMediaInfo::tabMediaInfo(QPxSettings *iset, devlist *idev, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabMediaInfo()"); #endif settings = iset; devices = idev; layout = new QVBoxLayout(this); layout->setMargin(0); layout->setSpacing(3); layout_info = new QGridLayout; layout_info->setVerticalSpacing(1); layout_info->setHorizontalSpacing(6); layout->addLayout(layout_info); pl_type = new QLabel(tr("Type:"), this); layout_info->addWidget(pl_type,0,0); l_type = new QLabel(this); layout_info->addWidget(l_type,0,1); pl_book = new QLabel(tr("Disc Category:"), this); layout_info->addWidget(pl_book,1,0); l_book = new QLabel(this); layout_info->addWidget(l_book,1,1); pl_mid = new QLabel(tr("Media ID:"), this); layout_info->addWidget(pl_mid,2,0); l_mid = new QLabel(this); layout_info->addWidget(l_mid,2,1); pl_layers = new QLabel(tr("Layers:"), this); layout_info->addWidget(pl_layers,3,0); l_layers = new QLabel(this); layout_info->addWidget(l_layers,3,1); pl_erasable = new QLabel(tr("Erasable:"), this); layout_info->addWidget(pl_erasable,4,0); l_erasable = new QLabel(this); layout_info->addWidget(l_erasable,4,1); pl_prot = new QLabel(tr("Protection:"), this); layout_info->addWidget(pl_prot,5,0); l_prot = new QLabel(this); layout_info->addWidget(l_prot,5,1); pl_regions = new QLabel(tr("Regions:"), this); layout_info->addWidget(pl_regions,6,0); l_regions = new QLabel(this); layout_info->addWidget(l_regions,6,1); pl_writer = new QLabel(tr("Written on:"), this); layout_info->addWidget(pl_writer, 7,0); l_writer = new QLabel(this); layout_info->addWidget(l_writer, 7,1); pl_cread = new QLabel(tr("Readable:"), this); layout_info->addWidget(pl_cread,0,2); pl_cfree = new QLabel(tr("Free:"), this); layout_info->addWidget(pl_cfree,1,2); pl_ctot = new QLabel(tr("Total:"), this); layout_info->addWidget(pl_ctot,2,2); l_cap = new QGridLayout(); layout_info->addLayout(l_cap, 0,3,3,1); l_creads = new QLabel(this); // l_creads->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_creads,0,0); l_creadm = new QLabel(this); // l_creadm->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_creadm,0,1); l_creadmsf = new QLabel(this); l_creadmsf->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_creadmsf,0,2); l_cfrees = new QLabel(this); // l_cfrees->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_cfrees,1,0); l_cfreem = new QLabel(this); // l_cfreem->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_cfreem,1,1); l_cfreemsf = new QLabel(this); l_cfreemsf->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_cfreemsf,1,2); l_ctots = new QLabel(this); // l_ctots->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_ctots,2,0); l_ctotm = new QLabel(this); // l_ctotm->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_ctotm,2,1); l_ctotmsf = new QLabel(this); l_ctotmsf->setAlignment(Qt::AlignVCenter | Qt::AlignRight); l_cap->addWidget(l_ctotmsf,2,2); pl_dstate = new QLabel(tr("Disc state:"), this); layout_info->addWidget(pl_dstate,3,2); l_dstate = new QLabel(this); layout_info->addWidget(l_dstate,3,3); pl_sstate = new QLabel(tr("Session state:"), this); layout_info->addWidget(pl_sstate,4,2); l_sstate = new QLabel(this); layout_info->addWidget(l_sstate,4,3); pl_rspeeds = new QLabel(tr("Read speeds:"), this); layout_info->addWidget(pl_rspeeds,5,2); l_rspeeds = new QLabel(this); layout_info->addWidget(l_rspeeds,5,3); pl_wspeedsd = new QLabel(tr("Write speeds (Device):"), this); layout_info->addWidget(pl_wspeedsd,6,2); l_wspeedsd = new QLabel(this); layout_info->addWidget(l_wspeedsd,6,3); pl_wspeedsm = new QLabel(tr("Write speeds (Media):"), this); layout_info->addWidget(pl_wspeedsm,7,2); l_wspeedsm = new QLabel(this); layout_info->addWidget(l_wspeedsm,7,3); layout_info->setColumnStretch(0,1); layout_info->setColumnStretch(1,3); layout_info->setColumnStretch(2,1); layout_info->setColumnStretch(3,3); hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(hline0); #ifdef SHOW_SPEEDS pl_rd_max = new QLabel(tr("RD max:"), this); pl_rd_max->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_rd_max, 9, 0); l_rd_max = new QLabel(this); l_rd_max->setMinimumWidth(120); layout_left->addWidget(l_rd_max, 9, 1, 1, 2); pl_rd_lst = new QLabel(tr("RD lst:"), this); pl_rd_lst->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_rd_lst, 10, 0); c_rd_lst = new QComboBox(this); c_rd_lst->setMinimumWidth(120); layout_left->addWidget(c_rd_lst, 10, 1, 1, 2); pl_wr_max = new QLabel(tr("WR max:"), this); pl_wr_max->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_wr_max, 11, 0); l_wr_max = new QLabel(this); l_wr_max->setMinimumWidth(120); layout_left->addWidget(l_wr_max, 11, 1, 1, 2); pl_wr_lst = new QLabel(tr("WR lst:"), this); pl_wr_lst->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_wr_lst, 12, 0); c_wr_lst = new QComboBox(this); c_wr_lst->setMinimumWidth(120); layout_left->addWidget(c_wr_lst, 12, 1, 1, 2); #endif #ifdef MINFO_TREE QFont mifont; minfo = new QTreeWidget(this); minfo->header()->hide(); minfo->setRootIsDecorated(false); minfo->setColumnCount(1); mifont = minfo->font(); mifont.setFamily("Monospace"); // mifont.setBold(false); // mifont.setItalic(false); minfo->setFont(mifont); layout->addWidget(minfo); minfo_detail = new QTreeWidgetItem(minfo, QStringList() << tr("Detailed info") << ""); minfo_detail->setIcon(0,QIcon(":images/info.png")); minfo_detail->setExpanded(true); minfo->addTopLevelItem(minfo_detail); #else layout->addStretch(10); #endif clear(); #ifndef QT_NO_DEBUG qDebug("END: tabMediaInfo()"); #endif } tabMediaInfo::~tabMediaInfo() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabMediaInfo()"); #endif #ifndef QT_NO_DEBUG qDebug("END: ~tabMediaInfo()"); #endif } void tabMediaInfo::clear() { #ifndef QT_NO_DEBUG qDebug("tabMediaInfo::clear()"); #endif l_type->setText("-"); l_book->setText("-"); l_mid->setText("-"); l_layers->setText("-"); l_erasable->setText("-"); l_prot->setText("-"); l_regions->setText("-"); l_writer->setText("-"); l_dstate->setText("-"); l_sstate->setText("-"); l_creads->setText("-"); l_creadm->clear(); l_creadmsf->clear(); l_cfrees->setText("-"); l_cfreem->clear(); l_cfreemsf->clear(); l_ctots->setText("-"); l_ctotm->clear(); l_ctotmsf->clear(); l_rspeeds->setText("-"); l_wspeedsd->setText("-"); l_wspeedsm->setText("-"); #ifdef SHOW_SPEEDS l_rd_max->setText("-"); c_rd_lst->clear(); l_wr_max->setText("-"); c_wr_lst->clear(); #endif #ifdef MINFO_TREE minfo_detail->takeChildren(); #endif } void tabMediaInfo::selectDevice() { #ifndef QT_NO_DEBUG qDebug("STA: tabMediaInfo::selectDevice()"); qDebug() << "SIGNAL sender: " << sender(); #endif clear(); updateData(); QObject::connect( devices->current(), SIGNAL(doneMInfo(int)), this, SLOT(updateData(int)) ); #ifndef QT_NO_DEBUG qDebug("END: tabMediaInfo::selectDevice()"); #endif } void tabMediaInfo::updateData(int xcode) { #ifndef QT_NO_DEBUG qDebug("STA: tabMediaInfo::updateData()"); #endif const device *dev = devices->current(); l_type->setText(dev->media.type); l_book->setText(dev->media.category); //l_layers->setNum(dev->media.layers); l_layers->setText(dev->media.layers); l_prot->setText(dev->media.prot); l_regions->setText(dev->media.regions); l_erasable->setText( dev->media.erasable); //? "Yes" : "No"); l_dstate->setText(dev->media.dstate); l_sstate->setText(dev->media.sstate); if (dev->media.creads) { l_creads->setText(QString::number(dev->media.creads)); l_creadm->setText(QString("%1 MB").arg(dev->media.creadm)); l_creadmsf->setText(dev->media.creadmsf); } else { l_creads->setText("-"); l_creadm->clear(); l_creadmsf->clear(); } if (dev->media.cfrees) { l_cfrees->setText(QString::number(dev->media.cfrees)); l_cfreem->setText(QString("%1 MB").arg(dev->media.cfreem)); l_cfreemsf->setText(dev->media.cfreemsf); } else { l_cfrees->setText("-"); l_cfreem->clear(); l_cfreemsf->clear(); } if (dev->media.ctots) { l_ctots->setText(QString::number(dev->media.ctots)); l_ctotm->setText(QString("%1 MB").arg(dev->media.ctotm)); l_ctotmsf->setText(dev->media.ctotmsf); } else { l_ctots->setText("-"); l_ctotm->clear(); l_ctotmsf->clear(); } l_mid->setText(dev->media.mid); if (!dev->media.rspeeds.size()) l_rspeeds->setText("-"); else l_rspeeds->setText(dev->media.rspeeds.join(" - ")); if (!dev->media.wspeedsd.size()) l_wspeedsd->setText("-"); else l_wspeedsd->setText(dev->media.wspeedsd.join(" - ")); if (!dev->media.wspeedsm.size()) l_wspeedsm->setText("-"); else l_wspeedsm->setText(dev->media.wspeedsm.join(" - ")); l_writer->setText(dev->media.writer); #ifdef MINFO_TREE minfo_detail->addChildren( dev->info_media); #endif if (xcode) { QMessageBox::warning(this, tr("Error"), tr("Error updating media info!")+"\n"+tr("qScan finished with non-zero exit code")); } #ifndef QT_NO_DEBUG qDebug("END: tabMediaInfo::updateData()"); #endif } qpxtool-0.7.1_002/gui/src/devsettings_widgets.cpp0000644000175000001440000011260611352127377021240 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "devsettings_widgets.h" #include #include #include devctlCommon::devctlCommon(device* idev, QWidget* p) :QGroupBox(p) { dev = idev; layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); ck_prec = new QCheckBox("PoweRec",this); layout->addWidget(ck_prec, 0,0); pl_prec = new QLabel("Speed:",this); pl_prec->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(pl_prec,0,1); l_prec = new QLabel(this); l_prec->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); layout->addWidget(l_prec,0,2); ck_hcdr = new QCheckBox("Hide CD-R",this); layout->addWidget(ck_hcdr, 1,0); ck_ss = new QCheckBox("SingleSession",this); layout->addWidget(ck_ss,2,0); ck_spdrd = new QCheckBox("SpeedRead",this); layout->addWidget(ck_spdrd,3,0); ck_bitset = new QCheckBox("Change BookType on DVD+R",this); layout->addWidget(ck_bitset,4,0,1,3); ck_bitset_dl = new QCheckBox("Change BookType on DVD+R DL",this); layout->addWidget(ck_bitset_dl,5,0,1,3); ck_simulplus = new QCheckBox("Testwrite on DVD+R(W)",this); layout->addWidget(ck_simulplus,6,0,1,3); as = new devctlAutostrategy(dev,this); layout->addWidget(as,8,0,1,3); layout->setRowStretch(7,10); layout->setRowStretch(8,6); ck_prec->setEnabled(dev->features.supported & FEATURE_POWEREC); if (dev->features.supported & FEATURE_POWEREC) l_prec->setText(QString::number(dev->features.prec_spd)+"X"); ck_hcdr->setEnabled(dev->features.supported & FEATURE_HIDECDR); ck_ss->setEnabled(dev->features.supported & FEATURE_SINGLESESSION); ck_spdrd->setEnabled(dev->features.supported & FEATURE_SPEEDREAD); ck_bitset->setEnabled(dev->features.supported & FEATURE_BITSETR); ck_bitset_dl->setEnabled(dev->features.supported & FEATURE_BITSETRDL); ck_simulplus->setEnabled(dev->features.supported & FEATURE_SIMULPLUS); ck_prec->setChecked(dev->features.enabled & FEATURE_POWEREC); ck_hcdr->setChecked(dev->features.enabled & FEATURE_HIDECDR); ck_ss->setChecked(dev->features.enabled & FEATURE_SINGLESESSION); ck_spdrd->setChecked(dev->features.enabled & FEATURE_SPEEDREAD); ck_bitset->setChecked(dev->features.enabled & FEATURE_BITSETR); ck_bitset_dl->setChecked(dev->features.enabled & FEATURE_BITSETRDL); ck_simulplus->setChecked(dev->features.enabled & FEATURE_SIMULPLUS); connect(ck_prec, SIGNAL(toggled(bool)), this, SLOT(set_prec(bool))); connect(ck_hcdr, SIGNAL(toggled(bool)), this, SLOT(set_hcdr(bool))); connect(ck_ss, SIGNAL(toggled(bool)), this, SLOT(set_ss(bool))); connect(ck_spdrd, SIGNAL(toggled(bool)), this, SLOT(set_spdrd(bool))); connect(ck_bitset, SIGNAL(toggled(bool)), this, SLOT(set_bitset(bool))); connect(ck_bitset_dl, SIGNAL(toggled(bool)), this, SLOT(set_bitset_dl(bool))); connect(ck_simulplus, SIGNAL(toggled(bool)), this, SLOT(set_simulplus(bool))); } void devctlCommon::set_prec(bool en) { dev->setFeature(FEATURE_POWEREC, en); } void devctlCommon::set_hcdr(bool en) { dev->setFeature(FEATURE_HIDECDR, en); } void devctlCommon::set_ss(bool en) { dev->setFeature(FEATURE_SINGLESESSION, en); } void devctlCommon::set_spdrd(bool en) { dev->setFeature(FEATURE_SPEEDREAD, en); } void devctlCommon::set_bitset(bool en){ dev->setFeature(FEATURE_BITSETR, en); } void devctlCommon::set_bitset_dl(bool en) { dev->setFeature(FEATURE_BITSETRDL, en); } void devctlCommon::set_simulplus(bool en) { dev->setFeature(FEATURE_SIMULPLUS, en); } // GigaRec control devctlGigarec::devctlGigarec(device* idev, QWidget* p) :QGroupBox("GigaRec",p) { QString gc; dev = idev; layout = new QVBoxLayout(this); layout->setMargin(3); layout->setSpacing(3); setCheckable(true); bool ratio_14 = dev->dev.startsWith("CD-R PREMIUM"); bool ratio_11 = dev->dev.startsWith("DVDR PX-755") || dev->dev.startsWith("DVDR PX-760") || dev->dev.startsWith("CD-R PREMIUM2"); grec_ratio = new TextSlider(Qt::Vertical,this); grec_ratio->setTickPosition(QSlider::TicksBelow); grec_ratio->setUpsideDown(1); gc = QString::number((int)(dev->media.ctots*0.6) >> 9) + " MB"; grec_ratio->addItem("0.6",ratio_14); gc = QString::number((int)(dev->media.ctots*0.7) >> 9) + " MB"; grec_ratio->addItem("0.7",1); gc = QString::number((int)(dev->media.ctots*0.8) >> 9) + " MB"; grec_ratio->addItem("0.8",1); gc = QString::number((int)(dev->media.ctots*0.9) >> 9) + " MB"; grec_ratio->addItem("0.9",ratio_11); //grec_ratio->addItem("OFF",1); grec_ratio->addItem("",0); gc = QString::number((int)(dev->media.ctots*1.1) >> 9) + " MB"; grec_ratio->addItem("1.1",ratio_11); gc = QString::number((int)(dev->media.ctots*1.2) >> 9) + " MB"; grec_ratio->addItem("1.2",1); gc = QString::number((int)(dev->media.ctots*1.3) >> 9) + " MB"; grec_ratio->addItem("1.3",1); gc = QString::number((int)(dev->media.ctots*1.4) >> 9) + " MB"; grec_ratio->addItem("1.4",ratio_14); grec_ratio->setValue(4); layout->addWidget(grec_ratio); l_cap = new QLabel(this); l_cap->setMinimumHeight(24); // l_cap->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(l_cap); l_ncap = new QLabel(this); l_ncap->setMinimumHeight(24); // l_ncap->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(l_ncap); l_hint = new QLabel( tr("GigaRec limits maximum write speed to 8X\n" "only DAO write mode can be used with GigaRec"), this); layout->addWidget(l_hint,10); //setEnabled(dev->features.supported & FEATURE_GIGAREC && dev->media.dstate == "Blank"); setEnabled(dev->features.supported & FEATURE_GIGAREC); setChecked(dev->features.enabled & FEATURE_GIGAREC); grec_ratio->setCurrentItem(QString("%1").arg(dev->features.grec,0,'f',1)); l_cap->setText(tr("Original capacity: ") + QString::number(dev->media.ctots >> 9) + " MB"); l_ncap->setText(tr("GigaRec capacity: ") + QString::number((int)(dev->media.ctots * dev->features.grec) >> 9) + " MB"); //grec_ratio->setCurrentItem("1.2"); #ifndef QT_NO_DEBUG qDebug() << QString("GigaRec : %1").arg(dev->features.grec,0,'f',1); #endif connect(this, SIGNAL(toggled(bool)), this, SLOT(set(bool))); connect(grec_ratio, SIGNAL(valueChanged(int)), this, SLOT(set())); } void devctlGigarec::set() { set(isEnabled()); } void devctlGigarec::set(bool en) { QStringList sl; if (en) { dev->features.enabled |= FEATURE_GIGAREC; sl = grec_ratio->text().split(' '); if (sl.size() > 0) dev->features.grec = sl[0].toFloat(); else qDebug("empty GigaRec value!"); } else { dev->features.enabled &= ~FEATURE_GIGAREC; } if (!dev->setComplexFeature(FEATURE_GIGAREC, &dev->features)) { // l_cap->setText(tr("Original capacity: ") + QString::number(dev->media.ctots >> 9) + " MB"); l_ncap->setText(tr("GigaRec capacity: ") + QString::number((int)(dev->media.ctots * dev->features.grec) >> 9) + " MB"); } } // VariRec control devctlVarirecBase::devctlVarirecBase(device* idev, QString title, QWidget* p) :QGroupBox(title, p) { dev = idev; layout = new QVBoxLayout(this); layout->setMargin(3); layout->setSpacing(3); setCheckable(true); pl_pwr = new QLabel("Power:", this); layout->addWidget(pl_pwr); pwr = new TextSlider(Qt::Horizontal,this); pwr->setTickPosition(QSlider::TicksBelow); pwr->setUpsideDown(0); pwr->addItem("-4",1); pwr->addItem("-3",1); pwr->addItem("-2",1); pwr->addItem("-1",1); pwr->addItem("0",1); pwr->addItem("+1",1); pwr->addItem("+2",1); pwr->addItem("+3",1); pwr->addItem("+4",1); pwr->setValue(4); layout->addWidget(pwr); layouts = new QHBoxLayout(); layouts->setMargin(3); layouts->setSpacing(3); layout->addLayout(layouts); pl_str = new QLabel("Strategy:", this); layouts->addWidget(pl_str,1); str = new QComboBox(this); layouts->addWidget(str,10); l_hint = new QLabel(this); layout->addWidget(l_hint,10); } devctlVarirecCD::devctlVarirecCD(device* idev, QWidget* p) :devctlVarirecBase(idev, "Varirec CD", p) { bool ext = dev->features.supported & FEATURE_VARIREC_CDEXT; if (ext) l_hint->setText(tr("VariRec limits maximum CD write speed to 8X")); else l_hint->setText(tr("VariRec limits maximum CD write speed to 4X")); str->addItem("default"); str->addItem("AZO"); str->addItem("Cyanine"); str->addItem("Phtalocyanine A"); str->addItem("Phtalocyanine B"); str->addItem("Phtalocyanine C"); str->addItem("Phtalocyanine D"); setEnabled(dev->features.supported & FEATURE_VARIREC_CD); setChecked(dev->features.enabled & FEATURE_VARIREC_CD); pl_str->setEnabled(ext); str->setEnabled(ext); pwr->setItemEnabled(0,ext); pwr->setItemEnabled(1,ext); pwr->setItemEnabled(7,ext); pwr->setItemEnabled(8,ext); pwr->setValue(dev->features.vrec_cd_pwr+4); str->setCurrentIndex(dev->features.vrec_cd_str); connect(pwr, SIGNAL(valueChanged(int)), this, SLOT(set())); connect(str, SIGNAL(currentIndexChanged(int)), this, SLOT(set())); connect(this, SIGNAL(toggled(bool)), this, SLOT(set(bool))); } void devctlVarirecCD::set() { set(isEnabled()); } void devctlVarirecCD::set(bool en) { if (en) { dev->features.enabled |= FEATURE_VARIREC_CD; dev->features.vrec_cd_pwr = pwr->text().toInt(); dev->features.vrec_cd_str = str->currentIndex(); } else { dev->features.enabled &= ~FEATURE_VARIREC_CD; } dev->setComplexFeature(FEATURE_VARIREC_CD, &dev->features); } devctlVarirecDVD::devctlVarirecDVD(device* idev, QWidget* p) :devctlVarirecBase(idev, "Varirec DVD", p) { l_hint->setText(tr("VariRec limits maximum DVD write speed to 4X")); str->addItem("default"); for (int s=0; s<8; s++) str->addItem(QString("Strategy %1").arg(s)); setEnabled(dev->features.supported & FEATURE_VARIREC_DVD); setChecked(dev->features.enabled & FEATURE_VARIREC_DVD); pwr->setValue(dev->features.vrec_dvd_pwr+4); str->setCurrentIndex(dev->features.vrec_dvd_str); connect(pwr, SIGNAL(valueChanged(int)), this, SLOT(set())); connect(str, SIGNAL(currentIndexChanged(int)), this, SLOT(set())); connect(this, SIGNAL(toggled(bool)), this, SLOT(set(bool))); } void devctlVarirecDVD::set() { set(isEnabled()); } void devctlVarirecDVD::set(bool en) { if (en) { dev->features.enabled |= FEATURE_VARIREC_DVD; dev->features.vrec_dvd_pwr = pwr->text().toInt(); dev->features.vrec_dvd_str = str->currentIndex(); } else { dev->features.enabled &= ~FEATURE_VARIREC_DVD; } dev->setComplexFeature(FEATURE_VARIREC_DVD, &dev->features); } devctlVarirec::devctlVarirec(device* idev, QWidget* p) :QWidget(p) { layout = new QVBoxLayout(this); layout->setMargin(0); layout->setSpacing(3); vrec_cd = new devctlVarirecCD(idev, this); layout->addWidget(vrec_cd); if (idev->features.supported & FEATURE_VARIREC_DVD) { vrec_dvd = new devctlVarirecDVD(idev, this); layout->addWidget(vrec_dvd); } else { vrec_dvd = NULL; layout->addStretch(1); } // qDebug() << "Varirec CD : " << (int)idev->features.vrec_cd_pwr << ", " << idev->features.vrec_cd_str; // qDebug() << "Varirec DVD : " << (int)idev->features.vrec_dvd_pwr << ", " << idev->features.vrec_dvd_str; } devctlSecurec::devctlSecurec(device* idev, QWidget* p) :QGroupBox("SecuRec",p) { dev = idev; layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); l_pwd[0] = new QLabel(tr("Password"),this); layout->addWidget(l_pwd[0], 0,0); e_pwd[0] = new QLineEdit(this); e_pwd[0]->setEchoMode(QLineEdit::Password); layout->addWidget(e_pwd[0], 0,1,1,3); l_pwd[1] = new QLabel(tr("Confirm"),this); layout->addWidget(l_pwd[1], 1,0); e_pwd[1] = new QLineEdit(this); e_pwd[1]->setEchoMode(QLineEdit::Password); layout->addWidget(e_pwd[1], 1,1,1,3); hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(hline0, 2,0,1,4); l_active = new QLabel("SecuRec ACTIVE"); l_active->setAlignment(Qt::AlignCenter); layout->addWidget(l_active, 3, 0, 1, 2); pb_set = new QPushButton(QIcon(":images/ok.png"),tr("Set"),this); pb_set->setMinimumWidth(100); layout->addWidget(pb_set, 3, 2); pb_reset = new QPushButton(QIcon(":images/edit-clear.png"),tr("Reset"),this); pb_reset->setMinimumWidth(100); layout->addWidget(pb_reset, 3, 3); l_hint = new QLabel( tr("Password length must me between 4 and 10 characters.\n\n" "To read SecuRec-protected CD you have to activate SecuRec\n" "with same password as used for writing"), this); layout->addWidget(l_hint,4,0,1,4); layout->setRowStretch(4,10); setEnabled(dev->features.supported & FEATURE_SECUREC); l_active->setVisible(dev->features.enabled & FEATURE_SECUREC); connect(pb_set, SIGNAL(clicked()), this, SLOT(set())); connect(pb_reset, SIGNAL(clicked()), this, SLOT(reset())); } int devctlSecurec::validate() { if (e_pwd[0]->text() != e_pwd[1]->text()) return 1; if (e_pwd[0]->text().length() < 4 || e_pwd[0]->text().length() > 10) return 2; return 0; } void devctlSecurec::set() { switch (validate()) { case 0: break; case 1: QMessageBox::warning(this,"Different passwords","Passwords are not identical"); return; case 2: QMessageBox::warning(this,"Invalid password","Invalid password!\nLength must be between 4 and 10 chars"); return; } dev->features.enabled |= FEATURE_SECUREC; dev->features.sr_pass = e_pwd[0]->text(); dev->setComplexFeature(FEATURE_SECUREC, &dev->features); l_active->setVisible(dev->features.enabled & FEATURE_SECUREC); } void devctlSecurec::reset() { dev->features.enabled &= ~FEATURE_SECUREC; dev->setComplexFeature(FEATURE_SECUREC, &dev->features); e_pwd[0]->clear(); e_pwd[1]->clear(); l_active->setVisible(dev->features.enabled & FEATURE_SECUREC); } int sm_rcd[] = {48,40,32,24,8,4,0}; int sm_wcd[] = {48,32,24,16,8,4,0}; int sm_rdvd[] = {16,12,8,5,2,0}; // int sm_wdvd[] = {16,12,8,6,4,0}; devctlSilent::devctlSilent(device* idev, QWidget* p) :QWidget(p) { dev = idev; int idx; bool cd=0; bool dvd=0; cw = new QGroupBox("Silent Mode",this); cw->setCheckable(true); // R/W Speeds h_speed = new QLabel(tr("Speed Limits"), cw); h_speed->setAlignment(Qt::AlignCenter); h_speed->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); spdc = new QLabel(tr("CD"), cw); spdd = new QLabel(tr("DVD"), cw); spdr = new QLabel(tr("Read"), cw); spdw = new QLabel(tr("Write"), cw); box_rcd = new QComboBox(cw); for (int i=0; sm_rcd[i]>0; i++) box_rcd->addItem(QString::number(sm_rcd[i]) + "X"); box_wcd = new QComboBox(cw); for (int i=0; sm_wcd[i]>0; i++) box_wcd->addItem(QString::number(sm_wcd[i]) + "X"); box_rdvd = new QComboBox(cw); for (int i=0; sm_rdvd[i]>0; i++) box_rdvd->addItem(QString::number(sm_rdvd[i]) + "X"); box_wdvd = new QComboBox(cw); // for (int i=0; sm_wdvd[i]>0; i++) box_wdvd->addItem(QString::number(sm_wdvd[i]) + "X"); if (!(dev->cap_rd & DEVICE_DVD)) { spdd->setEnabled(false); box_rdvd->setEnabled(false); } box_wdvd->setEnabled(false); // Access time h_access = new QLabel(tr("Access Time"), cw); h_access->setAlignment(Qt::AlignCenter); h_access->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); a_slow = new QRadioButton(tr("Slow"), cw); a_fast = new QRadioButton(tr("Fast"), cw); grp_access = new QButtonGroup(cw); grp_access->addButton(a_slow,0); grp_access->addButton(a_fast,1); a_slow->setChecked(true); // Tray speed h_tray = new QLabel(tr("Tray Speed"), cw); h_tray->setAlignment(Qt::AlignCenter); h_tray->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); l_load = new QLabel(tr("Load"), cw); l_eject = new QLabel(tr("Eject"), cw); s_load = new QSlider(Qt::Horizontal,cw); s_load->setRange(0,80); s_eject = new QSlider(Qt::Horizontal,cw); s_eject->setRange(0,80); // Buttons ck_perm = new QCheckBox(tr("Permanent"), this); pb_save = new QPushButton(QIcon(":images/ok.png"),tr("Save"), this); pb_save->setMinimumWidth(100); // Layouts layoutm = new QVBoxLayout(this); layoutm->setMargin(0); layoutm->setSpacing(3); layoutm->addWidget(cw); layout = new QGridLayout(cw); layout->setMargin(3); layout->setSpacing(3); layout->addWidget(h_speed, 0,0,1,4); layout->addWidget(spdc,1,1,1,2); layout->addWidget(spdd,1,3); layout->addWidget(spdr,2,0); layout->addWidget(box_rcd,2,1,1,2); layout->addWidget(box_rdvd,2,3); layout->addWidget(spdw,3,0); layout->addWidget(box_wcd,3,1,1,2); layout->addWidget(box_wdvd,3,3); layout->addWidget(h_access, 4,0,1,4); layout->addWidget(a_slow, 5,0, 1,2); layout->addWidget(a_fast, 5,2, 1,2); layout->addWidget(h_tray, 6,0,1,4); layout->addWidget(l_load, 7,0); layout->addWidget(s_load, 7,1,1,3); layout->addWidget(l_eject, 8,0); layout->addWidget(s_eject, 8,1,1,3); layout->setColumnStretch(0,2); layout->setColumnStretch(1,1); layout->setColumnStretch(2,1); layout->setColumnStretch(3,2); layout->setRowStretch(10,10); layoutb = new QHBoxLayout(); layoutb->setMargin(0); layoutb->setSpacing(3); layoutm->addLayout(layoutb); layoutb->addStretch(10); layoutb->addWidget(ck_perm); layoutb->addWidget(pb_save); cd = dev->media.type.startsWith("CD"); dvd = dev->media.type.startsWith("DVD"); /* qDebug() << " SM RD CD :" << dev->features.sm_cd_rd; qDebug() << " SM WR CD :" << dev->features.sm_cd_wr; qDebug() << " SM RD DVD:" << dev->features.sm_dvd_rd; qDebug() << "PSM RD CD :" << dev->features.psm_cd_rd; qDebug() << "PSM WR CD :" << dev->features.psm_cd_wr; qDebug() << "PSM RD DVD:" << dev->features.psm_dvd_rd; */ idx = box_rcd->findText(QString::number(dvd ? dev->features.psm_cd_rd : dev->features.sm_cd_rd)+"X"); if (idx>=0) box_rcd->setCurrentIndex(idx); idx = box_wcd->findText(QString::number(dvd ? dev->features.psm_cd_wr : dev->features.sm_cd_wr)+"X"); if (idx>=0) box_wcd->setCurrentIndex(idx); idx = box_rdvd->findText(QString::number(dvd ? dev->features.sm_dvd_rd : dev->features.psm_dvd_rd)+"X"); if (idx>=0) box_rdvd->setCurrentIndex(idx); // idx = box_wdvd->findText(QString::number(dvd ? dev->features.sm_wr : dev->features.sm_dvd_wr)+"X"); // if (idx>=0) box_wdvd->setCurrentIndex(idx); if (dev->features.sm_access) a_fast->setChecked(true); else a_slow->setChecked(true); s_load->setValue(dev->features.sm_trayl); s_eject->setValue(dev->features.sm_traye); /* connect(box_rcd, SIGNAL(currentIndexChanged(int)), this, SLOT(set())); connect(box_wcd, SIGNAL(currentIndexChanged(int)), this, SLOT(set())); connect(box_rdvd, SIGNAL(currentIndexChanged(int)), this, SLOT(set())); connect(box_wdvd, SIGNAL(currentIndexChanged(int)), this, SLOT(set())); connect(a_fast, SIGNAL(toggled(bool)), this, SLOT(set())); connect(s_load, SIGNAL(valueChanged(int)), this, SLOT(set())); connect(s_eject, SIGNAL(valueChanged(int)), this, SLOT(set())); */ setEnabled(dev->features.supported & FEATURE_SILENT); cw->setChecked(dev->features.enabled & FEATURE_SILENT); connect(pb_save, SIGNAL(clicked()), this, SLOT(set())); // connect(this, SIGNAL(toggled(bool)), this, SLOT(set(bool))); } void devctlSilent::set() { bool en = cw->isChecked(); if (en) { dev->features.enabled |= FEATURE_SILENT; dev->features.sm_cd_rd = box_rcd->currentText().remove("X").toInt(); dev->features.sm_cd_wr = box_wcd->currentText().remove("X").toInt(); dev->features.sm_dvd_rd = box_rdvd->currentText().remove("X").toInt(); // dev->features.sm_dvd_wr = box_wdvd->currentText().remove("X").toInt(); dev->features.sm_access = a_fast->isChecked(); dev->features.sm_trayl = s_load->value(); dev->features.sm_traye = s_eject->value(); } else { dev->features.enabled &= ~FEATURE_SILENT; } dev->features.sm_nosave = !ck_perm->isChecked(); dev->setComplexFeature(FEATURE_SILENT, &dev->features); } devctlAutostrategy::devctlAutostrategy(device* idev, QWidget* p) :QWidget(p) { dev = idev; setEnabled(dev->features.supported & FEATURE_AS); layout = new QGridLayout(this); layout->setMargin(0); layout->setSpacing(3); // AS mode selection box_as = new QGroupBox(tr("AutoStrategy"), this); layout->addWidget(box_as); layout_as = new QGridLayout(box_as); layout_as->setMargin(3); layout_as->setSpacing(3); rb_as_off = new QRadioButton("Off", box_as); rb_as_auto = new QRadioButton("Auto", box_as); rb_as_on = new QRadioButton("On", box_as); rb_as_forced = new QRadioButton("Forced", box_as); rb_as_on->setEnabled(dev->features.supported & FEATURE_AS_EXT); rb_as_forced->setEnabled(dev->features.supported & FEATURE_AS_EXT); grp_mode = new QButtonGroup(box_as); grp_mode->addButton(rb_as_off, AS_MODE_OFF); grp_mode->addButton(rb_as_auto, AS_MODE_AUTO); grp_mode->addButton(rb_as_on, AS_MODE_ON); grp_mode->addButton(rb_as_forced, AS_MODE_FORCED); rb_as_off->setChecked( dev->features.as_mode == AS_MODE_OFF ); rb_as_auto->setChecked( dev->features.as_mode == AS_MODE_AUTO ); rb_as_on->setChecked( dev->features.as_mode == AS_MODE_ON ); rb_as_forced->setChecked( dev->features.as_mode == AS_MODE_FORCED ); layout_as->addWidget(rb_as_off, 0, 0); layout_as->addWidget(rb_as_auto, 0, 1); layout_as->addWidget(rb_as_on, 0, 2); layout_as->addWidget(rb_as_forced, 0, 3); pb_asdb = new QPushButton(tr("AutoStrategy DataBase"), box_as); layout_as->addWidget(pb_asdb, 1,2,1,2); // MQCK box_mqck = new QGroupBox(tr("Media Quality Check"), this); layout->addWidget(box_mqck); layout_mqck = new QGridLayout(box_mqck); layout_mqck->setMargin(3); layout_mqck->setSpacing(3); rb_mqck_q = new QRadioButton(tr("Quick"), box_mqck); rb_mqck_a = new QRadioButton(tr("Advanced"), box_mqck); grp_mqck = new QButtonGroup(box_mqck); grp_mqck->addButton(rb_mqck_q); grp_mqck->addButton(rb_mqck_a); rb_mqck_q->setChecked(true); lmqck_spd = new QLabel(tr("Speed:"), box_mqck); lmqck_spd->setAlignment(Qt::AlignRight | Qt::AlignVCenter); bmqck_spd = new QComboBox(box_mqck); bmqck_spd->addItems( dev->media.wspeedsd ); pb_mqck = new QPushButton(tr("Check Media"), box_mqck); lmqck_res = new QLabel(box_mqck); lmqck_res->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); lmqck_res->setMinimumHeight(22); layout_mqck->addWidget(rb_mqck_q, 0,0); layout_mqck->addWidget(rb_mqck_a, 0,1); layout_mqck->addWidget(lmqck_spd, 0,2); layout_mqck->addWidget(bmqck_spd, 0,3); layout_mqck->addWidget(pb_mqck, 1,2,1,2); layout_mqck->addWidget(lmqck_res, 2,0,1,4); // layout->setRowStretch(2,4); connect(grp_mode, SIGNAL(buttonClicked(int)), this, SLOT(set_mode(int))); connect(pb_asdb, SIGNAL(clicked()), this, SLOT(asdb())); connect(pb_mqck, SIGNAL(clicked()), this, SLOT(run_mqck())); } void devctlAutostrategy::asdb() { qDebug("AS: DB..."); devctlAutostrategyDB *asdb = new devctlAutostrategyDB(dev, this); asdb->exec(); delete asdb; } void devctlAutostrategy::set_mode(int mode) { qDebug("AS: set mode..."); dev->features.as_action = AS_ACTION_MODE; dev->features.as_mode = mode; dev->setComplexFeature(FEATURE_AS, &dev->features); } void devctlAutostrategy::run_mqck() { ProgressWidget *progress; qDebug("AS: MQCK..."); lmqck_res->setText( "" ); dev->features.as_action = AS_ACTION_MQCK; dev->features.as_act_mode = rb_mqck_a->isChecked() ? ASMQCK_ADV : 0; dev->features.as_mqckspd = bmqck_spd->currentText().remove(QRegExp(".[0-9][Xx]")).toInt(); dev->features.as_mqckres = ""; if (!dev->startMqck()) { QMessageBox::warning(this, "MQCK error", tr("Can't run cdvdcontrol!") ); return; } progress = new ProgressWidget(10,3,this); progress->setText(tr("Checking media quality...")); progress->show(); while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } delete progress; if (dev->features.as_mqckres.isEmpty()) { lmqck_res->setText( tr("Unknown result") ); } else { lmqck_res->setText( dev->features.as_mqckres); } } devctlAutostrategyDB::devctlAutostrategyDB(device* idev, QWidget* p) :QDialog(p) { dev = idev; setWindowTitle(tr("AutoStrategy DataBase")); tree = new QTreeWidget(this); tree->setRootIsDecorated(false); tree->setHeaderLabels( QStringList() << "Act" << tr("Type") << tr("Media ID") << tr("Speed") << tr("Writes")); tree->setColumnWidth(0,30); tree->setColumnWidth(1,50); tree->setColumnWidth(2,150); tree->setColumnWidth(3,50); tree->setColumnWidth(4,50); pb_act = new QPushButton(tr("Activate"), this); pb_deact = new QPushButton(tr("Deactivate"), this); pb_del = new QPushButton(QIcon(":images/x.png"),tr("Remove"), this); pb_clear = new QPushButton(QIcon(":images/edit-clear.png"),tr("Clear"), this); layout = new QVBoxLayout(this); layout->setMargin(3); layout->setSpacing(3); layout->addWidget(tree,10); layoutb = new QHBoxLayout(); layout->addLayout(layoutb); layoutb->setMargin(0); layoutb->setSpacing(3); layoutb->addWidget(pb_act,1); layoutb->addWidget(pb_deact,1); layoutb->addWidget(pb_del,1); layoutb->addWidget(pb_clear,1); // Strategy creation box_ascre = new QGroupBox(tr("Strategy creation"), this); box_ascre->setEnabled(dev->features.supported & FEATURE_AS_EXT); // box_ascre->setAlignment(Qt::AlignCenter); // box_ascre->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(box_ascre); grp_ascre_mode = new QGroupBox(tr("Mode"), box_ascre); grp_ascre_act = new QGroupBox(tr("DB Action"), box_ascre); ascre_start = new QPushButton(tr("Create"), box_ascre); layout_ascre = new QGridLayout(box_ascre); layout_ascre->setMargin(0); layout_ascre->setSpacing(3); layout_ascre->addWidget(grp_ascre_mode, 0,0,1,2); layout_ascre->addWidget(grp_ascre_act, 0,2,1,2); layout_ascre->addWidget(ascre_start, 1,3); layout_ascre->setRowStretch(0,2); rb_ascre_quick = new QRadioButton(tr("Quick"), grp_ascre_mode); rb_ascre_full = new QRadioButton(tr("Full"), grp_ascre_mode); rb_ascre_quick->setChecked(true); layout_crem = new QVBoxLayout(grp_ascre_mode); layout_crem->setMargin(3); layout_crem->setSpacing(3); layout_crem->addWidget(rb_ascre_quick); layout_crem->addWidget(rb_ascre_full); rb_ascre_add = new QRadioButton(tr("Add"), grp_ascre_act); rb_ascre_replace = new QRadioButton(tr("Replace"), grp_ascre_act); rb_ascre_add->setChecked(true); layout_crea = new QVBoxLayout(grp_ascre_act); layout_crea->setMargin(3); layout_crea->setSpacing(3); layout_crea->addWidget(rb_ascre_add); layout_crea->addWidget(rb_ascre_replace); setMinimumWidth(360); connect(tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*)), this, SLOT(db_toggle(QTreeWidgetItem*))); connect(pb_act, SIGNAL(clicked()), this, SLOT(db_act())); connect(pb_deact, SIGNAL(clicked()), this, SLOT(db_deact())); connect(pb_del, SIGNAL(clicked()), this, SLOT(db_del())); connect(pb_clear, SIGNAL(clicked()), this, SLOT(db_clear())); connect(ascre_start, SIGNAL(clicked()), this, SLOT(run_ascre())); } void devctlAutostrategyDB::setVisible(bool v) { QDialog::setVisible(v); //if (v && !dev->asdb.size()) db_update(); if (v) db_update(); } void devctlAutostrategyDB::db_update(int idx) { QTreeWidgetItem *it; ProgressWidget *progress; connect(dev, SIGNAL(doneGetASDB(bool)), this, SLOT(db_update_done(bool))); dev->getASDB(); progress = new ProgressWidget(10,3,this); progress->setText(tr("Retrieving ASDB...")); progress->show(); while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } #if 0 for (int i=0; i<10; i++) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } #endif delete progress; // clear tree while (tree->topLevelItemCount()) { it = tree->takeTopLevelItem(0); if (it) delete it; } // show updated db for (int i=0; iasdb.size(); i++) { if (dev->asdb[i].present) { it = new QTreeWidgetItem(tree, QStringList() << "" << dev->asdb[i].type << dev->asdb[i].mid << dev->asdb[i].speed << dev->asdb[i].writes); if (dev->asdb[i].active) it->setIcon(0,QIcon(":images/ok.png")); tree->addTopLevelItem(it); } } if (idx>=0) { if (idx >= dev->asdb.size()) idx = dev->asdb.size()-1; it = tree->topLevelItem(idx); if (it) tree->setCurrentItem(it); } for (int i=0; i<4; i++) tree->resizeColumnToContents(i); disconnect(dev, SIGNAL(doneGetADSB(bool)), this, SLOT(db_update_done(bool))); } void devctlAutostrategyDB::db_update_done(bool fail) { if (fail) { QMessageBox::warning(this, tr("Error"), tr("Error requesting ASDB!")+"\n"+tr("cdvdcontrol finished with non-zero exit code")); } } void devctlAutostrategyDB::db_toggle(QTreeWidgetItem* item) { int idx = tree->indexOfTopLevelItem(item); if (dev->asdb[idx].active) { db_deact(idx); } else { db_act(idx); } } void devctlAutostrategyDB::db_act() { db_act(tree->indexOfTopLevelItem(tree->currentItem())); } void devctlAutostrategyDB::db_act(int idx) { if (idx<0 || idx>31) return; dev->features.as_action = AS_ACTION_ACT; dev->features.as_idx = idx+1; dev->setComplexFeature(FEATURE_AS, &dev->features); db_update(idx); } void devctlAutostrategyDB::db_deact() { db_deact(tree->indexOfTopLevelItem(tree->currentItem())); } void devctlAutostrategyDB::db_deact(int idx) { if (idx<0 || idx>31) return; dev->features.as_action = AS_ACTION_DEACT; dev->features.as_idx = idx+1; dev->setComplexFeature(FEATURE_AS, &dev->features); db_update(idx); } void devctlAutostrategyDB::db_del() { int idx = tree->indexOfTopLevelItem(tree->currentItem()); if (idx<0) return; if (QMessageBox::warning(this, tr("Are you sure?"), tr("Are you sure to delete strategy #%1?").arg(idx), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) != QMessageBox::Yes) return; dev->features.as_action = AS_ACTION_DEL; dev->features.as_idx = idx+1; dev->setComplexFeature(FEATURE_AS, &dev->features); db_update(idx); } void devctlAutostrategyDB::db_clear() { if (QMessageBox::warning(this, tr("Are you sure?"), tr("Are you sure delete all strategies?"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) != QMessageBox::Yes) return; dev->features.as_action = AS_ACTION_CLEAR; dev->setComplexFeature(FEATURE_AS, &dev->features); db_update(); } void devctlAutostrategyDB::run_ascre() { ProgressWidget *progress; qDebug("AS: creating strategy..."); // dev-> if (dev->media.creads && !dev->media.type.startsWith("DVD") || dev->media.erasable == "yes") { QMessageBox::warning(this, tr("Can't create strategy!"), tr("Strategy creation does not supported on current media: ") + dev->media.type + "\n"+ tr("supported media types: DVD+R(DL) and DVD-R(DL)") ); return; } dev->features.as_action = AS_ACTION_CRE; dev->features.as_act_mode = (rb_ascre_full->isChecked() ? ASCRE_FULL : 0) | (rb_ascre_replace->isChecked() ? ASCRE_REPLACE : 0); dev->startAScre(); progress = new ProgressWidget(10,3,this); progress->setText(tr("Creating strategy...")); progress->show(); while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } delete progress; db_update(); } devctlDestruct::devctlDestruct(device* idev, QWidget* p) :QGroupBox(tr("Data destruction"), p) { dev = idev; setEnabled(dev->features.supported & FEATURE_DESTRUCT); rb_quick = new QRadioButton(tr("Quick"), this); pl_quick = new QLabel(tr("Destruct Lead-in & TOC"), this); rb_full = new QRadioButton(tr("Full"), this); pl_full = new QLabel(tr("Destruct entire disc"), this); pb_start = new QPushButton(QIcon(":images/eraser.png"),tr("Destruct"), this); pb_start->setMinimumWidth(100); rb_quick->setChecked(true); layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); layout->addWidget(rb_quick, 0,0,1,3); layout->addWidget(pl_quick, 1,1,1,2); layout->addWidget(rb_full, 2,0,1,3); layout->addWidget(pl_full, 3,1,1,2); layout->addWidget(pb_start, 5,2); layout->setColumnStretch(0,1); layout->setColumnStretch(1,10); layout->setColumnStretch(2,1); layout->setRowStretch(4,10); rb_quick->setChecked(true); connect(pb_start, SIGNAL(clicked()), this, SLOT(start())); } void devctlDestruct::start() { ProgressWidget *progress; if (QMessageBox::warning(this, tr("Are you sure?"), tr("Media will be unreadable after this operation!"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) != QMessageBox::Yes) return; qDebug("Destructing media..."); dev->features.as_act_mode = !!rb_full->isChecked(); dev->startDestruct(); progress = new ProgressWidget(10,3,this); progress->setText(tr("Destructing data...")); progress->show(); while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } delete progress; } // Pioneer QuietMode devctlPioquiet::devctlPioquiet(device* idev, QWidget* p) :QGroupBox(tr("Pioneer Quiet Mode"),p) { dev = idev; setEnabled( dev->features.supported & FEATURE_PIOQUIET ); layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); box_mode = new QGroupBox(tr("Profile"),this); layout->addWidget(box_mode,0,0,1,3); layoutm = new QVBoxLayout(box_mode); layoutm->setMargin(3); layoutm->setSpacing(3); rb_quiet = new QRadioButton(tr("Quiet"), box_mode); rb_std = new QRadioButton(tr("Standard"), box_mode); rb_perf = new QRadioButton(tr("Performance"), box_mode); layoutm->addWidget(rb_quiet); layoutm->addWidget(rb_std); layoutm->addWidget(rb_perf); rb_quiet->setChecked( dev->features.pioq_quiet == PIOQ_QUIET ); rb_perf->setChecked( dev->features.pioq_quiet == PIOQ_PERF ); rb_std->setChecked( dev->features.pioq_quiet == PIOQ_STD ); ck_limit = new QCheckBox(tr("Limit read speed to 24X for CD and 8X for DVD"),this); layout->addWidget(ck_limit, 1,0,1,3); ck_limit->setChecked( dev->features.enabled & FEATURE_PIOLIMIT ); ck_perm = new QCheckBox(tr("Permanent"),this); layout->addWidget(ck_perm, 3,1); pb_set = new QPushButton(QIcon(":images/ok.png"),tr("Set"),this); pb_set->setMinimumWidth(100); layout->addWidget(pb_set, 3,2); layout->setRowStretch(0,2); layout->setRowStretch(1,1); layout->setRowStretch(2,10); layout->setRowStretch(3,1); connect(pb_set, SIGNAL(clicked()), this, SLOT(set())); } void devctlPioquiet::set() { dev->features.pioq_nosave = !ck_perm->isChecked(); if (ck_limit->isChecked()) dev->features.enabled |= FEATURE_PIOLIMIT; else dev->features.enabled &= ~FEATURE_PIOLIMIT; if (rb_quiet->isChecked()) { dev->features.pioq_quiet = PIOQ_QUIET; } else if (rb_perf->isChecked()) { dev->features.pioq_quiet = PIOQ_PERF; } else { dev->features.pioq_quiet = PIOQ_STD; } dev->setComplexFeature(FEATURE_PIOQUIET, &dev->features); } // Yamaha CRW-F1 Disc T@2 devctlF1Tattoo::devctlF1Tattoo(device* idev, QWidget* p) :QGroupBox("Yamaha CRW-F1 Disc T@2",p) { dev = idev; setEnabled(dev->features.supported & FEATURE_F1TATTOO); layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); tw = new TattooWidget(this); layout->addWidget(tw,0,0,1,2); r0=dev->features.tattoo_inner; r1=dev->features.tattoo_outer; tw->setRadius(r0,r1); layoutb = new QHBoxLayout(); layoutb->setMargin(0); layoutb->setSpacing(3); layout->addLayout(layoutb,1,0,1,2); l_file = new QLabel(this); l_file->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layoutb->addWidget(l_file,20); pb_load = new QPushButton(this); pb_load->setMaximumSize(24,24); pb_load->setIcon(QIcon(":images/fileopen.png")); layoutb->addWidget(pb_load,1); pb_burn = new QPushButton(QIcon(":images/tattoo.png"), tr("Burn T@2"), this); pb_burn->setMinimumWidth(100); pb_burn->setEnabled(false); layout->addWidget(pb_burn,2,1); layout->setRowStretch(0,20); layout->setColumnStretch(0,5); layout->setColumnStretch(1,1); connect(pb_load, SIGNAL(clicked()), this, SLOT(loadImage())); connect(pb_burn, SIGNAL(clicked()), this, SLOT(burn())); } void devctlF1Tattoo::loadImage() { QString fn = QFileDialog::getOpenFileName(this, tr("Select T@2 image...")); if (fn == QString::null) return; if (!srcimg.load(fn)) { QMessageBox::warning(this, tr("Error"), tr("Can't load image: ") + fn); return; } qDebug() << "Loaded image: " << srcimg.width() << "x" << srcimg.height(); l_file->setText(fn); img = srcimg.scaled(F1TATTOOW, (r1-r0), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); qDebug() << "Scaled image: " << img.width() << "x" << img.height(); tw->setImage(img); pb_burn->setEnabled(srcimg.width() && srcimg.height()); } void devctlF1Tattoo::burn() { ProgressWidget *progress; QString tfn; QFile tf; QByteArray line(F1TATTOOW, 0); qDebug("Generating T@2 data..."); //QImage timg = img.scaled(F1TATTOOW, (r1-r0+1), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); qDebug() << "T@2 image size: " << img.width() << "x" << img.height(); QStringList env = QProcess::systemEnvironment(); int hidx = env.indexOf(QRegExp("HOME=(.*)")); if (hidx>=0) { tfn = env[hidx].remove(0,5); } else { tfn = "/tmp"; } tfn += "/tmp.tattoo"; qDebug() << "T@2 temporary file: " << tfn; // img.save(tfn + ".png"); tf.setFileName(tfn); if (!tf.open(QIODevice::WriteOnly)) { QMessageBox::critical(this, tr("Error"), tr("Can't create DiscT@2 temporary file!")); return; } for(int y=img.height()-1; y>=0; y--) { for (int x=0; xfeatures.tattoo_file = tfn; dev->startTattoo(); progress = new ProgressWidget(10,3,this); progress->setText(tr("Burning DiscT@2 image...")); progress->show(); while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } #if 0 for(int i=0; i<16; i++) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } #endif delete progress; } qpxtool-0.7.1_002/gui/src/mwatcher.cpp0000644000175000001440000000421311336450735016756 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include "mwatcher.h" #include #include #include MediaWatcher::MediaWatcher(device *qdev) { #ifndef QT_NO_DEBUG qDebug("MediaWatcher()"); #endif if (qdev->type == device::DevtypeLocal) { QByteArray ba; ba+=qdev->path; dev = new drive_info(ba.data()); if (inquiry(dev)) { delete dev; dev = NULL; } } else { dev = NULL; } } MediaWatcher::~MediaWatcher() { #ifndef QT_NO_DEBUG qDebug("~MediaWatcher()"); #endif if (dev) delete dev; } void MediaWatcher::stop() { sreq=1; } void MediaWatcher::pause() { preq=1; } void MediaWatcher::unPause() { preq=0; } void MediaWatcher::run() { if (!dev) { qDebug("Can't start watcher: NULL device!"); return; } int op,cp; #ifndef QT_NO_DEBUG qDebug() << dev->device << ": watcher started"; #endif sreq = 0; preq = 0; // initialising surrent status op = cp = test_unit_ready(dev); while (!sreq) { if (!preq) { cp = test_unit_ready(dev); if (cp!=op) { switch (cp) { case -1: cp = op; break; case 0x00000: // media found qDebug() << dev->device << ": new media found"; emit mediaNew(); break; case 0x23A01: // no media, tray closed qDebug() << dev->device << ": tray closed, but no media found"; emit mediaNoMedia(); break; case 0x23A02: // no media, tray open qDebug() << dev->device << ": media removed"; emit mediaRemoved(); break; case 0x20401: // media recognition emit mediaLoading(); qDebug() << dev->device << ": loading media"; break; default: print_sense(cp); printf("\n"); break; } op = cp; } } sleep(1); } #ifndef QT_NO_DEBUG qDebug() << dev->device << ": watcher stoped"; #endif } qpxtool-0.7.1_002/gui/src/pref_common.cpp0000644000175000001440000001412211352126252017440 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include "pref_common.h" #include #include #include #include #include #include #include #include #include #include #include #include prefCommon::prefCommon(QPxSettings *iset, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { #ifndef QT_NO_DEBUG qDebug("STA: prefCommon()"); #endif set = iset; layout = new QVBoxLayout(this); layout->setMargin(0); layout->setSpacing(3); // default actions ck_autow = new QCheckBox(tr("Autostart tests on written media inserted"), this); ck_autob = new QCheckBox(tr("Autostart tests on blank media inserted"), this); layout->addWidget(ck_autow); layout->addWidget(ck_autob); box_rep = new QGroupBox(tr("Autosave reports after tests completed"),this); box_rep->setCheckable(true); layout->addWidget(box_rep); layout_rep = new QVBoxLayout(box_rep); layout_rep->setMargin(3); layout_rep->setSpacing(3); layout_rep_path = new QHBoxLayout(); layout_rep_path->setMargin(0); layout_rep_path->setSpacing(3); layout_rep->addLayout(layout_rep_path); l_rep_path = new QLabel(tr("Path:"),box_rep); e_rep_path = new QLineEdit(box_rep); pb_rep_path = new QPushButton(QIcon(":images/directory.png"), "", box_rep); pb_rep_path->setToolTip(tr("Select directory for reports saving...")); layout_rep_path->addWidget(l_rep_path); layout_rep_path->addWidget(e_rep_path); layout_rep_path->addWidget(pb_rep_path); ck_eject = new QCheckBox(tr("Eject media after tests finished"), box_rep); layout_rep->addWidget(ck_eject); // default tests for written media pl_testsw = new QLabel("" + tr("Default tests for written media") + "",this); pl_testsw->setAlignment(Qt::AlignCenter); pl_testsw->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(pl_testsw); ck_rt = new QCheckBox(tr("Read Transfer Rate"),this); ck_errc = new QCheckBox(tr("Error Correction"),this); ck_jb = new QCheckBox(tr("Jitter/Asymmetry"),this); ck_ftw = new QCheckBox(tr("Focus/Tracking"),this); ck_ta = new QCheckBox(tr("Time Analyser"),this); layout->addWidget(ck_rt); layout->addWidget(ck_errc); layout->addWidget(ck_jb); layout->addWidget(ck_ftw); layout->addWidget(ck_ta); // default tests for blank media pl_testsb = new QLabel("" + tr("Default tests for blank media") + "",this); pl_testsb->setAlignment(Qt::AlignCenter); pl_testsb->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout->addWidget(pl_testsb); layout_testsb = new QGridLayout(); layout_testsb->setMargin(0); layout_testsb->setSpacing(3); layout->addLayout(layout_testsb); ck_wt = new QCheckBox(tr("Write Transfer Rate"),this); ck_wt_simul = new QCheckBox(tr("Simulation"),this); ck_wt_simul->setEnabled(false); ck_ftb = new QCheckBox(tr("Focus/Tracking"),this); layout_testsb->addWidget(ck_wt, 0,0,1,2); layout_testsb->addWidget(ck_wt_simul,1,1); layout_testsb->addWidget(ck_ftb, 2,0,1,2); layout_testsb->setColumnStretch(0,1); layout_testsb->setColumnStretch(1,10); layout->addStretch(10); // creating objects connections... connect(ck_wt, SIGNAL(toggled(bool)), ck_wt_simul, SLOT(setEnabled(bool))); connect(pb_rep_path, SIGNAL(clicked()), this, SLOT(select_rep_path())); // applying settings... ck_autow->setChecked(set->actions_flags & AFLAG_AUTOSTART_W); ck_autob->setChecked(set->actions_flags & AFLAG_AUTOSTART_B); ck_eject->setChecked(set->actions_flags & AFLAG_EJECT_AFTER); box_rep->setChecked(set->report_autosave); e_rep_path->setText(set->report_path); ck_rt->setChecked(set->actions_flags & AFLAG_DTEST_RT); ck_wt->setChecked(set->actions_flags & AFLAG_DTEST_WT); ck_wt_simul->setChecked(set->actions_flags & AFLAG_DTEST_WT_SIMUL); ck_errc->setChecked(set->actions_flags & AFLAG_DTEST_ERRC); ck_jb->setChecked(set->actions_flags & AFLAG_DTEST_JB); ck_ftw->setChecked(set->actions_flags & AFLAG_DTEST_FT_W); ck_ftb->setChecked(set->actions_flags & AFLAG_DTEST_FT_B); ck_ta->setChecked(set->actions_flags & AFLAG_DTEST_TA); #ifndef QT_NO_DEBUG qDebug("END: prefCommon()"); #endif } prefCommon::~prefCommon() { if (ck_autow->isChecked()) set->actions_flags |= AFLAG_AUTOSTART_W; else set->actions_flags &= ~AFLAG_AUTOSTART_W; if (ck_autob->isChecked()) set->actions_flags |= AFLAG_AUTOSTART_B; else set->actions_flags &= ~AFLAG_AUTOSTART_B; if (ck_eject->isChecked()) set->actions_flags |= AFLAG_EJECT_AFTER; else set->actions_flags &= ~AFLAG_EJECT_AFTER; set->report_autosave = box_rep->isChecked(); set->report_path = e_rep_path->text(); if (ck_rt->isChecked()) set->actions_flags |= AFLAG_DTEST_RT; else set->actions_flags &= ~AFLAG_DTEST_RT; if (ck_wt->isChecked()) set->actions_flags |= AFLAG_DTEST_WT; else set->actions_flags &= ~AFLAG_DTEST_WT; if (ck_wt_simul->isChecked()) set->actions_flags |= AFLAG_DTEST_WT_SIMUL; else set->actions_flags &= ~AFLAG_DTEST_WT_SIMUL; if (ck_errc->isChecked()) set->actions_flags |= AFLAG_DTEST_ERRC; else set->actions_flags &= ~AFLAG_DTEST_ERRC; if (ck_jb->isChecked()) set->actions_flags |= AFLAG_DTEST_JB; else set->actions_flags &= ~AFLAG_DTEST_JB; if (ck_ftw->isChecked()) set->actions_flags |= AFLAG_DTEST_FT_W; else set->actions_flags &= ~AFLAG_DTEST_FT_W; if (ck_ftb->isChecked()) set->actions_flags |= AFLAG_DTEST_FT_B; else set->actions_flags &= ~AFLAG_DTEST_FT_B; if (ck_ta->isChecked()) set->actions_flags |= AFLAG_DTEST_TA; else set->actions_flags &= ~AFLAG_DTEST_TA; } void prefCommon::select_rep_path() { #ifndef QT_NO_DEBUG qDebug() << "select_rep_path()"; #endif QString path = QFileDialog::getExistingDirectory(this, tr("Select directory..."), e_rep_path->text()); if (path.isEmpty()) return; e_rep_path->setText(path); } qpxtool-0.7.1_002/gui/src/tab_devinfo.cpp0000644000175000001440000002517311334746255017437 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include "tab_devinfo.h" #include #include tabDevInfo::tabDevInfo(QPxSettings *iset, devlist *idev, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabDevInfo()"); #endif settings = iset; devices = idev; layout = new QHBoxLayout(this); layout->setMargin(0); layout->setSpacing(3); layout_left = new QGridLayout(); layout_left->setVerticalSpacing(1); layout_left->setHorizontalSpacing(6); layout->addLayout(layout_left); label_left = new QLabel(""+tr("Basic info")+"",this); label_left->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); label_left->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); label_left->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); layout_left->addWidget(label_left, 0, 0, 1, 2); pl_vendor = new QLabel(tr("Vendor:"), this); pl_vendor->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_vendor, 1, 0); l_vendor = new QLabel(this); l_vendor->setMinimumWidth(120); layout_left->addWidget(l_vendor, 1, 1); pl_model = new QLabel(tr("Model:"), this); pl_model->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_model, 2, 0); l_model = new QLabel(this); l_model->setMinimumWidth(120); layout_left->addWidget(l_model, 2, 1); pl_fw = new QLabel(tr("F/W:"), this); pl_fw->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_fw, 3, 0); l_fw = new QLabel(this); l_fw->setMinimumWidth(120); layout_left->addWidget(l_fw, 3, 1); pl_tla = new QLabel(tr("TLA#"), this); pl_tla->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_tla, 4, 0); l_tla = new QLabel(this); l_tla->setMinimumWidth(120); layout_left->addWidget(l_tla, 4, 1); pl_sn = new QLabel(tr("S/N:"), this); pl_sn->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_sn, 5, 0); l_sn = new QLabel(this); l_sn->setMinimumWidth(120); layout_left->addWidget(l_sn, 5, 1); pl_buf = new QLabel(tr("Buffer:"), this); pl_buf->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_buf, 6, 0); l_buf = new QLabel(this); l_buf->setMinimumWidth(120); layout_left->addWidget(l_buf, 6, 1); pl_iface = new QLabel(tr("IFace:"), this); pl_iface->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_iface, 7, 0); l_iface = new QLabel(this); l_iface->setMinimumWidth(120); layout_left->addWidget(l_iface, 7, 1); pl_loader = new QLabel(tr("Loader:"), this); pl_loader->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_loader, 8, 0); l_loader = new QLabel(this); l_loader->setMinimumWidth(120); layout_left->addWidget(l_loader, 8, 1); pl_rpc_phase = new QLabel(tr("RPC Phase:"), this); pl_rpc_phase->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_rpc_phase, 9, 0); l_rpc_phase = new QLabel(this); l_rpc_phase->setMinimumWidth(120); layout_left->addWidget(l_rpc_phase, 9, 1); pl_rpc_reg = new QLabel(tr("Region:"), this); pl_rpc_reg->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_rpc_reg, 10, 0); l_rpc_reg = new QLabel(this); l_rpc_reg->setMinimumWidth(120); layout_left->addWidget(l_rpc_reg, 10, 1); pl_rpc_ch = new QLabel(tr("Changes:"), this); pl_rpc_ch->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_rpc_ch, 11, 0); l_rpc_ch = new QLabel(this); l_rpc_ch->setMinimumWidth(120); layout_left->addWidget(l_rpc_ch, 11, 1); pl_rpc_rst = new QLabel(tr("Resets:"), this); pl_rpc_rst->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_rpc_rst, 12, 0); l_rpc_rst = new QLabel(this); l_rpc_rst->setMinimumWidth(120); layout_left->addWidget(l_rpc_rst, 12, 1); // Plextor Lifetime hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout_left->addWidget(hline0,13,0,1,2); pl_life_dn = new QLabel(tr("Discs loaded:"), this); pl_life_dn->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_life_dn, 14, 0); l_life_dn = new QLabel(this); // l_life_dn->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_life_dn->setMinimumWidth(120); layout_left->addWidget(l_life_dn, 14, 1); pl_life_cr = new QLabel(tr("CD read:"), this); pl_life_cr->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_life_cr, 15, 0); l_life_cr = new QLabel(this); // l_life_cr->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_life_cr->setMinimumWidth(120); layout_left->addWidget(l_life_cr, 15, 1); pl_life_cw = new QLabel(tr("CD write:"), this); pl_life_cw->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_life_cw, 16, 0); l_life_cw = new QLabel(this); // l_life_cw->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_life_cw->setMinimumWidth(120); layout_left->addWidget(l_life_cw, 16, 1); pl_life_dr = new QLabel(tr("DVD read:"), this); pl_life_dr->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_life_dr, 17, 0); l_life_dr = new QLabel(this); // l_life_dr->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_life_dr->setMinimumWidth(120); layout_left->addWidget(l_life_dr, 17, 1); pl_life_dw = new QLabel(tr("DVD write:"), this); pl_life_dw->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout_left->addWidget(pl_life_dw, 18, 0); l_life_dw = new QLabel(this); // l_life_dw->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_life_dw->setMinimumWidth(120); layout_left->addWidget(l_life_dw, 18, 1); layout_left->setColumnStretch(0,2); layout_left->setColumnStretch(1,3); layout_left->setRowStretch(19,20); int hidx=0, vidx=0, hidx0 = 0, rows=0; MediaCapWidget *cap; cap_grid = new QGridLayout; layout->addLayout(cap_grid); lc_media = new QLabel(""+tr("Media R/W Capabilities")+"",this); lc_media->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); lc_media->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); lc_media->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); cap_grid->addWidget(lc_media, hidx, 0, 1, CAP_COLS); hidx++; vidx=0; hidx0=0; rows = (sizeof(rw_capabilities) / sizeof (desc64) - 2 + CAP_COLS) / CAP_COLS ; for (int idx=0; rw_capabilities[idx].id || strlen(rw_capabilities[idx].name); idx++) { if (rw_capabilities[idx].id) { cap = new MediaCapWidget(rw_capabilities[idx].name, 1, rw_capabilities[idx].id, this); cap_media.append(cap); cap_grid->addWidget(cap, hidx+hidx0, vidx); } hidx0 = (hidx0+1) % rows; if (!hidx0) vidx++; } hidx+=rows; lc_generic = new QLabel(""+tr("Generic Capabilities")+"",this); lc_generic->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); lc_generic->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); lc_generic->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); cap_grid->addWidget(lc_generic, hidx, 0, 1, CAP_COLS); hidx++; vidx=0; hidx0=0; rows = (sizeof(capabilities) / sizeof (desc64) - 2 + CAP_COLS) / CAP_COLS ; for (int idx=0; capabilities[idx].id || strlen(capabilities[idx].name); idx++) { if (capabilities[idx].id) { cap = new MediaCapWidget(capabilities[idx].name, 0, capabilities[idx].id , this); cap_generic.append(cap); cap_grid->addWidget(cap, hidx+hidx0, vidx); } hidx0 = (hidx0+1) % rows; if (!hidx0) vidx++; } hidx+=rows; cap_grid->setRowStretch(hidx, 10); cap_grid->setColumnStretch(0, 10); cap_grid->setColumnStretch(1, 10); cap_grid->setColumnStretch(2, 10); layout->setStretchFactor(layout_left, 1); layout->setStretchFactor(cap_grid, 3); clear(); #ifndef QT_NO_DEBUG qDebug("END: tabDevInfo()"); #endif } tabDevInfo::~tabDevInfo() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabDevInfo()"); #endif #ifndef QT_NO_DEBUG qDebug("END: ~tabDevInfo()"); #endif } void tabDevInfo::clear() { #ifndef QT_NO_DEBUG qDebug("STA: tabDevInfo::clear()"); #endif l_vendor->setText("-"); l_model->setText("-"); l_fw->setText("-"); l_tla->setText("-"); l_sn->setText("-"); l_buf->setText("-"); l_iface->setText("-"); l_loader->setText("-"); l_rpc_phase->setText("-"); l_rpc_reg->setText("-"); l_rpc_ch->setText("-"); l_rpc_rst->setText("-"); for (int idx=0; idx < cap_media.size(); idx++) cap_media[idx]->clear(); for (int idx=0; idx < cap_generic.size(); idx++) cap_generic[idx]->clear(); #ifndef QT_NO_DEBUG qDebug("END: tabDevInfo::clear()"); #endif } void tabDevInfo::selectDevice() { #ifndef QT_NO_DEBUG qDebug("STA: tabDevInfo::selectDevice()"); #endif clear(); updateData(); QObject::connect( devices->current(), SIGNAL(doneDInfo(int)), this, SLOT(updateData(int)) ); #ifndef QT_NO_DEBUG qDebug("END: tabDevInfo::selectDevice()"); #endif } void tabDevInfo::updateData(int xcode) { #ifndef QT_NO_DEBUG qDebug("STA: tabDevInfo::updateData()"); #endif const device *dev = devices->current(); l_vendor->setText(dev->ven); l_model->setText(dev->dev); l_fw->setText(dev->fw); l_tla->setText(dev->tla); l_sn->setText(dev->sn); l_buf->setText(dev->buf); l_iface->setText(dev->iface); l_loader->setText(dev->loader); l_rpc_phase->setText((dev->rpc_phase < 0) ? "-" : QString::number(dev->rpc_phase) ); l_rpc_reg->setText((dev->rpc_reg < 0) ? ((dev->rpc_reg == -2) ? "not set" : "-") : QString::number(dev->rpc_reg) ); l_rpc_ch->setText((dev->rpc_ch < 0) ? "-" : QString::number(dev->rpc_ch) ); l_rpc_rst->setText((dev->rpc_rst < 0) ? "-" : QString::number(dev->rpc_rst) ); if (dev->life_dn>=0) { l_life_dn->setNum(dev->life_dn); l_life_cr->setText(dev->life_cr); l_life_cw->setText(dev->life_cw); l_life_dr->setText(dev->life_dr); l_life_dw->setText(dev->life_dw); } else { l_life_dn->setText("-"); l_life_cr->setText("-"); l_life_cw->setText("-"); l_life_dr->setText("-"); l_life_dw->setText("-"); } for (int idx=0; idx < cap_generic.size(); idx++) cap_generic[idx]->setCap(dev->cap); for (int idx=0; idx < cap_media.size(); idx++) { cap_media[idx]->setR(dev->cap_rd); cap_media[idx]->setW(dev->cap_wr); } if (xcode) { QMessageBox::warning(this, tr("Error"), tr("Error updating device info!")+"\n"+tr("qScan finished with non-zero exit code")); } #ifndef QT_NO_DEBUG qDebug("END: tabDevInfo::updateData()"); #endif } qpxtool-0.7.1_002/gui/src/graphtab.cpp0000644000175000001440000000636011334746174016744 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include "graphtab.h" #include #include #include #include GraphTab::GraphTab(QPxSettings *iset, devlist *idev, QString iname, int test, QWidget *p, Qt::WindowFlags fl) : QWidget(p,fl) { #ifndef QT_NO_DEBUG qDebug("STA: GraphTab()"); #endif settings = iset; devices = idev; name = iname; // prevTvalid = 0; gettimeofday(&prevT, NULL); settings->loadScale(name); layout = new QHBoxLayout(this); layout->setMargin(0); layout->setSpacing(3); split = new SplitButton(Qt::Vertical, this); layout->addWidget(split); connect(split, SIGNAL(clicked()), this, SLOT(infoToggle())); lw = new QWidget(this); lw->setMinimumWidth(80); layout->addWidget(lw); layoutl = new QVBoxLayout(lw); layoutl->setMargin(0); layoutl->setSpacing(3); // layout->addLayout(layoutl); infow = new QWidget(lw); infow->setMinimumWidth(80); layoutl->addWidget(infow,20); // layoutl->addStretch(1); grp_time = new QGroupBox(tr("Time"), lw); grp_time->setMinimumWidth(100); layoutl->addWidget(grp_time,1); layoutt = new QVBoxLayout(grp_time); layoutt->setMargin(3); layoutt->setSpacing(0); ltime = new QLabel(grp_time); ltime->setAlignment(Qt::AlignRight | Qt::AlignVCenter); ltime->setMinimumHeight(22); QFont tfont = ltime->font(); tfont.setFamily("Monospace"); ltime->setFont( tfont ); layoutt->addWidget(ltime); vline0 = new QFrame(this); vline0->setFrameStyle(QFrame::VLine | QFrame::Sunken); layout->addWidget(vline0); graph = new QPxGraph(iset, idev, name, test, this); // graph->setDataNames(QStringList() << "speed_rt" << "speed_wt"); layout->addWidget(graph); clear(); #ifndef QT_NO_DEBUG qDebug("END: GraphTab()"); #endif } GraphTab::~GraphTab() {} void GraphTab::clear() {} void GraphTab::infoToggle() { lw->setVisible(!lw->isVisible()); } void GraphTab::updateLast(int time, bool *Tvalid, bool force) { timeval curT; float dt; gettimeofday(&curT, NULL); // if (prevTvalid) dt = curT.tv_sec - prevT.tv_sec + (curT.tv_usec - prevT.tv_usec) / 1000000.0; // if (!prevTvalid || dt>0.5) { if (force || dt>0.5) { int s = time % 60; int m = (time - s) / 60; ltime->setText(QString("%1:%2").arg(m).arg(s, 2,10, QChar('0'))); gettimeofday(&prevT, NULL); // prevTvalid = 1; if (force) { graph->update(); } else { int x = graph->getLastX(); graph->update(x, 0, graph->width()-x, graph->height()); } if (Tvalid) *Tvalid=1; return; } if (Tvalid) *Tvalid=0; } void GraphTab::drawGraph(QImage& img, device *dev, int ttype, int eflags) { int w = img.width(); int h = img.height(); QSize s(w,h); QRect r(0, 0, w, h); QPainter p(&img); graph->drawGraph(&p, s, dev, ttype, r, (ttype == TEST_ERRC) ? eflags : 0, FORCE_REPAINT); } qpxtool-0.7.1_002/gui/src/tattoowidget.cpp0000644000175000001440000000530111316135740017653 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include "tattoowidget.h" TattooWidget::TattooWidget( QWidget *p) : QWidget(p) { r0mm = F1TATTOOR/3; r1mm = F1TATTOOR; } TattooWidget::~TattooWidget() {} void TattooWidget::setRadius(int ir0, int ir1) { r0mm = ir0; r1mm = ir1; convertImage(); update(); } void TattooWidget::setImage(QImage& iimg) { timg = iimg; convertImage(); update(); } #define CONVERT_DIRECT void TattooWidget::convertImage() { x0 = width()/2; y0 = height()/2; if (width() < height()) { r1p = x0 - 4; } else { r1p = y0 - 4; } r0p = (int)((float)r1p * r0mm / r1mm); dimg = QImage(r1p<<1, r1p<<1, QImage::Format_ARGB32); dimg.fill(0xFFFFFFFF); float ang, rad; int h=timg.height(); int w=timg.width(); #ifndef CONVERT_DIRECT QPainter p; p.begin(&dimg); p.setRenderHint(QPainter::Antialiasing); #endif float x1,y1; if (w & h) { #ifndef QT_NO_DEBUG qDebug() << "Converting image " << w << "x" << h << " to radial..."; #endif for(int y=0; y * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include "tab_errc.h" #include tabERRC::tabERRC(QPxSettings *iset, devlist *idev, QString iname, QWidget *p, Qt::WindowFlags fl) : GraphTab(iset, idev, iname, TEST_ERRC, p, fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabERRC()"); #endif xerrc = NULL; layout_info = new QVBoxLayout(infow); layout_info->setMargin(0); layout_info->setSpacing(3); #ifdef __LEGEND_SHOW_SPEED pl_spd = new ColorLabel(QColor(Qt::black),"Speed", 0, infow); pl_spd->setMinimumSize(100,20); layout_info->addWidget(pl_spd); #endif pl_e0 = new ColorLabel(QColor(Qt::black),"BLER/PI8", 0, infow); // pl_e0->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_e0->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout_info->addWidget(pl_e0); l_e0t = new QLabel(infow); l_e0t->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e0t->setMinimumHeight(22); layout_info->addWidget(l_e0t); l_e0m = new QLabel(infow); l_e0m->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e0m->setMinimumHeight(22); layout_info->addWidget(l_e0m); l_e0a = new QLabel(infow); l_e0a->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e0a->setMinimumHeight(22); layout_info->addWidget(l_e0a); pl_e1 = new ColorLabel(QColor(Qt::black),"E22/PIF", 0, infow); // pl_e1->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_e1->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout_info->addWidget(pl_e1); l_e1t = new QLabel(infow); l_e1t->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e1t->setMinimumHeight(22); layout_info->addWidget(l_e1t); l_e1m = new QLabel(infow); l_e1m->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e1m->setMinimumHeight(22); layout_info->addWidget(l_e1m); l_e1a = new QLabel(infow); l_e1a->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e1a->setMinimumHeight(22); layout_info->addWidget(l_e1a); pl_e2 = new ColorLabel(QColor(Qt::black),"E32/POF", 0, infow); // pl_e2->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_e2->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout_info->addWidget(pl_e2); l_e2t = new QLabel(infow); l_e2t->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e2t->setMinimumHeight(22); layout_info->addWidget(l_e2t); l_e2m = new QLabel(infow); l_e2m->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e2m->setMinimumHeight(22); layout_info->addWidget(l_e2m); l_e2a = new QLabel(infow); l_e2a->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_e2a->setMinimumHeight(22); layout_info->addWidget(l_e2a); layout_info->addStretch(10); pb_xerrc = new QPushButton("Detailed"); layout_info->addWidget(pb_xerrc); QObject::connect(pb_xerrc, SIGNAL(clicked()), this, SLOT(toggleXErrc())); clear(); #ifndef QT_NO_DEBUG qDebug("END: tabERRC()"); #endif } tabERRC::~tabERRC() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabERRC()"); qDebug("END: ~tabERRC()"); #endif } /* void tabERRC::clear() { qDebug("tabERRC::clear()"); } */ void tabERRC::selectDevice() { #ifndef QT_NO_DEBUG qDebug("tabERRC::selectDevice()"); #endif device *dev = devices->current(); updateAll(); // GraphTab::updateLast((int)time, NULL, 1); // updateSummary(dev); // QObject::connect( devices->current(), SIGNAL(block_ERRC()), this, SLOT(update()) ); QObject::connect( dev, SIGNAL(doneMInfo(int)), this, SLOT(updateAll()) ); QObject::connect( dev, SIGNAL(block_ERRC()), this, SLOT(updateLast()) ); } void tabERRC::updateAll() { device *dev = devices->current(); GraphTab::updateLast((int)(dev->testData.errc_time), NULL, 1); updateSummary(dev); if (dev->media.type.startsWith("CD")) { pl_e0->setText("BLER"); pl_e1->setText("E22"); pl_e2->setText("E32"); } else if (dev->media.type.startsWith("DVD")) { pl_e0->setText("PI8"); pl_e1->setText("PIF"); pl_e2->setText("POF"); } else { pl_e0->setText("BLER/PI8"); pl_e1->setText("E22/PIF"); pl_e2->setText("E32/POF"); } updateLegend(); if (xerrc) xerrc->updateAll(); } void tabERRC::updateLegend() { device *dev = devices->current(); if (dev->media.type.startsWith("CD")) { pl_e0->setColor( *(settings->col_errc.cd.bler)); pl_e1->setColor( *(settings->col_errc.cd.e22)); pl_e2->setColor( *(settings->col_errc.cd.e32)); } else if (dev->media.type.startsWith("DVD")) { pl_e0->setColor( *(settings->col_errc.dvd.pi8)); pl_e1->setColor( *(settings->col_errc.dvd.pif)); pl_e2->setColor( *(settings->col_errc.dvd.pof)); } else { pl_e0->setColor( QColor(Qt::black) ); pl_e1->setColor( QColor(Qt::black) ); pl_e2->setColor( QColor(Qt::black) ); } } void tabERRC::updateGraph() { graph->update(); } void tabERRC::updateLast() { bool show; device *dev = devices->current(); int time = (int) (dev->testData.errc_time); GraphTab::updateLast(time, &show); if (!show) return; updateSummary(dev); if (xerrc && xerrc->isVisible()) xerrc->updateAll(); } void tabERRC::updateSummary(device *dev) { if (!dev->testData.errc.size()) { l_e0t->clear(); l_e0m->clear(); l_e0a->clear(); l_e1t->clear(); l_e1m->clear(); l_e1a->clear(); l_e2t->clear(); l_e2m->clear(); l_e2a->clear(); return; } if (dev->media.type.startsWith("CD")) { l_e0t->setText( QString::number(dev->testData.errcTOT.cd.bler) ); l_e0m->setNum( dev->testData.errcMAX.cd.bler ); l_e0a->setText( QString::number(dev->testData.errcAVG.cd.bler, 'f', 2) ); l_e1t->setText( QString::number(dev->testData.errcTOT.cd.e22) ); l_e1m->setNum( dev->testData.errcMAX.cd.e22 ); l_e1a->setText( QString::number(dev->testData.errcAVG.cd.e22, 'f', 2) ); l_e2t->setText( QString::number(dev->testData.errcTOT.cd.e32) ); l_e2m->setNum( dev->testData.errcMAX.cd.e32 ); l_e2a->setText( QString::number(dev->testData.errcAVG.cd.e32, 'f', 2) ); } else if (dev->media.type.startsWith("DVD")) { l_e0t->setText( QString::number(dev->testData.errcTOT.dvd.pi8) ); l_e0m->setNum( dev->testData.errcMAX.dvd.pi8 ); l_e0a->setText( QString::number(dev->testData.errcAVG.dvd.pi8, 'f', 2) ); l_e1t->setText( QString::number(dev->testData.errcTOT.dvd.pif) ); l_e1m->setNum( dev->testData.errcMAX.dvd.pif ); l_e1a->setText( QString::number(dev->testData.errcAVG.dvd.pif, 'f', 2) ); l_e2t->setText( QString::number(dev->testData.errcTOT.dvd.pof) ); l_e2m->setNum( dev->testData.errcMAX.dvd.pof ); l_e2a->setText( QString::number(dev->testData.errcAVG.dvd.pof, 'f', 2) ); } } void tabERRC::toggleXErrc() { if (!xerrc) { xerrc = new ErrcDetailedDialog(settings,devices,this); QObject::connect(xerrc, SIGNAL(closed()), this, SLOT(XerrcClosed())); xerrc->show(); xerrc->updateAll(); } else { xerrc->hide(); delete xerrc; xerrc = NULL; } } void tabERRC::XerrcClosed() { xerrc->disconnect(); xerrc->deleteLater(); xerrc = NULL; } qpxtool-0.7.1_002/gui/src/devsettings.cpp0000644000175000001440000000727411352122426017504 0ustar shultzusers /* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include "devsettings.h" #include #include #include #include #include #include #include #include #include #include #include #include #define TAB_COMMON 0 #define TAB_VARIREC 1 #define TAB_GIGAREC 2 #define TAB_SECUREC 3 #define TAB_SILENT_PLEX 4 #define TAB_SILENT_PIO 5 #define TAB_DESTRUCT 6 #define TAB_TATTOO 7 devSettings::devSettings(QPxSettings *iset, device *idev, QWidget *p, Qt::WindowFlags fl) : QDialog(p,fl) { dev = idev; set = iset; setWindowTitle("QPxTool - "+tr("Device Controls")); cpage = NULL; layout = new QHBoxLayout(this); layout->setMargin(3); layout->setSpacing(3); setLayout(layout); ilist = new ImagesList(80,32,32,this); // ilist->hideText(); layout->addWidget(ilist,1); ilist->addLabel(tr("Common"), QImage(":images/settings2.png"), TAB_COMMON); if (set->show_allctl || dev->features.supported & FEATURE_VARIREC) ilist->addLabel(tr("VariRec"), QImage(":images/varirec.png"), TAB_VARIREC); if (set->show_allctl || dev->features.supported & FEATURE_GIGAREC) ilist->addLabel(tr("GigaRec"), QImage(":images/gigarec.png"), TAB_GIGAREC); if (set->show_allctl || dev->features.supported & FEATURE_SECUREC) ilist->addLabel(tr("SecuRec"), QImage(":images/password.png"), TAB_SECUREC); if (set->show_allctl || dev->features.supported & FEATURE_SILENT) ilist->addLabel(tr("Silent mode"), QImage(":images/sound.png"), TAB_SILENT_PLEX); if (set->show_allctl || dev->features.supported & FEATURE_PIOQUIET) ilist->addLabel(tr("PioQuiet"), QImage(":images/sound.png"), TAB_SILENT_PIO); if (set->show_allctl || dev->features.supported & FEATURE_DESTRUCT) ilist->addLabel(tr("Destruction"), QImage(":images/disc-eraser.png"), TAB_DESTRUCT); if (set->show_allctl || dev->features.supported & FEATURE_F1TATTOO) ilist->addLabel(tr("Disc T@2"), QImage(":images/tattoo.png"), TAB_TATTOO); layoutc = new QVBoxLayout(); layoutc->setMargin(0); layoutc->setSpacing(3); layout->addLayout(layoutc,4); setPage(0); connect(ilist, SIGNAL(selected(int)), this, SLOT(setPage(int))); setMinimumSize(450,380); setMaximumSize(450,580); } devSettings::~devSettings() {} void devSettings::setPage(int page) { #ifndef QT_NO_DEBUG qDebug() << "setPage: " << page; #endif if (cpage) { delete cpage; cpage = NULL; } switch (page) { case TAB_COMMON: cpage = new devctlCommon(dev, this); layoutc->addWidget(cpage); break; case TAB_VARIREC: cpage = new devctlVarirec(dev, this); layoutc->addWidget(cpage); break; case TAB_GIGAREC: cpage = new devctlGigarec(dev, this); layoutc->addWidget(cpage); break; case TAB_SECUREC: cpage = new devctlSecurec(dev, this); layoutc->addWidget(cpage); break; case TAB_SILENT_PLEX: cpage = new devctlSilent(dev, this); layoutc->addWidget(cpage); break; case TAB_SILENT_PIO: cpage = new devctlPioquiet(dev, this); layoutc->addWidget(cpage); break; case TAB_DESTRUCT: cpage = new devctlDestruct(dev, this); layoutc->addWidget(cpage); break; case TAB_TATTOO: cpage = new devctlF1Tattoo(dev, this); layoutc->addWidget(cpage); break; default: qDebug() << "Invalid page num: " << page; } } qpxtool-0.7.1_002/gui/src/pref_devices.cpp0000644000175000001440000001323311202456303017571 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pref_devices.h" #include prefDevices::prefDevices(QPxSettings *iset, QWidget *p, Qt::WindowFlags f) : QWidget(p,f) { #ifndef QT_NO_DEBUG qDebug("STA: prefDevices()"); #endif set = iset; layout = new QVBoxLayout(this); layout->setMargin(0); ck_local = new QCheckBox(tr("Use local devices"),this); ck_local->setChecked(set->useLocal); layout->addWidget(ck_local); ck_remote = new QCheckBox(tr("Use network devices"),this); ck_remote->setChecked(set->useRemote); layout->addWidget(ck_remote); // g_hosts = new QGroupBox(tr("Hosts"), this); //g_hosts->setCheckable(true); // layout->addWidget(g_hosts); // l_hosts = new QVBoxLayout(g_hosts); //lst_hosts = new QTreeWidget(g_hosts); lst_hosts = new QTreeWidget(this); lst_hosts->setRootIsDecorated(false); lst_hosts->setColumnCount(2); lst_hosts->setColumnWidth(0, 130); lst_hosts->setHeaderLabels(QStringList() << tr("host") << tr("qscand port")); layout->addWidget(lst_hosts); QTreeWidgetItem *hitem; for (int i=0; ihosts.size(); i++) { //hitem = new QTreeWidgetItem(lst_hosts, QStringList(set->hosts[i]) ); hitem = new QTreeWidgetItem(lst_hosts); hitem->setFlags( hitem->flags() | Qt::ItemIsUserCheckable); hitem->setCheckState(0, (set->hosts[i][0] == '*') ? Qt::Checked : Qt::Unchecked); hitem->setText(0, set->hosts[i].remove(0,1) ); if (iports.size()) hitem->setText(1, set->ports[i] ); else hitem->setText(1, "46660" ); lst_hosts->addTopLevelItem(hitem); } // lst_hosts->sortItems(0,Qt::AscendingOrder); lst_hosts->installEventFilter(this); #ifndef QT_NO_DEBUG qDebug("END: prefDevices()"); #endif } prefDevices::~prefDevices() { #ifndef QT_NO_DEBUG qDebug("STA: ~prefDevices()"); #endif int hcnt = lst_hosts->topLevelItemCount(); QTreeWidgetItem *hitem; set->useLocal = ck_local->isChecked(); set->useRemote = ck_remote->isChecked(); set->hosts.clear(); set->ports.clear(); for (int i=0; itopLevelItem(i); set->hosts.append( ((hitem->checkState(0) == Qt::Checked) ? "*" : "-") + hitem->text(0) ); set->ports.append( hitem->text(1) ); } #ifndef QT_NO_DEBUG qDebug("END: ~prefDevices()"); #endif } bool prefDevices::eventFilter(QObject* obj, QEvent* e) { if (obj == lst_hosts) { #ifndef QT_NO_DEBUG // qDebug(QString("lst_hosts::event: %1").arg(e->type())); #endif if (e->type() == QEvent::ContextMenu) { hostsContextMenu( (QContextMenuEvent*)e ); return true; // } else if (e->type() == QEvent::MouseButtonDblClick) { // hostEdit(); // return true; } else if (e->type() == QEvent::KeyPress) { switch ( ((QKeyEvent*)e)->key()) { // case Qt::Key_Enter: case Qt::Key_Return: hostEdit(); return true; case Qt::Key_Insert: hostAdd(); return true; case Qt::Key_Delete: hostRemove(); return true; default: return false; } } else { return false; } } else { QWidget::eventFilter(obj,e); } return false; } void prefDevices::hostsContextMenu(QContextMenuEvent* e) { QMenu *cmenu; QAction *act; #ifndef QT_NO_DEBUG qDebug("hostsContextMenu()"); #endif cmenu = new QMenu(this); act = cmenu->addAction(QIcon(":images/edit.png"),tr("Edit host"), this, SLOT(hostEdit())); if (!lst_hosts->currentItem()) act->setEnabled(false); act = cmenu->addAction(QIcon(":images/add.png"), tr("Add host"), this, SLOT(hostAdd())); act = cmenu->addAction(QIcon(":images/x.png"), tr("Remove host"), this, SLOT(hostRemove())); if (!lst_hosts->currentItem()) act->setEnabled(false); cmenu->exec(e->globalPos()); delete cmenu; } void prefDevices::hostAdd() { QTreeWidgetItem *hitem; #ifndef QT_NO_DEBUG qDebug("hostAdd()"); #endif hostEditDialog *hadd = new hostEditDialog("", 46660, this); if (hadd->exec() && !hadd->hostname().isEmpty()) { hitem = new QTreeWidgetItem(lst_hosts); hitem->setFlags(hitem->flags() | Qt::ItemIsUserCheckable); hitem->setCheckState(0, Qt::Checked); hitem->setText(0, hadd->hostname() ); hitem->setText(1, QString::number(hadd->port()) ); lst_hosts->addTopLevelItem(hitem); } delete hadd; } void prefDevices::hostEdit() { QTreeWidgetItem *hitem = lst_hosts->currentItem(); #ifndef QT_NO_DEBUG qDebug("hostEdit()"); #endif if (!hitem) return; hostEditDialog *hedit = new hostEditDialog(hitem->text(0), hitem->text(1).toInt(), this); hedit->setWindowTitle(tr("Edit host")); if (hedit->exec() && !hedit->hostname().isEmpty()) { hitem->setText(0, hedit->hostname() ); hitem->setText(1, QString::number(hedit->port()) ); } delete hedit; } void prefDevices::hostRemove() { QTreeWidgetItem *hitem = lst_hosts->currentItem(); #ifndef QT_NO_DEBUG qDebug("hostRemove()"); #endif if (!hitem) return; if (QMessageBox::warning(this, tr("Remove host?"), tr("You are about to remove host from list:\n%1:%2\nAre you sure?").arg(hitem->text(0)).arg(hitem->text(1)), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok) == QMessageBox::Ok) delete lst_hosts->takeTopLevelItem( lst_hosts->indexOfTopLevelItem(hitem)); } qpxtool-0.7.1_002/gui/src/tab_transfer.cpp0000644000175000001440000001222211334746314017614 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include "tab_transfer.h" #include tabTransfer::tabTransfer(QPxSettings *iset, devlist *idev, QString iname, bool irw, QWidget *p, Qt::WindowFlags fl) : GraphTab(iset, idev, iname, irw ? TEST_WT : TEST_RT, p, fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabTransfer()"); #endif rw = irw; layout_info = new QVBoxLayout(infow); layout_info->setMargin(0); layout_info->setSpacing(3); #ifdef __LEGEND_SHOW_SPEED pl_spd = new ColorLabel(irw ? settings->col_wspeed : settings->col_rspeed, "Speed", 0, infow); pl_spd->setMinimumSize(100,20); layout_info->addWidget(pl_spd); #endif pl_sta = new QLabel(tr("Start"), infow); pl_sta->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); pl_sta->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout_info->addWidget(pl_sta); l_sta_x = new QLabel(infow); l_sta_x->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_sta_x->setMinimumHeight(22); layout_info->addWidget(l_sta_x); l_sta_kb = new QLabel(infow); l_sta_kb->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_sta_kb->setMinimumHeight(22); layout_info->addWidget(l_sta_kb); pl_end = new QLabel(tr("End"), infow); pl_end->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); pl_end->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout_info->addWidget(pl_end); l_end_x = new QLabel(infow); l_end_x->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_end_x->setMinimumHeight(22); layout_info->addWidget(l_end_x); l_end_kb = new QLabel(infow); l_end_kb->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_end_kb->setMinimumHeight(22); layout_info->addWidget(l_end_kb); pl_avg = new QLabel(tr("Average"), infow); pl_avg->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); pl_avg->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); layout_info->addWidget(pl_avg); l_avg_x = new QLabel(infow); l_avg_x->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_avg_x->setMinimumHeight(22); layout_info->addWidget(l_avg_x); l_avg_kb = new QLabel(infow); l_avg_kb->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_avg_kb->setMinimumHeight(22); layout_info->addWidget(l_avg_kb); layout_info->addStretch(10); clear(); #ifndef QT_NO_DEBUG qDebug("END: tabTransfer()"); #endif } tabTransfer::~tabTransfer() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabTransfer()"); qDebug("END: ~tabTransfer()"); #endif } /* void tabTransfer::clear() { qDebug("tabTransfer::clear()"); } */ void tabTransfer::selectDevice() { #ifndef QT_NO_DEBUG qDebug("tabTransfer::selectDevice()"); #endif device *dev = devices->current(); float time = rw ? dev->testData.wt_time : dev->testData.rt_time; // graph->update(); GraphTab::updateLast((int)time, NULL, 1); updateSummary(dev, time); QObject::connect( dev, SIGNAL(doneMInfo(int)), this, SLOT(updateLast()) ); if (!rw) { QObject::connect( dev, SIGNAL(block_RT()), this, SLOT(updateLast()) ); } else { QObject::connect( dev, SIGNAL(block_WT()), this, SLOT(updateLast()) ); } } void tabTransfer::updateLast() { bool show; device *dev = devices->current(); float time = rw ? dev->testData.wt_time : dev->testData.rt_time; GraphTab::updateLast((int)time, &show); if (!show) return; updateSummary(dev,time); } void tabTransfer::updateLegend() { #ifdef __LEGEND_SHOW_SPEED pl_spd->setColor(rw ? settings->col_wspeed : settings->col_rspeed); #endif } void tabTransfer::updateGraph() { graph->update(); } void tabTransfer::updateSummary(device* dev, float time) { #ifndef QT_NO_DEBUG qDebug() << "tabTransfer::updateSummary(): " << (rw ? "WT" : "RT") << " device@" << dev; #endif float avg_x; uint32_t avg_kb; if (!(rw ? dev->testData.wt.size() : dev->testData.rt.size())) { l_sta_x->clear(); l_sta_kb->clear(); l_end_x->clear(); l_end_kb->clear(); l_avg_x->clear(); l_avg_kb->clear(); return; } if (!time) time=1; l_sta_x->setText( QString::number( rw ? dev->testData.wt.first().spdx : dev->testData.rt.first().spdx, 'f', 2 ) + " X"); l_sta_kb->setText( QString::number( rw ? dev->testData.wt.first().spdk : dev->testData.rt.first().spdk) + " kB/s"); l_end_x->setText( QString::number( rw ? dev->testData.wt.last().spdx : dev->testData.rt.last().spdx, 'f', 2 ) + " X"); l_end_kb->setText( QString::number( rw ? dev->testData.wt.last().spdk : dev->testData.rt.last().spdk) + " kB/s"); avg_kb = (int) ((rw ? dev->testData.wt.last().lba : dev->testData.rt.last().lba) * 2 / time); if (dev->media.spd1X) avg_x = (float)avg_kb / dev->media.spd1X; else avg_x = (float)avg_kb / 150.0; #ifndef QT_NO_DEBUG printf("avg: %d KB, %.2f X, %d KB/X\n", avg_kb, avg_x, dev->media.spd1X); #endif l_avg_x->setText( QString::number( avg_x, 'f', 2) + " X"); l_avg_kb->setText( QString::number(avg_kb) + " kB/s"); } qpxtool-0.7.1_002/gui/src/tab_jb.cpp0000644000175000001440000000724711334746273016402 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include "tab_jb.h" #include tabJB::tabJB(QPxSettings *iset, devlist *idev, QString iname, QWidget *p, Qt::WindowFlags fl) : GraphTab(iset, idev, iname, TEST_JB, p, fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabJB()"); #endif layout_info = new QVBoxLayout(infow); layout_info->setMargin(0); layout_info->setSpacing(3); #ifdef __LEGEND_SHOW_SPEED pl_spd = new ColorLabel(QColor(Qt::black),"Speed", 0, infow); pl_spd->setMinimumSize(100,20); layout_info->addWidget(pl_spd); #endif pl_jitter = new ColorLabel(settings->col_jitter, tr("Jitter"), 0, infow); // pl_jitter->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_jitter->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); pl_jitter->setMinimumSize(100,20); layout_info->addWidget(pl_jitter); l_jmax = new QLabel(infow); l_jmax->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_jmax->setMinimumSize(80,22); layout_info->addWidget(l_jmax); l_jmin = new QLabel(infow); l_jmin->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_jmin->setMinimumSize(80,22); layout_info->addWidget(l_jmin); pl_asymm = new ColorLabel(settings->col_asymm, tr("Asymmetry"), 0, infow); // pl_asymm->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); // pl_asymm->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); pl_asymm->setMinimumSize(100,20); layout_info->addWidget(pl_asymm); l_amax = new QLabel(infow); l_amax->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_amax->setMinimumSize(80,22); layout_info->addWidget(l_amax); l_amin = new QLabel(infow); l_amin->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_amin->setMinimumSize(80,22); layout_info->addWidget(l_amin); layout_info->addStretch(10); clear(); #ifndef QT_NO_DEBUG qDebug("END: tabJB()"); #endif } tabJB::~tabJB() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabJB()"); qDebug("END: ~tabJB()"); #endif } /* void tabJB::clear() { qDebug("tabJB::clear()"); } */ void tabJB::selectDevice() { #ifndef QT_NO_DEBUG qDebug("tabJB::selectDevice()"); #endif device *dev = devices->current(); GraphTab::updateLast((int)dev->testData.jb_time, NULL, 1); updateSummary(); QObject::connect( dev, SIGNAL(doneMInfo(int)), this, SLOT(updateLast()) ); QObject::connect( dev, SIGNAL(block_JB()), this, SLOT(updateLast()) ); } void tabJB::updateLast() { bool show; device *dev = devices->current(); GraphTab::updateLast((int)dev->testData.jb_time, &show); if (!show) return; updateSummary(); } void tabJB::updateAll() { GraphTab::updateLast((int)devices->current()->testData.jb_time, NULL, 1); updateSummary(); } void tabJB::updateLegend() { pl_jitter->setColor(settings->col_jitter); pl_asymm->setColor(settings->col_asymm); } void tabJB::updateGraph() { graph->update(); } void tabJB::updateSummary() { device *dev = devices->current(); if (!dev->testData.jb.size()) { l_jmax->clear(); l_jmin->clear(); l_amax->clear(); l_amin->clear(); return; } // setting values... l_jmax->setText(QString::number(dev->testData.jbMM.jmax,'f',2)); l_jmin->setText(QString::number(dev->testData.jbMM.jmin,'f',2)); l_amax->setText(QString::number(dev->testData.jbMM.bmax,'f',2)); l_amin->setText(QString::number(dev->testData.jbMM.bmin,'f',2)); } qpxtool-0.7.1_002/gui/src/qpxgraph.cpp0000644000175000001440000010517311336752671017011 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include "qpxgraph.h" #include #include #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 class IntList : public QList { public: IntList() : QList() {}; float M() { float M = 0.0; int s = size(); if (!s) return 0.0; for (int i=0; iscales.get(name[0])); // settings->loadScale(name); setScaleValue(256); setContextMenuPolicy(Qt::DefaultContextMenu); break; case TEST_JB: name[0] = "Jitter"; name[1] = "Asymm"; scale[0] = new Scale(settings->scales.get( name[0] )); scale[0]->type = Scale::Linear; scale[1] = new Scale(settings->scales.get( name[1] )); scale[1]->type = Scale::Linear; setScaleValue(2,0); setScaleValue(16,1); setContextMenuPolicy(Qt::NoContextMenu); break; default: setContextMenuPolicy(Qt::NoContextMenu); break; } setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); #ifndef QT_NO_DEBUG qDebug("END: QPxGraph()"); #endif } QPxGraph::~QPxGraph() { #ifndef QT_NO_DEBUG qDebug("STA: ~QPxGraph()"); #endif for (int i=0; i<2; i++) if (scale[i]) delete scale[i]; #ifdef CACHE_GRAPH if (img) delete img; #endif #ifndef QT_NO_DEBUG qDebug("END: ~QPxGraph()"); #endif } /* void QPxGraph::setDataNames(QStringList dn) { dataNames = dn; update(); } void QPxGraph::setZeroPos(float zp) { zeropos = zp; update(); } float QPxGraph::zeroPos() { return zeropos; } */ void QPxGraph::setErrcList(int el, QString glabel) { errcList = el; label=glabel; } void QPxGraph::setErrcShow(int err, bool disp) { if (disp) errcList |= err; else errcList &= ~err; } void QPxGraph::setShowSpeed(bool s) { showspeed = s; } void QPxGraph::setRightMarginHidden(bool hide) { margin_right = hide ? 0 : MARGIN_DEFR; } //void QPxGraph::forceUpdate() { forceAll = 1; } void QPxGraph::resizeEvent(QResizeEvent*) { #ifndef QT_NO_DEBUG // qDebug("QPxGraph::resizeEvent()"); #endif forceAll = 1; #ifdef CACHE_GRAPH delete img; #endif } int QPxGraph::getLastX() { return lastX + margin_left + 1; } void QPxGraph::setZoneTA(int zone) { #ifndef QT_NO_DEBUG qDebug() << "Zone TA: " << zone; #endif taZone = zone; update(); }; void QPxGraph::setLayerTA(int layer) { #ifndef QT_NO_DEBUG qDebug() << "LayerTA: " << layer ; #endif taLayer = layer; update(); }; void QPxGraph::wheelEvent(QWheelEvent* e) { #ifndef QT_NO_DEBUG // qDebug(QString("QPxGraph::wheelEvent(): %1").arg(e->delta())); #endif if (e->modifiers() == Qt::NoModifier) { if (!scale[0] || scale[0]->type != Scale::Linear) return; if (e->delta() > 0) scaleIn(0); else if (e->delta() < 0) scaleOut(0); update(); } else if (e->modifiers() == Qt::ControlModifier) { if (test != TEST_JB || !scale[1] || scale[1]->type != Scale::Linear) return; if (e->delta() > 0) scaleIn(1); else if (e->delta() < 0) scaleOut(1); update(); } } void QPxGraph::paintEvent(QPaintEvent* e) { #ifdef CACHE_GRAPH if (!e->rect().x() && !img) forceAll = 1; else forceAll = 0; #else if (!e->rect().x()) forceAll = 1; else forceAll = 0; #endif #ifdef CACHE_GRAPH QPainter p(this); if (!img) img = new QImage(size(), QImage::Format_RGB32); img->fill(palette().color(QPalette::Window).rgb()); QPainter ip(img); if (!img) drawGraph(&ip, size(),devices->current(),test, e->rect()); else drawGraph(&ip, size(),devices->current(),test, e->rect().adjusted(lastX,0,0,0)); p.drawImage(0,0,*img); #else QPainter p(this); drawGraph(&p, size(),devices->current(),test, e->rect()); #endif } void QPxGraph::drawGraph(QPainter *p, QSize s, device *dev, int ttype, const QRect& rect, int eflags, bool forceRepaint) { int el = errcList; bool ss = showspeed; int taL=0, taZ=0; QSize sg; QRect grect = rect.intersected(geometry().adjusted(margin_left, 0, -margin_right, -margin_bottom)).translated(margin_left,0); forceAll |= forceRepaint; if (forceRepaint) p->fillRect(rect, settings->col_bg); if (eflags) { if (ttype == TEST_TA) { taL = taLayer; taZ = taZone; taLayer = (eflags & (0xF << 28)) >> 28; taZone = (eflags & (0x0FFFFFF0)) >> 4; } else { errcList = eflags; showspeed = 0; } } #if 0 #ifndef QT_NO_DEBUG qDebug(QString("drawGraph: rect: %1.%2 - %3.%4") .arg(rect.left()) .arg(rect.top()) .arg(rect.right()) .arg(rect.bottom()) ); qDebug(QString("drawGraph: grect: %1.%2 - %3.%4") .arg(grect.left()) .arg(grect.top()) .arg(grect.right()) .arg(grect.bottom()) ); #endif #endif p->save(); if (ttype == TEST_TA) { sg = QSize(s.width()-2, s.height()-margin_bottom-1); if (forceAll) p->fillRect(1, 1, width()-2, height()-margin_bottom-2, QBrush(settings->col_bg)); } else { sg = QSize(s.width() - (margin_left + margin_right +2), s.height()-margin_bottom-1); if (forceAll || margin_left > rect.x()) p->fillRect(margin_left+1, 1, width() - (margin_left + margin_right +2), height()-margin_bottom-1, QBrush(settings->col_bg)); else p->fillRect(rect.x(), 1, width() - rect.x() - margin_left, height()-margin_bottom-1, QBrush(settings->col_bg)); Vscale = (s.height() - margin_bottom) / 60.0; if (dev->media.type.startsWith("CD")) { HscaleLBA = 450000/sg.width(); Vscale1X = Vscale; } else { HscaleLBA = (1<<19) * 5 * dev->media.ilayers/sg.width(); Vscale1X = Vscale * 3; } p->translate(margin_left+1, 1); } switch (ttype) { case TEST_RT: drawTransfer(p, sg, dev, grect, 0); break; case TEST_WT: drawTransfer(p, sg, dev, grect, 1); break; case TEST_ERRC: drawErrc(p, sg, dev, grect); break; case TEST_JB: drawJB(p, sg, dev, grect); break; case TEST_FT: drawFT(p, sg, dev, grect); break; case TEST_TA: drawTA(p, sg, dev, grect); break; default: break; } p->restore(); if (ttype == TEST_TA) { drawGridTA (p,s,dev, ttype); } else { drawGrid (p,s,dev,ttype); } if (eflags) { if (ttype == TEST_TA) { taLayer = taL; taZone = taZ; } else { errcList = el; showspeed = ss; } } } void QPxGraph::drawTransfer(QPainter* p, const QSize& s, device *dev, const QRect& rect, bool rw) { Q_UNUSED(rect); IntList xerr; QPainterPath pp; int x,xo=0; int startidx=0; int i; uint64_t lastLBA=0; bool first; #ifndef QT_NO_DEBUG qDebug("QPxGraph::drawTransfer()"); #endif if (!dev->testData.rt.size() && !dev->testData.wt.size()) return; // qDebug(QString("hscale: %1, capX: %2").arg(hscale).arg(hscale * dev->media.cread)); // qDebug(QString("hscale: %1, b: %2").arg(hscale).arg(b)); // qDebug(QString("hscale: %1").arg(hscale)); // p->scale(1, hscale); p->setRenderHint(QPainter::Antialiasing, true); if (!rw && dev->testData.rt.size()) { startidx=0; if (!forceAll) { lastLBA = (uint64_t)(lastX * HscaleLBA); for (i=dev->testData.rt.size()-1; i>=0 && dev->testData.rt[i].lba > lastLBA ; ) i--; if (i>0) startidx = i; } xo=0; xerr.clear(); first = 1; for (i=startidx; itestData.rt.size(); i++) { x = (int) (dev->testData.rt[i].lba/HscaleLBA); xerr.append((int)(dev->testData.rt[i].spdx * 100)); if (x!=xo || i==(dev->testData.rt.size()-1)) { if (first) { pp.moveTo(xo, s.height() - xerr.M()*Vscale1X/100.0); first=0; } else { pp.lineTo(xo, s.height() - xerr.M()*Vscale1X/100.0); } xerr.clear(); xo = x; } } p->setPen(QPen(settings->col_rspeed, 2)); p->drawPath(pp); lastX = (uint64_t)(dev->testData.rt.last().lba / HscaleLBA); if (lastX) lastX--; } if (rw && dev->testData.wt.size()) { startidx=0; if (!forceAll) { lastLBA = (uint64_t)(lastX * HscaleLBA); for (i=dev->testData.wt.size()-1; i>=0 && dev->testData.wt[i].lba > lastLBA ; ) i--; if (i>0) startidx = i; } xo=0; xerr.clear(); first = 1; for (i=startidx; itestData.wt.size(); i++) { x = (int) (dev->testData.wt[i].lba/HscaleLBA); xerr.append((int)(dev->testData.wt[i].spdx * 100)); if (x!=xo || i==(dev->testData.wt.size()-1)) { if (first) { pp.moveTo(xo, s.height() - xerr.M()*Vscale1X/100.0); first=0; } else { pp.lineTo(xo, s.height() - xerr.M()*Vscale1X/100.0); } xerr.clear(); xo = x; } } p->setPen(QPen(settings->col_wspeed, 2)); p->drawPath(pp); lastX = (uint64_t)(dev->testData.wt.last().lba / HscaleLBA); if (lastX) lastX--; } } void QPxGraph::drawErrc(QPainter* p, const QSize& s, device *dev, const QRect&) { QPainterPath pps; IntList xerr; bool isCD; int x, xo; int errc; #ifdef SHOW_P95ERRC int M,D; // float M,D; #endif int min=-1,max=-1; int i; int startidx=0; uint64_t lastLBA=0; bool first; isCD = dev->media.type.startsWith("CD"); errc = errcList ? errcList : (isCD ? GRAPH_DFL_CD : GRAPH_DFL_DVD); #ifndef QT_NO_DEBUG timeval b,e; double t0,t1; // qDebug(QString("QPxGraph::drawErrc() : %1").arg(errc,8,2)); gettimeofday(&b,NULL); #endif if (!dev->testData.errc.size()) return; #ifndef QT_NO_DEBUG qDebug() << QString("lastBLA: %1, lastX: %2").arg(lastLBA).arg(lastX); #endif if (forceAll) { startidx=0; } else { lastLBA = (int)(lastX * HscaleLBA); for (i=dev->testData.errc.size()-1; i>=0 && dev->testData.errc[i].raw.lba > lastLBA ; ) i--; if (i>0) startidx = i; #ifndef QT_NO_DEBUG qDebug() << QString("lastBLA: %1, startidx: %2, errc.size: %3") .arg(lastLBA) .arg(startidx) .arg(dev->testData.errc.size()); #endif } p->setRenderHint(QPainter::Antialiasing, false); xo = 0; xerr.clear(); for (int e = 0; e<8; e++) { if ( (1<setPen(QPen(*settings->col_errc.raw[e], 1)); for (i=startidx; itestData.errc.size(); i++) { // if (i) i--; // if ( (1<testData.errc.size(); i++) { x = (int) (dev->testData.errc[i].raw.lba/HscaleLBA); if (dev->testData.errc[i].raw.err[e] >=0 ) { #ifdef SHOW_P95ERRC xerr.append(dev->testData.errc[i].raw.err[e]); #endif // update min/max if (min < 0 || min > dev->testData.errc[i].raw.err[e]) min = dev->testData.errc[i].raw.err[e]; if (max < dev->testData.errc[i].raw.err[e]) max = dev->testData.errc[i].raw.err[e]; } 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), xo, errc2h(s.height(), max)); // P=0.95 #ifdef SHOW_P95ERRC M = (int)xerr.M(); D = (int)sqrt(xerr.dispers(M)); p->setPen(QPen(settings->col_errc.raw[e]->darker(), 1)); p->drawLine(xo, errc2h(s.height(), M-D), xo, errc2h(s.height(), M+D)); xerr.clear(); #endif min = -1; max = -1; xo = x; } } } } #ifndef QT_NO_DEBUG gettimeofday(&e,NULL); t0 = (e.tv_sec - b.tv_sec) + (e.tv_usec - b.tv_usec)/1000000.0; #endif if (showspeed) { // draw speed #ifndef QT_NO_DEBUG gettimeofday(&b,NULL); #endif p->setRenderHint(QPainter::Antialiasing, true); xo=0; xerr.clear(); first=1; for (i=startidx; itestData.errc.size(); i++) { x = (int) (dev->testData.errc[i].raw.lba/HscaleLBA); xerr.append( (int) (dev->testData.errc[i].raw.spdx * 100) ); if (x!=xo || i==(dev->testData.errc.size()-1)) { if (first) { pps.moveTo(xo, s.height() - xerr.M()*Vscale1X/100.0); first=0; } else { pps.lineTo(xo, s.height() - xerr.M()*Vscale1X/100.0); } xerr.clear(); xo = x; } } p->setPen(QPen(settings->col_bginv, 2)); p->drawPath(pps); #ifndef QT_NO_DEBUG gettimeofday(&e,NULL); t1 = (e.tv_sec - b.tv_sec) + (e.tv_usec - b.tv_usec)/1000000.0; qDebug() << QString("draw time(sec): %1 ERRC, %2 Speed") .arg(t0,0,'f',6) .arg(t1,0,'f',6); #endif } lastX = (uint64_t)(dev->testData.errc.last().raw.lba / HscaleLBA); if (lastX) lastX--; } void QPxGraph::drawJB(QPainter* p, const QSize& s, device *dev, const QRect&) { #ifndef QT_NO_DEBUG qDebug("QPxGraph::drawJB()"); #endif QPainterPath pps; IntList xj, xb; int x, xo; #ifdef SHOW_P95JB int M,D; // float M,D; #endif float jmin=0, jmax=0; float bmin=0, bmax=0; int i; int startidx=0; uint64_t lastLBA=0; bool first=1; #ifndef QT_NO_DEBUG timeval b,e; double t0,t1; // qDebug(QString("QPxGraph::drawErrc() : %1").arg(errc,8,2)); gettimeofday(&b,NULL); #endif if (!dev->testData.jb.size()) return; #ifndef QT_NO_DEBUG qDebug() << QString("lastBLA: %1, lastX: %2").arg(lastLBA).arg(lastX); #endif if (forceAll) { startidx=0; } else { lastLBA = (uint64_t)(lastX * HscaleLBA); for (i=dev->testData.jb.size()-1; i>=0 && dev->testData.jb[i].lba > lastLBA ; ) i--; if (i>0) startidx = i; #ifndef QT_NO_DEBUG qDebug() << QString("lastBLA: %1, startidx: %2, jb.size: %3") .arg(lastLBA) .arg(startidx) .arg(dev->testData.jb.size()); #endif } p->setRenderHint(QPainter::Antialiasing, false); xo = 0; xj.clear(); xb.clear(); // p->setPen(QPen(*settings->col_errc.raw[e], 1)); for (i=startidx; itestData.jb.size(); i++) { // if ( (1<testData.errc.size(); i++) { x = (int) (dev->testData.jb[i].lba/HscaleLBA); if (dev->testData.jb[i].jitter >=-100 && dev->testData.jb[i].asymm >=-100 ) { #ifdef SHOW_P95JB xj.append(dev->testData.jb[i].jitter * 100); xj.append(dev->testData.jb[i].jitter * 100); xb.append(dev->testData.jb[i].asymm * 100); xb.append(dev->testData.jb[i].asymm * 100); #endif // update min/max if (first) { jmin = dev->testData.jb[i].jitter; jmax = dev->testData.jb[i].jitter; bmin = dev->testData.jb[i].asymm; bmax = dev->testData.jb[i].asymm; first=0; } else { if (jmin > dev->testData.jb[i].jitter) jmin = dev->testData.jb[i].jitter; if (jmax < dev->testData.jb[i].jitter) jmax = dev->testData.jb[i].jitter; if (bmin > dev->testData.jb[i].asymm) bmin = dev->testData.jb[i].asymm; if (bmax < dev->testData.jb[i].asymm) bmax = dev->testData.jb[i].asymm; } } if (x!=xo || i==(dev->testData.jb.size()-1)) { #ifndef QT_NO_DEBUG qDebug() << QString("i=%1 J: %2..%3 A: %4..%5") .arg(i) .arg(jmin) .arg(jmax) .arg(bmin) .arg(bmin); #endif // ******* Jitter // min-max p->setPen(QPen(settings->col_jitter, 1)); p->drawLine(xo, jitter2h(s.height(), jmin), xo, jitter2h(s.height(), jmax)); // P=0.95 #ifdef SHOW_P95JB M = xj.M(); D = sqrt(xj.dispers(M)); p->setPen(QPen(settings->col_jitter.darker(), 1)); p->drawLine(xo, jitter2h(s.height(), (M-D)/100.0), xo, jitter2h(s.height(), (M+D)/100.0)); xj.clear(); #endif // ******* Asymmmethry // min-max p->setPen(QPen(settings->col_asymm, 1)); p->drawLine(xo, asymm2h(s.height(), bmin), xo, asymm2h(s.height(), bmax)); // P=0.95 #ifdef SHOW_P95JB M = xb.M(); D = sqrt(xb.dispers(M)); p->setPen(QPen(settings->col_asymm.darker(), 1)); p->drawLine(xo, asymm2h(s.height(), (M-D)/100.0), xo, asymm2h(s.height(), (M+D)/100.0)); xb.clear(); #endif xo = x; first = 1; } } #ifndef QT_NO_DEBUG gettimeofday(&e,NULL); t0 = (e.tv_sec - b.tv_sec) + (e.tv_usec - b.tv_usec)/1000000.0; gettimeofday(&b,NULL); #endif // draw speed p->setRenderHint(QPainter::Antialiasing, true); xo=0; xj.clear(); first=1; for (i=startidx; itestData.jb.size(); i++) { x = (int) (dev->testData.jb[i].lba/HscaleLBA); xj.append((int)(dev->testData.jb[i].spdx * 100)); if (x!=xo || i==(dev->testData.jb.size()-1)) { if (first) { pps.moveTo(xo, s.height() - xj.M()*Vscale1X/100.0); first=0; } else { pps.lineTo(xo, s.height() - xj.M()*Vscale1X/100.0); } xj.clear(); xo = x; } } p->setPen(QPen(settings->col_bginv, 2)); p->drawPath(pps); #ifndef QT_NO_DEBUG gettimeofday(&e,NULL); t1 = (e.tv_sec - b.tv_sec) + (e.tv_usec - b.tv_usec)/1000000.0; qDebug() << QString("draw time(sec): %1 ERRC, %2 Speed") .arg(t0,0,'f',6) .arg(t1,0,'f',6); #endif lastX = (uint64_t)(dev->testData.jb.last().lba / HscaleLBA); if (lastX) lastX--; } void QPxGraph::drawFT(QPainter* p, const QSize& s, device *dev, const QRect&) { QPainterPath ppf,ppt, pps; int x; #ifndef QT_NO_DEBUG qDebug("QPxGraph::drawFT()"); #endif /* p->setPen(QPen(settings->col_wspeed, 2)); p->drawLine(360000/HscaleLBA, 1, 360000/HscaleLBA, s.height()); */ if (!dev->testData.ft.size()) return; pps.moveTo(0, s.height() - dev->testData.ft[0].spdx*Vscale1X); ppf.moveTo(0, s.height() - dev->testData.ft[0].fe*Vscale); ppt.moveTo(0, s.height() - dev->testData.ft[0].te*Vscale); for (int i=1; itestData.ft.size(); i++) { x = (int)(dev->testData.ft[i].lba/HscaleLBA); pps.lineTo( x, s.height() - dev->testData.ft[i].spdx*Vscale1X); ppf.lineTo( x, s.height() - dev->testData.ft[i].fe*Vscale); ppt.lineTo( x, s.height() - dev->testData.ft[i].te*Vscale); // qDebug(QString("p: %1:%2").arg(x).arg(y)); } p->setRenderHint(QPainter::Antialiasing, true); p->setPen(QPen(settings->col_bginv, 2)); p->drawPath(pps); p->setPen(QPen(settings->col_fe, 2)); p->drawPath(ppf); p->setPen(QPen(settings->col_te, 2)); p->drawPath(ppt); } void QPxGraph::drawTA(QPainter* p, const QSize& s, device *dev, const QRect&) { int taIdx = taLayer*3 + taZone; int h; int x, prevh=0; QPainterPath pp; #ifndef QT_NO_DEBUG qDebug("QPxGraph::drawTA()"); #endif if ( taIdx < 0 || taIdx > 5 ) return; Hscale = s.width() / 13.0; p->setPen(QPen( taMode ? settings->col_taland : settings->col_tapit, 1)); for (int i=0; itestData.ta[taIdx].size(); i++) { h = ta2h(s.height(), taMode ? dev->testData.ta[taIdx][i].land : dev->testData.ta[taIdx][i].pit); #if 0 if (h>0) { x = (int)(((dev->testData.ta[taIdx][i].idx - 64) / 21.5454 + 1) * Hscale); p->drawLine( x, s.height(), x, h ); } #else x = (int)(((dev->testData.ta[taIdx][i].idx - 64) / 21.5454 + 1) * Hscale); if (hdrawPath(pp); } #define VGRIDS 10.0 void QPxGraph::drawGrid(QPainter* p, const QSize& s, device *dev, int ttype) { #ifndef QT_NO_DEBUG qDebug("STA: QPxGraph::drawGrid()"); timeval b,e; gettimeofday(&b,NULL); double t; #endif // int idxn, idxd; // int scaleType; float HscaleX; bool isCD = 0; int spdMax; // TestData* data; QFont dfont = p->font(); QFont lfont = dfont; lfont.setPointSizeF(lfont.pointSizeF()*1.3); // lfont.setBold(true); // lfont.setItalic(true); if (ttype & TEST_TA) return; p->setRenderHint(QPainter::Antialiasing, false); p->setRenderHint(QPainter::TextAntialiasing, true); // graph border p->setPen(QPen(palette().color(QPalette::Dark), 1)); //p->setPen(QPen(palette().color(QPalette::Highlight), 1)); p->drawRect(margin_left, 0, s.width()- (margin_left + margin_right) - 1, s.height()-margin_bottom); if (dev->media.type == "-") return; /* p->drawLine(margin_L-1,s.height()-margin_bottom, s.width(),s.height()-margin_bottom); p->drawLine(margin_L-1,s.height()-margin_bottom, margin_L-1,0); */ if (dev->media.type.startsWith("CD")) { Hscale = (s.width()-( margin_left + margin_right )-2) / 1.0 / 100/4500; isCD = 1; spdMax = 60; } else { Hscale = (s.width()-( margin_left + margin_right )-2) / 1.0 / 5/ (1<<19) / dev->media.ilayers; isCD = 0; spdMax = 20; } HscaleX = (s.width() - (margin_left + margin_right )) / VGRIDS; // vertical grid lines p->setPen( QPen(settings->col_grid, 1, GRID_STYLE) ); for (int i=1; idrawLine(margin_left + (int)(i*HscaleX), s.height()-margin_bottom-1, margin_left + (int)(i*HscaleX), 1); p->setPen( QPen(settings->col_bginv, 1, GRID_STYLE) ); // capacity if (dev->media.creads) { p->drawLine(margin_left + (int)(Hscale*dev->media.creads) + 2, s.height()-margin_bottom-1, margin_left + (int)(Hscale*dev->media.creads) + 2, 1); } p->drawLine(margin_left + (int)(Hscale*dev->media.ctots) + 2, s.height()-margin_bottom-1, margin_left + (int)(Hscale*dev->media.ctots) + 2, 1); // bottom text labels p->setPen(QPen(palette().color(QPalette::Text), 1)); if (isCD) { for (int i=1; idrawText( margin_left + (int)(HscaleX*(i-1)), s.height()-margin_bottom+2, (int)(HscaleX*2), margin_bottom-2, Qt::AlignVCenter | Qt::AlignHCenter, QString::number(i*(100/VGRIDS))+" min"); } } else { for (int i=1; idrawText( margin_left + (int)(HscaleX*(i-1)), s.height()-margin_bottom+2, (int)(HscaleX*2), margin_bottom-2, Qt::AlignVCenter | Qt::AlignHCenter, QString::number(i*( dev->media.ilayers*5/VGRIDS))+" GB"); } } p->setPen( QPen(settings->col_grid, 1, GRID_STYLE) ); // horizontal grid lines and left labels int h; switch (ttype) { case TEST_RT: case TEST_WT: for (int i=(isCD ? 4:2); idrawLine(margin_left+1, h, s.width()-margin_right-2, h); if (!(i & (isCD ? 7 : 1))) { p->setPen(QPen(palette().color(QPalette::Text), 1)); p->drawText( 2, h - 10, margin_left-4, 20, Qt::AlignVCenter | Qt::AlignRight, QString::number(i)); p->setPen(QPen(settings->col_grid, 1, GRID_STYLE)); } } break; case TEST_ERRC: if (scale[0]->type == Scale::Log) { // LOG10: hlines with text labels int *errc_logh = errc_logh_hres; for (int i=0; errc_logh[i]>0; i++) { h = errc2h(s.height()-margin_bottom,errc_logh[i]); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); } if (s.height() < 250) errc_logh = errc_logh_lres; p->setPen(QPen(palette().color(QPalette::Text), 1)); for (int i=0; errc_logh[i]>0; i++) { h = errc2h(s.height()-margin_bottom,errc_logh[i]); p->drawText( 2, h - 10, margin_left-4, 20, Qt::AlignVCenter | Qt::AlignRight, QString::number(errc_logh[i])); } } else { int steps = (int)((float)(s.height() - margin_bottom) / 20); if (!steps) steps=1; int step = (scale[0]->value / steps + 9) / 10 * 10; #ifndef QT_NO_DEBUG // qDebug(QString("scale step: %1").arg(step)); #endif h = errc2h(s.height()-margin_bottom,step); for (int i=step; h>10; i+=step) { // LINEAR: hlines with text labels h = errc2h(s.height()-margin_bottom,i); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); p->setPen(QPen(palette().color(QPalette::Text), 1)); if (h-10 >= 0) { p->drawText( 2, h - 10, margin_left-4, 20, Qt::AlignVCenter | Qt::AlignRight, QString::number(i)); p->setPen(QPen(settings->col_grid, 1, GRID_STYLE)); } } } if (!label.isEmpty()) { p->setFont(lfont); p->setPen(QPen( settings->col_bginv, 1)); p->drawText(margin_left + 5,4,60,20, Qt::AlignTop | Qt::AlignLeft, label); p->setFont(dfont); } // error limit hlines p->setPen(QPen(Qt::red, 1, GRID_STYLE)); if (isCD) { h = errc2h(s.height() - margin_bottom, 220); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); } else { h = errc2h(s.height() - margin_bottom, 4); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); h = errc2h(s.height() - margin_bottom, 280); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); } break; case TEST_JB: { float dj = scale[0]->value/8.0; float da = scale[1]->value/8.0; float vj=0, va=-da*4; // Jitter/asymm hlines & text labels for ( int i=0; i<8; i++) { h = jitter2h(s.height() - margin_bottom, vj); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); p->setPen(QPen(palette().color(QPalette::Text), 1)); p->drawText( 2, h - 10, margin_left-4, 20, Qt::AlignVCenter | Qt::AlignRight, QString("%1/%2").arg(vj).arg(va)); p->setPen(QPen(settings->col_grid, 1, GRID_STYLE)); vj+=dj; va+=da; } } break; case TEST_FT: for (int i=4; i<60; i+=4) { h = (int) (s.height() - margin_bottom - i*Vscale); p->drawLine(margin_left+1, h, s.width()-margin_right-2, h); if (!(i & 7)) { p->setPen(QPen(palette().color(QPalette::Text), 1)); p->drawText( 2, h - 10, margin_left-4, 20, Qt::AlignVCenter | Qt::AlignRight, QString::number(i)); p->setPen(QPen(settings->col_grid, 1, GRID_STYLE)); } } break; } // right speed labels for all graphs, except TA // qDebug() << "Draw speed labels... showspeed:" << showspeed << " margin_right: " << margin_right; if (showspeed && margin_right) { for (int i=(isCD ? 4:2); isetPen(QPen(palette().color(QPalette::Text), 1)); h = (int)(s.height() - margin_bottom - i*Vscale1X); if (!(i & (isCD ? 7 : 1))) { p->drawText( s.width() - margin_right + 2, h - 10, margin_right-4, 20, Qt::AlignVCenter | Qt::AlignLeft, QString::number(i)); } } } #ifndef QT_NO_DEBUG gettimeofday(&e,NULL); t = (e.tv_sec - b.tv_sec) + (e.tv_usec - b.tv_usec)/1000000.0; qDebug() << QString("END: QPxGraph::drawGrid(): %1 sec").arg(t,0,'f',6); #endif } void QPxGraph::drawGridTA(QPainter* p, const QSize& s, device *dev, int ttype) { // int idxn, idxd; // int scaleType; float Hscale; int TAgrids; // TestData* data; #ifndef QT_NO_DEBUG qDebug("STA: QPxGraph::drawGridTA()"); #endif // draw background and border if (ttype != TEST_TA) return; p->setRenderHint(QPainter::Antialiasing, false); p->setRenderHint(QPainter::TextAntialiasing, true); p->setPen(QPen(palette().color(QPalette::Dark), 1)); // p->setPen(QPen(settings->col_grid, 1)); p->drawRect(0,0,s.width()-1, s.height()-margin_bottom); if (dev->media.type == "-") return; // p->drawLine(0,s.height()-margin_bottom,s.width(),s.height()-margin_bottom); TAgrids=14; /* if (dev->media.type.startsWith("CD")) { TAgrids=11; } else { TAgrids=14; } */ // Hscale = width() / ((float)TAgrids-1); Hscale = s.width() / 13.0; p->setPen(QPen(palette().color(QPalette::Dark), 1, GRID_STYLE)); // vertical grid lines for (int i=3; i<=11; i++) p->drawLine((int)((i-2)*Hscale),s.height()-margin_bottom, (int)((i-2)*Hscale),0); if (dev->media.type.startsWith("DVD")) { p->drawLine((int)(12*Hscale),s.height()-margin_bottom, (int)(12*Hscale),0); } // bottom text labels p->setPen(QPen(palette().color(QPalette::Text), 1)); for (int i=3; i<=11; i++) { p->drawText((int)(Hscale*(i-2.5)), s.height()-margin_bottom+2, (int)(Hscale), margin_bottom-2, Qt::AlignVCenter | Qt::AlignHCenter, QString("T%1").arg(i)); } if (dev->media.type.startsWith("DVD")) { p->drawText((int)(Hscale*(11.5)), s.height()-margin_bottom+2, (int)(Hscale), margin_bottom-2, Qt::AlignVCenter | Qt::AlignHCenter, "T14"); } // p->setPen(QPen( settings->col_bginv, 1)); if (!taMode) { p->setPen(QPen( settings->col_tapit, 1)); p->drawText(10,10,200,30, Qt::AlignTop | Qt::AlignLeft, QString("Pit: Layer%1, Zone %2").arg(taLayer).arg(taZone)); } else { p->setPen(QPen( settings->col_taland, 1)); p->drawText(10,10,200,30, Qt::AlignTop | Qt::AlignLeft, QString("Land: Layer%1, Zone %2").arg(taLayer).arg(taZone)); } #ifndef QT_NO_DEBUG qDebug("END: QPxGraph::drawGridTA()"); #endif } void QPxGraph::contextMenuEvent(QContextMenuEvent *e) { QMenu *cmenu; QAction *act; QIcon icon_ok(":images/ok.png"); if (!scale) return; cmenu = new QMenu(this); cmenu->addAction( (scale[0]->type == Scale::Log) ? icon_ok : QIcon(), tr("Logarithmic scale"), this, SLOT(setScaleTypeLog())); cmenu->addAction( (scale[0]->type == Scale::Linear) ? icon_ok : QIcon(), tr("Linear Scale"), this, SLOT(setScaleTypeLin())); cmenu->addSeparator(); /* cmenu->addAction( (settings->scales.get(name).policy == Scale::Auto) ? QIcon(":images/ok.png") : QIcon(), tr("Auto scale"), this, SLOT(setScalePolicyAuto())); cmenu->addAction( (settings->scales.get(name).policy == Scale::Fixed) ? QIcon(":images/ok.png") : QIcon(), tr("Fixed scale"), this, SLOT(setScalePolicyFixed())); cmenu->addSeparator(); */ act = cmenu->addAction( QIcon(":images/plus.png"), tr("Scale in"), this, SLOT(scaleIn())); act->setEnabled(scale[0]->type == Scale::Linear); act = cmenu->addAction( QIcon(":images/minus.png"), tr("Scale out"), this, SLOT(scaleOut())); act->setEnabled(scale[0]->type == Scale::Linear); #if 0 if (test == TEST_ERRC) { qDebug() << "Errc List: " << errcList; if (devices->current()->media.type.startsWith("CD-")) { cmenu->addSeparator(); cmenu->addAction( (errcList & GRAPH_BLER) ? icon_ok : QIcon(), "BLER"); cmenu->addAction( (errcList & GRAPH_E11) ? icon_ok : QIcon(), "E11"); cmenu->addAction( (errcList & GRAPH_E21) ? icon_ok : QIcon(), "E21"); cmenu->addAction( (errcList & GRAPH_E31) ? icon_ok : QIcon(), "E31"); cmenu->addAction( (errcList & GRAPH_E12) ? icon_ok : QIcon(), "E12"); cmenu->addAction( (errcList & GRAPH_E22) ? icon_ok : QIcon(), "E22"); cmenu->addAction( (errcList & GRAPH_E32) ? icon_ok : QIcon(), "E32"); cmenu->addAction( (errcList & GRAPH_UNCR) ? icon_ok : QIcon(), "UNCR"); } else if (devices->current()->media.type.startsWith("DVD-")) { cmenu->addSeparator(); cmenu->addAction( (errcList & GRAPH_PIE) ? icon_ok : QIcon(), "PIE"); cmenu->addAction( (errcList & GRAPH_PI8) ? icon_ok : QIcon(), "PI8"); cmenu->addAction( (errcList & GRAPH_PIF) ? icon_ok : QIcon(), "PIF"); cmenu->addAction( (errcList & GRAPH_POE) ? icon_ok : QIcon(), "POE"); cmenu->addAction( (errcList & GRAPH_PO8) ? icon_ok : QIcon(), "PO8"); cmenu->addAction( (errcList & GRAPH_POF) ? icon_ok : QIcon(), "POF"); cmenu->addAction( (errcList & GRAPH_UNCR) ? icon_ok : QIcon(), "UNCR"); } } #endif cmenu->exec( e->globalPos()); delete cmenu; update(); } void QPxGraph::changeScale(int idx) { if (idx<0 || idx>1 || !scale[idx]) return; scale[idx]->type = settings->scales.get(name[idx]).type; scale[idx]->policy = settings->scales.get(name[idx]).policy; scale[idx]->value = settings->scales.get(name[idx]).value; update(); } void QPxGraph::setScaleTypeLog() { if (!scale[0] || (scale[0]->type == Scale::Log)) return; scale[0]->type = Scale::Log; settings->scales.get(name[0]).type = scale[0]->type; #ifdef CACHE_GRAPH if (img) delete img; #endif emit scaleChanged(); } void QPxGraph::setScaleTypeLin() { if (!scale[0] || (scale[0]->type == Scale::Linear)) return; scale[0]->type = Scale::Linear; settings->scales.get(name[0]).type = scale[0]->type; #ifdef CACHE_GRAPH if (img) delete img; #endif emit scaleChanged(); } void QPxGraph::setScalePolicyAuto() { for (int i=0; i<2; i++) if (scale[i]) { scale[i]->policy = Scale::Auto; settings->scales.get(name[i]).policy = scale[i]->policy; } emit scaleChanged(); } void QPxGraph::setScalePolicyFixed() { for (int i=0; i<2; i++) if (scale[i]) { scale[i]->policy = Scale::Fixed; settings->scales.get(name[i]).policy = scale[i]->policy; } emit scaleChanged(); } void QPxGraph::setScaleValue( int val, int idx) { if (idx<0 || idx>1) { for (int i=0; i<2; i++) if (scale[i]) { scale[i]->value = val; settings->scales.get(name[i]).value = val; } } else { if (scale[idx]) { scale[idx]->value = val; settings->scales.get(name[idx]).value = val; } } #ifdef CACHE_GRAPH if (img) delete img; #endif emit scaleChanged(); } void QPxGraph::scaleIn(int idx) { #ifndef QT_NO_DEBUG qDebug() << "scaleIn (" << idx << ")"; #endif if (idx<0 || idx>1 || !scale[idx]) return; switch (test) { case TEST_ERRC: if (!scale[idx] || scale[idx]->value <= 64) return; scale[idx]->value /= 2; settings->scales.get(name[idx]).value = scale[idx]->value; break; case TEST_JB: if (!idx) { if (!scale[idx] || scale[idx]->value <= 2) return; // jitter } else { if (!scale[idx] || scale[idx]->value <= 8) return; // asymmetry } scale[idx]->value /= 2; settings->scales.get(name[idx]).value = scale[idx]->value; break; default: break; } #ifdef CACHE_GRAPH if (img) delete img; #endif emit scaleChanged(); } void QPxGraph::scaleOut(int idx) { #ifndef QT_NO_DEBUG qDebug() << "scaleOut (" << idx << ")"; #endif if (idx<0 || idx>1 || !scale[idx]) return; switch (test) { case TEST_ERRC: if (!scale[idx] || scale[idx]->value >= 2048) return; scale[idx]->value *= 2; settings->scales.get(name[idx]).value = scale[idx]->value; break; case TEST_JB: if (!idx) { if (!scale[idx] || scale[idx]->value >= 8) return; // jitter } else { if (!scale[idx] || scale[idx]->value >= 32) return; // asymmetry } scale[idx]->value *= 2; settings->scales.get(name[idx]).value = scale[idx]->value; break; default: break; } #ifdef CACHE_GRAPH if (img) delete img; #endif emit scaleChanged(); } int QPxGraph::errc2h(int h, int val) { if (val<=0) return h; if (scale[0]->type == Scale::Log) { return (int) (h - 10 - h*((float)log10(val)*0.31)); } else { return (int) (h - 2 - h*(float)val / scale[0]->value); } } int QPxGraph::jitter2h(int h, float val) { return (int) (h - h * val / scale[0]->value); } int QPxGraph::asymm2h(int h, float val) { return (int) (h/2 - h * val / scale[1]->value); } int QPxGraph::ta2h(int h, int val) { if (val<=0) return h; return (int) (h - h*(float)log10(val)*0.2); } qpxtool-0.7.1_002/gui/src/about.cpp0000644000175000001440000000273511334746124016263 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include "about.h" #include "version.h" AboutDialog::AboutDialog(QWidget *p, Qt::WindowFlags fl) : QDialog(p,fl) { QFile f; setWindowTitle(tr("About QPxTool")); layout = new QVBoxLayout(this); layout->setMargin(3); layout->setSpacing(3); lversion = new QLabel("QPxTool version " VERSION, this); lversion->setAlignment(Qt::AlignCenter); layout->addWidget(lversion); tw = new QTabWidget(this); layout->addWidget(tw); te_about = new QTextEdit(this); te_about->setReadOnly(true); te_licence = new QTextEdit(this); te_licence->setReadOnly(true); te_licence->setFontFamily("Monospace"); f.setFileName(":about.html"); f.open(QIODevice::ReadOnly); te_about->setHtml(f.readAll()); f.close(); f.setFileName(":COPYING"); f.open(QIODevice::ReadOnly); te_licence->setPlainText(f.readAll()); f.close(); tw->addTab(te_about, tr("About QPxTool")); tw->addTab(te_licence, tr("Licence")); resize(600,400); } AboutDialog::~AboutDialog() {} qpxtool-0.7.1_002/gui/src/tab_ta.cpp0000644000175000001440000001074211334746304016400 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include "tab_ta.h" #include tabTA::tabTA(QPxSettings *iset, devlist *idev, QString iname, QWidget *p, Qt::WindowFlags fl) : QWidget(p, fl) { #ifndef QT_NO_DEBUG qDebug("STA: tabTA()"); #endif settings = iset; devices = idev; name = iname; // prevTvalid = 0; gettimeofday(&prevT, NULL); settings->loadScale(name); layout = new QHBoxLayout(this); layout->setMargin(0); layout->setSpacing(3); layoutl = new QVBoxLayout(); layoutl->setMargin(0); layoutl->setSpacing(3); layout->addLayout(layoutl); layoutg = new QVBoxLayout(); layoutg->setMargin(0); layoutg->setSpacing(3); layout->addLayout(layoutg); // Layer selection box_layer = new QGroupBox(tr("Layer"),this); layoutl->addWidget(box_layer); lay_layer = new QVBoxLayout(box_layer); grp_layer = new QButtonGroup(box_layer); layer0 = new QRadioButton(tr("Layer")+" 0", box_layer); layer0->setChecked(true); lay_layer->addWidget(layer0); grp_layer->addButton(layer0, 0); layer1 = new QRadioButton(tr("Layer")+" 1", box_layer); lay_layer->addWidget(layer1); grp_layer->addButton(layer1, 1); // Zone Selection box_zone = new QGroupBox(tr("Zone"),this); layoutl->addWidget(box_zone); lay_zone = new QVBoxLayout(box_zone); grp_zone = new QButtonGroup(box_zone); zone0 = new QRadioButton(tr("Inner"), box_zone); zone0->setChecked(true); lay_zone->addWidget(zone0); grp_zone->addButton(zone0, 0); zone1 = new QRadioButton(tr("Middle"), box_zone); lay_zone->addWidget(zone1); grp_zone->addButton(zone1, 1); zone2 = new QRadioButton(tr("Outer"), box_zone); lay_zone->addWidget(zone2); grp_zone->addButton(zone2, 2); layoutl->addStretch(10); // Test time grp_time = new QGroupBox(tr("Time"), this); grp_time->setMinimumWidth(100); layoutl->addWidget(grp_time); layoutt = new QVBoxLayout(grp_time); layoutt->setMargin(3); layoutt->setSpacing(0); ltime = new QLabel("0:00", grp_time); ltime->setAlignment(Qt::AlignRight | Qt::AlignVCenter); ltime->setMinimumHeight(22); QFont tfont = ltime->font(); tfont.setFamily("Monospace"); ltime->setFont( tfont ); layoutt->addWidget(ltime); // Graphs... graphPit = new QPxGraph(iset, idev, name, TEST_TA, this); graphPit->setModeTA(0); layoutg->addWidget(graphPit); graphLand = new QPxGraph(iset, idev, name, TEST_TA, this); graphLand->setModeTA(1); layoutg->addWidget(graphLand); connect(grp_layer, SIGNAL(buttonClicked(int)), graphPit, SLOT(setLayerTA(int))); connect(grp_layer, SIGNAL(buttonClicked(int)), graphLand, SLOT(setLayerTA(int))); connect(grp_zone , SIGNAL(buttonClicked(int)), graphPit, SLOT(setZoneTA(int))); connect(grp_zone , SIGNAL(buttonClicked(int)), graphLand, SLOT(setZoneTA(int))); clear(); #ifndef QT_NO_DEBUG qDebug("END: tabTA()"); #endif } tabTA::~tabTA() { #ifndef QT_NO_DEBUG qDebug("STA: ~tabTA()"); qDebug("END: ~tabTA()"); #endif } void tabTA::clear() { #ifndef QT_NO_DEBUG qDebug("tabTA::clear()"); #endif } void tabTA::selectDevice() { #ifndef QT_NO_DEBUG qDebug("tabTA::selectDevice()"); #endif device *dev = devices->current(); graphPit->update(); graphLand->update(); QObject::connect( dev, SIGNAL(doneMInfo(int)), this, SLOT(updateAll()) ); QObject::connect( dev, SIGNAL(block_TA()), this, SLOT(updateLast()) ); } void tabTA::updateAll() { if (devices->current()->media.layers.toInt() < 2) { layer0->setChecked(true); layer1->setEnabled(false); } else { layer1->setEnabled(true); } updateLast(); } void tabTA::updateLast() { graphPit->update(); graphLand->update(); } void tabTA::reconfig() { graphPit->update(); graphLand->update(); } void tabTA::drawGraph(QImage& img, device *dev, int ttype, int eflags) { int w = img.width(); int h = img.height(); QSize s(w,h); QRect r(0, 0, w, h); QPainter p(&img); if (eflags & 1) { graphLand->drawGraph(&p, s, dev, ttype, r, eflags & (~1), FORCE_REPAINT); } else { graphPit->drawGraph(&p, s, dev, ttype, r, eflags & (~1), FORCE_REPAINT); } } qpxtool-0.7.1_002/gui/src/image_label.cpp0000644000175000001440000000605211352121322017351 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include //#include #include #include "image_label.h" #include #include #define MAX_IMAGE_SIZE 64 ImageLabel::ImageLabel(int iminW, QString label, QImage image, int idx, QWidget *parent) : QWidget (parent) { #ifndef QT_NO_DEBUG qDebug("ImageLabel()"); #endif iconw = 64; iconh = 64; minW = qMax(iconw+4, iminW); setMinimumSize(minW, iconh+24); name = label; img = image; id = idx; focus = 0; if (!id) ck=1; else ck=0; } ImageLabel::ImageLabel(int iminW, QSize is, QString label, QImage image, int idx, QWidget *parent) : QWidget (parent) { #ifndef QT_NO_DEBUG qDebug("ImageLabel()"); #endif iconw = is.width(); iconh = is.height(); minW = qMax(iconw+4, iminW); setMinimumSize(minW, iconh+24); name = label; img = image; id = idx; focus = 0; if (!id) ck=1; else ck=0; } ImageLabel::ImageLabel(int iminW, int iw, int ih, QString label, QImage image, int idx, QWidget *parent) : QWidget (parent) { #ifndef QT_NO_DEBUG qDebug("ImageLabel()"); #endif iconw = iw; iconh = ih; minW = qMax(iconw+4, iminW); setMinimumSize(minW, iconh+24); name = label; img = image; id = idx; focus = 0; if (!id) ck=1; else ck=0; } ImageLabel::~ImageLabel() { #ifndef QT_NO_DEBUG qDebug("~ImageLabel()"); #endif } void ImageLabel::mousePressEvent(QMouseEvent*) { if (ck) return; ck = 1; update(); emit selected(id); } void ImageLabel::select(int idx) { if (ck == ((idx == id))) return; #ifndef QT_NO_DEBUG // qDebug(QString("ImageLabel::select(%1) %2").arg(idx).arg(id)); #endif ck = (idx == id); update(); }; #ifdef HIGHLIGHT_FOCUSED void ImageLabel::enterEvent(QEvent*) { focus = 1; update(); } void ImageLabel::leaveEvent(QEvent*) { focus = 0; update(); } #endif void ImageLabel::paintEvent(QPaintEvent*) { // qDebug("paintEvent()"); QPainter p(this); // qDebug("ImageLabel::paintEvent()"); // p.setRenderHint(QPainter::Antialiasing, true); if (ck) p.fillRect( QRect(1,1, width()-2, height()-2), QBrush( palette().color(QPalette::Highlight) ) ); #ifdef HIGHLIGHT_FOCUSED if (focus) { if (ck) p.setPen( QPen( palette().color(QPalette::HighlightedText), 2, Qt::SolidLine) ); else p.setPen( QPen( palette().color(QPalette::Highlight), 2, Qt::SolidLine) ); p.drawRect( QRect(1,1, width()-2, height()-2) ); } #endif p.drawImage( ((width()-img.width()) >> 1), ((iconh-img.height()) >> 1) + 2, img); if (ck) p.setPen( QPen( palette().color(QPalette::HighlightedText), 2, Qt::SolidLine) ); else p.setPen( QPen( palette().color(QPalette::Text), 2, Qt::SolidLine) ); p.drawText(2, iconh+3, width()-4, height()-iconh, Qt::AlignHCenter | Qt::AlignVCenter, name); } qpxtool-0.7.1_002/gui/src/errc_detailed.cpp0000644000175000001440000001135611337000126017722 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include //#include #include #include #include #include #include "errc_detailed.h" #include static const char* labels_cd[8] = { "BLER", "E11", "E21", "E31", "E12", "E22", "E32", "UNCR" }; static const char* labels_dvd[8] = { "", "PIE", "PI8", "PIF", "POE", "PO8", "POF", "UNCR" }; static const char* labels_null[8] = { "", "", "", "", "", "", "", "" }; ErrcDetailedDialog::ErrcDetailedDialog(QPxSettings *iset, devlist *idev, QWidget *p, Qt::WindowFlags fl) : QDialog(p,fl) { #ifndef QT_NO_DEBUG qDebug("ErrcDetailedDialog()"); #endif devices = idev; device *dev = devices->current(); settings = iset; if (dev->media.type.startsWith("CD-")) { labels = labels_cd; } else if (dev->media.type.startsWith("DVD")) { labels = labels_dvd; } else { labels = labels_null; } setWindowTitle("QPxTool - " + tr("Detailed Error Correction")); layout = new QGridLayout(this); layout->setMargin(3); layout->setSpacing(3); settings->loadScale("XERRC"); graph[0] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); layout->addWidget(graph[0], 0, 1); for (int i=0; i<6; i++) { graph[i+1] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); layout->addWidget(graph[i+1], i/3+1, i%3); } graph[7] = new QPxGraph(iset, idev, "XERRC", TEST_ERRC, this); layout->addWidget(graph[7], 0, 2); for (int i=0; i<8; i++) { graph[i]->setErrcList(1<setShowSpeed(0); graph[i]->setRightMarginHidden(true); } layoutt = new QGridLayout(); layoutt->setMargin(0); layoutt->setHorizontalSpacing(3); layoutt->setVerticalSpacing(1); layout->addLayout(layoutt, 0, 0); pl_tot = new QLabel("Tot",this); pl_tot->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layoutt->addWidget(pl_tot,0,1, 1,2); pl_max = new QLabel("Max",this); pl_max->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layoutt->addWidget(pl_max,0,3); pl_avg = new QLabel("Avg",this); pl_avg->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layoutt->addWidget(pl_avg,0,4); hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::Sunken | QFrame::HLine); layoutt->addWidget(hline0, 1,0, 1,5); for (int i=0; i<8; i++) { pl_name[i] = new QLabel(labels[i], this); pl_name[i]->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); layoutt->addWidget(pl_name[i], i+2, 0); l_tot[i] = new QLabel(this); l_tot[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layoutt->addWidget(l_tot[i], i+2, 1, 1,2); l_max[i] = new QLabel(this); l_max[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layoutt->addWidget(l_max[i], i+2, 3); l_avg[i] = new QLabel(this); l_avg[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layoutt->addWidget(l_avg[i], i+2, 4); } hline1 = new QFrame(this); hline1->setFrameStyle(QFrame::Sunken | QFrame::HLine); layoutt->addWidget(hline1, 10,0, 1,5); layoutt->setRowStretch(11,10); for (int i=0; i<8; i++) connect(graph[i], SIGNAL(scaleChanged()), this, SLOT(changeScale())); } ErrcDetailedDialog::~ErrcDetailedDialog() { #ifndef QT_NO_DEBUG qDebug("~ErrcDetailedDialog()"); #endif } void ErrcDetailedDialog::changeScale() { QObject *sgraph = sender(); for (int i=0; i<8; i++) { if (sgraph != graph[i]) graph[i]->changeScale(); } } void ErrcDetailedDialog::updateAll() { device *dev = devices->current(); if (dev->media.type.startsWith("CD-")) { labels = labels_cd; } else if (dev->media.type.startsWith("DVD")) { labels = labels_dvd; } else { labels = labels_null; } for (int i=0; i<8; i++) { pl_name[i]->setText(labels[i]); graph[i]->setErrcList(1<current(); } else { dev = idev; } graph[0]->setVisible(dev->media.type.startsWith("CD-")); for (int i=0; i<8; i++) { // if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<setText( QString::number(dev->testData.errcTOT.raw.err[i]) ); l_max[i]->setNum( dev->testData.errcMAX.raw.err[i] ); l_avg[i]->setText( QString::number(dev->testData.errcAVG.raw.err[i], 'f', 2) ); // graph[i]->setErrcList(1<update(); // } else { // graph[i]->hide(); // } } } void ErrcDetailedDialog::hideEvent(QHideEvent* e) { emit closed(); QDialog::hideEvent(e); } qpxtool-0.7.1_002/gui/src/printpreview.cpp0000644000175000001440000001756311336745542017721 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include "printpreview.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#define DEFAULT_THUMBS_SCALE 0.125 #ifndef QT_NO_DEBUG //#define PP_DEBUG2 //#define DEBUG_PAINT_TIME #endif class PreviewView : public AbstractPreview { public: PreviewView(QWidget *p, QPrinter *printer, QTextDocument *idoc = NULL, AbstractPreview::PreviewMode mode = AbstractPreview::Mode_Normal); virtual ~PreviewView(); void setDocument(QTextDocument *idoc); protected: virtual void paintPage(QPainter *p, int numberPage, const QRect&); virtual void updatePageFormat(); #ifdef PRINTER_CHANGE_DEVICE virtual void deviceChanged(QPaintDevice* device); #endif virtual void clearEvent() {}; private: QTextDocument *doc; }; PreviewView::PreviewView(QWidget *p, QPrinter *printer, QTextDocument *idoc, AbstractPreview::PreviewMode mode) : AbstractPreview(p, printer) { setViewMode(mode); setDocument(idoc); } PreviewView::~PreviewView() {} void PreviewView::setDocument(QTextDocument *idoc) { // flushCache(); doc = idoc; updatePageFormat(); updatePreview(); } #ifdef PRINTER_CHANGE_DEVICE void PreviewView::deviceChanged(QPaintDevice* device) { doc->documentLayout()->setPaintDevice(device); doc->setPageSize( getPageSize() ); }; #endif void PreviewView::paintPage(QPainter *painter, int page, const QRect& rect) { #ifdef PP_DEBUG2 qDebug() << "STA: PreviewView::paintPage" << page << " rect: " << rect; #endif #ifdef DEBUG_PAINT_TIME timeval tb,te; gettimeofday(&tb, NULL); #endif const QSizeF pgSize = doc->pageSize(); QColor col, bgc; bgc = palette().color((viewport()->backgroundRole())); painter->save(); QRectF docRect(QPointF(0, page * pgSize.height()) + rect.topLeft(), rect.size()); QAbstractTextDocumentLayout::PaintContext ctx; ctx.clip = docRect; ctx.palette.setColor(QPalette::Text, Qt::black); painter->translate( 0, -pgSize.height() * page); painter->translate( -rect.topLeft()); painter->setClipRect(docRect); painter->setRenderHint(QPainter::TextAntialiasing, true); doc->documentLayout()->draw(painter, ctx); painter->restore(); #ifdef DEBUG_PAINT_TIME gettimeofday(&te, NULL); qDebug() << QString("Full page time: %1").arg(te.tv_sec - tb.tv_sec + (te.tv_usec - tb.tv_usec)/1000000.0,0,'f',4); #endif #ifdef PP_DEBUG2 qDebug() << "END: PreviewView::paintPage()"; #endif } void PreviewView::updatePageFormat() { clear(); if (!doc) return; doc->setPageSize( getPageSize() ); addPages(doc->pageCount()); #ifndef QT_NO_DEBUG qDebug() << "pageCount: " << doc->pageCount(); #endif } PrintPreview::PrintPreview(QWidget *parent, QTextDocument *document) : QDialog(parent), printer(QPrinter::HighResolution) { #ifndef QT_NO_DEBUG qDebug("STA: PrintPreview()"); #endif // printer.setOutputFormat(QPrinter::PdfFormat); QList ss; ss.append(100); ss.append(800); setWindowFlags(Qt::Window); setWindowTitle(tr("Print Preview")); if (!document) { doc = NULL; } else { doc = document; } layout_main = new QVBoxLayout(this); layout_main->setMargin(3); layout_main->setSpacing(3); setLayout(layout_main); layout_butt = new QHBoxLayout; layout_butt->setMargin(0); layout_butt->setSpacing(3); layout_main->addLayout(layout_butt); split = new QSplitter(this); layout_main->addWidget(split); QTextFrameFormat fmt = doc->rootFrame()->frameFormat(); fmt.setLeftMargin(0); fmt.setRightMargin(0); fmt.setTopMargin(0); fmt.setBottomMargin(0); doc->rootFrame()->setFrameFormat(fmt); thumbs = new PreviewView(split, &printer, doc, AbstractPreview::Mode_Thumbs); #ifdef THUMBS_MULTICOLUMN thumbs->setMinimumWidth( 100 ); thumbs->setMaximumWidth( 300 ); #else thumbs->setMinimumWidth( 130 ); thumbs->setMaximumWidth( 130 ); #endif view = new PreviewView(split, &printer, doc, AbstractPreview::Mode_Normal); view->setScaleRange(0.25,2.0); pb_print = new QPushButton(this); pb_print->setText(tr("Print")); pb_print->setIcon(QIcon(":images/printer.png")); layout_butt->addWidget(pb_print); pb_psetup = new QPushButton(this); pb_psetup->setText(tr("Page Setup")); pb_psetup->setIcon(QIcon(":images/page-setup.png")); layout_butt->addWidget(pb_psetup); layout_butt->addStretch(10); l_scale = new QLabel(tr("Scale"),this); layout_butt->addWidget(l_scale); box_scale = new QComboBox(this); box_scale->setMaximumHeight(24); box_scale->setMinimumHeight(24); box_scale->addItem(tr("25%")); box_scale->addItem(tr("50%")); box_scale->addItem(tr("100%")); box_scale->addItem(tr("200%")); // box_scale->addItem(tr("400%")); box_scale->setEditable(true); layout_butt->addWidget(box_scale); pb_zoomin = new QPushButton(this); pb_zoomin->setToolTip(tr("Zoom In")); pb_zoomin->setIcon(QIcon(":images/zoom-in.png")); layout_butt->addWidget(pb_zoomin); pb_zoomout = new QPushButton(this); pb_zoomout->setToolTip(tr("Zoom Out")); pb_zoomout->setIcon(QIcon(":images/zoom-out.png")); layout_butt->addWidget(pb_zoomout); pb_zoom1 = new QPushButton(this); pb_zoom1->setToolTip(tr("Original size")); pb_zoom1->setIcon(QIcon(":images/zoom-orig.png")); layout_butt->addWidget(pb_zoom1); resize(880, 650); split->setSizes(ss); scaleChanged(1.0); connect(thumbs, SIGNAL(pageSelected(int)), view, SLOT(gotoPage(int))); connect(view, SIGNAL(scaleChanged(double)), this, SLOT(scaleChanged(double))); connect(box_scale, SIGNAL(currentIndexChanged(QString)), this, SLOT(scaleChanged(QString))); connect(pb_print, SIGNAL(clicked()), this, SLOT(print())); connect(pb_psetup, SIGNAL(clicked()), this, SLOT(pageSetup())); connect(pb_zoomin, SIGNAL(clicked()), view, SLOT(scaleIn())); connect(pb_zoomout, SIGNAL(clicked()), view, SLOT(scaleOut())); connect(pb_zoom1, SIGNAL(clicked()), view, SLOT(scaleOrig())); connect(view, SIGNAL(pageFormatChanged()), thumbs, SLOT(setupPageFormat())); connect(view, SIGNAL(currentPage(int)), thumbs, SLOT(gotoPage(int))); view->scaleOrig(); #ifndef QT_NO_DEBUG qDebug("END: PrintPreview()"); #endif } PrintPreview::~PrintPreview() { #ifndef QT_NO_DEBUG qDebug("~PrintPreview()"); #endif } void PrintPreview::setDocument(QTextDocument *document) { #ifdef PP_DEBUG2 qDebug() << "STA: PreviewView::setDocument(): document @" << document; #endif view->setDocument(NULL); thumbs->setDocument(NULL); if (!document) return; doc = document; doc->documentLayout()->setPaintDevice(view->viewport()); view->setDocument(doc); thumbs->setDocument(doc); } void PrintPreview::print() { view->print(); } void PrintPreview::printDoc(QWidget* parent, QPrinter* printer, QTextDocument* doc) { PreviewView *view = new PreviewView(parent, printer, doc); view->print(printer); delete view; } void PrintPreview::pageSetup() { view->pageSetup(); } void PrintPreview::scaleChanged(double scale) { int idx = box_scale->findText(QString("%1%").arg(qRound((scale*100)))); if (idx<0) { box_scale->setEditText(QString("%1%").arg(qRound((scale*100)))); } else { box_scale->setCurrentIndex(idx); } } void PrintPreview::scaleChanged(QString scale) { #ifndef QT_NO_DEBUG qDebug("scaleChanged()"); #endif scale.remove('%'); view->setScale(scale.toInt()/100.0); } qpxtool-0.7.1_002/gui/src/qpxsettings.cpp0000644000175000001440000002075711334746250017546 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include "qpxsettings.h" #include Scale::Scale(QString iname) { name=iname; policy = Auto; type = Linear; value = 256; } Scale::~Scale() { } QPxSettings::QPxSettings() { #ifndef QT_NO_DEBUG qDebug() << "QPxSettings() " << this; #endif geometry_mw = QRect(0,0,0,0); geometry_pref = QRect(0,0,0,0); // geometry_testsel = QRect(0,0,0,0); show_allctl = 0; actions_flags = 0; useLocal = 1; useRemote = 0; hosts.clear(); ports.clear(); for (int i=0; i<8; i++) { col_errc.raw[i] = new QColor(); #ifndef QT_NO_DEBUG // qDebug(QString("new QColor %1").arg((unsigned int)col_errc.raw[i],8,16)); #endif } } QPxSettings::QPxSettings(const QPxSettings& o) { #ifndef QT_NO_DEBUG qDebug() << "QPxSettings(const QPxSettings&) " << this; #endif for (int i=0; i<8; i++) { col_errc.raw[i] = new QColor(*(o.col_errc.raw[i])); #ifndef QT_NO_DEBUG // qDebug(QString("new QColor %1").arg((unsigned int)col_errc.raw[i],8,16)); #endif } *this = o; } QPxSettings& QPxSettings::operator = (const QPxSettings& o) { #ifndef QT_NO_DEBUG qDebug() << "QPxSettings() " << this << " = " << &o; #endif geometry_mw = o.geometry_mw; geometry_pref = o.geometry_pref; show_allctl = o.show_allctl; report_autosave = o.report_autosave; report_path = o.report_path; actions_flags = o.actions_flags; useLocal = o.useLocal; useRemote = o.useRemote; hosts = o.hosts; ports = o.ports; tests = o.tests; col_bg = o.col_bg; col_bginv = o.col_bginv; col_grid = o.col_grid; col_rspeed = o.col_rspeed; col_wspeed = o.col_wspeed; for (int i=0; i<8; i++) *col_errc.raw[i] = *o.col_errc.raw[i]; col_jitter = o.col_jitter; col_asymm = o.col_asymm; col_fe = o.col_fe; col_te = o.col_te; col_tapit = o.col_tapit; col_taland = o.col_taland; scales = o.scales; return *this; } QPxSettings::~QPxSettings() { #ifndef QT_NO_DEBUG qDebug() << "~QPxSettings() " << this; #endif for (int i=0; i<8; i++) { #ifndef QT_NO_DEBUG // qDebug(QString("del QColor %1").arg((unsigned int)col_errc.raw[i],8,16)); #endif delete col_errc.raw[i]; } } void QPxSettings::load() { QSettings *settings; #ifndef QT_NO_DEBUG qDebug("Loading settings..."); #endif // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); settings->beginGroup("/general"); show_allctl = settings->value("show_allctl", 0).toBool(); report_autosave = settings->value("report_autosave", 0).toBool(); report_path = settings->value("report_path", "").toString(); actions_flags = settings->value("actions_flags", "0").toUInt(); settings->endGroup(); settings->beginGroup("/geometry"); geometry_mw = settings->value("mainwindow", QRect(0,0,0,0) ).toRect(); geometry_pref = settings->value("preferences", QRect(0,0,0,0) ).toRect(); // geometry_testsel = settings->value("testselector", QRect(0,0,0,0) ).toRect(); settings->endGroup(); settings->beginGroup("/devices"); useLocal = settings->value("local", 1).toBool(); useRemote = settings->value("remote", 0).toBool(); hosts = settings->value("hosts", QStringList()).toStringList(); ports = settings->value("ports", QStringList()).toStringList(); hosts.removeAll(""); tests = settings->value("tests", 0).toInt(); settings->endGroup(); settings->beginGroup("/colors"); col_bg = settings->value("graph_bg", defColors.bg.rgb()).toInt(); col_bginv = QColor( (~col_bg.red()) & 0xFF, (~col_bg.green()) & 0xFF, (~col_bg.blue()) & 0xFF ); col_grid = settings->value("graph_grid", defColors.grid.rgb()).toInt(); col_rspeed = settings->value("rspeed", defColors.rspeed.rgb()).toInt(); col_wspeed = settings->value("wspeed", defColors.wspeed.rgb()).toInt(); for(int i=0; i<8; i++) *col_errc.raw[i] = settings->value(QString("errc%1").arg(i), defColors.errc[i].rgb()).toInt(); col_jitter = settings->value("jitter", defColors.jitter.rgb()).toInt(); col_asymm = settings->value("asymm", defColors.asymm.rgb()).toInt(); col_fe = settings->value("fe", defColors.fe.rgb()).toInt(); col_te = settings->value("te", defColors.te.rgb()).toInt(); col_tapit = settings->value("ta_pit", defColors.tapit.rgb()).toInt(); col_taland = settings->value("ta_land", defColors.taland.rgb()).toInt(); settings->endGroup(); delete settings; } void QPxSettings::save() { QSettings *settings; #ifndef QT_NO_DEBUG qDebug("Saving settings..."); #endif // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); settings->beginGroup("/general"); settings->setValue("show_allctl", show_allctl); settings->setValue("report_autosave", report_autosave); settings->setValue("report_path", report_path); settings->setValue("actions_flags", actions_flags); settings->endGroup(); settings->beginGroup("/geometry"); settings->setValue("mainwindow", geometry_mw); settings->setValue("preferences", geometry_pref); // settings->setValue("testselector", geometry_testsel); settings->endGroup(); settings->beginGroup("/devices"); settings->setValue("local", useLocal); settings->setValue("remote", useRemote); settings->setValue("hosts", hosts); settings->setValue("ports", ports); settings->setValue("tests", tests); settings->endGroup(); settings->beginGroup("/colors"); settings->setValue("graph_bg", col_bg.rgb()); settings->setValue("graph_grid", col_grid.rgb()); settings->setValue("rspeed", col_rspeed.rgb()); settings->setValue("wspeed", col_wspeed.rgb()); for(int i=0; i<8; i++) settings->setValue(QString("errc%1").arg(i), col_errc.raw[i]->rgb()); settings->setValue("jitter", col_jitter.rgb()); settings->setValue("asymm", col_asymm.rgb()); settings->setValue("fe", col_fe.rgb()); settings->setValue("te", col_te.rgb()); settings->setValue("ta_pit", col_tapit.rgb()); settings->setValue("ta_land", col_taland.rgb()); settings->endGroup(); delete settings; saveScale(); } void QPxSettings::loadScale(QString name) { QSettings *settings; // Scale scale(name); #ifndef QT_NO_DEBUG qDebug() << "Loading scale: " << name; #endif // settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "qpxtool"); settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); settings->beginGroup("/scale"); settings->beginGroup(name); scales.get(name).policy = settings->value("policy", Scale::Auto).toInt(); scales.get(name).type = settings->value("type", Scale::Log).toInt(); scales.get(name).value = settings->value("value", 0).toInt(); settings->endGroup(); settings->endGroup(); // scales.removeAll(name); // scales.append(scale); delete settings; } void QPxSettings::saveScale() { QSettings *settings; #ifndef QT_NO_DEBUG qDebug("Saving scale..."); #endif settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, "QPxTool", "qpxtool"); settings->beginGroup("/scale"); for (int i=0; ibeginGroup(scales[i].name); settings->setValue("policy", scales[i].policy); settings->setValue("type", scales[i].type); settings->setValue("value", scales[i].value); settings->endGroup(); } settings->endGroup(); delete settings; } void QPxSettings::setDefaultColors() { col_bg = defColors.bg; col_bginv = QColor( (~col_bg.red()) & 0xFF, (~col_bg.green()) & 0xFF, (~col_bg.blue()) & 0xFF ); col_grid = defColors.grid; col_rspeed = defColors.rspeed; col_wspeed = defColors.wspeed; for(int i=0; i<8; i++) *col_errc.raw[i] = defColors.errc[i]; col_jitter = defColors.jitter; col_asymm = defColors.asymm; col_fe = defColors.fe; col_te = defColors.te; col_tapit = defColors.tapit; col_taland = defColors.taland; } #if 0 QPxSettings& QPxSettings::operator = (const QPxSettings& o) { hosts = o.hosts; wgeometry = o.wgeometry; pgeometry = o.pgeometry; col_bg = o.col_bg; col_grid = o.col_grid; scales = o.scales; return (*this); } #endif qpxtool-0.7.1_002/gui/src/preferences.cpp0000644000175000001440000001011111352122436017427 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include #include #include "preferences.h" #include QPxPreferences::QPxPreferences(QPxSettings *iset, QWidget *p, Qt::WindowFlags f) : QDialog (p,f) { #ifndef QT_NO_DEBUG qDebug("QPxPreferences()"); #endif setWindowTitle("QPxTool - " + tr("Preferences")); set_old = iset; set = *iset; if (set_old->geometry_pref.width() > 0 && set_old->geometry_pref.height() > 0) setGeometry(set_old->geometry_pref); for (int i=0; igeometry_pref = geometry(); } void QPxPreferences::winit() { layout = new QHBoxLayout(); //layout = new QHBoxLayout(); setLayout(layout); layout->setMargin(3); ilist = new ImagesList(80,this); layout->addWidget(ilist); ilist->addLabel(tr("Common"), QImage(":images/settings.png")); ilist->addLabel(tr("Colors"), QImage(":images/colors.png")); ilist->addLabel(tr("Devices"), QImage(":images/disc.png")); QObject::connect(ilist, SIGNAL(selected(int)), this, SLOT(setPage(int))); parea = new QVBoxLayout(); layout->addLayout(parea); // parea->insertStretch(0,10); // parea->insertStretch(1,10); hline0 = new QFrame(this); hline0->setFrameStyle(QFrame::HLine | QFrame::Sunken); parea->addWidget(hline0); layout_butt = new QHBoxLayout; layout_butt->setMargin(0); layout_butt->setSpacing(3); parea->addLayout(layout_butt); layout_butt->addStretch(10); pb_save = new QPushButton( QIcon(":images/ok.png"), tr("Save"), this); pb_cancel = new QPushButton( QIcon(":images/x.png"), tr("Cancel"), this); pb_save->setMinimumWidth(100); pb_cancel->setMinimumWidth(100); layout_butt->addWidget(pb_save,1); layout_butt->addWidget(pb_cancel,1); connect( pb_save, SIGNAL(clicked()), this, SLOT(save()) ); connect( pb_cancel, SIGNAL(clicked()), this, SLOT(cancel()) ); // playout = new QVBoxLayout; // playout->setMargin(0); // layout->addLayout(playout); } void QPxPreferences::setPage(int page) { #ifndef QT_NO_DEBUG // qDebug(QString("pageSelected: %1").arg(page)); #endif if (curPage == page) return; if (curPage >=0 && pages[curPage]) { pages[curPage]->hide(); // delete pages[curPage]; // pages[curPage] = NULL; } /* if (pages[curPage]) { pages[curPage]->show(); return; } */ switch(page) { case 0: setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Common")); if (!pages[page]) pages[page] = new prefCommon(&set, this); break; case 1: setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Colors")); if (!pages[page]) pages[page] = new prefColors(&set, this); break; case 2: setWindowTitle("QPxTool - " + tr("Preferences") + ": " + tr("Devices")); if (!pages[page]) pages[page] = new prefDevices(&set, this); break; default: break; } parea->insertWidget(0,pages[page]); pages[page]->show(); curPage = page; } void QPxPreferences::save() { #ifndef QT_NO_DEBUG qDebug("QPxPreferences::save()"); #endif close(); *set_old = set; } void QPxPreferences::cancel() { #ifndef QT_NO_DEBUG qDebug("QPxPreferences::cancel()"); #endif close(); } void QPxPreferences::closeEvent(QCloseEvent* e) { #ifndef QT_NO_DEBUG qDebug("QPxPreferences::closeEvent()"); #endif for (int i=0; ikey() == Qt::Key_Escape) { close(); e->accept(); } } qpxtool-0.7.1_002/gui/src/mainwindow.cpp0000644000175000001440000013136111345716210017316 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "mainwindow.h" #include #include #define PRINT_ERRC_DETAILED #define PRINT_GRAPH_SCALE 2.0 #define HTML_GRAPH_W 600 #define HTML_GRAPH_H 300 #define HTML_GRAPH_WQ "600" #define HTML_GRAPH_HQ "300" #define HTML_GRAPH_HQ2 "150" const QString errcNameCD[8] = { "BLER", "E11", "E21", "E31", "E12", "E22", "E32", "UNCR" }; const QString errcNameDVD[8] = { "res", "PIE", "PI8", "PIF", "POE", "PO8", "POF", "UNCR" }; #include #include static struct option long_options[] = { {"load", 1, NULL, 'l'}, {"help", 0, NULL, 'h'}, {0,0,0,0} }; QPxToolMW::QPxToolMW(int ac, char **av, QWidget *p, Qt::WindowFlags fl) : QMainWindow(p, fl) { char c; QString lname; splash = 1; testDialog = NULL; #ifndef QT_NO_DEBUG qDebug("STA: QPxToolMW()"); #endif setWindowTitle("QPxTool - " VERSION); settings_load(); while (1) { c = getopt_long(ac, av, "hl:", long_options, NULL); if (c == -1) break; switch(c) { case 'h': printf("qpxtool options:\n"); printf("\t-l FILE\tload data from file\n"); printf("\t-h\t\tshow this help\n"); return; case 'l': lname = QString(optarg); break; default: break; } } scanbusio = new QPxIODevice(this); dhost = ""; winit(); if (set.geometry_mw.width() > 0 && set.geometry_mw.height() > 0) setGeometry(set.geometry_mw); scanbus(); if (!lname.isEmpty()) { load_results(lname); } #ifndef QT_NO_DEBUG qDebug("END: QPxToolMW()"); #endif splash = 0; } QPxToolMW::~QPxToolMW () { #ifndef QT_NO_DEBUG qDebug("STA: ~QPxToolMW()"); #endif settings_save(); #ifndef QT_NO_DEBUG qDebug("Waiting for devices..."); #endif mutex_dev.lock(); mutex_dev.unlock(); #ifndef QT_NO_DEBUG qDebug("END: ~QPxToolMW()"); #endif } void QPxToolMW::winit() { create_actions(); winit_menubar(); winit_toolbar(); winit_statusbar(); cwidget = new QWidget(this); setCentralWidget(cwidget); layout = new QVBoxLayout(cwidget); layout->setMargin(3); layout->setSpacing(3); // device layout_dev = new QHBoxLayout; layout_dev->setMargin(0); layout_dev->setSpacing(3); layout->addLayout(layout_dev); l_dev = new QLabel(tr("Device:"),cwidget); l_dev->setAlignment(Qt::AlignRight | Qt::AlignVCenter); l_dev->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); layout_dev->addWidget(l_dev); c_dev = new QComboBox(cwidget); c_dev->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); QFont dfont = c_dev->font(); //dfont.setFamily("Courier"); dfont.setFamily("Monospace"); c_dev->setFont( dfont ); layout_dev->addWidget(c_dev); pb_loej = new QPushButton(cwidget); pb_loej->setIcon(QIcon(":images/loej.png")); pb_loej->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); layout_dev->addWidget(pb_loej); pb_lock = new QPushButton(cwidget); pb_lock->setIcon(QIcon(":images/lock.png")); pb_lock->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); layout_dev->addWidget(pb_lock); /* // separator hline = new QFrame(cwidget); hline->setFrameStyle(QFrame::HLine | QFrame::Sunken); layout->addWidget(hline); */ // main widget mwidget = new QPxMainWidget(&set, &devices, cwidget); layout->addWidget(mwidget); connect(pb_loej, SIGNAL(clicked()), this, SLOT(loejToggle())); connect(pb_lock, SIGNAL(clicked()), this, SLOT(lockToggle())); } void QPxToolMW::create_actions() { act_exit = new QAction(QIcon(":images/exit.png"), tr("Exit"), this); act_scanbus = new QAction(QIcon(":images/refresh.png"), tr("Rescan local bus and network"), this); act_minfo = new QAction(QIcon(":images/refresh-media.png"), tr("Update media info"), this); act_devctl = new QAction(QIcon(":images/device.png"), tr("Device controls"), this); act_test = new QAction(QIcon(":images/scan.png"), tr("Run tests..."), this); act_stop = new QAction(QIcon(":images/stop.png"), tr("Stop tests"), this); act_pref = new QAction(QIcon(":images/settings.png"), tr("Preferences"), this); act_print = new QAction(QIcon(":images/printer.png"), tr("Print test results"), this); act_report = new QAction(QIcon(":images/pdf.png"), tr("Export results to PDF"), this); act_export = new QAction(QIcon(":images/html.png"), tr("Export results to HTML"), this); act_save = new QAction(QIcon(":images/save.png"), tr("Save results..."), this); act_load = new QAction(QIcon(":images/fileopen.png"), tr("Load results..."), this); connect(act_exit, SIGNAL(triggered()), this, SLOT(exit())); connect(act_scanbus, SIGNAL(triggered()), this, SLOT(scanbus())); connect(act_minfo, SIGNAL(triggered()), this, SLOT(update_media_info())); connect(act_devctl, SIGNAL(triggered()), this, SLOT(device_settings())); connect(act_test, SIGNAL(triggered()), this, SLOT(select_tests())); connect(act_stop, SIGNAL(triggered()), this, SLOT(terminate_tests())); connect(act_pref, SIGNAL(triggered()), this, SLOT(preferences())); connect(act_print, SIGNAL(triggered()), this, SLOT(print_results())); connect(act_export, SIGNAL(triggered()), this, SLOT(export_results())); connect(act_report, SIGNAL(triggered()), this, SLOT(save_report())); connect(act_save, SIGNAL(triggered()), this, SLOT(save_results())); connect(act_load, SIGNAL(triggered()), this, SLOT(load_results())); } void QPxToolMW::winit_menubar() { QMenu *menu; // QMenu *submenu; menubar = menuBar(); // menu "file" menu = new QMenu(tr("File"),this); menu->addAction(act_load); menu->addAction(act_save); menu->addAction(act_export); menu->addAction(act_report); menu->addAction(act_print); menu->addSeparator(); menu->addAction(act_exit); menubar->addMenu(menu); // menu "device" menu = new QMenu(tr("Device"),this); menu->addAction(act_pref); menu->addSeparator(); menu->addAction(act_scanbus); menu->addAction(act_minfo); menu->addAction(act_devctl); menu->addSeparator(); menu->addAction(act_test); menu->addAction(act_stop); menubar->addMenu(menu); // menu "delp" menu = new QMenu(tr("Help"),this); menu->addAction(QIcon(":images/info.png"), tr("About"), this, SLOT(about())); menubar->addMenu(menu); } void QPxToolMW::winit_toolbar() { // QToolButton *tb; toolbar = new QToolBar("Main toolbar",this); toolbar->setIconSize(QSize(24,24)); toolbar->setContextMenuPolicy(Qt::NoContextMenu); toolbar->setFloatable(false); toolbar->setMovable(false); // toolbar->addAction(act_exit); // exit button // toolbar->addSeparator(); toolbar->addAction(act_scanbus); // scanbus button toolbar->addAction(act_minfo); // media info update toolbar->addAction(act_devctl); // device controls toolbar->addAction(act_test); // run tests toolbar->addAction(act_stop); // terminate tests toolbar->addSeparator(); toolbar->addAction(act_pref); // settings button addToolBar(toolbar); } void QPxToolMW::winit_statusbar() { status_progress = new QProgressBar(this); status_progress->setMaximumHeight(20); status_progress->setRange(0,1000); status_progress->reset(); status_process = new QLabel(this); status_process->setMaximumHeight(20); status_media = new QLabel(this); status_media->setMaximumHeight(20); status_mid = new QLabel(this); status_mid->setMaximumHeight(20); statusBar()->addWidget(status_progress,2); statusBar()->addWidget(status_process,2); statusBar()->addWidget(status_media,2); statusBar()->addWidget(status_mid,2); } void QPxToolMW::exit() { /* #ifndef QT_NO_DEBUG qDebug("QPxToolMW::exit()"); #endif if (QMessageBox::question(this, "Exit QPxTool", "Are you sure to exit?", QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes) == QMessageBox::Yes) */ close(); } void QPxToolMW::settings_load() { set.load(); } void QPxToolMW::settings_save() { set.geometry_mw = geometry(); set.save(); } void QPxToolMW::select_tests() { device *dev; if (!devices.size()) { QMessageBox::warning(this, tr("No devices"), tr("No devices found!\nCan't run tests")); return; } dev = devices.current(); select_tests(dev); } void QPxToolMW::select_tests(device *dev) { if (testDialog) return; #ifndef QT_NO_DEBUG qDebug("select_tests()"); #endif if (!mutex_dev.tryLock()) { QMessageBox::warning(this, tr("Device busy"), tr("Bus scan in progress")); return; } if (!dev->mutex->tryLock()) { mutex_dev.unlock(); QMessageBox::warning(this, tr("Device busy"), tr("It seems device already performing test\nor info updating in progress")); return; } dev->mutex->unlock(); testDialog = new TestDialog(&set, dev, this); testDialog->setModal(true); //testDialog->setModal(false); connect (testDialog, SIGNAL(accepted()), this, SLOT(run_tests())); connect (testDialog, SIGNAL(rejected()), this, SLOT(cancel_run_tests())); testDialog->show(); } void QPxToolMW::run_tests() //void QPxToolMW::run_tests(device *dev) { if (!testDialog) return; device *dev = testDialog->getDevice(); testDialog->deleteLater(); testDialog = NULL; connect( dev, SIGNAL(testsDone()), this, SLOT(tests_done()) ); connect( dev, SIGNAL(testsError()), this, SLOT(tests_error()) ); set.tests = dev->test_req; // dev->mutex->unlock(); dev->start_tests(); mutex_dev.unlock(); } void QPxToolMW::cancel_run_tests() //void QPxToolMW::cancel_run_tests(device *dev) { if (!testDialog) return; // device *dev = testDialog->getDevice(); testDialog->deleteLater(); testDialog = NULL; // dev->mutex->unlock(); mutex_dev.unlock(); } void QPxToolMW::terminate_tests() { device *dev = devices.current(); if (dev->type == device::DevtypeNone) return; dev->stop_tests(); } void QPxToolMW::tests_done() { device *dev = (device*) sender(); disconnect( dev, SIGNAL(testsDone()), this, SLOT(tests_done()) ); disconnect( dev, SIGNAL(testsError()), this, SLOT(tests_error()) ); if (set.report_autosave) { dev->mutex->lock(); autosave_report(dev); dev->mutex->unlock(); if (set.actions_flags & AFLAG_EJECT_AFTER) dev->setFeature(FEATURE_LOEJ, 0); } QMessageBox::information(this, tr("Done"), dev->id + ":\n"+ tr("All tests finished")); } void QPxToolMW::tests_error() { QMessageBox::warning(this, tr("Error"), tr("Error performing test!")+"\n"+tr("qScan finished with non-zero exit code")); } void QPxToolMW::scanbus() { int previdx; QString previd; device *dev; #ifndef QT_NO_DEBUG qDebug("STA: QPxToolMW::scanbus()"); #endif // mwidget->setDevice(NULL); if (!mutex_dev.tryLock()) { QMessageBox::information(this, tr("Device busy"), tr("Can't scan bus: some device(s) busy!")); return; } if (scanbusio->IODevice()) { mutex_dev.unlock(); return; } // try lock all devices to ensure they not running any tests for (int i=0; imutex->tryLock()) { for (int j=0; jmutex->unlock(); mutex_dev.unlock(); QMessageBox::information(this, tr("Device busy"), tr("Can't scan bus: some device(s) busy!")); return; } } c_dev->setEnabled(false); pb_loej->setEnabled(false); pb_lock->setEnabled(false); act_scanbus->setEnabled(false); act_export->setEnabled(false); act_save->setEnabled(false); act_load->setEnabled(false); act_print->setEnabled(false); act_minfo->setEnabled(false); act_devctl->setEnabled(false); act_test->setEnabled(false); act_stop->setEnabled(false); disconnect(c_dev, SIGNAL(currentIndexChanged(int)), this, SLOT(setDevice(int))); // if (scanbusDis) return; // scanbusDis = 1; previd = devices.current()->id; mwidget->clearDev(); devices.setIdx(-1); devices.clear(); c_dev->clear(); if (!splash) { progress = new ProgressWidget(10,3,this); progress->setText(tr("Searching devices...")); progress->show(); } dev = new device(this); dev->type = device::DevtypeVirtual; /* dev->host = dhost; dev->port = dport; dev->path = outsl[1]; dev->ven = outsl[3]; dev->dev = outsl[5]; dev->fw = outsl[7]; */ dev->id = "RESULTS VIEWER [Virtual Device]"; devices.append(dev); c_dev->addItem(dev->id); if (set.useLocal) scanbus_local(); if (set.useRemote) scanbus_remote(); // scanbusDis = 0; if (!devices.size()) { c_dev->addItem(tr("No devices found!")); } mutex_dev.unlock(); previdx = c_dev->findText(previd, Qt::MatchCaseSensitive); #ifndef QT_NO_DEBUG qDebug() << "Prev device [" << previdx << "] '" << previd << "'"; #endif // unlocking all devices // for (int i=0; imutex->unlock(); // selecting device setDevice( (previdx < 0) ? 0 : previdx ); connect(c_dev, SIGNAL(currentIndexChanged(int)), this, SLOT(setDevice(int))); c_dev->setCurrentIndex( (previdx < 0) ? 0 : previdx ); #ifndef QT_NO_DEBUG qDebug("END: QPxToolMW::scanbus()"); #endif if (!splash) delete progress; c_dev->setEnabled( devices.size() ); if (devices.size()) { act_load->setEnabled(true); // act_save->setEnabled(true); act_export->setEnabled(true); act_print->setEnabled(true); /* act_minfo->setEnabled(true); act_devctl->setEnabled(true); act_test->setEnabled(true); act_stop->setEnabled(true); */ } act_scanbus->setEnabled(true); } void QPxToolMW::scanbus_local() { QProcess *proc; #ifndef QT_NO_DEBUG qDebug("STA: QPxToolMW::scanbus_local()"); #endif if (scanbusio->IODevice()) goto scanbus_local_end; proc = new QProcess(this); scanbusio->setIODevice(proc); dt = device::DevtypeLocal; dhost = ""; // connect(proc, SIGNAL(readyReadStandardOutput()), // this, SLOT(qscan_process_scanbus())); connect(scanbusio, SIGNAL(readyReadLine()), this, SLOT(qscan_process_scanbus())); proc->start("qscan", QStringList("-l")); if (!proc->waitForStarted(10000)) { #ifndef QT_NO_DEBUG qDebug("Can't run qscan!"); #endif if (!splash) progress->hide(); QMessageBox::warning(this, tr("Warning"), tr("Unable to start qscan!\nLocal devices will not work")); if (!splash) progress->show(); scanbusio->setIODevice(NULL); delete proc; goto scanbus_local_end; } proc->setReadChannel(QProcess::StandardOutput); while(proc->state() == QProcess::Running) { msleep(1<<7); qApp->processEvents(); if (!splash) progress->step(); } proc->waitForFinished(10000); disconnect(proc); disconnect(scanbusio, SIGNAL(readyReadLine()), this, SLOT(qscan_process_scanbus())); scanbusio->setIODevice(NULL); delete proc; scanbus_local_end: #ifndef QT_NO_DEBUG qDebug("END: QPxToolMW::scanbus_local()"); #endif return; } void QPxToolMW::scanbus_remote() { QTcpSocket *sock; #ifndef QT_NO_DEBUG qDebug("STA: QPxToolMW::scanbus_remote()"); #endif int hosts_cnt = set.hosts.size(); if (scanbusio->IODevice()) goto scanbus_remote_end; sock = new QTcpSocket(this); scanbusio->setIODevice(sock); dt = device::DevtypeTCP; // connect(sock, SIGNAL(readyRead()), // this, SLOT(qscan_process_scanbus())); connect(scanbusio, SIGNAL(readyReadLine()), this, SLOT(qscan_process_scanbus())); for (int i=0; iconnectToHost(dhost, dport); if (!sock->waitForConnected(5000)) { #ifndef QT_NO_DEBUG qDebug("Unable to connect to host!"); #endif if (!splash) progress->hide(); QMessageBox::warning(this, tr("Warning"), tr("Unable to connect to qscand at %1:%2").arg(dhost).arg(dport)); if (!splash) progress->show(); continue; } qDebug() << "connection state: " << sock->state(); sock->write("list\n"); sock->write("close\n"); while(sock->state() == QAbstractSocket::ConnectedState) { msleep(1<<7); qApp->processEvents(); if (!splash) progress->step(); } sock->disconnectFromHost(); #ifndef QT_NO_DEBUG qDebug("Disconnected from QSCAND"); #endif } disconnect(sock); disconnect(scanbusio, SIGNAL(readyReadLine()), this, SLOT(qscan_process_scanbus())); scanbusio->setIODevice(NULL); delete sock; scanbus_remote_end: #ifndef QT_NO_DEBUG qDebug("END: QPxToolMW::scanbus_remote()"); #endif return; } void QPxToolMW::qscan_process_scanbus() { QString qout; QStringList outsl; device *dev; #ifndef QT_NO_DEBUG qDebug("STA: QPxToolMW::qscan_process_scanbus()"); #endif if (!scanbusio->IODevice()) goto scanbus_process_qscan_end; while (scanbusio->linesAvailable() ) { qout = scanbusio->readLine(); // qout.remove("\n"); #ifndef QT_NO_DEBUG qDebug() << qout; #endif if (qout.startsWith("D:")) { dev = new device(this); outsl = qout.split('\''); dev->type = dt; if (dt == device::DevtypeTCP) { dev->host = dhost; dev->port = dport; } dev->path = outsl[1]; dev->ven = outsl[3]; dev->dev = outsl[5]; dev->fw = outsl[7]; if (dt == device::DevtypeLocal) { dev->id = QString("%1 %2 %3 [ %4 ]") .arg(dev->ven).arg(dev->dev).arg(dev->fw) .arg(dev->path); } else if (dt == device::DevtypeTCP) { dev->id = QString("%1 %2 %3 [ %4@%5:%6 ]") .arg(dev->ven).arg(dev->dev).arg(dev->fw) .arg(dev->path) .arg(dev->host).arg(dev->port); } devices.append(dev); c_dev->addItem(dev->id); dev->startWatcher(); } } scanbus_process_qscan_end: #ifndef QT_NO_DEBUG qDebug("END: QPxToolMW::qscan_process_scanbus()"); #endif return; } void QPxToolMW::setDevice(int idx) { bool devact_en; device *dev; #ifndef QT_NO_DEBUG qDebug() << "STA: QPxToolMW::setDevice: " << idx; #endif if (idx<0 || idx >= devices.size() || devices.idx() == idx) return; // devices.current()->disconnect(); devices.setIdx(idx); mwidget->selectDevice(); dev = devices.current(); devact_en = (dev->type == device::DevtypeLocal) || (dev->type == device::DevtypeTCP); act_minfo->setEnabled(devact_en); act_test->setEnabled(devact_en); act_stop->setEnabled(devact_en); act_save->setEnabled(devact_en); act_devctl->setEnabled(dev->type == device::DevtypeLocal); pb_loej->setEnabled(dev->type == device::DevtypeLocal); pb_lock->setEnabled(dev->type == device::DevtypeLocal); if (devact_en) { if (!dev->info_set) { dev->update_device_info(); while( dev->isRunning() ) { msleep ( 1 << 7); qApp->processEvents(); } dev->update_media_info(); dev->info_set = 1; } if (dev->plextor_lock) { QMessageBox::warning( this, tr("Warning"), dev->id + "\n" + tr("Found locked Plextor device!\nQuality check and some other features will not work")); } } if (dev->media.type == "-") { status_media->setText("No Media"); status_mid->clear(); } else { status_media->setText(dev->media.dstate + " "+ dev->media.type); status_mid->setText(dev->media.mid); } status_process->setText(dev->nprocess); status_progress->setValue(dev->pprocess * 10); #ifndef QT_NO_DEBUG qDebug("END: QPxToolMW::setDevice()"); #endif return; } void QPxToolMW::mediaUpdated(int) { device *dev = (device*) sender(); #ifndef QT_NO_DEBUG qDebug() << "QPxTool::mediaUpdated()" << dev->autoupdate; #endif if ( typeid(*dev) != typeid(device)) return; if (dev == devices.current()) { // mwidget->closeChilds(); if (dev->media.type == "-") { status_media->setText("No Media"); status_mid->clear(); return; } else { status_media->setText(dev->media.dstate + " "+ dev->media.type); status_mid->setText(dev->media.mid); } } if (!dev->autoupdate) return; dev->autoupdate = 0; if (testDialog) testDialog->mediaChanged(); if (!testDialog) { if (dev->media.type == "-") return; if ( ((set.actions_flags & AFLAG_AUTOSTART_W) && dev->media.creads ) || ((set.actions_flags & AFLAG_AUTOSTART_B) && !dev->media.creads || dev->media.type.startsWith("DVD+RW") || dev->media.type.startsWith("DVD-RAM")) ) { select_tests(dev); } } } void QPxToolMW::update_device_info() { devices.current()->update_device_info(); } void QPxToolMW::update_media_info() { update_media_info(devices.current()); } void QPxToolMW::update_media_info(device* dev) { if (!dev->update_media_info()) QMessageBox::warning(this, tr("Error"), dev->id + "\n" + tr("Can't update media info! Device busy")); } void QPxToolMW::process_started() { device *dev = (device*) sender(); if ( dev != devices.current()) return; status_process->setText(dev->nprocess); status_progress->setValue(0); } void QPxToolMW::process_finished() { device *dev = (device*) sender(); if ( dev != devices.current()) return; status_process->setText(dev->nprocess); status_progress->reset(); } void QPxToolMW::process_progress() { device *dev = (device*) sender(); if ( dev != devices.current()) return; status_progress->setValue(dev->pprocess * 10); } void QPxToolMW::loejToggle() { device *dev = devices.current(); qDebug("QPxToolMW::loejToggle()"); if (dev->type != device::DevtypeLocal) return; dev->setFeature(FEATURE_LOEJ_TOGGLE, 0); } void QPxToolMW::lockToggle() { device *dev = devices.current(); qDebug("QPxToolMW::lockToggle()"); if (dev->type != device::DevtypeLocal) return; dev->setFeature(FEATURE_LOCK_TOGGLE, 0); } void QPxToolMW::device_settings() { device *dev; devSettings *devSet; #ifndef QT_NO_DEBUG qDebug("QPxToolMW::preferences()"); #endif if (!devices.size()) { QMessageBox::warning(this, tr("No devices"), tr("No devices found!\nNothing to configure\n")); return; } dev = devices.current(); if (!mutex_dev.tryLock()) { QMessageBox::warning(this, tr("Device busy"), tr("Bus scan in progress")); return; } if (!dev->mutex->tryLock()) { mutex_dev.unlock(); QMessageBox::warning(this, tr("Device busy"), tr("Device busy")); return; } dev->mutex->unlock(); progress = new ProgressWidget(10,3,this); progress->setText(tr("Retrieving device parameters...")); progress->show(); connect(dev, SIGNAL(doneGetFeatures(int)), this, SLOT(update_features_done(int))); if (!dev->getFeatures()) { delete progress; mutex_dev.unlock(); QMessageBox::warning(this, tr("Warning"), tr("Can't get device features!")); return; } while(dev->isRunning()) { msleep ( 1 << 7); progress->step(); qApp->processEvents(); } delete progress; disconnect(dev, SIGNAL(doneGetFeatures(int)), this, SLOT(update_features_done(int))); devSet = new devSettings(&set, dev, this); devSet->exec(); delete devSet; mutex_dev.unlock(); } void QPxToolMW::update_features_done(int exitcode) { if (exitcode) { QMessageBox::warning(this, tr("Error"), tr("Error requesting device settings!")+"\n"+tr("cdvdcontrol finished with non-zero exit code")); } } void QPxToolMW::preferences() { QPxPreferences *pref; #ifndef QT_NO_DEBUG qDebug("QPxToolMW::preferences()"); #endif pref = new QPxPreferences(&set, this); pref->exec(); delete pref; mwidget->reconfig(); } void QPxToolMW::save_report() { device *dev = devices.current(); QString fname; fname = QFileDialog::getSaveFileName(this, tr("Export results to PDF"), "", "PDF files (*pdf *.PDF)"); if (fname.isEmpty()) return; save_report(dev, fname); } void QPxToolMW::autosave_report(device *dev) { #ifndef QT_NO_DEBUG qDebug("Autosaving report..."); #endif QString fpath,fname; QDateTime dt = QDateTime::currentDateTime(); QDir dir; if (set.report_path.isEmpty()) { #ifndef QT_NO_DEBUG qDebug() << "Reports path not defined!"; #endif return; } #warning !!! hardcoded report name structure fpath = set.report_path + "/" + dt.toString("yyyy-MM-dd"); fname = dt.toString("/hh-mm-ss_") + dev->media.type + ".pdf"; if (!dir.exists(fpath) && !dir.mkpath(fpath)) { QMessageBox::warning(this, tr("Can't save report"), tr("Direcrory not exists and I can't create it") + ":\n" + fpath); return; } save_report(dev, fpath + "/" + fname); } void QPxToolMW::save_report(device *dev, QString fname) { QPrinter printer(QPrinter::HighResolution); QTextDocument *doc = new QTextDocument(this); prepare_report(dev, doc); printer.setOutputFormat(QPrinter::PdfFormat); printer.setPaperSize(QPrinter::A4); printer.setOutputFileName(fname); PrintPreview::printDoc(this, &printer, doc); delete doc; } void QPxToolMW::print_results() { #ifndef QT_NO_DEBUG qDebug("QPxToolMW::print_results()"); #endif device *dev = devices.current(); QTextDocument *doc = new QTextDocument(this); PrintPreview *preview; prepare_report(dev, doc); preview = new PrintPreview(this, doc); preview->exec(); delete preview; delete doc; } void QPxToolMW::prepare_report(device *dev, QTextDocument* doc) { QImage img; progress = new ProgressWidget(10,3,this); progress->setText(tr("Preparing report...")); progress->show(); doc->setHtml( generate_html(dev, "") ); // img = QImage(":images/logo.png"); // doc->addResource(QTextDocument::ImageResource, QUrl("images/logo.png"), img); progress->step(); qApp->processEvents(); if (dev->testData.rt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_RT); doc->addResource(QTextDocument::ImageResource, QUrl("images/rt.png"), img); progress->step(); qApp->processEvents(); } if (dev->testData.wt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_WT); doc->addResource(QTextDocument::ImageResource, QUrl("images/wt.png"), img); progress->step(); qApp->processEvents(); } // if (1) { if (dev->testData.errc.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_ERRC); doc->addResource(QTextDocument::ImageResource, QUrl("images/errc.png"), img); #ifdef PRINT_ERRC_DETAILED if (dev->media.type.startsWith("CD")) { for (int i=0; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<drawGraph(img, dev, TEST_ERRC, (1 << i)); doc->addResource(QTextDocument::ImageResource, QUrl("images/"+errcNameCD[i]+".png"), img); } progress->step(); qApp->processEvents(); } } else if (dev->media.type.startsWith("DVD")) { for (int i=1; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<drawGraph(img, dev, TEST_ERRC, (1 << i)); doc->addResource(QTextDocument::ImageResource, QUrl("images/"+errcNameDVD[i]+".png"), img); } progress->step(); qApp->processEvents(); } } #endif } if (dev->testData.jb.size() > 0) { img = QImage(HTML_GRAPH_W, HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_JB); doc->addResource(QTextDocument::ImageResource, QUrl("images/jb.png"), img); progress->step(); qApp->processEvents(); } if (dev->testData.ft.size() > 0) { img = QImage(HTML_GRAPH_W, HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_FT); doc->addResource(QTextDocument::ImageResource, QUrl("images/ft.png"), img); progress->step(); qApp->processEvents(); } if (dev->test_req & TEST_TA) { for (int l=0; lmedia.ilayers; l++) { for (int z=0; z<3; z++) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H/2,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 0); doc->addResource(QTextDocument::ImageResource, QUrl(QString("images/ta%1_%2_p.png").arg(l).arg(z)), img); progress->step(); qApp->processEvents(); img = QImage(HTML_GRAPH_W,HTML_GRAPH_H/2,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 1); doc->addResource(QTextDocument::ImageResource, QUrl(QString("images/ta%1_%2_l.png").arg(l).arg(z)), img); progress->step(); qApp->processEvents(); } } } delete progress; } void QPxToolMW::export_results() { #ifndef QT_NO_DEBUG qDebug("QPxToolMW::export_results()"); #endif QImage img; QDir dir; QString fname, idir; QString html; QFile f; device *dev = devices.current(); fname = QFileDialog::getSaveFileName(this, tr("Export results to HTML"), "", "HTML files (*.html)"); if (fname.isEmpty()) return; progress = new ProgressWidget(10,3,this); progress->setText(tr("Preparing report...")); progress->show(); f.setFileName(fname); qDebug() << "Saving HTML to: " << fname; int idx = fname.lastIndexOf("/"); idir = fname.mid(idx); if (idx>=0) { fname.truncate(idx); } idir.remove("/"); if (idir.endsWith(".html")) idir.remove(".html"); idir+= ".images/"; qDebug() << "path: " << fname; qDebug() << "idir: " << idir; fname += "/" + idir; dir.mkpath(fname); qDebug() << "Images path: " << fname; html = generate_html(dev, idir); if(!f.open(QIODevice::WriteOnly)) { QMessageBox::warning(this, tr("Error"), tr("Unable to create file:\n")+fname); return; } f.write(html.toLatin1()); f.close(); img = QImage(":images/logo.png"); img.save(fname+"logo.png"); // prepare_images(true); if (dev->testData.rt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_RT); img.save(fname+"rt.png"); progress->step(); qApp->processEvents(); } if (dev->testData.wt.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_WT); img.save(fname+"wt.png"); progress->step(); qApp->processEvents(); } // if (1) { if (dev->testData.errc.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_ERRC); img.save(fname+"errc.png"); progress->step(); qApp->processEvents(); #ifdef PRINT_ERRC_DETAILED if (dev->media.type.startsWith("CD")) { for (int i=0; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<drawGraph(img, dev, TEST_ERRC, (1 << i)); img.save(fname+errcNameCD[i]+".png"); } progress->step(); qApp->processEvents(); } } else if (dev->media.type.startsWith("DVD")) { for (int i=1; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<drawGraph(img, dev, TEST_ERRC, (1 << i)); img.save(fname+errcNameDVD[i]+".png"); } progress->step(); qApp->processEvents(); } } #endif } if (dev->testData.jb.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_JB); img.save(fname+"jb.png"); progress->step(); qApp->processEvents(); } if (dev->testData.ft.size() > 0) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_FT); img.save(fname+"ft.png"); progress->step(); qApp->processEvents(); } if (dev->test_req & TEST_TA) { for (int l=0; lmedia.ilayers; l++) { for (int z=0; z<3; z++) { img = QImage(HTML_GRAPH_W,HTML_GRAPH_H/2,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 0); img.save( QString("images/ta%1_%2_p.png").arg(l).arg(z) ); progress->step(); qApp->processEvents(); img = QImage(HTML_GRAPH_W,HTML_GRAPH_H/2,QImage::Format_ARGB32); mwidget->drawGraph(img, dev, TEST_TA, (l << 28) | (z<<4) | 1); img.save( QString("images/ta%1_%2_l.png").arg(l).arg(z) ); progress->step(); qApp->processEvents(); } } } delete progress; } /* void QPxToolMW::prepare_images(QString path) { bool save; QString idir; if (path.isEmpty()) { idir=":images/"; save = 0; } else { idir=path; save = 1; } } */ QString QPxToolMW::generate_html(device *dev, QString idir) { QString r; QString bgcolor; bool print = idir.isEmpty(); r= "\n"; r+= "\n"; r+= "\tQPxTool scan results\n"; r+= "\n"; r+= "\n"; r+= "
\n"; if (print) { idir = "images"; r+= "\t\n"; } else { r+= "\t\n"; } r+= "\t
\n"; r+= "\t\n"; r+= "\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; if (dev->host.isEmpty()) { r+= "\t\t\t\n"; } else { r+= "\t\t\t\n"; } r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t
Device Path" + dev->path + "" + dev->path + "@" + dev->host + ":"+ QString::number(dev->port) + "
Device ID" + dev->ven + dev->dev + dev->fw + "
\n"; r+= "\t
\n"; // r+= "\t
\n"; r+= "\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\t\n"; r+= "\t\t\n"; r+= "\t
TLA# " + dev->tla + "
Serial# " + dev->sn + "
Media/Category:" + dev->media.type + " / "+ dev->media.category + "
Media ID:" + dev->media.mid + "
Written on:" + dev->media.writer + "
Capacity (readable):" + QString::number(dev->media.creadm) + "MB (" + QString::number(dev->media.creads) + " sectors)
Capacity (total):" + QString::number(dev->media.ctotm) + "MB (" + QString::number(dev->media.ctots) + " sectors)
\n"; r+= "\t
\n"; r+= "
\n"; if (dev->testData.rt.size() > 0) { r+= "

\n"; r+= "\tRead Transfer @ "+QString::number(dev->tspeeds.rt)+"X
\n"; r+= QString("\tTest time: %1:%2
\n") .arg( ((int)dev->testData.rt_time) / 60) .arg( ((int)dev->testData.rt_time) % 60, 2, 10, QChar('0')); r+= "

\n"; r+= "\n"; r+= "\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\n"; r+= QString("\t\n") .arg(dev->testData.rt.first().spdx) .arg(dev->testData.rt.last().spdx) .arg(dev->testData.rt.last().lba * 2 / dev->testData.rt_time / dev->media.spd1X, 0, 'f', 2); r+= QString("\t\n") .arg(dev->testData.rt.first().spdk) .arg(dev->testData.rt.last().spdk) .arg(dev->testData.rt.last().lba * 2 / dev->testData.rt_time, 0, 'f', 2); r+= "
StartEndAvg
%1 X%2 X%3 X
%1 kB/s%2 kB/s%3 kB/s
\n"; r+= "
\n"; r+= "\n\t\n
"; r+= "\"Read"; // r+= "
Read Transfer"; r+= "

\n"; } if (dev->testData.wt.size() > 0) { r+= "

\n"; r+= "\tWrite Transfer @ "+QString::number(dev->tspeeds.wt)+"X
\n"; r+= QString("\tTest time: %1:%2
\n") .arg( ((int)dev->testData.wt_time) / 60) .arg( ((int)dev->testData.wt_time) % 60, 2, 10, QChar('0')); r+= "

\n"; r+= "\n"; r+= "\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\n"; r+= QString("\t\n") .arg(dev->testData.wt.first().spdx) .arg(dev->testData.wt.last().spdx) .arg(dev->testData.wt.last().lba * 2 / dev->testData.rt_time / dev->media.spd1X, 0, 'f', 2); r+= QString("\t\n") .arg(dev->testData.wt.first().spdk) .arg(dev->testData.wt.last().spdk) .arg(dev->testData.wt.last().lba * 2 / dev->testData.rt_time, 0, 'f', 2); r+= "
StartEndAvg
%1 X%2 X%3 X
%1 kB/s%2 kB/s%3 kB/s
\n"; r+= "
\n"; r+= "\n\t\n
"; r+= "\"Write"; // r+= "
Write Transfer"; r+= "

\n"; } if (dev->testData.errc.size() > 0) { r+= "

\n"; r+= "\tError Correction @ "+QString::number(dev->tspeeds.errc)+"X
\n"; r+= QString("\tTest time: %1:%2
\n") .arg( ((int)dev->testData.errc_time) / 60) .arg( ((int)dev->testData.errc_time) % 60, 2, 10, QChar('0')); r+= "

\n"; r+= "\n"; r+= "\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\t\n"; r+= "\t\n"; if (dev->media.type.startsWith("CD")) { for (int i=0; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<\n") .arg(bgcolor) .arg(errcNameCD[i]) .arg(dev->testData.errcTOT.raw.err[i]) .arg(dev->testData.errcMAX.raw.err[i]) .arg(dev->testData.errcAVG.raw.err[i], 0, 'f', 2); } } } else if (dev->media.type.startsWith("DVD")) { for (int i=1; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<\n") .arg(bgcolor) .arg(errcNameDVD[i]) .arg(dev->testData.errcTOT.raw.err[i]) .arg(dev->testData.errcMAX.raw.err[i]) .arg(dev->testData.errcAVG.raw.err[i], 0, 'f', 2); } } } r+= "
TotalMaxAvg
%2%3%4%5
%2%3%4%5
\n"; r+= "
\n"; r+= "\n\t
"; r+= "\"Error\n"; r+= "
Overall ERRC Graph"; r+= "

\n"; #ifdef PRINT_ERRC_DETAILED if (dev->media.type.startsWith("CD")) { for (int i=0; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<\n\t"; r+= "\t"; r+= "
"+errcNameCD[i]; r+= "\n
\n"; } } } else if (dev->media.type.startsWith("DVD")) { for (int i=1; i<8; i++) { if (!dev->media.tdata_errc || (dev->media.tdata_errc & (1<\n\t"; r+= "\t"; r+= "
"+errcNameDVD[i]; r+= "\n
\n"; } } } #endif } if (dev->testData.jb.size() > 0) { r+= "

\n"; r+= "\tJitter/Asymmetry @ "+QString::number(dev->tspeeds.jb)+"X
\n"; r+= QString("\tTest time: %1:%2
\n") .arg( ((int)dev->testData.jb_time) / 60) .arg( ((int)dev->testData.jb_time) % 60, 2, 10, QChar('0')); r+= "

\n"; r+= "\t\n"; r+= "\t\t"; r+= QString("\t\t") .arg(dev->testData.jbMM.jmin) .arg(dev->testData.jbMM.jmax); r+= QString("\t\t") .arg(dev->testData.jbMM.bmin) .arg(dev->testData.jbMM.bmax); r+= "\t
MinMax
Jitter%1%2
Asymmetry%1%2
\n"; r+= "
\n"; r+= "\n\t\n
\n"; r+= ""; r+= "

\n"; } if (dev->testData.ft.size() > 0) { r+= "

\n"; r+= "\tFocus/Tracking Errors @ "+QString::number(dev->tspeeds.ft)+"X
\n"; r+= QString("\tTest time: %1:%2
\n") .arg( ((int)dev->testData.ft_time) / 60) .arg( ((int)dev->testData.ft_time) % 60, 2, 10, QChar('0')); r+= "

\n"; r+= "\t\n"; r+= "\t\t"; r+= "\t\t"; r+= "\t
FE Max"+QString::number(dev->testData.ftMAX.fe)+"
TE Max"+QString::number(dev->testData.ftMAX.te)+"
\n"; r+= "
\n"; r+= "\n\t
\n"; r+= ""; r+= "

\n"; } if (dev->test_req & TEST_TA) { r+= "

\n"; r+= "\tTime Analyser
\n"; r+= QString("\tTest time: %1:%2
\n") .arg( ((int)dev->testData.ta_time) / 60) .arg( ((int)dev->testData.ta_time) % 60, 2, 10, QChar('0')); r+= "

\n"; r+= "\t\n"; #warning TA analysis data r+= "\t
\n"; for (int l=0; lmedia.ilayers; l++) { for (int z=0; z<3; z++) { r+= "\n\t\n\t\n
"; r+= ""; r+= "
"; r+= ""; r+= "

\n"; } } } r+= "\t

\n"; r+= "\t\n"; r+= "

\n"; r+= "\tGenerated by QPxTool v"VERSION" (c) Gennady \"ShultZ\" Kozlov\n"; r+= "\thttp://qpxtool.sourceforge.net
\n"; r+= "

\n"; r+= "\n\n"; return r; } void QPxToolMW::about() { #ifndef QT_NO_DEBUG qDebug("QPxToolMW::about()"); #endif AboutDialog *about = new AboutDialog(this); about->exec(); delete about; } void QPxToolMW::save_results() { #ifndef QT_NO_DEBUG qDebug("QPxToolMW::save_results()"); timeval tb,te; #endif QString fname; QFile f; if (!devices.size()) return; device *dev = devices.current(); fname = QFileDialog::getSaveFileName(this, tr("Save results to file..."), "", "QPxTool data files (*.qpx)"); if (fname.isEmpty()) return; f.setFileName(fname); qDebug() << "Saving data to: " << fname; if (!f.open(QIODevice::WriteOnly)) { QMessageBox::warning(this, tr("Error"), tr("Unable to create file:\n")+fname); return; } #ifndef QT_NO_DEBUG gettimeofday(&tb, NULL); #endif if (!dev->save(&f)) { QMessageBox::warning(this, tr("Warning"), tr("Error saving tests data!")); #ifndef QT_NO_DEBUG } else { gettimeofday(&te, NULL); double t = (te.tv_sec - tb.tv_sec) + (te.tv_usec - tb.tv_usec)/1000000.0; QMessageBox::information(this, tr("Info"), tr("Tests data saved in %1 sec").arg(t,0,'f',2)); #endif } f.close(); } void QPxToolMW::load_results() { QString fname; if (!devices.size()) return; fname = QFileDialog::getOpenFileName(this, tr("Load results from file..."), "", "QPxTool data files (*.qpx)"); load_results(fname); } void QPxToolMW::load_results(QString fname) { #ifndef QT_NO_DEBUG qDebug("QPxToolMW::load_results()"); timeval tb,te; #endif QFile f; if (!devices.size()) return; device *dev = devices[0]; if (fname.isEmpty()) return; // c_dev->setCurrentIndex(0); // setDevice(0); f.setFileName(fname); qDebug() << "Loading data from: " << fname; if (!f.open(QIODevice::ReadOnly)) { QMessageBox::warning(this, tr("Error"), tr("Unable to open file:\n")+fname); return; } #ifndef QT_NO_DEBUG gettimeofday(&tb, NULL); #endif if (!dev->load(&f)) { QMessageBox::warning(this, tr("Warning"), tr("Do tests data found in this file!")); } else { c_dev->setCurrentIndex(0); #ifndef QT_NO_DEBUG gettimeofday(&te, NULL); double t = (te.tv_sec - tb.tv_sec) + (te.tv_usec - tb.tv_usec)/1000000.0; QMessageBox::information(this, tr("Info"), tr("Tests data loaded in %1 sec").arg(t,0,'f',2)); #endif } f.close(); // setDevice(0); } qpxtool-0.7.1_002/gui/src/textslider.cpp0000644000175000001440000002430211200265160017316 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include "textslider.h" #define VITEMSIZE 16 #define HITEMSIZE 30 TextSlider::TextSlider(QWidget *p) : QAbstractSlider(p) { initDefaults(); } TextSlider::TextSlider(Qt::Orientation orient, QWidget *p) : QAbstractSlider(p) { initDefaults(); op.orientation = orient; if (orient == Qt::Horizontal) setMinimumHeight(40); } void TextSlider::initDefaults() { en = 1; op.state = QStyle::State_Active | QStyle::State_Enabled; op.subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle; op.activeSubControls = op.subControls; op.orientation = Qt::Vertical; op.pageStep = 1; op.singleStep = 1; op.tickInterval = 1; op.tickPosition = QSlider::TicksLeft; op.upsideDown = true; op.minimum = 0; op.maximum = 0; op.sliderPosition = 0; items.clear(); setFocusPolicy(Qt::StrongFocus); } void TextSlider::addItem(QString item, bool en) { if (!items.contains(item)) items << SliderItem(item,en); op.maximum = items.size() -1; if (items.size()) op.subControls |= QStyle::SC_SliderTickmarks; moveToEnabled(); if (op.orientation == Qt::Vertical) { setMinimumHeight(items.size() * VITEMSIZE); } else { setMinimumWidth(items.size() * HITEMSIZE); } update(); } void TextSlider::removeItem(int idx) { if (idx < 0 || idx >=items.size()) return; items.removeAt(idx); op.maximum = items.size() -1; if (!items.size()) op.subControls &= ~QStyle::SC_SliderTickmarks; moveToEnabled(); if (op.orientation == Qt::Vertical) { setMinimumHeight(items.size() * VITEMSIZE); } else { setMinimumWidth(items.size() * HITEMSIZE); } update(); } void TextSlider::setItemEnabled(int idx, bool en) { if (idx<0 || idx>=items.size()) return; items[idx].enabled = en; if(!en) moveToEnabled(); update(); } void TextSlider::setItemEnabled(QString s, bool en) { int idx = items.indexOf(s); if (idx < 0) return; items[idx].enabled = en; if(!en) moveToEnabled(); update(); } void TextSlider::moveToEnabled() { int idx = op.sliderPosition; if (!items.size()) return; // list empty if (idx<0 || idx>=items.size()) { // index out of range idx = 0; } else { if (items[idx].enabled) return; // current item enabled } if (!prev()) next(); // if (idx != op.sliderPosition) // emit valueChanged(op.sliderPosition); } void TextSlider::setTickPosition(QSlider::TickPosition position) { // if (position == QSlider::TicksLeft || position == QSlider::TicksRight) op.tickPosition = position; if ( op.tickPosition == position ) return; op.tickPosition = position; update(); } void TextSlider::setUpsideDown(bool v) { op.upsideDown = v; update(); } void TextSlider::setOrientation(Qt::Orientation orient) { if (op.orientation == orient) return; op.orientation = orient; if (op.orientation == Qt::Vertical) { setMinimumHeight(items.size() * VITEMSIZE); } else { setMinimumWidth(items.size() * HITEMSIZE); setMinimumHeight(40); } update(); } void TextSlider::first() { int pos = op.sliderPosition; op.sliderPosition = 0; moveToEnabled(); update(); if (op.sliderPosition != pos) emit valueChanged(op.sliderPosition); } void TextSlider::last() { int pos = op.sliderPosition; op.sliderPosition = items.size()-1; moveToEnabled(); update(); if (op.sliderPosition != pos) emit valueChanged(op.sliderPosition); } bool TextSlider::prev() { int pos = op.sliderPosition; pos++; while (pos < op.maximum && !items[pos].enabled) pos++; if (pos > op.maximum || !items[pos].enabled) return 1; if (op.sliderPosition == pos) return 1; op.sliderPosition = pos; update(); emit valueChanged(op.sliderPosition); return 0; } bool TextSlider::next() { int pos = op.sliderPosition; pos--; while (pos > op.minimum && !items[pos].enabled) pos--; if (pos < op.minimum || !items[pos].enabled) return 1; if (op.sliderPosition == pos) return 1; op.sliderPosition = pos; update(); emit valueChanged(op.sliderPosition); return 0; } int TextSlider::value() { if (op.sliderPosition <0 || op.sliderPosition >= items.size()) return -1; return op.sliderPosition; } QString TextSlider::text() { if (op.sliderPosition <0 || op.sliderPosition >= items.size()) return QString::null; return items[op.sliderPosition].text; } void TextSlider::setValue(int val) { op.sliderPosition = val; moveToEnabled(); update(); } void TextSlider::setCurrentItem(const QString& text) { int idx=-1; for (int i=0; ipos().y()-10, height()-21, op.upsideDown); } else { int itemw = width() / items.size(); pos = QStyle::sliderValueFromPosition(op.minimum, op.maximum, e->pos().x()-itemw/2, width() - itemw , op.upsideDown); } if (items[pos].enabled) { op.sliderPosition = pos; update(); } if (oldpos != op.sliderPosition) { // qDebug() << "mouseReleaseEvent() oldpos: " << oldpos << " pos: " << op.sliderPosition; emit valueChanged(op.sliderPosition); } } void TextSlider::mouseMoveEvent(QMouseEvent* e) { int pos; if (!items.size()) return; if (op.orientation == Qt::Vertical) { pos = QStyle::sliderValueFromPosition(op.minimum, op.maximum, e->pos().y()-10, height()-21, op.upsideDown); } else { int itemw = width() / items.size(); pos = QStyle::sliderValueFromPosition(op.minimum, op.maximum, e->pos().x()-itemw/2, width() - itemw , op.upsideDown); } if (items[pos].enabled) { op.sliderPosition = pos; update(); } } void TextSlider::wheelEvent(QWheelEvent* e) { int pos = op.sliderPosition; if (e->delta() * (op.upsideDown ? -1:1) * (op.orientation == Qt::Vertical ? 1:-1) < 0) { prev(); } else if (e->delta() * (op.upsideDown ? -1:1) * (op.orientation == Qt::Vertical ? 1:-1) > 0) { next(); } else { return; } if (op.sliderPosition != pos) emit valueChanged(op.sliderPosition); // qDebug() << "slider pos: " << op.sliderPosition; } void TextSlider::keyPressEvent(QKeyEvent* e) { switch (e->key()) { case Qt::Key_Up: case Qt::Key_Right: if ((op.upsideDown ? -1:1) * (op.orientation == Qt::Vertical ? 1:-1) < 0) prev(); else next(); break; case Qt::Key_Down: case Qt::Key_Left: if ((op.upsideDown ? -1:1) * (op.orientation == Qt::Vertical ? 1:-1) < 0) next(); else prev(); break; case Qt::Key_Home: if ((op.upsideDown ? -1:1) * (op.orientation == Qt::Vertical ? 1:-1) < 0) first(); else last(); break; case Qt::Key_End: if ((op.upsideDown ? -1:1) * (op.orientation == Qt::Vertical ? 1:-1) < 0) last(); else first(); break; default: e->ignore(); break; } } void TextSlider::focusInEvent(QFocusEvent*) { op.state |= QStyle::State_HasFocus; update(); } void TextSlider::focusOutEvent(QFocusEvent*) { op.state &= ~QStyle::State_HasFocus; update(); } void TextSlider::paintEvent(QPaintEvent*) { // qWarning("TextSlider::paintEvent()"); QPainter p(this); // p.fillRect(0,0,width(),height(), QBrush(Qt::red)); int pos; int ctl = style()->pixelMetric( QStyle::PM_SliderControlThickness, &op, this); //qDebug() << "Qt::WA_ForceDisabled: " << testAttribute(Qt::WA_ForceDisabled); //qDebug() << "Qt::WA_Disabled: " << testAttribute(Qt::WA_Disabled); bool ena = en && !testAttribute(Qt::WA_Disabled); if (op.orientation == Qt::Vertical) { int itemh = height() - VITEMSIZE - ctl; if (items.size()) itemh /= items.size(); for (int i=0; i < items.size(); i++) { pos = QStyle::sliderPositionFromValue(op.minimum, op.maximum, i, height() - VITEMSIZE - ctl, op.upsideDown) + VITEMSIZE/2 + ctl/2; p.setPen( QPen( palette().color( (ena && items[i].enabled) ? QPalette::Active : QPalette::Disabled, QPalette::Text), 1) ); // p.drawLine(0, pos, width(), pos); if (op.tickPosition == QSlider::TicksLeft || op.tickPosition == QSlider::TicksBothSides ) p.drawText(0, pos-itemh/2, width()-30, itemh+2, Qt::AlignRight | Qt::AlignVCenter, items[i].text); else p.drawText(30, pos-itemh/2, width()-30, itemh+2, Qt::AlignLeft | Qt::AlignVCenter, items[i].text); } if (op.tickPosition == QSlider::TicksLeft || op.tickPosition == QSlider::TicksBothSides ) p.translate(width()-26, VITEMSIZE/2); else p.translate(0, VITEMSIZE/2); op.rect.setWidth(26); op.rect.setHeight(height() - VITEMSIZE); } else { int itemw = width() - ctl; if (items.size()) itemw /= items.size(); for (int i=0; i < items.size(); i++) { pos = QStyle::sliderPositionFromValue(op.minimum, op.maximum, i, width()-itemw-ctl, op.upsideDown) + itemw/2 + ctl/2; p.setPen( QPen( palette().color( (ena && items[i].enabled) ? QPalette::Active : QPalette::Disabled, QPalette::Text), 1) ); // p.drawLine(pos, 0, pos, height()); if (op.tickPosition == QSlider::TicksLeft || op.tickPosition == QSlider::TicksBothSides ) p.drawText(pos-itemw/2, 0, itemw, height()-20, Qt::AlignHCenter | Qt::AlignBottom, items[i].text); else p.drawText(pos-itemw/2, 26, itemw, height()-20, Qt::AlignHCenter | Qt::AlignTop, items[i].text); } if (op.tickPosition == QSlider::TicksLeft || op.tickPosition == QSlider::TicksBothSides ) p.translate(itemw/2, height()-26); else p.translate(itemw/2, 0); op.rect.setWidth(width() - itemw); op.rect.setHeight(26); } style()->drawComplexControl( QStyle::CC_Slider, &op, &p, this); } qpxtool-0.7.1_002/gui/src/qpxiodevice.cpp0000644000175000001440000000445311201657415017465 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include "qpxiodevice.h" #include #include #include #include #ifndef QT_NO_DEBUG //#define QPXIO_DEBUG #endif QPxIODevice::QPxIODevice(QObject* p) :QObject(p) { buf = ""; io = NULL; } QPxIODevice::~QPxIODevice() {} void QPxIODevice::setIODevice(QIODevice* iio) { #ifdef QPXIO_DEBUG qDebug("STA: QPxIODevice::setIODevice()"); #endif buf = ""; io = iio; if (io) { if ( typeid(*io) == typeid(QProcess) ) connect(io, SIGNAL(readyReadStandardOutput()), this, SLOT(splitInput())); else if ( typeid(*io) == typeid(QTcpSocket) ) connect(io, SIGNAL(readyRead()), this, SLOT(splitInput())); } #ifdef QPXIO_DEBUG qDebug("END: QPxIODevice::setIODevice()"); #endif } QIODevice* QPxIODevice::IODevice() { return io; } QString QPxIODevice::readLine() { QString ts=""; if (lines.size()) { ts = lines[0]; lines.removeFirst(); } return ts; } int QPxIODevice::linesAvailable() { return lines.size(); } void QPxIODevice::splitInput() { #ifdef QPXIO_DEBUG qDebug("STA: QPxIODevice::splitInput()"); #endif int bi; qint64 ba; while ((ba = io->bytesAvailable())) { //while ((io->bytesAvailable())) { #ifdef QPXIO_DEBUG qDebug() << "IODevice bytes: " << ba; #endif /* #ifdef QPXIO_DEBUG if ( typeid(*io) == typeid(QTcpSocket) ) { // QByteArray tb; while ((io->bytesAvailable())) { buf+=io->read(1).replace(0,'\n'); } // buf+=QString(tb); // qDebug() << "ba.size(): " << tb.size(); // qDebug() << "buf: " << buf; } else { buf+=io->readAll(); } #else */ buf+=io->readAll().replace(0,'\n'); /* #endif */ while ((bi = buf.indexOf(QRegExp("[\n\r]"),0)) >=0 ) { if (bi>0) { lines << buf.left(bi); buf.remove(0,bi); } buf.remove(0,1); } // if (lines.size() > 4) emit readyReadLine(); } if (lines.size()) emit readyReadLine(); #ifdef QPXIO_DEBUG qDebug("END: QPxIODevice::splitInput()"); #endif } qpxtool-0.7.1_002/gui/Makefile0000644000175000001440000000213711352116471015306 0ustar shultzusersQTDIR=/opt/qt4/lib QMAKE4= qmake4 export QTDIR QMAKE4 all: Makefile.qmake $(MAKE) -f Makefile.qmake lrelease -verbose qpxtool.pro clean: Makefile.qmake rm -f Makefile.qmake rm -f qpxtool rm -f obj/* rm -f moc/* rm -f *~ rm -f src/*~ rm -f include/*~ rm -f locale/*.qm rm -f qrc_qpxtool.cpp install: Makefile.qmake install -m 755 qpxtool $(DESTDIR)$(BINDIR)/qpxtool mkdir -p $(DESTDIR)$(PREFIX)/share/qpxtool/locale install -m 644 locale/*.qm $(DESTDIR)$(PREFIX)/share/qpxtool/locale mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps install -m 644 images/q.png $(DESTDIR)$(PREFIX)/share/pixmaps/qpxtool.png mkdir -p $(DESTDIR)$(PREFIX)/share/applications install -m 644 qpxtool.desktop $(DESTDIR)$(PREFIX)/share/applications/qpxtool.desktop uninstall: rm -f $(DESTDIR)$(BINDIR)/qpxtool rm -rf $(DESTDIR)$(PREFIX)/share/qpxtool rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/qpxtool.png rm -f $(DESTDIR)$(PREFIX)/share/applications/qpxtool.desktop Makefile.qmake: rm -f Makefile.qmake $(QMAKE4) LIBS+=-L../lib/lib LIBS+=-lqpxtransport CONFIG+=debug -o Makefile.qmake .PHONY: all clean install uninstall qpxtool-0.7.1_002/gui/qpxtool.desktop0000644000175000001440000000055611276374001016752 0ustar shultzusers[Desktop Entry] Encoding=UTF-8 Name=QPxTool GenericName=CD/DVD media quality checker GenericName[ru]=Проверка качеÑтва ноÑителей CD/DVD Type=Application Exec=qpxtool Icon=qpxtool Comment=CD/DVD media quality checker Comment[ru]=Проверка качеÑтва ноÑителей CD/DVD Categories=System; StartupNotify=true Terminal=false qpxtool-0.7.1_002/gui/qpxtool.ico0000644000175000001440000004107611220346303016046 0ustar shultzusers@@ (B(@€ 4£ùU-´ÿÿÿ½žýÿÿÿÿÿ'Fx«ÎßïüóäÖ»^*[ëÿÿÿÿÿÿÿŽ \´úÿÿÿÿÿÿÿÿÿÿÿÿÿÿÞ:°ÿÿÿÿÿÿÿÿÿ΄òÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÍU7àÿÿÿÿÿÿÿÿÑV|ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÞúÿÿÿÿÿÿÿân)Íÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿú‰ böÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÓ1wÿÿÿÿÿÿÿÿÿÿíÎ Ç8Ê#RÌ+bÏ/jÓ)^Ï!LÌ1ÇÅÑóÿÿÿÿÿÿÿÿÿÿÿ»…ÿÿÿÿÿÿÿÿÿÜ7Ï LçmÂÿ&|Öÿ/…àÿ2èÿ2êÿ3éÿ1êÿ'†ãÿ!~ÛÿtÍÿ^®ú5jÚäÿÿÿÿÿÿÿÿÿÿù>gÿÿÿÿÿÿÿÿ î9wòtÌÿG¡öÿU´ÿÿSµÿÿB¸ÿÿ0ºÿÿ`Ëÿÿ“Úÿÿ’Üÿÿ‹Øÿÿ…ÓÿÿwÊÿÿh¿ÿÿHÌÿ/Fÿÿÿÿÿÿÿÿÿÿÿÿÿí$9ùÿÿÿÿÿÿÿ'Lö7ŽåÿO§øÿY¾ÿÿFÄÿÿ.Áÿÿ¾ÿÿ»ÿÿ¸ÿÿ\Ôÿÿ²ëÿÿ¦çÿÿ§èÿÿ¤ãúÿpœ­ÿ-?GÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈåÿÿÿÿÿÿþU’ÿV¯ûÿlÇÿÿbËÿÿMÐÿÿ:Ìÿÿ+ÇÿÿÂÿÿ ½ÿÿ·ÿÿSÐÿÿ®èÿÿ“Îæÿ8OYÿ ÿÿÿÿÿÿÿÿÿÿ þþÿÿÿÿÿÿÿ|”ÿÿÿÿÿÿÿ3s­ÿrÄÿÿƒ×ÿÿ|ÝÿÿmÙÿÿ]ÓÿÿMÏÿÿ=Ëÿÿ.ÇÿÿÂÿÿ»ÿÿTÐÿÿ®èÿÿžÞøÿ ÿÿÿÿÿÿÿÿÿÿ3Qeÿ]±÷ÿV“ÿþÿÿÿÿÿÿø.üÿÿÿÿÿÿ4f“ÿ’Ôÿÿ§åÿÿæÿÿ‹àÿÿ}ÜÿÿmØÿÿ]ÔÿÿMÏÿÿ=Ëÿÿ.ÆÿÿÀÿÿWÒÿÿ¬èÿÿ£åÿÿ;S]ÿÿÿÿÿÿÿÿ!ÿp¯ÿ¥æÿÿ•ÛÿÿzÅÿÿ&Wˆÿÿÿÿÿÿÿÿ ½ÿÿÿÿÿÿ%AYÿ¦ÜÿÿÎóÿÿ½ïÿÿ«éÿÿ›äÿÿáÿÿ}ÜÿÿmØÿÿ]ÔÿÿMÏÿÿ=Ëÿÿ'ÅÿÿXÒÿÿ­éÿÿ¤æÿÿr ³ÿÿÿÿÿÿ ÿUx†ÿžÞøÿ£åÿÿ¤æÿÿªéÿÿiÒÿÿaÂÿÿ5Pÿÿÿÿÿÿÿý(0ÿÿÿÿÿÿ ÿ¶ÕìÿóýÿÿÛõÿÿËñÿÿ»íÿÿ«éÿÿåÿÿáÿÿ}ÜÿÿmØÿÿ]ÔÿÿMÏÿÿ7ÉÿÿeÕÿÿ³êÿÿ¨èÿÿŸßùÿ ÿÿÿ+0ÿcŒœÿÝ÷ÿ£åÿÿ£åÿÿ£åÿÿ®èÿÿwÚÿÿºÿÿ »ÿÿ]´ëÿ ÿÿÿÿÿÿÿŽžÿÿÿÿÿÿb€ÿôþÿÿüþÿÿëúÿÿÚõÿÿËñÿÿ»íÿÿ­éÿÿåÿÿáÿÿ}ÜÿÿmØÿÿ]ÓÿÿIÎÿÿgÖÿÿµëÿÿ¯éÿÿ¨èÿÿTuƒÿUw…ÿŠÁØÿ£åÿÿ£åÿÿ£åÿÿ£åÿÿ£åÿÿ­èÿÿuÙÿÿ ¾ÿÿ¹ÿÿºÿÿ»ÿÿ@oÿÿÿÿÿÿÿí÷ÿÿÿÿÿÿÉ÷÷ÿáÿÿÿóÿÿÿúþÿÿëúÿÿÚõÿÿÊñÿÿ½íÿÿ­éÿÿåÿÿáÿÿ}ÜÿÿmØÿÿZÓÿÿoØÿÿºìÿÿµëÿÿ®éÿÿ¨çÿÿ£æÿÿ£åÿÿ£åÿÿ£åÿÿ£åÿÿ£åÿÿªçÿÿŠÞÿÿ¿ÿÿ¸ÿÿºÿÿºÿÿºÿÿ·öÿ ÿÿÿÿÿÿÿO`ÿÿÿÿÿÿPswÿºÿÿÿÌÿÿÿßÿÿÿõÿÿÿúþÿÿëúÿÿÚõÿÿÍòÿÿ½íÿÿ­éÿÿåÿÿáÿÿ}Üÿÿj×ÿÿ|Ûÿÿ¿îÿÿ»íÿÿ´êÿÿ®éÿÿ¨èÿÿ¤åÿÿ£åÿÿ£åÿÿ£åÿÿ¬çÿÿƒÜÿÿ ½ÿÿ¹ÿÿºÿÿºÿÿºÿÿºÿÿ¹ÿÿZwÿÿÿÿÿÿÿšªÿÿÿÿÿÿŠÍÖÿ«ûÿÿ¹ÿÿÿÌÿÿÿßÿÿÿóÿÿÿúþÿÿëúÿÿÜöÿÿÍòÿÿ½íÿÿ­éÿÿåÿÿáÿÿ|Üÿÿ€ÝÿÿÃïÿÿÀîÿÿºìÿÿ³êÿÿ®éÿÿ©èÿÿ¤æÿÿ£åÿÿ«çÿÿàÿÿ¿ÿÿ¸ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ™Ñÿÿÿÿÿÿÿäïÿÿÿÿÿ"ÿœíÿÿ£óÿÿ¬ûÿÿ¹ÿÿÿÌÿÿÿàÿÿÿóÿÿÿúþÿÿíûÿÿÜöÿÿÌòÿÿ½íÿÿ­éÿÿåÿÿŒàÿÿàÿÿÉðÿÿÇðÿÿÀîÿÿºìÿÿ´êÿÿ¯éÿÿ¨èÿÿªçÿÿ”áÿÿÂÿÿ¸ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ¹ÿÿ ÿÿÿÿÿÿÿ5ÿÿÿÿÿÿ7Ygÿ”åÿÿ›ìÿÿ£óÿÿ«ûÿÿ¸ÿÿÿÌÿÿÿßÿÿÿôÿÿÿûþÿÿíúÿÿÜöÿÿÍòÿÿ½íÿÿ­éÿÿäÿÿ™äÿÿÎòÿÿÍñÿÿÆðÿÿ¿îÿÿºíÿÿ´êÿÿ²êÿÿ¥çÿÿ-Æÿÿ·ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿHdÿÿÿÿÿÿÿPbÿÿÿÿÿÿPƒÿ‹Ýÿÿ“äÿÿ›ìÿÿ¤óÿÿ«ûÿÿ¹ÿÿÿÌÿÿÿßÿÿÿðÿÿÿûþÿÿíúÿÿÜöÿÿÌòÿÿ¾îÿÿ±ëÿÿ¦èÿÿÒòÿÿÐòÿÿÍòÿÿÊòÿÿÁïÿÿ¾íÿÿ·ìÿÿKÎÿÿ ½ÿÿ»ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿn˜ÿÿÿÿÿÿÿ‚Œÿÿÿÿÿÿa¤ÌÿƒÖÿÿŠÜÿÿ“äÿÿ›ìÿÿ£óÿÿ¬ûÿÿ¹ÿÿÿËÿÿÿÝÿÿÿòÿÿÿùþÿÿíúÿÿÞ÷ÿÿÉðÿÿªãÿÿ‘Ùÿÿ£Ùÿÿž×ÿÿ¥Üÿÿ°ãÿÿ½ëÿÿÀïÿÿrÙÿÿ,Æÿÿ"Ãÿÿ¿ÿÿ»ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ”Ëÿÿÿÿÿÿÿ¢¶ÿÿÿÿÿÿk¼ñÿzÎÿÿ‚ÕÿÿŠÜÿÿ“äÿÿ›ìÿÿ£óÿÿ¬ûÿÿ¸ÿÿÿÉÿÿÿÝÿÿÿòÿÿÿþÿÿÿç÷ÿÿ¥Úÿÿ‡Îÿÿ|Êÿÿ‘Ñÿÿ”Òÿÿ‹ÎÿÿˆÍÿÿÑÿÿyÓÿÿMÐÿÿ@Ìÿÿ2Èÿÿ"Ãÿÿ¾ÿÿ»ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ«ëÿÿÿÿÿÿÿ¿Óÿÿÿÿÿ ÿj¿ÿÿrÇÿÿyÍÿÿ‚ÕÿÿŠÜÿÿ“äÿÿ›ìÿÿ¤óÿÿ«ûÿÿ¶ÿÿÿÉÿÿÿàÿÿÿçúÿÿ·ßÿÿšÒÿÿ•Òÿÿ­áÿÿÒðÿÿØóÿÿÇëÿÿ¤ÚÿÿgÄÿÿJ½ÿÿQÈÿÿRÑÿÿAÌÿÿ2Èÿÿ"ÃÿÿÀÿÿ¼ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ ÿÿÿÿÿÿÛàÿÿÿÿÿ "ÿb¸ÿÿj¿ÿÿqÆÿÿyÍÿÿ‚ÕÿÿŠÜÿÿ“äÿÿ›ìÿÿ£óÿÿªúÿÿ·ÿÿÿÍÿÿÿ´êÿÿÖÿÿµÞÿÿÜñÿÿçüÿÿÎëþÿºÝ÷ÿÜõüÿÃñÿÿnÍÿÿUÁÿÿM¾ÿÿZÏÿÿRÑÿÿAÌÿÿ1Èÿÿ$Äÿÿ¿ÿÿ»ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ ÿÿÿÿÿÿéíÿÿÿÿÿ ,ÿY±ÿÿb¸ÿÿi¾ÿÿqÆÿÿyÍÿÿ‚ÕÿÿŠÜÿÿ“äÿÿšëÿÿ¢òÿÿ¬ûÿÿ­øÿÿ‰Úÿÿ“ØÿÿÞõÿÿÿÿÿÿ€­Úû>|ž;{c,yÅÍœÛùÿ¥êÿÿtÏÿÿS¿ÿÿ^ËÿÿcÖÿÿQÐÿÿAÌÿÿ3Èÿÿ$Äÿÿ¿ÿÿ»ÿÿºÿÿºÿÿºÿÿºÿÿºÿÿ)ÿÿÿÿÿÿòúÿÿÿÿÿ!4ÿQ©ÿÿY°ÿÿa·ÿÿi¾ÿÿpÅÿÿxÍÿÿÕÿÿ‰Üÿÿ‘ãÿÿ™ëÿÿ¥ôÿÿèÿÿwÕÿÿ’ßÿÿãÿÿÿ·Øîÿ#IyH4o¦µ´îÿÿ•ÞÿÿaÃÿÿaÇÿÿrÙÿÿcÕÿÿQÐÿÿCÌÿÿ3Èÿÿ$ÄÿÿÀÿÿ»ÿÿºÿÿºÿÿºÿÿºÿÿ$2ÿÿÿÿÿÿûùÿÿÿÿÿ 5ÿI¢ÿÿP©ÿÿW¯ÿÿ_¶ÿÿi¾ÿÿsÇÿÿ|Îÿÿ…ÕÿÿŒÜÿÿ•ãÿÿ ìÿÿˆßÿÿrÓÿÿ‘åÿÿÚÿÿÿk¢ÎþU7Yo¹íÿÿªæÿÿqÈÿÿjÈÿÿƒÜÿÿvÚÿÿeÖÿÿXÒÿÿHÎÿÿ7Éÿÿ'Äÿÿ¿ÿÿ»ÿÿºÿÿºÿÿºÿÿ$2ÿÿÿÿÿÿúìÿÿÿÿÿ -ÿ?šÿÿG¡ÿÿQ¨ÿÿ`³ÿÿl¼ÿÿtÃÿÿ|ÊÿÿƒÑÿÿ‹×ÿÿ’ÞÿÿæÿÿŠÜÿÿuÑÿÿŠáÿÿÄÿÿÿw»Üÿ !‘(&Fl§Ëôÿÿ¹êÿÿ‚ÎÿÿÐÿÿ˜ãÿÿŒàÿÿ|ÛÿÿpØÿÿaÕÿÿSÐÿÿDÌÿÿ1ÇÿÿÁÿÿ»ÿÿºÿÿºÿÿ&ÿÿÿÿÿÿíßÿÿÿÿÿ%ÿ=–ÿÿR¤ÿÿ^¬ÿÿg´ÿÿmºÿÿtÀÿÿ|ÆÿÿƒÍÿÿŠÓÿÿÙÿÿšáÿÿ“ßÿÿzÑÿÿƒ×ÿÿª÷ÿÿ±ÿÿÿ4rŸè '£{-]·™½Þûëþÿÿ»æÿÿÑÿÿœÜÿÿ°êÿÿ åÿÿ‘âÿÿ†ÞÿÿxÚÿÿj×ÿÿ\ÓÿÿOÐÿÿAËÿÿ-ÆÿÿÀÿÿ¹ÿÿÿÿÿÿÿÿàÑÿÿÿÿÿÿT ÿÿ^¨ÿÿc¬ÿÿi±ÿÿo¸ÿÿv¾ÿÿ}ÃÿÿƒÉÿÿŠÏÿÿÕÿÿ—ÜÿÿžâÿÿˆÕÿÿ€Òÿÿ–äÿÿÄýÿÿÎ÷ÿÿr³ÝÿY™Éÿ¸Ûòÿÿÿÿÿàóÿÿ°Ýÿÿž×ÿÿºèÿÿÂïÿÿ²ëÿÿ¥çÿÿ™ãÿÿàÿÿ€ÝÿÿsÙÿÿeÖÿÿXÒÿÿLÏÿÿAÌÿÿ$Ãþÿ ÿÿÿÿÿÿÓ³ÿÿÿÿÿÿWœöÿ`¦ÿÿf¬ÿÿk±ÿÿq·ÿÿx¼ÿÿ~Âÿÿ„Çÿÿ‹ÍÿÿÓÿÿ—ØÿÿŸÞÿÿ›ÞÿÿƒÒÿÿ–ØÿÿºäÿÿãúÿÿßÿÿÿÓÿÿÿæÿÿÿØóÿÿ¾áÿÿ´Þÿÿ¼ãÿÿÚõÿÿÐóÿÿÃïÿÿ·ëÿÿ¬éÿÿ æÿÿ”âÿÿˆßÿÿ{ÜÿÿoØÿÿcÕÿÿXÒÿÿE¹äÿÿÿÿÿÿÿ¸ŠÿÿÿÿÿÿO‡Öÿe§ÿÿj¬ÿÿo±ÿÿu¶ÿÿ{»ÿÿ€Àÿÿ‡ÅÿÿŒËÿÿ’Ðÿÿ˜ÕÿÿžÚÿÿ¢ßÿÿ«âÿÿ²ßÿÿ®Þÿÿ¶âÿÿ²çÿÿ¨êÿÿ­çÿÿ¯âÿÿ·âÿÿÏëÿÿòúÿÿëúÿÿÞöÿÿÓóÿÿÇðÿÿ¼íÿÿ±êÿÿ¦çÿÿ›äÿÿáÿÿ„ÝÿÿxÛÿÿoØÿÿJ¡Áÿÿÿÿÿÿÿ`ÿÿÿÿÿÿCl¨ÿk©ÿÿo­ÿÿt±ÿÿz·ÿÿ»ÿÿ„ÀÿÿŠÅÿÿÉÿÿ”Îÿÿ™Óÿÿ›Öÿÿ®áÿÿàõÿÿÖðÿÿÃèÿÿ½äÿÿ­âÿÿžâÿÿ§æÿÿ¶êÿÿÍòÿÿïýÿÿþÿÿÿöýÿÿëúÿÿà÷ÿÿÕôÿÿÌòÿÿÁïÿÿ·ìÿÿ¬éÿÿ¢æÿÿ—ãÿÿŒáÿÿƒÞÿÿE~”ÿÿÿÿÿÿÿf4ÿÿÿÿÿÿ2Mvÿq¬ÿÿu°ÿÿz³ÿÿ¸ÿÿ„¼ÿÿˆÀÿÿÅÿÿ’Éÿÿ—ÍÿÿšÑÿÿ§ÙÿÿÕîÿÿãõÿÿåöÿÿå÷ÿÿæ÷ÿÿÒôÿÿ¼ñÿÿÆùÿÿÐþÿÿßÿÿÿèÿÿÿóÿÿÿýÿÿÿ÷þÿÿìûÿÿâøÿÿÚöÿÿÐóÿÿÆðÿÿ¼îÿÿ²ëÿÿ©èÿÿŸåÿÿ–ãÿÿ-ITÿÿÿÿÿÿÿ;îÿÿÿÿÿ!3ÿy¯ÿÿ}²ÿÿ¶ÿÿ…¹ÿÿ‰½ÿÿÁÿÿ’Æÿÿ—Êÿÿ™Ìÿÿ ÒÿÿÐêÿÿãóÿÿâóÿÿãõÿÿåöÿÿêøÿÿÚöÿÿÄóÿÿËøÿÿÏüÿÿÔÿÿÿÝÿÿÿéÿÿÿôÿÿÿüÿÿÿøýÿÿîúÿÿæøÿÿÝöÿÿÔóÿÿËñÿÿÂïÿÿ¹ìÿÿ°êÿÿ§æþÿ ÿÿÿÿÿÿô©ÿÿÿÿÿÿu¡èÿ„µÿÿˆ¹ÿÿŒ¼ÿÿÀÿÿ”Ãÿÿ˜Çÿÿ›Êÿÿ ÎÿÿÉäÿÿãñÿÿâñÿÿãóÿÿäôÿÿåõÿÿé÷ÿÿÚóÿÿÄïÿÿÊôÿÿÏøÿÿÒüÿÿ×ÿÿÿáÿÿÿëÿÿÿöÿÿÿýÿÿÿøýÿÿðûÿÿèùÿÿà÷ÿÿØõÿÿÏóÿÿÇðÿÿ¿îÿÿ‹³Âÿÿÿÿÿÿÿ³aÿÿÿÿÿÿJcÿŒ¹ÿÿ¼ÿÿ“¿ÿÿ–ÃÿÿšÅÿÿœÈÿÿÊÿÿÁÞÿÿäñÿÿâðÿÿãñÿÿäóÿÿåôÿÿçõÿÿê÷ÿÿÝóÿÿÆíÿÿÊòÿÿÏõÿÿÓøÿÿÖüÿÿÚÿÿÿãÿÿÿìÿÿÿöÿÿÿýÿÿÿúþÿÿòüÿÿêùÿÿãøÿÿÛõÿÿÔôÿÿÌòÿÿJ[aÿÿÿÿÿÿÿkøÿÿÿÿÿ*ÿ”¼þÿ˜Àÿÿ›ÃÿÿŸÇÿÿ¡Éÿÿ¤ÌÿÿÇàÿÿáïÿÿãðÿÿãðÿÿäñÿÿåóÿÿæôÿÿèõÿÿë÷ÿÿÞóÿÿÈìÿÿÌðÿÿÐóÿÿÔöÿÿ×ùÿÿÚüÿÿßÿÿÿæÿÿÿîÿÿÿ÷ÿÿÿýÿÿÿúþÿÿóüÿÿìúÿÿåøÿÿßöÿÿÊäïÿ ÿÿÿÿÿÿû¡ÿÿÿÿÿÿh€ªÿ¡Æÿÿ¤Èÿÿ§Êÿÿ¨ÌÿÿÂÛÿÿåðÿÿäðÿÿäðÿÿåñÿÿçòÿÿçóÿÿèôÿÿéõÿÿì÷ÿÿáóÿÿÌëÿÿÏîÿÿÓñÿÿÕôÿÿØ÷ÿÿÜúÿÿßüÿÿãÿÿÿêÿÿÿðÿÿÿ÷ÿÿÿýÿÿÿûÿÿÿôýÿÿïûÿÿéùÿÿjswÿÿÿÿÿÿÿ®6ÿÿÿÿÿÿ 'ÿ¥Äøÿ®Íÿÿ­ÎÿÿÅÜÿÿæðÿÿæðÿÿæñÿÿçòÿÿèòÿÿéôÿÿêôÿÿëõÿÿìõÿÿî÷ÿÿåóÿÿÐëÿÿÓîÿÿÖñÿÿØôÿÿÛõÿÿßøÿÿáúÿÿãýÿÿæÿÿÿìÿÿÿòÿÿÿùÿÿÿýÿÿÿûþÿÿöýÿÿÖßãÿÿÿÿÿÿÿÿEÇÿÿÿÿÿÿ\fvÿµÑÿÿÅÜÿÿåïÿÿêòÿÿèòÿÿéòÿÿêóÿÿêôÿÿìôÿÿìõÿÿíöÿÿî÷ÿÿïøÿÿèôÿÿÕíÿÿØïÿÿÚñÿÿÝóÿÿÞõÿÿá÷ÿÿãùÿÿåûÿÿèýÿÿêÿÿÿïÿÿÿôÿÿÿùÿÿÿþÿÿÿúüýÿCCCÿÿÿÿÿÿÿÕ<ÿÿÿÿÿÿÿ”Ÿ¯ÿæïÿÿíôÿÿìóÿÿìôÿÿíôÿÿîõÿÿîõÿÿîõÿÿïöÿÿð÷ÿÿð÷ÿÿòøÿÿìöÿÿÜïÿÿÝðÿÿßòÿÿáôÿÿãõÿÿä÷ÿÿæøÿÿéúÿÿëüÿÿìýÿÿîÿÿÿòÿÿÿöÿÿÿúÿÿÿƒƒƒÿÿÿÿÿÿÿÿF¬ÿÿÿÿÿÿ ÿ¼¿Ãÿïõÿÿïõÿÿðöÿÿñ÷ÿÿñ÷ÿÿñ÷ÿÿòøÿÿóøÿÿóùÿÿôùÿÿõùÿÿðøÿÿâñÿÿäóÿÿåôÿÿæõÿÿçöÿÿé÷ÿÿêùÿÿìúÿÿîûÿÿïüÿÿðþÿÿñÿÿÿöÿÿÿ›››ÿÿÿÿÿÿÿÿ³"õÿÿÿÿÿÿ ÿ···ÿ÷úÿÿôøÿÿôøÿÿõùÿÿõùÿÿöùÿÿöúÿÿöúÿÿöúÿÿ÷ûÿÿôúÿÿêõÿÿëõÿÿìöÿÿì÷ÿÿî÷ÿÿîùÿÿïúÿÿðûÿÿòûÿÿóüÿÿóýÿÿüÿÿÿ———ÿÿÿÿÿÿÿÿô%[ÿÿÿÿÿÿÿÿƒƒƒÿýýýÿûüÿÿùûÿÿùüÿÿùüÿÿúüÿÿúüÿÿúýÿÿúýÿÿùûÿÿóùÿÿóùÿÿôúÿÿôúÿÿõûÿÿõûÿÿõûÿÿöüÿÿ÷ýÿÿüÿÿÿôôôÿVY\ÿÿÿÿÿÿÿÿÿX•ÿÿÿÿÿÿÿÿ345ÿÌÌÌÿÿÿÿÿÿÿÿÿþÿÿÿþÿÿÿþÿÿÿþÿÿÿþÿÿÿþÿÿÿûýÿÿüýÿÿüþÿÿüþÿÿüþÿÿüþÿÿþÿÿÿÿÿÿÿÿÿÿÿª«¬ÿ"ÿÿÿÿÿÿÿÿÿ·ÿÿÿÿÿÿÿÿÿ19Cÿ´¶·ÿüüüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿöööÿ— ÿ%1ÿÿÿÿÿÿÿÿÿÿ««ÿÿÿÿÿÿÿÿÿÿ þ=GSÿvŽÿ¥®¹ÿÑ×Þÿåêîÿíò÷ÿßãéÿÃÌÖÿŸª·ÿgu„ÿ5AOÿ þÿÿÿÿÿÿÿÿÿÿ ˜ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþŠPêÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿäD£ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿû›'¤üÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿü¡#rÈÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÉqP±ÐßïûðàÑ´ƒQÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüÿÿÿÿÿÿÿðÿÿÿÿÿÿÀÿÿÿàÿ€?ÿÿþ~?ÿÿðÿÿÿàÿÿÿ€ÿÿÿÿÿþ?ÿÿø?ÿÿøÿÿðÿÿàÿÿÀÿÿÀÿÿ€ÿÿ€ÿÿÿÿÿÿÿþÿþÿþÿþüüüüüü€üÀü€üüüüþÿþÿþÿþÿÿÿÿÿÿÿÿ€ÿÿ€ÿÿÀÿÿÀÿÿàÿÿðÿÿðÿÿø?ÿÿüÿÿþÿÿÿÿ€ÿÿÿÿÀÿÿÿÿðÿÿÿÿþÿÿÿÿÿÿÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿqpxtool-0.7.1_002/gui/qpxtool.pri0000644000175000001440000000067611334211601016065 0ustar shultzusersisEmpty(QMAKE_LRELEASE) { win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease } updateqm.input = TRANSLATIONS updateqm.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm updateqm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += updateqm PRE_TARGETDEPS += compiler_updateqm_make_all qpxtool-0.7.1_002/gui/qpxtool.pro0000644000175000001440000000561311336331412016074 0ustar shultzusers###################################################################### # Automatically generated by qmake (2.01a) ?? ????. 9 10:47:57 2010 ###################################################################### MOC_DIR=moc OBJECTS_DIR=obj QT+=network CONFIG+=thread INCLUDEPATH+=../lib/include TEMPLATE = app TARGET = qpxtool DEPENDPATH += . include locale src INCLUDEPATH += . include # Input HEADERS += include/about.h \ include/abstractpreview.h \ include/colorlabel.h \ include/defs.h \ include/device.h \ include/devsettings.h \ include/devsettings_widgets.h \ include/dpi_metrics.h \ include/errc_detailed.h \ include/graphtab.h \ include/hostedit_dialog.h \ include/image_label.h \ include/images_list.h \ include/mainwidget.h \ include/mainwindow.h \ include/mcapwidget.h \ include/mwatcher.h \ include/pref_colors.h \ include/pref_common.h \ include/pref_devices.h \ include/preferences.h \ include/printpreview.h \ include/progresswidget.h \ include/qpxgraph.h \ include/qpxiodevice.h \ include/qpxsettings.h \ include/splitbutton.h \ include/tab_devinfo.h \ include/tab_errc.h \ include/tab_fete.h \ include/tab_jb.h \ include/tab_mediainfo.h \ include/tab_ta.h \ include/tab_transfer.h \ include/tattoowidget.h \ include/testdialog.h \ include/textslider.h \ include/version.h SOURCES += src/about.cpp \ src/abstractpreview.cpp \ src/colorlabel.cpp \ src/device.cpp \ src/devsettings.cpp \ src/devsettings_widgets.cpp \ src/errc_detailed.cpp \ src/graphtab.cpp \ src/hostedit_dialog.cpp \ src/image_label.cpp \ src/images_list.cpp \ src/main.cpp \ src/mainwidget.cpp \ src/mainwindow.cpp \ src/mcapwidget.cpp \ src/mwatcher.cpp \ src/pref_colors.cpp \ src/pref_common.cpp \ src/pref_devices.cpp \ src/preferences.cpp \ src/printpreview.cpp \ src/progresswidget.cpp \ src/qpxgraph.cpp \ src/qpxiodevice.cpp \ src/qpxsettings.cpp \ src/splitbutton.cpp \ src/tab_devinfo.cpp \ src/tab_errc.cpp \ src/tab_fete.cpp \ src/tab_jb.cpp \ src/tab_mediainfo.cpp \ src/tab_ta.cpp \ src/tab_transfer.cpp \ src/tattoowidget.cpp \ src/testdialog.cpp \ src/textslider.cpp RESOURCES += qpxtool.qrc TRANSLATIONS += locale/qpxtool.ru_RU.ts \ locale/qpxtool.de_DE.ts qpxtool-0.7.1_002/gui/qpxtool.qrc0000644000175000001440000000321611336774251016072 0ustar shultzusers images/q.png images/x.png images/ok.png images/add.png images/edit.png images/edit-redo.png images/edit-undo.png images/edit-clear.png images/logo.png images/splash.png images/info.png images/pdf.png images/html.png images/save.png images/directory.png images/fileopen.png images/printer.png images/page-setup.png images/zoom-in.png images/zoom-out.png images/zoom-orig.png images/disc.png images/device.png images/cdwriter.png images/colors.png images/loej.png images/lock.png images/test_rt.png images/test_wt.png images/test_errc.png images/test_jb.png images/test_ft.png images/test_ta.png images/settings2.png images/varirec.png images/gigarec.png images/password.png images/sound.png images/eraser.png images/disc-eraser.png images/tattoo.png images/scan.png images/stop.png images/refresh.png images/refresh-info.png images/refresh-media.png images/settings.png images/exit.png ../COPYING about.html qpxtool-0.7.1_002/gui/about.html0000644000175000001440000000151511334746334015654 0ustar shultzusers

QPxTool CD/DVD quality scanning utility
Copyright (C) 2005-2010 Gennady "ShultZ" Kozlov
QPxTool comes under GPL V2 with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it under certain conditions
See http://qpxtool.sourceforge.net/ for new versions

QPxTool team:
Gennady "ShultZ" Kozlov, qpxtool@mail.ru, developer
Thomas Maguin webmaster

Greetings
Mike Frysinger, Makefile-based build
Artur Kalimullin (Kaliy), kalimullin@gmail.com, assistance on LiteOn Cx test implementation
Michael Masliansky, assistance on BenQ tests implementation
Pavel Volkovitskiy, assistance on Nec Cx and LiteOn Pi tests implementation

qpxtool-0.7.1_002/gui/Session.vim0000644000175000001440000010330411352127575016013 0ustar shultzuserslet SessionLoad = 1 if &cp | set nocp | endif let s:cpo_save=&cpo set cpo&vim imap :Ex i imap :TlistToggle imap :wa :make && ./run.sh imap :wa :make i imap :tabn i imap :tabp i imap :copen imap :w i vmap  "+yi vmap  :call OpenCloseFold() nmap  :call OpenCloseFold() map  :qa map  :wa :mks! nmap  dd nmap  nmap ; :%s/\<=expand("") \>/ vmap <  >gv map Q gq nmap gx NetrwBrowseX nmap :tabp nmap :tabn nmap :wa :make nmap :wa :make && ./run.sh nmap :TlistToggle nmap :Ex nnoremap NetrwBrowseX :call netrw#NetrwBrowseX(expand(""),0) vmap :Ex i omap :Ex vmap :TlistToggle omap :TlistToggle vmap :wa :make && ./run.sh omap :wa :make && ./run.sh vmap :wa :make i omap :wa :make vmap :tabn i omap :tabn vmap :tabp i omap :tabp vmap :copen nmap :copen vmap :w i nmap :w map imap  yypi imap  :call OpenCloseFold() imap  =InsertTabWrapper() inoremap  u imap  "+gPi inoremap  omni#cpp#maycomplete#Complete() imap  ddi inoremap . omni#cpp#maycomplete#Dot() inoremap : omni#cpp#maycomplete#Scope() inoremap > omni#cpp#maycomplete#Arrow() imap >Ins> i imap [ [] imap { { }O let &cpo=s:cpo_save unlet s:cpo_save set autoindent set backspace=indent,eol,start set backup set complete=.,k,b,t set completeopt=longest,menuone set fileencodings=ucs-bom,utf-8,default,latin1 set formatoptions=tqcr set helplang=ru set hidden set incsearch set laststatus=2 set matchpairs=(:),{:} set mouse=a set mousemodel=popup set omnifunc=omni#cpp#complete#Main set ruler set scrolljump=7 set scrolloff=7 set shiftwidth=4 set showcmd set smartindent set softtabstop=4 set statusline=%<%f%h%m%r\ %b\ %{&encoding}\ 0x\ \ %l,%c%V\ %P set tabstop=4 set whichwrap=b,s,<,>,[,] set wildcharm= set wildmenu let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 let v:this_session=expand(":p") silent only cd ~/projects/qpxtool-0.7.1/gui if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' let s:wipebuf = bufnr('%') endif set shortmess=aoO badd +182 src/tab_errc.cpp badd +26 include/tab_errc.h badd +39 include/graphtab.h badd +35 src/mainwidget.cpp badd +55 include/mainwidget.h badd +31 src/colorlabel.cpp badd +19 include/colorlabel.h badd +16 include/qpxsettings.h badd +49 src/tab_jb.cpp badd +47 include/tab_jb.h badd +33 src/tab_fete.cpp badd +47 include/tab_fete.h badd +52 src/graphtab.cpp badd +37 include/tab_transfer.h badd +130 src/tab_transfer.cpp badd +286 src/pref_colors.cpp badd +41 src/tab_ta.cpp badd +164 src/qpxgraph.cpp badd +69 include/tab_ta.h badd +49 include/qpxgraph.h badd +63 src/preferences.cpp badd +43 include/pref_devices.h badd +22 src/pref_devices.cpp badd +53 src/pref_common.cpp badd +39 include/pref_common.h badd +190 src/errc_detailed.cpp badd +55 src/qpxsettings.cpp badd +374 src/mainwindow.cpp badd +172 include/mainwindow.h badd +364 include/device.h badd +734 src/device.cpp badd +33 include/errc_detailed.h badd +272 src/testdialog.cpp badd +1110 src/abstractpreview.cpp badd +227 src/printpreview.cpp badd +856 ../lib/qpxtransport/qpx_mmc.cpp badd +155 ../lib/qpxtransport/include/qpx_mmc.h badd +43 src/qpxiodevice.cpp badd +310 ../lib/qpxtransport/include/qpx_mmc_defs.h badd +39 include/testdialog.h badd +43 src/tab_devinfo.cpp badd +41 src/tab_mediainfo.cpp badd +22 include/mwatcher.h badd +100 src/mwatcher.cpp badd +117 /opt/qt4/include/QtCore/qthread.h badd +62 include/preferences.h badd +881 src/devsettings_widgets.cpp badd +53 ../console/qscan/qscan.cpp badd +38 ../lib/qpxscan/include/qpx_scan.h badd +71 ../lib/qpxscan/include/qpx_scan_plugin_api.h badd +70 src/progresswidget.cpp badd +33 include/progresswidget.h badd +284 src/textslider.cpp badd +49 src/image_label.cpp badd +59 include/image_label.h badd +75 src/images_list.cpp badd +38 include/images_list.h badd +53 src/devsettings.cpp badd +31 include/devsettings_widgets.h args src/tab_errc.cpp edit src/mainwindow.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 1 normal zo 82 normal zo 93 normal zo 97 normal zo 93 normal zo 82 normal zo 144 normal zo 144 normal zo 202 normal zo 231 normal zo 268 normal zo 290 normal zo 312 normal zo 313 normal zo 312 normal zc 327 normal zc 332 normal zc 338 normal zo 340 normal zo 338 normal zo 349 normal zo 355 normal zo 359 normal zo 349 normal zo 378 normal zo 395 normal zo 406 normal zo 413 normal zo 418 normal zo 413 normal zo 428 normal zo 433 normal zo 441 normal zo 448 normal zo 449 normal zo 448 normal zo 481 normal zo 489 normal zo 506 normal zo 529 normal zo 534 normal zo 529 normal zo 433 normal zo 546 normal zo 563 normal zo 576 normal zo 546 normal zo 597 normal zo 612 normal zo 624 normal zo 637 normal zo 612 normal zo 597 normal zo 660 normal zo 669 normal zo 675 normal zo 680 normal zo 689 normal zo 675 normal zo 669 normal zo 660 normal zo 712 normal zo 734 normal zo 735 normal zo 737 normal zo 735 normal zo 744 normal zo 734 normal zo 751 normal zo 712 normal zo 768 normal zo 775 normal zo 775 normal zo 792 normal zo 792 normal zo 768 normal zo 852 normal zo 858 normal zo 863 normal zo 880 normal zo 852 normal zo 933 normal zo 933 normal zo 991 normal zo 1003 normal zo 1010 normal zo 1018 normal zo 1024 normal zo 1025 normal zo 1025 normal zo 1024 normal zo 1018 normal zo 1046 normal zo 1053 normal zo 1061 normal zo 1063 normal zo 1063 normal zo 1061 normal zo 991 normal zo 1085 normal zo 1137 normal zo 1144 normal zo 1152 normal zo 1159 normal zo 1160 normal zo 1160 normal zo 1159 normal zo 1152 normal zo 1181 normal zo 1188 normal zo 1196 normal zo 1198 normal zo 1198 normal zo 1196 normal zo 1085 normal zo 1236 normal zo 1305 normal zo 1337 normal zo 1368 normal zo 1383 normal zo 1384 normal zo 1384 normal zo 1383 normal zo 1418 normal zo 1419 normal zo 1419 normal zo 1418 normal zo 1368 normal zo 1440 normal zo 1462 normal zo 1479 normal zo 1491 normal zo 1491 normal zo 1479 normal zo 1236 normal zo 1524 normal zo 1524 normal zo 1568 normal zo 1568 normal zo let s:l = 449 - ((16 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 449 normal! 028l tabedit include/mainwindow.h set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 1 normal zo 45 normal zo 59 normal zo let s:l = 172 - ((27 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 172 normal! 0 tabedit src/mainwidget.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 24 normal zo 168 normal zo 168 normal zo let s:l = 35 - ((34 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 35 normal! 0 tabedit include/mainwidget.h set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 40 normal zo let s:l = 55 - ((20 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 55 normal! 0 tabedit src/device.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 1 normal zo 80 normal zo 90 normal zo 110 normal zo 112 normal zo 110 normal zo 120 normal zo 125 normal zo 133 normal zo 200 normal zo 133 normal zo 217 normal zo 222 normal zo 227 normal zo 231 normal zo 217 normal zo 248 normal zo 253 normal zo 289 normal zo 253 normal zo 297 normal zo 301 normal zo 310 normal zo 297 normal zo 340 normal zo 344 normal zo 352 normal zo 358 normal zo 362 normal zo 370 normal zo 384 normal zo 389 normal zo 402 normal zo 415 normal zo 384 normal zo 436 normal zo 465 normal zo 473 normal zo 370 normal zo 340 normal zo 507 normal zo 518 normal zo 546 normal zo 507 normal zo 569 normal zo 578 normal zo 591 normal zo 600 normal zo 608 normal zo 615 normal zo 623 normal zo 630 normal zo 637 normal zo 644 normal zo 651 normal zo 656 normal zo 663 normal zo 669 normal zo 671 normal zo 681 normal zo 669 normal zo 729 normal zo 663 normal zo 651 normal zo 740 normal zo 745 normal zo 751 normal zo 756 normal zo 760 normal zo 762 normal zo 769 normal zo 771 normal zo 769 normal zo 779 normal zo 787 normal zo 794 normal zo 798 normal zo 794 normal zo 811 normal zo 814 normal zo 811 normal zo 851 normal zo 760 normal zo 879 normal zo 756 normal zo 740 normal zo 890 normal zo 898 normal zo 901 normal zo 898 normal zo 920 normal zo 927 normal zo 966 normal zo 981 normal zo 989 normal zo 992 normal zo 996 normal zo 1006 normal zo 1024 normal zo 1034 normal zo 1061 normal zo 1006 normal zo 920 normal zo 1098 normal zo 1104 normal zo 1110 normal zo 1116 normal zo 1119 normal zo 1116 normal zo 1098 normal zo 1151 normal zo 1161 normal zo 1174 normal zo 1175 normal zo 1178 normal zo 1175 normal zo 1190 normal zo 1174 normal zo 1161 normal zo 1217 normal zo 1221 normal zo 1225 normal zo 1227 normal zo 1236 normal zo 1256 normal zo 1225 normal zo 1221 normal zo 1288 normal zo 1298 normal zo 1319 normal zo 1325 normal zo 1326 normal zo 1331 normal zo 1326 normal zo 1361 normal zo 1369 normal zo 1377 normal zo 1398 normal zo 1325 normal zo 1319 normal zo 1423 normal zo 1425 normal zo 1423 normal zo 1453 normal zo 1217 normal zo 1151 normal zo 1466 normal zo 1473 normal zo 1475 normal zo 1476 normal zo 1481 normal zo 1486 normal zo 1491 normal zo 1496 normal zo 1515 normal zo 1521 normal zo 1532 normal zo 1542 normal zo 1548 normal zo 1558 normal zo 1564 normal zo 1570 normal zo 1578 normal zo 1584 normal zo 1589 normal zo 1594 normal zo 1599 normal zo 1607 normal zo 1617 normal zo 1622 normal zo 1633 normal zo 1475 normal zo 1473 normal zo 1466 normal zo 1647 normal zo 1650 normal zo 1647 normal zo 1681 normal zo 1695 normal zo 1721 normal zo 1750 normal zo 1681 normal zo 1762 normal zo 1770 normal zo 1776 normal zo 1782 normal zo 1791 normal zo 1796 normal zo 1801 normal zo 1806 normal zo 1815 normal zo 1801 normal zo 1796 normal zo 1831 normal zo 1835 normal zo 1837 normal zo 1838 normal zo 1846 normal zo 1837 normal zo 1835 normal zo 1831 normal zo 1863 normal zo 1868 normal zo 1863 normal zo 1916 normal zo 1921 normal zo 1928 normal zo 1921 normal zo 1916 normal zo 1950 normal zo 1955 normal zo 1950 normal zo 1975 normal zo 1979 normal zo 1992 normal zo 1998 normal zo 1992 normal zo 1975 normal zo 1791 normal zo 1782 normal zo 1762 normal zo 2026 normal zo 2044 normal zo 2077 normal zo 2157 normal zo 2164 normal zo 2157 normal zo 2173 normal zo 2180 normal zo 2173 normal zo 2189 normal zo 2197 normal zo 2189 normal zo 2216 normal zo 2223 normal zo 2216 normal zo 2236 normal zo 2243 normal zo 2236 normal zo 2256 normal zo 2261 normal zo 2267 normal zo 2261 normal zo 2256 normal zo 2026 normal zo 2291 normal zo 2318 normal zo 2319 normal zo 2322 normal zo 2326 normal zo 2327 normal zo 2329 normal zo 2331 normal zo 2339 normal zo 2347 normal zo 2355 normal zo 2347 normal zo 2365 normal zo 2371 normal zo 2365 normal zo 2387 normal zo 2400 normal zo 2329 normal zo 2412 normal zo 2446 normal zo 2478 normal zo 2327 normal zo 2326 normal zo 2516 normal zo 2525 normal zo 2516 normal zo 2319 normal zo 2318 normal zo 2291 normal zo 2557 normal zo 2572 normal zo 2582 normal zo 2589 normal zo 2599 normal zo 2605 normal zo 2614 normal zo 2623 normal zo let s:l = 734 - ((22 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 734 normal! 01l tabedit include/device.h set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 1 normal zo 249 normal zo 270 normal zo 249 normal zo 320 normal zo 358 normal zo 365 normal zo 368 normal zo 375 normal zo 482 normal zo 365 normal zo 540 normal zo let s:l = 343 - ((28 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 343 normal! 0 tabedit src/qpxgraph.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 let s:l = 164 - ((131 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 164 normal! 0 tabedit src/devsettings_widgets.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 449 normal zo 449 normal zo 753 normal zo 835 normal zo 842 normal zo 853 normal zo 858 normal zo 868 normal zo 873 normal zo 874 normal zo 873 normal zo 882 normal zo 842 normal zo 895 normal zo 896 normal zo 895 normal zo 902 normal zo 904 normal zo 912 normal zo 917 normal zo 926 normal zo 931 normal zo 940 normal zo 957 normal zo 970 normal zo 981 normal zo 970 normal zo 993 normal zo 1024 normal zo 1040 normal zo 1024 normal zo 1052 normal zo 1096 normal zo 1103 normal zo 1096 normal zo 1117 normal zo 1159 normal zo 1164 normal zo 1159 normal zo 1179 normal zo 1191 normal zo 1202 normal zo 1207 normal zo 1208 normal zo 1207 normal zo 1222 normal zo 1228 normal zo 1179 normal zo 902 normal zo 912 normal zo 917 normal zo 926 normal zo 931 normal zo 940 normal zo 957 normal zo 970 normal zo 974 normal zo 991 normal zo 1003 normal zo 1034 normal zo 1050 normal zo 1034 normal zo 1062 normal zo 1106 normal zo 1113 normal zo 1106 normal zo 1127 normal zo 1169 normal zo 1174 normal zo 1169 normal zo 1189 normal zo 1201 normal zo 1212 normal zo 1217 normal zo 1218 normal zo 1217 normal zo 1232 normal zo 1238 normal zo 1189 normal zo 970 normal zo 1003 normal zo 1034 normal zo 1050 normal zo 1034 normal zo 1062 normal zo 1106 normal zo 1113 normal zo 1106 normal zo 1127 normal zo 1169 normal zo 1174 normal zo 1169 normal zo 1189 normal zo 1201 normal zo 1212 normal zo 1217 normal zo 1218 normal zo 1217 normal zo 1232 normal zo 1238 normal zo 1189 normal zo let s:l = 987 - ((7 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 987 normal! 0 tabedit include/devsettings_widgets.h set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 267 normal zo let s:l = 33 - ((7 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 33 normal! 0 tabnext 8 if exists('s:wipebuf') silent exe 'bwipe ' . s:wipebuf endif unlet! s:wipebuf set winheight=1 winwidth=20 shortmess=filnxtToO let s:sx = expand(":p:r")."x.vim" if file_readable(s:sx) exe "source " . s:sx endif let &so = s:so_save | let &siso = s:siso_save doautoall SessionLoadPost unlet SessionLoad " vim: set ft=vim : qpxtool-0.7.1_002/gui/images/0000755000175000001440000000000011345714075015116 5ustar shultzusersqpxtool-0.7.1_002/gui/images/edit.png0000644000175000001440000000520411142047540016541 0ustar shultzusers‰PNG  IHDR szzôbKGDùC» pHYsHHFÉk> vpAg ‡úœ ­IDATXí–YlwÇ?sïìx×k¯ãûŠSÇq⸉’Æubh¡”£$E< A…o< ÁOåWžŠZ„§J[Ñ´¥E’Þw’Öq|ÄÆÇÆ‰¯õÎÌîÜÿáaÝ4-mÚi¤Íæûù]ÿßOâÿ°$IF7-µ±¥³¥¥wï@ÇÐm‡vµ¶O<ð£_ØÛ[Þ;UÿAE3$«±%×ÔÑßÙÖ·ooÿȱƒíýûÚú‡Œ|Kwª™M¡³µúâ#üÕÞÞšúŸ$YA3sf¾} µ¹{ïžÖÝ##ƒ‡nmïß7\(¶õg-³¨kŠH‰€8(9[ìè¹ýè¿.½ñ1$E75³ØÛÜÐ1Ø_èÙ_ì-vïiîØcårmC1uE’T  b"$HÓús”€PºG&&ÔGü]'éÛƒ· v9rässsÏ_¸pþʼnæ#'G?ÿå|ÇÞƒùÎÁ½ ÅÎæœšG’d Ð$H(’IU]¼ Í&´ç ²ŽûçCí-¥RiÀ2³´µ¶Þ×Û×ûÓ¦¦Â_®®®~s %Û9üÙ¶;¿ó“–  §Ccf7Á¹n¡H낺ì² ½¡~í² SE¯­g`ttt©T:#IÃû÷úÊɯÞ7;;¿ô‹çà |'îâë ‘JÆ0š2`é dTpÈÐÖ=yèi„®´d¡A¯[/I)iú®xbšfþĉãO>ù䙿B“q×]Ÿþ~WWמÒJé\y«|:Cï:€mn6t6Ê4uµÛ~=™Š&Lt×Å:rÐdBVYN‘x;$aœâû>¶m“$ hš†,ËLLL/4´ƒ~âÀÈÈÉ«W¯†''O¹®;]õªñu€¨re帹°ü…Ñ®ö. Z-ÈuW+ ¤©@¤)Q$×uð}ŸZ­F>ŸCªªA@¹\Æu]ÚÚÚ=zôèèñÇ¿'Ëróå¹ËÏM_š>í¾Çñ U¹Û·ªÓ Ÿé›¸íí¤M’»æ†¶]&Ž#â8¢©© !Š¢ÐÚÚJ’$„a€,ËA€ã8hš†ªª455µÝûõ{˜Ífï^½²êœ?wî¶mÏù/®—áîžBÓ·¾và›G†£q?8Î6ŽSÁ÷kXVa ª ¹\ž8މãE‘"%Š¢ëÖ+ŠB±XÄqÒ4EU5‚ 0zzzO^½ºªNOO?>yþo5ß«&IR?níÚûàÏ>õóёֻ®m»Zy€Œ¦é;?ð ‚ß!Èår¤©RdY"Ž|ß#MSdY&ŸÏÓÐ# C’D0??/9Ž­–J¥µóoœûCµV[ ‚àzºªžF¢S–RMe‹8ÜF’ólo—o°j²,†>¾ï“$1qcYªªÏ7¢ª*åò&µZjÕ%Masc“¥ÅE*• ÓS—þ¾¼²òLÍ«ù"ïë'.ûÚÝw*²P=ö±º CEQ‰¢Ï«!„@Ó ÃØq¯Š¢ÈxžG††,+†ad$™™Ùi¶+ÛT«5®][{âÍ ç«yž¸±X•$IÄêZ¸2´»ñÐÁ†=vЂ‘ÛGúhšN6›%IEA’$|ßGUt]'›µHAµZ%|dY!MÁ¶+”JË”Ëeº:»éèìÚ8ýøc§Â0Ln!e£l—~ñûé®®»J¼’DP.oŠ¢2†abY9Ò\×¥\Þ& c„¨ï×uMÓ"åÂ…sxžHôöîf||b´§§·ó?:+Ôk|}+,µ2½·îo>BöšžÅu+¸®‹®ëx^mǺÃÈ츼]7p]‡8®C\ž»ÌÃÿ™……%޽}ûÐÒ²+ûê«/?÷æ›.½Ç;Gq­êüöÑ…‡.M/̤Ñ)²¬ÒØØ„a˜†I†8ŽM¥RÁ÷TUÇ02hšN¡PÄ4M*›§ž~°¬"}½äry4M1Ž?ñ¾x»!Uœh=Ž…566öɆÂ^%¼2ôB ëõÒ„zʲŒïT«.Q!I2gÎü³gÿÁúºÍɯÞˡÇ0ŒL]LÑxôÑS§<¯ü‡‚О:»ø§³Ï¾þº$¢¨444b𠆮ëR­ºø~½JL3‹a˜€Äv¹Ì«¯¼Lµê188ÂþýÃèºAµZ%Ž¡¯o`hhhxð}CPÏ…”µÊÂãO¿üH=[%\×&Šbt=ƒ¢(d2&ÙlËÊQ©T°í ¾ïcYžá9JW–Bcôàü †çùø~@’òù|óØØñ±i*.N]|¾¼µµmšqœ¦UÕ®ƒèzÃ0Éå)ZP•ÕÕ/½ôÕªÏáÃcŒ§¯ïLÓ"—+ I€4661a†ú«WK󥕥%]«—•¢h¨ªŽi6àû¶½ë:Ôj5’$AÓ2<ó̶¶6ÈšÍÜsÏ=ìÙ3„eå$I’IS‰$FwuõtÜÀqì­Ùé‹3¦¦##ẛ›×ð¼šfP,¶“Ï7ÓÞÞC±ØJ¥bsîÜ+T«!ãÇï`hhªª!D}ŠºqPéììì=|ø¶[¯÷‚÷HÓÔ›œ|:Š£%À¼±”›¬ð¼Zåµ7^y«¿»ÿÅ™©ÕkkSj_ËÂ`ä-¥¯½µ2{úŸ«x¢àÿîÔÅ©7ÖÖ~-Ëòʇ ¾wI7{×¶«m\UÔÝk›ëËÍy¥ñÇ÷uü`vYÌ<þlõ7ÛN|þ®#=ßÞ´îÉÙÒ/k^õ_¶ë$Yù#Üè¡8cd´]͹ݶn¸µê–™É(íÅü-~("Û­-;U'JÓeüGx×’åú )##YYK"¶ã$‰øØÆðoðÌb”â%tEXtcreate-date2009-02-03T17:01:51+03:00‚ºx3%tEXtmodify-date2004-09-19T07:18:58+04:00^ø]’IEND®B`‚qpxtool-0.7.1_002/gui/images/page-setup.png0000644000175000001440000001017111263627612017675 0ustar shultzusers‰PNG  IHDR00Wù‡sBIT|dˆ0IDATh½ZYp\UzþιKßÞ©µË²6Û²…‘ì2`l ã±ÃĆ5ÅÔd’^òF•+©¼ÀP<ʆ¤*ÉPP¤Ê00[flo3ÆÆ²Ç‹,ÙjyÑb©%·Õê½ïzNúö¢Ù†Éܪ[§ûÜsïù¾ÿÿÎÿÿ÷tü…•+Wâå—_v466ÖƒÁEQÖjšvuçΟ ÝõóÈÿÆÒñÒK/‘M›69«««ƒ²,·¹Ýîµ²,¯—e¹[Åe„!TUûÃþýûòì³Ïªw;‡øçüüóÏÓ­[·V×ÔÔ¬öz½½‡£W’¤5¢(¶õ3Æ]׉¦f‘R5èºI–QU]»¶«««Àð_„ÀC=„Ý»w+MMMu>Ÿ¯]Q”5‡c(н’$µu3ÆÃ0 ëydÒÑu ¦i‚3ÎpÆ,PJüÕÕÕ¸€ÿY ìÝ»—ööö*Á`°Úåru:·ñN–å5¢(4B}œsÉ2 è†NÔ|†¡—Ár^‚E@@ÀÁ c š¦¯×ûèŠ+þ;‰XwC`Áx뭷Ͷ¶ºššš5>Ÿ¯W–åµ²,¯a™ >Î9µLƒ†a5`Y8·Ár€ó¢y©àçÅqvŸ×€ÇëûòË/7ìÚµëæÝ(yàÃ?t?øàƒo(вQ–å&A NÎ9µ, ¦i5¯Â4M0fq /{› €ƒΉ}Ìé+¸Áî'„œhšŠ@0T×ÕÕµÀïp2¢Å'Nœ`Š¢<"Iâ*MË{2é”N%I6“&j>Ã0À9@@ !”RB@ì¶ð½ÐOK}űÅqÄî#”‚Ë2a™– ·777Ó%ð~7W_}ÕPUõ"ÛÒ¬d†H2oò¹ ™K¦’©¸^&Y¾T-O<Ï_=õÔSŽïEÏd2g(8%ö$öÄ ¤Ô–Ï"¡Š³Â+tއÊ^©¯©y(ŠÒ¹cÇŽ.ÜE~šC ‘Hô°¨0µÑy^ôœG„‹ÞÄ#P˜¦RKKËvQ¿ÑÑшeY ¶…蟯°¸ñxBæè¾~ÕmðŒY˜MÁlB2àÇïnŒáë«WO&`}b©È¨j²,WõôôlXJFÅ €ö /¼›J¥Î‡B¡2 é”É D¦bD)”ã|ñ}˜ƒƒ[ ÉD’FÞ ˆn}ÃMí¸æqÁ³¾¼*XÇ¿…¡k0Mƒ666>J‘–”Pqþááaãá‡NvttìL¥R‚×륋¯X°]h™ ]%´Âê¼:C*E6ë@(Âùó—pøè¤ü¬Ú¶­Ë‘»> rcf:ƒÐöAq¹ˆÓåvONNþº¿¿?{[x__ßÔ“O>Ù­(J‡(ŠDÅ…ˆ+naŒ1†èh™“`xx©T D8gA6C&3põŸÅ™óyôõB:=‹Î5Xݽ >¿ùÙÔ?ò*Ü=÷ÂYWŸ?àáðG}4‚EÂéü‚‰Çãq …F×­[÷SƘÃé¬Ì%"¼"!qÎaš:¢¾;3¢%!ÞÆLä4®öŸÂÌtªGsS?B‚„ÀäiüáØ!DÓN¬\Õ„îÃp8Ð(Eâà×9<ø×­…×çL¼óÎ;Çc ¶\æëƒÐ^|ñÅþH$ò?º®bP)úGÙ™”3pÆ ëxrn§ '±Påw£»9ˆŽC ½ŽU-"@îO'0ví \æu¬h÷aåÊV„««àt:!I<õµÃaéSg fsPóy„ÃámíííÎÅd°XÉÊ Gï¿ÿþ¿‡Ã¾JðŒ1”÷{ ŠÅnÂ= …šp)D0– ^†¦^Ù…Ìù>ŒŽÝÀñ‹3ˆëËá²² ÙÔÔ,TM‡ ;A¨€äÀ%°“`™,\ÞgUˆƒ¡`:“ùäèÑ£ ²òwÕÜ<‰è===þîîî(¥¤TÀƒ3<ç°L#‘A4°‰xY$p¯ÖàAºÿÆ&¦pòâ r¼ «ZšÐR½ÍAø„‚ú&/õ!ri©Tòõ PÎ!66½¢ÁP•H½²oß¾>sdô@UU}çÎO:c¬´™U8 ;q–eA79úÆ2˜Ì žÕ!) ÷XH^ÀøD ßÄa ho¨Áòº«|pŠŠ$Áç é:’èLÒHçPóiäj€ D–þÕÁŸ'Sé9;ØK½õp]×ŧŸ~úÑ@ PØ5|É àö ûk‘!ËWÆ’f/]Âøä N Ì@t®B{S–×W!ìwÁ%PQ€$IàÌ„ÇA`"m˜0Ç Y‚¡cÃöV8sH 6oê¬Ûð£õ]M-ua“Zz|"ž6–Úܵ¦¦¦â±Xl¨¥¥e5gœ­Î*H€¢8PUU ‰fÐÓ<‰7¼ŒS³ø6’G²ö)h:ƒšV¡Éí2Pï— K"Dt‚—–‡ÏíD®µ˜N 'È`:‡Ï/¡µÖãhon7,¾mÛ– ,cüäÜ#ÿðËG–"À-ËÊŸ_¿~ýSŒâ}1)=ÁŠ¡TF³÷$|f ñËŒOÅqúŠG×3XÓÐ J)TUÅÍTW'ga\IÀ'jh PtÖûàWDxÝÂ!/nu5c¤ã~8|~L Ín7Y‚®$™ŒßÊ ±é©X2›_r{Ð/\¸ÐÿØcYœs‘³ 6xÆ,d3YèøÌÄ/Gp#GßU òªg°¬½ ~‚ À4MèºUÕ æóÈåóÏdpáò-@K" jpèLPÓØ€ñÄîo2&@–€3´Ö¸ðÛc“gÐÛý>`8p òÜsÏ¥œŠ²+I‡Ù9À0 ä®\†8“÷ a":‹¾«”®g°¬}5B¡ ËÅ›Á´L˜† ÍС77A× † UÓ Æã\ŒÏÂåu‘h\ä#‰¼ÑÚà‘DÎ34dUK?~áÊiK®`ýýýñÙÙÙë®Æ†g¬Ü&a1 ¹Düꜞè"ˆ[\]æ¶Uƒp8dBJÅ@)DQ„KpC’eH² ʳ¹œu+Ë^ºŠ\Í»œÒ6AŸ!ÿøÊÿþÆ«Èù­÷uµõv-oõºý熇˜·%À9×b±Ø`sSÓ:Æ)ZžsÓ0¸ˆéáaŒ¤óp†îE]g'ê áPöæ®I–áȲ BžJ%­k×G’ׯ_ºpáBd``àÚôôtÔ²¬<çßsppðòã?®Àɬ‚õ-Ë‚ešøÛ¿û‚üþ‚Á$Y†¦iˆNÝD2™ÄÌÌŒuñâÅkû÷ï?‰D.†1 `Ö¡0í“ÙF#‡ƒŽNÜ:·¢µîg.§£öçO<´¦ÿ•ÑßÛcPlï„€uòäɱ\.—%Ñ)J’( \n²Ù b±[ˆNM£ÿâ²Ù,dYFmm-Ïd2ñ?þøãÏ>ûì°¦i#&$mK[`0ï37 C»~#>¢VÆã•¦ÚÀ”âkÆæ–wB€9s&ÇÇkgImrr2qíÚ5Ããñ4ß¼y“ˆ¢·Ûêêjôôô€’=räÈï÷ìÙóþØØXÀ€ ò°0· [t—1f^›Žjª––«R¶ýO>Rµïã#S•÷ß\.—yýõ×ßÔ4í«³gÏŽÍ ‚àyÿý÷ÙÕÕÕ’ËåPWW¯×k ô¿öÚkoñŧ-ËŠˆ£lñÅöw¾kχ݈Æn¦RÙYYð´ŠmZÙÚÐ `ún p¹·ß~ûS.”õêøÏÍ›7¿D)•&&&¢o¼ñÆ»{öìùm.—»  ÀXä’óÆã³© —Ç?Ù²¾}µ¦›ãÇú.Oáü=‚¢@X°Ow}}ý=Çÿò½÷Þû`Ù²eO¸@-'n³!u‡‡S„ŽŽÖÆÇVu¶> jþsÈŸ=þêêêæd2I ØAAçKÉåûÌá²O @…uT:~è¿U$Å3 ß_.Ks·æ<ÿÿõ|ÂbSµ„IEND®B`‚qpxtool-0.7.1_002/gui/images/cdwriter.png0000644000175000001440000001322210310514364017435 0ustar shultzusers‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÓ 14¨H½pIDATxÚÕ›yœå}ç?ïÙÇôtzf4£„@’%‘1Æ€H›ÅÆëuRàÝTð:)âTªR•¸víª­=ªÖ›¤²vâr'Ž Á&8¶›²1bABh@ÇH3#Í}vÏt÷Û×{îÏÓÓo÷Ì Iö­úÕÓÝÓÇûýþ¾¿ã9Fá=¼ž¸­ÎÍäEçfMc—ª’‚ú{‚Ïõ8çûœ±+<«{œœ(1ôû'ÈñÏp)ïæ—}s?FK’ª÷šQîŒwõ]ŸêÞÔÞÚ÷>âÝ×M÷b¦ºQué×íB'?Kif˜ÒÔY2ãçâô¥¡J®úFÕæUå¹Ç^fò_5ßÿ7¬¯Z|ƈñ«©kvÜÜwÓA¥kÿlj÷ì ’Þ¸¦ïrK9*³CdN?ÏôÏ0uæ•q+SúqÉáÛŸ?«ÿªø‹’NÀ£‘¤ú7àc›ûîúuÒ»>‚m}×nÐígòÿþ Ž<é,ŽOý¨Pâ«_x‘ãüK_Oä3O?ÈÀ‰¯~ð\ðl< cƒQÿøxUÀŸ«ÔF_ŽxŒ ø‰õtø$í}×¶/½øÐé’ñcŸcäpßSž¼ŸÏ¶´'¾{àó_ïÝúà—ÑÌØeðÝ:ÐÚM‡Á‹bW'Äg¼êrÀø!¢üúçiø€ŠBbÓôî¿_õgNÜ~[eb›bräÜ<å÷„€¿;È#Éîö¿¾õ÷¾]˧Á)ƒ]’`C€ÃÞg¥çòòp+MžöA€âKð„F–H3S=ô¼ÿ㨠çö¤æÏï-ÁO‡(¾«<~GÒ×ôü凿ôC½mÇm›®KzXV~¼¤yù¸%éÕU, X ?WUŒA€M²þ†ƒ9³½#{aoYáðZH¸,{/ŸhëN?þ¡ßýŽ‘ÚqLœƒ… PU0"!¯û¡–K~ð¤Z•°ÔYÙãª^*n]ÑP(ë÷Þƒºpf{*;Ø÷ã‹< Ø¿ߺ]ɤþô­}3Ù¾ï~é‡üxT `DAHð„¼Þ¶Œݲ°eÞ VW¯IÓCü1 ðPÍ;ïÀ¾xd÷^uFv”ç›näÊ øÃ[ˆµ·ðÔþ_ýƒ]½÷üŒŸ†Ìø¾ÈྠåNýàÀ5Zeà¥iN_ìâK×~è®Gv=ü?Q2c0qF\1âƒo %Ä“ éñî/•Ðkµ×½2x% PzX $x¥®P¤Ü1¤™¼'Á»â^ü*fºT[›V<}èÆù‡F d×DÀã÷rSª;õ—ïÿÍo˜‘h.¼ v%T²¼z}öª`!¾NÞh³ìi¯H8øåºwkž®×jž¯×%X >p„ùðZûöâÏœN›³ƒ‘ã7~…üÛëøÆ¾‡ÛÓuà8÷2äf¥¬½P™ •,§,ˆˆ¯kô2Mq­H&À³ÄÍÖ€×kÔŸ+Í^¯÷¤Ç9JómªBYZ”D×62'°3ê:¯žšgèŠøÎG¸kÝ–ÿí†Gþ»¢-LÃ¥7ëY¾–áƒÇ7O¯ |EA€¦Ö=¯)ò¹ ª‘ò¼ßºaùÅLoG/Í¥¡7Ó‡Fø P]‰€°n1¢|qçÝŸUÌD.§*Ú\ßÍ‹–›S—!>äÇ 7*ÖJµ=”ðêäiAcÌ«j(Ù™uð¾Œu¿²Š´r=¯x%pæÀÍÒwû¯Ñ·1u׃[ùÐj X"à›wqS²·ë£=·< =»N‚o×Aû®ŒÁšy°0 Å©&hl‡OÆz°TÒ…üÕ&É×À;M€eá‡@{Åå¡r‰X÷®;pOlÿz>Ä/K@\çS[öÝ5SÂûn¥ xH5Ô²pàÊ<ãÂÂy¨d$ 4†ŠúU]©×U 7¨ # Þ“ÞöK+€·À+€k ³ÇÁÍÒûOÐ×ÉÝ;:ر*_¹ƒD4ίtßôQÑéÍÖËKƒç›Í­‡žð®oÃâyp ²ŒÕä¯ dÍÆ·Åç4dÌGB$øN]â5àË@7[^ád –Ý*x©'P÷m¤7–\×mÄ“0=óƒ`Í4Åy8ÞýPV÷…”Õ ®Mføê‚œóû • ½M«ùyüìQ0û ãhYnQØÂØ‹2Æ 2»D‚kˆóEpBc9VF ð&䃮jï¤=ÆV™hê!`´›ñÖ”‰ ùk”æ@q ¹ÌD“×ÃÖ8=¦²*9 Þ€öNˆ-àúyå[b¿pøèh¹ê•oسsãGþý—×uÜp`@9 Ž –±™ìJÂón üb=úµ„*‹nª“`ω¼¥æÁž#žî!eƒ‹Kè*mñx,ª¦œçGÀŒˆµ·JT´6‘͵šäi/[Y]] *¢¼µ¶B2ŽÃ³ÿã?Y_úÚÉê·x˜‰ýüxçWÎ~úáÏõñ÷·í: f–…aû¥IÐ×768~I(Ä7>µÊP{ìÑ74,¾ä0b b&ë–)Àö‰˜Ñ(Š¡‹6M0 0äˆ+ä§­jˆÇZÓ]—ªð žH|-- ´1yü9žxêä±~‹^2e0þâpi䃷ÿùßܾm[¢Gð,(— n¬Ðå5[AÈÞžÞ¯M(Gx"-I": Ùa5V1Áó@7êàM34rÚäŠÐPµ:xM­{¾fª+“azXÇÂtŽóSô'€Kµ‚g'ÎSÉš²Œwœ¸ô¶%<ïÁ·ÄèæÁÉ Ð^^„GÃÂL¨÷\tÝÄ÷©õÚµ^½Ö ¢ÁÑ4!ÿðf=,Lt] ƒÖ꣩‰÷¨¬"Q I¢­‡]Pùðí=j:\U jQà8gQ¾VKrám;+Á„JVŸòCàá9UP–oª¾BàÚ»Ѹº>"Á׈¯×Þc`õ1"Ç[A‹ µ•= JßâÁûö~ì6¸.|Ÿþ8_Ü~ëí× ºP– “WÅ•žÏ7eÙï×z¯(«Õj»ŸP"T gY'h9ŠÅ’íW,S‹§ 8³œ³ |øõ°b ù9m=dÁÕ¡‡ujb wÿÎ×®m‰ÿîS™Á“ßÖðg[Ò÷ì¼ÿ¡Ouï;•¬˜N{Ez².y7Ôë»Å+HˆàV, 6y¹ÅT' ï«”Š–[Χµx*6²<˜‘Ðë5ÌÆçZ´´:Wƒ™óÐ¥uÛ~ù‰­Ö¥þÿb—²´õ]‡Ú¶òo‰©taRdmÅ‘êåWo½3ø%Ç@m¡´0ÍB™ P ÏÓõ7™¾­°8o[ éH¢­Qâ ¹ ²‚ÌFB´¶n/XoãBaì ´m„XšÄîûÅ\Ã-CµE²ÃrškC".îsUðÖ•Ð:Àñ)df˜´˜J xq”Ùÿ°+˜(ÍO\×Ú~D2™­ó‘&o/Ÿª`¬ƒ®?*bÚZ€ÂEˆw@KŸà¡4+ÆH/ú!fBT••à`nÇ),0;›qfËLK4L‡½\‰×³#b?–\9ᙫ7›À§¤E –†®]¢*øeqó…I˜?+lñ¢X70» ûƒˆ¬¾°vð `n¡”fn.“?³À¥æµA`¾Ä+Ó#ƒøÕ’XØ4Wßð8DÖ²|M•³‘8t¿ÚzE™­­û)rÔ Ht‰÷ôÞ ‰=²¼ÕÀê¥n-àÔ4è}dGN3¶ÈxÑa²™àõNížœ³fFû’6ˆ_c𑦠 µÔ%ïW½ˆ-&BQU´âZ‡ MÝUm*y‹˜FϪ«Æ+ÉÙé®0¯×dzð4ý³¼ Ì4WàÐ#™œlö› EÀhYEaðñ+¿´j“@tZ: Ñ ‘¤PAZz H߉ݢÅõŠk_“ôf¬ÙQ. ^,žœã”\ VZu‡²üpøíS¸ùEáÙC >u…à›cXla‰S%vh™Í©¯ût} ZvˆÍØ«:úÑÆ6¦Ï¼ÊÛãîùÑg€üª«Âßà…ñ‰¹þ¹Á~Ñ.k‘ÆÚo6ƒO­|ÈjkŒ¸à}7ô¸*¶¾{…Äö+Øã]áŠÝ†ËsîÔ¼4É+ÀEX~‚d‰€r™És³|gðä+–¶Ò˜ñ—%¼äeÀWïYâ½xËÁaHÓÛ`ãcë[ j˜{™|ëeú‡/›âU`z¥íò†¡?›ïŸ=3uö”l1¿ˆHï_.ækò®MQÝ€×Öë—¶·Ü¦ –ð2»¼ÏÀ³6~ÌÎ+$AØÝTr¼}üÏ\äXYþËÈUíŸåýG`ÏÏÂ|AdéËżWhêØVïY¢ÓS”¦Ý&ðAÊÀ†Ø6èû-ÐïL‚¾´ë>þ/äÏàˆœ~»W²;Ÿfd[õ†ö¨½­sÃ&‘ ’›€ÖÀ‡/ÞµÄÄ&ºôT}Oi“Å[>4Åì†h^[½P:!þI2‡8rèpùOOO.T9 Œ¬vZd¥å…2ã=þÔ}]í­‰ÖhâÛ*HXŠy«)æW¾ûòµØVÐ×Õ+À;¯-ƒèF0: ðÆrp²¹ý}'‚‰"Ó)'Y½§·wƒñ+кUôë~iíà—ž— u/h‰W¾vg¾ P‹uª†ñ13ý?û?86yú¯Þæ àE`öjI¹§æÚsÛZJãû7ôn@¯ÎAkXùqóW¶ùyAtÉ}"§öÚÀ×W9!~½ØŒ±N‹ÅZý>Pwrþè³üä…³tœ¿u~ ¯²NvEÇäÊ/O2У—7¶V§wvuµ£/B4 ¦.WfŠW^ö~Zoåt¥„·–>7±Cì=V7ƒº›á/ðÌá™?yïfª<¼îûc‚q ¸¯]9{i‚s›4k«QœÜÖÙÙ†QÛZ£±Ã{'%xò\PÛ- ÆåI“«¼TªeÈ·@%ÎÀ+Ïsègodþ׫<9nñŒ\xµjooyT0¿ Þëk;)êÙ#ã¼Õ»ôÜÈŽö¶V¢AAŽŠ¨òHJá” gu éƒr™ê*¼¯(Bú¹9˜ÄÍLsúèóüŸÎÌüÑqž³ø ðZxã£å×ÁNƒ½Ô1ðÞ\ûYaȾ<É[1¯%3¼'i¢¦¢ªØÏS\Ð*ï^nq¶˜è¨Ñµ (bÆX-ÁôÌ‘á#?ç‡GÇ¿zœïÍUxF‚_Xÿ9(·Cç®.R±$ùA‹ ÿêN‹{@öYÞ^°ü¬º0¾C«d[“ñ8¦çC¥J ü í°\æF…ö{¯œEš²Ë0?Sƒx™)FÞz“#ϽèþÝkÖ±?{“§ª>?•å®îù‡Á^É­üñÿ›)k’Áþa‘®òÿ| 7œcàõΫ…\ª23¼)TÕD$ŽæE ˆ8'~®±Eö}0×AûAPŒ•[ØšÄUUäˆRfG`úd&˜:ωrèå‹_=øÇŸò#àyàt8æ‡Aë…î|åÀåÃÝ·óý¡§=;¶Œ}QèS³EžùÃ\¸eÂþåû&úÜ·ep÷®[Ôž-[‰·µƒÞ j0%d.EjGàTmù*×·*dne¡´¥æ«3¨šÛÔø_KÓàÔ+ÓL½2ͱÛ.•îºsèô½»6 ì¸~kW´gS©ŽNb‰Ý`ì b1¶¢ÂøÐ[Äj][rNU€w*P-a—JX‹9f'§ž NY3GÇxëÙaŽWNÉÉÍHØë|Ú·ÀžÇùw۾Ȏ–Ý,:3hJÃpÅ™Œw‰Äö1@æ¥I^šäg×·¹ÞvâÀ½›Û »RÑt:I²m‰d+fDG>%}/ö©ßÃuJÅV¾Àb6ÇÄlÞ+-ž›côÕ Îž˜ã40\FåÌ®ËC°þzøÀ=1>±ù7ع˛Á Tt¢º÷®P»*Ò3‹œXä0çØ²µÍÙ±59¿mKÛü– ­t­‹JD•˜aꪩbŠà:Žç–*¾›«bMYdG™º˜gòL†‹>ŒIÀã²¥µVìì> ={àÎ_Jpo߯Ñk\‡í-à)–o1Yž¤àMbh˧„ïêކkm< tí@[«ÉºˆJ´=J£`S-9”mJ\È6™%Õ¶òõIØx#Üú˰sýfzÌxKŵ™¯Ì3iÍ2nÍ“ÉÃàÓPøÖ»¯€•¥%mRþF0 6fÌù †|]þŽüª4çzxãs°a»Â-÷l耪6¸2B”(øPQ ¢CTCU–•ß÷‚€ævÚ¹¬¯òêømƒäFŸ½wûttB, m-ˆŠ£ù²Ð¢§F L㟟€÷äÚü¸¦ŠbÁàa…‹ˆÝ?àá»Ú€¾‹E e­Œj&Ûæ×;s¹Wÿ ØÕ[þì–{Ãìk¾5Kªü*7ÉÉááÑÿ:{曌}¯¿ó_ ð߉ÅVÝßÞþêÜÏ,ºM „“GÅž˜@VŒÈµ¸wÝ¢i7÷—½W;ãë:;6!g2]*âfsTÆF™ÈŽb”ʘ‹‚7(gú‹–ÝÕðHTßµöÎD“ãHU1p´ *—£É`Ú®«H?>á#$Ä[¹½Çm;}þ¢náãww®K4E©J%¸^V“3š(äó˜Ó²1,ÃRÌôkÜ&xðâçÈzµýíw$š¬ŠT¦  ÊŸ˦”Á¨!P.HøÊ/™t‚Q¿|/‹w¬éHĬŠT” $h:Ø6Å‘†…í*4!A„¿Ÿ@ø}²nðèŒX|åêŽDÔr¤²ìjh¿€J‰âïÒ¤RI”«Ð|‚€ÈPeš€BóCɰêR€'›cñ¶Žµ‰°eIe› ¥×Åø¸PL§I½=ˆ h@È/‘ºNT"§50™/‚±í¾‹Ÿ+ê¾s]"ìú¤ª˜à—¸¦‚âð0©ä ·²]Ð¥†¦i蚆ð ͯçóÉݦõX]9àBä•+•axÙþâÈÿf˜ä‰$t)‰$š¦¡ƒà˜F‘3†a¾T˜xàÝÏ—5¿ª#¶-/ÛËêt…gÜâÐR'’ží]Б †®ëhÁY12*öcÙñî6ÇêF€'›cñ¥í‰°åHe¨Öy¿WQ>ËÉTÐÝïE^EÐuá”*&C¥‚ýƒÌh×›þ÷zOM ð±X|QÛŠDÔ²¤2M¯_u€Ó¤82Âɤ—ð$–!M¢‡ˆê:B LÓälŰŸÊM¾/|M °3‹w,]’ˆ•ŠR¹x‰Î­ÚÞ0(ŽŒªF^a¿F( ‡‡Ã¦ir¦hØOŒu=S©ôÐûjJ€Gbñ5K–$šM[b–A yðåùtš“§R˜€p!Z|8Ò@X×/À• û™‡¯)ilŒ¯»ýöÄ,£"±LÁQU## ž>éÁÍB HôPM×~q~÷h¦ëãÃákF€ÍQ=ÿ“ÏÌv”¤T€ JA( ŽÍDz„çNc¸0Í/u¡0Z(‚&¦åÁ?:šézÆ0ú/õÝ5Ñ}:Òðç-Ÿüde{ðþ€—í-“ÌÈY^9ušÉê¦&& 1¨Öu4=„³brºx>ò—_3¸éºë¿NÙÊõ!ªMι‘³¼:4ŒD}0S@8 £«MŽ_bTLΆ½k|ì’m_3ôLoذlÆÌÍóZfÍ$Ÿ£’%—/ u‚Qæè¿ƒ]íðf ¯ÜEt]!|`–ó ™ŽýÔøø%%¼šà{±X¼uÁ-ÿ|Óì–ël01‰5–%W(1:>ÊYK1ér¡Éù„bRVჼYa¨b}`“S“ìllŒ¯XÙž¸fF“´‹EÈåP™Q ù™\–wl…Q-}:Ðâ‡X@#ÔÑ‚!¤_`V*œ6 ûñìøG‚Ÿr‰êñÎåK³bÒ,ä/ÀOär¤3YÞ1 ².¨êÄ$‹|0„æ†ÿdî£ÃO©Û¢z|ý«ÍÓ§KU˜„ÉIT6K6›ã\&Øe2Q¼º¨D9Šé>¢ o^>ø) 'ª¯ºgيĬXƒ¤XB&±2&³9ÆsYr–IÙñÖüùèë@ÄÓ|P,•P¶bH)û‡—~Êú€Š?È+¿ X(P.LRÏ0žË1:‘%c”\(¼ >T…ûï øY©ðòžbqÅ儇)<ëÐõømû»¯ÿcÍÎSÌe+¼}½†û#öô ž7+½CŽó7{l~~%æ5e#¿¶íS%Çym¨\ø|X)9Q®à(p\Ð|ñAÐ!D„ä-( ›•Ö§l~{¥æ5¥­pþÚëLwÉ2µ×¶H ¿æÙÞïE]÷CÌWÝå…¤Lû_µ1¯äœ¦L€97ÍiÛÖÓÓ÷ÝÇ_¿r/[&¦«ˆ Õn/설FH×1M{Ô©`μ9mÛ·mï뺫+zìçÇØ³ofÙDééƒÏl?sêLªV%®ü7·÷u®;:ðæÀÿÂëzúСC5Ù÷ n]ÐöЖ‡úºïêŽ8ÆÞ}{1-=¬§½x¨=ùv2UkKU\Nøžžž¾îîîèà[ƒ8på(#5 Ù°àO´mx{ßÚµk£Éd’ýöcš&Áp0Ý÷Ó¾š…¿,hmmmÛþðö¾uñuÑÔÛ© ð ü[µ ÿ‘Ðz[kÛÃ[î[Û¹6šJ¥Hô&0M“PC(Ý—¨}øT—-[Ö¶å¡-}k:£É·“ìïÝixÙþÙÞgÛß<úfÍÃÿÞK`éò¥+·mÛÖïˆGS'RìÿÉ~lË& ¥ûûûëþ÷Z›¾´éë<øÀß-½}©LžHÒÿÓ~P‡Ó½‰Þö×ßx½nàÿ_¬\½rNëgZ¿ûÅ¿Ÿ{ó\Nž:ÉsÏ?çÕy]OøÉºƒ¿$.Z[±|Å_ÍŸ;ÿ/šf4Éô¹4B ž{Áƒƒ…=ûötyãHÝÁ¨Ÿmû¬Üpç†Äò¥ËÛt]÷®¡JÉáÇ1+&³gÎf÷¿íþê‘7Ž R§ãXܺxǺøº¶hC´zp©P¶bQë"’É$ûþãˇ^Þ]Ï»Ö÷`ãÆkºÖwmm™ÙBÙ.{Ø>å*N¤NœÛ·wß–zß¶¿§ ?½°eõšÕOÜú©[Á… a) ü ’3Ãgxé•—¶är¹ó×óÞ]NÞ9‡YwÌŸ7_®ß°þ‰5«Ö´àé“(!_È»†b˜ì{vß/^xþ…W€k«ðþ*tï*¶A½^Å¿÷Þ{·<îfDznf,ãæ'ón¹Xv­Šå?~ÜÝøù¯ !î6w«€ÅÀ|àz é}\Qû£­­íŽÞƒ½V¹Xv-ÃrÛq]ÇuÇqŸ~úéÊÍsoÞ|Ø l6Àªbxw•ë3ÌûÔ¼¯¬_»^^»l6ËŽ;2ßÿ§ï?k”ŒßT×vÈáéV?“Uë«zMˆ" \ûí¿ÿö€ã8®ëºîáÇÝÕkVÿ;€¯÷T-¿°jùºŒú¹¡YJÙú­¿þÖ/w=¶«|ã7~¸ÿ"›ß4ÓðÎ1%uü»£wo‡EJ—RÎðù}ÍVÅ:Wµ|©ZÒÎWÉøuWmEßõÕIEND®B`‚qpxtool-0.7.1_002/gui/images/q.png0000644000175000001440000000731611142271003016053 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÙ .€²fftEXtCommentCreated with GIMPW)IDATxÚí›{p\Õ}Ç?÷î]í®võ~X–mac»¶ñ[6Ì#&š¦!MBIܘL‡¤“tÒ´“2é´“¦$ÐNœLJ«ÜoNZ°o*ZúÀõľ')lÛÓi™LF<´ë±ay÷T­áqÀ˜+¾7Ù€®Ù´Q9r¤’[^KÇÂ-ᎽùÄã‰+ÍŸ ß™ ðÛ« B×uqß}÷ Çq„°-!,S» y)ŽËÂLJɧ¤Xéq±3B8Y!„-R©”¸ûÏ>1¶]NðWª¬­ì±oß>!òY!r))fZIFˆ|‘XY 8=,DzDˆÌ¨ÙQ!²!̈ù¨VL+!„ÂI !l±k×®ÉH˧ɧÚvW—먯¯gÿ“{yÿ–Íàå@•‚Qc¡Û+­‚¹St ©w4%ºÍbÓ¦^.\ÌÞ½{«Å§%ÀÍ67ß*סk{þãnßz3èØ,Ä8 R\ ì4^%àE@a¨:½½½FÏ=÷\¥±þð"pz6 Ø,,×ñwŸ»›¿þ“›ÀÎ/š.A‰âéšq4ʱÀNŽkYC‚/×ð1ð†/7Þ°…Ò××Wi¼]³•lV‹’‰‰ÿâ…t¾@@‚hì‚ö%ã߬iòFW×±¿u°³G‰š<†ì÷èÒ¢¨Sâ“„Åù³ý,_µ\ά4îÛ§fÃþ¥’ïïúÒ§X·lÁ¸ÆÍ„Ôl°e¢ßY€D¸&Ø)¥eM^=€GæÑpoÑÕa‚›§1ä#•LpàÅÕÆR–;# h.(ú/iW]ÑÅ?ø*šaH Íy })4uKw@Y‚®,@Sšµ“`Ë÷<)XƒWý¤H„#I“<±È‹Vl%•Δ» ,Vã¯ØôIøH9🽵ÍÉIS¶ WSÞŸ€h¿2ù*³–æ‚î*àÊ& ¥uø8Yp³àdÀMÓܨs×G·V»¡jÌ„€V2›í7¯–`SIܼœÞp!ÖÉ eH(ÌŽ_ˆqBšÿ˜æëå½kIÀNÜ 8ipSÒ‚ì$÷l»eÚã/e©Z|¸­\Gï’Næ5¸æH0šáJu]ˆœ„:ÚŠfå …èchrc>_döðnNi^Y@ÑýÒÑb$’*7Ô[Ô—æk±€ @K¹Ž¬YNN™¥ "ºT4W~= VBÅ]’ l*š¥f‰ ’zI€°¤¦ â$ÁI€;&ÅŠ¢9QÞwí’J‚ªY“ ¬©ÔÑ{E‹4ù1³W ±U6§¬AठùùY>ñ3> ‘ßBü,„`ô"$#àúä˜ 3„]0õØq)VLIì0Xa¶^ÓU ãêZ]àªJë„ðBj«&~é9ºŠôºÃ#5> ŽOjßðƒ× žzp¼3!7 ¦MKSwÒ’@'=Qì‚edY»Ô[ ãªZ ¨øââ¿Òx!ÁQIŒîÝÝ+£º¡É¹;6umZ«Àk«µK¤¹(ƒf. ­=2àÙITa§!É¢û4K»¬ËB@O¹›ý†Šà8Rã…鬰p)¤±†Šîɰ|6̯‡üg~ý(£Yõþ?§aÙÊà7ü*¤Î‚ן_ùz²¸ŠvrŒ€îúsê ›¯¸/Qå>ìy 3F!•º*nš|6˼«ÿŠXBnn¬_ÝÃï¹íÛ‚ß_W¤ª $^‚þ …5?ÆÒ»~J"[±ôò¬âŒ·ÆÞnVÛΗ´ŒisîäËÜyS7Õ&:^Ȱʸ€o+W‚›gß³ÇùÑžçÇl$Î/öãßyÇqÙ¼þJ Ã#XZ;Ø+Øþ•ýˆW³‹<74:[»Ã¯Ÿ+3ÞèО`óÊ™V‰T‘+”‚˵|`1¯×âþÿËk''êL.Ï3/œàÇÿs+¶³rùHE j±ã»¿æ»ûª÷?ïÏæöø ól.×¹ÿèEÖ†YÕåÝ==Ñ „䇠~„Öaæ2üÅ—¿™¯ì¦±D†=¿8ÄÅ3ܶÀäÁÝ?ãËõ‹*îkGž=žÕ"/Ÿ.WaÀ‡Ek²_Û8ß®yÀÊ€'\£`™ráZÇÈH˜¾³#\Š’ÍYÕÓ¹7ùѯÞKL»¾¦f/f›€\ ž2$hûN¤8öê©ìÖyÂ[gy0„§óR­'EÿøÊdù<œ^?ä¶Þ`ׯ%M]íM!êü~QÃl7ãÖÜ ür ÚšLÛß¶T ûçSüž£—c˜jkRëEžà\ª߬ˆÊª´5¡*8¯)Í©V˜-jÛ‘Gå«UF¦´2|7·và‡Tþ§­¼GÚZåvÅàŸá=Ø6!ÿÏTó=Û:ç:x×µÿ`æ|Z«‚}IEND®B`‚qpxtool-0.7.1_002/gui/images/test_errc.png0000644000175000001440000000257111345703064017617 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ ,4C¼§tEXtCommentCreated with The GIMPïd%nÐIDATxÚíšËoEÆûònüXoÖñ‹$Ž‘ÈÄN° pÈ;$®üGüˆ(\ äˆ ‰;1„øíxmcg_ú¹5ZïÌx³dõ'ìÙí®éúªºº¦jÁÁÁÁÁÁÁÁÁÁÁÁÁÁáÿ€„£ l¥gÓÀPz€P¶5à/àW`^ŸGA Èy ô½úÛ§Ï{€¬Ö“v/uEV(,rÀ(ððð"pB‹Ìe`Xns@x¨†Å`PD?/¢a]Þ}/Ðå›Û6òÀ«R|FP”âeù,pT Ž‹¤9àk òY#Ày=ï<0 Rò@¿žÓÙÃl0ôÏ—÷dqäêóÀŸ²|xF×I]3òœ‡À]„cÀYyÚl]öÚEÀY)IJ>n×€ÀªÜ?-ל.“òˆKÀ:ðð]ˆçդ̪H+ËÀ#yњƽ‘ C.ïÊ~”2W€oÌ™(ø½œ’ ŒßKÁf(÷´¿ä]È‹Vc2À‡í& œ^Æubl×ÏŸ˜wScG+ ÚB§%羂ãAXÉ÷´}þ‘õ7-ySØyÇ`3†eõq;hñ×eùúóv€o—€×­£l˜Ð‰ð ÉsWu5C— Ô2’Lè¨C.|S$ÔäÖ5î–\É™ÜVQ±†– ”Ûé~Q¬„”½¢mrß"ôŒ%¯Õ.Ñn :Ë‹ºÿ[ʬ‡”½®ñ^Ô>*y…NJ…“çÿö/ BKš’Æ?²’©!ÉÝ–õQ^‹}w4~ÛrÛ¢äÆ‚ï…Äî¬6ãÚi{¾”:Ò¾ÅV¤L%¤ì²H+ûHÍÄ…€”/O¨FPÞ&­êK®’q! áûþ0g¯N²Ó*6É€Å×Z<{ýsjO*ù/ð»|*bÅ‹#)_\¨Å…€Š¯’“¶ÊPaiôüA±£ ØUòcG𾕗¬’{üfÄòØS%`ÇJc½Ì0J"sDéoS¢$RO€-UbJV3l¥ÆAèÓø¼•/Kn,ØÀÔûиIL™L]ïŽäƆ€Ÿ1…Iïn S«Ÿm »õý´¼ÆÛÿ "`9yAØÂT§ý/_‘å&^fæ1-®«H2¼#÷n„)àmL5¹ „êwKNÐûD˜L±QW({¹AIMSýXÿŸÃ;SÚÓŠe%<Çä!^_LYìL!J8-Y]²v]V¬b:D“ Æ¿¯c¶Ûšwø¡Yª„ÛTPTï—uOaº7^dïWÉë¸ù׫"ðnÄíyø@ÖÞòY2ƒé@ùLj ”5ï£V (iñŸbjôØï žÁ41÷ä‚^“tQ. Óœ'\[ÌÆ ¢5><òý¸ô²›ÀWRê ö»Ã'åÝ4î_Å”Ó;*ýqý„y¿µRÝ´‚Û¶ÜÞþ}@åk{SDç °fÕ êÞ¼9à âƒDÌä:88888888888Äÿì< Ò¾\åIEND®B`‚qpxtool-0.7.1_002/gui/images/x.png0000644000175000001440000000206110646607642016076 0ustar shultzusers‰PNG  IHDR‰ gAMA± üabKGDùC» pHYs  šœtIMEÕ $ “š¼ÖtEXtCommentCreated with The GIMPïd%n…IDAT8ËÍTKleþþ×»ëwÝ6Šª=”Ay8´¹Uй‚ ±zi¥pŒ/Dˆö!Ô"ZPRÃWPTî­"¡Tê%JPìD¦P&ÁuâÇ:ŽS¯½ÞÇppâØM¹q`¤9ü3£O3ß?óÿwc›ÚêÞ¨eœ×}Ûòy …býá8x*…Ý€®ƒGÀŠù•V°riÚšúæwv¬_^8ã­yrPÏÅŒd¢ä?3âãÀ™”ׯBh·¶\ŠÙ·>’yn¨:D Âñ¾Û. wæ+_] ùä*6'²…àèùi„ëó2p"€ Ó‚õãdIæyx{_GàäË0n\®%fbŽiÃ1mT~ž™Ö'ÆCÏÈxº{Ü÷î´o|;YpjÀD¢íÀŽõ¡:‡Ô¹—oÚN…vëóÓø5r€êŸ©Ý.È¢ •l¥ŠÞÞ>8ê0Zæ¯&~öÒb̺ùñé¶GU9Ð#õÙùûp û H.èéÖÖyÁûÞG‹JOoŒAtÉp{ÚÐÊ8cŽ÷DØ«£7µäŸ0RËP¼>t<ß®gƒpË*™ ¬oxàŽŽ'”—z ~Á`ÛVÓÈ»¨_<%&¨ÙÉKÃÏ€Ä9F¾ˆôr-ç~÷ƒ;Jÿ@„ˆ )>0–Y'"<É›JT5sxô(í¸TmÕ±)×\kz£½€Ž #13¿¿úÆþÃ~Ub†V„¡mB®Yèä[¨\¾4ªÏÎÆÈ¶AD°m „ú¶rH„Ú¯Ékæõ+êJªâ¡¯iX½_ÁÊ ¡œ)ã›èZþú…ñáÊBò£l·CÛ‚‘˜û²öÅû£‡xd zZCZó@ûpB¹pyâ!ë*”³¦í+:8ôà!ÊѱWÊ3sÓŽe5&ltPûe!àSŒÆž¥×…‚käÛR(*„¢ÒØùÅ”¿s³bnÁL®½_gû:¨éRî·ÎåJû¹—BjPÆ.&”“ƒapà܃ƒa÷ÕOn¯ìFZ’Pzó5GÎ%I²µ¿k¥qkëë­ï®3©§×«„"ÍŠ³£4úÜüOÕøâBÛÛgƒ<à€KRêK—^]z¢|ç`ƒ5Çs@÷äÄ={ ‚¸óéÿ¢¢$ðf¡j¤ÿT±ÿ»`ו9¼›IIEND®B`‚qpxtool-0.7.1_002/gui/images/html.png0000644000175000001440000001262011345702114016560 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ $,˜ mùIDATxÚÍ›{l\×}ç?÷9o΃äp8$E‰”eZ-7–%»‰½+×® ÇmÒØr×Ed±7EQtv‹pŒÉn‹E»Xôl± ví¦]Ç›6mãZ–[Ž%Ë"íÈ´¬%ßäpHÎóÎ}ßþAÎõeJ&ƒ=ÀÁ½sι3s¾ç÷þý®ÀÇ7P ¬~Ùúæ­vp°{ul[š°ÉÍ·är¹ù5ðVo<筌z®ûÑg×]ó<<ÏÅuWÆÇŶ-,ËÂ4MLÓIJ-ÏË—Ë•ï~ë[ßúï¿ÿþ`¬‚ò3@¢@vbbüÜê>¯>ºõ¬ën ëïmÛÆ4M ÃÀ4Mt]Ç0 ‚Áà…^xá×¾÷½ï]êÛ‚¸ € a¥þýF]Å5ë›?7îEQDEdYF–eŠ¢ ( ¢(R­Vo}ê©§¾sèС@hõ@~¦4ÖÖ "¬%œ@ilPÅë‚ IŠ¢ ˲•e×u1 cð¹çžû¿÷ÜsOÏv€°YÄÍžxó&×Ï7@hîùŠ¢ ª*²,#Š"ËËË„Ãá½_ûÚ×^¼÷Þ{»àV‚°¥Ò¼™Ü7¢ˆëØL ²,#žçQ­VéêêÚûì³Ï~ÿž{îÙ±• ˆ7²¹Íök‘ûF²ž"šÙ@’VöX.—I¥R ^ÜJ¶\Ÿ_Ö ¿õlИkaUÇI¥Rtwwo)òÍ>844ÄÂÂDÓ4 à ‘Hà8õzÏóƒØ¶ëº¤R)Þ~ûm’É$ííí†A4EÓ4]0DÓ4ˆF£”ËeªÕ*áp¸ùç÷>ûì³/>÷ÜsOœ:ujÐoVEÊ7Êßæº.²,322ÂÔÔûöíCÓ4<Ï£P(`Û6Á`D"ÁÂÂýýýÔëufggY\\D’$z{{ýÍÛ¶Íôô4¥R‰{ï½]×)‹‚°- ›¨ ˜™™9îmd ]Ͼ]g$5ÀkŒÍÎÎÒÑÑáE®ëR*•¨×ë†A>ŸgnnŽgžyÆFÓ4J¥KKKLMMû$ Ü›xuaaÓ§O399I¥RÁ²,Ç¡Z­bÛ¶ÿÙqAðÇA`zzAp‡öövDQ¤X,âyù|žr¹ìŸ¶$I4ß „­’ Ò& mÏ<óÌ—i ²´´Äk¯½F2™ä•W^¡¯¯ãÇóþûïsùòexçwèëëãùçŸG×uÞ~ûmLÓD–e®\¹Â‰'䥗^Âu]–——e||œr¹L¡P ŸÏ#I/^dzzšññq–——q‡H$B(j¿ë®»_¾|ùå©©©†Éìm) ÌÍÍ_?Y­V©ÕjÄb1 …áp˜b±H8&£È2ËËËtuu‘Ëå|ÁW«Õèèè \.S©Tèééaff†`0ˆeY>™—Ëe4M#—Ë¡iµZz½Žã8¾¶PU•®®.z{{ |ãß8rêÔ©ÉÍú›`~~þø %Þ˜¨V«D£QXõëõ:Á`pL(‹´´´P*•üSÕuJ¥Âââ¢O –ea–µâA†Ãa_e*ŠB,£µµõýo~ó›_8{öìì*î–Ïç×PÀùóçYXX Z­òð#óÊ?½B8&“ÉP«Õ0 ƒb±H$AQŸ2r¹O<ñçÎcdd„;ÉÉIÇAUUlË¢\©pøðaÞ}÷]t]§P( Ë2£££ìß¿ŸÙÙYªÕ*š¦100@8^ãTÅãñ—9ò¯âª+ím¹H$|µ' "™Lét²,S(èììDUUjµ»víbzzšŽŽ‰¢(ÒÝÝ(Š´¶¶bÙ6UÅ4M¢Ñ(Õj•P8L"‘À¶m"‘‚  ( étšX,æ³ÃŽ;ÖP€,Ë?ýôÓŸúö·¿ýÖjPÅùݰ°p¼Y­8Žã›«Íc5ëç6Gp]ÛvÖÄLÓĶmÖ«b×uqÛ¶}­³ªMþø«_ýê‹«Ñ¥­1„×7ß|]×Éf³xžG©T¢««‹wß}Qéëë£\.ÓÖÖ†mÛ \ó;=Ïó¯Í')Ëýž¢(¾5Ù @c}³ÚmÈÃ0’›Q‹7Í©TŠ@ ÀØØétšd*I¡PÀu]¢Ñ(¦i ™››»ÊŠÜ˶ŸæÒÔKUϵIag¶•žlÚ· ÖRŒëƒ`šfƒòäÕ`Ž°Ú½O@ÃÅm ûí·°{÷î5ë8°æ”J¥®ëúÏodMÎÌÍó?8Éß:‡Œ°ŸÌƒŸ1ù•}ÿ‘wÎOñ—ÇÞãä»/óÄgnå©_¼ƒT"¾&´&I’$ù–¢(B“¡÷ɸž_°~SÍóñxüšsgj5ïÿä¿ó¡öœßáÏÿðQZ»wc Iv†ÆkAn¿»•'ïç¯O]æùãÌÏœçéGnåéÏY–| jfS¹ÁC#çn˜®u‚ë7µÙ¹ÑÜ¿ÿ¿~—/?9Âû¾N>Ú¬PU~J­azj½mËü·á v„éìlç3÷ÿ»ÒøÁëÏS ÿ _½ÿˆÇ"W¯( Mä¿u2àz§ß<·U4HöRnš_ýúÿ#:Èžøc5“såÓÈ)¸<Ÿà¥éïžâ×?=K$t‰o½Ñ`ªÄ=LPæÁû¿È{ç^âÙ™?á?ýò¿¡³£uÍo~œº)-ÐücccضÍìì,ƒƒƒX–I>¿@&“arrÏóÈf³hš†ëºôôô ( ‚ PXZæ©o¼È²à±GayòC<Õ¥·ËæÄŒAk›È¸ÄÞ¸•l{”ϧÃôµÿˆþ>ÁÈ•>Æ0‰Êñû81|’Xü9~ï—ÿP(Øl l=ͧ899‰eY´µµ111Áüü<333ìÛ·z½N"‘à½÷ÞcqqUUI¥R¾aóûöä–]Zâ ®xŒÚBW‘Fêµ*NL$"Ê|öк{˜\nŠ7Þ\@*¶‹ä»XòæEÇkåÌåß=ú×üæç¾ì³ê¶P@óýáÇ7$÷ÆØþ;îX#zÇaèì^<3 ‚Öö)©ä3"!(¹ìL™žyõnáS‡ ä?a47NT•™ÝÇôlO®`ººç"ÚÏp4ô6Œ?HßÎh:¬m ŠzžÇåË—ÑuÝ·Ä&&&˜™™ño5tÖˆ 8ŽÃýÞ[x¢žÀ¾¶wp§‹”—gШkKÌfÁš£·kÑÎ15ù†¢¼ô>Gyi/a5Œê8†[¯c™H.“S;ùÁ{/¬œ~S.b[(Àó<†‡‡Éår\¼xÏóX\\D–evìØAKK |ð<ðgΜÁ0 :ÄØø$o\Z^Å]@°uªº†\ϱ)V- õ ®#ÒÞQ"¹ô^7g‡§-Ãq\LSÇ2L ÃòVÌüÂb+cæß²Pø ™tÛ¦)à¦Yà¶Ûn#“ÉøAËÁÁA‚Á ’$ I¥R´··óè£ÒÑÑÀ±Óâ xæ÷²;ý!{EÍÑÉ×kTË'•b†T¦DÛ61tÓ›ËhZË2Á(ÖüôÒ:3éí ™×c±õzŽŽ ॥]×é,²Ù,’$‘ÉdÐu`0ÈÐhÞwÏEÅ•{_H±¯WÃò\J¶ƒ¦Aµâ¡È1ê•4Kåÿ@¼5…ë¸X–‰¢Ô1 }%d.‰x¸ yX–ÅÔØNìÁâšLÔ–†Å›QýðÃA–e"‘’$Q.—Ù³g¹\Û¶dll UUÙ¿?S…2x²,¯DŒ”(E§‹Zè ŠîRžMS¨þ¢¬àÊýxöwiïîAR#Ø–mèõº®¡È ¢(áy¬ö*3s,—×Z…Û–ˆÇãôõõ …P›|ùl6ËÄÄ»ví"™L"‘HÇq0Ì•PV "  GÐìÏòÆôþeü \ãa2{'mA’$Ìb %CR;°,ÓÐIVE p]g¥;uÝ£T‰mÍv@6›%›Í^sÝ#<⇾‰®ëR.— $dEF ‚„"1Âáû¨!jæ {EìxÚÄŸNõÑÙ¿ÑûŸ˜Î°R7nC ˆ"°âZ–‰mYئ…eÛ(Òµ-Ö-¥AŶmªÕ*…B––zzz°m›J¥B½^GE.^¼È‘#Gžö?-X(j`„`ˆP4Žšxˆ“…(­Å?¢rìS(ê"ñÌó„Zö"ò%^Çþ•¢‚©èï½Â©“_ä¡;ÒĢѢñF( ¹]¾|™¡¡!r¹‚ pöìYFFF¸tégΜáĉ¼öÚkÄb1Nž<‰(ŠƒAŽÜÛ‹Œ½ò'ý¹„$(®tI‚p"ÆŽý?Oª-„„KÅq).ÃB– P­@8f1øs/¡Wl3À¸Í¯/Úv-pàÀ8àÏ=þøãöðÃãy¡Pˆ½·îæ çgxyAü¨2n½¦R¼zeöÉO.ª37¥Æ H‘(´¦7ÃÈÈ¿ã7ÿEŒ¾;|¸-2 ˆááaªÕ*™L€îînÎ;ç“üÒÒûöícjj MÓH¥R~^àñ~Žé¿fœV_š;¶‡k x86&Xu…%»ñ‚FÞÑ©j+N¤ i®1?õKüB¿ÌH4#‹ Ê+'l™uæF‡˜:û\yå¿ ÜÁ8Èâçè =Æ~òSìèé! ®±ÿOž<ùW=ôÐ×I@Û(G(Þ¨ X_ µÙ(RóX0$™LÒ·kGö ¤Îÿ%‹#¯R-•©–<ªe¨WA×À±B$2‡(NŒ¢+ âɯ(ÿ6wJûù·‡{Éttø^èfO}K ¡ ‚^o Z[SìêëãÓå*C?=Ãøñ³”»éÜM(ÑŽ¤¨x@qú4z~”ƒ¿M¢¢ÓŸIr÷·ÓÝÝE$]þZïµn+ŸŒP(D Ý]Y.]™`rþå܇˜®„-©Ä{ü‰ˆÊî®Vúwö°£§›d2ª*W…Þo„nZ .//³¸¸xUf¨^¯ …6¢.‹Åb(ŠB$!N§ØC¹T¦T©P«Õ±,ðÐõ:‘p˜ÖÖÐß߇¢(W>ׇ޷5"´¸¸Èìì,.\@Òé´_#¤ë:š¦qß}÷Q,9þ<Š¢Éd°mMÓpœ•PÖüü<LMN!+2±XŒÎÎNt­F¹V" ±¸0OæöÛ‰FÂüð‡?¤V«’Ïç9tèétúšjzËXߢÑ(Ñh”d2‰çy´µµ ëº_:#I‘H„ÞÞ^ZZZüx}#Û»´´ÄîÝ»©T*ܲç¿NX’$:;;‰Åb~¼arr’¶¶6M6›e÷îÝ;vŒ0??O:¦R©øå2®ëÒÙÙI¡P`zzš'Ÿ|’×_t:M©T"“Ïçý*ÒÖÖV$IB–e4M£Z­®)ŒP…jµÊý÷ßÿÑÿÅm ‰ÌZ[[ ÌḬ̀¸¸H(BÓ4ííí¨ªŠªª\¹r…l6K?–e¡ª*sss¾0lÆX,F>Ÿ'°¼¼Lww7±X Ã0E‘D"áçZZZQ\¸pÎÎΫø~³lÚ¬×ëÇÀu-¾ÅÅER©ÔuÕÐõþX£¢l£5Y–×{õÕWÿê±ÇûXKðKg2‰CCC `Y¥R‰ùùyâñ¸_κk×.dYö+Eu?¶m“H$H$~ô¨QQÒÓÓÃÑ£G¹ûî»™˜˜ ›Í …H$×ÌHo”¥Þ6-`£££$“IªÕ*/¿ü2™L†ÖÖV\×e~~žááaÂá0KKK$“IŸ¼s¹wÞy'ããã~’ejjб±1¿¨òK_úccc´µµ‘ÏçÑ4x~´'ßu†‹dú¨æ €èp$D‡`¦ß qBø`î0¯5MHeSs ‡ÃÌ!"¿9ôÍ×/<=¸Ò?ø„žáÅN î¨ ÝcÞ˜éÝÌ¡æÏ’€Y 0'YÖj‰=3‹*¡ê—|tlºNõn@˜Nš6Y’©°1È'÷|ò%HB£Ò<ó4¯bú=„/¼t·ÏãÃqXÔce^ZÈúåqÏ ·ˆ©Ù2î€dÔÚgv`{óÚc¯¾ñö÷üðëËÝuôr'9P^ÌrÒ©&âs_PÈ5w¢¦¬L-9ñ*í®fq»¹ùUò5ƒ9!\‚T©®f¿½,hN dLã8nÂ<ÇÑ’ó‰$}‰dÈ+X½ÙÙrÒ¹ä ÄÕ”–´-{€˜¢&¿ ±Û ·Â4ÇjVÝOÍѹÀ½qÉ¢ìÍ«‡c:ô‹Všä¢’U)›Íföã´‰š6(d‹j-è«“—M#¨‹ökðƒ„ùèãý gϽÕß|Ô4žæA'.kHjÀg¬Xš—¿ojѤž9:{å—Ÿ~¾Ê¼WÈnïÀþ®ÇD´èÿTðCpþ½çO﬷»·£KIEND®B`‚qpxtool-0.7.1_002/gui/images/save.png0000644000175000001440000000352211345701671016562 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÚ "–;†nÒIDATxÚí[Mk7~4š]“Ä K‰k¶,u m“Ää’“!´¦7_B %¿ §@/!ç^r+!ÿ‹ÒKJzjÙCrˆ!±‰í|œ@R ¾˜b;³õÐÕôÝw5’fv7Þ¥ˆ‘4Òûý>ÒÌËÇò±üŸ‹à ‹‹‹?¸à8!Ðh4þ~ûöí_ÙCâ¿Çèõ­[·¾¬ÕjU­5Ò4…q#Š"H)Q©T ¥„QAkÝu­µ€ìY¥Úí6’$A’$PJekEQ„f³ù݃~Ùßßÿ]ñEcB|Õ¹|`¹ÙlnÙ[Únh­?1Œuˆ:©µ>iÂI?„ÐZCJ™M$¥„”q#ŽcH)EQV©ðÌ\išBkÝŬaX)…4M³¶½½½ö÷÷¿°Lib4~àÏ¥¥¥ošÍæ†WZëãœ1Ît^¿aÀhÐÔ4M3†¨Ö©5¤iŠ(Š2 ¸~ýºÕÊnß¾ A)õuž2ÍSþXZZú¶Ùl®ùÐè!Œ÷ñ6Ã0×z¥RÉÌŸ[ƒy†Z€±›ðkP†Ú§BùÀo>ó¹@$}}fAcæÚh•ú·1gj!RÊ®16ÆMuê!+„˜äüDy Ú®óúø½!Ò˜9÷}3†Zé3Ö‘·.·]>šà‘¤Óh›ù¥Â0nÀ¡™ÛX­Zg.„f¯ؤe ‘,5mš¹ßSçëp óuÍ<ôÙ2Ú÷Á@¿êº¦ZæÚæ.a榖@µk[·R©@)¥TÏ8Í¥\Àgây P¦h< д™bҧϬ)`òf_Pwº@¨Iñn´kA xôžŽµ œÇ[v±æÂA°ŒÙûŠ´è÷0ˆ‘k+Oƒ¶øá£ÉEgì²€"æÈÍš|µZÍ€&fð¼î¾I•¾,㢰ùxžyqTÈû(ªäfÏ‘¡mƒ龡 V°åiç|šºL*£`˜¸ÿ>Úí6”RH’ïß¿G’$h·Ûˆã8׊ÀB8À…ÎÌýóçÏsµF™¦YÂhÒìô’$ÁÁÁ»¶ÃtÎ(а··‡V«U4h‹R8àåË—XXXÀááa—éqs|øð!vwwqìØ1«+ØÂw‘\³¦Î¥”ÂÎÎvww{Ruˆ5Þ àÉ“'VˆË xóæµGrç)MqõpAY /Ü‚Zû\@«Ÿ½HQ˜›Šì®B£n‘y½®«Á~íg‹]–QŸ€½èG£ƒ&¶²û $†©Ñ~Ìz떆§NÂåË—Q­VÃÎÛÑ{Ï™ÒjµðèÑ£àL‡DþÅÅE¬®®bbb¾Ý#ͼÚÚCÛBÇGQ„ׯ_ãæÍ›Ös…RPxeeÕj5×”B u1ÅÁOð:33ƒ™™¼zõj0»ÁZ­¤ùa3:/œ8q¦ýrPØ•!B e®Œ0òÚC6CAP8/"ŠØaŒõu—ßéŠÖ[[[X__ï!"ïוöø¸6ÚW¯×qéÒ%«P\Š ‚6ÍÏÏÏcnnîÈýŽøÞôu$6h_ÿná‹gAAîÉGÑß AQØò|vœ„P(úÞÿ‚¿I̋ဢtÓ ïÝE\Tû£hê®tëCA›¡qÂÀqÀ0ˆVp¹Á³gϰ±±QÉåe_ŸNOOãâÅ‹Vô…øÙ<]tvvgΜY·j,Ð÷Ûa_·Í[dkô}@ˆ´GiŸàú|nh›¡Qr‹¼3ŒBPص7!k…]à(޳µOØy€- •¿»ïó×§iã™öƒÎDu!”Þ Àµk×púôiÀãÇ­ loocss3Ö–…¹¡¥FgÏžíÀ•+WpîÜ9ÀÎÎîÝ»æW¯^ÅÔÔ ^¯[%=77‡ÙÙÙ¡ù{?Ò”åååŒÆùùù0”y4Ê[b_± `mm-“Üúú:.\¸06ç€tüÓ§O³·Ù/^¼° ¥'*4 ÍÆ;wpþüù±B­VÃÝ»w³í:ågssS”‚ÂEÓ߇ò÷A¿ˆðïÿì¦}P8”±£Â 6E !Zu§f. M­×ë+RÊŸÔÍ$“““=_m¸l}¡ã‹Ì›7VJ™}iJƾÓZÿ¸½½ý+€@€Lû´ÊŽ…ÈÎ}Ìú¤å:b×´ òK+¨F:¿)ùµUåøU–û6k7¡àÆ€¡Èr/LTæ>emT(Ú",óLnùï°ä]¶® IEND®B`‚qpxtool-0.7.1_002/gui/images/device.png0000755000175000001440000001254311345713070017065 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDöòÁdK pHYs  šœtIMEÚ 5 õñx¤ãIDATxÚíšiŒ$çyßïQÕ]}MϹ÷EíJ\®¸»¤ÌCk’ºc3¤%A‚väÈ¡lÙ @A+ çÐ%ˆd@‚“Bô! AVb'° I¤€"î.å’«%—sß=GU]õùPÕ³#2±ÍKN}€Õ3=SUÏÿý?÷ ·ä–Ü’[rKnÉ-¹%ÿŸŠx»n¼oÒïöųÏO1ÞZ˜_n.o¶ªJê{²ÌìÕRv;øÝ‡¼ÿÚÿólvb1õ "(EÕ$IÆ—ZÂ{25ÙÙNÒwÞúsBÈÛ¼·%û=" µ¶Êg÷Øû¿ãÈSG´ÿ×`Œ뛉¸þò¬¨Y-Nýèòòº}wj²ãI’žîÎŒÖûqà J ­$ÞƒP’~šbÒÔk%g†›•ÏØ·ÿÞsשþ_Î9`2Æõ“”n¯Çêêkk²^«K3öÆqLšöÏçîÌ2ã÷‡¼÷uJ!…R)€ù#¬s8ç°Öâ½Ç9‹w¼]i~el¤ú{÷üÌÝ[RÊŸ>›ÛGœóÄq9ëîÏŒ}g»Ý¥×‹éö¬õ/ŽoËàqÎIç‘Þy”’!Bâ¼ÃºPc ®PÜOB ï<¹úïAâzÕŠþÊ¡}{¾|`bln?]~ðäþm%ªýj–™¥F:Î ¬± ÀÞƒ¾Ø]·k ÖÚE÷8ŸßV1`Þû€|ñ{ðÅ}Ax›Õ£Ò÷ÊQðé»N¿{~t´éßnôàÃù Ïž=söî RŽ*Ä[ƒTYØ­÷gÖyl–á *ï )J)‡Ì©](>X?!»hî}:è¦æçãÔ|qzfñËÀ“o7;o17¿Äs—.‘Â#ÄÍ´Öbô•BæÊJ‰’rçg!%*ÐÔjªÕ ¥R ¥J ´Vh­‹¥ÐZ¢T¾´t€ÖŠ ()­K}nqí?üѳ£Ó‹ƒŸ BÀÜü<“—'±Þ¡´F”…²Z!•DÊÁRH¥‹¥PJ£”ÆÃÖÖ&ÆÂ0 T*£µ.”H Rî›ß[k‰Tò& Jàá@k³ûµ+/^ÿ× Kkco» <ÂôÌ4åR‰;NÊ@îì¼R*wh¯¢õàš¿¼BÊlÇ/!Ð:ØEw¿;ê „À{_8Q±ãP=“ùzk£÷&›¾:õò?>024S}(ÂÕÔK×)—Ë?~'sšxŸ›ƒ ïïù‡×ضRjG¡×Øþ.€(„ T ‚ P2“}¬ºÝ3¿hìfïÿùf»3Ù¬×Ü[n^ÜÔÅXË‹/¾Èüü|®Œ’ ¢0-Zæ´Jás‡‘G!ÐZ3ˆåBðšÝ¿‰•Dë|Ò4Ã9G¿Ÿ÷bÒ$ïQZ!¤VIj?¶Úê~}zfõ+«-ýÖ°Ë›ôÓ”çž{ŽV !H‘Ó»pjJË…¥,>ïòìß!¥Ê}ˆR;ÀÈ],ñÞ#eΖ4ÍMg`nJi¤HR*•ô͙ͭí³º¾õw—WÊo)¯I$IÂùóçét:è­¥¥ ªç;–BÂRˆ4Îçù€T…cÓê'– ‡*óïŒÉ€‚5ETPZ¡”DJQ`DZå) ív›‹.rîÜ”Ê¥ïƒ ,lVJ‰ó–4Mân )”Ê¥yUî屯ÑOóÔ?ƒ›_™¢R ]0G ^àñôz1Öú¡ínúOS³1Ѩ׾nŒ½¦µÊÞäŽâþ'lBÁúÚ O_<Í2””àóìmÇ~³Œ$N°™E E­^' CŒ1Äݘ~’âÇ[KÒ‰» ÖZÊ¥2µz•Pk*å2õj…f£ÁpcˆZ¥‚¼ÍSêÌeXg(—CÊåR¨²@|¦Ýî>±¸´ô«Ó³7ä›b€õ?Y“†aî¥,-.ré¹g¹û=?ƒÖç=½8Æ鯀(gˆ&@S‰ÊXç$žR=Ìó† OŠd^-â¬Ã8‹1|n‚R€ÒOž˜)) I RΉ¸ÛÙw;÷Æqûßî  ¤XÚhµ|µ^Zç!i@wQ¼äôô4Qqçé3(YäûR"¼Ï#AAcUh )Â@+´T;aθ.¥¿¾¸¼ùÍ̸»¬³%vek9-­µ¼på •J•£ÇŽá½C A•)…!‰õëi–î$R „Ôà]n.J¢%h%òݵ“¦t»=’¤KšöÉÒc2Οÿ!Î’¸ÏÈè0åØñcÌÏ.æÙ©µÃår¾)ðóõ#Ùüæ™î§þGË«gRîh½“Ј"iIyúâ¢(bïþ} Æy|?E‰(r}­8·c¿¡V(ÞYŒÉHãݸK÷è§ý~L¿ß§ÇÌÍ/ÐÝlQ‹4Õ(âø‰8£uÀá#ǩ֜½óN––6°Î !KoIKì›ßúÃ/\úÆææö{Ä®4nÙ Ì Z­òþ~ˆæèÂ9ÂÂÖ•¥$a ÂãLF–¥ôã½^—8‰1iFÚï“$)›Ûm–W—™™eeq‘¤³EI n;x€Ûï8ÁþƒGŸØËÆæ:[:tQ­Žõ­Ë¤k:ï}÷§n¼iÖÖ7Ä÷ÿ?wùù«ßèÅIófLìd`ÃÍÿØ£ 5 …À’e}âN›¸»M»Û¡»½E«µÁøøI¿Ïv»ÍüÂ"Ó3ÓÌÎγµµI¨$#CÜvð'ŽåБCŒO”#Ö×VqV ”ÂI*¥Ðfx¤I¥Úh‡aôО}ûž{Kš¢S×_ .>óÜ'Ÿyzòó½~L:À;„7Y òDâýÜËèÈ0Î6i¿‡ÉútºÖV–˜_X¤…d6!3’É+?¦Ýn£´fhhˆ}ûöspÿ~ìÝËøÈ(Cµ:•R™ ,Q*…h)0Ö’$ ½¸ËV»Ck«K«Ýf»ÓA %¥oÔß>tèàWΞ=ýÃeo €8N¹pñbpþÂsŸ|ùÆ/êRT•Bw1óWJ M8vh‚‘‘«+ËLM½€5–ë/¿ÂC>À{R¨xéÆu^¼:E7¶ŒOŒ316Asx˜(ª •ïÑJQ C•ˆZ¥L©b²>­õ«ë-V[-6;=:ýŒ$sk±ÎâC€‹¢òêÑ£G¿vêÔ_:÷ÞûÖßT[Ü9ÇòƒòåK—ÿöìÒÚ¿ê®HŠ„;æàlʱC{jÖyéú““Oó™Ïü„ 8uêž¿ôÍÆ/\½NšyJQ|^v‹¢´Fȼ0J“˜¤ÛÁ[‹Òœ#îuéöSâÌÒÏ Iša¬ÏÛr6ïT ÚvRËxt¸ùå‰ññò¿ù©ìuׯrzÉûƒ?úúÒúÆ©43ŸFJ=ȵò*.¯œsô“>RIÂ0danšüÜ#ï©T¬·6X[ßb||o^.KÒ`¥Ûév{´»mÚí6¡VT*¥R@Uƒ@‘%ÛluzH¡Šþ¤Ã;ó?h®¦6Z\^}LHùôv§óí/¾dÏÜsæõWƒùèÇé7†ê_ÐJÿOáñsY^Íc~F­ZåyçO_85†£ÇNÐíZöLìGëý~ÊÊZ‹ë×_áù+WyþÅsýÆ43³óÔê5FF›yÉ­5å¨DµVEiIT.qÛmG¨×*$qQ¤ß²È •yô©×*_°Yü»£{†ß»8¿ Þ0ÿ7?572Üü%åEÂíE^1–Ê•@‘öJ¥wÝu7ív‡íí6YfX[ßæÆì —¯¾ÄóW_fê•YÖ6¶è¥¡AI!¤g¨^!Ëú8ŸÏ’¤ÇööA?ÍhooS¯THú1yN™ï>Â#¤B*Å`(Ónoíu:/ª”¿*%·/Îνqêõ:çÎÝõƒñ±æï*¥b)óÅ9O),¡U@­V£R©qùòÖÖZœ¼ý$­u¥imµimwègR*‚ Di”TòßÍÍÏçý…0 3cÖz’8EIAÚï³°°H RkI%³–Ì:Œëe¾PÄqÕåeÀ¿;ƒFå=½^¯<è æáòý>dÏž>õµ=cC ¼Ë«fáˆãR ‚ 䨱w UȳÏÿ/>¿‘Z7»¹¹õp§ÝެÉiR.—°ÆÐëõòøl +ËË>z„¡FƒjµÂÊÒ2&³¨@¢´DùL (¢R@3 «—Ù3Tcÿø£ÍÕrHhg _”ÚàRuŠomÖ8wÏHŸ1uí ¯LOÇnŸ™ÙyqõÅ7¦gfG[Jx¾óºøÒ—¾Èg?ûÙ™¨Ræçf˜™‘G!ŠJcé'ñÎìÀXGk}ÃGŽ066ž‰1º½6BB%*㽡h¢’¦i†+!#õ õˆjµL) Bà¹IoÜÍò\Pô Q«röôœ>õ.Œ±$©AU!iæéôbfgçXomÐév ‚ÀW¢Ê÷5Pß•‰Â1ÊbT>¸î^òÌéSòƒüÐ÷?úÑþøƒø›…’yܶV××8ÿÔSÜÿÞû9xp?Z ”*QŽÊÌÎΰ´¸Dšt©ŠfT¦•(—CÂ0@©|Ɔ!µJ™¾É0Öâ „† ¨Vë4 šÍaJ¥€N{›4SXçqqŒDæìñŽ$NB’f)"ïØÔðW°ÓžÜµþ·Yãèè¨þíßþGFåèSõz]&IÂöÖ&™I½VÚZïÖšÍFcÜáCßyöŒºrùRHî»ÿ éöÚl´Z¤ím¤3”µ V*•C¤X“÷3ziÊv§G'µX`E€Cb¬%Ë Yšawuˆ¥,^½(ã­uÌÏÍá½G逑±Q7>:ú;¯fÀë’õõu¦§o¼rç»ïl+)êJŠN³9'Iozqiñòã?qÁ:Ûo5Ê<üWþn¥V=uôØmbròO?s‘{ï;Gsx”á‘ k iÒ£»µÎÜú íö6•J…°\ÇWëtûŠNÒ!‰SR3ýÊ ÃÃÃdYF­V£\.ïên“Ï3Š •††›„aH–Ð¥rPÑ»¨ý†@øêW¿úò¯ÿÚ¯}ýÄ;ßyðÂù “—.]ZÚÜÚLfffv·§ºCƲÖýÊC=ð®“'ï—.=ËåÉg8sæ>ŽÕ…Y–æØÜØ Ÿ¥hš•Í-zñ*™1;;*¥$é§L^¾Ì‰ãÇñÞS.—wÆq;£úb~a­ÅyÏP³‰Â½J¥¼µß^+€wÀPy3`üyòàƒþkÿèo}øCÜ'1—/Oò³?û>&öîãÚ “¬¬®ÐÏ%Êc¿É2.=w‰Ó§OS­V ‚`gŠ­•*¦[}⤔’@kW­VÖJ¥òZ‡ßÒýð왳.6CÀxF(Î ½%c()Å/ÿÒ/ÞóÞûîýÄG>üáÚÂÂUêcƒx-mxRJï=ÆcÛQTNnܸ1ÕétWŸ|ò×A¤/¼pe#Ë2[(i ðÓ‚½ýâÚ+Vè×þ€ oô ßõÐ?ópiñ°­ý°`̨÷~ÿž:¿üÐû>°XŠj£ZIð¾†alŒY^\Z˜RJµ¾÷½ï>/½ÉÉÉõ8Žw+—»ïR>ÝõnƒÍp¯=Êòç´ÄÞq¯ò-¯„a8¼ÿ¾OëzJÊù¨\Z^]Yyöé§Ÿ™J³þÆw¾óõW)d^Å2ÿRì/ý´ø_D>÷¹ÏqúôéÛqý“'ßµváÂ…Îc=æ¹%·ä–Ü’[rKnÉ-ù)ÈÿÞæµM®(RIEND®B`‚qpxtool-0.7.1_002/gui/images/scan.png0000644000175000001440000000564411345702571016557 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ ),-§´ $IDATX×Yl×}Æ¿3sf»+ï~/ÉKR¢v‰Y ²Åš¶„Äqk8Ôv Ä >¦yˆS?uÔoIûf ¶’·6ÐN½ÄH¤È‘bÃ&%#ÖFÉ”x).âÝxçÎ]g=çôK%+±;O³s~óý¿9ÿïOð%‡$I$‘L&³™Ì(¥tP"¤¸c´¸{ttd(Ÿ/ ¤³¹ˆ¦B’$S±dšÍ‹çÏŸûÃ[o½µÌ9g¾â ê¦aÚäääÑcÇŽ™‡ŒÝ’,Å „Ì 8‡çùð|±hã»v#™LBUU}ÝüÃ×ÿý…^xÇ4M÷Ë@îØ¿ÿï}ïû/|íkqRÕÔD$F<G$,Ë`Œ¡Ûí²,´;¸®‡zµ†L6ƒxš¦R Bîܹ3súôéŸ<ÿüóà_ ðøã?ñÃþÃÏÒ™Ôx<榳qUâ.í€wúà„“dÐPTÓ"¡aš¨V«(¯•!Ë2Ž?Žp8 I’½^Ïùè£~úÌ3Ïü›ëºÞä­“éG9þO/½ôÚÈHqw±Xôh\Ò:A´:wàµLV®e¡Ón£Õé gÛ DÆÀ@ù\‚•rF;vìØPU•ŽŽŽ~ýÑGM¼÷Þ{ضÜ0:::ô//¿üêý&Ò™ŒW·{jµ_G3¨ÂaM0¿êú „„@’À‰ @Ótò(Š‚……|>™>|X}ã7Î`ÛÏà©§Ÿþ»ÉÉÉ¢nÚJe=@­ ´l="ÁÖ9Ü@T@‘JIà œ1¾Î9víÚ…C‡ðúë¯Ã¶í{¥–eLMMýäÔ©SOo­ R6—Kœ8qâ[ápX²¬6Êë>±,ÝVýözn¶¢Á° P@%c×…mÛð6`tdgΜÁÒÒÒ}†SUU>qâÄÏ{ì±á-ÿÉŸ{î¹)”FZ­.ét9úгx¾ N(dM€j úMÕFV׆íùðüžï1UUA)Åñ'0??½{÷‚{4EQ"ù|^}óÍ7Oà4 (¥ñF£±¡Œ×ÂPO‡Ï 0dàPˆ³¶Ýf¨”›Í…µÆr§ï¶4]—ŠÅbêÀú®Gu]G,ƒ¢(`ŒRº½8cl«Tß=zôèÏggg—(!Dk·ÚR­Z&ÙLTò¡K@Œ*pxEÐŒáÎêÈ„²+¿¿0k5œ¹T*Å4]—UU•ǹ=77·‡§Rétñï*‹Œ1ø¾ `Fü©§ž:9;;û u]—öí>5M ¥ ²‰!E‚&<ð°¾ÞGà1ûñ…sŸžÍÆ]×»ÑhÔUUJ‰Çãñœiš•r¥âŒŒæÚí|ß!œs0Æ\×…çy(‹Ox6›M™s.ë†@‚¢j€à €0 –×@u¡t+ª*W4MÓ‰dMUU®ª Qº®»ñø€p]’$õûý¾ètÚ¤×ëAÎ9‚ €ïûpŽãÀ0Œ Ji˜v»]¶ººJ†‡àºM‡D‰vahÔW.% 5 5 ÃàŠB¹çùK”R-™L>‰DÒŽã0EU“·oßfŒ1jšæ}žçÁó<躞.‹ƒ4‰ôK%òPª€#‚L66× ñ‰DÍ0 % ]×eBÈ¥ñññ…D"±‡s!1hžçE-ËŠÎ|òq«P(DZ­–¢* Ø]%‚žçA!§R©$ÍçóBUU\¹z‡ÿò‚Mçº"IC϶ÙÞ½{CŒ1=ð5M%ù|^/ G}ßßßétbµZ}`ii9;3ó‰´¼¼¼26:ºËql¥ßïox€s° @À‚`ÃŒº®Gh³Ùì:t.^@­^E>—G«Ý†®$B I²J©’4‹*²,KñxüIJiÇ÷ý‘^¯?Q*•ògΜ–oÞœof2ÙR4Úï»»Î88Û.‡ëz¨Vk=Z.—›ÉdÒ›84¡Öj5ŒÁ÷|ܺuÙ\©d±XT¶m{PQ”¶aaMÓ¨,ËÑ~¿®Õëé‹/èCCCä?ø{~ê§*U†¦+„sxNœ\p0.À8g½nǯժ&­T*õn·[;räÈð•+—±¸¸ˆƒ ÑXÇï?8 EQ044Œx|`_(ZªmÛ’íØF¥\Q/_¾$·Z–ˆDBرs—ôãçÿqüw~½cq¹ŽT:ßó!8œ‹mˆõz­ÒjµÖ©¢ßh4>Óu}ø¡‡Ž¡T*áâ…O!„@¹¼†k׿@ˆ„t:¥æ …Ál6 ]×àyÚ­o/:õz}½Ù´bâìÙØ“O~[}æé¿Å¯Þ~ךØQÌ@}áƒs!88ç¨×*—ôedhh(>==ý7¡P¹\…B½^­V ½^ŽãÀó¼Í]óN§k¯®®4çço.·¬ö•ä§ssW#åµµœišÈå²ø«©cøãå˰ú:ŒpœAðŒùxÿ7g^Y(-Î4ï9wîÜé={ö B@ÙŽ^Õj•J† ˲à86ÆX¯Û+K„Ôt] ¢š’ê·cïþî¹Õq011“'¿ƒñ]{ñ_ÿs’>Žá|ŠhCFÕµ…;/þó‹ßdŒÍË„ïûÁÎ;><µ•d$I‚®ëH&“(‹Ø½{7&&&0>>Žááa)—ËŲÙL! ÅÂFr,›’öïÌc~e‹‹«h˜ d3Y<—~¾ÿ5¡P(ÐæÍ›'vï¾ù>":ùÌ3Ïœ{9;ª/¼VJ ü濺ïÿѧ>°gݦ‘£  å® h@ L#d H{4wzqjè—¾sŒ¦ zÕ—R Zk ÕvíÚõ·lÙRØ»wïÓiš¦—ª}©àIÑЇ?ù‘ÿðv×'+µ(ÔÚí6)% äHå–ÒUAHCˆ@^ Nþ.x3xãîçÏûÁ¯rHD(‹ÁÄÄÄ;¯¸bËàO<±¯Óé$—B‚¾ðÆ#þÔ'¾ðÞÜý;a1 Ò"‘‚‚#BÓà_ 4¤ ÞGoÚ+A{S0Ú9Á 0«vÿbà{Õ`ŒQÛ¶m»qbbbݾ}û~Òh4:#A_TöÀÀ¯þî¿üÜí¿öÁD¡"­R¹ÂÝ&+tAë®)hÀÛ¾( ÑÚ™ò$h ý.›À7Ú@õϽÿ¥’°eË–·­[·¾öè£þü‹Ï?ÿü‘~SÐ}»h­Çþñ?ù×ÿe݆Më Ê”î<¹×м?è†}P—4eœ_lazn Úqš!µYÆH³ q£Ói£Ýiƒ™» ÑÅ@÷˾ÿ³Ì cŒ©×ëW}÷»ß½?ŽãVoÍ ûwÿ†v}ðýï»ï…P+"‹zâ’9•S±ù\-O¤ ´‚Ö€Ö€!É3Ó˘™]F'Î  nIܵÿ¯È)+MS4›MXkE´¾ôŒ½W"f3£Z­ŽNOO¿ôì³Ï¾ÜS3t P¥ÔðG?üÑ?Ú¼iÃf£Z1´²ÐJºËåúÔõ+R;G¨Ú6¦ÎÌ#3—Ãm´ãôÄ™³ GŽŸœ{íµ#3ÇOœ\8?w¾Ùj·ÓR©‹EMä2É,ËÐjµ†!Â0¼,ðùîç €*‹cßùÎwȲ¬“«Àô`®˜¸õú뮺)Ô@€€ÝR «202°²`0XB€ 0)XÒÈ”«üÎÏ7Ñ™m R :p)ñÑïÏï?ôò‰ÉÙ¹× …¨EÅ$ VJáô™3”$Ie¶zÅ›×ÝvÛm[®¾úê3#Ë2LOOcxxÕjuUDèÜû~ÜZ áÚk¯}Ç=÷ÜsÛ<ðÝ\ºÇó—ÿÁ½ïûôö뮹Áh"—jb 14 4±W†K€”òñ^œ„›‹KXšim­åV|ÿ_?þü3/;D¥S### õz}¹V«µªÕNµZí ¶:Õj¥Ùétf:tæØ±c­[·ŽFQ¤ ÝnCk(Š.ª‚¸µ¶ûœ™!"Ôl6ãG}ôQIN \ÿáßøÐŽŽÔk¤É92‚‹ígýDt}„ó I«åÙiƹÓSËüï<Å££££‹µZ­900HƘ €ŠRª L¤Jår9¬T*q±Xl•Ëå¸ÑhÌ=ùä“36l,ä$äÎñBÀ{w>˲U&eY¾¿ÿýï+Žã%œ+ °cÇuïýÀûîùx¡PPjURÐÊ'9$Ýer%ó ŒÅÙ3€¤ fÎN.ïýÎÃ362zvx¸Þ¨V«PJÄq¬Œ1 •Je®R©,”Jå…0 —Ó4I:NUk=X­VÛQµŒ1­ÌlÚ´iýÀÀ@Á·ÅP*•VÙyÿ®ç;ÞkišÂZ c‚ꫯ¾ràøñãG¤ÚË¿tÏ]wýÎõ×_cÞ§[YäÓUçà4)h-ÐÍ]%4—fÆmhEè´›éÞÿïÆGG_®7J¥b¥ÝnW …¹‘‘‘¹r¹œ„a1bŒ–0 ¸T*%•Je)˲N³Ù¬ è0 —Œ1ÉÁƒ—¶oß¾9ƒŠ¢è ï."°Ö"Ë2¤iÚU 4;;;³oß¾HÉ›@´víºkÉ#½+ïÖj£a´†6cB#Ed„ª Û9‚NPО?ð×ëCµÓCCCr¹Tn4áðpýL­VkkmDkÃA`XkÃÆ¸¥µf­µ ¶ëõúéùùù Š¢Z­Ö¨Tª§yä‘—sPKKKˆã¸ *Ú«€x>¿23Ö¬Y»@®UAmtlté¼cc ´A—³ÒÇ7Æ52Œ'Â@/ÁPŠ‚N±8s²¹87ùÂÐÐP«\.S³Ù¬Ôëõ³…BÁæ`sÀÆhÖÚ0±Öš‰ˆ‰4AhGFF^_ZZ*GQ¤‡††ZÇŸxáäÉ“Í\ÎËËËo}/è$Iº+ŸnxxhSEƒ´ ‡‡‡×ŽŽmºvOäK_ò‰0)×çñ¥ožp)(¤i‚À¸ˆpìØ+'ÆÆÆ*•jl­]kL0E‘5Æ0‘­I”R (-ÂJ„Å%CdE@" ¥ˆZë)f^[,OŒÔ:t||||‡ˆ`aaQu_¯̉Éw¼_!µZmlttlÃéÓ§NT¯ŒVª•"™•)M—¥@Êgz8)å*B ÀÌ,3³3ÇÖ¯ßÑ‹‹‹266Öô;.Dšµ&¤if§§Ïíß¿ÿÑ×^;’ÜrËîõ;wîÜ]¯×™I&¥ˆkµZsaaAJ¥’)•ÊÉ©S§Ž6›ÍíÆ•'Iy­ÐO@¯Oè70 µZ­~úô)2t¥R ÃPi·ªúJÒVvŸ $‰33³30,̋Ŕˆ´Ö0 …ˆ„H ‰ˆÐ¹sSîÙ³çTž}ã§:thòŸøÝ_¯Õ«"J”ˆH²Ì.cÃ0˜ÓZÏ;w®=::Z€v«…Àgˆ¹ãë"‚™¡”¢R©8@ªT*ÕÀ+£*Ê{tÁJÃ2ü Ý Ýk"‚ è @«ÝiU*•f†ÖZ[ˆ¢¨íd勞µ&":²gÏž:½ëèÑ£‹/¼ðüOSq›*¢µneYV$"EQs~n®•¦Î¶;2oïYæl?M¤IÒã »ñ¿K”J¥Ad¨ju`Ðøn¬«ÃÉ‘‘×å}C‰Ü Ò4E„PX$+•Ji’$ …ahW~„H©8ÎÎH}*Ê=…˜úéOzö¶Ûnƒ¸W‰DÊ2³QJq¡PH[­–µYAœÄÐÆ"`‘îµ ™Á°–ß`Q äµY–· ú×'3pÝ È2ëe(ÃŒ1BD¢µ@å­p¥@DR.W"_“sߨÛ^yå•…ü='gWÄh­Ååôf¦4M]œÏ2di\Õ«Ipä„X0¯˜GÇ)àa4›Íå|È7'ƒžÕV!D†DQäß/` :XËšH£P(¤iš"%y»ŒH3‘Úú™Ï|æ‚¥ÝÎ7\«”bgÇfŽ´Ö13#M&̲Y–‚­E–¦H³YšÂú÷m–:r¬3çüxU¸\\\\Î¥'Fc €ôOeÃ0| ½£+c Šž€ 0:6Z¶6+) ‚ •eYÅUhy•ÆPJ MLLܵgÏžbï„ùÓŸþý·oÞ¼ùš~¹–J¥áv»½h­¥N§Sª”K%›eà,ƒ‚ÀÚð ðîêzþ l30[3²4•ååF€Üh4ÖZkÜã £éÞöto×Eùt†°6Ãðp=(•JDä|„B!‰ã$(‹‰RJy/ÍÆ˜k×®]»îK_úÒéV«•h­7DQq4MSb¶JD3£Óé¥R©Çñ‰,Ë´VjC¹X l–ºp- ›:§æÕ€¹§8ò¦äÞs¤vâŽm4–—0àÉÉÉ©¥¥¥ÅÜò]¿Ð˜*mzfy¥R Dî½­[·^—$©"R200°4;;Sïá ÖZJÓT‰È@¡m¯Õj¿R,:ðY–³ÀZV"Œ 6Æq< @’$Uõúèu™lÆŒ³íî6gl–‚³lݲ6u;o-˜ýÕZœŸ]:þüdN€]ZZš››››Í§°ùp²DÕKP/9ƒƒƒÝÏNLLlhµšë­e Ãð|¥R)Ÿ;w®–÷,˜Y–QǺÓéøë4MÉË_13â8 ‚ ˜$é¹4Íh~~aÃøú­ëSKH3 P(!Ëìm›maG„Ø|Ù.b­w„333çâ8ž`ÉåÜœœœ<Ú?‰Í éÝùÞp˜“S.—Q,aŒÁàà Þ¾}û­VˈˆªT*g‚ Ÿššbf%"JD”µV¥iªÒ4SNö¬DØ¿Ÿ¬)—Ëë–––0³êtÚfxÍ•ïÕ…šNle*PAi¦‘YÀZqN.³°œƒ^YÂî vÄLNž= ™`$¯¾úê zrý†yü…º®y[jxx¸û{Û·o_[©”oO’J)[©TNDQTŸžžÞ²¸¸PÊ2»â!•eVµZ­ª1úº j‹‹‹/b³,E3Óï^³åÚµ‰„ˆ¥€°²qVBb Hlè‰P°àL`³\àu°E–%8vüøK¾#Ä&'`ïÞ½OÍÍÍ5ªÕj¥WýÉpÿ{…B¥R ­V A`÷îÝ7ýä'?i¥iúd\*•Nh­˜yÓòò’Ðf攈ˆ¨E///OŠ`É‘’©Å¤õÎ+ßþŽ›¡Y¬ê@a-ÈI$1”ľcºïÄè¦Ââz› œŸ=ßzþ¹xl·'¸¼¼¬n½õÖ[·nݺ¶×ѽÕl®_ ÅbN'ïë«5kÖ\133Sm6[§´6VkJˆôœRXRJY­µÀiš6“$=gm6#" ³Uív»`ƒÎû®¾qb·)„Š  ˆêè&X6°¬‘±† ‹‹‹yð™ .!¶xöù_zâÉ}_p@'o‹k ÆÇÇ×Üzë­»Ã0ì‚¿”¡DïgŠÅ"Úí6DZkµvíÚµ,|ÍÜÜ\ËZ;çKaQ ©ˆ´EÐVJ%>÷GǦÓ\¸fÃúò‡¶m߸U‡¤ †Ö­‡(ËËì—e‚ +± , ÿJxÍ,¾óÐ÷¾qúÌë{,HtÏA©àõ×_Oî½÷Þ{êõzѳ Ø[Ñÿ¹R©ä ” J)Ô†j¥±ñ±k…eG£Ñ¨5› lj²–Uš&A«Õè´Z눓]cÑû¯»rýÛGê%(Ô4ê›G£ JÀ¬`YyÐÖæ*pdˆ(÷šÕŠ2XpòÔ©Ù¿úæÿû¢µödîϽ-€ÎÔÔÔ±‡zè‘mÛ¶ýÖ…œÝ›‘Ðïˆccc˜››Ãüü< @1*bËÖ-CëÖ­»¹ÑXº¹±¼Ì­V+³Y¦ŒVº 5EFA‹!ƒ¤4€Ñz …5´©!†fF&€Â˜ lFP¬A¢Ab@è¸çˆABOì{ê‡q÷hw.Ðû0'NœhÝwß}÷ÔjµÂ…ìÿb&Ñû÷…BÅb±Û¦²™KM‚ PQéb¡ (M®¹fh C¬¯¡\ ÀÄn £,DY?°qŸ“»ßqq¦a… ¢Á –¦¦&—¿þõ¯|>MÓ£–|E*ýÃQZZZÊ֯߰q×®]×cÞîBQàb£ªb±è³ErŒ/P¸;°`7Ï jåÖ U1TŽ@Jº“)V & V g²ò#ðRw$04XVÌ"Ë?üÁ7|õ•çþÀ,€üöªáh^šÒsÏ=7ýîw¿ûÖ5kÖ \ì„ÆÅÆÕ=³9h­»ª(‹(•Ѝ”K¨”K(Q)P0-Å %nÞ `°°bˆvWV QÞÓûcG‚øåœ¤àèáçÎ|믾¸‡™Oäί8ºêÑn·³¹¹¹äÎ;ï¼5Š"ºTØÿèVcl!,È|wÆfÖWf¾¡é«4a % ˆ1ƒÀ»]¶JV”›‚‹ö®÷Ï Ðh,gßúŸÿîÏçÏOþ¤÷/D@wÚxäÈ‘¹M›6oÙ±cû–‹ÔÈM£÷3«æsârö¼Ee»&uósf ±Î(fG€°ÏhÜn3üî“WƒWANDÜQγ3ãÉG¾öØ3ûø*€I˽»ÿf ×Ýìß¿ïÄÎ;ß¶yóæÑË™Ñ÷Ðߦ^!!aùe-À  %Ög û¤Æ“@â¦Ó9xåÁ«žã?âþÿöïg}ýÿX„˜óÞŸ/å”8ŽÓœz×»ÞuóÈÈHåROkôwc»­éÌ®êÒ8àìsuî:DC‰W‚ï+}ï ܯ(g&Èÿ‹¯<îÿüùgÿcšt^0“Çý‹BÏI*À‹‹‹Í—_~yú–[nyG­V‹ÜM ožô¦{gtY–®jQqo4'ñ&àœ [öÎÎí’@ !§ä>B“ÇŽ/ü¯ÏîóKsç÷8祟^è8ý[é:Oì™3gæžzê©S7ÝtÓ¯ —úÍ!w½;ß;°ÌGV¶Ç Ú¾Pز²”8_ ò|ÖƒÏI1,3N¼ttöËŸýž٩©½ÞîÄ—{P=*ÈØ©©©ù}ûößµëÆFFê•ÞÓù.÷¦{íÞ52mV:4.Jä‘Áb» ‘îu•£ËÍÀ;G+¯>{dê/>󟛟™{ÒƒŸ÷àùoC@? Ùìììüc=öÊøøøÆ 6Œç}¾ §s»ïަ}7Ϲ»û"î¹³_ÎA Ä9ÁœlGègÄI"~{ÿ³ÿíßýO—?íßy«c²—z\>7…@º¸¸¸øðÃ?×h411qõ¶B¡`.4—Ëw>?˜ù«ÏÝüÀEù‹p·„íú(OHîìrðç¦ç:_þâýßüö×þ濦Iú2€©K97LäJH$ÌÜ9xðéÃÏ<ó̉Z­6>66V'"%"«€÷LèÎñWÅîÉÌÖׯ9xbYyîF&`a´Ú~dï3?ûÏö¿|áÙ#÷8å^nó¹÷ å·ÌʆŒhmÖÝ}÷]w|ìcûÕ;vl4ƨ\«¦²Þ VTàýû†¥Xg3ˆ-ˆ- gÁ0>3´i"û~öêé¯Þÿƒo¿xøøãÎú0·àC]úV6ÿs»i @ â‰¨ …uwÜñžwÝsÏÝwÜpà WU«Õ ÿ¸÷`}òÓëüœd(¶ Π…aØÂ°ÅÂÜ|üô‹?;òðüè¹ÃÇždæ3¾«3 Ñ[â^ÎMSÛ“ÈùѺÀ5©0¤”Þ¸qã5·ß~ûî;w¾mãÆãCCC%"êñ¹ä3ˆeï3G‚8Ø$ÆÜùóí“'NN¾øò«/ýèÀÁ/-7ûŒnÞK}ÙçöÙ¥Jþrã¤'"PP0 ª”¨VÖoÛv嶉‰‰«FGGǪA„®b°µètZÉÂüüÒüüüâôÌ̹W^yíð©3gŽÆq<éå½ìëøe-¿ãé/ëÆÉ7#Â=EOHÉ?DZë"D„VHN˜9ûkÛƒmùç_Ìdn}«›§É“øö,ãõüÿ«ò 2_ißy‚¿w7O¿½„èžçÔs‹}oÖ»ìËÏû‹þScÆFªî‘IEND®B`‚qpxtool-0.7.1_002/gui/images/edit-redo.png0000644000175000001440000000311010766566244017504 0ustar shultzusers‰PNG  IHDR szzôsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<ÅIDATX…ÅVilTUþÎ}oÞ›7í”N $ VHB²‰ˆãš\5ƒ1þ1ÆÄ`Âþ0ŒÈL0L'h¢(."ˆÔ*J[*ÐR(‹¥ÓYÞ›wïñGg¦Ó–%Á“|¹³¼s¾ï|÷ÌÜ fƵbíVcÁõä33®/¾ †ÍÕ×SມûªÊ'4<ô¡ùäÿ"À#L¼¼f³uS`úÖ‡¶y_½á Ü¨ÄK«6ùn?gÃÃy7ÝpÌŒ³ÙF<¿t£uÇäúþÈûI0lê7Lt;gðwêÖ-|ݪ›ñ@PhôU0lZW’{ÅJƒas€'„FsˆPÃŒ©c}“•‚+ áv¡¥wÖÎ}Ñë·*—ìýý㟃asE$dGGªKÌ<ñ ¡Ñ›†æ{tþÌÚ”ª™ÆÿtŒñN€©›8Ÿý]ÙƒÏ{Ejü«pìì^w÷á÷Ï)ÉK"!»óªæ}à3*žZ|û½ÆÜÉ+µ´ŠA²¬êEV&ár¶d®GX¨ñ¯BÛ¥cjÇ£R©e‘ý× †MShÔP3iÁò{kŸöv»g‘=PœÑ­üÐÈÀ­å+q±§ƒ?Ü÷FÒq5‘}hTÁ°Y!4úfÞ-«f/®¹ßü£gyà~˜ZÉ.22—H¶áª\ßÊ A:4è0„KǾˆ?Î}Ïm‰1cj$d÷äó B¡Ñ{ógÜ5gþÌÆá耆°• 8vGF&Àyv騫z§£ÇðùÑíIfÜWL>D@0lÎö[uµ3–ûÿÙ €Á¬`«ÞQ óC#W?‡l*Ç»~ÜÔã¸ÎòHÈþ­Ô³„Nۗ̽ÇÛ–:€ŒŒƒ@ƒÄy0Μ†ñæ­(×ÇÂ>èäAkï~´§þWLÔ]D"λn‰ºÒ] ÙÍÉ ›³ª+ÆÏ Tè×ø×@_ÿ ¦øjq³¯Ý=]8ÝÞêDG²¶“!ðZk=«ð õÕëq©»Kí9²í²+e]$dŸÉ­|櫯]¶Û Xö9BfUÜ;åâÓ#›3Él¬UIÞ Æ/¢šÐ\€)ʰ°êiœîj–ûw—RÕEBö¹‘È –ùý~o{qðË)Ö¸Ü}‘4~Ý­$? Ù_å'?²­ ŽLÁå¸3ðš;šÜŸþü²]I^ Ù—F#/@@­ey“g;ò¨r|ß´'Ý_ðdq23Ãá4îs?Ž·Í5¶lU’ë#!;v%ä@áaÔžÌÄ ú?òj¸ÐÝ©Ü=¥È‘üÖ|Ønl;ؤ$/¼òRò‘x2ê 0…L%\%¹e¸dãÐño³-M‡•䥑Ý{5äÀ8žH$²ÀV½ðXš.tZ4¬VèèjûNI¾;²3WK^(ø1O ›v “G¥`Ñ ‘¾86k‡Éß¡$? ÙεEgA0l®·ÊÌw§ÏWî¨<ÂB&Æ|¦åBgº[-ÛûZ® 䦑ˆb•WóÖ(áÌ/¾…í¬sòRWLiÈ© ¼¦‰S­jñëÊ·< Lfì{^çÁ(yˆH'¢!7°ˆH¬yϸͬ Ÿª&™VÕ$¯B:.ù\K2q¢Á×ú…Lä;Q¢s•·–sŸs"Ÿ€øò§5vJÍ‹vÚ'Ï7§ÒJ2 «RPY@·¦.ÏäuWªsO?ô~hEQ©- ´c®óØö\}oÔmhoJ¦R±œŒ‚“Q2—Fg!=O„‘G&ò@yk)ü·ôc°Ðê·=[•b=À³Ü,v|'·!Þβ¨PÁÐAóÞeæ!3@%º©£k™·Pà@Á>ô )E>Ä¢à(p¡˜oÔkyÿ¬ ·‡"JýþôÿO .nïŽeIEND®B`‚qpxtool-0.7.1_002/gui/images/password.png0000644000175000001440000001250211345702200017451 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ %$ÉÔŠÂIDATxÚÕ[il\×uþÞþÞì+gHޏš"E-V$K^[Š£¢Žj; #N“"‹“BEû£­á ¸E€Š4@RÄnš:­aÇHlEŽíHT$K‘l-´MR²$“"Å]šM3œ73oæ­÷ögZqS‘ZsóÞÜós¾³Ýap×—¿üe¿Ûí¾ÃívBQ”õÇùY–…aV¥R-‹GòùüEQfžþyr#öÄ܈/ùêW¿ê …B_‰D"n†ax˲lÃ0LÇqEQ$Y–E†a¨ªªÙÙÙÙW.\¸ð½—^ziô€'žxbm4ýa0¼»\.ëÉd²ffæðôôô¤ªªE˲¯×ënjjjnoo_ŸH$¶566Æ/]º”ùäý‰Dâ'„¦ÉÉÉ7;ö_yÛ¶ R»€Â0 ·bÅ nûöímÚ´é ¢(Ê'Nœø×3gÎüÓÛo¿m^=r×Kø¯ýë=---»ŠÅbd``àß^|ñÅŸLMM !ãFLHÈȲœ´m;  ¬ª*?444R*•Þîè踳««ëSš¦Ô²Ù?—ÏÒ?žøû'äÖ¶Öÿ)—ËëŽ?þôîÝ»û,Ë*`Ö4°m›°‚Á f†J)e§¦¦ôL&stãÆ÷E£Ñ?Îç2/\˜¾`Ûέ ÀÎ?zMkzþÔãñ<900ðú/~ñ‹Ÿ:Ž“ã8n‚RZP×âïhS×uo—L&JéùmÛ¶íÐ4mÅé3ìbÃ’mõk¶_öZp4=-644üõìì¬vèС-˪°,{åY½&4­iŸ~Ôe96UD¹ Yå={ö ŽŽ¾¹nݺO¬êéù˜q±xM•vMð(víÚµm’$mšœœ|{ff&0i ¦jù(­Ä¢–×r@Q·mÛÞ»wïîh4Ê·¶¶~ŠP*6F‚Ì- €nUÙÆÆÆ5„åüùóƒ”R  %·ÂØ¿Ïô €Ú—*0. @€öNÿ;¶mg‚Áà]”R)[(²·¬àaÇÝn÷m¦iÒd29 À¨26¹á?„(X€@+–ŠÕ|>Ÿ  Q=ŽCX¿G¾µà“¥²iš.Žã@1TÁ0އ/Ex€fZ€UË,BÈœ –eÝø²f3·1òÔÔTÁårÁívóc± 㨅ԲòzŽei-dÚ¢(ºK¥RÁ4Mæü·¬LíYü©S§Ò’$Ù===+J(]~MãB8+V¬dYîL§Ó“„žRp9ªÞ:.@Ê ÏbGGG ªª¦n¿ýöû].—@)˜†®è²ž+ù% >úè¦jµ>Uß3akbü5‘þ6ކaö÷÷¿µ}ûöÏîØ±ã¾—_~ùçê¬Ê\)|ÿûßg,ËòU«Õ`*•ò¼ÿþûlooïW†‡‡³###g ¼jÝ2¸jT8¬]»v½y÷Ýw?ðÉO~ò[¹\îxÀïO­^½Æ;{aV;yò¤:88ø;`ìܹSîèè¸C„/¹ÝîƒÁH<—:::Œ\.J¥RG%Ir4M³81ÒLg1{kTƒnÖy!íš?ýéOâñÇß9==ý~[[›H$UU;{öìkï½÷Þ¿¨ªª†Ãá(¥t}0¼_–åû‚ÁàZÛ¶]‚ @0 SÿKUU=Û××÷¯¼òÊAJ©¾ÔÈrÝj¶Ñ §Teˆ5{ð& iÕªUw577·†ÏårîÕ«W‡ÛÚÚî)‹«T*«b±Ø¿G"‘¯¹\®{yžOˆ¢(†P(„P(¯× Y–A!„ñx< k×®ÝÚÑÑñæñÉãIR¼ú¦Ñ5`cøQ\(œdjÏS¶mÛÖõôÓO»³³3œL&€ÌÍÍÁ0 ‡Y¿ßß155µ™Àjš—ËÇq@¡™L†6440<ÏC¸Ýn¸ÝnT*‚àknn¾3ªD~âĉê-fï/Ða,Ã7¾ñ¿ŒÇã1UU1999÷ì³ÏþhzzzÆï÷s–eÁår1<ÏK¢(¢©© @`Þ>ŸI¥RÖÈÈHÚ¶mض ˲@A8ø|¾u6løÚµØÿ5 s’¢««‹Û¹sgë7¿ùÍ?ïê꺫VçcjjªÿþýûUUýµÇã¡¶mÃqˆ¢ˆh4Š@ €ÆÆFȲ –eaÛ6LMÓ.išÃ0`YÖ>Ÿ•J…‰D"_úâ¿è¾Z»&Qà{ßûNSOOÏ?Çb±?s¹\nQBâñ8¶lÙÒrçwþUooïY–Ã0À0 ’É$¦§§‘H$ Ë2$IÇq`ñxÜ˲ìjUUQ( … IA¥ó¼Ç²lÇŠ+V¼2¼jž{î¹ÞÞÞÞ]ñx¼›R Bt]Ã0à8›7o^EYE)…ã8à8¦i"‹afff>Š¸Ý ïkš]×A˲`Õj>Ÿ~¿Š¢Ô]Bðz½kœ\Ü]º¡|÷»ßuuuý4v«ª Žãàv» óÚdÙy£„À´æÓÇqÀó<~øaìÛ·ªª"›Í~H`J)X–…(Šðxä¦i¢\.ƒeY„B!ŒÕs{x½^477#‘H@’¤…d§X,B–ex<¬Y³.— ÈîÛ·ï%ÇqÔZ~U°ìT¸\.ÿJUU‡I’ ë:ªÕ*ªzº®/ü_*•P(P*•À0 EAss3Î;¯×‹x<ŽÖÖV455-TÇÁ²,äóyȲŒžžø|>Ôj¾³³Sðûýúµ€» œnii¡º®ofF¨çòu–w¶m/„BBü~?Ün7qáÂH’¯×‹ht¾e–L&qñâEäóyô÷÷£R© ½½@Ùl¢("‘H([¶l¹·¥¥å¾H$²÷ìÙ³¹›Î;GK¥ÒÙ¶¶¶Ï°,Ñuõê­–¥}ǃd2i‹E¤Ói¬X±^¯Wòù|qÃ0¦>|ôfpýüç?ïZ¿~ý³’$­T“““ðù|`Yš¦-Tz ÃØï½÷Þ„$I—:´²Þív‡6mÚto,Ãm·Ý†H$²@¢õT¸ ÐÚÚŠ®®. À²,LOOÓ}ûö¨)qÙn°lôz½œmÛ\¹\vÆÇÇùT*…»ï¾p’$á—¿üåÏ=÷Üó†aèŽã~sß}÷},|||œ9{ö,|ðA(Š‚½{÷âñLJmÛÐuccc˜™™®ëØ´i$IB6›Çq°m{÷àààh­ µìöزIð™gž) ÿM:.år9˜¦ AËåÐØØI’@¢(\¥RÑÇÑê³>Qu]×qôèQ”J%LMM!ŸÏcll g¡<ÖuÝÝÝèììD6›ESS’É$b±ÓÝݽC×Õ¦ÂWÕ › !MÓÐÚÚŠd2 ·ÛžžìÙ³gæÕW_íª]¯×;íóùH<‡ËåB:†ÇãaÂücµX,:…BÁðù|6ÏóH§ÓhkkC©T˲ˆD"·nݹšRøjËafrr2ÕÔÔT2 Ã×ÙÙ‰¡¡!ttt —ËáôéÓ_Åü1˜€b-ia)¥¹r¹lr§8ŽMÓ iòù|¸411q¼fòjíÒTèï¾ûîèË/¿üm–e:i*ŠÇqà÷û!‚2>>¾_Ó´³/¼ðÂLOOÚ¶d2‰ŽŽ\¼xPå‘Í›7 7€U«V1kÖ¬y˜RÚÝÕÕ…ÙÙYD£Q¸\. ©ª: `ócn§Þ¸˜Õ†††^L¥Rß²,K×uÁ`¦i²,‚@¨ù|>sîܹƒ–eáâÅ‹H$°, ¥R k·oß~ÇÍ೑Hä‡Çñ¡P…BÝÝÝ&¿¦”fd0FÀZä«€],‹ï¼óÎ †adlÛ^H–|>$IRÌÖ®¬,ËFÝUŠÅ"b±¦§§ÑÚÚ*D"‘Ç®†— €Çãù†a|uföù|èîîÆÁƒg§¦¦kš/Ö´¿ø€­Yƒ @c¦ªë:E(Š(‹ÖÀKÈT«Õ Bˆå8fggÑÓÓƒT*¿ß—Ëõàc=^®,Ë€±m{°Z­â¶ÛnC2™Dss3r¹ÆÆÆŽ˜¦™¯ù]óôC£ÔùË. ZµZÝ/IÒâ¹k±½  tàÀ£GýÇr¹\M¥RƒEÉdmmmMk׮ݾܦ»LóçlE¦i‚RŠuëÖ¡¿¿¿:66v¸¦ùêïÉÐ@0 ã”eY¨T*ðx<ÈçóAª`•ËåÊo¼±7—Ë T«U¤R)´µµarr---L ø\GG¿–Àš5k¶PJ·wvv.Ÿ×ëEÿÙ\.7YÓœy1š¤R©_Û¶}¾^:»\.p$I¬ƒÀp§šÉdŽZ–…ññqôöö"ŸÏò,466n}衇ºn;vìˆúýþY–%‡Ãa ttt`jjŠNLLì'„ÔCžÿÿD!UBˆgnnápªªBQ«÷ÔæŸSP¦”–MÓD:Çq…B˜œœD{{»»««ë3Ë‘‡]ùuñ<߉DÉdàõz±råJ>þn-æW¯0C#ÍÍÍwȲÜP¯(¥$Éãr¹”En ÐÞÿý_e2™c¦iÒ‰‰ ôööb||Á`ÑhôÑíÛ·»–jK€a3—ËÑ–––…f¥®ë>V­V/-"¿+*NlÛÎ0 c”Ëe”Ëe¸ÝnŽeÙºO/D>øàb__ßß–J¥Ìèè(ººº ë:²Ù,ÚÚÚVÝsÏ=w\oXŽã>'_~ôôôàÔ©SÆèèè›5ò[R—flllÈ4ÍÃÕj^¯•J^¯WTÅ·HRssll,N§÷d³YZ*•ÐÚÚŠÑÑQøý~Þqœž¥æK`ãÆ|¥RùT,C6›…ÇãA<ÇñãÇG“ÉäX })ÊéÓ§mBÈBdY®Àq'/ê@cQî`ôõõ}wjjj×ÈÈÙ°afgg133CÇÇÇó5Øë!D±,+ê©(2™ ÛO)Ô²>K¨Íxà¸Ûíþ¬ªª( ðûý¬,ËEÂ/Nžô .ä~ö³Ÿ=uäÈ‘G–eúÚk¯e;6³Ôo)fLÓ”äR©Y–ÑÛÛ‹¡¡¡ÂèèhÿÄþ\Á`p«(ŠMõÙA¥RA `xž—/5na°Åb±ôƒüàEQ*¯½öZxddä@©Tš[ªR—€Çã E£Q¹–®btt”ÎÍÍý¦X,¦jÚ7—Ú™Ñuý8!$éÒ¥Pcc#2™ <#˲ÿ2B«'OVí}¾\.—Ÿz꩟ðÖ,ÏZj`Iæ‹Åü–e1µŸºÑ¾¾¾·Þzë­Ÿ/*wí¥n`rrr2 ¾Á²ì_0 Û¶áv»!Š¢ç#}±+,œN­}§µh×…™þþþÑ>øàï(¥}sssÏE×u\¼x‘†Ãá©ß3ú^ü3òï_¨ ^¬})S{]\ù-^š¦MT*•ÓÇm¢”bxx8sàÀÃW¸§«:-Ê.AøºÉÍÕšœkþ·äÐwù:tèmšæþ±±1'W/]º´ûôéÓyÜ€Å,ãóuö½ü_Wµî¹çž„Ïç[?;;[Î̯R ì:À·×s±µ)€´ˆå¯¤¯pSæ×cÑE¹„y5Äz¥ëQ Ä6¯ó`IEND®B`‚qpxtool-0.7.1_002/gui/images/refresh-info.png0000644000175000001440000002047211345714213020212 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDöòÁdK pHYs  šœtIMEÚ êýZn IDATxÚå{y”eGy߯ªî}ûþzïž}×,ZFB‹laˆD€±ƒCìÄ6vplƒcaeqÀx#Ç±Í Ä–1àD  -hA£uF³wOOïËë·¿»TÕ÷åû^wÏHÖæä$qzNûæuß[õý¾í÷}UøÿüGüŸœü“÷. qh·³`Â6™tV·kŸ*ó­_ÿÀMÁ¿p–/Ñ›˜Ù…„e°Ø•`#–YØEhÜ4—Ï.ç¯*ð¹ÏÚiÑel©m… ä\f)J,EQ ‘•Žt¤à%aƒ#Ô®>Òžé¨lÌAáSÒ«}«5yâ±þÜmîÔ«½ñ·nÜ)ÞðK¿ŸÝuK9»RÏž»ï›çßûá¢`›²¡_õà €Ö‚ )K$ÈZ¶`CLÚ’ -´±9#Ü}n&ûÆòððŽ·ÜöžÊ¾í{<ô-zµr8/÷ÿÓ|\¤oÙ“Žóe«Ò[­Œí ؽ(Ù®l°zöO½ßŽò+3?öÁÔ´,4, 6ÌÌD,‰X + 5[°`ÚÐÒ1†×qó~&þ¶ÁÒ†k÷þÈÛ¾øÛwáCï½yù)¿ö T™=¯ËÄó…!#[ØM\¤9¶oÅÊ^ˆÑFËZíP);þé±ák¿;=wôEm)lEãû¾fëSBº2¥‡¥’`¥µff† a™H ê¬F¶Zny¨/ý+åûöᛇ?õSo:xäŸ À]_ø~’\÷2‘¸LslwŨ^€FÕäš­Ði6ÙiyB·}HÖÎÀ!kܸûŠãɇoê\~Ã'½±½;T&å;qÇ8®Cé\2žÎ§Ê©L"Ã@ªã…ÒXËBH ØBöõÎF´Š‰·l(Žn»û¾#½çÎﯿûüªHgr1±[&—ÂwÏ,·eÇ3ÒkÂøŒïƒC-Xkæ0D:åp,“³0a~5&øø¡_ãÇAÐ׿íÏ:*æ¬8®šNg’㥡âžþáÂåÁˆ2¹R÷`„ƒ­%Òó‹Öïxñ}›úJô–ßøÔ¯çûÒßøÜWþ†^¿øŽËêw}þ±ßu¼`˜ë›ª³5ÁF3Œà à f¶„X*˜À#â— ÀE*¿ëõ*[PÊM‰V½.šÕeVÊÒá'ﳦ~Èõ¹:€úöý·mytǾ—mÚ5òæMùKVZZTê>Á Á,,Ã2U«6Ãø¦­ÅO_óo?&¾ñµg¾>çŸàW•¾ûµÏ­\sÅ[ÍèÐì«/Ö&dÁ6š¶›?sùòÙOš}(ôÃï4[½êJô]3XèÝ–Heö¸nb·5f;Y½É9ƒ®+“±¸k½êxVñÙßh?ñÀO[sàáR>976\ØžÎÄG­PXËŠ+¶,ƒÀp+¥L6uÅëo}óño|éOÆ_uÜ{I©n³­™ª 乊 Mó*s 0œ¸#ˆˆ™©)¥|!´ãýû>²©ÃE; ÜMŽãçóé¾dÊ-º1™n"ð=j¶[^k¥zñJÓ¹nQ{íi%ü³i¬œ¼èÜ_κç窇îÁßÿ»_ûúcW\·çý»6æÞuf¶å¶:†ÀhÔ<3N´eÛPéÓŸúoü̇ßõ_1·æN•û©c3æ3+91D6`5‡\×ö YËõé™?êñQÞû3ÉLz4ŸÉ—w§³…«2…òuÒ‰pÝØX>ŸA*G<® @d†¾¢^o!«#“͘0ðN ñæÉWÀEWÜvõ¼çþìÑñådàkW J2˜£HÇ )”«„Wm²ÍÊêÍù½¹taìÊ\qÛ{J}W –‡‡†óñÁÁ|¬OA9R H! 0˜bÁB¨³¸XÛ6~ffìè‘37·CçL2'îO8ɿܺÇþöÏßþíŸãë_ºïìÂÎÑôÇÎÙýõF@2Ì`ž_l… 7ÝÎ[~áÖw~â£ÿð×·{/ €¿øÖãåPe~éèDu´Qi*¾ ) „À¶-}¢V÷Äâb“’‰êÆ’1Tàl{Í'.‰çGn(”ú_72:tEÿ@y TÊ#_H PH"VQä^u'¹îÊ,ÉdÒMÄ“n±PÈ,,,•æÊ§'†O‡¿ôí¡½sÌýòÄ»_¿ùѯÿpþ#n¬ü™ÃG—ö7;šˆfÁçfb׿ÌOm9xýãøk|ùeÁ÷}èö?5¯úèñ%GןÁ];e’CÑWJ‡2SÙlR¶–kÁÔøä×/»5ž-޾§XyßàðÈ•»voJoÝ:ŒÁÁ ’©¤”èyQï*DdMD€µÆÖFŽ£P,¦±yK?ÊýƒBªX©Ùô¡F„Œ‰âÎ¥öÒ“­/}îwg>ü±;Nâëæ—ZE2,ˆH0³0Ú2C&ûÒJ}×÷¹Ã[{QþîÁc£MJÝñè‘屯rÝ…ç±°–ÆèXI”SR~ÿž.k/¸ëÊk÷Ô²…Ôž™Ós~ų§sƒ[ÞYì{ëÎÝÛÇöíߎ\. ÇU«—Qú– ¤dR@LjX«aHˆÜ‚#\`-   ”‹b1-[6XÎ/¶wKÁn"¿y©³üÌÂçÿðÎéÿø›o·ÛæuK˃ˆD»r±”I(´þΓóüOð¾}ì'Mu~âô™Š¢v[ ²` ™Š‹½;úå#÷>aj+­Ïž>9÷™—nzЄ^æØ‘©]27”(Œ^¿mû¶¾±±a I(%!D$¼kƒäSŒ EÂæ>á‚@>É`ÀX ¤hIÜM:ÔM¬®£J%á¸I‹%ŠÍv0haRÙò|§r¼þ‰»~ç˜!Œ.,·¶Z!3³ bA†a*Ÿu·Æâ£‡ÆÝ3ÿ‚|ó‰‰R]»·>ZÙØ¬4\> Žõ¢=CrîĤyæÓ¾}wg¥³©bœÒ•…áMûFÆ6õïܹ¹l¦›„èj~=Ì+vÆJ…”D9+ ¬‡–Ϩû„`^‚Eä(–Ò(û±\i•ÃP—Œ¡0ž¿ëWß]ý•Ý1îæÆ™¹æ€5 3Ãëh*–2%‡mëɇN|˜[µ¹šÕâéëg–ýýÕjGHk XH‰R9#RŠåsON, )~ï蓟˜€+~ô7v¦Jc×#Õ¿y`hlp×ÎR!ÔÑ¢{ƒÎ»24r ‹RF­FA%6 çPLÆo€,¼æ ½ìË „ÇqÍk_ƒ­;ö@|è½n²|°PL¯‹ŸØ²!w÷È`ÆZmaÉ‚¬…ÕË+¥‹Ù[^÷ã»Ï+Èà‹ÿð€£Y½áÜ|;eÃP- % ‰Í›KòôÓãÜlx÷¤ò麫vkAîjRÙÛ6nÜ2280Œx\]“=ZûŽÐÚ‚,AŠóI£#,@ÖDA‘.xçù|c¶`Ûö½Û“¹ï â-—À@1ñµ­óÇ]G(6l-˜Õ•¶•ñÔÆÒ`á¦ç°qÿEÃ+M}Mµæ AVDK"ŸO‰¤"9qrvA9òî'úudÛű}×½w³Še_ëIJWmÜ´I‹EÁù‹\?zæLh#Qk[,Õ|„ZƒÈÂóÌ,ÖQo@ÆÁ,¢ûèù ô†ÁÁìÜuQ<zK2·áZùŸ{ûuÓ£C™¯õõ¥Ø 26„À ¸Ì÷oÞ²ã#…óx@¨qõr=õ½P(&°”L æÄìø, ïû™bæ)H—/ÍeÊ—Þ"ƒ—f‹pÝXD-ƒ„€$€À2ZhÄöºhKéÄ1µÀk5°}H ®4*ǧB´¸n"ý< ²= Öa-¹(Ë¢xkž¬)myÃÕ'&¦.æb÷Že?05Y&"3˜͆oc©Ä\)w1€C«X¡v.ׂ$ÈJ)Àì((W¡˜‹‹‡æ;ÌüÍÇïÿH:[r;òÆárnçðÐ0”R°ÖBJb KQ*ù ‰5ÿeŽRaÇ&0§ ¡5PB¡ÄP ØÉ Æç {¡5­Žn\p݇6 h/ï©e·Ý†úÙÁròÄ`ú©dÒmÖ=`0^;à|&YJ¤“{ÈûŽ.ä½.k¶C)˜…TRJ¤Ó a<_--Ô&cÉøaHÉX2¿Ag_<žÊ•Ë%€µD">OcDQ§ þÏ"†œ«å1Q-a9„›F,žŽb€4lí?ñ ˆ¦›núûÍ7Æ3CW;ñlyWÑi– ‰G …„±D‚-E5G²T±düྃ¿•Y(Ä2õŽõ#¤¤’,”@>Ÿ^³00ϸ‰Ø4l»æ]c…òÈþt®”scI0EüVÇÚ­€X5_f0Ûî Hâ1‰dÂA2!‘ŒŽŒ!Y^{Æ:ìêw "‚µÌŒD"dºH熷ĜĘ"íºüT!Ÿhƒk l-¬6°†8‘Ií ½ N³­wxÍkc¡¤`R B$“q̨cøèÞËvùO<aÁ‘˜›ÞKgn,K6*j¬€ÖÚn¾_Í®‘àd±¡Ø:*!{¿c†QQ$%à(àÌ´‡SõP«5èÁ‘æ© @Ïê ™Ì¢PÌ5ç³;uÒQ\ÍçM!DÖZb0™†¤ãö»‰øf³Ž…»H—)%„ ÒIWú mŒ}æËx+P!Ňâp·¦Riåº.¬5`U7ÖŠó(3`Ic K¸d“„” ê{1z€£~ 2žénd‰ÏÓ¾%» D,‘D._rbÉìödßEƒ¹”sÆuÕ$F‰HÀ¡@–FÀ‘Ê)iÃq ¡äj RJ@jK%«=:¶˜´<œL&Ûe|$ÂÚ.µé1Ùe3@µÑÂÄT ÖJä²9ò9$cÎy{3DÌ]¶k|€,ÃRWøUÁ»–` Žr‹ÇU,žIgGJ•Å“Gbñ¡ºë*„D€e3LhY(åBŠlÄ?”Œ[†’J‚ €D,ˆ¨á¸N£»JÇZÎ2‹¢ë:RI ²kœW»¶×$º¢²B8˜ZJ ÕaXÃØ½Y"—¥µŠk™‚H€m€u¯'°µÖF°H‘„€R®rÝd1žÌeÏ›“NzÈ:J€,)"DÖ(¸JHå¨\„$†ˆ" „BFCù=˜9ÁŒ¤RFÑ?šXX‹Õm¡Þ‡.eH¡°PËb¦’‚±åCŠçwÐ"$@f¯ O«¦i} ˆnª‡BHÇM9n<>=1-6î¿ÔJ%¸º÷‘`¢tÃÛÿX9“RRJÁJ‰ ¥€nÌ ­µaϘY1³êM ˆ(:](H7øI–¥U!%¹„Œ ëëÌ Ì]MŸ—i¶'È:w`&,à ÁN½V“ƲèÈ&jBµ` ,¬¶p˜¸JZ©¤`’"òié*¸‰XLå®ídÀÄÄÑÄÌâ|«_/‰”`¥À‚ÁQ=òê½GÄ0° –[_S”ÖºÂÛnÚdb03–Á~}^6Û'‰¹çݶ ²–]×#Á5ב¡RÒ!–«Ô¥bÇu’œ\ÛË3lcLÆX+œ®Ëƒ•±„ &c©ä^ #ÏQг°°,ºD‹æ®ð«@Øóƒ¡% &ËlÀ­oÉ¢Ûn)ßêÞ3‚µ°¡i~ïïÖ:ñ˜ó¬räŠT2-HEäO! Vq7ˆÌª‚(ð˜Âºƒ¢ µ”1÷´ý“¬ ™!‰V]]¿•?€(â,X¸«ýU `~ž;ôÌßZ£5™°]Óª7¸õà˜GjTšÉFl)jíÙP["ª€S.ÄO&:U×U51ƒD¤ œï/¤Óùt¯rbÖ›V·–µ7hcåÈužÌ«ôR¥1Ctc†1DÎ î£1Gš4Övû‘p‘ˬ]#j»æÄ £5tèQèÕ–½Ö|#0N_+Ôej°1«e±& !ed«¥½lÒYNÄ„’Ýa”)åãÉtrG/®ù­¹•Ð_™ CÏž{Ädõ³5|6°ÆÀš(uñ[8" k,Œ1k÷uŸE´nZ›ˆxšöÛ•™fu|%‘Îï]©zIj1Qð#†A«Ó–JÍ€¼x0¶’N¸‡“q‡¤Œ„WJA[æX>/ — mx¯ €ê‹Gç;¹Ó¡×4:ô×òrWk‘€Æhc`¬‰1‘PÖFßYŽÒ YY:Oè0» íÎÕc‚L`fxíÔ*ÓA«¹8>:ºµ¥EêªêŠç°Ö‚¬a¶ ‚öƒ ˜N¯òÕ„ÇJ™˜'QUÙíÐ&”*]<²eÿ`=ê A{ét§¹Ð :õhqݶ­Óˆ±6ÔØU¢aaŒ^my½ DÝ{zVÐÏЪ5­r}†!:­ 5«gçüNuîÆ·¾¿¿å‰ýµJ ¤CÁ]«SJ 0ÚLIWÕWÈ$G ™ØŒëH!•„r$„’0,mߦ¡íƒ›†ö P5íåsíÚÔ”ß^Ñ: Ö"qw1«Úé ßÓº6¡ÖÐÚÀZ­çÏ‚ c ÚXèUm›µgöÀ°k¹ßƒF}­úÂB»zæ˜ñ+£»®|ÍÂR§?l{’BÍd#%¹qA³e­±?^E§ÝB«m™É.£ŒRc¯|^ÁòüDЪœx¶³rêÙnþI•(o¿íÙÃ×vÚŠBŸa ˜d.Éí•*Ùïî¹v÷òsÏ\°/pI¿Z̧¿É§]UwQ= „I‡ ‡Þõæ~ê@£:ýÈc…§¿Ù©O{¾Wƒåó –õ)ŒA&÷¹Ï|œì½Ô©ÿ‡ 9õà–=S™òÅ×,Í5]h-` ÙÕ£'Žëb`¬Õ¹eöšÍ/…zê³úÑðÿæŸÿ^¸óòkŸKåÊ[!Ý]DŒUK`LÄB¹™tÿè¥Û.yíPÒ‰MÏž~¦î{)¯>[Â4tØYÒas…†gƒk¿¦B¯æ^A§ß«Ãk×ÐiVÑn.¡U›E³zŽ›•‰v»:¾Ð©ž>Ó\:yدþiO<ê7çž`6“{®¸¹ŸÝM7Uçj1h½væ¦Û/p1áÄ“ns¥òÃzõÉÍÍ~ce}Ê__ˆªyÀyü[_î oÚq¤4´iœØ–nóqµóMb(/ôm¹èà^KRë•™ÉããíæÒlcùÌDX?>‰p¹®ýJ;è¬ø~«xíJèµW ] ÚÍ¥ UŸ÷›Õ©v³2Qk,œkUŽŸ ªGŸ1gî,?}Ÿß^úaz§XDíÊ›?°±^O¼©¾XsY½œº*™ µ°¢¼¡)‘號~ªÒ•é|_|‘&d7E&ÄÞúÁOîÛyíÛï‰Â•ÖD{½ Ñkô‘°BIVÒx¶];R;{üÞS?øÖáC_ÿ³i)‘wb©¢T‰¼Tñ¬NÆqiǧlj1 ¬µÖê0C¯­µß›6ÛÐ.VhhE$L„þãGþõÃ÷O|væ¹3iö›Ñfb÷¸˜ ¤‰!74¨6äO,MÜÿ›O>øùGøÝ¡{AG½1©}§ã*÷øð–Ý›DzƒššQºf°`XAlÁ*ž,§úFöíºtç%×ßZÞ¼ór“Ld«~keÁo¯,z­åÙ ³2ï·§ƒæüLМ?ç7'½Nå¬ê¤ÛçÈxÓdÃ)"»      `Þô«¦Æ—oj.V\”£D2•@¶œE¾?Ï…þ¼ˆ¹^£3àUÅ€Â'|¦ÒmÜÓK•åuuŠ€C_ùýñvuùŽkßýË?Ÿ*¼ÑÙY; Í11±fƒ‚I¥òó3}Ù‘ÍWm¼ì†™+ÛõE¯QïT—üvÕ›?ºôÔ÷¾:x­ çÒLWX½N[½E‹v­–b"s¢?xÌaÇu$YBè‡ì5:A­S©†^kR‡³Ö´Ÿ$ê´/hBñKÐ[LеzüÞ»'jKswÞôon?SÚ¸ëÝ!É’ u;À" ÌF›…襬“ÎÜT.žíéØÓak[›/¹áp½²pâø£ÿ#\·0»NX~ŸYÓʦ9…„ =ß´«­vÐñ*ß>itçl, Ã…Yߟ™óýéZ×z‚®<öåÄ€ž(nwĺC¦²}î­úÏ×nÚõO‹xêâ 4l´ Q ˜=°mƒ©É ºÕ ¸.€ºhH)BˆšöÛgžúÞWŽÝw÷§ýøÅN·‹½þbÝND‡¾µÆ;ø‹OáÜœç]‚ÅpEQ×’Âue×ÏóRoyÈuÃY7$qí¿úåÑËn~÷­™òÀ[Y8#ah­ÕºÃdÛ Ûé“­’5¶zÙ½L&XÒa§Ò¬ÌÎ?sÿWO>ö`³ÎøE2“à(•I¤ÓÛKA0k‚`Ñ\°V\àJzàë]ée½5¶^+¶;Loœ;öpõèýßx¬4¸óáT&[‰'cI×uâR‚Á¬™(`²“õÈè¶ÕAK­f§±Òª-L¶–§O†µÅi»Ncx ˆŠ9æ}kÛzÝÚÌ:— º.ž_íks|A`ìiˆAÓ<÷ƒ¯ÎÏœ|î‘\yÓƒŽëž‰ÅœV,î†nÌ •ãøRŠŽ„hC   É–ZFû­•¹ ¯:%ŸHf®IDATwÖ¬[½Ìµ`Ý:ôº®Ó¼y1Áÿ9ï ^àÆò¤=rÿW*çŽ<ý\:7ü„|VJyàÙX"¹äÄbK±x¼æÆ“57ž¬+×iyjgæÔ“º»³ùJÞý£ qÀôR‚ÿïxsôÂgñ®«n;¯xƒÓ·a[œ(L¤²yKftÆo7ÃúÒtøÿåWLÐiáe˜ÿ‹ÍËøéç¢×Ü*nü‰ßÿ7¬åãÕ—=ÎÖ0~IEND®B`‚qpxtool-0.7.1_002/gui/images/zoom-orig.png0000644000175000001440000000400011220614611017523 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÙ!ÇYÁ€IDATXõ—_L[×Ççœ{¯}Mƒ 66 $ ‚¢n™È”„¨‘&MÉž¦ªS§>,O‹4iÿžVMZßÖîa{Ú´eRÿ䩚¶VšÔnK¶¨ …¸!@À†ŠL‚Áöžæþ;ö0[#”§Û¾Ò±ïýIçs~ÿÎ1‚'cŒBáp¸#Mªª“Rú¥ÇóܵB¡°bƆ‚Ã!´ÛC¿ßï;vìØñááá ÝÝÝ_Óõ@j‘B(BJÆ7M³ö0›ÍŽüþÔÔÔ-Û¶Íÿ @ÿÀË/çGCCG/P uöíÛÁ`!À9Ó4Á0 ¨T«`ÛNezjúƒ·Þ~ë— óó ¾°;Ο?ÿõ÷Þ{öÖØ-™É¤e¥²)cB!8‰s.*•ŠLgÒòú?®Ë+W®Ü>ñmPŸfMÒ˜œUUýªªj„ZÀõ˜3ι»mqÁ9gžç%Š¥Ò±[77Ö×—š9ˆëº6!ä™öHÛùd"Ù*¤À~Ms¥”úEñoñBÔúÎñBQ.±ùùù¡ëׯÑT*õ§l6ûgØlª†±‰D¾ÜÙ?Ø †lÇ ø|šü*¥TSů(ŠFñ5BѨÆ)KÏÎÎÎö~øáZ*u;½¸¸økÆØ\3¸®k7Š:t¢¯¯/"…Ðs¹ÕVÛq|ªªª”Rªªªc¬ÖÀcÄuÝ`.ŸÜÞÑÑ¡?þU6=3ó—\.÷7×u=ÕiX©TVV²ÙO<ø\oï¡X±XTîÞÔÒé9¡PðƦR­šJµZUŠÅ¢o5·ª§ÓiýÆÒÕÕG µ¢ŽX =÷B¯®· .Ìg¦,ËÊ7 ²X,=˜˜˜˜°¶,Åï÷ïøpEŸÀÓÓ3xa!ƒ—–—Ðjn?Z}ˆ³Ùe´²’…Åû‹ÆÜÜÜÍR±$''ï„ã±=}z¤G¥ôh&žÜ ‚ìø-kµZ>•J}tçÎdªT*µZ ÇAŒyRJÉ@ §Z5奥û·o§®Ýûýüü›ù|.lšÕçK¥ttDáôé3 LÈ@&“¾cÛöÚSÝ ·Á !qJÕýš¦E)õ0F̲l£V«­yž—€Ô!G¢Ñȯ"‘ö“ƒƒƒpáÂ7áà¡ÃðÎ;oßøÃ•ß].—ËÓÍxà1o€#¥,2Æ–mÛÎÔjµÓ4ïÙ¶½ „xe°@H) –eÝCõ›¦™,–ŠDadd´‹(Ê‘L&ýÉnžØ  ÀOà¯p^ßÃ7¢úï°ý…”2oYÖ Bè9Ó¬&ÊåDÚÛadô\Bx N§Ç.< àx/@mÀnÚÍVJ)ó¶mÍ"„úk¦™(%hooƒ‘‘Ñn„ñ@&“N9޳¾WuHØ™½7àÝ&m !d8=zD¾øâ·äÕ«WåÄíIù½Ëß¿¶¯µõÈ^9ð³]<ðúûßlÂVJ)s–eÍ!„LÓÜ_.— ܆ѳçz<ÏëOÏÍŽ{ž·¡<Åþh³Wíº8ç||}}ãÇðÆìììWl¬oH1 /nmm½ñ4ø üëaŒ±±õõõÀë÷îÝ;^.`Ûör¥RI?© ì×4ü½IÛÏûŠBNÅãñCCC©p8| ¢»œ¬'š¬×÷»0X7lÒv7©ã/aŒŸ€¶fî‹ÿ¡‰ÿ/Š‹ÔékIEND®B`‚qpxtool-0.7.1_002/gui/images/splash.png0000644000175000001440000004041111334770530017112 0ustar shultzusers‰PNG  IHDR<xo»NÈsRGB®ÎébKGDùC» pHYs  šœtIMEÚ ÈÆ ºtEXtCommentCreated with GIMPW IDATxÚíwxÕÞÇ?³-½„$„„z5QÑ+bA}¹¾*êÅ«÷* мVDñê°]¹^Å.X¸€(Uz‘HI ½·-Ù6ï³›lB²³»Ù€è|ŸgžÝ9sæÌ9ßùµó;‚(Š" (Pð€Ji („§@ á)P @Bx (P ž („§@ á)P @Bx (Pà34ºUUU}2dqqqÊSU @A‹Î÷L‹ÊÊJ6nÜȺuëØ¹s''OžÄjµúG\U©HNNfÔ¨Q\sÍ5\wÝuÄÇÇ+OYçðêëëùúë¯ùì³Ïزe 555çåæ9r$S§NåŽ;î ""Byâ („×>())á½÷ÞcéÒ¥r!§íFFFrï½÷2{ölºvíªÂ”ž @BxžãÔ©S,X°€O>ùä¢j€k¯½–—_~™Áƒ+½A‚ß9ü‡÷õ×_sóÍ7_td°~ýz&MšÄû￯ô  Ï=^xáÞ|óMJJJ.ê† cÖ¬Y¼þúëJ¯P @!¼sñ÷¿ÿwÞyÇïa&÷ß8ŠÛ‡FQ•¹«¾‚&5ÔwîMXb_VgÚxûÓ0Õ›ýrÝÀÀ@f̘ÁÛo¿N§Sz‡ áÕjåÑGåý÷ßÇd2µ¹Lºœ;‡aªÊ#84”ЄބtN%0: ]D<‚àм0×V`©)ÁP|Ca:…§Pןcæxî{¦mšJ¥búôéüóŸÿ$<<\é! ü‘ Ïh4òöÛo3wîÜ6ÍXþô} ‹µQ•½‡ÄÁW7l"Á{•èùª1•dQ~lEþKUÑY:¤^ÍOEA<ýÒŸë7oÞ<þú׿ҡC¥—(PðG$<“ÉÄwß}Ç´iÓ|¾àƒ“¯fJOá¢I¸b:1¯Cé·ª;s˜‚­ÿæÔ¶¯ML##d0O¿ò¥¥¥^>/[¶Œ3fªô þh„·}ûvÆŽë•+III,~ô.³¾ croºMü;‘½F»%SÀ.é´î/ÖpŒ©"üï’±áC‚z\ËËkOòó¶]^I¥jµš¯¾úŠI“&)=E‚?á;vŒ|­[·zEWŽʳz`)>ÄÀ;_"fèDéO»D»£n«(g·º+œû½ðûTZI/>Eæ—Ïröè¾Í‹æ£ŸR__ïñ=¤¥¥±dÉF­ô .rx”ª´´”O?ýÔ+²S©TÜ8¼'÷ ª!&6’mE 6k#y!H|%¶@r®\f·­¾‘Ð\‰Mp-GhüÏnAEP\>ô ±Û?'ìŠ$þ±1›ÍæÑ}ìÝ»—•+WÒµkW:wî¬ô ~ïÞgŸ}Æ=÷Üã•*;--‘;û›2ãy:ÿéÏ«™4‰1ÎùâBf.¿m°¥ï '4ª°-íw%GAhÑçåàò{ùqw./m,Æb÷ì^´Z-‹-bΜ9JQ à"†ìL‹ãdzjÕ*¯ÈnòàXîìWϨG?’ÈÎbcD\v«$±5ßDÇÖä·½Qµ™¥Íniº‰VÇf¬ŽÍ&m‚]Ú¨ÑDHbFüý;&Kcîåáh=œgb±XX»v-ûöíSzŒ¿g•víÚµ|õÕW8¶k 3Ó´\þÄ—„uOƒêО+µáTA9÷;.*+‚ƒÍ R]å✜í”èß]þsl‚¢Mx,ø¢x&Ã,ÙoñHÒÛ°aƒ â’K.Qz¿GÂÛ¿?6lÀn÷L÷Úº,˜Kù@"»ü ¯€ˆxéÐÈC¢Sýt%:Áñ¿ÐáY¤Í®•+É©¼·®Dç DÁAr®Â¬ DÔ!tÿṳ̂ܰ–ŽÉß›(Šlݺ•_~ù…Ë.»Lé9 x‰‚‚žþy¯|­aÔ¨Q¼÷Þ{þ%¼ 6°sçN ê­ãÒÞ$²ïÈ9u¥Ñ”Ÿ‘H(0Âá™mÁÉÐ ±‰Ò¾òS9Ô`+¨DÇ9NÉÍIp4ÚñT¸s‡Úq«*‡šlCAÿ{ßæîò›)Öâ‡ù{?¨ÚÚZN:åÓ¹¢(b±XÐëõ”••‘••ÅîÝ»Y½z5‹/æŽ;î`êÔ©lݺ³Ù|Ñ’ýû÷_Ð뇅…ѳgO…­ü€úúzN:å— Z߯¢¢‚ŒŒ æžNé ÃnºÐ¤¾pj/ÔUHguY ¶ÕK„£/ƒ²LGð±“è\HÏusN)!&8ÂLTÂSµDvjÑ5#»’sn&i³V‚`£Çróà`:Ë¿©233)**ò©Ákjjüžþ^EL&¬ZµŠ‰'òôÓO“——wQ’;v\Ð뇇‡Ó§O…­üƒÁÀñãÇýRÖðáÃ}ÖbZ$¼M›6Q\\,{rŸHøÓ°®¸ 2 ø”DpVÁYÍ.¤ç7W[Y’ôÖ@t¢ûÍ)É9%;•Øu"¨\HNçØ4.’¹)ÑÙL`7:>õ`."4y—\7»yFZ6lð©Á«ªªÈÍÍm×ÎU]]Ío¼Áüùó)--½h%·Û‚¨¨(ºt颰•`2™ÈÌÌô›:뫽ºEšÜ¶m›GŒoè}ÇNGé¿€¥4IË.‘‘Ý!™ÙíŽÐ5Ôœ­"“i9y€àâ|°5Zl^‡ÊÕ^§¤ïv«Cª3»Hxæ¦ûìfëÁ^ B IWÌઠ_ómV ÅF÷„·yófî¼óN¯%±Ó§OSWW×îÌjµòé§Ÿ’””ÄÓO?M@@ÀE5@²³³©ªªº uèÕ«ÁÁÁ [ù‘‘‘,\¸ƒÁÐê1f³™>úˆM›6µzŒ  <Ø¿„wôèQYïl—P¸l`,GN‚ü“Pž'‘ÍÞHx‚sÁî ¬»*OK¤ÚÉ…ô"‘?*­ŠF²sò©JÕLªs’Å…Ì\$¼µÖåStH}¦‚âû2àÒk¸|ß×|•å^=-;;›o¿ý–ÚÚÚ‹j€ìÝ»×ãí…áÇ+Lu‘ŸŸOvv¶Ûcz÷îݦ¤¼š–$wb'€V#»@üÐqP™eg$R²ã"Õi‹SB]âìlÉÙÍP•šþFÃt ÁP,Ú$ÉL4ƒ:ÀAv‡4çÜ‚$Ò³[ Ž‰æŽŠæßŸ6=³ˆèÒýûÐs:G+Zo‹ÅÂÁƒ¹âŠ+P©<›”k³Ù8zô¨û¶Õj¹ôÒK› 6»ÝŽÅbÁh4RRRBNN™™™²ÏÉyî¡C‡8sæ ýúõ»h:ÿ!CxôÑG=–d¿üòK Ý7mÚ4¯lr}ûöUXè<¢¸¸XÖÑÖ«W¯6-½páûŒ¢oìGpÒ½ätöìY¯ÒÆ:tHv^rDD½zõ:ÇP«ÕjÑjµ„††’˜˜È Aƒ:t(ãÆ£²²Òm™ååå~_Yî·„Ó§OËÞ_TTÉÉÉç­NΘI«ÕŠÍfÃn·7ôAP©T¨Õj´Z-æ¼Î’±Ùl usÖKEA@Ôj5­Vë±öÒV Ž;æv|tèД”´Z­ÿ/??‹Åâö¤>ÑÕu Ô–KóeE›¤N .Òœ“ä\É›ƒôTM†U"hÔP_µy ‰–lt‚ eZцI³6ìj0;”gC˜‚£%;]C¸‰Ñ…ÌŒ­ï³»o3J¤kœÞ½{“œœÜnu´Ûí’““áC‡Ø±céééäççS[[K}}=DGGÓ¥K ÄèÑ£éׯ]»vm“Tå êêêdz mj‘ðÜIxj s$„'ô€²ÓPuÂ::Í ®™4×$ÜŒìÔHžX}Y#qê!" BÂAU ©­„€Y5•`¨Ñé &C@ƒôΉ’3œKzMþ76J‡Ö ¨þ…€˜Ù$&&-Cxùùù^Ix‡vû¿ tíÚÕc£¬Z­&--Mþ!k4-¾©ëëëyõÕWÝzÆÔj5³fÍ⥗^ò¨^ƒ•+WòÜsÏÉg_rÉ%,[¶¬M„g·ÛÉÍÍ•uÊ 8°]¥Q9xð kÖ¬áçŸfÏž=­ÚX«««©®®&##ƒï¿ÿž†ÎäÉ“™0a]ºtñ«ÄWTTÄÚµkùá‡رcÅÅÅ-ö[½^^¯çÌ™3üòË/¼û¦¦2nÜ8¦NÊðáÃÛMõ$ ?>>Þç­^YY™Ûp€ˆˆ‰@Ù{ ì”D`áATqNºs¦¹7Ìí$›Õj5¨  AbM¢UƒªC4è ¦ ”Ÿ€ªLI­< Q)€Y*£äœ^Y—ïçüg’¾›KÁ˜ÚrˆˆˆèŽÄÓjB»ÝÞjÇiíæää¸=Æ9YÝÓN%‘‘ò+¾µ‡Ä]wÝÅæÍ›[U‹m66làÎ;ï”]×Ãf³±iÓ&^{í5Y²‹çÅ_ls~ÁÚÚZòòòdµ’¶Û`5|üñÇ,_¾œôôtŒF£Wçëõz6mÚÄذa?þ8£FB­V·©^V«•mÛ¶±téR6nÜHEE…×vµ£G’žžÎæÍ›™={6·ß~;AAA~oÃS§N¹zP©TtêÔ‰¸¸8ÿžÑht«G‡h CD8š€`IU«ÁP*9ÂcAÚLªsÝ\x°!ÄÄá±5UKÇ«µÝ‚*±Öf÷Š·9tè,6tt‰ aô´G‰t „Æ@].+Àb†: …8ÂMÄf5H3)l®d§w‘ð `­†ú‰ðDT5`.%8ª3ƒÝ¿Ñ½éاOŸ–U»T*•G[ó/‡¨¨¨—šT©TŒ1‚qãÆñÅ_´JÞ999¬^½š¡C‡ºíìÇŽã±Ç“ƒâE‹¸êª«Ú6›_ý•'Ÿ|’‚‚zè!^´Þ`÷îÝn…‡   RSSÑétmºŽª%ÂsÛy4ŒZ«S-h@X¤xºú*É!ØÂâ¹BŸZ6•D>¢I:', ÂCÁbáçמãû_ƒ± ¸‹ŽcÿBA§›XóþËTþÔV—HÍR†°TƒµF"1Kت¤Ok•4gÖR–Ji3—‚1ôé`.¡!ÐÙn[5Ú P"ýGx'Nœµix•Âf³y”à¡S§NDGG·úßäÉ“‰w«6þç?ÿq;%.;;›û'Oºí¸111ÌŸ?Ÿ)S¦øÅ^åI(C÷îÝ‰ŠŠò»TrøðafÏžÍ|Ðf²kþLï¹çvïÞíSUUU k°œ9sÆ/ñŒ¢(RZZÊË/¿ÌòåËýžœBnÞthh(ýû÷oóuT-ÙuÜž €.0A«‘ÔA´Z‰ø´ZÀ ÖZImÄÚ8CÂ)Ñ9gi„§UIj)6‰CB@ˆ¤`ÏäsÉ ·pÓM71~üx¦MŸNâ5ãø†•P_.•'š%©ÎX*‘šµªq³Tºs+…ú<0d)O [iБˆ×VK@H8¡:yµ7"»;ç€s`zóæ´Z­lÞ¼Yö¸ääd·ùûÆŒÃðáÃÝJÅÅÅ|üñÇ-þ———Ç‚ 8pà€¬j=kÖ,f̘á7µ¨´´TV}îÖ­›ßîyyy<ñĬ]»ÖãŒàÞÚÝ.\èõ¼ëªª*–.]Ê믿Þ.3Uôz=¯¿þº_;FÙyÓ!!!9óüNxÝ#-´£Ñ:ÈNç >]#ª‘O°HꬓìÔªFÉι©ٌբ‡G*‹ª ê4aÆ‘’’BXXQQQ ½ürl‚N’&íu’th­…úÊfÒœc³VH›¥ê Á”æ"IÄÞòÍÙ¬h4:äÌsõõõÙðÌf3999²é­=ëÈ‘#²‰DHMMuëpˆåÖ[omQíuÅ_|qŽúXUUŲeËXµj•¬mÒ¤IÌ™3ÇoÒ–Õj%//O6$Åß„WWWÇÂ… Ù°aƒWN+o`·ÛÙ±c_}õ•ÇÄe6›ùæ›oxë­·Úu¾vii)‹-òÚVÙ222dŸaLLŒ_ŠÎ!<ÏtdQšœ¯VKêl²Ó5ª¹:,¬iNrêÆOZ:Få˜a!á„Fv&6ÔNLLLS££ÝNÚ ÔK¤e©’Ï®oTe-Ò³V€¥Ìe`®þ·ÕJ¶;܈ù¢ ›¥9“V«õÈ.TRRBAA¬$0bÄÕ‹‚‚æÍ›'kË'--MV}¼ùæ›4hÛcΞ=ËÇÜp&“‰ÿüç?¼ýöÛnë¡R©¸âŠ+X´hQ›Î®0 ²iÌ4 Ý»w'$$Ä/×´X,,[¶Œ/¾øBöy2tèP^|ñE~ùå222صko½õC† ‘'«©©áûï¿÷(¢(ŠìÙ³‡W^yE6Ó‘Z­¦S§N<òÈ#¬Y³†ôôt>̧Ÿ~ʤI“ˆˆˆí×»wïfýúõ~iSO¦<¸Íö» /00PV¸³šMˆfKÄÖ@v²sŸc¿ó­tÚÆÏÇ÷à0P`´$¸•Xk&Í\Õ9ëÿAbßž’Tht(ÛŒ X%ÕÖZ¶‡-¯F"Ck]ãÜY›Þ±¤c+@ ¾¶œz«<áy‚‚‚ÙYžÚïêêêØ¾};÷߿۬ yqSSS5j”l¹ÁÁÁ<öØcn;•ÉdbÕªUdeea·Ûùþûï™7ož[gŒZ­fäÈ‘¼ùæ›m)h‰ðÒÓÓÝKbb¢_BRDQdÛ¶müë_ÿ’u@ÅÄÄ0oÞ<6lØÀܹs=z4={ödĈ<ôÐClÚ´É#Õ~ß¾}¬WUUñòË/˾BBB¸ñÆùùçŸùÇ?þÁ 7Ü@ïÞ½0`·ÝvŸþ9K–,‘] ººšÕ«WûÅ–·{÷nYÂ9r¤_úŒ¦%;‹ÛNf…ª=vSêàПKzºfdçºßU"Ô:ÎSÇBEX5P[DT¡]1ýoúj!ÖÓiEt¤*k7b‰r ˜* úŒD`v#hÂßë\®¬zÏÉNtXMuTʘèä^®ö¹·n×®]ÏQõœŽ‘ºº:ŠŠŠÈÊÊbÛ¶m¬_¿ž'NÈNǤI“<Žë3f £FbË–-­sòäIÖ¯_O¿~ý˜7ož[UÄI¸óçϧÿþ~÷’FÙk±±±têÔÉ/׫¬¬äóÏ?—½ftt4sçÎå/ùK«¡%ÌŸ?ŸÂÂBÖ­[çÖf¶ÿ~&L˜àVJ]¿~½l&î   ¦L™Â‚ HIIiµÏÜu×]äää°páÂV˲Ùldff’››Û¦¬ÐuuudddÈöee®Ñ´4ˆU*U«¯«±F"¼r 8×–§ pÙï$<]Óßê`PG@˜*ÊÀª†â ˆ $¬û.{hu9‡1*H™t'ªÈX¨9"¥–ª-¼ª‚MŠK¶Õ´Bvuòd× ó*Ceenææ«T*ˆDErù—””pÿý÷7yሢˆÙl¦¾¾žêêjUcW'ÈÔ©S=î aaaÌœ9“={ö´jŸ©®®æƒ>Àn·Ëzˆ;tèÀüùó¹êª«ÚSÖÊÊÊd%çØØØ6Ïäp"==Õ«W»•Ft:³fÍbÖ¬Y²÷Ü¥Kn¹åvíÚå6íÈ‘#ÆV ¯®®ŽþóŸnm¨‚ 0bÄžzê)Y[˜Z­æ®»îâ£>r;Z\\LNNN›/''GvlDFFÒ­[·ö!¼Ž;¢ÑhZU«ÍPR^¹®’€ÐȦ*k[^@ Òž®)ªƒ€pië0ꎀеgÀ\‘‰Ehÿë¥P«êkAo†ŠÓŽ´Of LnÈ®Î3²PÇ€ÅNmy1Ez÷„#+µ ²²²dEÿŠŠŠ6­•ÑÒÛ|Á‚­†£´ÖÑ/¿ür®¼òJÖ­[×¢j$Š"‡n˜éNú}î¹ç˜Ê9mäyçÎýb7E‘?üÐmb\A¸êª«˜5k–G=Ôj5—\r Ý»ww»~GVV–[‡×?ü ëåìСóæÍ£gÏžIÚqqqŒ;–÷ßß­Ä+÷‘É'd¢ì·¶ç^çÎÑjµ­P‹ «ÁP–OXô  u8Z°Ù4“æÎ!»ˆFÂÓv€¸ÈÛ.Ùäê*¡6‚c $I",‹ %Òg@Ô† ª¡0m$;],µ••QQïžð:vì(Ûyjjjü–ÚÚS„††2{öl®¿þz¯ÏMNNæ–[na÷îÝ­vD9 3,,Œ|Y³fµÙ²a0ÁÁÁôìÙÓ/u¨¬¬ä믿v{LTTÓ¦M£G—›””$KÈÅÅÅ­zj ßÿ½¬—süøñ\}õÕ×+ @6îM¯×·)+µ(ŠœŽïѣ˖-ó› )ObÓúôéã—UÇN:%w—ššê•íÎ “É$«·ØÏªªª8}ú´ÛþÇÀ½¶cÚívÙŠV«õÙ™ Š"ùùù²ó SSSýš¨@Ó’ (>>^6 s{>œ>zˆ”aW¢ ­•Ö•ì"¼$;§ ÎêXs 83+[²;$¹¸)`:Õ¿¶²Ú®œÑ" ´Ý):þ=¿œ¶Qk‘76{âõFBj.¹93âFdd$:u"))‰nݺѷo_†Þn꣧RZBBÏ<óL›S=yƒ£GÊ«ÊÍñ999²ó èSÙuuu²6¬¨¨¨ÕÞêêjYÂHLLôIB²Ùl² ‚‚‚|ž²W__Ï©S§ÜJ‘‚ УG6­a!Kx `ÿþýn=?'«`gz)N¦Ó‘ Ö´`Ü@v.„'Kv.›ÝApÍÉÎnmL-/Z¥EƒîÛk ?ո♧º su '`›ûlC„„„xé áp‡ØØX}ôѧ3 ¸F£!00ÀÀ@"""ˆŒŒ$<<¼]bۜؼy3‹/öèØððpúöí{^2 ;Ûõøñã²ÞàÁƒýr½¢¢"Y)Ì×L¥¥¥²ÄÛ¢„f0d×Héܹ³O«|™ÍfYÛspp°ÏÒ—Á`àøñãn %99Ù/SÊÜÞèÑ£Y³f¬«û‡Sð§_wß³?‚.TÊÚ$¨ØÕfçŽìô-“­N:›{²³[%#œ&†3‹ÁxÖsÒS%n û7³ùXÙ5òÜ“\n………²qJ;väÖ[o¥{÷îü`·ÛÙ»w/O<ñ„lZW{ÚÏ?ÿÌ€üÚ9Ý»å²M«Õj¯RmÉ‘’áù›ŸŸ/KZ]»vmQu4 ²1l±±±>IHf³Y–"##}ŽqÔëõ²)Ý;uêDrr²_íÁ-*W]u•G7²¿6î?Caú~0˜¥ùøŽÙîlvNuÕ¦w] Dç\/V´6JyNrs%;ÑAv }×ÅCâ ëظ¶·œñ.èjê+«9ºg'ßÊÏÓ&<<œ±cÇÊ÷믿ÊÚïbccÛœ§ßŸ’Szz:Ï>û,{÷îõØöh³Ùxÿý÷Û„ê)²³³emjÉÉÉ~3v×ÔÔÈf,‰ˆˆðº\«ÕJVV–,áµæH4›Í²±   Ÿ^Bååå²f­˜˜Ÿ£ÊËËe“"8Í7þ„ª5©Ã¬|}oߌ¹¬Êj%/ª;›­¶ÙŒˆVÈÎV'ͤ„ÆE¼í–sÉ®ù ÍÔ’fƒ&Tžô4Ã@Ý‹Ó{~滃5œ’qV¨Õjúôé#£ȾÁA _¿~íœëm'|þùçùù矽v´dffòÍ7ßœ—zæääÈjþ\ÃÂl6˪ϾHQìß¿ßí, ghMK¤å\}Ì}ê_[·n•M ‘””äÑ8h ‡v+5 ‚@§NünŸnµGŒ3Æ#5ëH¬>PMÖ¾-P] E•@d+dçJpz÷d×@zõ-Hv––É®A/3CpHœ-G·Úª!ðjÊOcûö}|í—˜˜ÈM7ÝäñCuÛø*•ß ëm…Õj套^bÕªU>'Žü׿þ%+­øK“#¼øM²Ùl²/_ì—………ìܹÓí1)))¤¤¤´HÞÎõŠåú˜/Äïna''‘6Ìç—µ\˜N§£[·n~Kë%Kx'Nôxåõ•é°aó~ €¼<¨¨bšÙìdÈÎÚLÚsf=±×·@v6d³sŠf ÿ B Æ}!n¤¾¦žƒÿË¿~ÝN%s%¼I“&ÉW[[+»H¶ ^¯aÑ0¼ú꫼ÿþûmŠœ?}ú4+V¬h— À®v«ÜÜ\·žMA:t¨ß$}úœ?Â7nœGÉ#ŽWÀ²]õìÛ°SqœüjN;f?Ô6nÖZ/~ë%K¡/dç´2Šˆ¾â¦:ìyjÐ\B/2v¬ãËÍY¬<îYiƒæ¶ÛnóèXOÖ°èÓ§ß²@øªªýôÓO¼öÚk²‡ž={òòË/s饗ÊüuëÖÉÚ–ÚBxruõ÷ÂÑqqq²ÏéçŸö¸<“ÉÄo¼!›#±[·nn£BBBdmh'Nœ   Àc©sÍš5lÛ¶ÍmŒ£Z­æž{îñù…râÄ Y©300°Õœ}íFxiii\sÍ5¶!–o«áÀ†ÿb.Ê„cAÅ ÇÂ8-„ž¸“ô¬®½ÞG²s%=+ÄÞ1ãAu5}8½o_ÿxˆe¿‚Ńbu:—]v™ÇbvVV–¬mÈ!TºËÌÌä©§žòhä§Ÿ~šñãÇs×]w¹zè\jðÌ™3íRç²²2ÙÜ­[7¿«zbKÚ´i“GaûŒO?ýTÖ&xýõ×»¹!ëÅî¿ÿ~¦L™âññž®aÑ–·d[l`K–,aíÚµ²ØäÉ“™3gNøZ­æÚk¯eåÊ•n×&ýõ×_ùñÇ™1c†_ ï|®aኙ3gòïÿÛ­í©¾¾žÕ«WsèÐ!† BçÎÒÒRŽ=Ê‘#G< o™6m'Nô¨^—^z) `Ó¦MnËÎÈÈ`öìÙ\rÉ%¤¤¤Luu5™™™="¼ØØXî¸ã¶lÙ"ëNveñÕ‡+(·&Rc?ÍàÂR%ÄA*±‚¦ìµ-L/s,»(x!.¨$²«7@eTb«­ẩtöì;Æê¬P¾:\Õê9‰^uÕUL™2Å«9ƒÅÅŲ„׳gO¿Çy¢jøá‡¬X±BÖ¾8fÌžyæ™;w×®]?~<h5hÖf³±téRn¾ùf¿Ý§S“ë«þZÃÂÆ cüøñ²ñiε>|Iú*cÆŒaΜ9÷·¤¤$¦L™ÂÞ½{eI«¼¼Üç¥cbbxúé§}N ëŠ>}úø}¸ÓÉ!ç\òX.0`/½ô’W†D›ÍÆæ#¹Üûe1Ãå²î»õdíÛ¹¨JE(Ó‚°š¤xlÕŽÏ:°ÛA*--O—%9•Z:F_ y' kä¥Sœ~˜mkþËw; Y|(š/UyeWŠŠŠâ©§žò* ˆ3íáõë×ϧŒÄm!»Ï>ûŒgŸ}Öm̘J¥bĈ,^¼¸ÕÙ6jµšY³f‘˜˜(kÿôÓOýf©©©ñh:’\½|V«eÁ‚ 8°]rý9×î}íµ×èÛ·¯Ç×P«ÕÌœ9“‰'¶K2 AˆŽŽæí·ßf„ ~I1|øðVc }EXX˜G&'•·ýðÃ}®Ô”Ï üx\dý·ë8µw7†Â¨Ž†š®`è æ°jAÔ8{¨4¡5ÙT`·I’\M)䟀¬½µkΊŽbûº |÷Ó1®z·’9ß²/£@6Ps,_¾œ+®¸Â«s §OŸvkïÔétôèѣ͉:=…Õjeýúõ<ùä“n§19—U|öÙg:t¨ÛA˽÷Þëöºuuu|ñŇEÈ!==Ým`´F£ñ9’'èÛ·/Ï=÷©©©~ jv’éÕW_ÍÒ¥K4hׄÀK/½Ä•W^éWϦJ¥¢wïÞ¼ñÆLš4Éo÷¬Ñh˜;w®_óÜ…††z”ÕY½`Á‚Þ<˜=zÌ–-[|zs¯9\§‡ÍôNH ïØê+ , #Ð ‰ t{"ˆ‰`³ô5`¨‚ʨ*„²3P– ¥9P’¹ä,Õy¹ä¦§³w÷avfè™òQ1ߟ0úÜ€o½õ·Þz«×¤TYYÉ'Ÿ|â6ÓD||<Ó§O÷[úq9kÇŽ<õÔSdffº}f:tà…^`âĉ½Éãããùá‡Ü¶ÖÔÔн{w¿HFŸ}ö[·nmõÿ&Ožìqì¨/’’Brr2'Nœ ßðÔžuçw²`Á‚6Ú†……1hÐ JJJÈÎÎn³‡\«Õ2nÜ8,XÀõ×_ï÷xÑ”””†drñªž 99™¿þõ¯òõ}€Åbÿüç?‹¢CßlÓ¶ì¶®âçÓÂÄ-÷Lj‡çvs +Þ¹R¬[q­høèQÿÑ5¢þ£q¢á£q¢~ÅÕbõ{Wˆ…o\"f.L÷Ή¿&¾;9Z|é¶!m®‹Z­.\(êõz_šFÌÊʇêöiiiâÄóŒŒ ñšk®5Û:©T*ñ…^F£ÇeFqîܹnËAœ2eŠ˜——׿{™8q¢ÛkÅÅʼnkÖ¬i÷65›Íâ¡C‡ÄI“&‰Z­Ö§~&‚x饗Š_|ñ…XVV&Úíö6×Ëf³‰¹¹¹âóÏ?/FGGû<âããÅ—^zIÌÎÎm6[»µcUU•øÍ7߈&Lð¹ÛäÉ“=º¦O ¹F£áÝwß%00+VÈKåðÀgÒ|Â+ÓRHMˆ¢{¤pCAb- µÝ ¢ˆ]¥Áj¨·¨(QÇQh§ÔG•ÁÌú­»€ò6Õ#$$„§žzŠ'žxÂg{ˆÅbiȨÒÒÒÒüšŽ½5Ô×׳lÙ2òóóe¥ÉI“&ñÐCyÎá\¡lïÞ½äç·ž55;;›Ó§O7x-}…Á`pÛ® ç%ÔG«Õ2pà@>ùäöíÛLJ~ÈÎ;©¨¨h˜»jµZE±!su@@AAA„‡‡3xð`f̘Áµ×^K@@€ÿVäR©èÒ¥ O<ñÓ§Oç½÷Þcݺu¡×ë1™LX­Ö†°µZN§# €ÐÐPºvíÊ”)S¸ù曉o÷„®ÜtÓMÜpà ±sçNŽ9Bvv6………ÔÔÔP__ïQ‹§óz±åùóç³lÙ2ÙØ¢ß:âââxá…díR ´„‚‚öìÙéS§«Ùln “„„zõêÅ AƒHHHh×lÕ®¨®®æÈ‘#=z”ÜÜ\*++1™L¨ÕjBBBò14ˆ¾}ûþfR•µÚLxŸ|ò ÿ÷ÿ'›ä·ŠáÇóüƒ‘#G*#W‚ß1ü"KOŸ>U«Vqë­·^T7ÊÃ?Ìš5k²S à¿Hx®6–•+Wò /È®7y¡á ¬ýÓŸþ¤ô Âó………¼õÖ[,Y²ÄmÜ×…@ÿþýyúé§™8q"ÁÁÁØl6Y{ŠÓø¬@…ðZ%‰ÂÂB–/_Î;ï¼Cii)ít)ù›†Μ9s¸ñÆÏû”. üÎ ¯¹ªûå—_²råJ¶oßî—@CO¡Ñh=z4ëׯ¿ É6(Pð!þøcìv;ï¼óŽÒ“BUð;~®ªß[CvëÖ§žzŠ»ï¾ÛãsêêêX¹r%³gÏVz¢¿c¨~7Õ£GæÏŸÏm·Ýæé}øá‡üíokóz (ømBó{½±nݺ±xñb ß}÷Çêí’%K ãñÇ'88Xé! ø"IýFMšßs£'$$ðÁpûí·³qãFæìÚl6ž}öYBCC™5kááá^_WÔŸF,ø *wƒ! ¬µ h ¨ D]ŠÐi BÄ÷eTíAÌ}*wµâ ã8„n!èZ_†P¬ØXðTï‡ú"°›A C:M•Êp“êÊuo(ËT€¸÷&0¹¬wÑí¯¨º?.{nsOkûåÖ…jG·u2—!f¿ %륲5ay BÒ=Ñcüâ;FÔgBéOˆU{AŸ!ÕÃfM&@dB „ð>Ýck×÷æ¹Úw‡š_]ô T}{nÖb8ýz㎰¨F®kñ:õL OQ]]Í7ÞÈÎ;½RWß|óMþçþÇcÒífÄÌàÌû´¼xx˰ùú?˜õJË'wG±AÓtoÑZ‡xì/P²Ö}%cþ„0`‚&¬]êîüO4—#î½ §¼&;wã·Þ޲}¤îâþ©`.kE5yN/iwÂó¬}„žóRhsùr„×Òs‹¾E<ârmUÂû´ÛS´!nõ…µî³!qFËåþÄ눈¶nÝŠÅbAE·‡~Ø+ O<ò œyO–0dËim²s—7=^´#ºW~”mD<ü¿ç$]ðWÝDK âÛ›‘Ý£“¿p!ÚÑm}lă÷´NvpÙ]Xˆˆ™ÿ‡XµçÂ\>v<¸¤Ýy7=¦ô§&d‡:âoþcª´çµk}%ÿmº3î&„.³ ¬¤š  rbþ§2/VBïç!~Øôˆés¡ÔED/Y®äQ´ *¶5þˆGHý?ˆºÔAP{ñä3P½Wú¿|3”¬¸ ~¯»h3 þz'ÔmFvóÉÔ¦ð…óÜŽ²È_ Æ\—ÁŒÐçèx­£>kÓŸ”¶ç-å[‡ ˆ DŽ€àdI­¶›¥Aö›PüCã3=ûBäp¿Úö“óÝŽr°Õ5ý­k!­¶íÉiE»{ÇœhÈAÜ7ê=4Ø/l‚ ¡Ë,D£æWÄÊÝÐ̼"'Ý)*­?¡iæÜp Åðö êf¿eÂ4>\ÅÞ.uGëêqöì'Ÿ½på|·£ÔÍ<ºæŠs±”{}}Ql–üÂÕˆßáe<ç9Ùý „t‡˜«›ÞÃчÀ\âҶço„‚Š­$g)B 1Cí‚°~MŒí¨M¡©¤îÂO÷O›Cº;óvA…ª—ˆ¯]—Ìlk;Ê–ß[Št¢d-$ÝÕôO<Ī ¦R—1Or<8QøŒÙᗦϬÏ"I½Öv@T’—}sïó:|äž«Ðå>IJŸ[)Ë8+ Ïßo¡„;šîÈÿû‘« ÚŒˆv ¢1±ðìû&û÷ÚniÚyÞƒXò_DK¥ja3 ê³Kþ‹ýäìÛ/o·º ƒ¯A׸3÷ìÏû(97“ŠJþ+«²]¨v”-?v|Óò3ŸG,üѪ—¶Â¯3=h'WrÄÌ…ˆõ¥Rù+åB[Dû¹m¬»I Ô>4óD•Uês—n”Ù1L2â Éî’ ‰w# ÿÁÿ×Öv@ò ÂO þJqÄ/©@ !=!vJEW9…¨›óàô.+ F,ÏA&ÁÊÔðt;<7#™ËÇ÷}þ[ÃR¾¶(b¢&´=WÕ?Tí©«¥zV*p[Öæµ«DRwºá.«v•™î4¼uˆm…•ØÀ.~p•?‚–æMñdìlƒ?Àa ˆIèð %Õµmû>ŠôvuHsô3 áÔI&b=GõXϱùç;_9ºãù–л7½•´ä¸*–dÏ:–é?à­#Ôgõ5ŠýŽ(ÉõíÖµ÷D–Q¹$ÊÁ*0Ãàþïðøõ†¥<+ï¾»eO°;=˺9H’¸½CÜtQ6D—’¸îTxcKWÇîWÅ£ƒíYøì6¥0¯ýà FåPÄØê†Ët„Ù `+>¯$N·üp°³µ)ò0€}¶•ÙÚÒßs¤•Ûo2©óÐqI¶â~%1¿«ý—æS‡7§',@I´¤dÖ ‘‰Þ¨T{/À†H*‰Û¢GQxÄ„À<Ó-«ÞÁ$ïëO2#\€ ‘QwXWè{(H³IsøÝ> «f “”ˆ÷öÀ®ì¹ç‘ J9‚ì:ã*há¶¡<0|ù&jëj°óò)Õu£ÊÒ¤d ¤ùp<ïO%¬•þ˜Õ_ð i9Fs÷ù‚pÛ°«¼þU̬­¡ÍcÇ{½Ÿmœ¸ÐÕ¯2)Ù `Mî…a) "ˆtLàȧ-®<1²ûew fb-m¹b²Y^V•ÖYź;3Vg‡ŒŸíÆò–CØ@Ž×‘³/ô;?" €ï¹Žª ÓíMÀ`þlE¢¿'ÅÝ+^CGÖi"bfæü s~*r²« /ÄI'”´2@:œnG<‘ÀæW>Ä“?íE²€n*Âÿ"“ÇC÷Y<çqc‰b„ÏE±öÞ§°ÑÌŠ´W‹™‡w]ñ…Œåe~7d•°-*gÍ €r¼Pæ´Þ?yœ ûpÉõZåÛ+fd½ü'É.À#ø \oü7¯ç^fIEND®B`‚qpxtool-0.7.1_002/gui/images/refresh.png0000644000175000001440000002167311345714053017267 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDöòÁdK pHYs  šœtIMEÚ ˧ º IDATxÚå{yœ¤Uyîs–o©¯öê}™•ÙfXf@A!""‚`D½—·hÜ~q‰!n‰F£q!—$nQ£F½"[Adf``f`€Ù§gzz¯®ª®ªo?ç¼÷êY07˽¹õû®¥»ë¼ïsÞí<ç=Àÿçö_5ñg~: 0ÖO‰^FŒ$˜n‘I[Щ/(Ììd{Ë7¾/\÷|ñ+þ߀*Àp&ŒyYàÐâY¤C•˜žFíW­êHõîïÍþí?~Y_Qf¸µñ߀SaÌ:ÒÆ×L3 ÔEœUˆ³2g,Ï%—œÑ Óñã×7ùwï¼þ½¯ñ¯yý»ð;áÿ]>Ý`Óf±‰ÃÉÈÄÚA¼‹8ï&λÁy㬇 ÙÍ¥ÈÛ‹$Ûxظ«}p×CoÇ«šï}ÞøþÃ÷þçð‰?þc`ç=L¼ò#™]ûÓÂÎG'êKKñÃwŽ`rúož?›À–3­†TОð“Hq­ D¼b8/ƒ± À»ç]`¼ \T˜Å»,×.å=¡ "ysÓß9°yãÅþôÃïxí¿ ù\þècò¤{j,{ÙÉY§\ìÒ"»TŸÿG'Çd­Îø³ t:þ·}ëÆ;—.y)=wä "iib)´a¤ˆˆŒ!n q¦xJšÇÄX()—*NV1Ê9WôUœ{ÊÅW|·º×7·UßÙÿ <8uÛÿ¸êùðØŒâ«ß%r'¿8çKýйKÜóÝÕ)Ùkjš¯ 5ÛºÔö!B ¢½ÃçþÂrxü\'æÌÀlªTE)éȸÜâž’8cÜ@s­ ˆˆÌ€1MƤ̰˜” j±âí¶ÕÕßý@×ò5k·Þõègw6ßñWÿx ®}Ûÿ6>ý­ûC™ò•Ö…Üu×¥d¯šUby£·YW…V;‘­f̃vÈR?§9H£u¯åXŒñçîQW>ßÊ»‚3_´:>e…ôr^$©¤%M¶q²E¯Ë˹9¼ L¸Òšã0†€4˜I#¥Ã‘X±vÙ½|Ayè¤/ÝyûGo»þC÷~éÛÿJï}ãËwœL’‘Á¾ìàLrõXÕçA¨xèÇLE1T’”Qš% ²ž$;爩$Iç¹›ÞŠBkÏú &öm¢b_ZN9ç°eMZâp6—Ù_é/ŸÜ3P:««¯4¨ÏÔæBh¥ÆF ­ ”I'§u„ΚEÝ•/_þŸ½vÃ?\wû¿ùó¾k^ù»ËæñÀ=ÛæN>eáßÈ0 ¹à¢úxƒ‘J J”"E0D¤ l/ [0 4†èw©?ü9ÀØn>ò‘HξøÛs;6Þ¿xéàæåk®[´rðå‹z‹§×Ú)›‹0"0"¦ šL½®ã$q-í-îoù8»öòWÝú‰n¦O¼ëÊg”Aÿæ¶ï}Öì^ûÑ7ÕFÜvÿÐP±7MÔš¹éA%ÄHw¦O…¢‡bÞ¦Ñ=ã¿J¢änǵÍlõWÿ.iò𾟠6}EñÃmïØ«Õ©+ÅÌÄð@iY6ç 6Û Óš$¤‰Ç±¢vÌ*¹¼wÖW¾|çû_ÿ¢ý\Žï½é¹ã³›ñâ—¼½=’ ƒ}çM×’Sª3MÎÈ€±ÎŠ•,ËØŒF÷ŒÝ£½ÁÉØTyàßµ^h7:ß—šµÑß{óΡ/y`é¢.Y.{kZ¡rãXƒ’ˆâq¤$è.•sgüòþ~â=/ÿá¿Õñû~s0>ñƒnúF÷üL¸½ÃתáÕcµØHÛâ„ÁaYi¤ŒÖ4‡.­!þãêªñ½ŸtwçÇîúáÆÏ¹*þÈÊáüDÞ³l­ HHVÔ¨‡éètºÆ®ô\ÿŽß±è²×]ðÛ³ÑñoÞÿ•ð¼ç_€Õg]uv5´ÞñÄþF&ŽR—30.8¸à`‚ƒq.„%XØ)MT 3œóß:Qÿà‡Ñ×ß‹Bq \w%lûdp¾–sŠù~”+”Ë•gâú¼½üôäšK—ßšæ+†²»òž°´R0ÊPghšœn'Hœ·âÔ%ïÞ³é¾Ì»?òÝgw?ùàß`fâP—v»®ß²kîŒÉÃ5iÚmNiJ †å'õ0!‚„úúŠ,l4ÕáSÿ",±Ëɺ˜™8fj¯üý«ðÁ÷Ÿ ?\…ƒ#­f QÜÁû‘Ë ¢Ò5„¡ËP( #ŒÊˆ£.õBZýBBZýPªúkBßþ£Ñ”çàýoZ?6^ž(ä3몵h J@àÆ7šX;HE¹âb9¥}_üèå;îÚÔƒ±}wüæRøS_»ñæ+pó#c×ì8œ~öÁ-cNX­Yä·É(E0„Ë{¹£"Øž›Œ×b«\ÎòÉ]#þ–ûvü°Ä]‡F¾ê;Uo ÍóP¨ ¡6AkCCX½z1–-Âà‚n”Ê9pÎQ¯¶ppd÷OÁš˜™žÁþý#HU•n…4‘ûõàúøD„{Ÿªcý’â9[wUo|dÇÔ"‚"N`œ¬·'kõe±åÑû]¡’ùúg.ýÍiðä5§â¦_íjóÒî<0ã¤~`ñ4¥ÎÒ3 WXÁ»ûö­3Ë{¾pîeÏ_g8ÕÄSã,9bþ=½çƒdgöbÈÜ"ÄI=ƒ%œwþZ¬?s /éFoO†A˜B% ½Ã½XzÊb„AŠ$Œ1:2»îxoÚŠF͇eÇ8óœ{±÷©?C£ñÐQá׸xt<ÆöÆ0.}¾^>»soÍ#P禦Zª|ReÝ“þðóöž¿<ûâ/ëM?{ÏÓøËoò3—`ôÉ™Ëwìk¯­Ï¶Kbph"ΑñlvÒÂ2ßpËFEéWzp÷WÎxÁÊ.7ïÍø­ðrÛ±!8zz. ív©Ê¡Ø³KbýÙ‹1¼¨‚|9§ÁX#‚¦G…ÐÚ@k!8ê ÀK%üÞËÏE  8´g7‚ö!<±íSÃ(ä/@³uÌÍÖ :Øx À²¡üæZÉYÓUÿ¦«c ȀƧ|ÖSʽñÂW½ó–\!»õ×\àÖGFa1U©kï?Û8ñüÉC3–i· J‘Ñ„µkxuï!þÐ}OÜ#y &óe\ð¢?^¡•ùv6ÐlìC;ˆÂ,²•Exñg¢{¸„R%ƒ¾î,– Pm%hi'²Î–H‚k h¥1]õø ` rR`tçnþþÏÑš›„´R¬XáÀ„‹Vëæ§™ò/vµÏÚ+7m›øÞÆ-c«”"1F Ë—”ì©ÝþöŸýø‡ÏyéÍÆŸ¾÷XŽ ædo¬­­×Ƶ‚` Æ9*]9æ âOn=Peœ}!¨“nÑŦ_~q¢æ,ÏþöÂ5§c®>‚8òGe$| –®_ƒÊ¢nøàPÒFw»ª»gbLG„™0LÓFŽÑ–B5&ÔR`¬©pò)½xû[Ÿ‡ò¢eP¦*-cÏh­ÖräŠW= Gg Ù»–,(|g°/§uª¡†Ñ:MQ­…&[Î_¹þ¼ÿ±Š³cÙŠï—»ÑØ»S¦$^rhÒ÷t’&&˜äX¼¸Â÷nßO­fx›WÌÞŸï)à‘ ×¹ÿZLÚê[¡Ò ’¤ŒÃà]%,XYF-1ˆ„D_O»§ìž PófÛ ³¾Â¬¯Q í”ÁOZ"Ñbê CÀ$j‘AÈ*KûB/ ï‚6ä U$qÝ]xT‘s—åqÏ®zËî-KwZ’ R¤5ÈÔk¾æŽ·°ÒWºhÙš¥8ÿ•ÿЉ}ƒ]°t ìŸN_PoDŒÍ8ç(æ–†Ø=>!$ÿNТâ@ñè¤o~ß7ñõ/¾¶õ6¤i =0…<2ýyȼ‡™”pÊpÄ`Ça€ œ3p0Æ@È»íP¡ÖŠ‘r)wqÒûö¶pÿîNÞ"ͱ:ZcÓˆÚu0´‘*÷éž· 321“»¥»Û[3z¨ÑñqâTQ»¼ØS¾dÃ-¾Uê-7€+ͤ8»:— EaÂΉsŽþ¾ß?f3üe¶”Û–)zØ|÷¥¡­‡pþ+þ Iœ¢2t>ªx°Ë9øBB9¼¬_í™C#æ"V¨Ñ Z¡A+Ðh†aJðSj3K"¬]RÂDàáƒ-haáš+Và´³`"á¨AêA« Ùí(Þ~Tž°ÙÆ7¨\°6ÔŸŸm`´)ƒV3Ò¶çžZ¨Nã¬SðÒ²24+ª8£9g .,×B¹à°Ñ½“Ýyø©Ã¾íÚG'{Ý{¾‡Í¿ü&G|Tº‡`—»AÅ,÷Àó„œ!—s°õ`Sõ~ÊáÇ~bà§ÁüëV¤áØýå õç±|ÐöÑ&vLh¬È¢ÙŽñµ_ŒaßL‚l$ž“É2‹–¿@`«—œ9„¼'ÑוÙÕדݖÉX\+ƒ„ÐI:™Š›Í¬/VJ8ï7‚û»§‹abÖµü„3¢NÉË9²Y—©03SƒvÆy¤wI6ßó£Œîǯ¹ÍY@ó,¨¸¸ó±YìkàôÁϤ¸ûÑܺyFpØÅ PÈ¥"X¦&Šh6_‹ÞžËŽÊ•D)V–e«Rr7—J®ÒÆ0ÒÆh$qB \ØgýôØ„µ|ÈRÉÎ>œ …±bœ$8ŠE—…­&’X=fyîáã·9'-û5… ,ƒ‘jŠåËœyVÕ”ð—,Æ».Zˆ›·Uñ£'¤Zh8L#›({=E}%‡açt€˜ nÛ>‹¹ÀàE+K8TmaÏ A޹È@1‰BÙÅlªx`œƒ7 ú{~ƒìQÙ“3øQ )ïÉ­¥¢ëƒÓÚd`ˆ •!7ç­H¸ÆÙòÓåa¬‹©Òœ‘Œ1d2&vÍ*¥è‰SÖ­Œöoß{t’Èj{ÿÞÐU(ö æ.õÑÃ,¼p}Þpî ʞę‹ò¸t]šm '“‹¶%`˜Aìð1ÙŠ‘àìe¤Äð{«Ê˜ Rìk"ëd‘ ‹$J0zº³¨Î%óŒ‹c 4—úKŒ}¯ºp%nÛV…%Q/Ýc,¯µ!‘A+Ã¥Õc¹ÎbK k1i㜃uB5²‹GAì+¥ÛòÓ‡©YÿQˆyÈ ^ŽX»˜SC«*Pmƒ‰z‚Mû›™° ì`û˜Ã³1”xš@ERMP†p„?²‡@1#põó{02bË^Y×Bª„çƒà§½,cƒ8 526˜É€œ ´Ž1[žrÑ9hYâ †Œ1 ZH¢ ÐfœAr!+©"‡ƒ ÞŒwÒUªŒÏ¯KÇ·¿û8'ð`Èl-Ãa|ƒ… ‹8ì+ÌÆ7o­âp=Á­[gqx&‚k Xž„ÐÉ9¬ùTÈÊY«Öwcíp×Ý<Ç É!)89)H[Àö,h0ÃÁbÒL¼î¥XüOÇèpáeÐÝ+}Û‘s–%h‚!‚J41!,p–çRB2ÁM\pä pÆ` 1cLSZ²)í§GLz`†À]<碞ÒvŠ¥ ò(W8ÇÍÕÀ !ëJd ;cƒ§‚óù: Ã*"Tò6zó62GWÖFε¡É ))X2ú°m/k!À˜ž&ŒaÝ—þ­¾ÊÓ¡KX’k)Œ6 Ó)ˆ´°ãBŠBF ŒB‡Òæ¼CyñJ™  ñt¸çvðl°Œ æJ´”ÁÁjˆ NëÆUë{ð§‘µ8Ú±AŽ#Á… Á9Ä|!l[àÁ6p¸¡q$ ¤œ!5ãØˆõ² Êà \9°-†¸« ᣤ“ F0ggÐ\02Æ€´L§&0Œ°Jÿò!!2êŒ3dLÇ<9‡e[‰Ö&±N؇[ÌàÙžáJ8®„;ûè.ÎÁ‘/^UÂ`ÑŦý>´´€œApÆ:1€À0P²ñÐHˆ06(»ÏB¢ R! Œ/8&AÆr Ê0h TÜ,œ¶@c\ÂÉ@‚Ò¥‰C0Æ€”ˆ:EïD2jH"Ä–àš ÎÈt“1n X®m3Æ-:î® fäZŽ„å8ŽDƈ¶C>ªFѵ0XtqÊ‚< ZmABH5@$g¨äJÇD›Æàe»éF‚T¤ÚÀçJôU|m`µ4Ê®„ª1Ôü4È>V¤µª‡à)ÃÚ¾'âÄq"10JÃhM–%!9¨aIžÁ¥!˜Ž²ÄIKfÊ=ýÈOÚLÈ–¶€eK¸¶„ëxŽ7»§pa£®ËÐ]táJÞ9$`YÄŠ^‰ñ†F5`w!ƒÁJš8Ú‘‚Ö†qK^}Fûf"lÜàp5À˜Ÿ‚ Þ†•—ßzT¾8T˜ƒ±}?ö¢(…™÷2€Aš¤L'ªuïO¾¥¥cËÇ…ä5.x–bD@b Ç*€Ã Gž‚ ˆD,Ëà¶„k ¸¶„c X’#c[“R†Þ¼IŸ!T®ð<Ç9‹%º³ ½9‰™£ækHAèÎÛðc¥ 䆾‚ÝSš)!M<×Bj¬ýà&Ĺc@vhX›p8S2ºS ’éPû:Iµ1¦¾rõà]%g·k‹ºe Öa|ç0ĨØSÊf‹^)_Îá•üãcA3›ç R0؇ks¸VGyÛ’pl ŽmÃO%\ÛF9ç 㺰lšY˜Ž$öÔªðø4á¦Älh¡[˜òB#‘@-¦Z-…™¶ç6l0ÉÁ ý‚uõÕ¯¹VŒ™j«·ÕN»T’‚”êl‹µc *IbƹÏ9o·Ó0Ÿ‘U×`óÔ7Š`r•¢“Éf–ß{û;ѬÖK³¯X@2vTiÛ’âˆ%XpÒr’¾¢ƒœgÁõ2‡pö7»F€ÍS@Ä8´”ˆa!Ò6j¡Æ,Ø–DÎXX²Ñ³¤@;PˆR‚6¥J<õý‹;„ìŠ"ÞÕj—kkõ0£’F©Nð3ÆÁâvàs!&™àà§öšZÖµÉ8ÒpÞQ^TÙÅœSî/Ÿ¶|ÕGí(8vòýØÏ¯€H ¸&pê3[p8–cGÂql8Ž×u2 Ëfè/™ àf€¬ÀfÀíÎg®¸ƒë Ë·¼dyëd0Ý2¸cGONư9Avìýö…€>¶6åþn|úóßÏ…©8§>HJSf´"Ò`ƒ4ŠgAf/Àï= á öT%g‡\ p.À¸ÀÀ\×û+§u võ ùôV¦Þ†QpM`ºsf`IpÇÈ8lÛ‚m Ø6Ð& Ÿºòódi¶¸àyv;¯½ C!+(CÝY [‚ Á‘ RphC8íÏ6!v%j§ÒÙ½`Ù\[ŸÖ˜mä #¥a´‚©8†JÕ(·Ä Üs-ä2rS)gY’3.8„ìœ)âº{Qÿ²Þ…½kNÄËÞtìtå±[.EûŠà± ­ ‚3€8çÈØ–°ç•³lÀPÊ•,Pð); g2€7o® x.PÎ1l›Íç,ÉàÌEr‡œ3ì|dÆþÏs;=¯þ>ðº3˜¶òLLµ{ãvÀM’’ÑnÐr,Ä­¶ÖJ?¼ã‘ëšÒ’ài¢‘l¬œ·Ìf$c‚36_¬(M&ÓU.ô.¸ô©OØ's?Exáb˜P!Œ!0$ ȹB0 X`8ƒ0àg Y‡àÌÛ!ØÁµ‚ ïìcÐ`˜liìŸMáZœQªpñeËñøçÎ9*ÏY¯Ã'¿tûŸÈ+ÆFëRÇ7iB¤;§Ú¶-̵ç„à[N^ólÛüQðógp §Wü¬«àøŒÏsv¢Sª!tyAïK—ž¾bu¡§„Kßúƒ£n¿éÈFNÕ‘D ÒTà N42° 8s) #-ÂÚa™GÈH!–$ä,Bgï.A°`qÂH-Åj ¥4’8Â…ëOB£6}T–׿á¸ö-ç"Ó3ü²ñ©põÜL“™(©FkHÇb:‘ÑÆÙ#óŒX‡÷l‰|ÆúUWÞÚeY¼1ë0C©"íu—ö.|Íö;6 Û²Ÿf;¿u1>rÛ•&÷ÃDT¢')R•À¦³ŒÚÚ€™NE6žhˆ4æR —4,Ò`¤!Ñ©”1àÆ@À@ÂÀ•qœ C´jøá{ÎÃ7Þz¶ýÐg.>j’k_|>ó÷??©•ÚoÚ¿·j)¿-Li2™B†üZC£±òœeU1¿ÁãÆß|lzº˜•?*f-ù6¿92\Rq¸÷µg¾ú¼u}k—auþ…OáÍŒaÏw_ÉÇîAØj Mc´ý’b0¥ b hèDA' Há@ p0Tˆ”‚kº¹Â°¥ Iuêv¥ FÙVÈpÀ03ºÿô§âü—]R|ó‡?uͧo¸cáC×}‡¾Óåþ·ïÙ?wJ}ºÎMäƒTBd „šíIÆÙ­O>°›äºcœ’‹Ë–Vw­÷œR Á8æA0†´•Ï-è]¾ðOƒƒû‹/¸öS¿¹ååGÆ#?þ4¦<‰Æ\­vK‡ 8… 5Ò@# MgÄ*5ƒ 6è†Á°4ÈKiXZcaVáŒ~æOaë/oÁ·¯}tÜÆÂ¥‹²Å«_£óC_ùÔ—ï:ó¯?öz,yá—ž¡«÷íšâªÕ´LÍ¿l)‹ >ÇT¬~i9r'?®á؉λñ‰C%O~£àÉœw"ÎÀ‡!h·Rº¬çä¥o·|Oþ¶‹ƒ›nÂý:l¹ýë8´üvJ$¾FêÒ€±oúi`#uƒ-„±Y¿­ ¦gë¸ç¾ûñwŸ|nùâ{‘„Ö§·w°<[S…š|Q‹J7|öëÞ^œ=þøT!¨Õ-ã·@i:ùmØŽ öìÜ,çøN¦ñ“Û?õë§Ã-spóΞÍo*å¬KÛ1]¢5)êfÌrº{ÞÓ÷ŠwøñWÿ×D'-8žÖ˜Mlþág°oóm8ýâ7`Åé/D÷àbd<¶²!ƒ±:;"Eˆ!%Q” =WÇø¾'ðØ}7adž›Gw@¦ÝVœæG÷N¨ÆÄ̺5§/X5:5aª£ÓB·ÌÄ!‘Q…®Ò²Ð;܃úD•ÂVëûI:ú•æÜÉôÔ½ÏÞ%¼hï>°uøÉ_@êßÁcDÅ!C c˜I•1°zKËÎxÏËþô‹½ôšœšË—þg´ÚvÌHkv„è82ŒÖà’³86v[[Íí7zð‡){~Áù3ZÀ׸îºëä–»þ%X´|G¥ÑÉöc è?FŽ‘ˆ »PYÖ·bíºÕÏ»PöVÛ³wN„qðÀó_ö–“g¦õå©Y‹Ò¸cú8ê¢PIÊ48ëZÐ3ãºÁŽÉÃÛfq„‚<6ž>ÿ;÷‰_ýkXéØUX¼’[™a24Ïh1ˆ@0¤†p ™®¾ÓûVœºfí¹——N9ýüÐãrzìàNèߢ§ @ýº 6íŽNÙ;óòætͦ4îÄt[` cL+MÜÎö.YyZ¡PÙ5yhëļâf~г çÍÆÛõÐÝ%¬KV-–nv6"ÖI`b c"&ín«P9=Û;¼vÁ©/Xô¼—\í­?÷÷±úÔótwß"L܉T%Gºm˜ä‘ÁŽ{V'éË^û6¬¸êrlyààÙ£û«µ¦g-Jb)XÆs‘ïÊ£ØS¤RO‘ÙCØ zÃ:ëMãäÑ(›íT<0Ïvc„wè ¸¼ù4gyñ†Ï½úýâu ^%$1ššÒQåõ/IDAT#JÀ(a 1ã,å’'‚‘ÏHט6‡ Ó JÆÆ¤-›szüÏ߸Ôü®·\Þü‰;ß½ã‘ñ·§g2®Ëȱ%IK £ ’(¡8Œ¢8ëIØ>˜&ÁˆVþÖ¶ÿÄ½ÍæŽÑùš%â·Þ¡ù?Hçÿ0[~ö™‰ë/ú£í«,\yubxE%ʈˆuƒ‰)o ¸qÁ»…åf9Ç cÌ7Œ5AôðáÙ'gæ»ÃŸ÷Ù®ø0£U;ŸeF–\ž„‘òëm?ÂÙ8òw«4‰ã™'’dj<ŠÆ&¢èp@p‚âôlWfŽøJz¬PFÀÞ»õîxüÚmwåûnؾhíÙoµ\ï´8QB¥J1cˆ@¤2†`b›90šcÀchrΚŒ±FùµÝÞcŸè“ÏÀºã®í©Ÿ½7M"­U¸7ަ·ÇÉÄDŽTãx:9Á×“ãÆ¯ðlÝÍÇû§ŒnÁ¤ 2ºn´š%VµJ«FÅ3i̶fÇ'ÛpÓôî‡îŽRóÂêgàH|BäÜlvY%ŽÇUO«dÅqÖ«æŸÓã|ß<—4x¼%Ðq.¡ç¿TP‡žÚXbÃíUúVlôrùY'cg,K:œƒ@”’11’Ñ¡Q©¯Ó¸ÆíVЬµSÛÕû“Æôa}ÜŠ=›°ÎM‰„âx2ÒÚO“Mç²ñüŠÇ'(OÏz_à9aŽ[-Ä-õäƒ7MŽí~rS¡kÑÒ²öÙ¶lÛŽ•X¶•)#ÎYÀÁ|0øZ¤M[¥Q»6q ¬OŒ¨ã„3ÏQ'GzÜHŽ[yõLŠÿ®<€šÕƒzdžÌÚ±ýÉlaà!0þ8ç|7@ã¶›™‘¶=c;NÃr2 ËÉÌ K¶Ãf=Û³5‘yŽÊãåÍ –©OøÝ³ ÿž7žö]_ÛCô¹×¿š­8ë%²{ÁIŽ1‰ëå‹ÌÎäMù­dnæprÇPqÐ~®Yà·ÍKø¿ýq龎DX¼ú|¬>çJvþëþ‚½ùsw`xÕúÿR¹þ7¬C¾ý+„vIEND®B`‚qpxtool-0.7.1_002/gui/images/gigarec.png0000644000175000001440000000345011176027525017226 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÙ +!™˜¦$¨IDATxÚí›yŒU‡¿Ý92:Ù5 Š}ø4„z«¨^†å†|LÔLäû‡ÚràqàK#úÜnuôgãérTç&Q@;à/Eéлò›„ÞCfÚ§ý"9 @¾X“+»Òêäã%õÒèc)`¢A/Pò»ý+‡þº¢ Rï_¦è't#2KÑ©m2üîüŽ%á½Úx¶GÉïGêãVçw10¨fª¶N©û|K'¤XJ(9ëaqØxÖX¾iM ‹u#P{à`ƒ#w¡øNa:a9šæ¼EÀ¢4-ó¦xkDŸ@ƒþ€C¿DfÑ¥OM°~é#‘ J¾ÿ}FûÕPb0]›Di+ ™üÞD ȳué»Å¹]) '—V \ Ú/Þ—¼ &Nu¬|ÚKÂ(àeƒ©„j8„r%ù! äÅ$–*Ù.ë]Þž©ô3ÌV¡Çw4Ók)ÍÚäþ1 L~WHhÛ ;Á {[ÿír{‘ÒR¥“hÔ´LQôÛ|NV´Š©$ÈÅÒ°ýì(aÄeœPK 8žÀôýë¤ÉCTŽR¡øË*ÕÇ£­A½ÏÐèsamuHÔ3ø–)ž•!à^ß;ƒ˜cÐg×ÏÈߙȤzÈbB{ÞqÀ@É´&.5ÚL6x+%”ºÉÐ)*aŒÈ¶Wë÷Ú£6mbN”X"¹ƒ‰|à~q‚¥ò?Ÿ‡´ ø@V`—‡4ý ‹É••]y ØàÈ·—Y?$ýÛ$a°‰ø±b±ì(°øB,»u&ìG´•MW×|¯ÈŽR_`‡R@U]Ù6ÿQ ,h­ÑÙ0ã:hHQ|kÒÕÜÿXeÆ£…Buÿa]±€Ájf×ç™âL•ìÔ¯+ ÈF«½ÃrYŸ ”Ýêµí³$êY‹‰í ßßpPfü5In²È"‹,²È"‹,j©lPvâÕ =MüQ{Ƨ¢A(‹Æ¢iÞF*x»¹ýˆ?ÁùS6U×KXcÌxDñ\&àòÀ;÷?ëvkÙ*´x>Ó—Ò„Á|ãY—º €°°NošüŸ` ¶,'àm¼ •£x;ÏñÎ Æ|Bí£ð‚ðùcÀzi·sºö¨Èà³*ÍòðŽÒ}ž“Àxà)â«Aö·¼k Öç‹wj¤Ë}&¥c’Ã( !ÕOx¦´7^ñrh]­‚øêðO]žyN8/…Õ¤M-ðöì¯À+ª^GüùÜÈÍw ¾¨é4ñ{€9T? yC™ý1E×EÅŠ>¼&tÍNòí¾¥ø·<ºøb£CGõó]ÐÕKžŸ>' {ˆ–îo~4ÕOhw×´UªxW‹5ùWÞñUPe×òÊqÑ€4î'ó½ úNâ©}T¦¸Æðw‰}è2ýeg:¸HTŒwÛJ¥Æï*ÞFê~ðL’$lsß8…µ µeà•ÁkžYßQų>žh¸%S¡UƳëgÛÕ}!©U¥–ò2AËg­ñ ],6ò‡ž Ú*>ÆG‰‘T%C‚Bˆt®b×ú vpAg ‡úœØIDATXÃ¥WMo\I=·ª^½÷ܯÓ=íLláŽ'$‚„G¤ !£¬#~«¬³"ë ÄÌH³@ˆ5L eÁ$ÊrR 3|8ˆ&þ%¶»_¿î~õÉ¢û=·GÄ™’J­.ÝêsêÔ¹÷V^1>|ˆõõõ^¹råWqÞ{œv8çØÊÊÊ/~AD'ƈWm®×ëÈó|lrrr&Š¢ðÔ謵hµZ ØÛÛC£Ñx}Î9Xk}žço‚]0Æ8¸uëˆÇ•ä'm|ÿýñ—ÿZ•¡üI³95ï½'­5N;1øüóUùÑGw?ž¹0»÷àÁŸ_O±x S_™:£”þ^–eäœ{#¼÷0Æ~«ñÖøù$©,Ÿs""Â)¥\§Ós§5a!·ÊsÏùS™1ÆŒÑèv»§U@ 0b'ÞöI<8ã0Ö~iFkàé1'p„@ ¤ítÚ¦×ë} €6Ú !Ô«Ð7Ðn·ÏsοQHÀ¿ýö¹ñË—¿þóóç§.¼a¤i·ûäÉâ»ËËÿùG F yï×777éÎ;¸wïÞOƒ ¸Í9·B!`å_|1V©Œ‘…‰ˆFODá0ǽ÷åÌs…Z­Ö«Vm­- -œsúýþÅÝ»w£©fó›qUÂ04a"Š"ìïïÓ§ÿ”¶¶-àœƒ1V~F]:ga­ƒµ¶(D¸zõj8;;ôû}(¥ ”bZëËY·;!fffÆ¿=??;qîªÕ*O’gΜÁÊÊ z½â8FEˆ¢RJH)Á"`c ´Öúý>²Nß½z•Xš¦HÓ­V‹vvv&—–>›êëëÖÁ’JBI5A½^dzgÏüêê*Â0DåâP¡_Öu®$QÑZ£×ëáÂÌ íîîRžçPJÁ{!ʵfBt»Ýh{{[”'ã›››ÔjµÀ9?&?çìˆ'F¯aØCJBZk,//cüìYŸu:EÒ4Öëõ*ÂZ+÷÷÷…÷¡”aˆ0 ÁÃÜܬµ b €''F`Ä×CGzÀ’J’ŸüíÊURHXg1>>δ֑ÐZY–1£5Ĉԡ”H;”ÊAÄÀØÑÀ…ËɆY2çœÃ{ÀZƬ³àœ#Ë2Êó\ ƘÃR&ƒ±vpW#ö’܇߇kððð x€4¼÷PJ!ŠBŒb0"âœK€8å‰8çœ#W ív Ƙ#€§©Š…“““ˆ¢Œb ' kŽÈ<””1lmoa{kûT`¯Zϲ F*Á‹!œóÎhç=´Ö„€V B DYd^—Àh‘2ÆÀZ ¥ wÄÈ[k­àœk†Ö;7p3ç "ÌÎ~粚SSPJ¡x”?|¡b-Š¢RÍ/^`,®@†d( ?JH)óJ¥bŠ Eq©Õê`Œ0??_ïýŒf„âˆOˆr¯­­¡ÛíbRÊÒÆ '„½J¥¢érØDâ8Âôô4®]»†4MËâ2 Rì)Ö¬µÑ8ŽQ­Vñôé2?~Œ¸¡ÊœsXc¬Öº#¬µYÙUYÉ‚ ÀÅ‹Ñl6±··­5¤”°Ãô%|üzˆI’ Š"8ç±´ôív»Tf§úýþ ±½½½777·†á׊7Æ Z­"I’òn‹ÎV€ïÄ‚Àˆ´åý@GH’*&&&Ê}D„<ÏŸomm==ÊÂ0üµµvÙZˆ’²k×¾ÿ!Ä%ÃRJ8gËt-²Å3PDø!)Î9¤”Îì...þ±Ýn÷ü{uuuC´Z-sÿþýßø}QÖ®_¿7oýFˆà’÷NŒ1(¥J—GQTv>"B0T‚s¥‚ ‘¡V«?_XXøÙíÛ·7K'4SôS   wãÆzÙÝçQ’$¥ü¶HSÆ µF«ÕBš¦èv»HÓY–!Ë2Ý ¥D7ëʵµ ÿÞ{ôô†Ó'w|‘¶ÇÓ³ˆ•RÂÃg÷ïÿÉ^ºté¥Úñõ5ÈΞmÜëtÒ™,ëTsl4f¤½ôÖ“†ä\†y½^ûíÓ§ŸmÅqøÿ ´ZðÞë›7oþaiéÉ¿677J©àX9çÈ{OØèpÎ1ï=A ›Íæóéééÿzïó“þýû#YÅŠÜ%tEXtcreate-date2009-02-03T17:05:22+03:00°|ËÍ%tEXtmodify-date2009-02-03T17:05:22+03:00ïͽùIEND®B`‚qpxtool-0.7.1_002/gui/images/unlock.png0000644000175000001440000000360511142047545017117 0ustar shultzusers‰PNG  IHDR szzôbKGDùC» pHYs  ­#½u vpAg ‡úœ®IDATXÃ¥—il\WÇÿçÜû¶Ù<ÞcËq¶&MDBh+HiTŠ”F*JEmIùÀøˆ„P‘¤""$6¡†¥¤ %R›*8é„J[¤&¨P7 *Žqâ8Nâ6Ž—z¼Î›÷î=|x3®ÛŒqó¤£Ñ{ótÏïüÏrï#Ôpˆˆ­µ¶¹©ÉùêîÝ;î޹󞺺º&G;£ïœþOÿÁ§þé­w”J%bfXk¥¦µkq."”ÍdäáGýƃÞÿ­–lzóùs}41>Šl¾+;é­îS“}GžñŽÇOœQÌdj€¸.äëêøHWדwÝ~Û7?±ß8öGK£ª1—¥wgCt¶5Çí+;èJaZ}áË_9ÿÚ+ßuøÙg{™™®§Ä’D¤DÄyæðã;v|þû¿Ý·7|ú¥×Ô}ܯ7ß´aÔÏçÂR˜¾Ü?°ñÐÁƒzóÆuá…± ÿÑ={ßÜ÷Ã}wž•§ó±~*Mql¨¡4ùõŒæïMÇfn1U%—Ò‘K·Þ÷™O¾Fá=gÏô¬Ö&¾&ÚÀQ¸ÚóÜN‡¹ÝÓÜæ*ÕæiÕæ*î˜)†k'çŠík×#œ›ÁÐà€½Òsr{[C]GÏÐÕ°ÈاÜ(̶–†»¶lz%½º# «©éxL8¢(Š@"`HþÅ)sň ±ÊÖ×K®±Q6~êVÙóÓ'×OÎH*d‰¼:ŠÉ¤Ӿv5¯h!|°ë‚˜!"°Ö&EI¥ü”‡t.…|}Í­ÍXsëÝðs8ö›³”÷•Dߥk€*©p\…bÉà™>’¾~hßG®­+Ú›ÐÜÒ„lCœ €øÈ4doÍ"È{0‘…Ä.Å&–pnbm·×똇ì»0ĈEax +pÁ„3pS)éH• SÑ)ˆ!¨rÀÌKn„É;Õ ˜f‚R‰i/ÅáLå¸`퀕k f5oÄœDPãU€Å˜wΚÁŠ¡…R1Â䨍¬ê-. ~k:.@J¬J%¬ޝQ #Ʀª*G 7ª&@•SÀ L)/pabƒR±â…ÎʺPí ,²$5€ù:`0HÖ íh¸¾›lJµûZU:ÀL°ŠÀB°¨(8®+ÆTDL"@((´–Ò íj0S•}†Peê.~ú®ö°)ï¼&©Œ(¢ä<ÀÌIË]Ã/¨|ˆ¬ˆÀ.+£s¥&•x2ˆ•ù…ç+c91 °"âz.[+Þû“Óm&D®ÍׇB(“6\-•NOôÍEFk†òµJÌÑ8š×á”çr๜ö]Τ|ΦÎfΦ}• W¾ÇgaËåžy˜ã‘›,š-þÊ$üÝÊ÷ï+œ ìp„CBÈnþ€¬^\Ú ø4O) ® 98$¼%½ì†ï{}âNLEÁŠ–ÈL¾& »¿xË\Ïø×ò EÖX´{d.“¿oÊLèMä'£­«x,%O+³ ÌÛü(«VËÿÅÀ L’#Ž˜„IÍ@˜ ë”_ÜÍÕ,3ÀæiNXC¸ÔÒ …ï¾ü`Ù)ø‚0¨VÆÆ „ÅŸÊXáÿÉÚÃnOÂ.°øS<íÄTê0™ãã>oð°ð·ˆü>L³Ä«Ø‡…°5¼2…¯TáË!±ûä ¦7q>‰m9»0õ å$ö¬ncÚŸ_‘‰:Œcz|lž—=úÜFÌû-ÚE­Óòfã‡g•µ¥ƒ¦Òä™–†aš"NÃÔדX¼Ïcùb§‘X]΢kògÚ»%ÏXéÐïîø®åk×í8Ù¦ð¬ux6Z´GèZJsk¥2Þ‰)áíL‘5¿ˆ®UàÀÙ]Þoe6ů"L‰Ì×=VŸÄ86ò#zÊ ^¥Ð›H,…ÇÑ–â#&K"Ž=¤Þ0åEn† ´Síá„ÆÓéÚ]ZàÜoÂt‘% ÂÖ[÷G¥xžé±m°Špåó½OCŠßÅu€[úJ ô2v¾2ÖèÜBohða»"_Ð P¯ŒÄ4EÚ¨Qâ‡d/XÜ.>&Ž/” ª,‰üƒ˜f‹n? –¤ˆË7S™.Ï:‘wQ‚iªœ ¿Ù†—Iœ1µ;òÚ;DËЛš]ǵÔc„i(]Œi´î¥•çÈW(ò ˜ÖübLó“"_}8Žrð¨î~(¿Œý ‘ÃŒöpö»yÀ«!¶¿µh»×‹!äWcºY»='hc´<\#‰onT*ú'`Úh·ò_Wù.LóÔÍ!œãxàuÌÛ*dºÿ|$[p"DH†x#llg¬LIEND®B`‚qpxtool-0.7.1_002/gui/images/test_ft.png0000644000175000001440000000300011345705712017263 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGD!¢'z® pHYs  šœtIMEÚ *MµçtEXtCommentCreated with The GIMPïd%nWIDATXÃí–khSgÆ''‰ÉIÚÜÚ¤MS›™¦)Õzmg뽳ݨ›n0˜ Ù> †ŒÁÀaû´á`¸ Æ>lâ‡!¢vQ´¢2Ý´x×VíujmmLÚÆÜz’ž}ˆF»ÆQ§Œ1|¾ÿû¾üžóüßsÞžé™þïúþⶬõ GšØp¤)ý°²e +[–døsÇ ýæôç“jÇ{÷ñÅÙy½u)/˜›©«þE!$“TRˆ‚J—žX³{’ÚÀÚ—ir4Räðp¨½%TysVÀ×'·ðîÂ&@[;ö²³/ç—°k-ë”Lw"ªD6ÎÙ €ú¯N“ã)nÅh ž¡µ£…¾æ øàå=Ôû×°í·Ox¯æÃ 8p¥‹#­lºº…-'?Â<-—Èx”±Ô×ÂÝÕ^[VÑ’aN0OŽ!§Rmúî}Š'î\BVÉ AÔ#:K¯P m×"V³Ð<&o{)‚: ¿Ðù+•ÏÕN-û*13’3Š6¤!"FAÆï ¦ÝP1VNCî jóñæy°hÌøT¤XX^?¡8Óê¡?<€. #G%eLÝûèïÁ`èñDf°ÜTÇâüç©°•árW"ä¤áݽg(-©šú¸¯r‡ ‘ËèÓÑèD¢öXz@!, éÔà‹{yÍÝLµs>þ:µ6Ÿ øoOCgi·ï aIä‘›0Âè½È{À|1—Fa%¯8›˜k«Âm,Ʀ·`°eÖ÷õŸr &8|ú§ôÿYhk?M¡èDŠKp¸CùTËóYž·˜¥EµÌqΦÄ3 ÁdFnüq ·{Öãílj¨¬'2åÚP7ôƒ&)²ÀQųÖQf‰ÃTBÚì“h‚ås›Ü JŒ‡85t†˜§Ú5Ÿjç<|6/…&ö¼)}@õ÷u¤[Wì{2«Ö»ˆ›Áë”¶»É5Yíi¤ÂYŽÝ`Åb°!H7ûÚqº}O' ’$ µ~üŽ2EA£ F‚”ä#˜¤§v]Ëjà÷s3½=yþÉT’`4Do°º¹c‚·ÿokϱì9¶#ëØÞGÔŸéŸèOà²Ô¢BBû2IEND®B`‚qpxtool-0.7.1_002/gui/images/zoom-in.png0000644000175000001440000000417111142047546017214 0ustar shultzusers‰PNG  IHDR szzôgAMA± üabKGDùC» pHYs  šœ vpAg ‡úœ’IDATXí—KlÇÇÿ3³;\ŠT,J"EÙÖÃÏ@rœÀh‘Â)˲;@E‚â[=6—è­@ÛS‹ÖjçÖC› -¤qk4vd3~H‘HÉ•,Q¶HÑ"¹&wµ¯yô ʵ[’ÝþÙ]ìàûÍÿûfv—`QJIª³³³'“é7M3«µŽk ŠÂåJ¥²hÛöŠRJâyÚÍx<;räÈëG==88øÝD¢­„´k¥ ¥µB:ŽãÞ+‹ccc_}zûöí+¾ï;ÿ€¡¡¡á÷Þ{ÿǯ½öêiã©d";v ™L‚1)%ÇmÛh4›ðý 1~{üâù ç>3=} €za;N:õ½O>ùtòÊÕ+ºPÈëFã¡B(¥”’R=!)¥j4:_ÈëKÿ¸¤Ï;7wôè?`>OL¶Þyó­·F~òᇿéïï;°gp²Ù¬¦”j¥”TJ ­µPJ­7©”Ò†aè®®.tvv‚2šêÍfß(‹óËËËzÛ»~úÑG¿>ÜÛÛ« ¥*Š¢€âBBBH  BHÔºJ)cŒ¤ÓifYV{2Ù><11ñ¥ã8åm|pöìÙ3gÎü°#ÕÀ÷#­”cÆ*€°5sùŒ&Z ¾ÖZ¥R)Þ–HôÔmÛ¿}ëÖå𦢙žžÔñãÇßI$ÔuœPQ§”6¤”«B«†a Däi­«jýý81zâíT*5¸Œ½{öìíïï?ø¾ô<¯ÞÞž|(¥ØXÉäÉ£õ­єҀsn|ù`___ßP½^ß²ŒD"‘圷۶íZ–eK©V•Ò­  ëÂF‚–ÖûA”;::3™ÌÎVŠ7MƒÁ3›¦*—KåÁÁÁˆÁ Îe„PF)¡¡Ù ”Rªu–ë@Jë@†sn [¦ Š"²ê­êåååªeYó‰D‚Y–Åbqιeš&§”š”RF¡ë3VJ !D$„ˆ¢( Â0ôÃ0 <ß7‰ä>!事›4PJIÛÚÚ^Bš„Ö>##! cŠRÊ(¥´\J)£(ŠÂ(ŠÂVðp­ eÖ÷ýäÇv´UþÀ¨×륅……fßî¾®ëÌ3ÃhpÎcœó8ç?¯T*1Û~h4›ŽÑl6jµ[*-%òù|âòåò¥¥ûH¥:HO6KNœ|û@"Ñ~xfºpÛó¼-_Hì±¾®Vkw¯]»vÍ[õŒx<¾ûÞ½ÅÄØØ5:>>Agf t~až,•–èý¥{´X\ ‹‹EÌÎÍÚSSS_Öª5}óæÎÞl–;6²ÇäüÕB>s+¶áZ»®[Îårÿºqãf®V«Ù®ë""D¤µÖZͦc/ÌÏÏ]¿žûâê•«¿›žžùC¹\êtœæ·jµzz28vìxel¸PÈßð}ùYd ¸$c¬—ss·eYÎcm”áy¾íºîrEe5.cì•L&ýËtºûÍÇãôéw±oÿËøøã —î·?ª×ëãÛqà 7ZëªbÁ÷ý¼ëºãŽãLú¾?£”º À ´ÖÏó¾!„ 9ŽÓ_­U‘Ig022:À ã•B!ÿõÓœØ `#L @'€&֖ׯMFk­ËžçMB9N³¯^¯!Ýݑѓ„Ðá|>Ÿ ¿ò"ð€ŸøK â© Zë²ï{“„!×qúêv ÝÝ]$” ù\žÀð.€CþÖ²=x„RºäyÞ$!äë:»ëµêÄñ“ƒšž)|økNlà}ÐàûÞpÀê&N”<Ï›"„ ;޳»^¯¡³«£'Nh(?59EÑÊvF¼ÙrB˜0àðÂ÷ý!ä×uvÙ¶ ­VV ÎÍÍÞw]wl;“ÎØ ÀðN«ümŒUJ©%ß÷¦Ö ÓÙU©TP.—æææ.!þ½€ eõ¬ß<Ï©RJ/ù¾W „î×Z¯Ü¹sçÍfósÍ-?™Sºu~ðc—I)Ý ¡”šÇÚòâÿ‘/(‚ …ÿ[¨t5 »§%tEXtcreate-date2009-02-03T17:01:51+03:00‚ºx3%tEXtmodify-date2004-09-19T07:19:30+04:00DºqLIEND®B`‚qpxtool-0.7.1_002/gui/images/test_jb.png0000644000175000001440000000300011345705633017247 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGD!¢'z® pHYs  šœtIMEÚ 7©ŠÅñtEXtCommentCreated with The GIMPïd%nWIDATXÃí–khSgÆ''‰ÉIÚÜÚ¤MS›™¦)Õzmg뽳ݨ›n0˜ Ù> †ŒÁÀaû´á`¸ Æ>lâ‡!¢vQ´¢2Ý´x×VíujmmLÚÆÜz’ž}ˆF»ÆQ§Œ1|¾ÿû¾üžóüßsÞžé™þïúþⶬõ GšØp¤)ý°²e +[–døsÇ ýæôç“jÇ{÷ñÅÙy½u)/˜›©«þE!$“TRˆ‚J—žX³{’ÚÀÚ—ir4Räðp¨½%TysVÀ×'·ðîÂ&@[;ö²³/ç—°k-ë”Lw"ªD6ÎÙ €ú¯N“ã)nÅh ž¡µ£…¾æ øàå=Ôû×°í·Ox¯æÃ 8p¥‹#­lºº…-'?Â<-—Èx”±Ô×ÂÝÕ^[VÑ’aN0OŽ!§Rmúî}Š'î\BVÉ AÔ#:K¯P m×"V³Ð<&o{)‚: ¿Ðù+•ÏÕN-û*13’3Š6¤!"FAÆï ¦ÝP1VNCî jóñæy°hÌøT¤XX^?¡8Óê¡?<€. #G%eLÝûèïÁ`èñDf°ÜTÇâüç©°•árW"ä¤áݽg(-©šú¸¯r‡ ‘ËèÓÑèD¢öXz@!, éÔà‹{yÍÝLµs>þ:µ6Ÿ øoOCgi·ï aIä‘›0Âè½È{À|1—Fa%¯8›˜k«Âm,Ʀ·`°eÖ÷õŸr &8|ú§ôÿYhk?M¡èDŠKp¸CùTËóYž·˜¥EµÌqΦÄ3 ÁdFnüq ·{Öãílj¨¬'2åÚP7ôƒ&)²ÀQųÖQf‰ÃTBÚì“h‚ås›Ü JŒ‡85t†˜§Ú5Ÿjç<|6/…&ö¼)}@õ÷u¤[Wì{2«Ö»ˆ›Áë”¶»É5Yíi¤ÂYŽÝ`Åb°!H7ûÚqº}O' ’$ µ~üŽ2EA£ F‚”ä#˜¤§v]Ëjà÷s3½=yþÉT’`4Do°º¹c‚·ÿokϱì9¶#ëØÞGÔŸéŸèOà²Ô¢BBû2IEND®B`‚qpxtool-0.7.1_002/gui/images/sound.png0000644000175000001440000001435611345703712016761 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ 3&}_qnIDATxÚí›iŒ[÷¹Þç.‡û6¤83Í¢‘4’¥±,˶®×Ô±¹¹7hî…‹Û8qì(rÓý6(n ò¡p4r $pR¥AS/u%N,Y–,Ç£ÙÎî;ÏÒCž&°¬Xrn’ö?<äÿù¿ïû<ïóþ ÿÿúûÞÏ›?õÔSc·Ýv[BÓ4«Ûíê?úÑV^~ùåΟ<Ï<óÌñxü_išv¤^¯§EQD–eAøI©TúJ½^ã‹_üb0ÿäøÚ×¾öÐäää×766&Êå2Á`·Ûaôû}dYF–埴Z­Ÿg³Ù¿ûÒ—¾”Œ? ¾ñoŒ¦R©oe³Ùr¹©TŠz½Î¯ýkÚí6ªªâñxØ·o±XŒP(ô•N§ó_?÷¹Ïý èÖ-ñx\|æ™gþ“išŸÞÞÞ&³°°Àüc—ËE·Ûell EQˆF£ÌÍÍ­ùýþûéOú9]×Õßw4H7ëFŸùÌg¦8ð­f³‰,Ëäóy¾ûÝïÒl6ñù|H’D(Â4Mz½^¯—\.G&“ û|¾=öXp}}ý­B¡Ðû}Ö†›€¢(<ñÄy<žiš† üà?`ss¯×K0´ÃßëõÒh4p:$ Z­+++!—Ëuï#<¢Œ-]¸p¡ñûJ‡›@¿ßüñ#ÂQÙÙÙá'?ù ‡Ã}·ÛM·Û%"IFI’ˆÇãȲÌòò2n·ûö;î¸#Ç^ýõúï#7ã&étZ$Ã0E‘\.G½^'âr¹Ðu@ €®ëÔj5R©n·›r¹L¯×#‘HN§Y\\Ä4Íßwß}‚išÿá™gžYzïg4Ü”8|øpøÎ;ïüϺ®sñâEÖ××QÇcÓ_(¢ÓéÐétH¥R¸\.*• Õj]׉D"¨ªŠ$IÇN:åëv»o---5ÞÏHoÆM"‘ˆo¸øN§C³ÙDE‡½°aqŒÅb¨ªÊÖÖ>ŸÙÙYõz••jµ/^$›Í>öÉO~òoR©Tÿ 󛦉išhš†aCÁƒ 8B¡…B·ÛÍôô4‚ °µµE¯×#N377ÇÈȪª’ÉdxþùçY^^~òË_þòÇÐûÂÍ@0 C´, Q±, A$ §Ó‰¢(¨ªJ(" ‘ÏçE‘F©T*¬®®ÒjµˆÅbLLLpøðadYæìÙ³t:ùÕ¯~õ/ÿͪY7»§NJMMMý Y–Ñ4íímr¹Š¢öEÂá0.—‹|>eY„Ãa"‘š¦Q*•¨Õjôû}LÓdddEQ(‹ÞãÇ›¦ùúÛo¿]¾ÙŠñ†EQ|ðÁ?¹oß¾äv»Ñ4ÝÝ]Ö×׉D"˜¦I,£Ûí¢iñxœ`0Èîî.µZ I’%‰àõz)—ËèºÎîî.+++ÔëõÄÇ>ö±X·Û}kqq± è0|þóŸ?àóùþ](Jøý~ºÝ.µZ B¡²,ÓívI¥RhšF·ÛEQÆÇÇ1M“F£A³ÙÀívÛ`ƒA ÃÀ²,²Ù,ÀÁûï¿?óüóÏ_nšd¾Q„'Ÿ|òoDQüK§ÓI4¥×ëÑëõX__Çétl*L&“8šÍ&†aH$ðù|(ŠB©TB×u¶¶¶0 Ã*‡QU•‰‰‰C‘HäÍ7Þx#h7#n¨¨<û쳺®Ëår8N\..—‹X,†ÇãA’$,Ë" Ñï÷í¾Àï÷ÓjµØÞÞFE³³³ôz=»aªV«”Ëe\.’$Ñl6!uúôé¿þÎw¾sµÛíª@çFA¸!p:S—.]zäâÅ‹´ÛmœN'²,ˆF£†Ûí¦^¯ÿ–®Õj„ÃaFGG‘$‰Z­ÆÚÚªªâv»I&“O§Ó±#Q‰Ç㈢hËàV«…Ûí¶‹]±XÄ4MÆÆÆ˜˜˜ ™L"Š"õzjµÊÖÖõzB¡€$IhšF0diii´ÝnÿãÇü@¹ÑM¼!t]¿¯ÕjQ«Õ(•Jt»]²,3>>ŽÓéÄáp`š&ÑhÓ4‘$ ·ÛM*•B–eZ­ÝnQq¹\¤R)"‘ˆíx½^Úí6º®ÓívÉd2”J¥;î»ï¾¿â€ó 8Ùn·ét:T«Uêõ:>ŸÏ^ˆ¢(X–ekQF£ „Ãa¢Ñ(ªªÒl6Y]]¥\.Ójµðz½8N’É$Ñh”@ ÀÔÔ•Jà̾ð…{À¤Â{f§žzêX¯×{òí·ßŽ ’É$###ÌÍÍ¡ë:º®“Ëå¨Õj8»t:ü~?¢(ÒëõÐuÃ0ˆÇã¸Ýn‚Á N§QÑ4F£¦i¬¬¬àr¹X]]¥P( ˲rr²W(wvv*ôþð·û’$¢Ñ¨þë'NœXYYaccƒp8ÌÈÈóóó8ºÝ.ªª²²²B4Åï÷Û,1¤¸áb‡UÞ²,:ý~ßö|>‡`0H(Âï÷Û]åþýû¤Óé«/¿üòÐ}/Úàºðûý|ýëßþÀÔÔÌÓçÎý´ª¶ÆÏœy„ÅÅEŒ333Ãèè(Õj˲PU•d2‰Ûí¦V«!²,cY†a`š&n·EQP…N§ƒišT«U¶··q¹\ìîîÚ=ÆÆÆ’$Q¯×™žžjšöæÚÚZñ½hƒëª_ûê¹ý{ÿý}÷Ö[O>ëñ8ïÛÞÙ@öòyÎ¥R‰f³iû^¯—h4Ê]wÝ…Çã¡×ëáñxèt:¶îw:Ôj5Z­ù|Þ?“““D"¦¦¦ðù|„B!¼^/†a‹Åðûýär9\.×'Ož¼ˆ¼—Žñ]‹ÇsÏÿÏ'ÆG§þ=‚•lw»4šUô¾ŠÃ±÷Ñ‘‘œN'Íf“jµÊææ&ív›xŸÍÍMFGGi4X–…ßïçç?ÿ9wß}÷£÷ßÿ•W^y¥6¨æM‰€³gÏÏN|¶Óí$·¶¶ØXÛb7_Ʋ,z½½¾||EQè÷û¬­­Q,Y]]%‰àr¹ðx<„B!|>áp˜p8ÌÄÄóóóÜrË-”J¥=^Û?øÍü‡Ã8NÂáð^ÞJ’ýþb±ˆ¢(·:uê ü»FÁµÊåÚÅRõÈÊÊ[[Û4M'‡L§Ó¦ÑhpèÐ!’É$¦i’Ëå(—Ë,,, I’­ ü~¿½€a <99É©S§8uê”ͺ®ãóùÐuQ©V«8Nêõ:N§¯×K>Ÿ'Íf‘$ Ó4ùÙÏ~ÆÁƒÿjvvvâwG×Jqw·pز$ºÝ‚  (B!B«Õ"›Í2??ÏÌÌ ËËËÔëuÖ××I&“lllL&)—Ëøý~[*]âX,F   Òjµ¸té>Ÿ˲ƒôz=b±–eÙ@J’d+É!ƒƒAÊå2‘HäöÙÙÙ™¥¥¥u =(ˆ7R½Þ45MCñx‰Ç$“ R©¤íçïìì Ë2øÀðù|hšÆââ"™L†×_Ýž(Š‚ËåBUULÓD–e»òqèÐ!’$áñxE‘~¿eYäóyÛ6ï÷û¨ªJ¹\&™LrõêUE¡ÑhpéÒ%z衇êÐ}½S¯k ºÝnG$%¹/ÅØØûö¥ˆDH£i™L†b±ÈéÓ§I¥RX–E¹\fkk‹+W®Éd·CÛ0 TUEUU:Ã!J8& ÚrzØ78ÛB֯׋Ûí`bb¸”Ëeffff>œ|×›× ‰É££Œ¦FIíK‘LŒ‹9tø0–e‘ËåX^^æàÁƒœ9s—Ë…¦i¬®®²¹¹Ék¯½fGÀÐ#ìõz¨ªj7:Ùl–jµŠ,˶ô¾Ï4Múý>õzX,ÆÖÖ–-švvvˆF£,//£iªªR©Tn9tèPzÐ)Ê7Ì#ñ¸46:N"#à ˆ¸<.Ž;ŽÏç¥R)ÛÚýá‡&‰ ë:ý~Ÿ~¿Ï¥K—X[[cjj UUñù|¶sÜl6Éf³¬­­‘Ífé÷û¶ ôz½8¼^/>Ÿr¹L"‘°ýƒP(D¥Ravv—ËE©T¢P(ðÑ~ô¾&¸®4¸&‘¨OJúˆÆÝxý"’´çøÎÎÎräÈJ¥2ëëëœ;wŽR©ÄÔÔssGxøá‡£P(ðÊ+¯ IÁ`]×ú†Ã\Îçó šÍ&½^Ã0lY<Ôš¦ éŽZ­f§Çîî.‘H„v»M¹\¦P(Ç'80 x¯Gé^ë ò“ÿüS¤ÓûŽ:€e! €·›\.Ç«¯¾ŠeY$ &ããcœ:uŠññq;ßóù<ñxœ¹¹92™ŒÝéºN³Ù¤X,R©T¨T*4›MÛEá·K$¶Rì÷ût»]‰›››x<FFFX__gff&Y,¹¸¸¸ ÔßÍ@½f¬®,½T­T,°, ·ÇÍ=÷ÜÃÄÄ›››ììì 9p`–t:ËåÂëõ …èõz¼ð Ôëuâñ8­V ÇC­V£V«Q¯×i44 Ün7–e!I†aàt:m¹ìt:±, ÇÃpév»Ñu—Ëew—µZ3gÎ|l ŠÞ5 ®â•+WôGÿé£wƒÁ¤i™¢`ïN8fmmË—/cY‡ÂëõÚ ËÐ0 ƒb±ÀÉ“'Éf³È²LµZegg‡z½N¹\FÓ4Òé4ªª¢( †aØ $Id2\.—-‘£Ñ(KKKLLLÐívYZZb||œp8L*•’¶¶¶Îïìì価ù^"ÀX^^.W«•Ã0EË2÷Ì ‚Á gΜatt”¥¥%®\¹‚¦i˜¦nKÙ¡7èóù¸pá«««ÌÌÌÐh4ìAè°'ˆÅbö,±R©Øt8Ô@ÀÖ ~¿MÓ…Bv‘N§1 ƒõõuLÓLäõŒÔ®Öžìv´ïºë®Å«˜‚0HX,ÎÊÊ2o½õFƒééiÜî=7X–e¢¸‡q»Ý¦T*qâÄ ;ÿ;õzt:mË\Qñx<ȲŒ®ïY¯×ñxŸb±H"‘°•娨ªª’H$ƒ…çž{î2Сñ^-1 —Ýí9zr½^MÕë5ÔnÃЩכ„Bææqþµ_‘Ëfét:Äb±A‹ÛA0‚Ž$ííj¹\æÐ¡Cv4 jµ¢(bš&†aØEÑápÐh4e™r¹l3L¯×³Ïx<Ün7»»»=z·Û]|þùç/[À;T¯ 0ÖÖ—ûªªöggœPÕž²7¸4Á‚J¥ÁÌÌ©TŒ_¾ú*ùÝÝnÈfwxã7xñÅùéOÊÂÂ"SS“¶ê£Ûí‡í‰ñ°sJãa8lz€]Ün7•JÅf•v»Í]wÝ…Ëå*|ï{ß{ò¬a!|ÏØ ¼ýöeíè‘[ …"S¦a(æ€ C§Z­sëmó(^Ο'—ËÙTeY& W¯²²¼Âöv†ÝÝ]fff¨Õj„B!FFFìÏd2”Ëe{2<¤¹¡@jµZ„B!Z­Ýn—N§C$¡Z­âp8¸÷Þ{é÷û…óçÏ_®×ëk7sCƯ^ûYóá‡þ|¿ S¦ib˜},,TU£ZmrüØ1 ³Ï•+oR,Ðu±±q¦§¦éª{CÏ¡öŸœœ¤X,2::ŠÓ¹7àñx<ö¨mX 4M³N´Z-[ ©q¨²Ù,Ñh”Ó§OS(W¯^ýßÙlvuý X@_×ûF.—iŸ¿=`šæþ~Ïäì÷{h=•p8½÷ßOµReii‘|>G­V%¹/ÁÜÜ¢(R.—ÙÞÞ¦ßïÇÙÝÝerr§Ó‰ ø|>¶··©V«ƒ{ÿ_Vö½^EQèõz¶X«ÕØ·o·Þz+…B¡ð‹_üâB©TÚJïäý®€–Ínk¹l¦{üø ¡ëû%Ib|<ÉwäØü,ÉÄéô4½žÎÎN†\n›íí\.óóó$“ jµ‹‹‹¨ªŠ,Ë´Ûm¦¦¦ìWÅ”:Žß˲L§ÓÁáp؇.dY¦Ñh°oß>æççÉårÏ>ûì•A,¾“ú]'CCú¹ÜN/—ÛîþùGþ"túô‰Ñ'’LÄÑûZß$‰pðÀaºi <Ä\ ÌÜ-·ÜR9vìXUQauuÕÓh4èt:t»]öïßoëX,F¿ßgø:€išèºnŸFì³ÇN‡“'O’N§Éd2Å—^zé2°>CÚÍÀN —Ïg{’Ã4}ôуŠWñµš}TUGíª¨Ý.·“©™)&÷OÖ$IúõÎÎæâ… 6Ï;·yîܹíãÇo&‰‡Ã!*Š][[ÃívsìØ1[x½^†‡¯J¥’ €ËåÚëLíµÃá ™Lr÷Ýw£iù|~÷ìÙ³çÕAôoâØºo]¹ÒzóÍ·*Š`||"aºÜë©tºMJåB}aá­…ç¾÷ß–¾óoJ¥ÒÎà­™………ÂââbÍ4ÍœišËÛÛÛ«ËËË+‡cc~~>ît:Ý­V AH¥R„B¡ß¢ÇáÁ+ÓÜ‹¸~ðƒÄãqŠÅ"¯¼òÊK+++ëƒï{G¸‘ÿ € Ç?ò‘¿8266ý³?»'Y¯Wƒ/½ôÂêü?ºªªVáâ7?ÈôëÁ…52xöžO|âÑO}êS‡ ømè4†ak„b±hSa:æÀöY¢N§S~úé§°°°p87¨ÚÍ`øyÏÀŠžf€±ßXH@A`c°øÂÀ·7s ÷ÀÅ CzÃÄüüüôg?ûÙ;&&&Ž …ÐÖÖù|ÞfŠaC44Röf /¼ð¾ùÍo.g×üHáw»ŒÁ±µÆ`±åíä ^»_4&½AHjƒÏ¶z½4h^ @%ŸÏ7Ÿ{î¹Êäädczzz4‰(Ã1Y¿ß·Õäp ÙÚÚ:ÿío;×l6Wß›|ïGüæ}¤AJ(ƒ‡k°ËíÁ‡ó{ë]î3Ü7&€ƒúЇŽ~øÃ>žN§÷‰¢x`xþhxúÄ4ÍêòòòÊW¾ò•Ìööö ð+àA3Ô{¿øû.“øn“y §ûȃ1Ì3ÓÓÓã÷ÜsOôöÛo?*IR¬ßïGkµÚê… V¾ÿýï7éöæ`ñ@óZ–ØûúÇÉ›t95b<ö#§OŸŽ™¦éÉf³lmm5…v¸:X|íÝ\á?øôò ÜÞ8ƒâ) ˜ecðÈv^·Èûc`ø[‡iá0Æ9„A) v]å:Tÿ1ð÷ëƒ4C¬cÈ*ÿ ÀüCˆŽ÷tý¨¤¼¹»IEND®B`‚qpxtool-0.7.1_002/gui/images/zoom-out.png0000644000175000001440000000414411142047546017415 0ustar shultzusers‰PNG  IHDR szzôgAMA± üabKGDùC» pHYs  šœ vpAg ‡úœ}IDATXí—KlÇÇ¿™Ù.¹T,J"EÉ"EYC²ÃháB.l˲ »÷"AÑÖ=è¥ÇæÒ‹mO-ZÈãÞ&@ iܵÊôCR$R2dS”-R²H®È]ík=ˆLmÁ7`vg |¿ùßÌì ØGcéêêêÅ’ªªÆ¥”A)Áõ}ocsssÍ0Œ-!‡ÿCèe/ƒÁ`àĉ''''/¥R©ïêz( uH!!%㌛¦i=) étúógggo9Žc~#ããão½õö/Žý ÐHX×áÀ‡œs0M ÀZ½ŽãÖæf箽ÿÁû¿Y^ZšñÊv\¼xñÍ>úxáÖí[2—ËÊZm[2Æ„Bp.^ç\Ôj5™Íeåõ]—W¯^}49yê ~˜¤Ù9}æÌÔ/ßyçÉdbt(5ñx\bŒ¥‚ !˜”’ !š !¤¢(²»»ºººé‹ÇO …üÆÆFdÛƒƒƒõŸ8Ö××'ÆÂ÷}!ä „<„>0`!¿ñÎãœ3BŠF£DÓ´Žp¸cb~~þ¦iš¥¶~råʕ˗/ÿ°3Ò ®ãøRSQ”ð#ç_ÑXÄ‘RŠH$BCºÞ[5 göÁƒ à}…c½½‘sçÎ}O×ul™¦Ç«bŒkœóƘӪyžç2æÛRÊ2T“I8?}þH$’jÇåÐÐСd29æ:·m»ÚÑÞæœí­dôâ„‘òׯIŒ±K)UÇ%‰ÄxµZmY Š®ëqJi‡a–¦içbGÙ ¨)ØKÐP³ÿD©³³3‹Åú)Þ7 !D­×ê¢T*–R©T …(”LÂc„@{„B4î¼ $¤ô F)Õ·LïûhÇÞ‘eMÓòº®MÓ‚@ H)ÕTU¥ccLB¸9b!cŒùŒ1ß÷}×ó<Çó<×vE×ÃÃŒñ¦‹ûÔj5sŽC¡ÐkŒq!ÔXg¸ÏC !cL0ƸœsÎ}ß÷=ß÷½Fpo· yÜqœðö¶á·Ê?€R­V‹«««õÄ@¢ß²ÌB¨é H)%çB‡óù¼(–JÏÚØÜÜ||7“Éõ÷õOSe¾¿¤†ÃXUÕ€ªªAUU5BmàFÎçÜ{.¸àœ3ß÷åJåÐí[7W¶ž=ËCûñ<Ï!„¼Öí¾˜L$;…8¨in(¢”Ò ¢(Áç@„µ1òf~…BT«F|iiéøõëŸÑL&ó×B¡ð7Øn `ÆZ4ývßpG8q\7h" ª”RMQ” ¢(!$ÐLEs&0ÆH¹\9¸°°0úÉ'×´LæNveeå÷Œ±ÅVSðKÏóÌòVùñÈÈÈ©±±±¨B/×;× ¨ªªRJ©ªªŒ±ÚHbŒÏóÂÅR©/þ¼§··W9yò;ln~þïÅbñSÏóž¶ þ%@­V[[+>2::/—Ëʃ÷µlv1¸¹¹0Œm¥^7•z½®”ËåÀzq]Ïf³úÿ¦ëëO!éD½ñ8:áQ]ï8¶¼”›µm»å†DžëËr¹òxfffÆÞ±•`08ðäÉšžNÏ๹y¼¼œÃùÕ †?üàÆ_®þégÕju®^p\)e™1¶ê8Nβ¬yÓ4¿pgYñªà€RnÚ¶ýBhÜ4Íd¹R†X4SSÓƒDQŽærÙ»/sb?€½0DþÞEFJ)K¶mÏ#„Ž˜f=Q­V ÚÓSÓÂÙl6ãºÎæ«´+)¥,9޽€·L3Q5*ÐÓÓ SSÓ)„ñD.—͸®ûìë¨Ð8Ðh¨aýK!„EÛ¶BG,˨VÊ»ç.¤ÐøÒrî®ëì:ÑÀÛðü~?€3p vöq¢hÛö"BhÂ4Íjµ]Ý]0}þÂïûãÙÅ…´ïû[íLÀiØ­V`þ n‹tÇÉ!„ŽZ–yÐ0 BÀÖÖ³Ô£G+O-ËJ·üaxÎv€Ýâ+7@Ú=)ŠB&£Ñ读»»O<8ŽãäÓéôÏÇùG;¸°»«m@vgA[‡Ž†„rÝqìBxDJ¹õðáÃßÖëõO ÞŽß”TŒñ0èBˆ<ì®!¯~Ž|E!ØSøÿƒÕ™¨eu†z%tEXtcreate-date2009-02-03T17:01:51+03:00‚ºx3%tEXtmodify-date2004-09-19T07:19:30+04:00DºqLIEND®B`‚qpxtool-0.7.1_002/gui/images/edit-clear.png0000644000175000001440000000330110766566244017643 0ustar shultzusers‰PNG  IHDR szzôbKGDÿÿÿ ½§“tIME×6lx~cIDATX…Å–il]GÇÿ3wî}÷¾Ý~¶“zy¶qB€„4q $¨¡ ¥ªH(*ˆ(¨!>¡V‹Z–¢ò­ Á—ª!RP£¶ª!‹ ‰C ^ÇŽïöó{~Û]gáCòÔØ‰“ºb¤£Ñ•î9ÿßœ3sf€ÿó ëðgÐlêÖóRòa¦×}ß}è»ÇðÆJÿ³õÿÅA|X×BçšÞ¿3Z*9$O¹­­-é3§^<8›Wò¡ë&þ,š¾ÿ×cÙÌŠ “_8#ªR÷ ü÷©U²½n`V臭hO&Õ¤+K,VœsÓ44O`«•üÖ%Ï=Ž$9¼½½ÓåI„ô•Ä8µ³c·1Ô{ÁSŠ[|=(7žhÛ²]n~q»w…)Ñas`èê8—ž|ö=Èᆦ´igÇ Ü"”’ z çþ9PöûÁ“(̼gÏ>ª·3+n1¸p–f $Õ#¿Æó%¯ïÉßgy+ÿw  ¨ñX}]mÄÎM °—ªc)ç o̶…g>`ÅÍw×J MH€€P=³8%ãZ±Ä¼ŒÉ .ŒpÛô+Ïœœž¸]¼; êjwü_ ›ŸhwŠ35õ­Åì rsoÀ/zè»ä{>g¿{æÄô+kŠw§ú‡öy]rïþŽ= lÙ6ŠŽ½(ç&ظåü(&Gº¤ï-p®î~¸pq]¾úÑo¥¤ 2<Ø ·ìàúè(æg—ðÁ{óøÌ HÖH„›1Þ\–Je*=Q¿÷1{ÕÚZźª¶}⳧ͨêõ´áþ)Ä47µÀ-Vãô+Àp¿…X<£x08§ÛÖy 8u»¸k:—üÑŒSõ­7nÿÈvoûÚ;KÈG0>VÂܬ–¦f¤¯½ìX´üÐ猿¹–Ø·-ÁàÙØƒ”…_Jo>aÌ‚_€b(f'á{Øœ¢ÿM—þÞ„k—“0 .hY‹¿péû]ôŸïb$ô×ô–#ÑÕ @‚;!¥ƒÀ]‚6¿¥Ì-p\o„—;?ù¥£Ù¦µˆ·8†Ã]ÕôÕÆ¶¯EBV3¤< ß̓j å|fDç.j«¤6TáòÅ ¹Vq`•Û°§§>¬tú§º¦ýUVl+ñý¸o£´Ð Ê(¤ô ‚2xàBJÂw D :”¢f×oaÞ5€R 1¿«ÞÙ–¨Ù§yn[‚ûôHJ*HÒ¦3á!ðîA)˜¾Èš³pÀ•›á†OÕ¥˜ž›C17ðEˆ M§Ò1vÀ÷l0CBËâÒ¡!4Ã7œ»¸|&õc]¯=ÜÐöí°kg0;~áHny!ËxKDkBà–À>(àÁ}(ÅAi"àÆù™\q­ zz GÝÔ‰•þdæo†}7‡ñÁç°1ý8üòep0Ý„"IpaÁsŠ™[^½€ÛˆnçB>õÔ­oÀ›€z])gO¬ºÝ伌ký?A´j·d4 ^°Ã4 `A‘Zdçÿ¦†ÎáÙ(KCcI€¤à{(Å €0Yaby^¹Ó¶$Ø1?q‚Žö> ªk?F}ç*‘ÐBa€µ`tà$ ó~;z”…jcniކŽm"„D ü4Z©«|ÁCÓLPj ;]ÿãßøùwÔÿ¦PñL«PrÑÿ¡¯R)üú§ßóö7l¤Z¦Ü75ü²­[Q*Bnmn [5† :!QÉ¡e–dO[Z;yÃ!WÀ7~¿x|…U¯z îäEDð¿Þ˜oŒi­LñšzÁ¡§64¸\ßIEND®B`‚qpxtool-0.7.1_002/gui/images/tattoo.png0000644000175000001440000001717211345702230017134 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÚ &˜çc˜úIDATxÚÕ›y˜\eï?ï{NíÕÕÝé%ÝÙè$I@%‰D‹ËeîÅ+w¼># Ž’ñú¨n£Ï¨DÅgTY„ d#[‡,¤Ó[z­î®åÔ9ç}ßûÇ9U]€0:Üë­~Þ§êœ:Õçý}û÷}àíEo»í¶™ï|ç;—Ì™3gi:>%‰4Ù¶Ý(„Hc<­uN)•óWõˆºø£yüýûí¶… Ï9ÿ½ï½¤¾¾~ãóÏ??ô¶pï½÷^}ýõ×?œÜ½»mø¡‡0…Be’S8}/þp=þH}E“ð‡ëÈœ·Òv‰©q’ð'—ïa•@ï!·µÜöíŒmØ@C]ÝŒ×]÷¡E‹xôÑG;þ³÷ßÿ'Þ¿víŠ=”ÊmÙšku0@ú¬¸Çf ²µá9ƒÀ€/‰4 k²¨¡S 4ýŠ”…~ÁQŠÒ±cÄçü–¡‡|ÔØ&¼¾°¿ƒÈľęW}äýKÏ:køÁÜúV“o嚇zèsW\xá¿fò“Haß>дZc´'‡°‹NZë¤p¸]3‰ÏÛ(…кråÏåc¥*‚»ÝÝŒoØ@¤þiü|Q‰@p?ï%¿ñõØ«Wúü[ òo À/~ñ‹O¬9÷ܯ ÿð‡Òéêc¶KlúÈëOXkŒÁŠçá+Àשñ4 °[N þnÊÿ ?ûƒƒä^|‘¶mÀWaìùé“ÂWì ÆIÎ;Bþ©§äÅçžû¥Ÿýìgÿ‹¸ë®»®ºlÍšo ÿÛ¿‰R__e²õçïÆLŸ¤ùòd”c#“Uç ˜à³qlŒ'ˆÎ80iAÕ†`èBÂÖ­ä7oÆc¨¿´·;ÊÚS¬JƒÉ`5®aÚ…}` ÎÆòÊK.ùö]wÝuõŸÀ­·Þºôª~ðÇã¿üeÔ9|¸"¤Œ•ˆÏÄ8rŠÐÕC¤‰ÌèFH¿J¸À ¬º!ŒY3ˆ…* ™ü_î‘#äž{¯··¢]+íQ{a¹mõS¬D†Rú쳉dêAC¬é5ü±1Ü^ˆ~ðƒüÁ§?ýéÓÿC,_¾<}à 7üD¼ür&¿k×áóûðÇbo(:éŸáˆ5gQãÑÀ|«L¶zx]­”ŽÌ"~j©•›ˆŸº‡Ä²­¤.x‘È¡}Ö‘\@)¼®. /¼€…¡$a|×cˆ¶¶ooÇJ§ƒtZ¶¾bŠXÓk€Z3±u+ó‰³n¿ýö/½%>ó™Ïœ½jåÊõÝ{/øþÉ–>˜×þåa´¦¸õ T6…=m€è¼ýDZ"d)оÌOFÇ1Žƒ³kÎîÝèªû‰Pø ï+bs'Ð> %ñ¹s‰´¶", ‹Uîi|ã*„,!3}¸®‹§ ýO>Éò+þç-·Üò®7 rÍ5×ü‹·qcÌxÝ4çgc`ûS}÷+Zc\Iñå³Ð®…öÆ—áÁðÀÇ)¾ü2~¹ŒÖz2ç—…7+å4à Rïhª«C(…ŒÇQ–…OHJFb’9´’ˆTž«(åŠ8Ãc·îŒ_}íuß"oÀ7¾ñ÷ž>{öß >ö(U1Oš»QŠÒÑZ"u¹?ieÓUÙ4î6ðÆ'J`\ƒÎ—ðzÑÙ,¦ªþ¯WØ |F›7„’^2…O¢ŒÄóA9>øŠxã~ŒV¤•-‚£À5ä_ÜÌüæYsÇw\þFØ«W¯¾5ûÔShÇ9©)—ºÓXuydÄyÃ48%tÎÆxFÉ@ø’BçK¨Ñè sœR •1˜¼Dc¡µ$¾x/ѹ‡ÑÆÕ肇)–À÷©Yð,2’Ãø ,#Œåbd ƒCnÛK¬¾è¢ì“Já/|á _yÑEŸí»çïWJPQUë“’ÄfŒaJþ@2ø^ˆJE&«Jb lD¬„•ø>zXQÚãàø‡kÐÙ8Ò¶+¿?±WWÒB7Í!}ÖÒòÁ@bÖâ­±SýD꺉Ï8@Í鈵t€iðs) ]3A(„P€ÂîgÎ…çÏŒ%Ò/=ÿüó©FâüóÏÿ»Â‹/ ],"…ÀÀ$AQ&+BrÛ§S³¼‹âž¦J«|¶®R€epwÕC!Ki‡…órã¥0ÊÃnN#S‘©_øYÙ6n4ŽIeˆ7Í x°äi{ÃÞA`¥I$ÃËCwñM0@%±¢FW.y°m—8ÿüó?ú•¯|å÷–.]ÚÔÞÞ~ñÈ׿˜{59QEPˆáq^k îâDgàuO ÛaŒ@ @€ñ¦3Mþ÷kðû2Ï`-0J +Œ/pûš‚ kF«))Ý9ØÉ²eË.-»@¼µµuÅøÓO&äñ2ðm)§Æ!ðzSøIâ ñÕâìiA´ãî Wc×׃´À€0è{83f §m˜†%%n>;šÅ¥!‘BÝÆj¨Eõøˆ±²äc|ƒ6Qr¿;—Ô…/c5¿n}ïö7£ @cD—Âûƒ ·w/­—^´ˆÛW_}õ©3§OŸ}øjËÈ ÙBÖ eðY¤‚\qgéU]$Ï9„»ü¡H„ÀKØ RÔÕš¾¦FV®Ðµ-­}²aÚ H%ó‰x\R*%Éf›&ŽkéÞü²œîˆgš°3þüä§>õ©ÿvÙ%—¼¯Íz÷Êþ7Õ¶æ‹àiD<•NB(IáNdÖqÀ`·/ Zo!°2¨\ £ƒrÇ„ò$þÐíííí²µµõ4'ì»ÑšÄÜ1ÒgŒLF}¥Ú„i'‚Ú)¢Æ²×Ãë ¢²ñ!ÖžEëÁž6-´<Á ëÒüîw»½}ÏïŸyæ›o¾ùî„àСC…›o¾ùîÇž|ò}Ê);ëÛÛÕÈèA®ÓȺL¨ù°D×ApóŽ6ah%ðzq» §0>$Ï莪Èd´7:BKKËé2‘HL÷‡‡Ã(©HŸ1ÜTéÉRTkŒ ΩñqÌD>øÞh¼h¥ÎwæÀuL€3srzsß«G¿öÝï~÷çUÞúº¯oûÛ?Ù¹ÿÁXkkŸS› ¬Pkd:«Z!tsäXèJ [‘?Ì`j,F¤q;=V¥R¢ŒǧK˲jü‰‰0ÕìL ó*,N¹91ŽƒÊf1®;ÉÃiÐC6FŒã¢ºA¬ú PÆ ››¡¾nðèÑ£›:;;óoÆÑ=z´ÐÙÙù Óêd}Ú÷* "¢Ò÷«°îPÈTPû;³Ñãñ©ªR¸ýuÄætWš9ãû8¹–eÕH˲Òj"‡Q­5ª(±ëK"Óø Ëar¡Ö5SÈNãE…qz¢j™ p}E$]ƒ•Nöïßð­rõ{öì9 ãñB´&ë8fHXòîÐ'rJ/¸’RǬ)µKÙUü¡4Ñ–ã`|Œö+®ãçóH)Ó¶1F”Í\ŸµHÌ)",]Ðà–†°á!ôd½o ”JhÇ «eƒ@¥p˜{¤Äc1mŒyËëZkQ(-×óH–9LhªÜy™{/â ÔbJÄdäGAQål°<¬D=žš¬ ÷Ò÷ýœLVL¾x8Qšøìt¾~Èæ–ãA™åUSr©¡  ñÁª3× r®¸ÁÍ"ŠNjÑ¢E ß*‹-Z`ò…¤?1A´löÆ`ŠÅPƒa—ˆ,> Š W ]6såaüÀt!°É|EûFùÈDß÷óÒ󼜈Æ*¦UÜ+ÑŽ"¹dQaÔ/¡syT6‹Æï?Ž×݃ßÝCt¾ƒvu@E¥\p˜Èï#•FõöÂÈHÓܹsÏnkkK¿™ð³fÍJÍ™3g¹Èf›õà Ò’A¡|L>ñ}ð}"‹Ž€ô0¾A$ ÈÌ8”d9N(ƒ ¾AÆ A TA&° <Ï›Åbñ¸ŒF)õÇÍRê)RÜ2êP{n7nÏ1¼ž>üãƒøÃ£¨ì:—Ç8ÉÕ%¬]IƒF™ S ¯Àó‰éb¼ópë™ ÌÿøÇ?~ã›ð‰O|â#§Îi[èöõM‡Ù £ÐÙ,:Ÿ¥™Ö¬¡JöAâË!D©¢yS4Y@+Äh¥°ëê( Ö9çœsÚYsç­>~ÿ/1ù&ŸÇÒ$Ïð±j5©34¸“H$v Äj.ó‰.V hJÏFaL"|ÝÒ‚@“‘ÐÙ{L4Îm›6oùòô¬Ù³ë;;;÷ŒŽŽºÕ‚···§o»í¶]qéÚ÷Ç9stÓKñYÑXàûTo&ŸÃ¸%"Ëú5n¹DÀh¶ÂjE ¤0Ž…1Á—É¥Go ƒ7œÄ„]{λÙtôè¯í}ûöL\páä2š”º tXŸ­±j ™ËU©8+ÍŽ•¬®Ç$ê˜têccè¡ãØõµ³h“ŠŽ?›™74 ™L4‚)ÑÃ!‡å!F0NX²[’2•"c%ï>€{¨ ­‘Y£ˆ„Ðð%ƒV U,2¶e m_þO–d2ˆD¢Âòx¢ÉlS¨a´ê¢,¸ @@`AÃSÎ\Z£=ìú^œÞ Ý¯»àww÷®_¿¾ÃŠ]]][VœwÞ̱?<7)0ñ|”Ø+eN²©pqîz%% &C·6bb d·Žnb§´ƒ-‘Q˜¬#æàÐ(Žã@©DÔó°­ÔÕaÂ?´A:ˆîí­Ü@$îÏ„Ú7S¶èJ­«lU+ð&+ði^ÈË]][€¢Ø´iÓï3kV#”,—™FcÍÄzãðT8ü ×»>x>þOᘢ78Í)¼Y­˜HI-ÂM G ”îǸ,©I9l­±m›t:M:&‹÷,7¯¹þ®è‘ìËÜ ‹ ãŒo&3€Ö$~À¡Â½åÌäƒw<<¾ê.½”M›6ý¾B‰ýö·¿}¬7jO$—,ÀxyðràåÁËã(RÚã‚{>Ú÷ÑZ¡ŒÂC“ë¿©Q7¡3j: ¶…ˆƒˆç±wï ²{7ft´B´”IVaÛßÇ £:öáoÛ©Qì÷¹ÈVH˜Š:M>ܦ?ã› eá")nÿ¤öÓgEO$2ñðÃ?^a…9Ò³}ûö çÜøá+÷ïÛ†À £½ÜW qÈDUì3aî@+3;V‹Ô‘` B„1Ï'ñŽ#ÐÀqQc)G"ˆhB6X÷öeC“B^ä#f©À!  ‹Êî¦HÃ댪óî±Ií·|øÃ<¿}û†£GvOYxì±Ç~üž¯}õ õµ;„›øTT0¼¦ô ‚@x!#XÖLL¢.ðñä¤ð1Ï%^Ûþ‚hËC[Æ#0Aälð¨4–m.Ìò nYýPk®ÁÃl ¦?<'«¬¢ê=„er‰ÑƒÒÑ0ƒf2$>ðóèg?ûã“V†öìÙÓ¹jõ…ïÛpJËèsÛ^éF^áÆPCQ"õ+)ÊBØ1d<‰nê‰c[š¨öB?W3õ¤|„Uñ ±ÓKÐ\‚i¤Ü ÁÒ„;J t—D‘•zÃø@F#2a^Wî?‚tQ^,§Sà ¾šñÉO²=Û¹nݺÛÊœYõÚ ûÀ|³ù¿_]W ¶¶ìäŠHˆHr»£)šŒ=Ä&–vˆÇ5Î)§@Ìs¿.ûxyèò`dpkœFçB?þ¤Ÿ›Nö–“[bT‡˜ôuUÃãªs¥Ca‘”JQwÓMüú׿þf¸ªpòêð}÷Ý÷›ç¶oݺðö F7€˜)7vN ÆRØ–MÔWDJ.ñ&‡¨ïUö‹rº,k_°M¥d® E(Õk{hƒéÐ{r!¦‡$f„JJ9ú‡Ç&<§rA˜³nvìØzß}÷ýæOípî¹çžOËËÖ–êO]@fl„ÌØ1·H"j‘N'‘)¬ò‚›EL+!ëÜ€*/ÓÐåa…FT!t°[´2Œ Ï…ñ+F „ãØaO.lU-¡K@’ð*éO‹ BÔÁ‰Û%0§ŸŽúÀJßÿþ÷?8r‡ÈúõëŸûåü¼íî»±H‰ÝЀU[‹¬©ÁLÔÚ’ÑМÖâ!ÄôB@£‡PÞü(š ˆ¨A˜ÐôMðQmú:È7B™Š…ˆCŒ‹) §¢* ©c¢¢ùrCt¢…?È6s¿ÿ}~ù›ßü|ýúõÞÒNѽ{÷nZrÁï]ôÎw6·oÇJ$°2¬HŒÄž©6”½SÓds‘PÛ  Zò0kŽ63Ø3&*kîåb‰©PTj…Êr¹)Sņ• gì)„Òˆ=v§C î ˜éŠæõäçȬ•Èÿoïίã“>úè£Öfé;vló”¯[w¾¿i“¾¬q±ó!I*¦h¸R Uix*0LùMp=Šχ¢Bì·ÃÂæO gkLlÒÊÚ·›–û‡Ÿé¯þëw¾üÃþðÛÑnñW^ye£ˆFëÎûÜç–ëm[„ÕtiA-[VÄ”¡-ÈŠkp8œà¾€ðfÂC³'«º7²ÖB„#0¡uEæžMôS?ÕßúÁ¾óï|gÝ›-ļ•íò楗^zf¢Tç~ö–scÇw[zl Ì÷'è¸lÒˆ×sˆ“Ï…î T€Q¼â˜Öò&¬ù_ÇÒ9ÇLÑ~ì´Ëñÿî»ÞWþåÛÿü½ï}ïöª®ø/~^ÀlÛ¶mÃñ¡Ñ¡¥7üã隨x;BZo(ä¤mT»Cxnr¹6ø¬4 +-¶È È‹Éêo²ÂôÿyÒeŸ·©¹æ‹ô]üÑü—ï¸ó–Ÿþô§ß|3ÍÿYOŒìÙ³gËŽ¯n˜qî•ç-ºðªÿµ—®óº2FYÍ%–I´ê¦J©I6)†dPÕ…0€íc@6·“¹õç<[ˆ¸ýöÛ¯zê©§~[Ÿêéé9öÒK/Ýï$¦µ.ºþ³‹kâIKuîDÈ-©ï&ÜXQË…nÌðƒµ;´Â4L>¨ Œ1“¤@ž®±$©kngâoÿ—ûƒ‡Ÿ¸ÿk_ûÚéèèxíÿêcs+W®¼øcûØ7מó®eö‹?Çå1¤ eÈ"ŠÊc3b’Úª48 K¥ðY‚¦XÄòh!јåIh˜™$ºö#øk>Êï6¿òê=÷Üó™Í›7¯ÿùàdâŠ+®¸îÚk¯½õ³—,JízV¨Wž„±~¤mU´-¡Sbÿ‹˜ŽÍˆžƒi+å Êï¦äELÁÃä]tÿFÆ1ïXX~.æ¬ ØëÈü+¯¼òÒO<ñ£gžyæ·@é¯öáé–––y«V­zߪU«ÖΛ7ïÌÓ´76†…:Š€‰rÂAfóàKˆ$!žF×Ô`fÌ@ÍšÅ@*e:êììܱqãÆß½ð ô÷÷wþñôø ¯ô’%KÎjii9uñâÅóçÏŸ¿4•JM·m;mYV*Ø/©ò¾ïçòùüñC‡íìèè8ÔßßÿÚ®]»¶¹·srÿ}J³ XsIEND®B`‚qpxtool-0.7.1_002/gui/images/add.png0000644000175000001440000000237710310514362016351 0ustar shultzusers‰PNG  IHDR szzôsBIT|dˆtEXtSoftwarewww.inkscape.org›î<‘IDATX…µ—Í‹E‡Ÿ·ºº{¦gçc7, x0Ô›‘Hnñã_È1€‚Ï âAAÔ¢ž=‹9èAÌÕ¸‰ÈBDŒ!dQ1îF×ÉìÇtU½ºç+n²=’Ô0]EѼ¿çý½UÕÝ¢ªTmégñ)D^ #1V,1‘Fr§ßûª÷ÊÖ»UcÚª7ÆŸÚÆÉ#'?8}ôôbbJÀãð8NÏ…›ß>Ó~³ñåækýŸªÄ5U8V¯I §9¹æä: \ÈÉÀà ‡kÀ£UÃVv@ AàpxŽ|Ô;õ…ÁUÎi&|ð¸àþJIr_ô!<´;àqêðâ§€¼ú‡ øà59N§ÈÉ €à‘êk†Á“û|J|Ô—Nxï( öÀç=C‚xò¡2†ðê‹ûà x¯¹Ld_î€áŒ”»`€ú‡é“­´ùщGž]TT•@ )JРåùC/D éB’{W?¾”vã«xº¾súNçý¹×E H´\ âdËü#/[£féì‰÷ž{|þ |ðx-²ððÁáµ ^öÓLìñ8q,o]0þ¸Õ(@‘¢¨ÕrNQsé’ÕvkÁ…¼ö¸ćr«iQÛ)ÁѸ<Äq¹÷—6.!¦ÈZQÆWÎ XCÛ¢ü'ë‘èÈ‘!ÀTÅG}?Üáüú7¬ôWÐH!‚A¥AVêÀ ñ»³.O¾b<,ÃX|m÷O.þ½ÌJwgrˆ(%p@QP°¨’‡|d³ Ž0*ƒ;|qÞ«ã—î5.®/s½}TÓaÖ*÷ÉÒH àaÇïì™uáFàöö:×6~æû[¹½{»È6¢ ?!(ZÎm B&ÊQîU+ Ë|ÇñƒÇq¥ý[ù7»7XíÞdµ·Êo½_é»þôö“ÂcöX~{® ¬xá“?æÜõÏI£A=kÛkûŸ zÙ»þ£9™„‹ÃÝýE«@Ƚá°D£¹VçÃfxJiÞï€+V¦Ÿ4wC¾ä#ˆQÔj(·HP£˜žé‘ËyQU¼ÚzZE•öÈÊœ,™9¸`jSâ8ÁlKÞ½Ö}¸¼·ÖÏn^±½Õ½²ÏÍ8Ó:¼×s>³™Í¨ÛŒÄÆhéÒ½¼~vóëýbÂŒãIAh%mZI‹FÜ ‹3Ò(ÅǪAgð”O¶¢uÒtžVÚ¦7ÉâŒzTgÇoÏ ?Ë+ÙDk&-Ú%@'íÐNÛ4lƒzœÑsÝê¯Cÿ 1 ͸I+iÑNÛc'’Yœ ¢™âÍ P·YœÑˆÈD3iâwÖ[qÙj6¥ÕG sñ­¤UBtè'wf*AõO3ÀˆÁš˜8ŠILBÕ¨Gõ¤I''‹³™š`œ]ƒ!’kìèGL#ÎXë®í«UƒÊ,Ÿç‹gÚ§Ld^Jmjâ(–$J$µ5“ÚTjqÍD&’«¿_ýbíí¥ª1ÿž)j÷Y±ÀIEND®B`‚qpxtool-0.7.1_002/gui/images/ok.png0000644000175000001440000000160410646607642016242 0ustar shultzusers‰PNG  IHDR‰ gAMA± üa pHYs  šœtIMEÖ9A4ŒtEXtCommentCreated with The GIMPïd%nêIDAT8Ë­”[HÓQÇ?ç¿ÿ®©SIkͱ˙f])‚²¢zÉòA ¬‡.ëöXv…J,ˆ¢zDÔCde­,É”.èœe® 7—V›§ZŠò?ç‡ïï{Îù‰ ¿•ø¤4‚þVF$‚~7#A¿UJ @À×ò_°„ät¤”¨ý<¢ãÿ„” *”ÿH¼Þ~Ãy÷ËM€µRJè>*¹õÐûä|ßüÏyÙ}͹ô~¡<ú¦zÞª”¢ì~(QaþžNQQ¨Ìå}yQÊ>ùÃ¥óÃUg‰k³<óñbQ8üƒS5¹Ñ’•h©+Ƽð'ØÙ¸oƒ«£îˆ”’¡éüpeûòGkäéÈ…¢¶¸vR{Fs6ÿd °hNÒ¬Û€yñ9ú¯J(ÔœçfgÃÞ=<¯I)¹ôƹ½°¶T:Âå§šf¾Ã¯øÈúœî;–{à8°dzb¡ Õ¨¹V£%ÅÚjyúÌøbÁ+{'{j÷Ï6>7V5e½u§t!>—õbvçl=&\™—sIêÛ]—Ê­wµÕÑkéåõ¼ÆT´8ÐÝxÝLY\ [¦•Ut…C•i£ÆÅ¼ E£,9-ÞŠÝ<Ù=ªÅ¡þ?ènëØ›´‹mù«ƒcL)üîqŒ‡ªÐ0mlN]â;3€ ·`ܽ±œ_IñÔÂˀä5ÆÀR,ШZ”ß,(·E&vмûÃɶïgµ}å`A5 û¸½ŸÞ „T(¥Ä–:‰¹é³îP Y ™ž_ÁbÛÂj JUÔeªVÞ‡Á”€Þÿ+PJÉ2Û⚆ÎT1##àBÄÀŒ&3s²ªë³ü{÷°Íᦹ¥Cߺ>UB(¿4­Î€¢hˆôFÐëM|ë ìE"Ôè_ŽŽéIVÚíåbÈ:€e¼mø>ØéÀhJ€¶–F2„§ùïÖŒì˜5_‡‡î¯¬Ùxšø oá…Ú¶]×bIEND®B`‚qpxtool-0.7.1_002/gui/images/autostrategy.png0000644000175000001440000000606411175575016020366 0ustar shultzusers‰PNG  IHDR2%Ž-Å ûIDATX…͘{PSWÇÏ}„\HLÂ"mä!¡UÐÖ²#-uWlg¡Òw­»³­ºÔ Ý™ª-víº£¶¶Å±º³¶Û±ÚVÁJEQ"/µ’À%A«„<€@^—¼¸7÷‘ý#6ZÄGwv:ýý‘œ¹9çü>ùžóûß¹P ¿>ƒƒ_¿¸@ Â@COI’Öû|^A~1–ah† KLL‹Å!,(Ør8G ‰DwQ.@ü¼§Ëà<¡ž3Ž ö¡üÔèØèc%)RÁç7ÔR«ÕR‰ä÷Ë–ý¬ÿú´ËÉòdEob¹\®¬Ì¬ûOÓ4MÓ0 C„ HP€e>Äq|Ü2n±X111IÉI<ïöi“{zz|>ŸP(¼`†øžLƒáýí;(š¢üTTTÔúšêØØØÑQµÛí_}ùÕ7ß|c0 ¾)&ÀŠE✼ܚššìììwhc èÍ=}o”[­±±ñdóÉE?Àëój9¥Ú°q£\.³ºfÂ:ÑÞ~¶±±±êõª7 €¡™—k:–ËåÚ³wÕjމyê©§ÚÛÛ‡õzŠnÛ¶í㺺`ÛÎ円ðx<¡@àõùŠ ‹vîÜép:iŠJHLl2Ž0Ö`>þ|aaaTd”Õj à–(¾_,—Û5EŸ_Qñ´¦WÓ§é‹ß¾}‡dÖ,—Û ˆ‹k9ÕòüóÏ‹Eb†ÃÃà Ã`|¾"%E«ÕªÕ=)) –e »úµÕåOWdee]8ž¢©p.7=3ÜV!Þ+;;;==ƒÏçåæå®{cÛëyáñ¹\îÓ+V˜Í&‚7¿û.!ÚòMùi a4Œc¶Ò†rÐê7k  £éíuØì¹óæÍŸ?üXJý µ¢££·þc«Ÿ$µZmW{‡T*-++;{ölŸFà x½^‡ìL$í§8('&&vnVVrRòèÈ(dzŒŽªTª`ž¤iº]uöÓíãóù/½ôRBBÂÿ²ˆ4Møýþ?­ú£Ín/}¢T¡P|²gX2‹Æðy<Š¢H¿ßëöøIÿ’’’ôôtåœ9R™Ã0¿ŸT¤¦êv~ðA¯Z;66¦jkcfíëU+*WÜæŽXÁü;66ÆãóJŸ(}öÙçÄ’YÕÕÕ¡¨NNNîÿ¾¿ô‰ÒˆAtttÖܬ¬¹7«íœÜÜwjßùd÷n£ÁØÕ݈Š=¼xqå3•ÅÅÅÁ:ý.6ýæS__Ÿ‘‘”À0ÌJz&µCeÅ ù©©©¡ëC¾)Š ©4>>þž«†ãø‘#GÊËËÁMµ¢e²¾¾>¹\Ž HÐ+A,˲,{»ã[ïX·ò…ÊsE•s”ÁÌIJ,EQw ò—/c|~DDÄOÔ"¢õÔ)«Í ø×;Åð=¯ŠÓnwé`4M#(²téR±Xü¬à`ë„•fh𦂠ÃÅ .Ã0ÁAÓÚÁêAMÓ‚À0LQT°¼ÆÛR<Ã0(ŠÊd2AX– N…ÔÖÖ†°(Š:Þt<3=C(jµJ¥òÚµkGÝ£Ððy|†fºººLfSAAÁ`Pµ©œNgdddÛ™¶ëC×1 Ô j´¯'??_¯×_¾t95-µ³³S£ÑPåõxÔj ð‰¤çbZ­Æø˜×ã‰Å†aØe,...È ‡ÐÝÝÝÒÒ2:6644Ô߉ ˆsÝçÄ"1ðø„ø'NääæX'¬ÝÝçšššrsr¼^oTTI’R‰„Ïãëõz…"å\W·Ëåjiiéêì„ H,¹]îüyùjµF©T>ôЃííí4C/Z¸Èî°_º~òÄÉï¾ûîÖw7±ÌfóÈÈÈ’’%c–1óˆY>[îñx JHL€@NvŽkÒ% ÒÒÒPU¤¤ˆ¢Dç/\X¾|¹T*eX¦ àAwjz5Í'›K+Ñhccc“äÉ^¯@°"U©ê¿Ôo4§T"½rõJnnnZZÚé3§çÍËKJJ í¹›q«R©L£Ùh´Ùlã–ñ¸ØX£Á(‰ rØ2™Ìh2ÆÄÄà8N€@EEé';::Ün7A³$³ôúá²ee²èè)‚8ÕÒl³ÚŒÃפkdĬHI1Ä'$<¹üIE½>¯"UѧéµZ­áÜp¥R™5w.¸ýú:::êt:_YµJ7¨³ÙlaܰsçΊ[ì°;ÂÃÃEbQ†õßo³Ùròò4ÙlÆø˜aËsRGB®ÎébKGD!¢'z® pHYs  šœtIMEÚ 'RJˆÈ IDATxÚì½wx\ÕµÀû;Ó»Fi$z±,Y–d¹É½`SbÓ %˜$áôž›ä&„„BB¯B̓Á`˽K.’luÉ*£6šÞç¼?F3ÉrÁpóÞ»Éù¾#Í9gïSöZ{õµ¶ÀùmFþ÷¶Ñ³§ÌØÄk“Ÿîü™fòÙfüéÚLœñ‰”`âµRÙl6DQdÍš5|õ«_ý|*©ò Àþ´Hp:¤:œŽLl°Ùl(•JÖ¬YóoÅdçÄóA‚ÉØÁélg"ùYG"»˜x.±l†OT'c,"† ±kÃÃä§§£Ñh¸ñÆÿmØt²“ßúÖ·þ%”àl¬áL÷=%8"&"_$·'ª‡‹A(--E.—sàÀs!ð3¦“éþg 'R‚É(Àé„ĘV Šâ8á/F&R¢ÁÁA4MüÜš5kE‘'Ÿ|ò?ð¿…x: O4$NËHÔ"‘H\H4‡B¡q‚`lóûýƒÁqHpÓM7üŸEÙ¿â!çŠçÒ~âïÓ›Èb †19!QˆD"Øív²³³Ç½ÿš5kþÏ"ÁÿŠx>‚áD~=’œÉp:ÛCb»˜³&Ǩ†ÛíF¥Ròþ1vðÔSOý‡ü+ØÁ¹ Á™ÎOf€š¨ &þŽ ‡n·¥R9éûÇØÁÿ%$ý«x¾2ÁÙ¬‡çÂbBaÌg£‰Hàr¹P(§}ÿÿkHpÞðØc¡ÓéÈÌÌä‚ .8ç~V«³Ù<)>|˜ŠŠŠqHÒÑÑB¡@Ÿšv&3ñD61‘$Ú bHÐÕÕEjj*.— ¹\~Æoø¿„“Ú¾ýío¬Éö}ûö±jÕ*¶nÝʬY³øðä»»›ææfšššhll¤´´AX»v-ÝÝݤ§§ …رcƒƒƒøý~vîÜIZZ†ÖÖVB¡;wîD&“‘œœÌ£>ŠR©äðáÃ8Nôz=ü1‚ °}ûv¬V+yyyìÞ½Çî]»HKKcݺuäää T*Ù»w/===H¥RvíÚ…Õj%33“`0H(¢¿¿ŸÎÎN‚Á +V¬ˆ Š“™ A ¬¬ ™LÆÁƒÿ=MÁƒƒƒ¼úê«ÔÔÔÐÜÜLOOG¥­­eË–188ˆÓ錷‡ÃŒŽŽb·ÛÙ¿?‹…ââb>úè# ‡F:::°Ùl¸\.<‚ PPP@VV3fÌ````\ŸÎÎN†††xûí·Ñh4ÔÕÕqñÅóÑG‡IJJBºººèîîÆáp™™I__ß8pxx˜@ 0ŽÿËår J¥•J…J¥B£Ñ V«ÑjµÜtÓMÜzë­ÿžPPPÀ]wÝÅÖ­[1›ÍH$ÒÒÒÆñÙ‰™Ø–––F}}=[·n%77¿ßOFFÆI¾$“¡ÕjéììŒëóýýýq}~êÔ©¸\.222P(Ì;—Í›73}út’““Y·n%%%ñö‰„ÑÑQº»»8xðà8“q ärù)äÿÿ:LªïõôôüK_b²¨ ‰ç'ó%ÄŽûûûÙ³g—^zé)mcqƒ1?ÀÑ£G‰D"äææâõzñù|¸\.Ün7N§ÇÃøÃSÞ1 ðûýø|¾¸Ùëõâv»Y»víÿ/íg´œÎ÷ÃA8[›Og#8ª7±]FF—_~ùi5‚Äöeee‚Áà¤v€Ó}ÏÙÕ±hõe׿TLŸš•eÉ.:ÖÜ–®RªÈHOõ_¸bI¿Ýá|æ¹—»Ÿyú/íŸÄh¬æéÀÛßß €\®@.—£×ë ƒ§ V8& V«?$p:hµÚI)A ØN§Nw x<T*R©”P(tŠ —¨þ þôçG—566|aÓ¦M ·mÝŸäädFFFHJJŠ;nìv; …"Ô™””?¿~ýzn¼ñFDQdhh(®º)QDÎÎNòòòJ¥(•Jzzz8rä.—‹%K– R©…B¸ÝîS¬€e—ÿ·‘à7Ö-yêé§ïýù}?Ya³$(”j/Gz8°7J¥ŠÍµ[)™2EÐh4ÅJ…²Ø:0ø¥–æÖýO>ùì_«««^œ5«:ð©í‰¤uÅŠôõõ1gÎ6lØÀÓÏ<ÍÊ•+xöÙg)--åŠ+®ÀírÑÖÞÆ‘#G8rä‹/ÆjµÒÖÖFNNiii´··SPPÀŠ+p:lÞ¼™ãÇ“™™Ivv6£££¸)ï¼ó¢(RSSÃ[o½…×ëå®»îàÈ‘#¼ÿþû”””p饗âñx°ÙlØív6mÚDUU|ð‰„¹sç¢V«Ù¶m …âŒF O‚‚ ðÄOœ7àï¸óÛr•Rö½Û¿vÛ÷¬•FG^^!éæôˆ\¡hµÚa¥Baõú|R›Íf|ãF³ËåR>ÒÒÌ‚B©š½gÏÞ§®ºâ²‹[ZÚ~R\\Øü™‚&’ÉÂÂÂqÇÕÕÕ455áp8Æb £jXZj@€²²2"‘åååŒŽŽ’‘‘ÁÑ£GY±bEØ1 ~Ù²e¼øâ‹‚À¬Y³8qâS¦L¡³³“ÑÑQôzý)ï0cÆ ššš°Ûí$%%‘™™‰B¡`Ê”)øý~¼^/•••ñ/Š"S¦LáÈ‘#üô§? |&“)îYŒQ¸ŒŒ t:)))$''c2™Æ=?Tr>HpûßP=ZÿàÎ[î ƒhtI),˜·àhVNÎÎÕ«.^g³Ùš>ú¸Ö›‘nöÚíNÁ:0 ¼çî»L M³víÚµÜá°/ki9ží 0Âuî=ÓÖ½óÞ×/[}ÉæÏÌTUU… TUUžž7§VWWc4ñz½‚@õÌ™ü~r²³I2ãÖ@“É„Ïçcùòå‚€ÅbÁd2a6›III‰ßßl6³wïÞø3Íf3ííí”””ÐßßÏüE‘ŠŠ ¼^/3fÌ )))îÞ---%99™P(ÄÒ¥K±Z­$''ãóù˜1c ”””0::ŠL&‹Ë/}}}ñl£Øø´µµÅ©AÌ´œ››§Z±È¢3ÄLš{óøÏK_}õï¿ÞºåÃ;å %¦´L ‹[/Züû™ÕUÿ¼é¦ë‡þôÇɳš^^ûÔ  xúá¿<5uddäËëÖ½qÇÖƒ{’;š›¦÷65¾Üx îÚ²™3¶Q ìïïÿÌ„—]»vQRRBJJÊxÁ-:íN3 ŸNE<S¡Phœ*S=Oü\,>  Æ£‡&Ú5ÃËd2r¹™LFvv6999‚À+¯¼2Ñl¬B@dâ×ãß»å¡?ýö‰´ÔtIrЙܼ¼z‹%ë¶çŸ}lßùŒÿ_}rÙÇø»·nŸ]iJeaÅô£÷>ò§Õi©)§E«Õ:6€gÎgn`Òç}$˜ˆ± ¡@ @ ÀëõÆC€˜} †±Ì¢Él1R&“s5K¥R f³™ÔÔT^{íµÄ4´$À;†bì£ÿøÇGŠþóŸn’Êd¹sæ.$##ýøŠ+®þÒM×ý4ãZWwØòìó/¼¼áýKf¨4,¿ê²nùÁwoQÈd!É™ø¼ pŠ=üc;tèÐØ3‰'£$$!ííí§°¨xVÒØï;wÆ3šbþŠXÛÝ»wÇÏO y›››ã–¿¡¡!T*jµzÜ …°Z­(•J”Je¼oâ%¦¦Å| W\qW^y%À@=懑Ž}€ðìs/ ëÖ¿ýU»Ý–;wîBòrsýw|í¶ZàG塊Þï|óž;—/[Ö.ËË£Ç:t}[[û’O¥lݺ§ÓIEEuuuèt:–/_@mmmüÚHIIaÉ’%Q>õòËhµZ>÷¹Ï±qãFôz=R©”­[·ÒÚÚÊêÕ«illL迟ädoþˆÛn½ ‹Å† (--¥¯¯ÖÖVV­ZÅ®]»Ø³gyyyüT·Ç«xoÃÆ;#‘ÈÇgÈ <ý<‹ÅÂîÝ»ÉÉÉ¡«» A"ÄgkVV»w聆°«ÕïëñxÈÍÍåÍ7ß$++‹öövÚÛÛ™2e áp8.Üì_Ä€µŸ¢Â"²³³»ÝNaa!›7o&300€Åb!777®ÛïÛ·£ÑÈ%—\ÂÇ›7#µµµ8zzzÆÆFV¬XAWWéééX, jµšÑÑQÜn7¢(޳ÿ§§§#•J1™LØívìv;™™™ãâ RcÞF§Ó)X­Öß>òÈ#]€mLùc„wß]wM8ʬ©YˆN¯÷L+›ú×É`s÷½ßWœ/¤›Óþa4èêNtuÒß?¸xxx¤\rþüZ¤¾¾žÌÌLvíÚµÆóO^‹©s±­¹¹™ºº:jjj¨««# ð›ßü†œœFFFE‘ººº“ýB1~ ••…\.Çb±P__OsK ½½½¨Õj"‘ÃÃ#¬[·.î’¶X,ÈårÌf3‚D‚N§cãÆh4ÚÚÚèëëC­V£R©P(èt:‚Á R©•J'ù)))qAY*•ŽÓÿ'²QE‡ÃÖh4öòòòá1À+é¬Ùse££#+³sò)-)A«QlNMM©›8æy%º­µ¯ýÊ-w>ò­oÿ8듬¸dŠkJqÑ?{z{inn1mhš?)cï1H$ !‰Ä#„'ú£‡c"‘Hƒñë±ì¢2Mì?±vA¢ÈÍÍÐAÀߨx4ßåre™RRðù|n¹\qÊì/)­¨jo=þ³9ƒp8DÃÑ#¦”´~ü³ß\6:2ü?yä÷ç2nGí•É$=>¯'÷xsk‘ìÜwª'.Ñér¶-¢×ëãÂXì÷g…“9‡Æ#†AˆÄùõÄ|D‰D‚tŒ|'z '>36ã,1-=ÖfbáŠP(«ÇA s»zQ©+ʤ£Õ3¦·%Þÿò+oÐìß·ë×áPМš–ÎÈð ©iø>ù¡úkü~ÿ²ÿºó›6“ÿö›_ÿÌq¦1ó‚.¥RÕëñ¸swìÜeþD–ÀØùîînêëëá²Ë.Ã8fÙ!%%…@ À+¯¼Âš5kp:(•JÞ|ó͸ÜãñÐÑÑAaaápˆ¤¤¤¸N®V«ÏÉ:/â™Î%RQ‘H%ÈÆ¡8H%HN ¼Q§‰¢˜+ŠâG‚ ŒN~"Ïñý‰¹ˆ‰¶‡P(„ ]@9à¤>¯; ‚(‘H‰ huZçøÉc¿½·§sUjjƒCH¥RL&”J%M„#á,¯Çó@qñ”‹/½üÚ_¯û›N7^*•*(‘J|j–ÞÞÍyù\.###ñè»Ýç“™™™Ìœ9“l6[·n娱cX,|ðAn»í6êëë©­­Åd2Q3olÜî9¶rFJ0fÃJd‰¤9¸)Ot‡ÃD0Š¢xQ$9‰Dšd2™F"‘Œ&R©TŠ\&G&—C”ÄbUr¹<&; Ç€4@š“çt;]N]ôµ…ø‹~ÿ÷Í~îùg¡ÖhH6™DoLÁ`Ðãt81’ðù½„#aš[š/ó.»âÚg«*+ÿ«_þô”¸€äd£T«VËíN7¡PP8/-Àh4ÆzÁàt:¦¼¼œ´´4ô=f³ǃßï§ ¨Tª¸7Íl6SUU…ÏëE¡P0mÚ´OÅ­ì§K3ŸXR&n ’ÊËå‚L&UÉåòé2™ìç2™ü—ƒCKmÊ‘ÉdáÄð°Ø®P*âçMÁ …"®!Ä\Õ±°²±ï·É’‹.Ym³deŽÚí¨5M]Ý¡¸g©»«+d¶ÓÒ2ø}$›R)È/Q¤½£•H$„D"%9ÅC:MªÉtgAAþ†üð¾‹'Ž“A¯SûÔÔ”ŒÆ”Ñ3ÚN·™L&DQŒ;ªªª¸êª«èêê"##ììlŒF#&“‰™3gRUUEUU_úÒ—èì줪ªŠéÓ§c6›1›Í Ž92®ºÇ§õRž Æ%ŠHµ åR©t‘Ý®îð=`xÊ?ß|÷ÛxèO³GíåDrŸ¨êMÔ4cªk,æpŒÅ… è kͼ.§ÎÒÓÛ?=öÎ/½ôL]Uõœ{¥™Ãëõ¡Vë0›ÍŒÚlÈerl££Èå2ÂÁˆ””DYY~°8)ÉxŠŸžfÊ̈aæÏ›wâŒ2ÀéBÔJ%]tÑ8×+§ @<6àâ‹/ïü’““Oyfff&)))q*pnaiçY4Q0ŒH*‘ ‚4‰ƒÁŠMm¾ò|èºÎŽ~sÿï¸öÚ«Sêwo_vpϾu~îânQŒˆ‰ª]L¥Lú%Q¸G…ÍØÿÄ1£ˆ \ýá÷®§žz®m׎í3;ÚÛ…‹ľaÏ®­/ææ—ÜlÉÊ]‘lLÂ6<„ÍnC©TŽ„Ñjtô[ûPXT„F£exxøÉŸþä»'ŽÏî½ûjüþ€R«KbÁüyÇ$ç:¨+‡}Rÿ€ësšâ¤‹-bÅŠŸ˜/%ˆ%z- 8är¥©¾þðÜcMGñùÜüýï/“ššÊª‹W­Üöñ–«¼>Ÿ$±°D ø@ŸÏs,E\.7n·—Ë…ßïÇï÷ÇÀ„÷ #cÿ GÄÔj-»÷좯ÏzÕK/¿žŸ0ÐÚSÞÚÜ€V«¥ °…BÍÈð‡ÓL*G­QS1}:‡³shhè÷Çeû¥mm­×šÓR).. Ìž3g×'”„³–p9L8ÓÄ*!‹»¿¿÷›û6H"bø»^¯;Ãáe÷žX­VtZ YÙ9Ȥr\N'>Ÿ‡¼Ü\ †$l6Ûczè–‰cx¸áø%í5³f×PYQ~¬¨0oûgV#è|=†çÚo²2±‰úulYç&ÆLF&<ÛëõyŽ——OûËÊ•Q¶ Y÷ÖX ˜¿bEîo¾õ+ŸÏ/Äú$>?1d|¢‹Ùívãõzãnæ@`\x^~á ×uçæd=âv»ih8Âæ-Ûî|î¹—nîêl¿rçöÚËâVÚþÞyç L)&JJJAÉÉÉA«ÕQPX„?à?àt:O©móø“/¦¯_ÿÖÏTJµª  ™3*^4›Ól“"@¢Aã“î 1}ý‘`|Mà“æÜDÓm &²0ð„ç†%¡Q¬[sãþ®7$Eyæ®mkjdñ‚Óåùb ˜ƒLbæá“ˆà#BâÿXŒÁ„-DЧLyÖbÉ:ÜÕÕ…Çí–}\»ýO?ýÙÏþ|ôHý8Y­¨¸„LKímèu:.]}i÷Ü9óÞËH7ïøÅßþúÇáÄök×¾*ß½kûÿ=|hîÜšä7Ψ®|Îôiãηÿd@O¬ì‘Ès=o|fÅ8q–M†g©2æ÷û½õ Ìûè‚ Vv¸Ý.^ûç?Ñj4ÊAø… ʘ`›ø~‰¿ÃáÐ8„ˆÉ±ÿ“‰Hwþ×mC7\ýwu:­=èq³¯v“áÈ¡ýãœ>2™œÊÊj¼>/N§£ÑèËÉÍùš19éjsZʪ_ÿÏÏÞJlÿÀoÿ¬¯«?ôÐ[o½qkÙ´éL›V¬¬(û±T*8çx€Ó%eœ«”~:sò¹Hóg}ŒÆ"zíñ±ÙÓ»c¾ú‰‰"gª!#n•J¹ãºk¯[÷þ{¾îóE­–yùy\qùj×ÔÌY¼ë|’5qŠŒ’˜¬+M€/›ŒáûîûÑÆo|ëßݵeóŸ;šR©"#ÓB²ÑHo_’èw=qÕ•«6ÄØXbÛ‡þô·ª½{÷>°iÓçN¡|zsgWÿªjFÅqªøigõù sŸd©‚Ø€ÆH}lÆÇ$m§Óßc Fbñ|åˆÉ(Á+ûúú»+*Ê÷õö;žÖ–cm8ʲeKÙ»w¯x°B% ¦ ‚”ÓA¨ˆDĹ¡Pxu$ù<°\„J‰DR¤]#e,Bè$àþpÿ#n÷v§š³g̘E Âép ÑiSSÍ÷M¯^ügé÷øßÿýƯoøÇ«k/–H¤ädçFÌŸûûÊÊiÿsÖ¨àsÙŽ;F__Ë–-£¯¯cÇŽ±lÙ²3Îò­[·²xñâxhwvvv´|üižÑÚÚJOOóæÍ‡¡P¿ßËåŠóàXûääd Ñh4ôôô0<<Ì’%Kâ¿É¨L"%عs'óçÏ÷©Ôªý÷|ý.Æ ï–´47-|ñŵ<ö·¿2sö\Ž63æµùÿòûuÝ]ÝæÞÞÞ/u÷ô”ƒA¹\.—:ìvY8].—^­Ñ˜ ú$…L&C§Ó<½¨hêké–¾â)SúÍŸÛØÒÖqÜëõÚþóƒ!€+®¸êݧ­+?.§}lög‘––ÁÐÐ ápˆiÓ¦iEAüÚ“O¯mv»œ²ºúÃù££#3þöØ_ª?˜ít91¥¤2oÞ‚Á믿æ§UÓ§=nNOÏŠ‰…“Îí«ÓéˆD"¼ûî»ñ ‹7âp8¸üòËX»ö%ŒF#—]vï¾û.;wîdÉ’%ØívvïÞMQQÅÅÅìÛ·ììlü~?ýýý\xá…žþy222¢¤¤­VKmm-999˜ÍfZZZèé顬¬ ½^×륶¶–k¯½£ÑÈË/¿LVVv»ÊÊJAàØ±c,Z´ˆ]»váõz¹øâ‹Ñét455ÑÚÚÊðð0 .vïÞ.™:uªÿš«?¯zà_±sG´AfFO?ý eeSuõõO »F†‡üº(2I |H¥r4Z-ÙÙÙ bµö“””Œ  !Í>jû/»Ã…1År¸¼žÔTó J­®ÿàÃÚ-Ápd—Bʦ½{öt:\—?=¿˜®ÎVЧ”E죣dZ,H$BîK/½ð›·ÞügP.“ .—K6<<„L&'7·€U3g…æÏ«y×`0GpÒ (Š"µµµÜ}÷Ýñä“O’““oÙÓÓƒR©$‰Ä@‹…×^{ãÇ'H³²¸kY¥RôÌ Ñ²­™™™Øl¶¸óD"‘PVVFcc#™™™q§K¬ºgŒj…Ãa¬V+YYY £ÓéâÚ€ÅbÁår1uêT¬VkÜ? Ñjµ¼ýöÛ1m£0‰Ìòz½ëׯ‹“à_þâ>AˆÇu¸H‰TNr²‘œœl$­NN«[U…hn¤?€Ç㦵µ…œœn¸þóL//‡üõ±§X·î-š[Ž' ]XUYÅÿòWüê¿Äép…Jeäåf‡fϪ>è÷û¼3ªfh²²³ìVëèÆ?êŸ1£ª~æŒÊíöøÂEóCçb¡=es8 ñ5bÂÄNÍ8]Lÿ©í#cwŒžÇV™¬LšNÔ¢V7>Ÿ׃ßç«}q7­\ŽB¡D¥:鹓+äH„ñ5‚#‘ÈįQ„Ãá{÷ï¯ûÒßþúhÉŽÛ“±B­ÎÀ´ò /ZDaq ùyäç ×뉄#(U*”J¢Áïàóz‡#øCaúú­tut“ž‘΢ù³Ðj5´´´Óu¢‡Ý»÷±}Çvü^/2™”ÕÕÔÕ×cJNÁnÅ”ò楗®úùò%󺺻{ýýVUuu•3¿ /p>²Üeá<Έ;g«'p²„ñKL@Ÿñ½$$áÈi*}GŸ)$q5+‰5Ì€“6©/æÁ‹"\DŒ$Æ @šÛíþü‹/¾¼ò™gž, ‡ÃŠñï"cjÉT>íu,]º”™3«II6į FÂJ)ÃCà Œâv{‡Q Tyyy”—•!ÂDp:XÙ³{/ûöíchpôt3I†$žzêq´Zsf× ‘Hp¹–ââBovN¶mì±îOeÁ=]Àǹl1]|bVm b÷I s¹\ãŽcmcÅŸN§úýþ8›ˆÙb*_b&O¢%pb¦N¢pLuS‰¢˜*Š¢VÅê–Ö¶šûó›êžžKÇ»¿Í,]ºœË.¿”åË–’žžŽ?à'Ž0`Àãõàrº±»£3Þ磳«©LA«Ââ÷Pª5Ñs•Šì¬ $ ©©FdRለD*§­½={ö²ù£èï璘¿—Ó-I£30gN Óʦ –––üìÊ+V?žœlŒ|æàv»O':Í&þÁƒ¥²²“Éé³PÅ+h:tˆë¯¿FÃþýû©¨¨Àãñ`4 ¬]»–P(Äç?ÿùxxÙððp<ãö™gž‰»‰§OŸŽD"ÐßoE«Õâóù°Z­q3kÌÐb³ÙÐétqëa,G.—ÇD­P(J}>Ÿ¢­­}ºmÔ¾ð±¿ýõÚH$ÇΓ™•+/äÖ[n¡fîØFlttöà°Û …x=^Âb„H8DKk2¹ŸßGÝ},»`%2‰«ÕJcS#ùyydggãóJ$˜Ó3ÈÎÎDHñzƒèõ:L¦ŒÆ$FGm¼·aë׽ɡú:<'r¹’šy‹(,*¢­­[o¹ù9³gÝ7}z©ÿ|àÜ´€I¬~O<ñ …­VËÐЯ¿þ: …‚´´4z{{)**bx8j’¶Z­ø|>4 ÇŽcûöídee±lÙ2 V«£ÑÈþýûãéá¢(’™™Éòå˱Z­äççÓÙÙɘ2e ]]]x}>RM&vìØT*¥  €‘‘‘¸ V{@£Ñ””„ÝnU ‘eddd666:JUa_oߌ;¶] èbæÖ+Wqû×nç‚e‹‡Cm<ÎÈð§»ÃA0àÃér!F"È Ò̤šRA"A«Í$+3Õ—]Fgg7õöa·bJM#'7žž¸].¼>Í-ít´·‘’œL~A4‰&‰jJæ²Ë/gõªÏ±ný;¼ðü34o`ÛÖMxÜN.¿üJDQüþž½ûÍåŸ÷\Ã5®ÏÎdÒU(”——Ç—˜‹ÇŒ215¢iã±Ù,ÕÕÕ´´´ÐÒÒBMMM<­|åÊ•<óÌ38N–,Y—Eb©âÉÉÉ:tˆÞÞ^²²²ðù|ttt`6› TVV²~ýzFGGÑjµx<$ )))Øl6RRRðz½B(²äååa³f~ôÑÇ··¶6_~RR w}ý›ÜyÇWÑêõ´µF3—ÜRlv;}==¤¤™ÉË/D.“A$@Ff&ÉÕÓIII&Žp îj…”²’´*ŸûÜE!zû¬X,éø|AFíNzNt¡×éHú‡"ˆô÷À:0D–%“K/»‚êê™<öØ_yoÃ:؃L&ãæ¯ÜÂÁƒõ_ ‡ƒ†‡yâίßýÕOŠ“ÖCùñ|ÖŽ‰„ÁÁAJJJÈÈÈ ¯¯ŽŽJJJðù|TTT™™Izz:©©©ãBÂcQÀ555Èår†††ÈÌÌŒ«“sçÎ¥±±‘òòrÔjuœ§§¥¥¡R©â¹ü)))L:•p8Œ^¯G«ÕÐëõ„B! CÜ@”’’Bww·$77×b0Ò¤R¹rÃ{ïÝÓÔÔpÑ ʧWsßÏÿ››¿|ƒÔÕfØæÀn·cd`h¥BNNVÓJK(ÌÏ"33ƒìì,òr,èuZ6¼»Ö¶VÒÓÍdfd R*Ðiµ$%Ðë4èõ,éè LÉIL-BJV6v§)022L[k :n¬”M»ÝAJ²+/$33›æãÇhj:ʮݻ£ËßõöM°–Þy÷wß{oÃ[¾O-x<žOLJ¶lÙB à /üÄa\gZJfâª1O ßïçŒÉ1ûÿÄ”n‡Ã!Åz½~ªÛíž}î¹¥Ç5~;ö¼‹.¹Œï~ç{LRÀцFlv …’¡A+‡“$ƒžüüÒÍi8]ôz9Y™¸=>$R æ´T^þû?xþ¹ÉÍÍaîܹ|åæ›ÊäÈd’¨ÌŒÉO •‰VCÏÖmx}AÙy¼ûÚkX­L¯¬ÀaA@§×c41°kï>þúðC<¸ƒ1•œœýn7¡PÇÛíafU÷Ý÷ ~ÿàoÙ¶u N;ÅÅ¥=røZ‰D´îÙ½ïskf‡Ï›üä'?9mPFâÖÝÝÏ LJJbÇŽ㬂'NœÀáp R©èííeppðµq``€H$ÂîÝ»ÉÏϧ··‡ÃV«ÏüÄh›X¿Ûí¦®®Ž#GŽ`6›G+yØíöDk¤¬J¥¼õöú©Û¶nù  H$\}ÍÜ|ËWQ(”´µ¶¢Õj¶Ùðûƒ¨ÕJœN3gÍ`Ú´2T*%ƒäd#Z­f,ô;*§¼óîF¦NÂõ×~žÇ‚Ò©%üæþûIJJ¢­­“ÉDnnö˜Z*E®ãÜ·ƒ·Þ†vj)9W\AíáaN{ æŠr´YY¨•J´Z=}½=8v$R#ÃCäåç2£z& ¥ »ÝAkK""N—w®N§smúpãŽO…g ÔøøãÙ¹s'»ÝÎàà ¨Õj¶lÙ‚L&£¾¾ž]»va6›éííeãÆäääàóùؼyó˜œÊÚµk ‡Ã¼÷Þ{ñ¢Qáp˜­[·ÒÐÐ@nn.ÃÃü÷Þ{?~œM›6‘ŸŸÏÎ;9xð jµ‡ÃÃá```€¶¶6Z[[“É$Øl¶ŒãÇ›ÛÚ;s×½ýæ­@À…­æÆ›¾L8ÄfF§Obdxˆ”ä$¦çS=£™LÆÈˆ ÀB® #Ã<鄨¸qÏ>ÿ ¡§§—ók°Ž208Ì5W_Áüù5qJÛzÿñ$z=©3gbݽ—ýÚ$ʺÚIU(è~g=SV,gÆ¢¸n|þ ¡`€þþ>Tj-CCä™3¨®žÅ €}û÷át8hhh˜ûƒþôÀ¦ßo=«,w¾‘>íííÌ™3Axê©§¨®®ŽëïNg4(²££ƒÙ³gÇý¥¥¥ôööòÆo TªØ¿?yyy‘——Çèè(6›‘‘‘x0¯×Ëèè(„B!Ìf3]]]èt:RSSã^ÄììlG¼0eZZšdúýþ”HDÔ½òòÚÏeQ–u!W]}-¡ —ËŽV£¢³³ …RAj²…BNn^W^q)‚ p×Ýßäû?ø/½ôê¤ãrËW¾Èe«£ÕÓ—,^Èî=ûùùÏÎìÙ³øçëo¡VŸŒí„Â!‚J5¦…‹°,[JKg¾æ&.}à×T=ògTáb÷ B@¶ÅLÍœ™deçn6ãrØ ‡CœèlÃçó¢Óøï_üŠ{¿ñ-¼^]íI[jkÿ¸mÇÁÜóB€sáÛ¡PˆmۢŦîºë.^yå•xÁeNG[[Û¸6J¥’ææh™ºòòrœNG¼ö¿Z­¦©©)¾ÌkÌö¯T*Âf³Å“5{{{A©TÒÒÒ2. 8q€@ ±Z­7¡pXñÁóDQ,(¯˜ÉU×\‹19—ÓAJJ2v»‹lK:Sj*ùù¹(r¤2)££6Âá0‹-"--Í›·òíïü€½{O.)§Ñ¨ùêW¿ÂË/=Ǿp-ÇŽ5ñ¥/ßJCÃ1V¯ú>Ÿ®®n¶lÙ·lfËÖ„,ÂÓÛËöïþ€ã&35Ó§‘ZX€mçdJ%™ ç¡”JH2È˵°da YÙ9„#úûz »³“pD¤½½ƒoó^|ðF>ÜøÎ´—_zñ'uë…O¬x½ÞÏ$Rx2Dzøá‡ùâ¿·øÅÛFD‘ñÁ•‰U¼«wM,à”˜è‘°••R©´mßþº”gž~â À³s ¸ñÆ/SZZŠˆHŠÑˆËíB.•`J1¢Óë˜;wITÞ¿ï :–'NðÜ /sÛ­7óè£Ããó!‘üâç?£ªªbRsú›o®Ç”j¢zF%ý}V$R >Ÿo ñ!ЛLÔ¾û.õ‡SÞÚÌTs*Î~+yW^AÖõ×"AÀçàrº°ÅŠgj ¾þ.·‹ìl IIFRSÓ0èT,Y¼€gŸ‰ïï;Á‡þøÐõ7å‹oœ·øY„Š'Þ§¦¦æ”E™DQDäÔXû ü|>_<*(1îní¦p¸Ü>ÙCý¡< ß%•Ê«W_ÎôŠ ""$’p:¸Ý.ÒÓÍå3uêÔ8¯7Þ\Ç /¾‚Þ çð‘>üpË—/áá?ÿ÷ß{1aΜ٧|»B¡ °°…\ŽV«Æ”jB£V(,È')É@²^ËÀ¾½¼þñVÊgÎF™…ªçÅ_ˆåúëâI42™•J‰B¡@£VcJMÁ±Œàv»P©Ô„#Á€Ë/_… QñÞû¤ Szø‰¿¿þÏW|çÅN§ œw´ïX¿˜#ibàg¢Ê[Ó71ª6üıã Û•Jå{óÍ·f„‚;ÝÌYs™7oˆ‘¨t­Qaµ¡Qk0›ÓÈÏÏC©Ÿš¾æÆë˜^^Fmí6–.YD8dÍš/Ð××Oggó,˜ô{wï9ÀþõdY2IMM%)ÉÀλٳ÷[k·304 Á^|‰¶†&ŠS’¨¾`ÚÛoG\¶|RÛÁ G®ŒÖPÎÏͤ¬l*©·Ûƒ}thïêgp`˜/é–-¿€¦ÆÆû÷îºõ3G¼ hlµ§žz ÇC?@ÇŒÓéÄápàt8ƒ;vŒcÇŽÅ‹1=óÌ3ñŠØýl6ï¼ó@€½{÷ÒÙÙ2ŠÅŠ¢ˆÕj¥»»;ö,aÌ™r»½žÝ»¶/Êt:=‹/EgÐ#Hd úIMM¦ºº‚ôôT|¾S}*Æd#?þñ÷xöéÇø¯;n£¤¤„ûûîýÆ·X´x••§’«u‰¼¯—@ Š´ùL//ŤG£ÑÐw¢—Ý}L1%“%D(ÈÍF¯×ÑÓÓ;1rød‚VCzº™UåÌžU‰}Ôξ½{Ëe¸ÜN¤ GŽ‘‘aæ[÷ÞCN^![¶n¾ûÑ¿>•sΆ ñê=øàƒ”——Ç¥ðÖÖVìv; :tQ‘Édñ–žxâ V®\Imm-‡K.¹»ÝNSS ÑH—‹çž{A˜>}:‡¢½½P(ÄÐÐ2™ŒÚÚZ´Z-R©”ÜÜÜx ç‰'èèèÀb± …¤‰D×ÐØü}W,\´”ì¬,\N'ùy¹„ƒnìv…ù¹LZ<ÅtúïVª”(Ç¢‚^|ñïäçærûí_+;C‚„äĉJK¦Ð®è`ݺ deY(** ¢²œ€?€TKxc÷>TÆj.¹Ë‚ùäçáóúØ·w?³çÌ:¥ÈVOOYY™ôöôòÆ›ëÉÉÍÁbÉ¢««›ÌÌLTj-Ã#ÐÔÔÌŠ•˹è•<ûì“ùÛ¶–ÜûüðÃøê ½½½\xá…lÛ¶-³'—Ë)-+cdd„ÚÚZ, íííÈd2ÒÒÒ8zô(n·›œœzzzâÀœœ<ÉÉÉ455…|>_°´¬lê¡Ã‡®‰ †Y”••GÈËÏÃawj½Á@$á‚åKI1&ó׿=Éñã|ëÞ{øé}÷QPPÀ¬Ù³b ˜ç´…B!‡(++ÁlNÅëó¡N@‰D@*•à„C$SÆIù@€uëÞC¥V³dñ|`<ãê«® |Ú4ÕÕU§¤¹™LÉx½ZÚ:¢ág¦BáƒC#üAfTW‘n6säÐá‹^\ûoZs­ø©|ÍÍÍdee±mÛ6Š‹‹éíí_koogñâÅøý~Ö¯_ÏUW]Åž={Àëõ²oß>º»»9tè---ѵ‚#6oÞŒL&£±±Ahhh@¥Ráõz±Z­ñ>YYYñ¤’±…©£Ñ¨>q¢wÉÈX,bRr*©Q ““ɉ'ÈÉÎdꔢ¸Ÿ““Íe—¯"=ÝÌ‚…‹Øµw¿ûíTͨ¦«»‹Ù³«Ï” 9fs*N‡“¦Æcôõõ'$ÃHñù|äæä3£ªš9sfŽCAPZ:…²Ò)QŸ†‰»›¦NœITCˆÖ]#ÒRS(..$1Äíöàt:˜VVʬÙséë;Qj±åŸU8ÏE‘ýû÷“••uÊ ^}õUA ²²’¿ÿýïñUÁbfÒÄ•FcU¶ q¹\˜L&zzzH¢¶s›ÍÏŠUåŒm£££±÷‘uuu¥ ‚D°Z{ZÃ訕Jƒ)9™A¼^…E$''ÅGÁ`»ïú¿þŸ_ðÆo³é£Í¨T*:Ú;ñùÎ=ÂJ&“aµâóúðùýìß_Ï–ÚøÇ LÇŽ5‡™5s&«V­bþüšqýår55s¨¬œÎ uN{ÖåöNψcƦ<’ †è·EÀç0b³£R)Ш” ‘¤§¥™ªÎ‰'óÁN1 ÝqÇãŽcº=ÀwÞ9îÚÌ™3ÇÛýE‘E‹ËôE‘²²2rssñx<”””àñxðù|\tÑEqÛ¿(Šñ`ÓØÿ±ß @ÑÛk•Åòð³³s¢¼Ñ˜D0Æíö…iin¥lZiÜæ/—Ë©¬œ>æÙ¼‡þøJ¥’;¾v[|½¡s ®ÉHIIæÀþƒääå0sV—¹BÎÀÀ /¬}™‚‚BæÎ™ÅÂEóɲdŒ³ôöö3½bZa$’SLŸÈB[Q9Îζï؃Þ`@&•!Ž…ù …,^²˜7ÞzK184XúÉd€ àL+y~ÒÈâSB ûd%^Ϊ&͵Oê>Ñ3Щ5z”*% bJIB«U1sfe4¯^«F.Ÿ|}ÀU•<ö·‡ GŸø±÷3 DÄIE…qªõϾAG{_þòÍÌœ9ƒ,K‘pÉ5;x žýêÈÍÍÆåŠ†ô¥¤Ï0ã#D""2™4¹/“ÉAŒ`6§¡×é¸<^ìv'‘H„¹sç••ÅÑ£GŠ>•/  ÒÝÝÍæ±…A`ïÞ½§´mii™ôñâщ@?|øð8¤êëë;kdR€ÀðÐ` êŸ×"“)ˆˆÄÙÔ‘#¤™Íp¦J•ò?¶ fÍšIss+N§+ªÃÛ¼½nIcvLK&G4ðâÚWéèè`öœj–.]ÈæÍÛðû‚œ‘ ÿñ¡G©­Ý6Þ팖¥«ªœŽÏçC"•eôõàrºÈÎÊdZY)ÇŽÏ}à?iÎ[ ¨¯¯gÛ¶mèõz†‡‡©¬¬$ ²mÛ6z{{¹ä’K<ñÄÜ}÷ÝìÙ³‡ÂÂBFGG …B´´´PVVÆüùóéííeçΤ¦F-~ˆ–AÓéØºu+—_~9‰$¾`aaa\ø+---1r–! IDAT:!†ÃápNNŽ|hh0 @oÐGKÈ„#¤§›± ÐÖÑ…V«%33CŒOþ/lIIòòrijl¢°°×ßx“úúÃ\}ÍuTV”¡Q+¤¡¡‘ÿ§¼3n«¼óþG›µØ–µØ–·Ø–wy‰“8 $@ I¡eí¦´´PÚNK;t:S8ï9ïû¥ í¼Ó™–0ít‡² ÙHBYì$v¼ï²Vk—®¤«÷-(Æ ‰ 9çœç\]I÷J÷ùýžçù­ßßÕW_€Z­¡ªrAʦE£9÷ÞÿÎwéíí¥®¶Šû¿òU´ÚþþÛߢ²²‚–ÖfÞyç]½AϤՎ\¢ÆížA§K¦«GcöÒ#ÇŽåÁy@yyy¦¶Î-·ÜÂÞ½{Ân·g‚7ŠŠŠ¨oh ³³¥RÉÉ“'éîî&‰P]]Mmmmr^*•rôè1&&&gåÊ•ŒŽŽfJ¸8Ž („N§Ãn·§–IÑh4Q^^äòœaZCaQŦbòós›dÍu×°°- &ñIÿßD åå:t˜§ÿô,—_¾œW]IuU²”ÜòåWpÏ=ŸÃT\ÈÔäƒX­6/Zˆ±ÐpÞ¥Ó¦—©«­eï¾·)*2a³Ùyô±âp8éî>Íæ-o011™ >•K G"Ñ(R™EŽA ´ùÊymi)>Þ•-‘§_§‰ãt8¨©©ÁçóeŠ@¦G{{{SÞ­ T*Õœ5ù|>_RMEúûû1 ŒŽŽflëé¬a’Ø»Š›?s[õ’Ž+ãq:–,eõªk0 ÄŦ’b´Úâq‘Oº9ÓÏÓÏ<dž_þŠ)ë4‹—,F›§bdtŒAv¡`˜™]]ÝhÔj-^ˆä#óD×) yù¹È¤r~ôÃGY²d1>‡·Þz‡§ž~–BƒXL ‹IXÛx,ŽF£¦ºªŸÏ§³ÙìªónçË (,,ä[ßúVæüþûïŸó{?üðy…½X,Æš5k‡Ã¬X±"ªX·n]&î?Í*•ŠÒÒRêëë3÷«¨¨Hb ¢¢¢"Ú¾øò·`sçžÝD„(Šœ”9 |^zz#mmÍ\}õU¦L®ƒCÃìØ¾‹æ W-¿©ì㯠>¯ŸG¿ÿ#öîÛ‡¹ºEŽ‚p(@KK3n·›0 ‘$µ“ÜÜ\V­¾æ‚k$$Ä8Ÿ¾y=‡B®2<<Âk¯¿É×¾ún¼q «¯½†€?Hß™>Tš\òóg˜ž¶g4-·Ë(¢Ò¨Õòs2À|<.V ž½{6¨ãªU«2ñçÐÊ­TÊ ‹-brr’PÀƒ4…! +Ðråò˸ì²tzñxœƒ³é¥Í8œ.vîÜIûÂ6œN:½½®`ÞÏ888ÈÐà åee„Âa¢‘dpLUu%UÕ•küÚÛÛX¼¸½^Ïþê7Üwÿ×injbýºP«U¨Õ*ÆGÇ¡¹¥…… )áÝ ‰ÅÒ,ùH8_öÎ|²‡f«s’ó<û½ På€H$lÕ5æjsU%EEE¨5âq‘XM]m2™„––Fôº|ÊÊËhlL3µ¶ZHð,.—‹-[^géÒ%Ü|ózÞ?zgfÞc1Ð?Èöí;hllàŽ;îÄÒØ@AA>‰væLv»‹eË:BŒŒŽ EÈÏKÚ5<3.TJ¥¿Ê\=zä Ÿˆ.t1+Ã\ûvEîì "ç¹_Å*7Êd 9ù zä2‚ `Ðë),,$/7»Í‘Ñ"®¹ú*~ü£ÇP(äDÂ!z{ϰk×n½õ¶y?ÿŽ»âš«¯¡¤¸—Û…Ãáø‹0@8Áérqüx7ŠœfÜ4j%á°ÀsÏ¿ÄïþðzƒÁ]c® Ï[ ¼TÌp>âÏf™L†dŽ2n³¶p0ìcIãB!Ãã  †Q«ÕŒONqêÔéÞPR¬®®¢´´˜‡ú6Ç»Nñåû¾Êý÷}™•+–ÏëyÇÆ&xúOÏR[[KµÙŒß€I ‰¿@«­3S^jB*•c·;˜šš$ ñçM¯òçM/Æ0 ­ÕæšÀ_„Î'?d¿—MøÙ=à Y 3—ð¾±x ½^O~~áp$ic€ÏëC­VS± œœÅY/»¬ƒ_ÿjÿùË'øÂîž÷3¾òÊfNîáê•W“£“H¨­¯G7G™œKÝ„ˆÀÄÄ^ŸŸÊŠ2NW*ðV`rj’X,ŠÎ`¤½½}ò¦uké¾XPçù® ³gzº$»\.?§,0Ǫ’„`0h ƒþ¼¼\HHp8IÈM.55fòòóèïëÇížù¬b4iimùX϶jÕÕ|ç¡oÑÐPGssko¼–…m–e•n]]'ÙÛ¹ÿœŸ»]n¼:-ÓÖi¤R)%%¦L}F©TÂõ×]Û·úÚ•&ž«Œìî]»âŠ+® µµõüœ)X­ÖtÉÔié"Ls`–Ëåœ9s³ÙŒT*娱cTWWgœ5ÙÅ™I<8ÎÞââ⎥ˆc“!DQD¡ÈazÚŠ + ´´ô’%»µµµâó‡‡B´/lÉxû.E‹Åb<þøO¹òÊåôõàø¹óŽÛ)//MÍ€yùyhýyHeRÆ'§Ðäj b\¤­­…á¡~Q*•÷͢=s»OžäÖ[oÅï÷sàÀ6mÚÄÄÄ{÷îeË–-Äãq~ó›ß033ÃñãÇÙ´iSæ{ôôô°cÇŽ ìÚµ‹Í›7366ƶmÛxï½÷2÷îëëC&“8sæ ï¿ÿ>Á`'N`³Ùxë­·8vì‰DBÚÓÓc|W*ââ"BÁ^_0êq8\,¨(G¥VÅÐgÎôóÏ>Îk¯oŸ+Íì"¤ð†‡Ç©­­¾¤Äؾc7áp„¥Š On`xx”ßþö)œN7Á`¡¡ÆÇ'HHeäää022Œ2G™ÉÊŠDÂ|îsw9$RÙñó2À…ÌŒõë×sìØ1Nœ8A8&pâÄ ¶mÛÆÌÌL&£']d²©©)STÉçóñÓŸþ”ÖÖÖ Cù|>†‡‡¡¶¶—ËÅáÇY¹r%Z­6ØQP@II ‰DǃËå"#Š"2™Œ®®®„J¥R:th4ŸÎ׿‘H$p¹g˜™ñb**B§+`Ê:Ãî@G2L0=m#‰°qã lÚ´¯×—ª¢~á-Ðß?D~~.EE…—VºGxþ¹ç¸ýŽÛXP^†Ù\GMM-wÜñ™dΠBL&Åår£ÓiñzýL[m¨X°€·Þ9€T*¾þÚ•½óŽH·ô,V«Õ‡N<§²²¹\ŽÉdÊ„Š¥±ÒI!}}},Z´ˆwÞy'ÃpSSS§2åÚØØÈþýûñx<™ ]wO¯×#•Jq8H¥Rª««9xð`°¢¢BŒDžÑÑQO¡ÑHs³"c£cH岤›¶ç ccÄSh¢ÑXœ+–³lY@€¾þ~òøOøÚ׿ÉŸz>)É_ •®¸ØHC]õ¼ã ÎÕFFF©©©%G!gÊjå?x”ýûösààaÆÇ'‚Éjèb‚Ê 8rä(±X ¹\Ž“—›‹×ã%‹ïÑéu‘lú‡šËåB«Õ^²?ÿQ†¡l0¨tˆX íÊÆÈNŸãÞZà[í틾ùåË8rä(ï>NKsK—.B.“óÚk[Ñ Ô×ÖPRjâ§?ýëׯc`°Ÿÿxò?ø»o|ƒï<ô<ðÀW)-+eíÚ5”Ï‘,2§.eB¹/e …BȤ2º»OòÝ|„|­•JÅ7þî«LLL161AIQ!Í-Ìæþá»àõz0Œ”——Ѿ°•S§N'nX³êºË¯¸<ƒu?ç&õ½ï}¥R97{d5#ÉúJT4õ"-;JR_>;Í|–'{Û‘$:1q6J¸˜È$‰ Ë@}g4°Åb1ceeU[A–É©)!F®FCqq!±h‡Ý2GN¯cdd”ç_ø3ƒÃ˜«ðÙ;ïD&W`¶síª•X,,0f¹§SÌ—BÖT(’h%¥e¥´´4“Ÿ—ÇÝw}–eË–b4èp»Ý?qŠU×\ÍðÈ›6½BµÙŒ D©«­%W£âŠeKŽæåå=¾aÆðyàá‡F¥R!aŽob%CŸ•*U&},™ÿŸüÜëó!Dâ©ý9­Æy½^”JU&X©Tž=¸©ÂK.§+Sw ArVqȳEé.A"‘„"‘HT§Ó·VT”y}>ìv'šÜ| uäçå15e%ÈËÏgÕª•Äã1 ‹0›Ílzy3>øu¶ïØÅ”uŠë®[ý1ÕÞKlRJGÇbŠ‹ q:œÌÌxR¬íÔ˜«øõoþÀÔ”…\AmMƒži›sõ¯¶·m;‹açóFGGyùå—Ù¸q#n·;£ê¥_{½^žyæ™Ì¾ 3×¼ð ™PîžžžÌuÑh¯×K<gjjŠ7ðòË/3::ÊÐÐPƒ( Š"û÷ïÏ`¤Õ¤¼M8Ì ŽG„( õ‚ÀäÔ4““Óèô:Ê*Ê™™ñ`³ÙØøÂË”••óÀWîå3Ÿ¹‰H8Ä—¾x/ ¹”»ïú›OœøÁ`νû8xèÝ‹ºw<‘ ãp8œÔ××rààaÞ9p™\ŽJ­âæ›ÖqútBD˜ª¨¨xn.7êE7¯×›±m>|·ÛÍÄÄ´´´pèС èSEEfÎkA`ÿþýT,¨Àh02<@]­™Çô7Þ°†-[^gûö|÷»ßcãÆ?Ÿ3|ÍårÓÛÓËÀà¡`˜Ö¶fvíÞlj®“¨Ô*êY¿î†$òx¡Þ¡ÍÏýý\÷9¯ p.gŽJ¥bppúúúLÉø4öÿÍ7ßÌðð0*•Šææf&“‰¢¢¢]SZZŠV«E–/_ŽÁ` 777&¡À`0b·Û)))!??¥RIee%6[R¿•Ëå™tñD"J¥" ÒÔÔ„Íf“h4gWWת¦&KÙ‚(äRÞ;r(ŠL*ÅÒTR™ÃÐЉ„Ã!ŒFÃ9fÆÃÆ/aOî§—Ä’ØÕu’Ç~ð#vîÚÃéž^.ëX¶m;‘É$ìéÜR¥¢µÅrÖÌãbfEuÏxX¾|¡À†'E8¢¶¶–/ß{R‰„žžDQüŲeËž;W$ÍEûü•J%ŸúÔ§2ïwtt`IE½\ýõ™ÏÞxãL>ÿúõë?tMöu„†Oaû‹ÅX»vm"¶   sÌV Ó`SUUU™xC‹Å"¶D"ñûññ±¥æšjkkX¸°•wÅnB.“°°­ë”5ÀjF£Ñ Tæ|ÍÌ6mçtO¯nyi›Ïþs4nIŒCÙYy~é¶wï~¶nÝÁwÿá!n¿ý3¼ôò«xý~þýg?áŸÿù‡ôõ |ÈÖït¹SØÁ!,M h tüìß6Ð××OeU%Ÿ½ó6kÙºu;““=×]¿êçúos®<òHR ¼.ßúúú‹ Á>Ÿïÿ\™CsU Ï´ÚiŸÏ{Ÿ^¯Ï1 ”—•b›¶1<2BW÷)TUÓÖfÁnwà÷ù CD…Ù»‰D‚„˜ÀhÔc4é:ÑM$%¼nxò×äj4TUUÎùŸzG¿ÿcNœ8IiY FãÙ!ßµµµÔÔÔ°ï­·1Œìܵ‡ë®[E~~ÿï_ÿ¿½ûsÔ¤2Œ@ÂøÄVë4¿½^Gk[ Ï>¿‰_ü3&S ŸÿÛ¿á†5«ˆ QººO'ª*+\´hásª­ór; £££zÏž=ó ëìì00³Z­AA,µ5uy…E´ù8ÝnFGF9yò4M–FššêèïÇfO"r†B!rssÉQæðÞ‘cüá©gŸ˜¤¾®«ušuënä¾ÌóÏ¿Hq‘%Kfù‚=Ú…Ç룻«›`0ÈÉ“½ìÚÕÉààUU•èRÑÇZ­^GGÇ ‘š3ŸZ·–÷ E…F'ãããÉ¢š¥&::óÎ#üûÏŸ`rr‚/~ñ |áž»I¥Ì¸g8yªçÔÂ…­÷šÍ•î󮿳”——c±XxõÕW¹ýöÛ9xð`æ³›nº‰Ã‡óÆo T*yÿÈ$ }}}¬]»«ÕštŽD"™k_}õUjjj2ˆáƒƒƒH$âñ86›‰‰ NŸ>ÍØØkÖ¬Áëõ‹ÅX¶l™ñ½÷Þ ¨ÕjFGG‘Ëå‚€T*e``€‘‘‘h[[Û´Íf{ñé§Ÿzv×î]þ@ €ÅRËkVSQQAII)GŽgÆããªWa4èÁn·awØñx<Ü~ë§ùì·QUYÁm·ÝÂØØ‹±wßÛDcQV_wí‡Æé±ü˜_<ñ$Zm>÷|þ.¾ùw_ãíwöS^fâ²Ë–Ι  V«¸÷Þ{xð›_Çl®â•Wß`ËëÛ˜œœbxd ¥JÅ’%‹x÷Ý£<þ“a``€x€û¾t2©‡ÃÉ›ÛvºKKK´XF?Š–ó²(•JΜ9ÃÊ•+yöÙgÏÂý}å•W2Õ-Âáp¦ü+ñï§m ébk×®eß¾}ì¿$¨”$cKP(’º­ÛíF£I–_}ûöÑÔÔÄðð0&“ ¥R‰ÇãA¥Jº{5 G€!­VûÔ›onõê †ÿÛ±d mmÍÄbqNõÓ×?Ĥկ7\ÇeË:èï ¯o€P8Š^—O~^>ŸùôzúúÈQ(hmmã>DDxà+÷Q[cþÐ8]~ùe8].zzz©ÿÔ:”Ê~¹áßynãKØíJKMsޝÏç'‘Hš»«*+xsÛ.Ö®YMk‹…Ö¶ví~‹ŸÿâIÆÆG¹÷‹_àû¿„R)ÇjµòöÛ‡Âùùyß^¼¸}÷É\s«;3—ÔôqEÙÂ_vé˜ìéRòéóP(”1§WN'1›Í2@§VkþwKK냭­-¨TJzzyù•-ø|~ =kÖ¬¦½Í‚Õjåôé>Âáe¥%äkóÙôÒîþÜ”W”±sçär9«V­<•/ÄÎ]LOÛxsëVn¼q »;÷ÒÖÚÊ#ÿc›0 Š%“ÉÇçóÇðûCØíV­ºŠü»wïåOÏÉð°Ò ÎÕ3ÕNgÝ«¬¬Œ²²2ôɘû"GG§7ð•ûîeÍšU†óûü¡HDx¤½½õ_.vÌÿ[1ÀG™¢g3Á\id³³ˆ²Ï$Òîê„D""‘È¡@ 0f³¹ÖªTjL¦"ÌÕ•è Ba‡ÝÎÀ௟‚m­ÌæªdŽÏÇàÐ0J¥’™}}$Ĺ ƒCœè:IV›LÑV(£§ç ¡PˆE‡“®®“( ô:-ƒÈ¢ˆ©¤„ööôCüöÆv¶mÛÁô´ŽŽ%|þî¿¡%Uq<‹1=m³‚á¯WT”ýz>ã,ç¿y›+'1=Ëg—Î+OGeÞdBÅ„(Š3Á`àÙp8ìbѧ Û,´Xê(//£··3g˜œ²#‘õㄨª*£¡±žp8ŒÞ`$‘q9ÝŒOQRR‚Ífçô©Ó!—ËQ(ATJ EÑh·Ë…?Àçób2£Ñh°47b,4b OpôèqNŸîerrS‰‰[nù+W\™³‚¸œ®ÎX,öHM­ùà¼Ç÷\B`AAA5<ñߌ#d‚Af#fWI÷ìš‚i³q4•Æb1c, ‹¢M$šD‚µz½þ½¾æf eeI }ÊêÄjsâñú‘J ¼¢„2S!jUV±lQÄë÷#AB0UwY“«É‘¢ˆÇë#!Š”•—ât8 F´ùøüA<žƒƒCœîéchh·›ââ–,YÈWtPZbJùD¬V[$ übâû Mõ®5ÁÎÇ+­ÿ¥[¶98m4­%dk éê#)&0 ‚PFýñx܋Ţ(DQ¼7'Gù˜"GMUe%-­tImÈfwô¢Q4¹ zíyãþ’`– Ò •(&G;*D‰ÆE|þ ^—©ÉI\3~F†‡°Y'‰Æâèõ:-^̲˖P^VüÀ=ÃøøÔÛ±Xô‡K–´¿qIVØ e€ÙÌðqÒÃ?)F˜]hr6#¤ºRK$#‘H<†b±X$V‹¢XÇÿV"‘Ü “ÉQääb®®¤¦¶†â"CféD’ÙFyyy©íE‚ãõqºfHˆ"¢'Š‘£ °Zmä¨Ôø¼|>¡PP0„mzca\²ÄT„ÅÒ€¥±½þÛŠÓéÂawž±;\OÄcÑ?®Z½Ò{ɶXþú›2õœ ÀhRPIJRz’øe$ËÊ)‰Ù\£]½úzKCcK{{{KQccåe¥ ž ¤ UÆIþ ÀðÐ(““Ó ‘ …‰ÇE!‚ßç!HÄcÈdRrórS(ç…Ô˜«0•˜0êu™¢P(ŒÛ=Ãððh·Ó5ótÀïÝt×]w§" ¥YÏàƒìè¬2³y'þ§3Àe$#…M©ç ¤ÎÓÏ/MiC¹iklê<ÝåeeåyW,_aillª®6›«jªªrš[š(Ëzü@HàtÏ`³ÙS«R‚¸˜HE K(.2$*ÔjÔ*9 éY+ÙÀÀ“ÖiŸÇ=ó–Ë=³{çŽ77?óÌí)+IV9Ï#ü#™ËêñTSÄÏ~-f1…˜ŽX“¥¾ô×ÜnË"´,5óe©Ù/ÏêŠTϙՕ€B&—+šŒMM–B½±Ø`®®ÒšÍfmEE©lAE…EEäjöH$×ÖIDATÔTy$!&ð‚8.&&&bcc¶É)ë˜ÇãÝßuâýCÛ·oí ‘Ôÿ.ªCŠV <«GR=š:¦™!:‹IâÙL’Ž¥–¥>ükm«fX1±U)B«S¯Õ©seê<ý½ô}d:^n,4IL¦Inn®\*“ëôº­Á WëõU^n®\‘£J…ÐKˆG…¨Ïç ¹gfü‘HØ Ó¡``zfÆ=>95ÞsúT·5EIj»2§V.]ЍBŠØ¡¬cvf½N3ClŽcºGÓ ™µ‡üµµ¶árÎ1Ë•YÄÏ£rȳVijFy;àO#œ:fÏÂô¬ŒfíçÊÔ¤ SDW¥>¦Ÿ&h(kÖg>ý[Á¬á‚€ÿL`J ´[ g h‰9„¹l s0GšAÎEØ‹gk ý-({–’Å$Ò¬sé,­A’åO‘Ì"ºtÖ½³‰?[U‹g}–­Òemö{sõy©ÿÿh‡ØS8vIEND®B`‚qpxtool-0.7.1_002/gui/images/settings.png0000644000175000001440000001437511345701715017473 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  ­#½utIMEÚ "%·rÛ}IDATxÚÕ›yp÷™÷¿ÝÓ3=—æ]3ºF!1°IÀÞx³Þµ+Þu%UÙÚ­­­}+Uy³q–7oBìØ©;I18É»vœ­…l-l6Ä0 À æ0¾À–$F², ëÍݣ鞞ž>Þ?º5ŒÀ2‡·«T­’4£ù|Ÿç÷û=WXâµaÃïý÷ß_Scc­¦M:Ž (Jd&}úÌé÷wïÚýÿŸ]ÄRþèÛßþö¿ÿáõz)·Ë2› ƒ¢XÇq<Ï'†ùï3gÎüß_þò—ÔÏèK@“pN“¯‘Ûñ9H¯×»ò›ßüæøÞ½{žç•x<®LLL(ÑhTaYVÉ yevvV¸4 \¸pß·oßóÁ`°|©ß®ë°5c2‰Ùæf%N’âYà€pÜè5º%¼¯Âq\~xxx´¢¢bC6›µÛÚÀ¤Ó°X,`Y©d A ¶¶eV+år¹ÖlÞ¼ù¯Çëo¾ùfäÓð†à›üþmÆ={HêþÔöË—W܉¬?ÉÜÍ žç§‡††F|>ßz>—³uvv"¢ªª N§4M#C’$”——Ãl1;W®\ù¨Ó韷µ··crr6› z½6› E!‰ÀårÁh4š–5-{(‰ü!ÏÞ ÀÛí»ï"wî`2lj‚~b¢î†Yw8Ì/¡(AK¡¿¿$hX/J’­-,Š@DQˆH$»Ýƒ‘6®]»víÀßixþØ1¤~ðp½½F( àñ€š­[DzëþΗˆ û„ÿ³(Âûï_Y¾lÙzY–m­­­ D I‹Ñh»n·»Úãñ¤^yå•wˆw> ¡ Ë($t+WB”eä3È t©TÝZAXw¦DlÙ²eÝÌÌ ›N§óK!—ËM¿ûî»#+V¬XO„mÅŠ˜šš‚ÝnW•Õé Š"dY†N§ƒÇã >ÿüóÿ s'àsÇŽÑàEš†ù‘G ›ÍȧÓà|&‰¢@±lÝIZwNA€øÂ¾ðâúõëÿqppðÈÜÜ\v kµ(Â… Fî½÷ÞG›››‘ÉdŠ^f³‘HN§F“ÉšËå¦Þ~ûíÞ[ñ‚ëÁ§C!ˆ² ‰¦azøaHF#òé4²££H^¼>“@eè …ºe@ÛàÙÞÞ^áp8:]n÷êÇ{ì˜Ïçó —ðYdL"‘8E$$Y‚,ËP¥xW&“ ‚ @‘elذá>¶Û Ÿ(7.‚O‡Ã\6‹Ë"ÏóàNàÏŒ@¼÷Þ÷Ñ4MUUUÁãñ·lÙÒóIDxî¹ç~a-³B–ÂÏß’É$ôz=ªªªºT,ñ½?ž;v ³¡ÍíKáçæáA@6çyäE€9€òkÉúºÚƒÁ!/ÀãñÂëõ¿ûïôøýþŠ@Qù /¼äóù¿ÒÙÙ‰H$¯× IZè EAE$ ‡ÃáPõI7ßëÁO‡B ¯áöóðùyxšF^’Eä´MhH|dIŠÒÓE$ ð¹œN'¼ååÁ'žx¢§¦¦æš"X­VýÏ~þó£^¯÷KíˆÇãp8 ²,—ˆ Å ( ’$QÚ o~"‚înŸE*FAQP˜‡EäE<€¬&@/Ð à IA’$H’„·Ü žçaµZáñzƒÛþ϶žÚÚÚ"¸\.ã~øÃ^çÏÛV­B,ƒËå‚¢($©¯Þ•â^@’$8Žj©9µàÙcÇ0 A/ËÀ"ËgFG‘Ôàç-Ï‹"xÍò¬&ÀÀôpÀeŠ"‰¢Š¢N§áõª"in;¸}ûö¢555Öïÿû¯z¼ÞM---ˆE£ð¸<(Dˆ¢X`¡j†Ìçr`YV¹UøA ž¼|,†¤Y^¢iäD¬(‚U×<æ„+/ûdU€(Åd2£É ’$¡( 2™ ¼^/b±ŒF#<Oð¿øÅ1»Ý~ðƒ>ø¢ÙlîlllB<‡ßïŸÏCOénˆ%Ë2˜L‰DBÐNå“ÂgC_(³,ÃHÓ0/‚„à b |V‘×,ÏèF਺ ÀSçÏŸú‹/~¢(B§S÷¦R‚€Õj]I’äʺº:Ð4d2¿ß–e¡×ë5Ä5¸xžMÓˆF£ÈÝH€ëÁ¿ Á$˰\~2UÏŠ"Q„5Ü+xìB…Oû¨Ã‡¿ýùÏžá8În³ÙËå@QÔ¢Ñ(t¤¤Ž„Ýn‡ÏçÃ\6 =E}le~o`˜ &&&ÆÄ¯W9ºü[¡hY†¦QVÏŒŽb"†^Q Dš'ŠHˆ"DMi ÀëÀÅ“À! ¾_ûU1P:::‚‡#èp8Š@>Ÿ‡ËåB]]*++QQY ƒÁ–e5Ì«Kš %ßÏß%IR!E Un·ûL__ߥÅ"\þ5m·/§i8Áj–וX>*Š(È«ðÊ«À;§j½‹2EEfÕª¶¯P¥+++ÏóÅåÏç177‡Ì\Ù¹9ä…ü"k—ìk@¢(‚^¯‡ p¹\0›ÍºB¡ðP 10øÎ;ï Ï‹p=øÓ¡ ˨¢ixÁ_Öàõ|VÑ,_PßX9¼ñ¦jùÆ4]þ¨ LMM¥ZZ[WzÝîf‹‚ ¨-M‘•çV”” U¨¯Ÿ‡³Ù,<\.7™H$þÚ_㟾øþžàÉkÁ¿ª…·>šFÕ"ø°¶áµ£nN1£Y^V ép¦xY³üáF!ñƒ‘‘ñ®5kþÊl6[\.†Á||p•տТ,0þÕi^BóU³ÙŒ\.›Í†êêj"‹ÿåc##Ý÷Ùlÿ¸ø¨; “eøi5? YƒOŽb ¡(0 ÁOjð„jýÂ~àä€jõ£>Ôœâ†5A™eÙt2™œmoo¿Ÿ¢(½ÛíÏó`Yƒá*"qTY¸ ,Pƒ JH‰'‚“É„®ãlj¶Ë—›ß …’eÔÒ4%ðÌè(.†Ã€¢ÀJ hŒ(â#Ííuª ¿N\V­Þ`âã2ÏÒ˜\œšššŒD"‰ŽŽŽõ&“É`2™`·Û‘J¥Àqôz=ÈùÍN™AÏó¡½¾$Ð#J=A}‰Ñh„~Ç8Àbø×C!Ìjð˹}¯ä”HšFJ1¥ÁëÕ-·èWá˜Ô,U@nrrr|```¦©©©µ¡¡Á!Ë2l6œN'dY˲˜››˲$$©ƒÍfƒÉd‚ÑdD*•‚¦A =špúŸì„uß>,ŽíχB˜Ôܾe‘åßÓ²º2‚€n¼Q=ÓØÝÀË3*ü+¦—Ú¤Ñ]£ÐÁÆãññ£G°,«onnöûý~Z¯×Ïgt(//GEEl6;t:r¹æææÀ0 ª*+‘L&a0\¡¨Â[oÁ°};,¿ù ˆyø—^Bï³ÏbB–QIÓh+Ïhðœ¢ÀNÐÓ4’Ú†'0«QóoÀÁ„ Àì'éPé®SíɘêïïØ»wïÀ‡~È˲¬¸\.“Ûí¦¬V+©×ë!Š¢’H$ áÁpüÔ«§FŒF“%/äéšš$“  †«'‰äΞ)˰>ø d†Ä0}üq \4öEðÃad‚€Qƒhð5«Kþ8QáOß(ȺÙÖ  @ €€z^&-CT´6 RSSãùÚ×¾öªêjGpåJÄãq¸œ.Pz €èž=°ïÛ‡¦Ÿü“ D:ÙçžÃt8ŒúÍ›¡ØíEøpq ÞºÈí­@ôà¯nvç¤o¦7ùq… Y‹œbÆ´`¢O ­ñ6€óÚ×ïg2™KÓÓÓS~¿ÿs¹G$’ д’$£?—ÃàûïÃpàÌ­­óykjàli¤(Eø¡p1E `§i¤KàÍ"ÀÔ À~A=ê^ÀÜlcö“4FD-`¤J¾ÒZšÀÅãñ+ñx7—I¸\®‚ P@çß>‡ÃGy–în¤ LïÝ ƒÇ‰ã 0 ¸Hã Ã"x€A çFþ xIQ#¼ ZŠK×í`^.™çy>m·Û7Žé¼^/6nܓɄ±±1ä‘H$úýX ±,DA€I’@‘$Ò…¦% 9 þŠÃñáñü>¨ðïii>þ(§333cAÈ˜Íæ~¿Ÿ ƒ˜˜˜€ÙlÆèè(† ±dÊÀŠ‚Ë!'Èb’„¬ä\©­E¬£½ÌWí;411qìvÁßIæEÈNOOX(¸X,vÕj%;úúú ( ²Ù,bØ|òè(YF6Ÿ/3tÉÖV(wßææfÒl±Ü×ÔØxéÒ¥KC·kåN P!ŽêõzsKKËšX<—Ó‰|>êêjãv#Î0 ffÀÉ2ò’ÄX{;ÈÎNtww㡇²¦&òÊGWñUû¦‡††ún‡wZPV¯^mÛºuëÓÝÝÝN>ÇC’ ðz½Èó<ª««100€QIBÒá@¬¼±Š D 0·¶bÓ¦Mؼy3 ÊËËÑÐÐ@LLLü¥Ïçã/,%ÞÿLèèè¨üîw¾{2Ø\633ƒáááb÷ØåvãСC˜…ßï‡dµB´Ù@¸ÝðÔÕásŸûÖ®] »Ý³Ù‚|>«ÕŠ––b||üþúº:ÃÀ¥K¯ÝŠwt†' –?þøã§‚Á`ëôô4úúúÀ±lò?÷ìY¾|y·Ú!ÑÒÒ‚ŽŽ°, A ×ëár¹ÐЀݮ_PŽB.ÇA–ep‡Ý»w#‹ýÛîÝ»ÿùfgî˜477{žx≓mmmÁyx–c“;wî܉D …Œ «»:»°ió&дUUÕ¨®®FUU¼^/ ´I”ÔQ¬M®5k066ÖµjÕªæóçϹ™®ó ¡¡Áùä“Oý~uûêö™©iôõ÷e¹äÎ;÷ÏÍͽ àÕt:ý^mm­Óérµù}~x½^pÚ@ƒÔ‘%%9µÔZZhÕëõÐét(Öv¯ÅøøøÊ5kÖ¬9þü!I’„ÏT€ÚÚZû¶mÛ~ßÑÑÞ53=ƒ¾þ>p—ܹsÇ<ü|â’žššt:•ǵ”——Ãá°#[ì5”ÔTŠ"\ç¡( ƒË¡»»MN6­é꺷··÷å|>Ï&TWWÛžyæékgffT·gÙRËŸÓr EÛ¸Òccc—NgM&“Y^YY…²²2p9E•”ÙKw¬«ž Óé`4‘N§±ö®»FkÛÛÛï9Â0LöS ¢¢ÂúÃýèXWg×úé™ôß~þ’¤GGG<O •J5ú|>uÇçùbbA¯a¾àªýlþD‰Åbèìê“NWµ¶¶|1ˆD"éK”n‹n·Ûüãÿ¸ç®5kîÑàs¹\rÇŽ7‚_ ÂÈÈHeees<¯¯­­…¦Q )ˆŠNP²'²²2ÌF"X½z5òyÁÛÔÔô°¢('GFFb7á–p8ÆÐöí/¯]»vÓ¼Ûç8.Z|± 9<<ÜWSSŒE£5õõõÐQº=ËÒõ@ûW½Ãn·czz­--ਫ«{Äår½ÖÛÛ;}½ÿKØívzûöíï¾ûî/Ü|©‰ÁÁÁ¾úú†öh4ZÝØØXì.—ŠPê ¥§Ã¼‘H@ƒÁêóùmnn~ëÔ©SW®õ9nZ‹ÅbØÚ¾ݺõ1Qݞ㸥ºý =áÒ¥K@×ìl¤rÙ²eꜢ@G’Wߌ ´JóµE˜ã5›ÍÆÊÊÊ/www>|xdñç¹)Ìf³~ÇŽÐï6¬ßðP$¹]ðóW@|`` ¯±±ñ®ÙÙÙòåË›!y€t%ªEçEÍfC2™„Ãá€Õj¥*++¿ÜÖÖ&9räÍÒÐù `0¨;vüæž{î}$‰¨áííƒ_ Â¥K—ÀÝÑhÔÝÒÒ‚\.bQ»Ž ¶áJE°Z­Èd20 °Ùl„ÏçÛ M‡>;/ s’$‰­[·~¥¶¶¶!ú†©©¨¬h¾ÿ¾û—E£QmÍç’¡¡Û ¿`‹¢¨õ_ýêWŸóûý<ð²Ù,¬V+ (ŠEQÅ\A¯×ƒÒQÐQ:-wPïsssÅþäììl~Ë–-~üøñ×H7ô€'Ÿ|òvuuý{uuõ}>Ÿï®†††åzJïæ8ƒƒƒêQ·sÇ‚A–åèÐÐP¸¾¾þžd2éhimE†aÔ@‰ þ(NH%SxñÅñâ‹/âüù Ë›šeYX,H’DÙl6ûÁƒà¯+Àßýýß­ììèüÝš»Öè+**@Ó4ôz=Œ4 QÁ0Læ™gžù]&“¹SðE$Išª©©ÙN¥ì---`¥W#MApààœŸï±`° sssà8yAÐ^L'?ÇÆÆbZ]þÓzTNÀÄb±ãGŽùöØØXâ­·Þ‚ËåB:†X(ÀVV†U«VÕ®X±B@ Búêßþí—êP(Ô1@&ƒD"!ÍÔÔ¢ ާ¾®î×ÍÍÍ„¢( -«ð©TŠïëëÃm~d — =33s´§§Çðàƒ†t$éXÛÝx<§Ó‰ÆÆFÓÖ­[ÿ#›Íž (ª¦®¾n}}]=Ré4¬V+®\¹‚ÁÁÁ8Ô‘eþÍ£¿òùýÕ,Ë¡ ä!+êpÐ<|ooï̶mÛ^I$½ZK Ÿ©‰‰‰C'Nœ0Ð4ýS‹ÕjhiiA,ƒÛí†ÕjuÈŠòeš6Àj±Bˆ¢¢044„³gϾ ºàüú׿þOõ õÿ»££ù|‚‡,+Úd‡žç¥]»võnß¾ýP.—ëðæ­öånq9ð©TêŠÑh”Fã=‹…¨­­E2™,ŽúŠ¢ˆL&š¦a¶XðÆo`pppvÏž=ûœÀPpÏ=êü55?mmmU•„"¼,˘˜˜`ž~úéW‡‡‡Ïi}øa­Qú™<Zâ ÑÓ§OÿÊl67)Šò7Ñh”h aw8Šª&“ “““8uê"‘³gÏž£Þ€:K è`zzFn 7—Y­uÖ²2UbuÞ_9zôèÈ÷¾÷½—£Ñh€F?ƒµÃÜÈÈH8ŸÏÃ`0,û裌“““H&“˜Ç{g˗/Kýýýþö·¿=’J¥z ¶öÙÒPØ@ÓôÝO=õÔ¯:;;›Í&3’©$ÿì³Ï¾~úôé³NA1ÍàOóiÔáu«W¯~ ªª* ˲‰$Ið<Ï^¼xñƒT*5¤Yþ"Jæ JskY™mãÏ~ö³e˜´þé§Ÿ~5‘HÌŸ§ãó»&þt/v¶ûµ § ÅÑAD¡xÄ¡Î1(×kŒØ¬VëÆl6»@ê$HâVÛOŸòEâêCDIVº–ÿ=Û¶cÔ«(øIEND®B`‚qpxtool-0.7.1_002/gui/images/test_ta.png0000644000175000001440000000107611345705046017271 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ *œÖ®¾IDATXÃí–=OÛP†S¬`1AŠŠ€¨ê K…ÄÀÌÀè^‘•¡tË’‘îÍÂh™!‡Q!•B>'ØqbÜ%ŒŒU%g»ç¾÷èÕù¸ç,ËÂOëÁgó€èaìh›» ð”ÀÉå?–còHŸÍ¯i&‘àZrñÓzÂë ô1óqØæ+–k u›ðmšâŠr®Ú{à"^N ú{Øö4ÊÆF,#Šö§º®³˜Ï'<'0;5EP’ìc—ÍvPµº®Û|Fãí”K%ôjÕþ·V*¯"=Ê\áq‰Áþ÷ß=-ÁQ¦@b¯ È’0œI®,E¼ï€,10.;g¥NùŠÕ;„ò¿M'â]Wv <ßný%P¿¾~Á¤¿ÀŰÙBÖü€ôî£s®u´ßßFI5—ÃU©´é_Mj ´ÏmVߨ©Gç^ äŽÕöAm޲&´ža# êé¬tÃpÖßEÔ íVx"Ýž¨B¸÷D™¿ZKâR¶¹Ð.<¬~%´POÊÓ¸I@ž6ï±c¦Å*¦kÌ È=NÈí|õµÒ­›™ætˆIEND®B`‚qpxtool-0.7.1_002/gui/images/colors.png0000644000175000001440000001172011345701773017127 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ #fCPIDATxÚíšy”\UÇ?÷¾÷jíîê-Ý鬵É!+`d"ÆaK ˆ .¨pDG<:€:Fãè 3GGG9j”M²aX² {º“Nw§—twºª««ê½wï?Þ«îD ¡ƒdäwÎï¼zuª^ß÷÷ý­·à]yWþ¦EœÈ—î¼ó~KJScYV…eYÕ¶mIËr°,«Ï¶#¶éþÌgnHÿ¿`ÅŠ»ÏN$+®,¯7?‘¨œ‹•WÚv´Ä²cB ãcŒW0ÚOr‡1{Ém×*·Qk³ñ–[–6Ÿ²Üü‰^yÎ{n¼¢¼j¾ ¾¾Ê­À0DøD!Á²@H!²Ó£|Õ½»'“ÙÔŸËî¯MfwKÔNOÑxû?ÞÐóŽ@JY¶dÉÕ_¹zé¿Ý‹Õã¹@ø }Ð:À¿`B0H ¶ v°àPÖgKkŽ–Þ %V:_WÚ×4&Ù³aLI÷*‰ZwÇ?Ý´ÿ™‰¤óÙÏýÏÞÉ“®™Ï 0ÈQ`Ø/H+`„eƒí@,Æ‚m°jìî4T&ú™RÞ®¦W´mZÞúÓ¸ÿùç¿ð±Îw 7ß|'55‹öŒÍÔüƒ¡ T€V ´†„öC,)v„í‰B,mYxr—aS ( ©èój÷eÔîú^u,ýõ;¿øñ“&Ö›ùðÌ™gLª­}ïÝŽ5^º…Ï3(Ïà¹ÏÓáUá¹ ×SÁkOá{ßT)ƒï”/ð]p ‚„„EãgOô»pàˆCS_mtkהŎåà#WžóâÓϾ7@ mŒ‹429¾—ºh 5‘.*ì ËÅÞÐÏÀÈ¡+4€2q\äd9QKZŽ£Ç®§ÅÔ±k`3 Ó'wÝL[kϧ%òá»î¹)ÿ¶ð¡}ö_fÏúÜÝÊ« 7'›sÁëbJd#g”<ËôÒWíBXþ°Çš¡Ç=Lõ1^k £%h¾9ús<Ó0ƒç —àkµ W2½}^ãøÖ†ûÐâ'÷|å£ÞI`ùòO.o˜þñŸE#3d¦?ÍX½³J~Å¬Ò Ä£½`)„ Œ–fÈx*âÆÊ -AY $¸ “£4rq1-B·-¸kß·IWlb‹ø5î8f6žýòØÖ©Ÿ¾ëÞ›Ö8Ë–}ô¼)S–?YZ²019ÿ8ç'¤.¾l,,¤Bƒ0o|È ÷‡@0E´ VVàqO‚ka “s°U¨(“ôx¨ï*¶öÝŠ´žãñþÛ1e.õ‡gèY»Þó½DÙ¿|ïÇÒ#À²e™?~âU8«<^yþ5‘Fˆø`çÁ.„xñ–  ŠÞþhôF„F[¡á"4^€g/1®5èyQ•Bž1ªÊ é@\@ÜçˆòùW~ÌœrmšøEçMʺ(±RÌÝ~Ñ®ñ- KïºïÆWßR¼fÙÍ‹gN86Wž«LÒé ©îƒ )/uøZ y?d;Rc„ ]¨š 3Ò&èt”ß`|ž×` ò 9¶9g ŒÉ$ãAÔ¦41ÀšŽÙøº†ªHsJÞÏ®®Ud¬vÚ&ì«6Žùà²Y·îX³î·»N€k—ßvñ%u£]Qúly­Þ~B‡F¾N¥l†œ. †c¯ ø€ Ô(À7ºS0àœ2 1cTWCI)”&!…H"A™Ñ‚͇çQjC‰`véûÙsx-YÓIwm[4_2pÍu3nk[»ö±-qÆyýíÞrž³£4®úÁØ!e‹j‡j £s¨a‰3:¤v1›+3d¨ <~´× ÆÕ AΘ…˜9jj UeeO½r,N¬çÔl£×Óôù0 À)®ûSRÙixÆÚmÎÖ3Ö|ÿž/ÿàÃošÛwm{r£_+œ’ê¹3â^ÄfµC*†¼_Lôƒž¡ñ€/ÂxÍ <0npÅ8ÈYg"¦L‚Ê*(- h‰B,Ž –K‚ðIÙ<Ö¼('jAT€cE™žx;»‡+2¤+º„Žy—]ÚëW¯[¹ÿ¸ÐZ»--M«6õ¨õ­±‰gÍ)•£J¥VÛ_—BiO`´!åÃû¢ñJ€7¤ÆÁQ¬ÓÏ@Ôׯ—U@<Ñö¶ÌÓ`|0`ް'=šƒÙâ8¢l™`büb^íycùôVµÛ1»léì[^ýìÊô›šÒGض¿ù‘íΤú©å%³ÆÚÞPfÃë‡z]ô¼çýcï‡÷> bXsNƒ‰PQeå+ fe'ÎÏVØ[¸ ³`Ò 3d=u“Š@D‚#À–àÈ2FÛgñZßÃX–EWmk²¶wâœKÏYþÓ5k5ojò=w`wã®ßlcTMyõâ†hÁLbˆþG%½a^Œ—Í‹`ø"¸1¬3§ÀøTă„/X 8ÑÐp”WSÝæè>ÐÙͯ.§""ˆ… pÂåKÔªÃò’ìÏ?ƒåؤ«OšÔ2»mÍšßn>‘iPµ¶4®}Õ¯à4L;óÂ?9 ¼IQO¼ðÜÍßmM„âœàª‚Ú$ÀéÆhQ)®B7…ûóÁS/ð6… O>†×‡KÌʡͱ /V)6HÂÌ!®Nãˆu3J]0RÐÓÙÒõÈîßZ—©0àT¨òœ<8iù°¦‡'(Êa2¸4oÔã[zÁÇ13|ü4GaœI$õõäü ¹òôÜ`Ë‹O=ñÃòçY〶s ˆÒ^ xS«¡9|-6¸¶38>ûñµÄ$ ã^;›$)Â&I¿áFðª õU5%#ÀÚW¶á×½e„…­“:‚˜ÖÞàò#èä16CaÆ*.LŽ„‚J Š¿ÊŠÂ` ФpsóQI/U’HÕŒ(Íû^i}¬S~§WF‹Ú ŸÏ Ó°wX[ìɰO÷žO¯†ð—0dý2„­ Jk|­QZ£Aë!…‰!&¡P¸\¼OÖTÕUŽ([÷îýÖ¼xÇóûSêM¢\ã Sª ÕÏŒ÷õÑ è?BÆ­@œG·lJƒ¯MðžÒh­1&H¶6Ô< V–ººñ%ÁiÄÊî×6þjãÎóKS5 ëêf9{‚³`á¤Ü¬³ë»ªOÝL"îÐ×alƒ}"¯ã¯ž†¡åËQ©ÞО«mÐZãi°ý¡t¢ñôÁ—1°Ìd4I*Ë«#@.—Þ•Ë¥wu¶ï}èå-$q¢cjÇL?{ö´óþáâúÊ÷Ý(fLÀŽzÁÆ'jC4qAëE6챤*þÅD9@Š`R|](4eÇÑ—O‰¸´F*P"¨ý&ì <äÙ¼¸Zà)‰ò=¬¾1Þ@¾¯ïmàºëoM%³­÷9… ‡R“›6½ðøÅ­L¾³}ß3<¶ï¹M»\µì½çÝ{ûE['›-ð€2Ì fhjÜzxN@×''4J38)ä×Aø lWäÓÙ· [çïªÈíIÕš­Íø¾·ïX¹³q÷¦Ÿë@|Õæ¦óþõó—µ}ø’yM–bhš„N8>«.ÆxòJ¡""t)Ú  Ë"ÅiPà"ÈiÜç²îÀÀÀÉÏ×^[CuaûmŠ{~Çö—~ÁcŠ[ȵ?½ú÷Ÿhé|Ïêó¸yÉÖŠhñ<`É€—äùC³ÀóÆÇ3š¼QaI4(cPÅ%•(¾䑸(ôç=ÏõN:IÝó*¿9Ö–˜ZؼaÛý@Çñ´ø;_{î'_KÏÜÑÚwö#_ºzã¤R)ƒƒ ü϶ͥ«?I 9\ßÃÒ £FëÁ¦HŒáT …D ‰+ v!}$<’9y\»|Å¥c½ —kggùUû¡«8î1ÚnßôÃßæ.è/,þݽÜ0£Ü–ŽâÁí—£¼ýž ž‹r¾ þ€%Œ0A!ðŒ B`‡Lò¥Æè:tR¸nù­ÑjÓòÍJÝ.^ãŒÃ_zö›@æM¯Þ:ššÿ÷).‰ZóŸúê›f$m‹V·ŽÇàç}ÈåIå;¨Í7{ÉìÁ®h¾«-⥻%~¿#؇hj”_2vl:Y?f¯[gK%2йg0G”ćë$µcF¿]Ãæ½}ÿíO¿r¢Ïê8ÔÔúÐÓÑKS%g®ÿÒ/ûÏý+ˆ÷¶Q×õBoâІ-Ù–WŸoniÜØÛ××t‡Æö(«ŸPßpî‚ó¯ˆL<çʃM;6œÐ%G–-¿­f²Ù¾s¢ÚY±.?oÇ#OwúÌÅ‹n½¢dÕcû&7u¾öüÊ]{wdù[’™3ç^2oÞâo”–¦–„CÇ»ò®œbò[èU"øˆ9óIEND®B`‚qpxtool-0.7.1_002/gui/images/lock.png0000644000175000001440000000334511142047542016552 0ustar shultzusers‰PNG  IHDR szzôbKGDùC» pHYsHHFÉk> vpAg ‡úœIDATXí–]lWÇÿç~ÌÎìNv×öfí®Ò]“4&U qS(MI QúšV¼!UBD¼Dâ¡êk*ß ñÂ3ªRB(´} Š–¨Ó(JdJ[eÝÄv½^f¿gvfîáa7iIÖë æJ÷açwþçœ;—ðC}{÷fN:uâ©§ŽO¥SArsözñÆÙso\¼téòûµZ5|=iPÃ\.—8ýÓ/œ|æÄ·†Üøäj¹o5êä¸I$“©è£ë³KÅ›s¹pñ⯦/]šý¿Œ C¯ýøµ>öèÄ鿽õvìâôeøkˆÇ,TCƒlfq7Š×ÆÄ¡ÃW®]½zæüù?]do¹cÛô£W_}ù‰#‡_üë¹ßë7/LaâàÂǾüÄ­ý‡¾øþø#¬hm¹W®\µ%0¿°{æäɽ+++ï”J¥æŽxþÔsOÿà•WÎ.Î~06óQ±äP©U«ýú­wÞ~ãÖâBYÐ'¾~â«_:<ùrcsóSD‹› aËoÿäg?}G X–…—^|é{™´û(ha|ÿæ?ÞþþOù‹ßÌÏÏoV«Õ R©x333³µfcêØ×Ž?=ž/<äXRæòyÿïSSoz-Ïôó!ú½Ífã…Ba²²±mi¬®­Mýáçζ}ÿ>Ûééés‹ çw¥‡0QÈáÀÄþÉÂÃ…ìv ô(ä ÃéTºx-(aa©T~·\.×{ÙFQ„ò'K[¶† •ÎæóùÑH-&8†0D¸^,®‡aØÇ^Ývl;Œ¢ïë‘ÝgGl ˜™˜ @’‰ú2JÊHà( A2•LZ;DŠÄ$@$û1FdÀ)Û¶Ëú6’£HÃ`LÜ #bÃDÒ‚ÖJ@’ÞY šÁw[•M{’$A‘€ékªï†` ÀЙÐR ©lˆ»\›(2¾ Šø^Ë[ü÷BåȸΓ{vÅ¿ câÀ€q ãžyáØäóRJ‡Á•84&¨4=/6‡Ã(RB*„í¶l׿9’pn®7Zå­üô< óé]ûŽ?ºïuK«gG²£*ôêhTk4ÿÁ?GѪïKÄtÁ±tÞÑ*ïX*o)ñ¹ Œöû¡Ù³;·‡¼f7Ê%µ>_<š´­äüÊú…Иh`€Ï'w}åHnìLn,£šË|{¹DË7‹ðuh+©5„RRƒ”‚TÜDå¹YÔ×–!8ÂÁǧ¡´›šù°x¶Úôj§€™©µ±IìùHçF)‘›JCe³R 0w:ƒˆ µ‚Áqm$Ó.F²côðÁ'a9Iüùw¿ÕBÉ-SÝó !l{X»µ€ÕŤƒ›Ia÷ØF2Ãp“IXŽƒX<†DÚE2ëÂIÆÀä²íî¿öN­>` HI€ˆÛmT×6a[€- È´q°IÀ²°­…` è¶Ó³O‰ÙPJ@*©$8bø6˜;Òz n«~æyÀÑû  ¾«@g Õ™A;@³Ú„1÷Š|ÏC_á·S ›!B¤]©$‚vˆF¥ 6üéƒý_£w t• I`A]/RK(K!Š"í`kÏõ-B!ÔU¡ƒ@JB[ :¦A‚ÐSëPcË6$u„è(@!;iÐZAˆ>ÿšk`Kî@ "‚¤V‚z;ãv0ß#åÝ»“º£À½þˆï®13˜yK=zX›^»Ý ^ôD¯XÕFë!±Aܵ¦ßüpµvm³é·ü0âN÷ۡϬ1Œ1Új·+\¼^l¾wí_Ëõ–wÀ$€dxÐkÍQ‚ö ÙÖ‘Ý®shØ'œXV+•LÆíx*åj×M(ËŽ‘²,ÖñX¤VÀ’¼ZÍk.-WÖW¥çnÍ-~²t# ÃKVøÛô€ "ŠÁ$,"¨Î¥„ 3Ãì3³ Õ>€@ˆ-úâ?¼Åf·IŸh%tEXtcreate-date2009-02-03T17:01:51+03:00‚ºx3%tEXtmodify-date2004-09-19T07:19:13+04:007wl¬IEND®B`‚qpxtool-0.7.1_002/gui/images/disc-eraser.png0000644000175000001440000000541011345706461020025 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGD!¢'z® pHYs  šœtIMEÚ )‚GCÛ ˆIDATX×[Œ]åuÇßuïs™sfÆÇ>3ž1Ø_¨kSs)`.‰JMyM/ªRõ¥R¥‚pÕTjUŠÒªQª(¥M“ )M+Ú‚ $8«Æ&ÔRˆcÆ6`íÏõ\fæ\÷Þß÷õalBBi×Ë~Ø[ßú­µ×Þëÿ|´€Úûs»®úøÝwÞ¾atto._¼ÚÆùam,RÊzá|½Þxí¥—yê©§.xï>ÊÁz_km?÷ÙO?°këu¿742rGÈÓÂDhcm„bâ8ÆZ‹¤KKõ#§NMþÍc=öl½^ïȇÈßþûnùåÛö~iÛºÑ}Ò[úBÓÖ™¶ ct”#Šbâ8G.Ÿ'ŸÏcŒAk‚™™™c/¼ð£<òÈ+€ÿ $ê©„°~ùwýįÜôõ•áÍ6H !4^i‚²Hc1Öb¢˜(ŽÉårDQ„1æ½k©TÊ}ææ=;sÏ>ÿâËÞûìPJÇðå?ú«½÷îøã¸¨ŒÆ+ / ^i¤‰0ÆbíZûs¹c,Q!„ Ûí2÷úÓ è +&½ýÖ}{w<òê³I’¤`?û¹¿üó·Üü‡:’BYÒ-‘—˜ Aj¼6  ÚFØÈçb"»Vu¹·ß¤=yˆCã •ÇaƒI®ß½yèkJþ5+]ýÜR;ûIùÀoüéûö=øJç¥i@E­ÁEäW”E‹±‘QZÑë´™=q1{–MëÆ‰u„[]A4—Éņâà†¡bþ“%‘ZÝ7æšþ±yËÇ6}òÁßÿç\~} AˆR! èÈcDAa¼&CI!QÚÐ\˜åâñ©ú”«ÖUÑ>!m®`êˤ­&µZƒR¯Í¸4¥ …Ò¾œîí¨Z½ /èO}ê×lV£YXÁeEB·@¢ JY¬6Äñ*9ïi5ÚÔš+t1`"\æè5ê ×ÎsÓÎ]TFV›Á×–QÝKÝi§Ç°ë£\›f§Åà»âßœ¾ðq•nÒ€Û6±þ3¦#%“ ™+á»yœ\OO[V‹’úÂyâ®cn¶Ñ8}aþb}~!ÛRÌݹ}ke÷Îm*\ú!³g‰/]¢»Ú`zµK1I¨ê§2¦[=Ìr†±ÍÁƪ¿5iEP÷ß÷KV†‹ƒRö@z¼Hq2!£„KÈ%f¦gPB»7;¾8·zºX,bûÄ/ÞºíúÁêâYÙþ÷¿Æ™¢¸²ÂRH¹ÔõFsÐÊÁÅ&ŒÊ”öìF-ÌÕj FºÐÑ€¹fbâ~m-RJ¤)+k "ai©C–ˆðý#¯Î+3Ë-·ìÝ¿ÿuCùÈôÿíkY÷зd¹>«PëÀ¶<,\PÐK \wõñæ­ÈW#ÚpeDÐJ©âàºÊe#”Th%.ƒ$™oÒè/qaòÔÙÊ@±}Ï=÷Üqà 7ŒïåÌü<]w«¹òhºåå'Ýúé“&êµäÎÒÚ`Åâ(£;·cZMä÷Ÿ‡,¬ý‚Ð7n­T*cc´V(¥PR¢¤@JAºÚB„.…œè<øéߺsó–-¥Z­Æüü<Á{òåAvÞ¬ÎO¤‹“¯ô¯:þ”.(B@츕ÁÂêÄ+P[÷ãä3…<“¥ò¼®V«Ã¹|AÙ(ÂÖ¥ZJ‚N·Osy%ݾ}ûÕÕjµ¸¼¼ìkKKÒƒR „@!¿Ùd#›Ìäwe#§'ƒ½e›»t}äip@!@/Òœã­{ùêsÿõ%].—‹qÇÑ”1cLWk½I+URÐíõJ9rnv6tz½,Žca­ÕRJ)ÅÚ> !à½ÇŽŽÓ0wûÒÁ¿ öõCÏ{U7Fʼ=1Á;ãûc¿€<|~A7¶1f*Žs£(Z¶Ö:cŒUJ]/„è&ýdC©TºQ*¥µ1ª[¯Ë^¯—U*•N±P(bíüà}H[«+2ívUh, ™eÀ!˜¹vooÛÃôȘ¡MmÌòòJMÏÎÎ6Bã8när¹Ä´Ö‰”òu!„(•&ËåÒ[Jª QýZ¡PÍfÓÌÏÏBè +k­rY–-¯¬hç½Ô'û}pp±TæÝ‰Í\ØrlÜC±XDIÅj«•.,Ì×õÜÜÜ\«Õ:4>>.¢(BkmŒ1™R*—÷»yFqÑX[Î ÷&I‚óžv»+­]¥RqIšZ)åšR¶½àb¾Ì;îÄï"Úp5…|¸,aiqanyyyI‡ºµZmÚZ; µ.[k”R­ÉÑPJýhllìµ'NøS§NÕ¯™˜À•Jt»]´Ö‚ !(£5Þ9¼÷4ú‰xµ«híz˜Üµ?Oy°HdÞ9BðxïY\˜û!ÐQ€+ß~ûí£q÷•Rö}êI!ĉr¹Ü2Æôgff&''÷ ´­1ƒQa£ˆR©„:Ý.SÎó½W@ïc÷]}¹1„´8Á;‚Ïp.å;¿÷•wÏž;®€pòäÉ•‡zh°R©h`@±<œ¥T¤X,žÏ²ì‰sSçÎ...팬­ ‹|>O½VãØ±—yçâ ª»¯b :†4ëH²I‘eç$Î.ÍÌÌ|í_ÿ|aQ¤išMLL´÷ìÙ“I)§€£Bˆ©µ¯÷=™F©T¢T*%‘N5›ÍÞÔÔÔ¦4Mû½^oð?üQRãšë‡)FˆBÀ Èœ&Íb’Ì’zCê/½ôÝÇ'ßzã;@÷ŠGíßwß}T«Õ3Àâ)Äu«÷! ÷óqÕk‹Ó³Óç×—sƒë‡)ç ÁzœMp:Ás’ÌYÒ,bêì™ÓßüûÏÿIapï)¢,Ë’……ÅÚþýû“|>ÿAB•,ËHÓ”$IHÓ$–B æ"3TÈE7c;˜“åŒLe8“àU†Çã¼d¥¹Ò~ú‰/¨/^<ô~Jž9sï=ûöíÃZû?¼÷¤iJ–eô{}úýþJš¦¿¼»V nÃ;d–¢œC8‡“§2œN 2£×ídÏ=ñÕ/œ8öâ¿+ƒþSªøØ±c$IÂÞ½{‰¢çiš’¦)ý~Ÿ^¯GÒï‘$ý»Ò4Ýœeéu!K>Ceé!œô8Ñê®&ÿò•üâËÏ=ÿÀŸ'MÓµäIB¿ß'Mú:Kû7fYòšÈŒKÉ»„\ÈXé,÷¾ýÚ¾ýø7ŸûÛV«ó&PûÉäŰeË~øa¶oßNµZEJIš&¤iŠÏR\Ö¿—,}!ë¶üâôô¥“o:üäÁCÏ,Ô›o\®ºý³¬™àÿ###ìÞ½›juÖFxçD§½úÀ¥ÙK7½ùæ&Íæ;ÀÂåŠÛ—ßwøÿºã÷?'ß?<ï‹!`è] ¹ÜjÿQìùŸÔëO±<âIEND®B`‚qpxtool-0.7.1_002/gui/images/test_wt.png0000755000175000001440000002031311345710771017316 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDöòÁdK pHYs  šœtIMEÚ #µu× IDATxÚå›yt\Õ•îçNukVi,K²,É’%Û21C N€0Ù†B 3“„š^Ðy™Cè :Ý !„$$¼Î@? 03ØlˆlË£lkª’Tó­;ß÷‡Ë´›’ôðÞYë¬U÷.]Ýs¾»÷9û|ßÞ‚£7h<ìÚ¬õCMÕµùªg]þ4ñŸù2£¸VA$±"øÿ€ÚäC@¢f!‡,ʼÿ*0¤ÿäw%€`A­Ïš¨Q\+ÿ¿@P³8Hi`&д £¸Vúåµ À$V53‘Ä ÿ(ºñ½ÙàÅ<R¡L"ä1`¬æ àF+œÿ¶ŵ PD `Ô¾®¨ý6_í×Fæ¡F©¯°ÙhGõtÔ¨‹CIî@ ÔvPrm”?ãÙHÍŸÓ@±Ö#µ/˜²FqmåÖ0• SÉtcM/Fê"nÆ 'ÔæQ¼†ê 9i"„È5þûpØ×oƒ ž€f!˜¬ý_ ÈŵåHb…o× öêøÆ ür^nv!…4mã—'ñ Íxåzï^äd !l@ýk»€ò&&_Û΂F|¯™Ài9èËrIu² ¼Þ)З(!$4â3gà& ¬z¼²Á³è=;‘ã6B ÕÖ™C è_†QñòàÛ "*R¼9ÖŠeÊBŸ@’ŒÚxÃ@È(®µ_.ùÄg¤§Ÿzüš[o¹ùê†ÆfsÅÛO{RQ”çeIÎüüÖÛšKÅâ Žc_¶ñé§Þý7¯ûèååÝÔ¶š?¹}¾µ ‘¸‚¯¤°­z#„—áç[C!pÃUI·šÓ¦‹è˜f«ÒFµÚˆå„°JQÉÈšŒÐBUÂñ]*v'È¡…¤ƒ æµßø™õĺ^À¬Ÿ?°ÿ—{æÌ{ø‚w]xÖOüƒë·m}é‘ÁÁ-OíÞýÈøøÈÏ?óÙ«ïzip˲ÍO=}å—.ÿÔ ÷¬}tèÍð¤,ðT©^ÇÓBx®†WŽäÃH¦¾‚u IÙEÒMpóLÞâadÓ˜~N0ËhÀv"XU[ÅȪ@ŽiøZ É0=-(eIE€ùù/Þ›´ÿ¼ó/صsçmç®y×s]tÑÊ¿ýì'³G÷ïÿýÁì½÷ÞwÇÖ}û—V&§?þ‹»~ó³7€,Ë쬨XºF,&LÅi³ Ù ’‚RT ä¡X–Ci]glž¿_kDZëpÍ0–%Q)Hž@9,¢*¶ˆa›1„¯Ò]BÑêŽÝf⡇Ÿ°÷í3w||ì箹`ñ™§¿ãü¿¹èü½—újéÙgž|Í–yã?ô~|ãpýÓkTªÓoöð`{>/ì«°3;NÉÂ’Mì°OÕó°r.θ=ªáN5ãMvãf{ðr ‘ëV ì3PÊ'¡9ÈŠŽ+IJ@N6™òm*å{T`ïWð¦â(N'Šu•±c¨fêz»CÙ½ãš1@ïëŸohl>cþܹÏ-]ºp@SK{ç#?°éü Þ»æHƒ?þÄãG&³™‡þ08xΛÀlr•2[‡³d²YªVÓ±0\Qv±3&Î^0‡BØ£ ¸“ݸ¥.”ú^äD7ŠÜJ(Gª=À’VgŠȪÀ[ni@ñªšÀ±ÁÏúÃ>~F"¨Dñ¬ÊÓ‹9ð‡Þ–¨O¥â:'AH’”ÞóQMÓVÙŽM]]JlÛ:xþ¶íÛ6½ýÔ³®ü¯Ñ_žC$\œœÊFßôa(bÛž¡i&~P¤`ŒQ£èA™& Zࡺ6”ÃX;Uê Ùmh³ „ºö"t—@nDr})Tcýlo^™~ì‡Þê¤$ã#ð˜p!!A\-I@ÅéeÇY60c×Hkìä#‘XÀôÔ„‹'¼™ÝòÔTY–ñý 5#þNKKK/ð Ïógµ·µþ\ÂÃÂÀ`#؇Ë.‚*aLÀlCÁÚ“ÀÞÛ†;ÑŒ äd¡šGO‹K>¢~æËß“3©ÓÕÑ)ù }9\G ¦l”‚¨ªˆj3”PjkOdźukKÍMÛv ½ãö;~«Ÿuö;ÿÍu½É¦†ÊMÕ(‹ôöö™““S?¸ÿ¾‡„mÛ§,[¶|ðM`× &†2Y¦(°‹*;q˜Æ b”ѱ‚²‚µ«cË,ÌmxÓ)ü’,쌧–ý¥óf›6=ƒšh¿~±û`Ð[EP d¬’yB‚Ñ(Úd=áñæk>²÷‹|cSóOîð¾î 6\9=ùìèÈpˆÏ0«c’$ÓÚ:ƒX<ö³¯~ås›n¹íö³g¤[—®xëÉ·ÉoròJí쯲êdŸ<àÒìË$i@¡ Ÿ$<@A ¢!!-ãWC-Ð ìfF"»=4¯>Â매‰LVDÛK[+AØÉ l$|O ›.JE —A5,´ò0¢¸­·ÃœÚ:¶xpçÎ]+¬jõ>úð[ÇV›hŸ9‹ÞÞžgz{z¯)—Ë7<ñÄ£ÆßîËóÖ­{ü׫WŸ»õâ‹ß{µü&&/ñ§)%H6Ø<ÿŒG]B¡ 6Âø(„PPàJ ©Há(HvΕq]›Þ+" ö=¯^}ÕU¼´×sµç¾/òàŹütओßN¹T6dY^ù½ùÇ/ùøå„ñ‹¸ÿ¾_»ükÕÙg¬œÝÓ=õ§/‚#¿’©[¬£·éHºŒ ç½^|¨Š¿gÏ™Dؤ ‚ƒŒ ¸øµ½ä˸9XBiÈáV]”r½¬_t¢p±6é>ÿüóŠi¥¸!÷>Œóô.]Ê—}Ýñ|$9†åˆÆhD{w¥h.9íŒ 6纞G <¶eóæ{¬ý†4P(L2‘”wìúæòãÞ"¾ô¥Ï-Bj_´xÉç¬>û£§žö¶Ñ£r‚¯&;_¾ÿ€&#éqâóêi:%FêYsÔb÷æ*;vôc8‡êèI¸…T?B>-@P(˜y Ú‹‹KÅî÷KÑÆ¤/IßüÑÃòö¡í€ÌŽ¡A@‰Æ‰DÂ$u´µÏ$@ÓB|èCdÑ1ó¹çÞXÿÔSn6›™X¸paÛ¶­Û‰F£ÁŠ·žtà…6“SS¹d2ùÜE]øó Þuîã¯KŠÖøùhíèYŒC h! !×í h}7hQJƒõزÒNf|;û(èA˜uԣР(H8ø„ðjÒˆ`?S¾­¶ïÌžØö©oO©¯Ì;5çÏgœN{{;a]§Zµ(W*Ȳ‚íù8–ÅüþÙ<¾îinþÙ-T ¹|ŽæÆfššþîª+¯¸~ß¾Á;N?Õ~ì°Q\«3€2‘Ä »€ ´ U"u‚O´»;Ó Z Godª\Ïþý-LíéÂ/Î"E˜¦¥åâƧÀö#Õi#]ºë±úÄ?|oc¬PAœvÚé\~ÙåÌ7—b¡Èd6Ëx&K¾Pftt”úTŠL6K{ûLš›™Õ9“™R©Ä}÷þŽ;o¿r¥ÄêÕç9ÍÍM_ûø%ý‡~ÿ P3ýºš`ª1½"‰åµP¤Qâq"]´Æz¼jr¤™ Ò@Ѱ/£3±§gª—¸¥þeEÐ%F@ Õ–å W‹ïÞ&¼ëo›ÐººçðÝï~Ù³»ÚÍþýMUH§ÓÄbQ4MÃ÷=AÓBŠ%ÆÆÆ‰FÃèz”æ–&bÑ(ßÿÞwyrÝc\~Ågq÷†ŽŽYŸ½âòÙo€:`0«¦Û û€éC”ñ€¦ GÏê"<3 A·’DÒ[ ä ’ŒU$ÆöÏ 2ÞKȉ“$ D€‚Mlj¨¡Œ•nüuI¹î挺rÕ;ùâ¾ÀÔtž‘Ñq|Ϧ5¦{v'‘Hß÷øÉÊï¾€¾¾9ضmYØŽG¹\bëà_·Žöövâ‰3Ù°áYþùŸ¾MzÆLfvÌúɹ«W~â²Ë.ñŽ*Õ|¿zkºÝŒÚ–÷òv9ÓvÑ‹èéJ$] ä*[Å·}0uBAYSpe‰ WRÁC `!q S5|ïäêu7gÔ .|?—]þöîaóæ-Ä"o[q2'¿õDfÏs&£££$ëRìÚµ“o}ûÛ æ¦FRºJök_%±å94Õ3·¿J¹ÌóÏ¿@ßœ~¾ñÍë¨V+ ¾´ù£?òï_þcÚà!ê9\sƒîš€Ù^s‡ÿh+L"´†i”¨‹u ¼*¾å‚#¡zT)Œ…BI.;â L9WLm½ý~{×÷oŠŸqæ*Î=w ™Ì’XóΕ´¶Îàî{îŲlt=„‚¡¡ E"‘(’$“LÆ‘$AuçNÒo9‘­CC,on yãS¬>÷lf¤[Ú±-¤óýëĪU«xè¡û?÷á^vÎQ¨™x±F6ÖÕËþZ¯;\¸ŒÌÿi@ó™y"³GÑ ( 9lØå"L Ù×±…ŒQ i¬á|ga÷x×ð¿Üº·aþ1Ǫ\ø>$ÑUúûzèîî¤.™`2“å‘G~ÏÕÿÊå ùÈùú׿ľýû`xxÏ>»‰L¢Ži5©1IжüXf´4qÚ)'Ó7§‡;†墿y_ûê×”‡¸÷†[~~[ãë±Â% [³„Aæ"ÄN ü :Z«w‘#SÈ¡$!ÏÅÉP²¶‡lk¨H(BàA` KÕ”áoܶ¯Î±eï¾à"ºF©Tâ䓎£¯o’$xú™ 8®ÇÐÐóçõ3:2Êœ¾^dYæÌ3Ï .™ \® Ë2szºøÁÿÊÂ5çáÚ]gy0u%¤ñÖ“§jÚìÝ»!dÎ^¹’}û´}ã[ßú pùÑäqØGàÀw}|7…o÷ãUÇwzjñÁËú²^%Ú[ Ò]@kp‘ÃU°ËHUÝð‰z@Å< {öÙ“>7ºæŒ3Ζg´¶’ŒGYºd3‘¤ƒëñÇ?þ¾õÍkhlj¢R1èÓ Àää¥b‘ááýèzˆtK3FÆ8/râ²…h Èç󿪢H$˜×K>ŸczzŠmÛwqåß~UÓ>rÉ%—õßœÄ-Œá•!¨Ö㛳ñ+KðJÇàÛ³j÷¡æ"ëe"]eÂ3 ÔU ¹ZE)ZDmŸAÁ3¥PáÇëªí©†¦ú¥ÇOKsår™î®N¢ÑÈ+¡ª W\þ .½ô„€ (•Êôõõây>¶íÐ>³ßÜu7ç¾û|¦M‹r¹L±Pà™g6ðå/_ƒë¹|èƒï ›ÍR,VøÈÅÖ§§sŸ>"‘Ä ŸÊ3eÌ.Îx·˜Â7šqyxåEøf?ÐZ –¨ée”x½Ý$ܪ¡¦4$a£yU¢8èøn(dç´nó‰mÙ®ãŽ?‰ÖÖ4ŽmR©Tؽg/_¿ö[lذ‰‰‰ÌƒÇqB°iÓ Ìï§©©‘¯|õ}t-K–."•J1gN–mcÛ6ã4MeÑÂÌšÙJ_o7–í0´s7ï|çjʆqánøiâÈ"ù»\¬m2Ö°Ž7Å«DqªMTK½Xf¾ß4ŵ¡Zˆl D-U$”.ª7Qõ2ª°ÑA Î}ÛÕÄ´)u÷ôÌ¡sVÅb™5kV³qÓsŒ±eË‹|á‹_eddôµ l¡PˆÞ9=H²ÄØØ8wþëoð==¤ i<÷Ü (Š$K–,BÓ4êRu̞݅k›T*Aº¥©ñž{~÷Ö#`îð°v—qG=ì±» Q-†)—fPÌuQ©ôâº]5Â//žJ$ž'Ô”A [ÈÈÈT|KˆàÉ¡jc*Õ€®‡Qd‰yóúˆÅb\ò±³|ùrétštºåµ¦"#I‚±ÑqÆÆ&°,“–æÞuÁ»åƒ!JGÇLÛFQdV¯^Éùç¯AQ¨¯OÑÛÛ ÏØøïxÇiär“gY l{x ¡Žˆ9øŽŠ­)8R ‹l¹B¤Î ‘ô©0˜ø^ß*!²¯¡DAEGrõ:eÚp妿b±(¡Fµj (2B>ø÷ðì³9fÁÀËz…-ËLf'il¬'sã~Ì»Î?÷½÷Ý<þøz–,YˆïH’t˜å!hii"¤…Pd™éé<Ç-?–›BáÅGK’rðÊcØ#CØ»ó¸{<¼1 ?—ÄÍtPÚÙKf¨ŸÉ}}Tr]˜•LL„)L˜˜ceœI, é ¨/䋱©’O$innfjjšt:ýŠ—._¾ŒåË—•†èëï£R1˜ÎåxjýÓœyÆéÜ}÷}äóz{»Ù»gøÖS(–¸é¦›¹÷¾û©VMº:;ÐB!Æ3ÓÔÕ%IÖÕu\ò‰ÏèʉN¿4Ž'mBHNÕJhalÑFÙˆâÉ ÌÆäêvQ1‡Øüâ0Žóg%H–ŠW§D@½PQMoGª†ÀTqÊ:–Z›ì¡¤Ìg:w€R6OÙwyî@@RvHWT’Á$*Í@D '‚O\z)kŸÜF[Û ž~êi:ÚZ‘$Á-·Þ΢… X¼d1ñXôèŠ|¡À¥Ÿ¼Ã0xÏß4ýd2A<CU_›IsÜò¥ìÞµ‹;wóÙÏ\¦©lÙòvíÙ‡çzT«¦ÞÖ:S="%YfÛÆ&y¯ô{(¶CPŽâ ÂŽ‚¯ÊØyϯ'°»ˆ»‚€Àv) Ù7k' ;DH¦6»µC;(é{žÏ=÷>ˆ$ÁömÛñ<—ÿs÷½|èƒïeÁ‚#ë‘õ©’$³páBZZš_×bfÍêàSŸºŒB¡ÈŒ-T*rÓ9J…žOæmo?Åx]ZüÚ›<ÿó—È0}XŠJ†8Hr#2>!‚ ÄaI,AÑé’ô¦ÄÄD–®®YLMMÑØØ€¢(ÌšÕÁ¼ys_wÉd’þþ9œ|ò hšöún½õ—8ŽCcc#Blß¶£ZeûÐNt]'‹l¸þ{ßùÅQ† ` p ðÏÀÀ P¨žÀ#ÀÄÃÀÅ¢J@˜D0…LCiç£4×GÈç DcQLÓÂ÷,ï¸ãWüö®»©V«GÖßö¡N6;Éâ%‹X0¯ÿÅþþÞ-o*]>²Ì>D–>üx؆ ‚J˜(:a@àS òHê´%òÏþÖJ§Ód³“”J‰d‚'×?ͧ®ø$'t"‰x”ÞÞž×ÏŠ|ëÿ‰ýF^q?ÓÙÙÉèè ÌçŽÿýkZÛZ9á¸e”Ë•ëçΛë¾é4¹È2Û56j`C-yÑF £ÒMœ( x”q( á!c"(­¥Á`ÓúßûÇ.["=þÄzÎ<óTŠÅ"¥R‘¾¾9ô÷÷$\—;v1·ÎýÜCCCx®Ç?÷zÀ窫ÿŽ–æ&|ßg÷®]LMçðü€‘‘1¾ð¿®"¬«»ê“·ýÙ5—(›‡€µÈì'ŒM-$qQñ ×z9¯†FššH¥ê¸ýö_ÑßßϾáýìÙ½×=Xge[6wÞùk~wÏlذéï}öÙM nÝþòõúõÏÒÞÖF]*ɱ˗16:N mßÉt.O[{;7þè§\|ñû‰„u·]µdéRã?r~ÿŒvíM^ðùKdû025ŠD …8*>öwŽHS‚!´€¤¼[l.¦ý“O]-ýap;/½4ÈI'ÈÈÈôN(¤qû¿¢X,PÈçØ³g˜†ú:šššð<›žçÖ[ÉÈè8ñh”U«Î¢³³ƒááýìß·Ÿ•+ÏäÀþÆÆ&˜ÑÚÊׯý&ï8íÎ_³š—^¼cÙ²e×~çºä/Àa X5\ ‰fTBèˆS2*BÓlQÊ f§yŽ4<<ÂDf’cÌg×Î]X¶EoÏlÒé4{öì¡jY¬Zu6ªª°qÓs<øàü÷=²~ýzæÏŸO:ÝŒ®ë,Zt K–,âæŸýUQèêîäÚk¿Íâ%‹øàÞÃSO=»¹¾>uAoïló/V2óŠ`a£¦Ô$µwk€¥x$)S%‹Ipˆ P9Ÿhw&û~¡uÍY¨üú7¿ÃuÎY}ãcc E<×£·w6±X”d]òåè/“Éòàƒ°aãF®¸ü“̜نaT)ŠŒ‰D‰ÅcÜø£›™7wúÐûغuûÎÁÁmo»à‚5#Ñš¡#€ }ÀJ`ÐC@ ‡p>p*p20Háãã£à8"®YAÂWE‘l¥[lùHdÆÌyâ˜hšJŨ’LÄ…B8ŽG±\Æ2|ߣTªP®”Éd§Ø¿ï…BžîÎN:ùDš›ê™žÎmÏ^µhÑÀƒµª±?‚¨‰ª=À2àØšÆ¨ÿa—¯eP ÅvÉ0‘Œ*Ò®AÈqÕ Öx‚¶ø„÷Ô-ZrR¼gv·e×÷Ø7<ÊØxÓ²©”KD#:ɺ:ÚZ[H§›™šÊy¹éÜsÛ¶m¿á¿¸åîû·ßʵù¹µXÅ«u¿Ö 8tžóÿJ „¦ÚâØ „ï~ÌO?±ÉOÛ6¡ª…VµÕ@+è…2j±(%CHõ±ŽÎÞÔòåÇÇçÌéÕê‰D"¤ª!AP­V«–eMg2Ù±Á­[7>·iÓ“¿ÿýCyß÷[kI¯%yäk1K¹&û*¸°Ä¡b¤¿VU–±Q“kê²(×Þä%žÞì7&aÓ"Z©ºi·’U‹¸e“pbžOäPqDm|ÅÚà­ÚWu«Ñj]¨?IDAT§ÖN¯ÅÚ„_ @åHð×ኴr(g¬‹¨µ{Úa=tØoå°R¼CUd~ͤÝñ_ÕÃú]àÿL;Ý(L IEND®B`‚qpxtool-0.7.1_002/gui/images/loej.png0000644000175000001440000000602211345714664016561 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDöòÁdK pHYs  šœtIMEÚ Ò ’IDATxÚíZ{ŒÕþÎcïÝ»»¸»\–]V\Ù®F,Jµ¥[S% ©¤|”’´Rð ZPCÑ”Z[l‹úGM›XS#A!M›4M°©X©Ô ˜ *w÷îÎ3gÎ9ý㜙;»,š½ì]ÔìI&÷ÎÌ™¹óýÎ÷{}s‰11&ÆÄ˜cbLŒ‰1nƒ Ø† ýúñÇ7]€¹cd¼†%ð|ýúõôœü@¿ÙÕÕùç]»v Æmã6èY0¿ùæ[gôôôo QÊ[»öÞ/÷ôôš5«ëá .˜Ùqå•_9e¥•2RÃ÷ …ÂúûûÐÔ4]`Œ­[±âÖ+ð«>Ó ˆÀ§yäKNœè¹ݺ5 ”;ÐRj†|_BBáy>ŠEBxž‡\.‡|þ0“R~#—Ëmy÷Ýý^%˜À*À¨Ôš5÷t;vì¹;ï¼½º¦¦¾ B:@ø¾€¾_„ïûð}Bøð}áö&Mj@>¤¡®®®}ÇŽ×ÿúY7ÀgϾ¤¶£ãK[æÍ›;£«ëâ0ßö!„€ŠE¾ï#¤;&àû„(B­Œ1èííïš3çò;wîøÏXHl ©Ï¤îºkÝžç-Zºt) …ø~RJø¾@øÂÒ>d ÑÊ[FA!ŠÅ"ãð<RʯuvÎúûž=oËR™eÐÛ¸ñwßÚ·oÿÆ•+W‘þþ¤ Dà‹pð} 0bDt>rËœ¾_D:‚çy)BØ©Têù>84f¥2#êWÝqÇši½½}/\{íµYι£u H”6)#ÊøÀ2ˆ¯‰ÎI0ÐÚLnh˜”ݽ{çö±*•ùX•ºmm훂 ˜ÚØØ„B¡¥4Œ10FAk­ Œ±Ÿa@) ¥B„¡‚RÑíGŸR*Hiçk­QSS»bÙ²¿òÌ3O¿@œi`$cþé§ÿx×oìz膖âäÉ^WÜh×t " 5´!¥‚1*6‚=Bk…0´FC‰0 J… „B)u2ŸþÖ­/ Ï$&3¸ŽHmÚôÔܽ{÷ýãšk®I‹êÀ(زÀ ¥L Ôn% ‘ì5ö¸”al)Cw>@cc3úúzÿ½mÛ–o?þ‘ ,×ìLRÞ²eË›kj²il<§ÙÏó188àÒ™ˆS`±è¡X.åE~mcA´²A ãsa¨âãah Ñ!|L™Ò2­¥¥¼õÖ›¯ž‰2¯áª·lÙöÔ³Ï>{ccc#¤” „À6{– QãW:cl ±½€‡(ØÁí€k×+è„KY—Édj¥øÎæÍÏýËŃQgRfÊK/^|ý}ß{rpp€ p !œSPÊbð8µ+ „Æ@­ŸÛk8gàœƒ J)£î^:þ½¶¶i‡gÎì˜ÿðÃ.'rRÞôéÓë^~ùåýœóædo@NùíGP‰)ˆ$çÚ  g,ã˜0ò§”G}¢»»û^þhÓ#/'ò:t¨Jñßt:}PJc ˜á×ZÇi/ù=ÚÂ0Œ?#€QvHž‹¾+¥ðÎ;ï¼édõ`´ñ€”Q7T˜´`Á‚΋.ºèâ¾¾¾¬ïû5J)nŒ¡ÉUV2iŒèüHвC´¯”:åzwEœóºººÞíÛ·¿êûþGúF¨˜ ðD d ÅF¸9éÄüGI–x(zšÒnnôLÉ9&ÙmËbƒgZÉUZ%£ LÄI5§)Æ’´×•ŒÃWŒ°¯ÇÍç‡"ÃîŸu߃Oy–èÞzØ=H% láÂëj8XG!Z«F­50†Ô2fã0µ”Ò(åpÎpÎrœ3Ø"$ ”€1. !µÕÕi0ÆPUÅÁÏRJÁy(¥¨ªâ ”RΣèíMsjKéÚÚŒêï/ÈÍ›ÿ´³¯¯/¬d¿Ö~ôÑÇî¸ì²¹¿4Æ ¶6Î9£ Ô>,cQ 4p1 ah B2™ Òé„ÐÛÛ ­ (%‰b ®.0CŠŸR %® ²õÅÝwÿÔœw^KëÖ­Ûz\Ñ•`@d€*!‚ɳg_‚—^ú'òùbÜåÙz_'ŠƒRv´…!ˆË[B, Ò5&^*šì=JUat(=,_þHéBx3€¾„[TÄ8€ŒR²JkƒcÇŽ1§§0´5{´2¥´§!¥­ð"EX)9$%Ú•ÖŽ1Q„q£îÑ8#j }@]] víÚ•qB&Œ– @Z)ÕVjoÃxÃ0py›€Rãº<ÄÝ¡]=ÄZŸ=n=€²âÑJÛ‚I»ºÀÄøl½AÍÖ#š¦¾ÿþÁƒ.WÔ)¥LZk “©A/ c”[¡ˆî:Ö´¶†2L°"šgSJc½À3.”ZhËåbCjø¾l¶ï½w°Æá¡£¥ô¨ƒ ~•õw+u—hkb_"_/Ń@)€‹"–â&>é ¥ŽÑV«*Yƒ64dÑßߟFÿ0)§ Œ!N© bj—Ÿ1J…n‹KXç.áþÁ²„€R$ª5R)–¥5°½o}}ÒéTc9ox)“Xº(  ÀÄ_ä~ZÛc–:~3dûÿ$“ˆì J!ÖKýDt¯dÐ4 TãäÉ>455#Ÿ?jÊ©lËa‘2¬ˆ“¹‹1=m:Óñ>!Rªa¢‡ÒG”Nj†‘{ØjbW°†Õq`µj³@}}-8çua(ÆÇ€I !pî¹Ó eçz'X& “¨LB%"ÎzkKó)%К8ã©!ªRékƲÙ,„ðÓ %•2!}â‰MÈç¨ö M_Qz+ ž¥¼8ÇGjíóu¬DóKšŽãŠ1 žWÄœ9—ÁEË©pùèWäœs&MÄ´i­ ÔÊUIE'*e€1†L¦ét5R©*B〩”‚֜3TWÛ2 1hc4(µú­ílÉÍ9‹ãȼys§lØð󊻘›nºqKKËäÓ IÅ'Rs’ŠÏðý¤â#¥2oøfß3ú§Ì;räðÞJë)õš[[[§Ïœ9³Ãó¼z¥TZkM“A-©ç%å°áÒØé4ÀOºvØï„¿ÀQ(ºscn€“ä4ºÞ=…ñÿËm4B¶Àq'œ,‰£cêÚÉ΀^·?ˆÒßÙÆ{2pÒ[ÁõS…#Ý~géÎÞ)tF(º••(R– â 5g‹þÑPn ß+¦ “6œE˜Ä§¦NŒ‰11&ÆÄø´ñFóukn÷\IEND®B`‚qpxtool-0.7.1_002/gui/images/logo.png0000644000175000001440000002046711334770665016602 0ustar shultzusers‰PNG  IHDRX2€–¥ÉsRGB®ÎébKGDùC» pHYs  šœtIMEÚ 9´¥ IDATxÚíy|ÕùÿßsïÍ !!$!¶°ËÙâ?"¨”¥"î6 R[\"ÑÅŠÀ¡*ت¯º *жÊ*ˆ”‘@€„ì Ù“»œß“ÜdîÜäÞ„°¨çýzÍ+™¹3gÎ=gæÎgžç9ÏQ„‰D"‘H$I‹aM ‘H$‰DÒ²˜®VÁyyyœ8q‚´´4òóó)++À××—ÀÀ@ºvíJß¾} •½ ‘H$‰D ,gØl6¾ÿþ{6mÚÄöíÛIMMÅïc×®]7nS¦L!22“É${E"‘H$ÉOåJc°Ìf3Ÿ}öo¾ù&'Ož¼¢Ê„‡‡3gÎfΜ‰···ì‰D"‘H$¿<ϬY³8tèP‹Vª_¿~¼ÿþûŒ=ZöD"‘H$’ŸÍr_µjwÞyg‹‹+€ääd"##Yºt©ì!‰D"‘H$?9šlÁB0þ|–/_ŽÅbip¿ŽAþDöõ§[§öÜ÷«°Z°Y­ä•[‰Ù¼‹*ï0ÖïJhXý <û쳬\¹£Ñ({K"‘H$ÉÏO`Ùl6V®\ÉË/¿Ü`û=C»2ÿÉÉtî7”›Çáéï|” ¥¬ˆÂS{ÉNúØ­{Ù˜XÀ±)N÷]´hóçÏ—"K"‘H$ÉÏO`mÞ¼™‰'b³Ù´…( ã‡÷㕆1àž§hÛû6@Ô,õšP@±(”eáô·cùgÛ‰Ù{Úiù111L›6Mö˜D"‘H$’ŸÀÊÈÈ`ôèÑœ;wN÷ÙôaíycÁºOx›ª«û)T!%l`)Å ®+Šú¿¡ö¯'ÿaù¢WX½ë¢£4£S§NìÞ½›=zÈ^“H$‰DrCãvûòåËŠ«ßD´aå[+éù;s9˜«ÀZ –j°šÁfV×mÕ`.SE–µl•@%P J5PAد¦ñúˆ¾3´NŸÕžžÎ’%KdI$‰D"¹áqË‚uüøqîºë.rss5ÛGu2ðå§ïѹï((+„`0ÖY¨PÀ`P­Y•`4Ö,¦º¿àxƒŸÞǦßËçGJ5ç `çÎ 2DöÜ H~~>ãÆ###£ÑýÖ¬YÄ dƒI$‰äg‹[iÓcccuâ*ØÞúÓ,:÷ ɪ°²VAh­ëÏVó¿Í¢Z­ŒêiTû™ÁOl´ ÀË—‘ôÈl붨¨ˆuëÖ5*°˜?~ƒŸ{{{€øÕ¯~Å AƒPåª6rVVQQQÍ>Þh4²téRxC_LÙÙÙ$''SUUÕè~ wžD"‘H~ÙËl6óå—_ê¶¿xw7†Ü7N“L&°–©¢)¸7ªõʦŠ,aaV] `TÀdP­Wx>jÜ–µ ¬å`+§Ë¨ûXõÓW줺^Ìû† X²d žžžNë»g϶nÝêÖ—÷ööæÎ;ïdÅŠôïßÿª5ò?þèvœ€¿¿ÿ 18qÂ¥¸êر#;v”wžD"‘H~Ù+>>^çòéþþŒg~„Êbðð›xxÂåóàa„ÀpêB¼P¬`°‚Ѧ.à øª–+KXKÕÅR¶rþ_ÔÆnü-©uù¶rssÙ¿?wÜq‡Óú9rÄí/_YYÉÖ­[IJJbçÎôéÓçª4r||üBXXØ 1)ŠÂÔ©SíëB¾ÿþ{ŠŠŠìÛ†ŠÁ`wžD"‘H~Ö¸|Ò=z”ÒRm,Ôô‘a„ué ¹g¡ºÔ!x½ ŠR¡ìöT Š  xð@µv)¾€Øs1X Á\ÕùPU—häMÔÄ‘­(j({¼¢I«–ŒŒ ^}õU¬5ÉP[šƒ^Ññƒ úIä›:u*7n´/|ðÎò6lذ«î’•H$‰äzãÒ‚uøðaͺ &Þ;åüUT,`ôVs\ÙjR4 @Q xù€O;Õ"UJÁø×ˆ«"°å²ÃR5~"Ý>þ/g‹ëêpèÐ!„ºuee¥nÂéÛo¿ùóç#„ ¢¢‚Ó§Oóå—_êDÚÞ½{ÉÊʺ*–¢ ðâ‹/j¶•——3cÆ ìÛî»ï>ž{î9Ýñ]»výI^\\ºtI³í–[n‘wD"‘H¤À:}ú´f½Wt8 ÎÅ«ö/“MJ6(5¢Ë¥'¡¢­š¦ÁdcTXÀÃm[ƒ­ Ì…êRkÁ2©ÿ[ ¡º€ ®ˆè`âlq›055Õ©ÀJNN¦ººZ³mܸqŒ7N³í©§žbðàÁš´ùùù†‚ .h,Z>>>tèÐA×>V«•ôôtÍ¾Š¢Ð±cG¼¼¼¸í¶ÛtÇ%''c6›5Û"##uuuEYY'Nœ >>žÌÌL„tèÐaÆѿ|}}Ý.«ªªŠÔÔTâââ¸páf³™àà`† BDDD“ãÀ4ß1 €Þ½{Ë»N"‘H$R`]¸pA³Þ½ ? Î@`'°)€SMŒ•E]@ep :Þ>Š*Šl!'2÷AÛ`ίq æ¥ÆEhɇê¨<‡g@/"º·çëSuq`/^t:U£{PQ† ¦Û¯M›6 >\#° ƒ=6Èf³ñä“OòÝwßÙ?ïÑ£qqq´k×ξMÁG}ijÏ>«vcÆŒá믿¶ ,gœ9sFçz|X—ýÞh4rë­·òúë¯3f̘FÝrBvïÞÍ_þòöíÛ§©Š¢Ð§O,XÀƒ>èv Õ?þ¨Y—î‰D"‘«†ââbÍz—`?LU%P‘åðîO0ZUae<ÕbUV¡]ÈÏ:@ìš½x·jÇí·$|@?ÈØ ¦RP*¡:W]Ì5«³ `À|||ä]'‘\cl;´/6†q—dÝaíøs»f }áÒáøÐmåã…¢X U+ð4‚(*ê¬V^ xTK–¡ÚtäÀÖ$ÆüvÓ_\NAn>ˆËªÅªä4T¦AÅ9¨< e)PšÅGTq`)À߯u£uª‰‰‰šmݺu#88Ø©hÈë/Ù¯×L`™LZ#—°YÕ£ZùA«Öàë>>àmR#à}<Õ¥•—šçÊÖŽ°°n„ãííM Oµj¡ª¼U™Pq^Xå©PqªÒAÔwQ)XÍÚÜJÎ\Tyyy:wæðáÃuûðüóÏë§ÞsÏ=šÜZ¼üòËšs¥¤¤°iÓ&²²²x衇HOO·ÀçŸîVMgÁø}ûöu˺óñdzfÍݱ111dff’œœÌŒ34õÎÉÉáý÷ß×¹UwïÞÍ¢E‹4ñc¡¡¡¼÷Þ{\¸p³gϲpáBM»˜Íf–/_Ž« :¤s5J%‘H$’_ .]„ÞÞÞšõÜËeXÆV­kDVÐjí­Ú@ëší^PP —x÷ã\úq%A‡Þí!7IµP)­ *O\UÙ`ÎQç.Ô¨©ròµbÄYàvVV999:kÏúõëBPZZÊ©S§øæ›ot–•Ö­[óøãëÊ3f #FŒ`ß¾}ª"¶Ùxë­·øä“O8vì˜FŒ½ýöÛŒ3Æ­F/--%55U³ÍŒòùùù,Y²Dc¹êÙ³'›7o&<<Ü.Þ}÷]RRRØ»w¯}¿;wRUUeïO«ÕÊüùó5¸ÀÀ@6nܨ Ê_´hiii¬]»V#ž.]ºÔ¨¥.!!Af2™4h¼ã$‰D"@ûöí5CíÏå–SmµàÓºM¸ªZµâÊ»-( ¸¤'`¬øžÎ7Wç,8 …çÀK€Å…¸„-Ó´Â)$$ÄéBG7×úõëY¿~}£ßÏh4ò§?ýÉi*æÎË´iÓì£ásZF,XÀã?îv~§“'ORQQ¡)ÃñKZZš¦~+V¬°‹«Z|||˜:uªF`={V#°~øá]ú¼yót#Eáá‡Ö¬ÂÂB—)-]°7Ýt“˸4‰D"‘HÜá§ÿæR`…‡‡k‚ÇOçCAFaaAàíQ#¬j–úâŠNàk€àBÈÚ³£:MNç Pò ”§AU–ÜîD\‰²Ëž$^еwëÖM·gsŒ ^xᢣ£Ü'22’¡C‡êC-O<ñsçÎmRòLÇX1___·ÒüóŸÿÔ¬GDDpÏ=÷8Ý×q´^YY™Æ¢ô¯ýKc aæÌ™NËrRf³¹Ñ˜­ÒÒR’““5Ûdw‰¤åeg—ÖCaœ^a)QGrûtÀÛP:Üâßø¨dQô#âü? ð€š{Ы=G¢tŸƒâØðqû—6Àåõ÷ÛV žíÀ0J‡Ô2µÜu·—Uy qpTÖ›m¤û‹z¼äò؆ârš<}½Ú±Ñ:Uç!έ‚œmjÙ&?†Ò9 ¥Ý-@îjQvr¿CTã««²ÀZ ¦Và· „=ŠÒ¦ysì6tþ¦ô«-î^(®78.ìQ ý–ëM]gÿZ·Á/Ã×Óß¹XlڴɾžQñqñ„=ñxZê„•£¸²j:ÖÁ]ÀÔ¾&G *Áë^8›Ðˆ¸<{q>1…£Z Ð]xMX>>> 8—_~™É“'7úà÷ññaîܹš)`j¹ûî»Y½zu£éœá8Ú1((ˆ.]º4zLaa¡N˜M™2§û;Î èááao³ªª*öï߯ù|ܸq´mÛÖiYŽbÊh4êbóê“™™©‹‡“ñWI +[5âôpáCj²:×ûÐ e§ ìââ'(qöDêÿ9ÜèpñDþ¾Ť\$,¥ˆãÏCÎ'?8Y³‘³‚ÆÀÀ÷PL~W¥îu""‘ð`³ÄU‹õÇuhG—u*=‰Hx@Hf+.€ÜíˆÜíˆîÑצmö9ŸÎK‰š#³ô$"ýsè5¥Û3×å~Rº>Hªwî̈^¯ xÔ= …°B†v>f¥Ó£-cÁêß¿?&“Éní° X¿ëã§VâÕ¥mË™¸ªuÿUg‚gu:k|¡ãpö À¹À¦‘|µõßUkîƒÖ,gSäôéÓÇžË`0àííM»víèÝ»7 8°Á £q–¢mÛ¶¬^½ºI‰<²` 8ÐåT8çϟץ–p–ã«–¬¬,]}kÏQ\\¬ Яµ05ô¶”­Y÷öö¦uëÖ ž;99Y“ãKÆ_I$-ôÐJú=äl¾òrEA}ÊSçßG©'T„°!gBÁ]ž· qt þBû;ÝBuWõX1âÐCP~¦ž¸Š¾¦âêzµc£õ±–#ŽDiÅ•#gߺ‘®hÄé×!`(JÀ­×þô!÷‚WG¨ªô¶ HÿŸ­Û'÷;u@ž]„´‚Ð)-#°FŽI»ví4ÙoSÌ$îÙÍ­<Ј¸Ê®WYêºO/¶šù kæ,ôê]žƒóUß`4f’n¤§”ðÙí…âçç§›è933S'(žyæžþù+nÿmÛ¶9¾¦¨¨ˆЫW¯&•———ÇÅ‹uâÆãGå9s•Ö Ng)+j-måååºU–3‹[@@íÛ·opÇüWÁÁÁº81‰DÒÄGQÖ¿õ¥ý$”.O‚ßMª›­ò@8¼që_Ý=Qú.†ÐÉ`-Cœxrë¹eáÓbø]pGŒCnSRU¶qUó×Z¡N¥c«„ú9”„€€ÛT¿lÖZ@Óxvý{ïþO+DL&O=õ”®~Ž7›L¦+X.\`Ú´idfÖ™}||4BçØ±cÄÆÆ6˜%½!ÑV?¦ÉÓÓ“]ùÕÆPÕÏ?UXXèt$߯5£ M&'N´›™kc¨ê‹,G‹V-{öì!>^{ñOž<¹A“µÅb!!!A'Š]¹@%‰ Š^$»ý¾ùeuppqx9̳êhá(IÒ>Èã§"\Ö÷ÈÕ©{A½DÇáÏaè9÷úõɵnGW”jS2A¿Oû{áÔü«ÿB`)Œ/yß«®Üê|õùïÔ‚{ݺPñ@t|Ò?­«ûù „NFd|&^Ð/¥MDËÚþÆŽ«,V 6ç²õÓ‰ë "]µªÊtò7GMê(®ì߯í`¼‹ÃûrùÚk, 0€{ï½Ww¸£«gÏžW” ¬¬Œ¨¨(Ž?®Bï¼ó#FŒ¨»wl6V¯^­É%å ǺvéÒ…ÀÀ@—ǵoß^—“lÇŽºý222X²d‰f[ß¾}¹ýöÛíë¾¾¾º ÷ß}÷.yhII ,ÐXéüýý™>}zƒõLKK£¤¤D³­{÷îòá(‘\)KºwXóËr<Öàb ŽårÓÏQuꮩWÙõí“kÝŽ®°jç·ÅÓ‰§Á£Ý•‹'[㳈ˆò4ľ»)‹TA\™Ñ°¸r&D¯µÈêò¤ƒ¨=Œ(Œkvp{“–ŸŸ .ÔY- +áéµgùö£w°$¬’4½åªºÆE(,ÎÅ•ý¨FTÜDÂE<öv©Eè¬R‹-¢U+­ï³²²’'Nè,&Í¥²²’ßýîwìÚµ«®‘ .\ÈÌ™3™3gŽf]\\[¶lqïÚ·ZIJÒ¾ÁôêÕË-1Ø·o_]ê…eË–ÙˆVWW“ÀäÉ“5“XFþüç?kÚ-00Pç–\»v-ëÖ­£¬¬ ‹ÅBjj*?ü0{öìÑ´ÃK/½DhhhƒõÌÎÎÖ¹2cbbضmIII?~ܾœ9sÆeFx‰DRû#è0•VýÑsM} (F‡uAÔ&ÿfœÅvUêŽG½Ò‹a;õçë÷`¾Öíè £Ã³¤º@¿9¿ÉçÂê`qÊl\`¥¼V8þ@iÕ‚Æj¿Ã±ÙªqÈÞ¶î·Û»ÛÝÇÏoû[>ùäÍöK%6f~~‘ÅEëyà¾!ø÷ ïË`®7ŠÐœBݵ§¨Ö«Ë9TœNdË·{˜óÏ ÒŠôÝÇ{Ì©õ*;;[à>dÈæ©r!xã7øòK­j}ä‘G˜;w.ƒñãÇawKÚl6V¬XÁäÉ“]ºÁ***HIIÑl‹ˆˆp+?”——3fÌàÕW_µoËÉÉaâĉôéÓƒÁ@JJŠfô^m»Mš4I{̘1ƒmÛ¶ÙG‡VUUŲeËðññ!55•‚íÍ9zôhž{î¹FD‚‚‚0 ‘uðàAƯÛwÔ¨QìÙ³§Ù¹^$’_mn†‚º‘öw'9{® ~ý5ÁÙÊÈïQZ÷¹.uWH¸¬5Ö« ÿÀ¦0ôn¡%„¸z¿IWÚŽ.Ëï«æã²?$¶@g‡YJrÜ0|´V¥Št5P½–ÌM_°WÛg7-WÝ•mQƒ: twßkzû¸êW¥ËÓˆ¼ ¿4!¸½I,¨ËÞ¯_?Ýg9ÅÕ<½î£^ø7¾ÚEÙñ\(2@ET‚bT³¸+ŠºØlPQÙg¨JØÎÑØÏy|ÁF¢¾È"­Hoz¼ùæ›yóÍ7æ^:þ<ùùù+‹;£òœ5þ‡~È’%K4±f‘‘‘¼ûî»öq___æÌ™£96>>žo¾ùÆå9G*ŠÒ$18{ölÝt<9r„C‡iÄ•¢(LŸ>Õ«W;Í•5yòd{ì1Íg6›9vìÔ‰«#FãrBêÞ½{»ÝþC† ‘ÉG%w…EØÃÚ ŸcKú=âò!„µa3#*Ò™›°Åÿ¦eÏÝA›P‰BälF˜ ÕÔÖrDY*"g3¶S‹°ýoôU«»â3Ê 5 ÔK³sþl)‹›it°úälvé»^íè²ü­Bœ^ŒÈÜ„°”©KæFÄi7ÚÉ·«C9ATåªed¬C¸Jõ lú66ú€­RMÌš8ãêß0MìW¥Ýhhݰèkª{°I,P]KÿùϸãŽ;ty”Žçع$‘ÉÓÛ¯ ã"‚ j?ŒÖm<0$îƒQ]IÅåBò3³9“YÉ;αéXÃþ×ððp¾úê«G­=zTãf t:í+¶oßÎK/½¤±¼ôîÝ›?þX'*&MšDïÞ½íÖ(‹ÅªU«?~|£IG“’’4å{{{Ó§ûo/~~~¬[·ŽÙ³g³qãÆÝkþþþüñ$::ºÁ<]ƒwÞyþö·¿58ÒÓÓ“Y³f±páB‚‚‚\ßàŠÂ§Ÿ~Êìٳٹsg£.@™K"iÂÃ3ô׈ìi-Y_#²¾¾ú'ïp?¤¯«½W‘†H|òºÕ] ï!ŸÂîB;ÿwlŠC¯WšnUªgõGÕTµ¿\-:%˶£KÂR¹Ö¦j°–ª®®¦<^0_›üÔ]ÚWSLÔ¶iÒuH$ÚŒ~Uº<…Hž£/«MÓ‚Ûíå‰fÁœ>}š‰'ê&Mv$À¯º(òðP¬(Ø0Û äH^¥‰“g/4zü Aƒøúë¯L{÷îÕŽðÀ4˜áÜ6›˜˜Õ&22²Áœ¯¾úJ7·‚+V0oÞ<ÙC‰D"‘H¤Àj*#GŽdÓ¦M:w¡ÕjåÍ7ßdáÂ…š©k$‰D"‘Hnt®«‹°>qqqL˜0ÂÂBÝg‹/fÞ¼yÍN!‘H$‰Dò‹X‰D"‘H$? ² $‰D"‘H¤À’H$‰D"¹¡ùÿÔV#ù*¢-ÃIEND®B`‚qpxtool-0.7.1_002/gui/images/pdf.png0000644000175000001440000001006411345702157016374 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÚ %7tq…´IDATxÚÍ›{p\õuÇ?¿{ï>µÒêiÉ»²žF–„mlcüL1ñÄ%e(0‰éc i=%m …™NÚ¸–AxH:-˜„™2CRˆM±]:ÔØ$@eð‹G, Ž‘ü,Y²dÉÚÕ>ïÞ_ÿ؇wW»ÒÊ^yrgîìÝß=÷q¾¿sÎïœïïwSo `,€)ö_!ÿ›ŒíB@Ðcm3²‰•/:{öì@Ê«2v åÕ_)£­Ò0®þ7Œh›”Hi`ÑöHÄ@×ÄÂ!ôp˜`0„®ëRJ9èñx~þÜsϽØÙÙyÆ@¹á¨€p?îxLω]—@Ú`$’~¬ë:¡Pˆ`0H(" ±Ûí'·mÛö'Û¶m;øg%€L@„ˆî@â8Û®(JŠ|òÿø±¢((Š‚¦i˜L&, &“ “É„¢(ŒÍÛ°aÃÏV¬XQØbrCˆËXRP©†“ ”¸‚Š¢L ‚ªªhš–BÓ4TUÅ0 À‚§Ÿ~zÇÊ•+ç̹ äÚãÉJ¦Ÿƒ¼ÇÏ«ªšè}³ÙŒ¦i(ŠÂÈÈ6›­õ©§žÚ¹jÕªjÀšOòÍ“Í=›EL`„¸%!Râñxp¹\­mmm»V­ZU“O”é(—ëžÉܳYHºE¤»€Çã¡´´·ÛÝÚÖÖ¶såÊ•yAÍ ;Pþä“O>< ÒcÃd±"y3õŸ£ü_à>õÜ_|ŒÇ€Ñ‚b–.]Š¢(˜L¦Š%K–|½««ë—½½½ã±Aþ^¸@& 2õxz{¼÷Ÿÿšº·^aV‘ƒâ%+˜uïC¬9ó9#}½ØívœNg¶lÙ’K˜H·‚d¥“cD2¦Á ÌÚþŠÕŠþá»DÞÙŽüpVi>ñ†aÌÊtܵÅL2®¼ªª(ŠBá/ßD\Ä8´nÍŽ<õÆá}Ð}‚p(„ßïG‘„ë ŒÓ@™¹Ó“•N·˱O ¿QG)èaðû "¢¨)ï‘B[[Û5ƒ M³K'äÎ)†!%RL Iñá,nRJEÁ0 EAZÿ¹„|‰w„ø“$¯¥€ýû÷£( v»›ÍFAA ÚÛÛ8pà@ïtÒf-¯.HÄ0H*’Aˆ×ñlO( "L Y:6œ¸Î«Ysäȼ^/@€H$’2Íf3n·›ÚÚÚÖM›6íܺuëƒìÉ„iÕ'·G¤›‡”0‰%HEAÄ+I\ÖWXNaa!N§UU±Z­†‘pMÓðz½œ>}‡Ãqóã?þ_>ŸïþÎÎÎþFÞâj™Ò›È©q‰YGüšø=ãn`”U¡ õƒˆ9qÌ•º*j©¬¬Äétb±X‡Ã)$©¦iŒ/ؼyó‹ëׯ$fÁÉzM»žq> "QXK)s´¦T9£¦†úÓIßÜ…¸Ýn, ¡P(QJÇŸŸ\Z'”Ò´;}ôÑ%/¿üò©É[ ˜JÁéÈÅ]@JIdN#|þQŠÌpqJu=³]. ëúDà ƒH$‚®ëD""‘†aˆÅ‹¯~øò @¦`˜IÙ\bFJ`¬WY§3sZ¨ªª¢¬´]×½ü\)%º®'öp8L8&”ä2,^³ äÒëé1c2Œ¦HdÊð×Ó-Ô¸\X­Ö LRòg•Âá0¡P(^Di12G\(×@5\Í6õ&fÂr™I/„\Aù±_í¦t° )áwUØ–­döìÙ 9çÝ÷'†D·Ù`xÇöD.B&Ú}F˜ Ùì¹ÀÄëdDÇÿÒ³8Ì ƒã:—nÿC\.ÅÅÅ 9÷úïЫ[£Ã¡E¡xÿúz{&¼GºÒÉrÆ,`¢ˆ­"ùw¼NÉФ„.‡ ëíkq»Ý)rf§qÏŸâ‹åu‘1.ü÷ŽI§àÒi÷65&9׆ßGø?þ»I¡ß«sñ70§¶–ÒÒÒ ×7<ú7t_‰PfW1¿³ƒááá„[¥0éCe^ˆWcbŠU5SõþØÏ_¦Ô7D("9Õ°˜ÂÛ–SWW7aâÀV=‡Èš» ê! ~ä<½ïíM¸U:S5ã1 ݧs‰ ÉÔxdhùú‹˜UÁ…€Ê轨¯¯§°°0kU󽿣çJ” ®(ÐP_û)'£…eZš“W ¸¦à˜t~ü…vŠ ¾A÷Êu”Ïk¡ººzÒ{-ZBä÷ŽH —ºéÙµmX™²Ä¼OMÅø¦Dú4ý‹O1ÿjŠ*¸`)Æwç}´44`±X2ÊËp˜P_/Á =4ßÌÀ¾·©vjÛT.¿ú£çNbÖME+«@Û‚zS+†«nZ1@» H¿ù”La ÿø±ioÐà̽ëq×ÕSYY @øb¾/;?v”`_/¯UQ°•—b¯¬¢Ü¢@KôuGƒ£CzQk¡l!†ú‘Ç£ Þðè MŽæ&g¢¾"o¾‚ùt'‚¾ê›pX­ÌÚ»ƒÑ=o ǽ¨vöº:ŠçÖqZ öœ#48@èÔ—Œ=„_PT …ƒZË”ÿ¯?Àsü+Ì……”X4ÔJ7¢¦Só-èÿÞÆÅµ~㘠Ù}ñòV„ÉB¨ºÚ²Jü—Ð"ÃC/^Äwé=!.ÛŠðVÌ&蚃\t;¢Êjµa2™°Z­¨}ç{öqœš¤À$ÐC>~÷Ð9Q\ŽkÏëÔï~ŠŠQ":G?9RÌÔ A¯-LÇ=ÈÏ>F=#CÏ(( TÌF#<ÐËfg°¢†Ñ 7›W™Ó€ZR†Ãá ª¸˜¢¢"l66› ‹Å’DÈ.ÇñüÑ?`VE~ ~²ñÃCYþ5äÁw>/çšnEuŠ·€„Ÿ{‘ÿ÷6òÈ~DÀ‡¨kB:‘ýç1Ž} ¾qÎÔUзxÞÆ›ÑÊ*(..¦:F{[­Vì6;šI›2ö8ÖÿÞî“(o¾‚ Ž]ú.Br‚g)_­Û@µ×?žËTöu ?ÿã݈€eÁRh^Häè!.ý9t‘ÊÞÓœkZÂéoŸæ–JJJ°`ÊBZf¦ÏI¡¾ ð,Cå³(xõ_Ñ|~$ Hƒþ¹ó9z×ø[æc ÍØ0hÞ‡ñÎv”²JÔ–ED~@ß޷詘ÃåEëp†|ÜúJ{t†§ÜÅñ{þŠ–y󨯯Ÿ¶ÂÙÚËÿò z×ÞÃлÿC`ì ž 7Ìi ©¦†ºº:Ž92´ø‰£¯¾€(«Dih!|¸ƒ®ã_qæ¶uXîœKUUu!¥?ø3D(€×YÆáoÿ=µ-­•O‰+òêòû©iøè„Ju}#®¿~ǃaX­V¬VkÎÓô9 rûO1¾8ŒÒ´ÀáNŸ;ÏùÕߢ¨¦ùµÑE –¡‹D{9r “¿óîE·ÒÜÜœBSg|9A´ÎH"{â]¬Ÿ^w:î+9¥Âûæ9î7}q4ï½Í«îcì¡¿eñ××±jÕ*êjë°|ù úÃß@žïÂç(ᣧrñ2Z[[±X,!xæ™gówååålܸ‘P(Ìf3f³›ÝFCC7n¤§§'‘æÆ{7¾oݺ!2Óì"Ÿ|Í®˜—¸*–}½ÈÃûèm]Fýª5,[¶Œêêj4Ï(zû÷Ñ¿w/ŒsÉÕȇü3³VüóçÏO˜d|kkkC×uŽ?ÎÉ“'yã7õR8f||œŽŽÊËËY»v-^¯÷ê„i(”ø°bóæÍÙËpEÉŸ èÄèe £Ñy»[öþ'FïoQ›æèCÙåö®…«9}÷wiln¦©©)1­É$«ªªX¾|9) ¨ªJ}}=Ï?ÿ<ìÞ½› 6L(ÓcFÞ84n„öŒ|ç,Ç&SLQåØ'Ç>IÈŒV¸9¶æô%«Y8oµµµY?ªØ¿?ííí ²}ûv:::²*vÛm·ÑÝÝh7›Í)Ö®tòõy ‚ž ¼ßý¿G6ïzëñϰzG [쌕Uq±y)zó"\.uõõ8‹Šrzpcc#`Þ¼y™G$£££Ì;7Ñ_!–Mé\(ükgϽ mÓàòåËl6-EE”””àp8râÖ¬YÖ-[¦”ë»ÐÇ®]»Ø»woN3Õنͼ&Bªªâr¹p¹\×U!f“koo'‰ÐÓÓÃîÝ»yì±ÇX´hQÎÜD®+Ôf´œìeï¸ãެ2mmm ?_½z5›7oNIžÚÚÚrîùé0B"€Jf¿ß¿?ÎÞ\÷––õM—‚Ëv.¹ýý÷ßÿÅ]wݵˆ¯6®52€àt¹¶\‰Õ뙄™ÌÌf³Nt•¨œ¬*ÌùËQ >öë`>`$o¶EÎgcÇÁkÉ7$öka¿5Ê:Ñå±#€—)–ÌçbÏ7êëñ|üõy0ˆ¼â ˆiÈÿ>!§ò€ÿŽmÖ53GþHIEND®B`‚qpxtool-0.7.1_002/gui/images/info.png0000644000175000001440000000403611144776001016554 0ustar shultzusers‰PNG  IHDR szzôsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÙ %5z$šžIDATXÃÅ—]lGÇ3»÷Ã÷Ú÷ºŽãĶLRÇŽÚ$ ´@›~¥¥P©åU $¤>}ÁHU% <€O µ¢­‰ è‡-Ici›¤Iêľ±]]_ßÝ™3ÃÃî½^[•ú+í®43çþçÎÌÀÿùQïs¬>ð™þêè‘©òÀîƒ*(TÞ^œ—@ûUíç7O^Z™}>Üÿ€ªŽÞZ½ñÁû‡öNAù»GFv Uª´†(ŠØØh2?·äç®ÖjʵþX꿬ùÅËQkÙþƒP„…`êöoÝ»kôðw÷]¿ÿ¦éƒ{809B˜Ó ;f·;†Ó¯¾Éó=%o_»ò§’ª}ó­“?9 Èû Çn-ï»éáG‡Ç¦¹í¶ÃÁÄÄ0:€ 5­@édïÁ;"àœ:õ¿湦2ó߸vúG?7¦iÞ‰àœì?^™8úÅ_MLzè¾ûŽéjµ¥!Р{æôàÚD6¥ >2²{˜=œ?waå|õ@ØYyIlìÞ €ê«ŒöMûÚÏö~èÆßu+A ÑçJ%vÇ´åæý!Ó£!q{•¥f¹„‚<‡Rç/.ß–Æ6ëµÿØ™Žòýô÷¾”&¾þ‰{îVZ«„îŒc¥ t86hRŠáj™ k¨ „8piœï5¦¦Õëçç÷•+k,¹’­q®ÜùðdËV¾}ìØíʹ$¯Ýh$³h³íi´¢ÞÄÕõ:Öå’1™q]Ë…Eîùä…\åÐJ•±jÖo–âùÑ¡=˜@+ÒjKl*£zãÊÜ[gvnç^Ý ,Ol£¿ FÄB_©Ìz#‰£öl}qf¦›Š.=>}ç¸/ßôøÇn¹½!Z+”J(Vj{¹x1.-¨m^GXí9ÝiVÀŠÇZK_±ÄÜÜ•½ës/þÚ{eSŽMÝû©Á=ƒZiœ"‚ˆO±ÉB"ž\ „ZÈŽþržjžÁ²‰›ŽµIÔVÀZŸ®%TªU‡'V†o<Ø >ìŠÏP¹kdp+6¡Þj”²(öp¾Ãç(r(TüøÉk˜`ÿV l¹X‡µÁZËÞñÉ`»ÖÏü °aÚŒ ÈßP©V´ÖXm{ôC^£œãÜÅÅä¾1ªåb/-N4Ö§yw ÖcÅaÅöp"”Êý”«£‡€ÐI(UðžÝù\±]Çi„*é_Þˆëã™—'ÐÊòÈÄö¦&Na¤+Â-Ú­µH×DÐ:¤ÐWI¨0ié*tžœs ]¨-z=à½Ç9Gè H;žÝ@ÀX‡sqÒÓ‘A¬ÅJbàÑʶiÀ{ÞÄÆ‚0ØŠ>•¼w†ˆ´h´r8¿}qâ‰Á9—˜âR1[IRaç\'îîC©½CZ‹íVk2æ2òÇ¥ è @kV‚÷ùÌqãœÏp™ŠD,qÔ!j®,t7¦0ý°ÍÚ…N§u[©\θöø.:@;A«.ù°˜Øà¼Ûba'çhm®ÑXyó<`»}ÀñZmæï­ÆrB—5k±Æ`LLl ÆLœ¼cã½ÛÖ˜Ä ÆÄc°3ÖbS ˆµ¼]{-Z]xí`ße j¯ž=¹¾øÆâÐðÄž|±.ìçDýI \fcõ€8GlÌcÎãœdØêõ5Vk3§£v}.Ð넱Øhy­öòSõõ¥”‹5kMúDÇ1QlÝ*ÄZâ8NX²fk^j"Ž·ÎŸôõÚ‰ßÝd7#mί–¯¿¯80>aOx÷ÏY¾ú¹1Žß\eh0G®&Î=Œç¹åH…kKk,¯'Q‹H…kµY®žýí+ks'~ \âl+v@ÓÆ­Ù…sO?^ªŽ?Ž CŸÃi×¥…б{”Ë!ÎÃúf§wÊÙSÄ{(äk]Ú;<Þ;šÍM^?ùt½³ðÒãÞûE 71[Ìè¦öºÿ+{nøìCƒÃ“*ÃÞÖœ `¤ÚÄù”xŸ®âÓj:¶ŸV\Hþ½§ÝnrêÅ'b³ôìc•KO³@» ›ŸîÑfcùâÕbh *?|Dçû•Ò:-5h´ólv 4£"›QV\¤iʼnEVã\ÂÀêÊÿ<ñDG–Ÿûacåâ3À ™=œî<’¹Tµ¥ —”YX×a鈣TóÅ^ex—4'ßU¸ß2ï=&ޏðÆ)fÏvÞð= Ï£¯0ì5¾¾#»ëí÷Ø~°ã9 «&ˆ~f€±¼†VÍ/ùùmßúç ·¬–aj.žïâŒxm—,.*ça*—cíÎÛ¯¾ÔñæÞ;Ž´õ¨”rÆs÷™]ÿjŵ¯i¸óî…W/6¥ã ³dRjÄ%\(àS`À-JH˜Ì||ͬª[sÕ”èÁÆÅå‘¿ !†þ§Œ»¾nZù‚ûnZøÂ­wÝ_^cšº'mÀ!7äÌ8\‡¬pHÛxv8˜ŽƒtH¦Gàh3‰3'økÅôì1GëüÃÑŽë'À¸ë»¿1wÓmkVÿè–o/  Y”1L!“Ç9Ÿ$r¶1ÜÏ97ÏÙžkå•3‹ÒñDõ{Uó«[l~+Vò½ûÄžmÅÚñ·Jñ&ˆNÈ{SÍTçô™yîõÐËMg) àû¾°m{Êé––”nY¡iÓ¥¦¡é:š!ÚèË­|¥†aàU_KVÕO_²2å=¾.L%/‡È Ž-NäÎŒ°³u#0$•R¶M£ò à —ËEû»»§”–•µ…Ãå¾ï—hš6 0æ^ƒR¦y®§»»Äùð}K¦/D5_]òs×L- Öè¹GyäOûZß’@J)åM<B†ëbš¦èëí­I§Ó™™3gžÓ•ï Æz ¥Rʼòý¡žÞÞJ¥¤­¤î{—„ÝÖuš—ÎÈ¥L£åÖ'[–séú•R¹‰Çþ"€!%ža‡ÁÎçÃáiS§ÆãqÍWªT)E0L¥Ói-eY MÓR¢ÙY_÷ÕŰŸž–ðzªdþµý·[^jÝóq×—!„aš¸žG  ã8º®cYV,ŸÏ{U³fY¡PHOYVĶmMJ‰¯JJdÁV(p”àßµÕù‘€ì|àÙ¶û­¯çJ®/Èd2Ïó”aÂ3M¢Ñ(–e¡K‰”¥”nYV©ÂBhº®£Æ”ÂËf÷BqÿP‘iŸI‡¶n}µeÇX¡YWr=qè'Nœ8nÛvuYYÙ´X,f躎b´ß’cÁPˆââbá{žPcµà¹.ÿÚõ7Ùâù}[ßé¹ãµæÞ}@·R*ýØcMúÖë@Á¶íÌáÇßljjj ƒKâñx8ê…B)%º”ƒA‡…ïRŠd2éïzþù®÷:Ïÿñ™7šIç½®±;“ ‹ ‰"”±uëÖýxéÒ¥÷Ì™3'))†iR\\ì•––êŽmc;{÷î:xð`ãÎ;3<<|žIr=)À„Â@y"‘˜uï½÷n™={öܺººH$ñ¢Ñ¨>00 ¶oßÞ½ÿþ'8ð2U¸ûYÅ/˜¢3úØ•¯^½zÅâÅ‹½jÕªŠL&ãïÛ·ïä¶mÛJ¥R]@?SŸ·µ†Oÿ`0óæÍ/nذá÷À×r@~ŸšI›Ò i)aôžKa×÷ÿ¿ÿÿ#;iÝÆÚ)‘IEND®B`‚qpxtool-0.7.1_002/gui/images/refresh-media.png0000644000175000001440000002132511345714351020337 0ustar shultzusers‰PNG  IHDR@@ªiqÞsRGB®ÎébKGDöòÁdK pHYs  šœtIMEÚ )yjÁf IDATxÚå›w”dW}ç¿7¼T¹ªsMžÑŒ&I£ŒŒ„FH6`,ƒ‰ÎÆ‹ƒ…M‡=¶Á8ì……E6Œeâ !1#4MPš‘&çΡr½pÃoÿ¨ª¦5 HÂçì®·NßSÝÕ¯_ßßçþò½øÿüÅþOþóOÜ55H‰YEŒ$˜©“UuÕ¤";7ÙøÀ[¯‹ÿ“˜½Ö¾Œˆpq€ÒŒa–˜™†ŠŽéúì‰Ù»oŸûÔ>cþ³Øk/ c›†‹hÎ-1jüsÀyßöÓóS?Š@¶nˆ)ËHYKÜZâÌ0pE†ÇÄXè&—:V[N>Êx7 ”–\qÞKoúê§VûÅ?xã ³ÿ¡Þ÷»¿#2ë^œñò…AÍüåäøë¹æ _&©5L¡ÑL„¤ºâGg&ö?/¯Í™™SZGQ¤ÈDÖçO )‰3Æ- 7Æ‚ˆˆÀ,3d­b–Ťmk>Ö¼Ñpz{ÓܳzÃÆ/~Ï'óe[÷ýÒnûâë8×rß¿@‘{Ãýµ²ÎÕ‰¬×bÞj„L5#pRÊ@ZcúÏyÞþä½× ¶.¼úáèykd*“Ф'µt¤Mç/Oõ¤2~†€T+L¸6†ã°–Y€ ˜U‘6á‰X³FÑ¿qIqdåWîÙ÷¡oì½÷~ýGߣ ɹÜWœœIn›mòV¨yØŒ™Žbè(%Š‘RDI‚tJ’›Iˆé$½ܽý}´{;uÕMŸo WÎKGœIg‚c¥Á⺾¡ÂE=…aÃx0_ a´Œ±ÐVMN›¨z–ö–þæÆ?ýäò½éï|ákwØä¿Ççâ—¼ìÍ[pme¶±jæô Wµ*l£j5 q‹ÄDJQ&pPÌ{lìÈøƒQ+þA£±ë—ŠÓ'~›N<~§9öØ¿ÅöÜ1_Ÿ_~¤>×ØÇŒ™Îg½¾ì 0î¶"ň ‰ -‘€!Æšê1zÓ™Ìe+¶\rêÁ;~t¨¡ç^xüÃ~k45Ðû‘G˯;ytŠ`5í/ KèÈc¸?Åîÿ«•ëïŸø[ý4÷g…|Þ¿ú²‹GÖ¬]½"Ížë¸þˆŸJã8^JJŒó–µöÆ¢(:püø±c?üáÇ> «oüûâ‹¶m¼féš‘75-[}r¢a•!‡ó@Ì%0‡“éŒï¯tNÉæÜï¾ó•[î~ÁNð¼-¥ªÉö7ÆÊ:æ§æ( - ³ HO2k-Ù:çüI&ÐW*ˆ¥CýéÍk×\|áæó^Õ38x ÷ƒ'È”/Âõ ¥é¸Ò”Œqm­¿ì²KÏÜpà »~ø‘;vî¼ÿÁ4·ûÝåí߯·Þñ¾ð¢+×½yí9¹×o8–&€j•P³vùÊÁÒûä—~úö÷¾ùÒ]Ï;ø³¿ü˜XsùÛNÛw82ËMKX Æç`œ (–2LhmO™øþ‰õ@÷žž¿®ï-¯~é«nºòÒ¿ÞvÑ–÷.º$•É yA*-]ŸsGBHw€ëºð}©Tšçóùt©TݺaÆ[.¼ðÂk.¼ð"ã8rìÀñ®_­ºÎE?[·nèT©˜ÞÔMOi‚ "NdY2$†ó…ôŠe«¯ß±{ûíÕçà]ü‡Ë§Cï#»öÏ–óuqÌ@mà ŒŒqzÒ\ÕæÌ±ÉoV+<68Úç¾â¦+6½úW¯ºmËÚïZÒۻƗ®`Œƒ¸h!Á…„¤tà8íá¹\×…çy ŸA z{{Ϻú¼óÎ[¿té²#333s÷ÞõYuçíŸ9øúßüýdzws­¥†ÂP,Ybd‰5ZŠüT°lx0à Üw`ÿ½ú9øòv÷¿çc»VÏŸ<3/m£ÁI)\0¬^ÙÇ„¼ÕJh` ÏÂJMŸ>6ñµ%ç–ÇåM/~ãU7lùÌòåC—§\?Ä I€ƒ¸\À„쨽éºm¾ÏkCR.@RÂ÷ý ··wý²eË^ºråÊfE‡:”|ó|êÌÛ~ï}ûsÙà‚Ùùh(J4@àÖ·†X£¥D±”:Ïñ Gz÷—ž6Gàgí|åÉ™äê3g*°­gZcçk× ò4Ólùp6YrN —‘µFȆ¼úU×¾óümç¼°¤´ÌøÚŒÇ‡A‡1HÎ!8çBt‡€”ra!gìç>šsŽeW_}õÇßò–·¾ãÆoÌK)Ù+/ܳfiáýç®,žæŒ„Õ–Ym`AÔŠÍÄL”ííÿ½×¼ýkË~¡|ó'OŒÔmê#?Û7;Z›­:CbÆ@-±žç?þö®YÆ·]|źJ&¬;}èd¼ê"î_tÝoK‚<—íKpHâ`¬mVH0ဠB:pÎYª/¥çü©!‹1xž \6<<ìÎÍÍí:räHòß?ý±ÓôÁ?o6›úÅ3³-—@Œ,¬eÍfBÅRfØh‡ ŒГ´€3€sÞÕ†Î{÷³Å+ÿtÒétfëÖ­¿}Ë-¯݆ Sت‘ìëW•î( @ @2Ö˜1tïÏ_|ñx6™L&{ÕUWþé;Þñöm¹\N,˲hÉPöïV//ä Âj Ò²s³Mm„·äœ•÷[ùÓ`^úª±Ùhc¹ÜbÜhbœ£Ô“a)Aüñ‡ŽÏ2ÎþjÿC1 €¯ÛpùÐú ½«˜,RâÄY¨fªUDç‘P ‰ã 8tÀ—A ‡³¶Ý@dAÖÂ=ïöc ¥Riô’K.ùã—¿üåCøÅ£ÞÁåKr_È£ Œíh‚R˜mº˜½y땯;÷)¾úo÷IEbÛ©ÉfÊ$‰b‚IŽeËJüÈ#Ǩ^ ¿Ê§ïë8$ÿü .yÃÒ%CWøÐB"!8Z­IØr1ÌÌ×ê§Æç§fk™DéHH‰t:ãô­Zµr`tt4;33c ²Ùì3jÁk- …ÂÚË.»ìeßøÆ70Æâí‡kw fßzúdeÈZkA²„z-2nÊß”+å6ؾÀ0±f¶°†s") bÎc·O¶ˆèû»wüIïííÉŽŒ ÜœMÉ€ñ`Ä , Ó0, cR@äÀ°,æÊØ„ÀcŠ~ôÐñ㇧öKÇ«A ¤ãY!8‹¢˜:tÈ9tè`~ýúõç]pÁËxÆ 0Æ@DO^k ­5¤”þÀÀÀMCCCÿX­V“žàà@_úá pFêÕÐ2Èa3¦|&(ùé`ë€{öOå뉽 ÞL8#b\p"©”Ët‰™©ÊI7ðötó†þþþ•#ÃC›„# c` à1ÃT[#l ­JŒV+†…£ì9ðPmº¼¿§§/B8RJã8ŽåœƒˆYÆØôO;öX±XL„T(æÓétìyžqÇ8Žc\×5AÄù|aŽˆËåÔ‰Ç/‡aˆF£­5”R #IÄq¼FkõRJ‰r>ï×cÌ‹ö0Hbm¹túß[ÒÀÙ`­*`œs0@¤‡G­¸©µyô_>}3@ooo¡pp…ã¸\@HñóL®S/pÖŽç¶Vƒï&ÆŽ.•гœ‹T*Ìû¾o„ X)Uµ–Œç¹yÇqRŒ1APN’¤?“ÉÌîÛ·ïPOOOïüüüBjl­]°¥Ô“Àäóù}}ý…‰‰ñro1uÒqÄI0ŒXkŒ&D ä`ìH.dIiò8˜àíž„`PÚ6¹àå®ó) éT*•“Ž!„킆 pÎ x;n[K`‚Ú$‰Ïä ¦”JÒét"¥´œsšýÙ=÷ÜshllÌ\}õÕK6oÞ²MJéyž—„aA ÊåòXµZÕFk8çOñ‹A!²¹\.=11ŽÞ~·éz²ê8‰µ€!X"èÄÂgYLpÏ$9ˆ¼-³ÖÖ¤#k‹¤<ÏóÇ…?Ñ…ÀÁ µ†ëú¨TkQ*®tœ^KJ‡¤°ñÛo¿}ïáÇ#˜žžn o@œ³@FQ™››c2ÝlBH ²¦£Öèc ˆÈÏf3ihÆ€#¹‘‚Á ²í„ÈhG0.¤Èµ€qK`mØÉÇy€Ö6䂇]ŽãH)¥èVlN@·Œå_i×÷á¸.ù¾oÚ…Ž ö5œ³Ðu½€î¨5³Ö†DÔ wÔN¹‰£˜T#Ž#Hã´5 ›Ó¡Û…Ö¢[ᶪš8ƒá‚‘µm'Ûö–VºúWÿ^p€¬ œsÆ…h'¶—ã:‰16é¨Õj ç<évn|ßGH¥R #H¥NgN§Q(]!¤ãyž²Ö8Bp‚“”Îð»ßý®ÞmÛ¶1xÍk~=ÓÓÓ»’ˆÈKŒ1Ÿˆb­•˹IA%1â(DGHâ*‰‘¨J%‹c“$IÁZª ÈËd2×ßrË-‡o¼ñF-„\Î+j­˜ÖŠK)Ó­VkÖ.u¥tÈÑÐFÃv²:cKvÁ'XkGQ\¯×c¨ŽïcfJĉ%êšµ«ÃNÄGBrPÅ‘<‚KK°íÔ“¸ éÈ   `rr²V­VÇ»MÌnûªíÄ“jùl6 k-[¾|ùú£Gò}?i4êÙB¡P5Æ0"àœ÷g2$IÂ’$áZFD%­uE±Èz×k &­’v"Ô`‰``´Wyzzj|~~¾ ÕŠv›Í8E ¶cÿd- •(f]¿÷[ï2ÒsåcBòy.xšYbD@b ÏÉ鈢(œœœ<ÞµÿÅ­¬®tär9DQ„ÑÑÑ‘©©éJ%‡­µ…z½®ÓéL³½jkM7£Z«€T’¨YÃÜUA~xD‘w2H‘i—Ða °DèªùÄÄøqcL-”F GU¬ÈËÚZ`ÁÀ`e¬µeà=ïãÆãm?`‰Q¾¯NçS…E5H²{÷îÝÖZÓu~]Gxv'§“ñ!ŸÏ§Ö­;÷Îy_s2Õje Õj£(ÌÄqœUJõ(¥†‰(Ýjµ&CôæG–]ƒ ˜"úÐRiDÊE¢”²Pª]ç[¥`u‚¨Õ4ûöíÛ €™Ùz½¡zt¢@Z·ËbcÀƒN’˜qÞÙh¨0ÈYßÐÚ‚±¶'Ö›)å½ ¬pWÀ#<òøÔÔÔx¡PXr¶àÝ‚¥ûs&“AÇèQJÝpôèÑ[K§…\)åQÊZËŒ± j’ÄÆ YÖ·¼÷/ô9é´ƒ0„u ¨ ŽŒ0jï“Z²˜˜˜˜8~üäã]ÄåÆùr-X í‡ÅV“ 1 |ó€;Ÿö='-ç¼Ó©U†ÈÍg¼â`qóòµt;ôÌÌÌôÁƒï3ÆØ§k\.Á9G±XD*•ÂðððȆ^Ó?Ðw­ã8K±ÌÛÒZ7“8©hIOšo;wuïk†úý‘lI¡gY–ÑPŽ@‹eѰE4L -•G¤Óˆ‡Ä8ˆbc?¹£^¯Oзýå?gB%.+ϵ$)ŬÑDÆŒÀ`¡¢xd,”þ`O”2nXnè ¡Š™ïÛü`isÏpÏàñƒ8À„aØØ¹sçÝ—_~ùK²Ùì`Wà³ëöîgRJ”J¥në:Ëœ­===çUËåF³ÙˆU3ÁàÂf _¸–‰´>è¢Åê Á¡mƦ`a%9$!¢žžôõõ¡··}½=èïëEooÅ\sàD/4ðu OÔá8éyÈT Ì‹`@1!¥16UÚ±ãîÛµÖÓÔ_|ú;ÃÍDÞ4vº,Mq«"cÀˆàº­j£*ßý¤žàª’P9_ÜՓ󚌳v^0€VS\ÒýŠ-kÖ£»1 4vìØ±÷»ßýÞ×kµZøL?]ûÊ’cøù〠€C[Àh"‚ ^dàšžlCé2Dª î… Ç ‡áÞ=Û¿~âØþ‡4Ø oôeãSáúêLÙ(ik ¤ç0£b$­è0ãlÏSÚâÙÀ¹¿'ëtÎÁ9ÐéÕ+M&Õ[<§Õ𯟻þÖîNR†á̾ðù¯mß¾ý‡qÛ§ƒÐ Ùš±0Ú@ë6 ³(‹ÓÖBY e¤"$8- 76pm×iÀ *pÓ8©*H”íÁ}wßõàŽ¯Mk5 ¹íîZYWîo;2ëèfCØ$"2d-‚\@ÍùбÖühíe«fŸ`KŸ˜Î§åù´cÐÝœè„8Ë%åGû_{ák®¼`‘„G=ü‰O|â³{öìy8IûlÍËîhWnz¡˜é&D†Ê”±ÐšÀ‚Œnhá&Epœ&¿ æÎÙ3Ç8slßöïUË“‡„¿ý®:¢8øŽÃǪ畧ËÜFMNˆ¬…‚­Zc’qöïßúÜ›éi·Æ²¾ó;œ·OJ!ÚgÚ¬%ãd3KúWŸóGo|ßùÎå@õñÇäÖ[o½íþûwÈtÕ¿+x·Pé60•RЪý½6º]ÎZ m,´mCÐ]-ˆ'ÜÈÂU"UÌáGvîk¼vÕÍ¿÷Æ÷Üú¥UÌòÝôŠ33tËуS\×kŽB¢ät!V¹Êt¬ìxòÀ3nŽ~ñ¯>Rý?øhÄö%‘†à¬íÚ}'å¯òRns•Ð?{ô‰½¶#h|æÌ™êN  ô!Ä“WÜ,´±’$J$JÁt £aYf 8YpkÁ:¹»eÃ,ša˜ìýÉc÷ßçÞ¯¯ØtóùÓùƒ£K6Ýôš7‰ªÎüΞ‡¦FªÓŽ­W%1‘5p}™BŠÊc3óÝúÄc?ö¬çÞúž?;jÚÔˆí"XÖ> vÁ¥Lƒ%ëNÿ·Ï=Ñhïe ©©©ù;wîWJ‡ýý}縮›""Ö~qÿ.Q º£¦ÈZt0² ˆ,¥í™‰™©¿cÇÿü×/ýð³ë7^©GV_yýÞŸÎNOÖFœtþšƒG*¥É“ÓŽ©ÍsµÈZ " 4XDs¾Â£zx»›r¾8=¹Ã<+€¯|ú£­×þ·Æ#e¯‰•-,‹"€ĸÌß;õU7Ÿxì}ù„²$¤Têõzm÷î]ÇNŸ>}JJär¹AƘ³°ò-XlÆh«a­¬È‚Ya-@•j-ܱ뱟|õŽýãôÐa3:ré‹_¹ÄË­ºñØgRÙ9:}bÖ©ÌT¸iV…DFYƒ\OŽä¬<1w˜qöÁ'ûøøs:"óþ[?zfª¦mbì•Æ’l OlŽáô¸™ìÅk/zñüÉÝ÷žjµ@@¤µ®>|øÔ}÷Ý·÷á‡Þ§”¶<­µg­•Æf´†Òm°ÆÀ.˜€…NbjÔÑÄÔôøŽ]ÿäï¿þÏ瞟þó‰S“?³Öލmºô¥áŒüʉCã¾ °q‹lÜbG€V kXPìÍÑìééP'ê¶Ã?ùƒç|Jìâ!fþæÞ±/9ÜY©¹x[§N-‘³†Iy~åùÿµ}qõ½ÿô‘ozôþÀ MI¥R©ïرcâØ»zõêÕ›7oY?44¸¦¿¿U:.Ae Âj ¥bS«VêõZu~jbâðÔäÔ‘}OÜrlâ°µv@¹s_ÀwY£ «5Èh£ž”xHÇAÏ` óã³·š_OÔ™;m=Ós>.ÿÎOßyNϲóÿÒòàÚXZ¤ íΑäœs £™S?<¼ýίì¸ã3ûê±EFð:&’Bd]×ÍrÎÓRÊ4§TkcÖ˜f¢TÝZ[ïhT @Üé.„Ù[þðo^U—~öà®Ûªa1"‚ŸI±|_¯œ;ó@yf÷»¦§t¢µº÷±¿è¸< wÿà_ZCKWï+ .]é.ïì3².Çv’ 7WZ5°fãë/¾Vö—†‡ýÉD‡´í¬Z AD­õœRj:Žãñ8ŽOÇq|*N’SJ©1mÌ$ͨt5©3ñ'­Ú%/û­u3ÓæÆÊÔœC*¬Å"W(fÀYÏ’¾ßoí›<óð\G&Z4žïüÎßÿwÃRÿÐÁÒвµÜ FÉ.ÔŠ·KÆ/ô lX³iÃÅ×¾¶pÞ–k½;¾5µ„îv„«¨uF½óYعFp;ðžòºáõïÛ|âÈ̯Ԧç]R1@mD@ç<#3ÚwÓÃýË×nÎåJ'O=´xQˆ=Ù™Dêàƒw·áZ~î2é§—K bíÖ*ÁÀZM–ˆI·×É•¶¤ûG7¾è•¿µô’k_ŸÚzůaý¦+MïÀRLž<¥†Ÿ‡P¾h°Eïú™Lô‚mo¾ôô±ÙëêÓs%1,„,HùÈöd‘ïËS¡/Ï\‡!¬µúÃ2ëWq²7ŠÆæ:e‘àûô;ö›à\øÒ7Ž^qË{~;Õ3|m”´ÖÒŒ(£„1ÄŒ3Å%O£ÏŒ=£&@tZ26&]Yظ¨šñ÷¿iÅó}Úƒ½õÃßÿÝ}{ÆomLϾÏÈs%IG k,’(¡8Œ¢¸–“°qR%­F7j4÷ß[«í;Ýñ)ªâÏ SçÕùÀî¾ë+Ç+3»î-v´tÎÚ[ËK:ѶSô°¶ƒ b°1%hZÆZíó‘¼W8~šs 3Æš–±ˆv™{|¦ÛÂz:ý ¾‰Y£Ù4³²àó$Œt³ÜhÆ­p.BàîIIDATŽš‡´jˆã™ýI25EcQt¦²È™ª³}ʳ°‹lÐt&êyèîxüÿÝÍð·,ÝxéÛ?µ9N´ÐJkf-ˆ @ÖlÌc[£*ªŒ¡Æ9«1Æ**jÎÚ{{¶Mþ{ð{?xD5Ó÷ª$2F‡Gâhú‘8™˜Ã³q<œeëÉ¢ñ¿èXÖbû”‹À®øµ÷Œ\pÃ-7gzú_IL'‰1F©YÓ„5uXU!kÊÖè92jÖh5ku<£’Ö\}n|òÑÿ:}èÁ»c€ºáÉ< €®BdützU)ŽÇuOë³æŠEÚ«;ïj‘íÛçóÔØâ°aÅR @Ÿzâòþßy°4°æT&;çnà8Òã"EÖÆdMHÖ„V«¦QqCÅz«6ߨLlÌž9”T¦Ï˜E+ö‹4 ]”PBq<ÓT‹æ¦™lÜYñø,áé…>6·„]´Z&‰ëúñÿ:9vèñŸæz–þD:ÎQו ×sÇu!eÄ9kq°&X;ü‘± ­¢ÆüÄñ°9zö½hí%¯fk.Ú&{—¬ô¬MüT6ÏÜ ƒ¸UÓQ³žTgÎ$ßû‡?Öq«ñ\£À3ý_ÂÿK¯õ—ÝÌ®yýŸ²ÿæò¿Ék‡ÂüP[¥IEND®B`‚qpxtool-0.7.1_002/gui/images/fileopen.png0000644000175000001440000000366111142047541017423 0ustar shultzusers‰PNG  IHDR szzôbKGDùC» pHYsHHFÉk> vpAg ‡úœÚIDATXÃÅ—ÛoçÀßÜ/{™Ç{am'4ÔØæ"B‰Q‹Šjñ©RÔ—JUÕ§ö¡ê@¢JQQÚˆ–—ðÐö¡E¸$¢@"ÇA…b0Çß°¾¯½ë½ÎNlã%Á¤|Òhžæü~ç;sæÌ'|ßçû\Ò÷J”Ó§O¯íÉêkªª® l¡†Ìr•,÷ž…Ì“¯ëy…¿³ŸöÑM3¿Â&º–PòS?áò[9B-m¨¨Ø$Iò:õìFÇ#ËErÏ^@ ä§læÂlCF .FuYŽ×Åë‹ëŠ?ñê½]˜c”2Åg# có"¿¡‘ßcQ‡ ËpEWØ»y/ZPWS§LËÓ/Ì­›k£Íä¹Ïw©PY»€A‚&Þáy~‹Fe®›:mÛÛhÛÖFÀ PçÖ±%¹Ó2µIs²%÷ÃÜ~bĘe 3O/f›ø#q~†ŠZ ·6oì|ƒ½-{QT_øø’¥[4Ö6²1ºOñìéšé×´MÚ^}¾|¯<à{~ùIQöÑÂ"üQ wÂo¶¾É®Æ]H²„/|@±x—ŽéÐm!WΉ91‹m½î6¸ÉÂýBo1]œ]]@F§Ÿ³‘Ãh\®·b(TD…ÚšZÞþÑÛ¼ôÂK!ð¥‡áË*\»BOªK5q GKü ¾½akýÎ…{ }ó©ù;‹™V/ëùõü•  €¬ËìÛ¶¼ŸgÇ‹;hL4âã?~ñÚEÎõžÃL˜¸®KXTC„õÞtåú'‡>ùÅ«w.®ì€Ízš8Ä:~‰Š¹ G_òimjeÿöý¸A«Â=ß㋞/8wùFÄÀ}ÎÅ1ÃÕ!5H@ ¢Z´bTc_ŽUpx…f¤y©ÞË5W€ ÌÎÍ"$¿ü¼\)ÓùßN:¯vbE-jÖÕàXUp5H¥ä‘šgf~ÆA&¤2 q| d9Îí·ú?ê?TΔ§e@f\¢È A¢X8¨Hdp ‡—_FR$„$d !‹ÅKt÷vÓÑÓA  æ1ð¡þ¡á¾ã}³£Ùó@Ffq¾ùxÌ3CŸH‰K Ɇ¨äJ y‘—–[ÐÈrdòÒÙ4³ ³LÏO“Éf(zEòzÓ5W‡ }}óÄÍwçoÏ Ìùê.P}Wë®¶·¼õÞxi L €_ý¨ìÞ½ûÕƒï|¿¾¾~ƒk¸rs Yª‘kJãÞx%]NKùB^D¼”§¨‘4 Ó2±,‹@Ð& ÒÃ߆ O÷Ôÿ^úzú_KðÜÒί|ˆöìÙ³ãèÑ£Gš››7kš†¦kº!5X J“Þäû²_JÙ)Qt‹Bª‘„]k‰EˆÄ"¸µœp„°"¤…‚ ¤¿úø«÷g¯Îþ˜XÊüÁp’¶lÙòü±cÇþÜÔÔôª¢(X–…eY躎¦k"l„åÖF9®ÅËãÒ¸W0 ’c;±ËÁ±Â„Œð·á£#™þ÷ÿiæÊÌ_­†/ ÀÈårªã8N4}NÓ4E×u,ËÂ4ÍåÝI#)·È-¾„T,(Ð’£=â…›gôÎèÂÀ§™¾4ý!>÷¿™ùCÙlÖëîî¾ÕÞÞÞ}íÚµÛ¶åx<^cY–aš‹56 ]×EXË” RÈ•rJC3¤°+ð£_Î |8uaê(î.eî=nW€R.—›ëííloo¿ÐÕÕuÍó¼|"‘pDZmÛ¦i¢:†nH %¡¸·\òžªi²_ªˆÔDŠÑ»cÅÁŽÁ¿MuM}€Ç ³¼ZÀÊ@È•J¥ÌÐÐÐè©S§.={öâÄÄĸëºv<;Ž£X–…¦i"¢Fäˆñ&ó“åщ1eìîXùÖù[ÿœìœ<ì—ýÑÿÔ8®ÉW*•l*•ºßÑÑqµ½½½«§§ç¦ïûÅd2ŠÅbV ‚jP–‹Šÿùàç^_gßÇÿ™øƒ_ô‡€ù¥X<@µˆ<Íf³3½½½'Ož¼pæÌ™‹####º®—\×Õ¢¡¨øììg§/Ÿ¸|ˆƒO ‡§;F,(0Û²¬H}}}<nܸ10555 ¤Ò“]Ë9F°2¬õ¥;Ke[x8€Ð4m É,p}Xý÷{ÕÇÿ.ßyý2ŠÃ/[Îü%tEXtcreate-date2009-02-03T17:01:51+03:00‚ºx3%tEXtmodify-date2004-09-19T07:19:04+04:00>zR¼IEND®B`‚qpxtool-0.7.1_002/gui/images/stop.png0000644000175000001440000000033210123175271016577 0ustar shultzusers‰PNG  IHDR szzôbKGDùC» pHYs  ­#½uzIDATxÚí•1 €0G ä;yˆàgõ~GbaÄ2P,ÜiÒlŽIŠ[0Æüî¥,@~rè$`óX€I *’ Uˆåœk?¡P^¾›˜¿îT龂,` ¨›0p¯W…¨ÎVB™³X ½ŒªøycÌêqùÝu‘IEND®B`‚qpxtool-0.7.1_002/gui/images/exit.png0000644000175000001440000001132711053617046016575 0ustar shultzusers‰PNG  IHDR00Wù‡žIDATxœb`âÿÿòÿÿb¤‚¬ üPÌ ÅlPqdð›áÃW(þÅ¿)±ÿÿ"׌ ‹rr²‹©ðpI»°0«*þÿ¯"ÎȨÀÇÀ Åùÿ¿(ë¿ÿ<ÿÿÿgøÃÄøåۆןž½øÏðàÞÿÿ·wÿý{ûÖ§¯Oÿüùûšá5Ô3ÿIuÿÿ"ÕŒ | RBB|rAìºfÌL¦òÌÌ&¢¢"Jl⢠¬Â‚ ,ü L\\ Lì ÿþ1üýöáϧ/ ?|døýú-Ãï×o^¾{÷áŸ?§Oýg8³îç¯Ë?~yÌÀÀðŒá)ÿÿ”Ï=‚0€á÷«@cÚÑŸW/ îžÖ ã\Ý0ìÕ–4Å+èsƒçŸ€‹²´›ÓTï"û­µG³^½š“™©ëI}K 4Æ! ’åÈ$GŠ¥5Ñy†ºÁ=÷x½/W¸ÛÏÝû®ê__ÿÿ"Öœ ò2bZY,,®ÆÜ\^’*J²Êr ÿþ~ùÄðïëˆÊÿÿþÿÿÏÀðÿ?Ä ÿÿ3üÿ÷JCÅÿýc`äàb`æäd`øÇÈðãáS†Ož><ýåÛ¶© {ž¿zwáÃwBÿÿ"äFn..5kãf&?c)Inmu&.6†¿Ÿ>2üû°îpHÈ30ÀÏðÊþ÷¢äß?†ÿÿþ10±²30óð0üýö‹áÇû g^¿Ù¸ŒaóéÏßÎûöã$Ã㌠ÿÿb!àN..5WQAËV–P]E{N e†¿_¿0üzùU%Ìá°P‡Ç’ãÿÿ‡(Cÿ÷ã;ÿïߘ8¹¸´UÌîqøs=}ÎÇÉÃÅvˆáÛ·7¾ár ÿÿ|Ï1 Â0@Ñß&ØRµXpD\:º8^BÁózgqm¡¢ÁÔ¤IÜ\÷?ü÷‹Íx´>ˆx_®–Ût>ÅÖÁ𝨋­ºúF×ÜqJãÛQÒC 2dÞGCd‘ƒˆ?N=pZ“Ì&”B쎗k¤²Ôžž­΀ÿ5ùÿÿtÒK ‚P@Ñ«„Dûð‰&™kˆ6иA»ÂIƒ0飕†!>‹^Öîåü ÐÛ=w oäÌê¶àŸ«“€¦UúÞ²D'd©uœì|Øûm!=| [yÑçEÇnà ؞Ùr Ñ× a‚®WÜ”B•’×õBmÐeZóUxÌ6ífšÜðƒÒÿÿlÓ; Â@EÑ›IÈü.@S Vv.@k7à\FVàlÅÞÆÖ2ؤ‚:¦ ƒ„ÌX$•Ø¿[¼âü3`¾ç9ÓÝZ-ýµ= )3‰Ñe½¨²"•¨äÆéþˆïá¤Àxµl Bt€ÞÒ˜ÑÂYÛ7‡]‹Ñ£+ð •\9¼ä6ú»v·˜ø€YãqqÄ\ZN¢aä=+/ÿÿ\–1 AC_>À‚Ûi¡{‹½ý@›¹‚Å‚¥È|ý63¸x€¼"$ÿÃd6ö»3Im|Z±ê›z_bNéúŒ(î^VáÀ̲dˆ@€¢; û¹ö›ÂÝËK*sηÏòU‡ˆ¦”Œãf{šà k€/ÿÿ\•Í ‚@Äó_ˆÈÓ>ƒÒÓ׳xIðÂÂ0D·í.K‡9Î×e&/`€¯¤Ò'>Ó„"éY×ûƒf»KŒµsîÆo"Sø\OL`[x™þ=÷¯B{5«»÷ÒÇç˜x˜gìxà,U€Ï5¾ÿÿd—± Â`ƒ“;þÛtî ààû¿Q±q:t‘û{=‡þÑ$¾ä»pè2Ï´²Q’-Å$bšÑ«Þ„|¸ûˆíˆüƒE¸Ù&F6C„ˆü²'TwÍìÞ—2\Ÿ¯KL3².X낌0C÷ö“ª#b×øÿÿt•± €0CßµÒÉIý#ÿÖE;X„.W­Šè1ä8Þ³€ÊJ¤‘"Ó°Çt ôÖŽ òƒv¹”@ob'¢Ÿά̃sSç=)l¯u„ZµE$ÿ;ÿÿl•± €0CsW‹¸ˆ"øÿ¦{¡ƒV-H±=‡*t dIÉg…Z‘ž˜‹(£äOÌ•6)‹/:9fb"°¸"Ò²#­’ów F(¥þÞÿEÉNZ~)SŠ]æ¿.7ÿÿt”Á Â0Dߢ’^ÿÿƒ<÷zèIH@ &²ãÁŠÔ¹Ï2fç·Bá$%C˜ôÙã‚gcŽ¹Öš÷ÂwÕÆë6â÷¥6àp¹þµr÷<ÇX¶_:¹s–fÍ¿ÿÿt–Á €0 CÓ”ÞöÿÿçÉàÛD…zKCRþL j×8€%`êÿID¨”’«înVOhÛÁ£‚èrÌÄiU€d£{>ú÷næäæ“ùÿÿB÷ÃOFÆïÿý¶I`=¨ÿ Ìl¬ JLL¼þüáÄç FFF¸¥ÌH43ÎL ÜÜÜÜÊLL|0ýèùÉÈø]?ÿÿB÷Àïÿ>2þúËÀðÒaúINÌ\ Ú (å0:`Bòº'Ä#“#£º`±÷™…å3Ú0 ÿÿB/“¿¿gd|óÿçOx`ø÷á?´bÑý÷OM —˜˜˜!Žæ &àää”ÐÿóG›˜Þ13¿ù÷ïß7¤$ ÿÿB/OžýÿùZŒþcøûæßÞbÿñC…]ZPPP —'Ó-²G`1€# 1JJJJsppÈÊ}ýª„ž|`02>cddü‚¬ÿÿBöÀ?†×ÿý{ôÿÇO†Ÿ¿þBºhß¾)%32ZpppÈ3@Úø–„ЋÅ( 77·b*“Ôû÷2膯BúJWÿÿBOBïŽüýwÿÉ×ï/~ßÊð÷Ùk†?ÿ*'F‹/_,E¹¹ÕEDD°Ä, ‘”%øø´­>|°`úÿ#ôž³²¾ÙÿçÏÝ?þ ôÿÿB7/~ý~ré×ïÿ¿ýD1"JïÞé”üùã+$$¤-%%%ƒì ffæÿ_±pqa„ Ãc&¦7 ¨58£’’’¬^ÅŸ?AòOž(cKÿLLL —XXn~`bzÆé®ÂÍÿÿBNÿ¾122>Ýÿïÿe[FFS~ntO0200¼zeŸ£ ðnßo†gÏž=a```øû÷ï›}?~\p–“3Rdf…8#Ãÿÿßíûùó¿ÿÞ ;^PPÐ(-Tïî] X Á«Ð¾²°üØÍÀp‰á ¤ ÿÿB÷Àß?þ<ÞÏÄtÕƒ…å’“%#¬“äžoßøž>õaWTdšÆÎÎÆÁÁÁqïÞ½'ÿþ}TùòåjFFƳÿþýãb```f„€¿ _ÿÿÿïÿÿÿ544T……… s˜˜B­nÜpåþø‘ë4haöýc€ä›ììWöÿý{åÇ !¸ÿÿBψ^111ÝÛüÿÿiffÙÿDai9>~q¼{7PFQQ¬_\|ÏÛ§OŸ^yûöíÈ;;R€Âk_%%%yuttü¤ÅK¾| Q½zÕ”ýÝ;ŽHŠa¡ÉÈÀÀðœ‹ëÚÿÿOýúõë6¤cÿÙÁÿÿBÏUŒ ‡ 33³] Kpúïß>ÌÐjWæ|¡¤t÷’„Ä©yll‡¾ÿþèÛ·o/?}úôîçÏŸ_øøøx¹¹¹…øøø$¹¸¸Rþþu6|òÄTüÚ5)X»äü—‘‘a2ß® ?®üñãÇhBiÆÿÿÂV,0100p²°°è±01Ùµ33‡xüøa -Ð=\D~—ùVLìþ=·¸¹?agËÈÈÈ(ÿç¨Æ÷ïòªŸ>)‹¼x!/xû¶ Ãÿÿ øÿ‘‘a+?ÿ¥üß¿W|ÿùóÀŸ?.1@úÂ(mrÿÿÂ5°ÅÌÀÀÀÃÌÌl©ÌÂâPÅÌìkõý»&º'0Êy,9ÙÁÀÔæ26Çæç¿[û÷ï†Û¿~íûùóç1H%ý3000ÿÿÂVý‡*üö÷ïßKw8&21±3pp0Úþø¡ÁÄEÎÈ>'„Ñ›±èò Çî·ÿý»ýîŸ?Çþüy‘Rò`8žÿÿÂ56 ë`¼ûû÷ïùK¿~1µ³±ýýÂÅõÃçÛ7lžÀÕÊÁæ@dKP32l¼ÖùçÏýþýûYÈ8ÖÿÿÂ7:ý2<øòïß¿§ïüúõ»Œ•õó}nîw¡ÿÿË~ýÊOÈÁøÄþ£É=ããûº˜…åܤ_¿üù÷ïÜ÷ïßÏ1@æÎ~1àè¾2000ÿÿÂÛ AboutDialog About QPxTool QPxTool Info Licence Lizenz ErrcDetailedDialog Detailed Error Correction Detailierte Fehlerkorrektur GraphTab Time Zeit PrintPreview Print Preview Druckvorschau Print Drucken Page Setup Seiteneinstellungen Scale Skala 25% 25% 50% 50% 100% 100% 200% 200% Zoom In Vergrößern Zoom Out Verkleinern Original size Original Größe QPxGraph Logarithmic scale Logarythmische Skalierung Linear Scale Lineare Skalierung Scale in Skala vergößern Scale out Skala verkleinern QPxPreferences Preferences Einstellungen Devices Geräte Colors Farben Common Allgemein Save Sichern Cancel Abbrechen QPxToolMW Device: Gerät: Exit Beenden Rescan local bus and network Angeschlossene Geräte aktualisieren Update media info Medieninformationen aktualisieren Device controls Gerätesteuerung Run tests... Tests beginnen... Stop tests Tests beenden Preferences Einstellungen Print test results Testergebnisse drucken Export results to HTML Ergebnisse exportieren - html Save results... Ergebnisse speichern... Load results... Ergebnisse laden... File Datei Device Gerät Help Hilfe About Info No devices Keine Geräte No devices found! Can't run tests Keine Geräte gefunden! Test können nicht ausgeführt werden Device busy Gerät in Benutzung Bus scan in progress Geräte werden eingelesen It seems device already performing test or info updating in progress Gerät ist bereits in Nutzung oder eine Aktualisierung läuft Error Fehler Error performing test! Fehler bei Testdurchführung! qScan finished with non-zero exit code qScan terminierte mit Rückgabewert ungleich 0 Can't scan bus: some device(s) busy! Kein Einlesen der Geräte: Gerät(e) in Benutzung! Searching devices... Gerätesuche... No devices found! Keine Geräte gefunden! Warning Warnung Unable to start qscan! Local devices will not work Kann qscan nicht starten! Lokale Geräte sind nicht verfügbar Unable to connect to qscand at %1:%2 keine Verbindung zu qScand %1:%2 Found locked Plextor device! Quality check and some other features will not work Kommandoverschlüsseltes Plextor-Gerät! Qualitätsmessungen und einige anderen Funktionen stehen nicht zur Verfügung. Firmware und/oder qScan Berechtigungen prüfen No devices found! Nothing to configure Keine Geräte gefunden! Konfiguration nicht möglich Retrieving device parameters... Einlesen der Geräteparameter... Can't get device features! Gerätefunktionen nicht erkannt! Error requesting device settings! Fehler beim Einlesen der Geräteeinstellungen! cdvdcontrol finished with non-zero exit code cdvdcontrol terminierte mit Rückgabewert ungleich 0 Unable to create file: Konnte Datei nicht erstellen: Save results to file... Ergebnisse in Datei speichern... Error saving tests data! Fehler beim Abspeichern der Werte! Info Infos Tests data saved in %1 sec Meßwerte in %1 sec gesichert Load results from file... Lade Meßwerte aus Datei... Unable to open file: Konnte Datei nicht öffnen: Do tests data found in this file! Nutze Testwerte aus dieser Datei! Tests data loaded in %1 sec Meßwerte in %1 gelesen Done Beendet All tests finished Alle Tests beendet Export results to PDF Ergebnisse als PDF exportieren Can't save report Konnte Bericht nicht speichern Direcrory not exists and I can't create it Verzeichnis existiert nicht und kann es nicht erstellen Preparing report... Bereite Bericht vor... Can't update media info! Device busy Mediadaten nicht aktualisiert! Gerät in Benutzung TestDialog Select tests... Testauswahl... Device: Gerät: Media: Medium: Tests: Теsts: Speeds: Tempi: Read Transfer Rate Lese-Tranferrate Write Transfer Rate Schreib-Transferrate Simulation Simulation Error Correction Fehlerkorrektur Jitter/Asymmetry Jitter/Asymmetry Focus/Tracking Focus/Track Time Analyser Zeitanalyse qScan plugin: qScan Plugin: Run Start Cancel Abbrechen No tests selected! Keine Testauswahl! You have selected no tests! Es wurden keine Tests gewählt! < Autodetect > < Autom. Erkennung > plugin info error Plugin-Infofehler qScan will probe plugin for your drive qScan prüft Plugins für Gerät no plugin info Keine Plugin-Infos Retrieving test capabilities... Lese Meßfähigkeiten... devSettings Device Controls Common VariRec GigaRec SecuRec Silent mode PioQuiet Destruction Disc T@2 devctlAutostrategy AutoStrategy AutoStrategie AutoStrategy DataBase AutoStrategie Datenbank Media Quality Check Medium-Qualitätsprüfung Quick Schnell Advanced Erweitert Speed: Tempo: Check Media Medium prüfen Checking media quality... Prüfe Mediumqualität... Can't run cdvdcontrol! Kann cdvdcontrol nicht ausführen! Unknown result Unbekanntes Ergebnis devctlAutostrategyDB AutoStrategy DataBase AutoStrategie Datenbank Type Typ Media ID Medium ID Speed Tempo Writes Schreiben Activate Aktivieren Deactivate Deaktivieren Remove Entfernen Clear Bereinigen Strategy creation Strategie erstellen Mode Modus DB Action DB Aktion Create Erstellen Quick Schnell Full Komplett Add Hinzufügen Replace Ersetzen Retrieving ASDB... Lese ASDB... Error Fehler Error requesting ASDB! Fehler beim Einlesen der ASDB! cdvdcontrol finished with non-zero exit code cdvdcontrol terminierte mit Rückgabewert ungleich 0 Are you sure? Sicher? Are you sure to delete strategy #%1? Soll die Strategie #%1 wirklich gelöscht werden? Creating strategy... Erzeuge Strategie... Are you sure delete all strategies? Can't create strategy! Strategy creation does not supported on current media: supported media types: DVD+R(DL) and DVD-R(DL) devctlDestruct Quick Schnell Destruct Lead-in & TOC Zerstöre Lead-in & TOC Full Komplett Destruct entire disc Zerstöre eingelegte Disk Destruct Zerstören Are you sure? Sicher? Media will be unreadable after this operation! Medium wird nach diesem Vorgang unlesbar sein! Data destruction Datenzerstörung Destructing data... Zerstöre Daten... devctlF1Tattoo Burn T@2 Schreibe T@2 Select T@2 image... Wähle T@2-Bild... Error Fehler Can't load image: Bild kann nicht geladen werden: Can't create DiscT@2 temporary file! Kann temporäre DiscT@2 Datei nicht anlegen! Burning DiscT@2 image... Schreibe DiscT@2 Bild... devctlGigarec GigaRec limits maximum write speed to 8X only DAO write mode can be used with GigaRec GigaRec reduziert die Maximalgeschwindigkeit auf 8x nur der DAO Schreibmodus wird unterstützt Original capacity: Ursprüngliche Kapazität: GigaRec capacity: Kapazität GigaRec: devctlPioquiet Pioneer Quiet Mode Pioneer Flüstermodus Quiet Leise Standard Standard Performance Performant Limit read speed to 24X for CD and 8X for DVD Limitiere Lesegeschwindigkeit auf 24x für CD und 8x für DVD Permanent Permanent Set Setzen Profile Profil devctlSecurec Password Passwort Confirm Bestätigen Set Anwenden Reset Reset Password length must me between 4 and 10 characters. To read SecuRec-protected CD you have to activate SecuRec with same password as used for writing Passwortlänge muß zwischen 4 und 10. Zeichen liegen um SecuRec-geschütze Disks zu lesen, muß SecuRec mit selbigem Passwort wieder freigeschaltet werden devctlSilent Speed Limits Tempo-Limits CD CD DVD DVD Read Lesen Write Schreiben Access Time Zugriffszeit Slow Langsam Fast Schnell Tray Speed Tray-Tempo Load Laden Eject Auswerfen Permanent Permanent Save Sichern devctlVarirecCD VariRec limits maximum CD write speed to 8X VariRec limitiert max. CD Schreibtempo auf 8x VariRec limits maximum CD write speed to 4X VariRec limitiert max. CD Schreibtempo auf 4x devctlVarirecDVD VariRec limits maximum DVD write speed to 4X VariRec limitiert max. DVD Schreibtempo auf 4x device Updating media info... Read Transfer Write Transfer Error Correction Fehlerkorrektur Jitter/Asymmetry Focus/Tracking Focus/Track Time Analyser Zeitanalyse Loading media... hostEditDialog Add host Host hinzufügen Host: Host: Port: Port: prefColors Background Hintergrund Grid Gitter Read Speed Lesetempo Write Speed Schreibtempo Jitter Jitter Asymmetry Ðymmetrie Focus Errors Focusfehler Tracking errors Trackfehler Presets Voreinstellungen Default Standard prefCommon Path: Pfad: Select directory... Verzeichnis wählen... Autosave reports after tests completed Bericht nach beendetem Test autom. sichern Simulation Simulation Error Correction Fehlerkorrektur Jitter/Asymmetry Jitter/Asymmetrie Focus/Tracking Focus/Track Time Analyser Zeitanalyse Read Transfer Rate Lese-Transferrate Write Transfer Rate Schreib-Transferrate Autostart tests on written media inserted Tests nach Einlegen beschriebener Medien autom. ausführen Autostart tests on blank media inserted Tests nach Einlegen leerer Medien autom. ausführen Eject media after tests finished Medien nach beendeter Prüfung autom. auswerfen Default tests for written media Standardtests für beschriebene Medien Default tests for blank media Standardtests für unbeschriebene Medien Select directory for reports saving... prefDevices Use local devices Nutze lokale Geräte Use network devices Nutze Netzwerkgeräte host host qscand port qscand Port Edit host Host bearbeiten Add host Host hinzufügen Remove host Host entfernen Remove host? Host entfernen? You are about to remove host from list: %1:%2 Are you sure? Host wird von Liste entfernt: %1:%2 Sicher? tabDevInfo Vendor: Model: F/W: TLA# S/N: Buffer: IFace: Loader: RPC Phase: Region: Changes: Resets: Discs loaded: CD read: CD write: DVD read: DVD write: Media R/W Capabilities Medium Schreib-/Lesefähigkeiten Generic Capabilities Allgemeine Fähigkeiten Error Fehler Error updating device info! Fehler bei Aktualisierung der Geräteinfos! qScan finished with non-zero exit code qScan terminierte mit Rückgabewert ungleich 0 Basic info Basis Infos tabFETE FE max TE max tabJB Jitter Jitter Asymmetry Ðsymmetrie tabMediaInfo Type: Тyp: Disc Category: Medium Kategorie: Media ID: Medium ID: Layers: Layers: Erasable: Löschbar: Protection: Schutz: Regions: Regionen: Written on: Geschrieben mit: Readable: Lesbar: Free: Frei: Total: Gesamt: Disc state: Medienstatus: Session state: Sessionstatus: Read speeds: Lesetempi: Write speeds (Device): Schreibtempi (Gerät): Write speeds (Media): Schreibtempi (Medium): RD max: RD lst: WR max: WR lst: Detailed info Detailinfos Error Fehler Error updating media info! Fehler bei Aktualisierung der Mediuminfos! qScan finished with non-zero exit code qScan terminierte mit Rückgabewert ungleich 0 tabTA Layer Layer Zone Zonen Inner Innen Middle Mitte Outer Außen Time Zeit tabTransfer Start Start End Ende Average Durchschnitt qpxtool-0.7.1_002/gui/locale/qpxtool.ru_RU.ts0000644000175000001440000017461311352127615020231 0ustar shultzusers AboutDialog About QPxTool О программе Licence Ð›Ð¸Ñ†ÐµÐ½Ð·Ð¸Ñ ErrcDetailedDialog Detailed Error Correction Ð”ÐµÑ‚Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ð¸ ошибок GraphTab Time Ð’Ñ€ÐµÐ¼Ñ PrintPreview Print Preview ПредпроÑмотр Print Печать Page Setup Параметры Ñтраницы Scale МаÑштаб 25% 25% 50% 50% 100% 100% 200% 200% Zoom In Увеличить Zoom Out Уменьшить Original size Оригинальный размер QPxGraph Logarithmic scale ЛогарифмичеÑÐºÐ°Ñ ÑˆÐºÐ°Ð»Ð° Linear Scale Ð›Ð¸Ð½ÐµÐ¹Ð½Ð°Ñ ÑˆÐºÐ°Ð»Ð° Scale in Увеличить маÑштаб Scale out Уменьшать маÑштаб QPxPreferences Preferences ÐаÑтройки Devices УÑтройÑтва Colors Цвета Common Общие Save Сохранить Cancel Отмена QPxToolMW Device: УÑтройÑтво: Exit Выход Rescan local bus and network ПереÑканировать шину и Ñетевые уÑтройÑтва Update media info Обновить информацию о ноÑителе Device controls Управление уÑтройÑтвом Run tests... Ðачать теÑтирование... Stop tests ОÑтановить теÑтирование Preferences ÐаÑтройки Print test results РаÑпечатать результаты теÑтов Export results to HTML ЭкÑпорт результатов в HTML Save results... Сохранить результаты... Load results... Загрузить результаты... File Файл Device УÑтройÑтво Help Справка About О программе No devices Ðет уÑтройÑтв No devices found! Can't run tests Ðе могу запуÑтить теÑтирование: уÑтройÑтва не найдены Device busy УÑтройÑтво занÑто Bus scan in progress Сканирование шины It seems device already performing test or info updating in progress УÑтройÑтво занÑто теÑтированием или обновлением информации Error Ошибка Error performing test! Ошибка теÑтированиÑ! qScan finished with non-zero exit code qScan завершилÑÑ Ñ Ð½ÐµÐ½ÑƒÐ»ÐµÐ²Ñ‹Ð¼ кодом возврата Can't scan bus: some device(s) busy! Ðе могу Ñканировать шину: некоторые уÑтройÑтва занÑты! Searching devices... ПоиÑк уÑтройÑтв... No devices found! УÑтройÑтва не найдены! Warning Предупреждение Unable to start qscan! Local devices will not work Ðе могу запуÑтить qscan! Локальные уÑтройÑтва работать не будут Unable to connect to qscand at %1:%2 Ðе могу подключитьÑÑ Ðº qscand на %1:%2 Found locked Plextor device! Quality check and some other features will not work Обнаружен заблокированный Plextor! ТеÑтирование качеÑтва и некоторые другие возможноÑти работать не будут No devices found! Nothing to configure УÑтройÑтва не найдены! Ðечего наÑтраивать Retrieving device parameters... Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð² уÑтройÑтва... Can't get device features! Ошибка запроÑа возможноÑтей уÑтройÑтва! Error requesting device settings! Ошибка запроÑа параметров уÑтройÑтва! cdvdcontrol finished with non-zero exit code cdvdcontrol завершилÑÑ Ñ Ð½ÐµÐ½ÑƒÐ»ÐµÐ²Ñ‹Ð¼ кодом возврата Unable to create file: Ðе могу Ñоздать файл: Save results to file... Сохранить результаты в файл... Error saving tests data! Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…! Info Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Tests data saved in %1 sec Данные Ñохранены за %1 Ñекунд Load results from file... Загрузить результаты из файла... Unable to open file: Ðе могу открыть файл: Do tests data found in this file! Ð’ Ñтом файле нет данных теÑтированиÑ! Tests data loaded in %1 sec Данные загружены за %1 Ñекунд Done Завершено All tests finished Ð’Ñе теÑты завершены Export results to PDF ЭкÑпорт результатов в PDF Can't save report Ðе могу Ñохранить отчет Direcrory not exists and I can't create it Каталог не ÑущеÑтвует и Ñ Ð½Ðµ могу его Ñоздать Preparing report... Подготовка отчета... Can't update media info! Device busy Ðе могу обновить информацию о ноÑителе: уÑтройÑтво занÑто TestDialog Select tests... Выберите теÑты... Device: УÑтройÑтво: Media: ÐоÑитель: Tests: ТеÑты: Speeds: СкороÑть: Read Transfer Rate СкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Write Transfer Rate СкороÑть запиÑи Simulation СимулÑÑ†Ð¸Ñ Error Correction ÐšÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ Ð¾ÑˆÐ¸Ð±Ð¾Ðº Jitter/Asymmetry Джиттер/ÐÑÐ¸Ð¼Ð¼ÐµÑ‚Ñ€Ð¸Ñ Focus/Tracking ФокуÑ/Слежение за дорожкой Time Analyser Временной анализ qScan plugin: плагин qScan: Run ЗапуÑк Cancel Отмена No tests selected! ТеÑты не выбраны! You have selected no tests! Ð’Ñ‹ не выбрали ни один теÑÑ‚! < Autodetect > < Ðвтоопределение > plugin info error ошибка информации о плагине qScan will probe plugin for your drive qScan Ñам подберет плагин Ð´Ð»Ñ Ð²Ð°ÑˆÐµÐ³Ð¾ уÑтройÑтва no plugin info нет информации о плагине Retrieving test capabilities... ОпределÑÑŽ возможноÑти теÑтированиÑ... devSettings Device Controls Common Общие VariRec GigaRec SecuRec Silent mode PioQuiet Destruction Disc T@2 devctlAutostrategy AutoStrategy AutoStrategy AutoStrategy DataBase Таблица AutoStrategy Media Quality Check Проверка качеÑтва ноÑÐ¸Ñ‚ÐµÐ»Ñ Quick БыÑтрый Advanced РаÑширенный Speed: СкороÑть: Check Media Проверить Checking media quality... ПроверÑÑŽ качеÑтво ноÑителÑ... Can't run cdvdcontrol! Ðе мону запуÑтить cdvdcontrol! Unknown result Резутьтат неизвеÑтен devctlAutostrategyDB AutoStrategy DataBase Таблица AutoStrategy Type Тип Media ID Идентификатор Speed СкороÑть Writes ЗапиÑей Activate Ðктивировать Deactivate Деактивировать Remove Удалить Clear ОчиÑтить Strategy creation Создание Ñтратегии Mode Режим DB Action ДейÑтвие Create Создать Quick БыÑтрый Full РаÑширенный Add Добавить Replace Заменить Retrieving ASDB... Ð—Ð°Ð¿Ñ€Ð¾Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ‹ Ñтратегий... Error Ошибка Error requesting ASDB! Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ‹ Ñтратегий! cdvdcontrol finished with non-zero exit code cdvdcontrol завершилÑÑ Ñ Ð½ÐµÐ½ÑƒÐ»ÐµÐ²Ñ‹Ð¼ кодом возврата Are you sure? Ð’Ñ‹ уверены? Are you sure to delete strategy #%1? Ð’Ñ‹ уверены, что хотите удалить Ñтратегию #%1? Creating strategy... Создание Ñтратегии... Are you sure delete all strategies? Ð’Ñ‹ уверены, что хотите удалить вÑе Ñтратегии? Can't create strategy! Ðе могу Ñоздать Ñтратегию! Strategy creation does not supported on current media: Создание Ñтратегии Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ ноÑÐ¸Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ: supported media types: DVD+R(DL) and DVD-R(DL) поддерживаемые типы ноÑителей: DVD+R(DL) и DVD-R(DL) devctlDestruct Quick БыÑтрое Destruct Lead-in & TOC Разрушить Lead-in и TOC Full Полное Destruct entire disc Разрушить данные по вÑему диÑку Destruct Уничтожить Are you sure? Ð’Ñ‹ уверены? Media will be unreadable after this operation! ПоÑле Ñтой операции ноÑитель Ñтанет нечитаемым! Data destruction Уничтожение данных Destructing data... Уничтожение данных... devctlF1Tattoo Burn T@2 ЗапиÑать T@2 Select T@2 image... Выберите изображение Ð´Ð»Ñ T@2... Error Ошибка Can't load image: Ðе могу загрузить изображение: Can't create DiscT@2 temporary file! Ðе могу Ñоздать временный файл DiscT@2! Burning DiscT@2 image... Пишу изображение DiscT@2... devctlGigarec GigaRec limits maximum write speed to 8X only DAO write mode can be used with GigaRec При иÑпользовании GigaRec ÑкороÑть запиÑи будет ограничена 8X.Режим запиÑи - только DAO Original capacity: ÐžÑ€Ð¸Ð³Ð¸Ð½Ð°Ð»ÑŒÐ½Ð°Ñ ÐµÐ¼ÐºÐ¾Ñть: GigaRec capacity: ЕмкоÑть Ñ GigaRec: devctlPioquiet Pioneer Quiet Mode Pioneer Quiet Mode Quiet Тихий Standard Стандартный Performance ПроизводитальноÑть Limit read speed to 24X for CD and 8X for DVD Ограничить ÑкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð½Ð° 24X Ð´Ð»Ñ CD и 8X Ð´Ð»Ñ DVD Permanent Сохранить в знергонезавиÑимой памÑти Set УÑтановить Profile Профиль devctlSecurec Password Пароль Confirm Подтверждение Set УÑтановить Reset СброÑить Password length must me between 4 and 10 characters. To read SecuRec-protected CD you have to activate SecuRec with same password as used for writing Пароль должен Ñодержать от 4 до 10 Ñимволов Ð”Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ CD, запиÑанного Ñ Ð¸Ñпользованием SecuRec, надо включить SecuRec, задав тот же пароль devctlSilent Speed Limits Ограничение ÑкороÑти CD CD DVD DVD Read Чтение Write ЗапиÑÑŒ Access Time СкороÑть доÑтупа Slow Медленно Fast БыÑтро Tray Speed СкороÑть лотка Load Загрузка Eject Открытие Permanent Сохранить в знергонезавиÑимой памÑти Save Сохранить devctlVarirecCD VariRec limits maximum CD write speed to 8X При иÑпользовании VariRec ÑкороÑть запиÑи CD будет ограничена 8X VariRec limits maximum CD write speed to 4X При иÑпользовании VariRec ÑкороÑть запиÑи CD будет ограничена 4X devctlVarirecDVD VariRec limits maximum DVD write speed to 4X При иÑпользовании VariRec ÑкороÑть запиÑи DVD будет ограничена 4X device Updating media info... Обновление информации о ноÑителе... Read Transfer СкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Write Transfer СкороÑть запиÑи Error Correction ÐšÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ Ð¾ÑˆÐ¸Ð±Ð¾Ðº Jitter/Asymmetry Джиттер/ÐÑÐ¸Ð¼Ð¼ÐµÑ‚Ñ€Ð¸Ñ Focus/Tracking ФокуÑ/Слежение за дорожкой Time Analyser Временной анализ Loading media... Загрузка ноÑителÑ... hostEditDialog Add host Добавить хоÑÑ‚ Host: ХоÑÑ‚: Port: Порт: prefColors Background Фон Grid Сетка Read Speed СкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Write Speed СкороÑть запиÑи Jitter Джиттер Asymmetry ÐÑÐ¸Ð¼Ð¼ÐµÑ‚Ñ€Ð¸Ñ Focus Errors ФокуÑировка Tracking errors Слежение за дорожкой Presets ПредуÑтановки Default По умолчанию prefCommon Path: Путь: Select directory... Выберите каталог... Autosave reports after tests completed СохранÑть отчет поÑле Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñ‚ÐµÑтов Simulation СимулÑÑ†Ð¸Ñ Error Correction ÐšÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ Ð¾ÑˆÐ¸Ð±Ð¾Ðº Jitter/Asymmetry Джиттер/ÐÑÐ¸Ð¼Ð¼ÐµÑ‚Ñ€Ð¸Ñ Focus/Tracking ФокуÑ/Слежение за дорожкой Time Analyser Временной анализ Read Transfer Rate СкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Write Transfer Rate СкороÑть запиÑи Autostart tests on written media inserted ÐвтозапуÑк теÑтов на запиÑанном диÑке Autostart tests on blank media inserted ÐвтозапуÑк теÑтов на чиÑтом диÑке Eject media after tests finished Извлечь диÑк поÑле Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñ‚ÐµÑтов Default tests for written media ТеÑты по умолчанию Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñанного диÑка Default tests for blank media ТеÑты по умолчанию Ð´Ð»Ñ Ñ‡Ð¸Ñтого диÑка Select directory for reports saving... Выберите каталог Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ñ‡ÐµÑ‚Ð¾Ð²... prefDevices Use local devices ИÑпользовать локальные уÑтройÑтва Use network devices ИÑпользовать Ñетевые уÑтройÑтва host хоÑÑ‚ qscand port порт qscand Edit host Изменить хоÑÑ‚ Add host Добавить хоÑÑ‚ Remove host Удалить хоÑÑ‚ Remove host? Удалить хоÑÑ‚? You are about to remove host from list: %1:%2 Are you sure? Ð’Ñ‹ ÑобралиÑÑŒ удалить хоÑÑ‚ из ÑпиÑка: %1:%2 Ð’Ñ‹ уверены? tabDevInfo Vendor: Model: F/W: TLA# S/N: Buffer: IFace: Loader: RPC Phase: Region: Changes: Resets: Discs loaded: CD read: CD write: DVD read: DVD write: Media R/W Capabilities ВозможноÑти чтениÑ/запиÑи Generic Capabilities Общие возможноÑти Error Ошибка Error updating device info! Ошибка Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ об уÑтройÑтве! qScan finished with non-zero exit code qScan завершилÑÑ Ñ Ð½ÐµÐ½ÑƒÐ»ÐµÐ²Ñ‹Ð¼ кодом возврата Basic info ОÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ tabFETE FE max FE макÑ. TE max TE макÑ. tabJB Jitter Джиттер Asymmetry ÐÑÐ¸Ð¼Ð¼ÐµÑ‚Ñ€Ð¸Ñ tabMediaInfo Type: Тип: Disc Category: КатегориÑ: Media ID: Идентификатор: Layers: Слоев: Erasable: Стираемый: Protection: Защита: Regions: Регионы: Written on: ЗапиÑан на: Readable: ЗапиÑано: Free: Свободно: Total: Ð’Ñего: Disc state: Ð¡Ñ‚Ð°Ñ‚ÑƒÑ Ð´Ð¸Ñка: Session state: Ð¡Ñ‚Ð°Ñ‚ÑƒÑ ÑеÑÑии: Read speeds: СкороÑти чтениÑ: Write speeds (Device): СкороÑти запиÑи (уÑтройÑтво): Write speeds (Media): СкороÑти запиÑи (ноÑитель): RD max: RD lst: WR max: WR lst: Detailed info ÐŸÐ¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Error Ошибка Error updating media info! Ошибка Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ о ноÑителе! qScan finished with non-zero exit code qScan завершилÑÑ Ñ Ð½ÐµÐ½ÑƒÐ»ÐµÐ²Ñ‹Ð¼ кодом возврата tabTA Layer Слой Zone ОблаÑть Inner ВнутреннÑÑ Middle СреднÑÑ Outer ВнешнÑÑ Time Ð’Ñ€ÐµÐ¼Ñ tabTransfer Start Ðачало End Конец Average Среднее qpxtool-0.7.1_002/gui/Makefile.qproject0000644000175000001440000000032011334211140017111 0ustar shultzusersall: qproject qproject: qmake-qt4 -project MOC_DIR="moc" OBJECTS_DIR="obj" -o qpxtool.pro \ QT+=network \ CONFIG+="thread" \ INCLUDEPATH+="../lib/include" \ INCLUDEPATH+="include" .PHONY: qproject all qpxtool-0.7.1_002/gui/qpxtool.rc0000644000175000001440000000007611220343144015673 0ustar shultzusersIDI_ICON1 ICON DISCARDABLE "qpxtool.ico" qpxtool-0.7.1_002/gui/include/0000755000175000001440000000000011352127612015265 5ustar shultzusersqpxtool-0.7.1_002/gui/include/mainwindow.h0000644000175000001440000000711311334767300017620 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _MAINWINDOW_H #define _MAINWINDOW_H #include #include #include #include class QWidget; class QMenuBar; class QToolBar; class QHBoxLayout; class QVBoxLayout; //class QToolButton; class QPushButton; class QLabel; class QProgressBar; class QComboBox; class QFrame; class QProcess; class QTcpSocket; class QPxIODevice; class QPxMainWidget; class ProgressWidget; class TestDialog; class QTextDocument; #ifndef QT_NO_DEBUG class QMutex2 : public QMutex { public: inline void lock() { qDebug(" * QMutex::lock()"); QMutex::lock(); } ; inline bool tryLock() { qDebug(" * QMutex::trylock()"); return QMutex::tryLock(); } ; inline bool tryLock(int to) { qDebug(" * QMutex::trylock(int)"); return QMutex::tryLock(to); } ; inline void unlock() { qDebug(" * QMutex::unlock()"); QMutex::unlock(); } ; }; #endif class QPxToolMW : public QMainWindow { Q_OBJECT public: QPxToolMW(int ac, char **av, QWidget *p=0, Qt::WindowFlags fl = 0); ~QPxToolMW(); public slots: void mediaUpdated(int); public slots: void process_started(); // for statusBar void process_finished(); // updating void process_progress(); // private slots: void setDevice(int idx); void loejToggle(); void lockToggle(); void select_tests(); void select_tests(device *dev); void run_tests(); void cancel_run_tests(); void terminate_tests(); void update_device_info(); void update_media_info(); void device_settings(); void update_features_done(int); void exit(); void scanbus(); void qscan_process_scanbus(); void preferences(); void save_report(); void print_results(); void export_results(); void save_results(); void load_results(); void load_results(QString); void about(); void tests_done(); void tests_error(); private: ProgressWidget *progress; void winit(); void create_actions(); void winit_menubar(); void winit_toolbar(); void winit_statusbar(); void settings_load(); void settings_save(); void scanbus_local(); void scanbus_remote(); void update_media_info(device* dev); void run_test(int); // void prepare_images(QString path=QString::null); void autosave_report(device* dev); void save_report(device* dev, QString fname); void prepare_report(device* dev, QTextDocument*); QString generate_html(device *dev, QString idir = QString()); // infoTypeT infoType; device::devtype dt; QString dhost; int dport; QPxIODevice *scanbusio; #ifndef QT_NO_DEBUG QMutex2 mutex_dev; #else QMutex mutex_dev; #endif // bool scanbusDis; QMenuBar *menubar; QToolBar *toolbar; QAction *act_exit, *act_pref, *act_save, *act_load, *act_export, *act_report, *act_print, *act_scanbus, *act_minfo, *act_devctl, *act_test, *act_stop, *act_about; QWidget *cwidget; QVBoxLayout *layout; QHBoxLayout *layout_dev; QLabel *l_dev; QComboBox *c_dev; QPushButton *pb_loej; QPushButton *pb_lock; // QFrame *hline; QPxMainWidget *mwidget; // statusbar widgets QProgressBar *status_progress; QLabel *status_process, *status_media, *status_mid; TestDialog *testDialog; // device devlist devices; // settings QPxSettings set; bool splash; }; #endif qpxtool-0.7.1_002/gui/include/printpreview.h0000644000175000001440000000271311334746007020204 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef PRINTPREVIEW_H #define PRINTPREVIEW_H #include #include #include #include #include #include #include "dpi_metrics.h" class PreviewView; class QTextDocument; class QBoxLayout; class QPushButton; class QLabel; class QComboBox; class QSplitter; class PrintPreview : public QDialog { Q_OBJECT friend class PreviewView; public: PrintPreview(QWidget *parent, QTextDocument *document = 0); virtual ~PrintPreview(); void setDocument(QTextDocument *document); static void printDoc(QWidget* parent, QPrinter* printer, QTextDocument* doc); private slots: void print(); void pageSetup(); void scaleChanged(double); void scaleChanged(QString); private: QLabel *l_scale; QComboBox *box_scale; QPushButton *pb_print, *pb_psetup, *pb_zoomin, *pb_zoom1, *pb_zoomout; QTextDocument *doc; QBoxLayout *layout_main, *layout_butt; QSplitter *split; PreviewView *view, *thumbs; QPrinter printer; }; #endif // PRINTPREVIEW_H qpxtool-0.7.1_002/gui/include/images_list.h0000644000175000001440000000262711352121547017746 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __images_list_h #define __images_list_h #include #include #ifndef QT_NO_DEBUG //#define __images_list_debug #endif class QBoxLayout; class QWidget; class ImageLabel; class ImageDialog; class ImagesList : public QScrollArea { Q_OBJECT public: enum ListDir { Vertical = 1, Horizontal = 2 }; ImagesList(int minW, QWidget *parent, ListDir orient = Vertical); ImagesList(int minW, QSize isize, QWidget *parent, ListDir orient = Vertical); ImagesList(int minW, int iw, int ih, QWidget *parent, ListDir orient = Vertical); ~ImagesList(); int addLabel(QString label, QImage image, int imgid=-1); public slots: void clear(); private slots: void clicked(int); signals: void selected(int); protected: void keyPressEvent(QKeyEvent*); private: void winit(ListDir orient); int current; // QScrollArea *w; void clear_img(); QWidget *cwidget; QBoxLayout *clayout; QList images_l; int iconw, iconh; int minW; }; #endif qpxtool-0.7.1_002/gui/include/progresswidget.h0000644000175000001440000000167311200303172020502 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef PROGRESS_WIDGET_H #define PROGRESS_WIDGET_H #include class ProgressWidget: public QWidget { Q_OBJECT public: enum Direction { DirectionForward = 0, DirectionBackward = 1, DirectionBoth = 2 }; ProgressWidget(int, int, QWidget *p); ~ProgressWidget(); void setDirection(ProgressWidget::Direction); void setText(QString); public slots: void step(); protected: void paintEvent(QPaintEvent*); private: int blocks, shown; int idx; Direction dir; bool dir2; QString text; }; #endif qpxtool-0.7.1_002/gui/include/tattoowidget.h0000644000175000001440000000171311226603267020163 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef TATTOOWIDGET_H #define TATTOOWIDGET_H #define F1TATTOOW 3744 #define F1TATTOOR 582 #include class TattooWidget : public QWidget { Q_OBJECT public: TattooWidget(QWidget *p); ~TattooWidget(); void setRadius(int,int); void setImage(QImage&); private: void convertImage(); int r0mm,r1mm; int r0p, r1p; QImage timg, dimg; int x0,y0; protected: void paintEvent(QPaintEvent*); void resizeEvent(QResizeEvent*); float SRC_x2ang(int, int w=F1TATTOOW); float SRC_y2rad(int, int); }; #endif // TATTOOWIDGET_H qpxtool-0.7.1_002/gui/include/qpxsettings.h0000644000175000001440000000616111334746024020037 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _QPXSETTINGS_H #define _QPXSETTINGS_H #include #include #include #include #include struct colorSet { QString name; QColor bg,grid,rspeed,wspeed, errc[8], jitter,asymm, fe,te, tapit,taland; }; static const colorSet defColors = { "Default", 0xFFFFFF, 0x808080, 0x009000, 0xC00000, { 0x009000, 0x00C000, 0x00FF00, 0xFFAA00, 0x0055FF, 0x550080, 0xFF0000, Qt::black }, 0x00A000, 0xA00000, 0xA00000, 0x0000A0, 0xA00000, 0x0000A0 }; class Scale { public: Scale(QString iname); ~Scale(); enum ScalePolicy { Auto = 1, Fixed = 2 }; enum ScaleType { Linear = 4, Log = 8 }; QString name; // ScaleType type; // ScaleMode mode; int policy; int type; int value; inline bool operator== (const QString &s) { return name == s; }; inline bool operator== (const Scale &o) { return name == o.name; }; }; class ScaleList : public QList { public: inline Scale& get(const QString s) { int idx = indexOf(s); if (idx>=0) return (*this)[idx]; append(Scale(s)); return (*this)[indexOf(s)]; }; }; struct ErrcColorCD{ QColor *bler; QColor *e11; QColor *e21; QColor *e31; QColor *e12; QColor *e22; QColor *e32; QColor *uncr; }; struct ErrcColorDVD{ QColor *res0; QColor *pie; QColor *pi8; QColor *pif; QColor *poe; QColor *po8; QColor *pof; QColor *uncr; }; union ErrcColor{ QColor *raw[8]; ErrcColorCD cd; ErrcColorDVD dvd; }; #define AFLAG_MWATCH 0x0001 #define AFLAG_AUTOSTART_W 0x0002 #define AFLAG_AUTOSTART_B 0x0004 #define AFLAG_EJECT_AFTER 0x0008 // + #define AFLAG_DTEST_RT 0x0010 #define AFLAG_DTEST_WT 0x0020 #define AFLAG_DTEST_WT_SIMUL 0x0040 #define AFLAG_DTEST_ERRC 0x0080 #define AFLAG_DTEST_JB 0x0100 #define AFLAG_DTEST_FT_W 0x0200 #define AFLAG_DTEST_FT_B 0x0400 #define AFLAG_DTEST_TA 0x0800 class QPxSettings { public: QPxSettings(); QPxSettings(const QPxSettings&); ~QPxSettings(); void load(); void save(); void loadScale(QString name); void saveScale(); void setDefaultColors(); QPxSettings& operator = (const QPxSettings& o); // geometry QRect geometry_mw; QRect geometry_pref; // QRect geometry_testsel; int tests; // general options bool show_allctl; bool report_autosave; QString report_path; uint32_t actions_flags; // device settings bool useLocal; bool useRemote; QStringList hosts; QStringList ports; // graph settings QColor col_bg; QColor col_bginv; QColor col_grid; QColor col_rspeed; QColor col_wspeed; ErrcColor col_errc; QColor col_jitter; QColor col_asymm; QColor col_fe; QColor col_te; QColor col_tapit; QColor col_taland; ScaleList scales; }; #endif qpxtool-0.7.1_002/gui/include/hostedit_dialog.h0000644000175000001440000000216411202251736020602 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef HOSTEDIT_DIALOG_H #define HOSTEDIT_DIALOG_H #include #include #include #include class QLabel; class QDialogButtonBox; class QGridLayout; class hostEditDialog : public QDialog { Q_OBJECT public: hostEditDialog(QString host, int port, QWidget* p=NULL, Qt::WindowFlags f=0); ~hostEditDialog(); inline QString hostname() { return e_host->text(); }; inline int port() { return e_port->value(); }; private slots: void setPortDfl(); void hostChanged(QString&); private: QGridLayout *layout; QLabel *l_host; QLineEdit *e_host; QLabel *l_port; QSpinBox *e_port; QPushButton *bdef; QDialogButtonBox *bbox; }; #endif qpxtool-0.7.1_002/gui/include/tab_devinfo.h0000644000175000001440000000351111334746034017723 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_DEVINFO_H #define _TAB_DEVINFO_H #include #include #include class QBoxLayout; class QGridLayout; class QFrame; class QLabel; class QComboBox; #ifdef DINFO_TREE class QTreeWidget; class QTreeWidgetItem; #else #define CAP_COLS 4 class MediaCapWidget; #endif class device; class tabDevInfo : public QWidget { Q_OBJECT public: tabDevInfo(QPxSettings *iset, devlist *idev, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabDevInfo(); public slots: void clear(); void selectDevice(); void updateData(int xcode=0); private: devlist *devices; QPxSettings *settings; QBoxLayout *layout; QGridLayout *layout_left; // basic info QLabel *label_left; QLabel *pl_vendor, *l_vendor, *pl_model, *l_model, *pl_fw, *l_fw, *pl_tla, *l_tla, *pl_buf, *l_buf, *pl_sn, *l_sn; QLabel *pl_iface, *l_iface, *pl_loader, *l_loader; // DVD RPC info QLabel *pl_rpc_phase, *l_rpc_phase, *pl_rpc_reg, *l_rpc_reg, *pl_rpc_ch, *l_rpc_ch, *pl_rpc_rst, *l_rpc_rst; // Plextor Life QFrame *hline0; QLabel *pl_life_dn, *l_life_dn, *pl_life_cr, *l_life_cr, *pl_life_cw, *l_life_cw, *pl_life_dr, *l_life_dr, *pl_life_dw, *l_life_dw; QGridLayout *cap_grid; QLabel *lc_media, *lc_generic; QList cap_media, cap_generic; }; #endif qpxtool-0.7.1_002/gui/include/tab_transfer.h0000644000175000001440000000232311334746067020123 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_TRANSFER_H #define _TAB_TRANSFER_H class QBoxLayout; class QLabel; class ColorLabel; #include #include class tabTransfer : public GraphTab { Q_OBJECT public: tabTransfer(QPxSettings *iset, devlist *idev, QString iname, bool irw, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabTransfer(); public slots: // void clear(); void selectDevice(); void updateLast(); void updateSummary(device*, float); protected: virtual void updateLegend(); virtual void updateGraph(); private: bool rw; QBoxLayout *layout_info; #ifdef __LEGEND_SHOW_SPEED ColorLabel *pl_spd; #endif QLabel *pl_sta; QLabel *l_sta_x; QLabel *l_sta_kb; QLabel *pl_end; QLabel *l_end_x; QLabel *l_end_kb; QLabel *pl_avg; QLabel *l_avg_x; QLabel *l_avg_kb; }; #endif qpxtool-0.7.1_002/gui/include/defs.h0000644000175000001440000000146111222070467016362 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _defs_h #define _defs_h #if defined (_WIN32) #include #if defined(__MINGW32__) #define msleep(t) _sleep(t) #define sleep(t) _sleep((t) << 10) #else #define msleep(t) Sleep(t) #define sleep(t) Sleep((t) << 10) #endif #else #ifndef msleep #define msleep(t) usleep((t) << 10) #endif extern int min(int a, int b); extern int max(int a, int b); #endif #endif qpxtool-0.7.1_002/gui/include/tab_jb.h0000644000175000001440000000224211334746053016665 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_JB_H #define _TAB_JB_H class ColorLabel; class QLabel; class QBoxLayout; #include class tabJB : public GraphTab { Q_OBJECT public: tabJB(QPxSettings *iset, devlist *idev, QString iname, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabJB(); public slots: // void clear(); void selectDevice(); void updateLast(); void updateAll(); void updateSummary(); // void setDevice(device *idev); // void update() { graph->update(); }; protected: virtual void updateLegend(); virtual void updateGraph(); private: QBoxLayout *layout_info; #ifdef __LEGEND_SHOW_SPEED ColorLabel *pl_spd; #endif ColorLabel *pl_jitter; QLabel *l_jmax; QLabel *l_jmin; ColorLabel *pl_asymm; QLabel *l_amax; QLabel *l_amin; }; #endif qpxtool-0.7.1_002/gui/include/tab_ta.h0000644000175000001440000000311011334746061016670 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_TA_H #define _TAB_TA_H class QLabel; class QBoxLayout; class QGroupBox; class QButtonGroup; class QRadioButton; class QPxGraph; class device; class devlist; class QPxSettings; #include #include class tabTA : public QWidget { Q_OBJECT public: tabTA(QPxSettings *iset, devlist *idev, QString iname, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabTA(); void drawGraph(QImage& img, device *dev, int ttype, int eflags=0); public slots: void clear(); void selectDevice(); // void infoToggle(); void updateAll(); void updateLast(); void reconfig(); private: devlist *devices; QPxSettings *settings; QString name; timeval prevT; QBoxLayout *layout; // Selectors/time QBoxLayout *layoutl; QGroupBox *box_layer; QBoxLayout *lay_layer; QButtonGroup *grp_layer; QRadioButton *layer0; QRadioButton *layer1; QGroupBox *box_zone; QBoxLayout *lay_zone; QButtonGroup *grp_zone; QRadioButton *zone0; QRadioButton *zone1; QRadioButton *zone2; QGroupBox *grp_time; QBoxLayout *layoutt; QLabel *ltime; // Pit / Land TA graphs QBoxLayout *layoutg; QPxGraph *graphPit; QPxGraph *graphLand; }; #endif qpxtool-0.7.1_002/gui/include/tab_fete.h0000644000175000001440000000220511334746046017216 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_FETE_H #define _TAB_FETE_H class ColorLabel; class QLabel; class QBoxLayout; #include class tabFETE : public GraphTab { Q_OBJECT public: tabFETE(QPxSettings *iset, devlist *idev, QString iname, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabFETE(); public slots: // void clear(); void selectDevice(); void updateLast(); void updateAll(); void updateSummary(); // void setDevice(device *idev); // void update() { graph->update(); }; protected: virtual void updateLegend(); virtual void updateGraph(); private: QBoxLayout *layout_info; #ifdef __LEGEND_SHOW_SPEED ColorLabel *pl_spd; #endif ColorLabel *pl_fmax; QLabel *l_fmax; ColorLabel *pl_tmax; QLabel *l_tmax; }; #endif qpxtool-0.7.1_002/gui/include/tab_errc.h0000644000175000001440000000270511334746041017226 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_ERRC_H #define _TAB_ERRC_H class QLabel; class ColorLabel; class QPushButton; class QBoxLayout; class ErrcDetailedDialog; #include #include class tabERRC : public GraphTab { Q_OBJECT public: tabERRC(QPxSettings *iset, devlist *idev, QString iname, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabERRC(); public slots: // void clear(); void selectDevice(); void updateAll(); void updateLast(); // void setDevice(device *idev); // void update() { graph->update(); }; void XerrcClosed(); private slots: void updateSummary(device*); void toggleXErrc(); protected: virtual void updateLegend(); virtual void updateGraph(); private: QBoxLayout *layout_info; #ifdef __LEGEND_SHOW_SPEED ColorLabel *pl_spd; #endif ColorLabel *pl_e0; QLabel *l_e0t; QLabel *l_e0m; QLabel *l_e0a; ColorLabel *pl_e1; QLabel *l_e1t; QLabel *l_e1m; QLabel *l_e1a; ColorLabel *pl_e2; QLabel *l_e2t; QLabel *l_e2m; QLabel *l_e2a; QPushButton *pb_xerrc; ErrcDetailedDialog *xerrc; }; #endif qpxtool-0.7.1_002/gui/include/textslider.h0000644000175000001440000000373011200264726017630 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TEXT_SLIDER_H #define _TEXT_SLIDER_H #include #include class SliderItem { public: SliderItem(QString s, bool en = true) { text=s; enabled=en; } inline bool operator==(SliderItem o) { return text==o.text; }; inline bool operator==(SliderItem& o) { return text==o.text; }; inline bool operator==(QString o) { return text==o; }; inline bool operator==(QString& o) { return text==o; }; QString text; bool enabled; }; class TextSlider : public QAbstractSlider { Q_OBJECT public: TextSlider(QWidget *p = NULL); TextSlider(Qt::Orientation, QWidget *p = NULL); void addItem(QString, bool en = true); void setItemEnabled(int, bool); void setItemEnabled(QString, bool); inline void removeItem(QString s) { removeItem(items.indexOf(s)); }; void removeItem(int); void setTickPosition(QSlider::TickPosition); void setUpsideDown(bool); void setOrientation(Qt::Orientation); void first(); void last(); bool prev(); bool next(); int value(); QString text(); public slots: void setValue(int); void setCurrentItem(const QString&); void setEnabled(bool); void setDisabled(bool); protected: void mousePressEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); void mouseMoveEvent(QMouseEvent*); void wheelEvent(QWheelEvent*); void keyPressEvent(QKeyEvent*); void focusInEvent(QFocusEvent*); void focusOutEvent(QFocusEvent*); void paintEvent(QPaintEvent*); private: void initDefaults(); void moveToEnabled(); int oldpos; bool en; QStyleOptionSlider op; QList items; }; #endif qpxtool-0.7.1_002/gui/include/splitbutton.h0000644000175000001440000000161511156144325020032 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef SPLITBUTTON_H #define SPLITBUTTON_H #include class SplitButton : public QWidget { Q_OBJECT public: SplitButton(Qt::Orientation o, QWidget *p=0, Qt::WindowFlags f=0); ~SplitButton(); protected: void paintEvent(QPaintEvent*); void mousePressEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); void enterEvent(QEvent*); void leaveEvent(QEvent*); private: Qt::Orientation orient; bool mouseFocus; signals: void clicked(); }; #endif qpxtool-0.7.1_002/gui/include/about.h0000644000175000001440000000146311222101676016552 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _ABOUT_H #define _ABOUT_H #include class QBoxLayout; class QTabWidget; class QTextEdit; class QLabel; class AboutDialog : public QDialog { Q_OBJECT public: AboutDialog(QWidget *p=NULL, Qt::WindowFlags fl=0); ~AboutDialog(); private: QBoxLayout *layout; QLabel *lversion; QTabWidget *tw; QTextEdit *te_licence; QTextEdit *te_about; }; #endif // _ABOUT_H qpxtool-0.7.1_002/gui/include/pref_colors.h0000644000175000001440000000273411263102376017762 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef PREF_COLORS_H #define PREF_COLORS_H #include #include class QBoxLayout; class QGridLayout; class QPushButton; class QMenu; class QAction; class QLineEdit; class ColorLabel; class prefColors : public QWidget { Q_OBJECT public: prefColors(QPxSettings *iset, QWidget *p=0, Qt::WindowFlags fl=0); ~prefColors(); private slots: void loadPresets(); void savePresets(); void usePreset(); void addPreset(); void delPreset(); void replacePreset(); void presetNameValidate(QString); private: QGridLayout *layout; ColorLabel *lc_bg; ColorLabel *lc_grid; ColorLabel *lc_rspeed; ColorLabel *lc_wspeed; ColorLabel *lc_errc[8]; ColorLabel *lc_jitter; ColorLabel *lc_asymm; ColorLabel *lc_fe; ColorLabel *lc_te; ColorLabel *lc_tapit; ColorLabel *lc_taland; QBoxLayout *layout_presets; QPushButton *pb_preset, *pb_replace, *pb_add, *pb_del; QLineEdit *e_preset; QMenu *menu_preset; QAction *act_default; QList act_presets; QList presets; QPxSettings *set; }; #endif qpxtool-0.7.1_002/gui/include/pref_common.h0000644000175000001440000000246711336760740017762 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef PREF_COMMON_H #define PREF_COMMON_H #include #include class QHBoxLayout; class QVBoxLayout; class QGridLayout; class QFrame; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; class QComboBox; class QCheckBox; class prefCommon : public QWidget { Q_OBJECT public: prefCommon(QPxSettings *iset, QWidget *p=0, Qt::WindowFlags fl=0); ~prefCommon(); private slots: void select_rep_path(); private: QVBoxLayout *layout; QCheckBox *ck_autow, *ck_autob; QLabel *pl_testsw, *pl_testsb; QGridLayout *layout_testsb; QCheckBox *ck_rt, *ck_wt, *ck_wt_simul, *ck_errc, *ck_jb, *ck_ftb, *ck_ftw, *ck_ta; QGroupBox *box_rep; QVBoxLayout *layout_rep; QHBoxLayout *layout_rep_path; QLabel *l_rep_path; QLineEdit *e_rep_path; QPushButton *pb_rep_path; QCheckBox *ck_eject; QPxSettings *set; }; #endif qpxtool-0.7.1_002/gui/include/mcapwidget.h0000644000175000001440000000211111157456321017562 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #define SHOW_X class MediaCapWidget : public QWidget { Q_OBJECT public: // MediaCapWidget(QWidget *p, Qt::WindowFlags f) : QWidget(p,f) {}; MediaCapWidget(QString itext, bool tri, quint64 df, QWidget *p, Qt::WindowFlags f=0); ~MediaCapWidget(); void setText(QString itext); inline quint64 flag() { return cf; }; void setR(quint64 r); void setW(quint64 r); void setCap(quint64 s); void clear(); // inline void setTristate(bool s) { tristate=s; rd=0; wr=0; }; virtual QSize sizeHint() const; protected: void paintEvent(QPaintEvent*); private: void setRW(); quint64 cf; QImage icon; QString text; bool rd, wr, tristate; }; qpxtool-0.7.1_002/gui/include/abstractpreview.h0000644000175000001440000001311011334221522020632 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Maxim Aldanov , Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef QPREVIEW_H #define QPREVIEW_H #include #include #include #include #include //#define PRINTER_CHANGE_DEVICE class QResizeEvent; class QPaintEvent; class QAbstractScrollArea; class QMouseEvent; class QMousePressData; class AbstractPreviewPrivate; class QVariant; class QWheelEvent; class QPageInfo { public: QPageInfo() { fpage = -1; frect = QRect(); } QPageInfo(int page, const QRect &r) { fpage = page; frect = r; } ~QPageInfo() {} QPageInfo &operator=(const QPageInfo &data) { fpage = data.fpage; frect = data.frect; return *this; } bool isValid() { return (bool)(fpage != -1 && !frect.isEmpty()); } int page()const; QRect rect()const; private: int fpage; QRect frect; }; class AbstractPreview : public QAbstractScrollArea { Q_OBJECT friend class AbstractPreviewPrivate; signals: void pageSelected(int); void scaleChanged(double); void pageFormatChanged(); void currentPage(int); public: enum PreviewMode {Mode_Normal, Mode_Thumbs}; AbstractPreview(QWidget *parent, QPrinter *printer); AbstractPreview(QWidget *parent, QPrinter *printer, int _countPage); virtual ~AbstractPreview(); QSize paperSize(); void setInterPageSpacing(int spacing); int interPageSpacing(); void setPageMargin(int margin); int pageMargin(); int pageCount(); int addPages(int count = 1); int insertPages(int index, int count = 1); int deletePages(int index, int count = 1); void clear(); void setPageData(int index, QVariant data); QVariant pageData(int index); void setMargins(qreal ml, qreal mt, qreal mr, qreal mb); void setMarginLeft(qreal ml); void setMarginTop(qreal mt); void setMarginRight(qreal mr); void setMarginBottom(qreal mb); qreal marginLeft(); qreal marginTop(); qreal marginRight(); qreal marginBottom(); int marginLeftPx(); int marginTopPx(); int marginRightPx(); int marginBottomPx(); void setViewMode(AbstractPreview::PreviewMode mode); AbstractPreview::PreviewMode viewMode(); inline void updatePreview() { viewport()->update(); }; void repaintPreview(); void repaintPage(int page); void updatePage(int page, QRect rect); void setScaleStep(double step); double scaleStep(); void setScaleRange(double zmin, double zmax); void setScaleMaximum(double zmax); void setScaleMinimum(double zmin); double scaleMaximum(); double scaleMinimum(); int currentPage(); qreal scale(); int page(QPoint point); QPoint toPage(QPoint point); QPoint toCurrentPage(QPoint point); QRect pageRect(QPoint point); QPixmap *grabPage(int page, const QRectF &rect); QPixmap *grabPage(int page, qreal left, qreal top, qreal width, qreal height); //Движение мышки над Ñтраницами void setMouseTrackingPage(bool mtp); bool isMouseTrackingPage(); //Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ Ñтранице над которой ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð¼Ñ‹ÑˆÐºÐ° QPageInfo enterPageInfo(); QPageInfo pageInfo(int page); QPageInfo pageInfo(const QPoint &point); QVector visiblePages(); //Вход и выход мышки в\из облаÑти Ñтраницы void setMouseEnterLeavePage(bool melp); bool mouseEnterLeavePage(); void setMovedContents(bool move); bool movedContents(); void startMoveContext(const QPoint &point); void moveContext(const QPoint &point); void endMoveContext(); public slots: void setScale(double scale); void pageSetup(); void setupPageFormat(); void print(); void print(QPrinter *printer); void scaleIn(); void scaleOut(); void scaleOrig(); void gotoPage(int index); private: AbstractPreviewPrivate *d; AbstractPreviewPrivate *dv, *dp; void paintBorder(QPainter *p); QPixmap* getTile(int page, int tx, int ty); #ifdef PRINTER_CHANGE_DEVICE void changeDevice(QPaintDevice*); #endif void autoscaleThumbs(); protected slots: protected: int sizeToCountPage(); virtual void printPages(QPrinter *printer); virtual void resizeEvent(QResizeEvent *event); virtual void paintEvent(QPaintEvent *event); virtual void additionalPaintEvent(QPainter *p, int page, const QRect &rect); virtual void scrollContentsBy(int dx, int dy); virtual void mousePressEvent(QMouseEvent *e); virtual void mouseMoveEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); virtual void wheelEvent(QWheelEvent * event); virtual void scaleEvent(const double &scaleOld, const double &scaleNew); virtual void addedPages(int count, int begin); virtual void paintPage(QPainter *p, int numberPage, const QRect&) = 0; virtual void updatePageFormat() = 0; #ifdef PRINTER_CHANGE_DEVICE virtual void deviceChanged(QPaintDevice*) = 0; #endif virtual void clearEvent() = 0; QSize getPaperSize(); QSize getPageSize(); virtual void mousePressPageEvent(QMouseEvent *event, int page, QRect rect, QPoint point); virtual void mouseMovePageEvent(QMouseEvent *event, const QPageInfo &info); }; #endif // QPREVIEW_H qpxtool-0.7.1_002/gui/include/errc_detailed.h0000644000175000001440000000236711337000121020220 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __ERRC_DETAILED_H #define __ERRC_DETAILED_H #include class QGridLayout; class QFrame; class QLabel; class QPxGraph; class QPxSettings; class device; class devlist; class ErrcDetailedDialog : public QDialog { Q_OBJECT public: ErrcDetailedDialog(QPxSettings *iset, devlist *idev, QWidget *p=0, Qt::WindowFlags fl = 0); ~ErrcDetailedDialog(); void updateAll(); void updateGraphs(device *idev = NULL); signals: void closed(); protected: void hideEvent(QHideEvent*); protected slots: void changeScale(); private: devlist *devices; QPxSettings *settings; const char** labels; QGridLayout *layout; QPxGraph *graph[8]; QGridLayout *layoutt; QLabel *pl_tot, *pl_max, *pl_avg; QFrame *hline0, *hline1; QLabel *pl_name[8]; QLabel *l_tot[8]; QLabel *l_max[8]; QLabel *l_avg[8]; }; #endif qpxtool-0.7.1_002/gui/include/image_label.h0000644000175000001440000000256611352121040017655 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __image_label_h #define __image_label_h #include #define HIGHLIGHT_FOCUSED class QLabel; class QLayout; class QBoxLayout; class ImageLabel : public QWidget { Q_OBJECT public: ImageLabel(int minW, QString label, QImage image, int idx, QWidget *parent); ImageLabel(int minW, QSize is, QString label, QImage image, int idx, QWidget *parent); ImageLabel(int minW, int iw, int ih, QString label, QImage image, int idx, QWidget *parent); ~ImageLabel(); inline void setLabel(QString label) { name = label; }; inline void setImage(QImage image) { img = image; }; signals: void selected(int); public slots: void select(int); protected: void mousePressEvent(QMouseEvent*); #ifdef HIGHLIGHT_FOCUSED void enterEvent(QEvent*); void leaveEvent(QEvent*); #endif void paintEvent(QPaintEvent*); private: bool ck; #ifdef HIGHLIGHT_FOCUSED bool focus; #endif QString name; QImage img; int id; int iconw, iconh; int minW; }; #endif qpxtool-0.7.1_002/gui/include/dpi_metrics.h0000644000175000001440000000240311310156554017740 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef DPI_METRICS_H #define DPI_METRICS_H //-------------------------------------------------------------- #include //-------------------------------------------------------------- static inline int inchesToPixelsX(float inches, QPaintDevice *device) { return qRound(inches * device->logicalDpiX()); } static inline int inchesToPixelsY(float inches, QPaintDevice *device) { return qRound(inches * device->logicalDpiY()); } static inline int inchesToPixelsX(float inches, int lDpiX) { return qRound(inches * lDpiX); } static inline int inchesToPixelsY(float inches, int lDpiY) { return qRound(inches * lDpiY); } //-------------------------------------------------------------- static inline float mmToInches(double mm) { return mm*0.039370147; } //-------------------------------------------------------------- #endif // DPI_METRICS_H qpxtool-0.7.1_002/gui/include/testdialog.h0000644000175000001440000000362311334746074017612 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef TEST_DIALOG_H #define TEST_DIALOG_H #include #include #include class QBoxLayout; class QGridLayout; class QGroupBox; class QFrame; class QLabel; class QCheckBox; class QComboBox; class QTextBrowser; class QPushButton; class TestDialog : public QDialog { Q_OBJECT public: TestDialog(QPxSettings *iset, device *idev, QWidget *p, Qt::WindowFlags f=0); ~TestDialog(); device* getDevice(); public slots: void mediaChanged(); private slots: void start(); void updateData(bool save=1, bool setPlugin=1); void WTchecked(bool); void pluginChanged(int); void checkSimul(); private: void winit(); void saveData(); bool noSimul; QGridLayout *layout; QLabel *ldev; QLabel *devid; QLabel *lmedia; QLabel *media; QGroupBox *grp_tests; QGridLayout *layout_tests; QLabel *l_tests; QLabel *l_speeds; QCheckBox *ck_RT; QComboBox *spd_RT; QCheckBox *ck_WT; QComboBox *spd_WT; QCheckBox *ck_WT_simul; QFrame *hline0; QCheckBox *ck_ERRC; QComboBox *spd_ERRC; QCheckBox *ck_JB; QComboBox *spd_JB; QCheckBox *ck_FT; QComboBox *spd_FT; QCheckBox *ck_TA; // QComboBox *spd_TA; QFrame *hline1; QLabel *l_plugin; QComboBox *cb_plugin; QLabel *l_plugin_info; /* QGroupBox *grp_media; QBoxLayout *layout_media; QTextBrowser *media; */ QBoxLayout *layout_butt; QPushButton *butt_run; QPushButton *butt_cancel; // device *dev; QPxSettings *settings; }; #endif // TEST_DIALOG_H qpxtool-0.7.1_002/gui/include/qpxiodevice.h0000644000175000001440000000157011155742500017761 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef QPX_IODEVICE_H #define QPX_IODEVICE_H #include #include #include class QPxIODevice : public QObject { Q_OBJECT public: QPxIODevice(QObject*); ~QPxIODevice(); void setIODevice(QIODevice*); QIODevice* IODevice(); QString readLine(); int linesAvailable(); signals: void readyReadLine(); protected slots: void splitInput(); private: QIODevice *io; QString buf; QStringList lines; }; #endif qpxtool-0.7.1_002/gui/include/device.h0000644000175000001440000002307611336732663016717 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _DEVICE_H #define _DEVICE_H #include #include #include #include #include #include #include #define MINFO_TREE //#define FT_AVG //#define SHOW_SPEEDS #define TEST_MAX 6 #define TEST_RT 0x0001 #define TEST_WT 0x0002 #define TEST_ERRC 0x0004 #define TEST_JB 0x0008 #define TEST_FT 0x0010 #define TEST_TA 0x0020 #ifdef MINFO_TREE class QTreeWidgetItem; #endif class QPxIODevice; class QProcess; class QTcpSocket; #define GRAPH_BLER 1 #define GRAPH_E11 (1 << 1) #define GRAPH_E21 (1 << 2) #define GRAPH_E31 (1 << 3) #define GRAPH_E12 (1 << 4) #define GRAPH_E22 (1 << 5) #define GRAPH_E32 (1 << 6) #define GRAPH_PIE (1 << 1) #define GRAPH_PI8 (1 << 2) #define GRAPH_PIF (1 << 3) #define GRAPH_POE (1 << 4) #define GRAPH_PO8 (1 << 5) #define GRAPH_POF (1 << 6) #define GRAPH_UNCR (1 << 7) #define FEATURE_POWEREC 0x00000001 #define FEATURE_HIDECDR 0x00000002 #define FEATURE_SINGLESESSION 0x00000004 #define FEATURE_SPEEDREAD 0x00000008 #define FEATURE_BITSETR 0x00000010 #define FEATURE_BITSETRDL 0x00000020 #define FEATURE_SIMULPLUS 0x00000040 #define FEATURE_GIGAREC 0x00000080 #define FEATURE_VARIREC_CDBASE 0x00000100 #define FEATURE_VARIREC_CDEXT 0x00000200 #define FEATURE_VARIREC_CD ( FEATURE_VARIREC_CDBASE | FEATURE_VARIREC_CDEXT) #define FEATURE_VARIREC_DVD 0x00000400 #define FEATURE_VARIREC ( FEATURE_VARIREC_CD | FEATURE_VARIREC_DVD ) #define FEATURE_SECUREC 0x00000800 #define FEATURE_SILENT 0x00001000 #define FEATURE_AS_BASE 0x00002000 #define FEATURE_AS_EXT 0x00004000 #define FEATURE_AS ( FEATURE_AS_BASE | FEATURE_AS_EXT ) #define FEATURE_DESTRUCT 0x00008000 #define FEATURE_F1TATTOO 0x00010000 #define FEATURE_PIOLIMIT 0x00020000 #define FEATURE_PIOQUIET 0x00040000 #define FEATURE_LOEJ 0x00080000 #define FEATURE_LOEJ_TOGGLE 0x00100000 #define FEATURE_LOCK 0x00200000 #define FEATURE_LOCK_TOGGLE 0x00400000 #define AS_ACTION_MODE 1 #define AS_ACTION_ACT 2 #define AS_ACTION_DEACT 3 #define AS_ACTION_DEL 4 #define AS_ACTION_CLEAR 5 #define AS_ACTION_CRE 6 #define AS_ACTION_MQCK 7 #define AS_MODE_OFF 0 #define AS_MODE_AUTO 1 #define AS_MODE_ON 2 #define AS_MODE_FORCED 3 #define ASCRE_FULL 8 #define ASCRE_REPLACE 16 #define ASMQCK_ADV 32 #define PIOQ_QUIET 0 #define PIOQ_STD 1 #define PIOQ_PERF 2 #define QPX_FILE_SIGN "QPXD" #if 0 // chunk. cnout = 1 #define META_TEST_ERRC_SUMMARY 57 #define META_TEST_JB_SUMMARY 58 #define META_TEST_FT_SUMMARY 59 #endif struct ASDB_item { bool present, active; QString type; QString mid,speed,writes; }; typedef QList ASDB; struct DevFeatures { int supported; int enabled; int prec_spd; float grec; char vrec_cd_pwr; int vrec_cd_str; char vrec_dvd_pwr; int vrec_dvd_str; QString sr_pass; int sm_cd_rd, sm_cd_wr, sm_dvd_rd; bool sm_access; // 0 = slow, 1 = fast int sm_trayl, sm_traye; bool sm_nosave; int psm_cd_rd, psm_cd_wr, psm_dvd_rd; // psm_dvd_wr; bool psm_access; // 0 = slow, 1 = fast int psm_trayl, psm_traye; int tattoo_inner, tattoo_outer; QString tattoo_file; int as_action; int as_act_mode; int as_mode; int as_idx; int as_mqckspd; QString as_mqckres; int pioq_quiet; bool pioq_nosave; }; struct DI_Transfer { quint64 lba; float spdx; uint32_t spdk; }; template struct Errc_ARRAY { quint64 lba; float spdx; T err[8]; }; template struct Errc_CD { quint64 lba; float spdx; T bler; T e11, e21, e31; T e12, e22, e32; T uncr; }; template struct Errc_DVD { quint64 lba; float spdx; T res; T pie, pi8, pif; T poe, po8, pof; T uncr; }; template union Errc { Errc_ARRAY raw; Errc_CD cd; Errc_DVD dvd; }; typedef Errc DI_Errc; typedef Errc TOT_Errc; typedef Errc AVG_Errc; void ErrcADD(TOT_Errc *tot, const DI_Errc& o); void ErrcMAX(DI_Errc *max, const DI_Errc& o); void CDErrcAVG(AVG_Errc *avg, TOT_Errc *tot, uint64_t blocks); void DVDErrcAVG(AVG_Errc *avg, TOT_Errc *tot, uint64_t blocks); struct DI_JB { quint64 lba; float spdx; float jitter; float asymm; }; struct MM_JB { float jmin; float jmax; float bmin; float bmax; }; struct DI_FT { quint64 lba; float spdx; quint32 fe; quint32 te; }; struct DI_TA { //float T; int idx; int pit; int land; }; class TestData { public: TestData() {}; ~TestData() {}; void clear() { clearRT(); clearWT(); clearErrc(); clearJB(); clearFT(); clearTA(); }; inline void clearRT() { rt.clear(); rt_time = 0; }; inline void clearWT() { wt.clear(); wt_time = 0; }; inline void clearErrc() { errc.clear(); errc_time = 0; errcTOT.raw.spdx=0.0; for (int i=0; i<8; i++) errcTOT.raw.err[i]=0; errcMAX.raw.spdx=0.0; for (int i=0; i<8; i++) errcMAX.raw.err[i]=0; errcAVG.raw.spdx=0.0; for (int i=0; i<8; i++) errcAVG.raw.err[i]=0.0; }; inline void clearJB() { jb.clear(); jb_time = 0; jbMM.jmin=0.0; jbMM.jmax=0.0; jbMM.bmin=0.0; jbMM.bmax=0.0; }; inline void clearFT() { ft.clear(); ft_time = 0; ftMAX.fe = 0; ftMAX.te = 0; }; inline void clearTA() { for (int i=0; i<6; i++) ta[i].clear(); ta_time = 0; }; QList rt; QList wt; QList errc; QList jb; QList ft; QList ta[6]; TOT_Errc errcTOT; DI_Errc errcMAX; AVG_Errc errcAVG; MM_JB jbMM; DI_FT ftMAX; float rt_time; float wt_time; float errc_time; float jb_time; float ft_time; float ta_time; }; struct MediaInfo { QString type; // bool isCD; // bool isDVD; int spd1X; // int itype; QString category; QString mid; QString layers; int ilayers; QString prot; QString regions; int creads; int creadm; QString creadmsf; int cfrees; int cfreem; QString cfreemsf; int ctots; int ctotm; QString ctotmsf; QString erasable; QString dstate; QString sstate; QStringList rspeeds; QStringList wspeedsd; QStringList wspeedsm; QStringList tspeeds_errc; int tdata_errc; QStringList tspeeds_jb; float grec; QString writer; }; struct TestSpeeds { int32_t rt, wt, errc, jb, ft; }; class MediaWatcher; class device : public QObject { Q_OBJECT public: enum devtype { DevtypeNone = 0, DevtypeVirtual = 1, DevtypeLocal = 2, DevtypeTCP = 3 }; enum ThreadType { threadNone = 0, threadDevice = 1, threadMedia = 2, threadTest = 3, threadGetFeatures = 4, threadGetASDB = 5, threadMQCK = 6, threadAScre = 7, threadDestruct = 8, threadTattoo = 9 }; device(QObject* p); ~device(); bool isRunning(); void clearMinfo(); bool update_device_info(); bool update_media_info(); void clear_media_info(); bool update_plugin_info(); bool getFeatures(); bool getASDB(); bool setFeature(int, bool); bool setComplexFeature(int, DevFeatures*); bool startMqck(); bool startAScre(); bool startDestruct(); bool startTattoo(); bool start_tests(); bool stop_tests(); void startWatcher(); void stopWatcher(); void pauseWatcher(); void unpauseWatcher(); bool save(QIODevice*); bool load(QIODevice*); devtype type; QString host; uint16_t port; QString path; QString id; QString ven; QString dev; QString fw; QString tla; QString sn; QString buf; QString iface; QString loader; int32_t life_dn; QString life_cr, life_cw, life_dr, life_dw; int8_t rpc_phase; int8_t rpc_reg; int8_t rpc_ch; int8_t rpc_rst; bool info_set; uint64_t cap; uint64_t cap_rd; uint64_t cap_wr; bool plextor_lock; int test_cap; int test_req; int tests, ctest; int test_spd; QString plugin; QStringList plugin_names; QStringList plugin_infos; QString nprocess; float pprocess; DevFeatures features; ASDB asdb; MediaInfo media; TestData testData; TestSpeeds tspeeds; bool WT_simul; timeval timeSta; QMutex *mutex; QMutex *io_mutex; QProcess *proc; QTcpSocket *sock; QPxIODevice *io; bool autoupdate; #ifdef MINFO_TREE QList info_media; #endif /* uint64_t caps; uint64_t caps_rd; uint64_t caps_wr; */ private slots: void qscan_process_info(); void qscan_process_test(); void qscan_callback_info(); void qscan_callback_test(); void watcherStarted(); void watcherStoped(); void watcherEventLoading(); void watcherEventRemoved(); void watcherEventNew(); void watcherEventNoMedia(); signals: void mediaRemoved(); void mediaNew(); void doneDInfo(int); void doneMInfo(int); void doneGetFeatures(int); void doneGetASDB(int); void process_started(); void process_finished(); void process_progress(); void testsDone(); void testsError(); void block_RT(); void block_WT(); void block_ERRC(); void block_JB(); void block_FT(); void block_TA(); private: void qscan_process_line(QString&); void cdvdcontrol_process_line(QString&); void cdvdcontrol_process_asdb(QString&); bool start(); bool start_update_info(); bool next_test(); ThreadType threadType; bool stop; bool running; bool preserveMediaInfo; int taIdx; MediaWatcher *mwatcher; }; class devlist : public QList { public: devlist(); ~devlist(); int idx(); void setIdx(int iidx); void clear(); device* current(); int devidx; }; #endif qpxtool-0.7.1_002/gui/include/preferences.h0000644000175000001440000000236111334760055017745 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _PREFERENCES_H #define _PREFERENCES_H #define PREF_PAGES 3 #include #include class QFrame; class ImagesList; class QHBoxLayout; class QVBoxLayout; class QScrollArea; class QPushButton; class QPxPreferences : public QDialog { Q_OBJECT public: QPxPreferences(QPxSettings *iset, QWidget *p=0, Qt::WindowFlags f=0); virtual ~QPxPreferences(); public slots: void setPage(int); private slots: void save(); void cancel(); protected: void closeEvent(QCloseEvent*); void keyPressEvent(QKeyEvent*); private: void winit(); int curPage; QPxSettings set; QPxSettings *set_old; QHBoxLayout *layout; ImagesList *ilist; QVBoxLayout *parea; QFrame *hline0; QHBoxLayout *layout_butt; QPushButton *pb_save, *pb_cancel; // QWidget* pagew; QWidget* pages[PREF_PAGES]; }; #endif qpxtool-0.7.1_002/gui/include/mwatcher.h0000644000175000001440000000153211334757342017262 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef MWATCHER_H #define MWATCHER_H class device; class drive_info; #include class MediaWatcher: public QThread { Q_OBJECT public: MediaWatcher(device *qdev); ~MediaWatcher(); void stop(); void pause(); void unPause(); signals: void mediaLoading(); void mediaRemoved(); void mediaNew(); void mediaNoMedia(); protected: virtual void run(); private: bool preq,sreq; drive_info *dev; }; #endif qpxtool-0.7.1_002/gui/include/devsettings_widgets.h0000644000175000001440000001467011352124251021527 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _DEVSETTINGS_WIDGETS_H #define _DEVSETTINGS_WIDGETS_H #include #include #include class QBoxLayout; class QGridLayout; class QLabel; class QLineEdit; class QCheckBox; class QComboBox; class QPushButton; class QRadioButton; class QTreeWidget; class QTreeWidgetItem; class QButtonGroup; class QSlider; class TextSlider; class device; class devctlAutostrategy; class TattooWidget; class devctlCommon : public QGroupBox { Q_OBJECT public: devctlCommon(device* idev, QWidget* p=NULL); ~devctlCommon() {}; private slots: void set_prec(bool); void set_hcdr(bool); void set_ss(bool); void set_spdrd(bool); void set_bitset(bool); void set_bitset_dl(bool); void set_simulplus(bool); private: device* dev; QGridLayout *layout; QCheckBox *ck_prec; QLabel *pl_prec; QLabel *l_prec; QCheckBox *ck_hcdr, *ck_ss, *ck_spdrd, *ck_bitset, *ck_bitset_dl, *ck_simulplus; devctlAutostrategy *as; }; // GigaRec control class devctlGigarec : public QGroupBox { Q_OBJECT public: devctlGigarec(device* idev, QWidget* p=NULL); ~devctlGigarec() {}; private slots: void set(bool); void set(); private: device* dev; QBoxLayout *layout; TextSlider *grec_ratio; QLabel *l_cap; QLabel *l_ncap; QLabel *l_hint; }; // VariRec control class devctlVarirecBase : public QGroupBox { Q_OBJECT public: devctlVarirecBase(device* idev, QString title, QWidget* p=NULL); ~devctlVarirecBase() {}; protected: device* dev; QBoxLayout *layout; QLabel *pl_pwr; TextSlider *pwr; QBoxLayout *layouts; QLabel *pl_str; QComboBox *str; QLabel *l_hint; }; // VariRec control (CD) class devctlVarirecCD : public devctlVarirecBase { Q_OBJECT public: devctlVarirecCD(device* idev, QWidget* p=NULL); ~devctlVarirecCD() {}; private slots: void set(bool); void set(); }; // VariRec control (DVD) class devctlVarirecDVD : public devctlVarirecBase { Q_OBJECT public: devctlVarirecDVD(device* idev, QWidget* p=NULL); ~devctlVarirecDVD() {}; private slots: void set(bool); void set(); }; class devctlVarirec: public QWidget { Q_OBJECT public: devctlVarirec(device* idev, QWidget* p=NULL); ~devctlVarirec() {}; private: QBoxLayout *layout; devctlVarirecCD *vrec_cd; devctlVarirecDVD *vrec_dvd; }; // SecuRec control class devctlSecurec : public QGroupBox { Q_OBJECT public: devctlSecurec(device* idev, QWidget* p=NULL); ~devctlSecurec() {}; private slots: void set(); void reset(); int validate(); private: device* dev; QGridLayout *layout; QLabel *l_pwd[2]; QLineEdit *e_pwd[2]; QFrame *hline0; QPushButton *pb_set; QLabel *l_active; QPushButton *pb_reset; QLabel *l_hint; }; // Silent Mode control class devctlSilent : public QWidget { Q_OBJECT public: devctlSilent(device* idev, QWidget* p=NULL); ~devctlSilent() {}; private slots: void set(); private: device* dev; QBoxLayout *layoutm; QGroupBox *cw; QGridLayout *layout; QLabel *h_speed, *h_access, *h_tray; // R/W Speeds QLabel *spdr, *spdw, *spdc, *spdd; QComboBox *box_rcd, *box_wcd, *box_rdvd, *box_wdvd; // Access time QButtonGroup *grp_access; QRadioButton *a_slow, *a_fast; // Tray speed QLabel *l_load, *l_eject; QSlider *s_load, *s_eject; QBoxLayout *layoutb; QCheckBox *ck_perm; QPushButton *pb_save; }; // AutoStrategy control class devctlAutostrategy : public QWidget { Q_OBJECT public: devctlAutostrategy(device* idev, QWidget* p=NULL); ~devctlAutostrategy() {}; private slots: void asdb(); void set_mode(int); void run_mqck(); private: device* dev; QGridLayout *layout; // AS mode QGroupBox *box_as; QGridLayout *layout_as; QButtonGroup *grp_mode; QRadioButton *rb_as_on, *rb_as_off, *rb_as_auto, *rb_as_forced; QPushButton *pb_asdb; // MQCK QGroupBox *box_mqck; QGridLayout *layout_mqck; QButtonGroup *grp_mqck; QRadioButton *rb_mqck_q, *rb_mqck_a; QLabel *lmqck_spd; QComboBox *bmqck_spd; QPushButton *pb_mqck; QLabel *lmqck_res; }; // AutoStrategy DB control class devctlAutostrategyDB : public QDialog { Q_OBJECT public: devctlAutostrategyDB(device* idev, QWidget* p=NULL); ~devctlAutostrategyDB() {}; public slots: void setVisible(bool); private slots: void db_toggle(QTreeWidgetItem*); void db_act(); void db_act(int); void db_deact(); void db_deact(int); void db_del(); void db_clear(); void run_ascre(); void db_update(int idx=-1); void db_update_done(bool); private: device* dev; QBoxLayout *layout; QBoxLayout *layoutb; QTreeWidget *tree; QPushButton *pb_act, *pb_deact, *pb_del, *pb_clear; // Strategy creation QGroupBox *box_ascre; QGridLayout *layout_ascre; QGroupBox *grp_ascre_mode, *grp_ascre_act; QBoxLayout *layout_crem, *layout_crea; QRadioButton *rb_ascre_quick, *rb_ascre_full, *rb_ascre_add, *rb_ascre_replace; QPushButton *ascre_start; }; // PlexEraser control class devctlDestruct : public QGroupBox { Q_OBJECT public: devctlDestruct(device* idev, QWidget* p=NULL); ~devctlDestruct() {}; private slots: void start(); private: device* dev; QGridLayout *layout; QRadioButton *rb_quick; QLabel *pl_quick; QRadioButton *rb_full; QLabel *pl_full; QPushButton *pb_start; QLabel *l_hint; }; // Pioneer QuietMode class devctlPioquiet : public QGroupBox { Q_OBJECT public: devctlPioquiet(device* idev, QWidget* p=NULL); ~devctlPioquiet() {}; private slots: void set(); private: device* dev; QGridLayout *layout; QGroupBox *box_mode; QBoxLayout *layoutm; QRadioButton *rb_quiet; QRadioButton *rb_std; QRadioButton *rb_perf; QCheckBox *ck_limit; QCheckBox *ck_perm; QPushButton *pb_set; }; // Yamaha CRW-F1 Disc T@2 class devctlF1Tattoo : public QGroupBox { Q_OBJECT public: devctlF1Tattoo(device* idev, QWidget* p=NULL); ~devctlF1Tattoo() {}; private slots: void loadImage(); void burn(); private: device* dev; int r0,r1; QImage srcimg, img; QGridLayout *layout; TattooWidget *tw; QBoxLayout *layoutb; QLabel *l_file; QPushButton *pb_load; QPushButton *pb_burn; }; #endif qpxtool-0.7.1_002/gui/include/colorlabel.h0000644000175000001440000000171411334745644017572 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef COLOR_LABEL_H #define COLOR_LABEL_H #include #include class ColorLabel : public QWidget { public: ColorLabel(QColor icol, QString itext, bool ieditable, QWidget *p=0, Qt::WindowFlags f=0); ~ColorLabel(); inline QColor color() { return col; }; inline void setColor(QColor c) { col = c; update(); }; inline void setText(QString t) { text = t; update(); }; protected: void mousePressEvent(QMouseEvent*); void paintEvent(QPaintEvent*); private: QColor col; QString text; bool editable; }; #endif qpxtool-0.7.1_002/gui/include/tab_mediainfo.h0000644000175000001440000000445411265602013020222 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _TAB_MEDIAINFO_H #define _TAB_MEDIAINFO_H #include #include #include class QBoxLayout; class QGridLayout; class QLabel; class QFrame; class QPushButton; class QCheckBox; #ifdef MINFO_TREE class QTreeWidget; class QTreeWidgetItem; #endif class tabMediaInfo : public QWidget { Q_OBJECT public: tabMediaInfo(QPxSettings *iset, devlist *idev, QWidget *p=0, Qt::WindowFlags fl = 0); ~tabMediaInfo(); public slots: void clear(); void selectDevice(); void updateData(int xcode=0); private: devlist *devices; QPxSettings *settings; QBoxLayout *layout; QGridLayout *layout_info; QLabel *pl_type; QLabel *l_type; QLabel *pl_book; QLabel *l_book; QLabel *pl_mid; QLabel *l_mid; QLabel *pl_layers; QLabel *l_layers; QLabel *pl_erasable; QLabel *l_erasable; QLabel *pl_prot; QLabel *l_prot; QLabel *pl_regions; QLabel *l_regions; QLabel *pl_writer; QLabel *l_writer; QGridLayout *l_cap; QLabel *pl_cread; QLabel *l_creads; QLabel *l_creadm; QLabel *l_creadmsf; QLabel *pl_cfree; QLabel *l_cfrees; QLabel *l_cfreem; QLabel *l_cfreemsf; QLabel *pl_ctot; QLabel *l_ctots; QLabel *l_ctotm; QLabel *l_ctotmsf; QLabel *pl_dstate; QLabel *l_dstate; QLabel *pl_sstate; QLabel *l_sstate; QLabel *pl_rspeeds; QLabel *l_rspeeds; QLabel *pl_wspeedsm; QLabel *l_wspeedsm; QLabel *pl_wspeedsd; QLabel *l_wspeedsd; QFrame *hline0; // media speeds info #ifdef SHOW_SPEEDS QLabel *pl_rd_max; QLabel *l_rd_max; QLabel *pl_rd_lst; QComboBox *c_rd_lst; QLabel *pl_wr_max; QLabel *l_wr_max; QLabel *pl_wr_lst; QComboBox *c_wr_lst; #endif #if 0 QCheckBox *ch_rt; QCheckBox *ch_wt; QCheckBox *ch_errc; QCheckBox *ch_jb; QCheckBox *ch_fete; QCheckBox *ch_ta; #endif // device *dev; #ifdef MINFO_TREE QTreeWidget *minfo; QTreeWidgetItem *minfo_detail; #endif }; #endif qpxtool-0.7.1_002/gui/include/pref_devices.h0000644000175000001440000000213111334745772020106 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef PREF_DEVICES_H #define PREF_DEVICES_H #include class QLabel; class QCheckBox; class QGroupBox; class QTreeWidget; class QBoxLayout; class QPxSettings; class prefDevices : public QWidget { Q_OBJECT public: prefDevices(QPxSettings *iset, QWidget *p=0, Qt::WindowFlags f=0); virtual ~prefDevices(); protected: bool eventFilter(QObject* obj, QEvent* e); void hostsContextMenu(QContextMenuEvent* e); private slots: void hostAdd(); void hostEdit(); void hostRemove(); private: QBoxLayout *layout; QCheckBox *ck_local; QCheckBox *ck_remote; // QGroupBox *g_hosts; // QBoxLayout *l_hosts; QTreeWidget *lst_hosts; QPxSettings *set; }; #endif qpxtool-0.7.1_002/gui/include/version.h0000644000175000001440000000100411334746106017123 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _QPX_VERSION_H #define _QPX_VERSION_H #define VERSION "0.7.1" #endif qpxtool-0.7.1_002/gui/include/graphtab.h0000644000175000001440000000304311334745714017237 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef GRAPHTAB_H #define GRAPHTAB_H #include #include class device; class QLabel; class QFrame; class QGroupBox; class QBoxLayout; class SplitButton; class QPxGraph; class devlist; class QPxSettings; // #define __LEGEND_SHOW_SPEED class GraphTab : public QWidget { Q_OBJECT public: GraphTab(QPxSettings *iset, devlist *idev, QString iname, int test, QWidget *p=0, Qt::WindowFlags fl = 0); ~GraphTab(); void drawGraph(QImage& img, device *dev, int ttype, int eflags=0); public slots: void clear(); virtual void selectDevice()=0; void updateLast(int, bool *Tvalid=NULL, bool force=0); // void setDevice(device *idev); void reconfig() { updateLegend(); updateGraph(); }; private slots: void infoToggle(); protected: virtual void updateGraph()=0; virtual void updateLegend()=0; devlist *devices; QPxSettings *settings; QWidget *infow; QPxGraph *graph; QLabel *ltime; timeval prevT; private: QString name; QBoxLayout *layout; QBoxLayout *layoutl; QWidget *lw; QGroupBox *grp_time; QBoxLayout *layoutt; SplitButton *split; QFrame *vline0; // bool prevTvalid; }; #endif qpxtool-0.7.1_002/gui/include/mainwidget.h0000644000175000001440000000310211336764720017573 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _MAINWIDGET_H #define _MAINWIDGET_H #include class QBoxLayout; class QStackedLayout; class QFrame; class QAbstractButton; class QPushButton; class QButtonGroup; #include #include class QIODevice; class tabDevInfo; class tabMediaInfo; class tabTransfer; class tabERRC; class tabJB; class tabFETE; class tabTA; class QPxGraph; class QPxMainWidget : public QWidget { Q_OBJECT public: QPxMainWidget(QPxSettings *iset, devlist *idev, QWidget *p=0); ~QPxMainWidget(); void drawGraph(QImage& img, device *dev, int ttype, int eflags=0); public slots: void clearDev(); void clearMedia(); void selectDevice(); void reconfig(); //inline void reconfig() { emit configured(); }; private slots: signals: void deviceSelected(); void configured(); private: devlist *devices; QPxSettings *settings; QBoxLayout *layout; QFrame *bframe; QBoxLayout *layout_buttons; QButtonGroup *grp; QStackedLayout *stack; tabDevInfo *tab_DevInfo; tabMediaInfo *tab_MediaInfo; tabTransfer *tab_RT; tabTransfer *tab_WT; tabERRC *tab_ERRC; tabJB *tab_JB; tabFETE *tab_FETE; tabTA *tab_TA; }; #endif qpxtool-0.7.1_002/gui/include/qpxgraph.h0000644000175000001440000000541211334746015017276 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef QPX_GRAPH_H #define QPX_GRAPH_H #include #include #include #include //#define CACHE_GRAPH //#define ENABLE_UNCR #define NOFORCE_REPAINT 0 #define FORCE_REPAINT 1 class QPxGraph : public QWidget { Q_OBJECT public: QPxGraph(QPxSettings *iset, devlist *idev, QString iname, int ttype, QWidget *p=0, Qt::WindowFlags fl = 0); ~QPxGraph(); // void setDataNames(QStringList dn); // void setZeroPos(float); // float zeroPos(); void drawGraph(QPainter*, QSize, device*, int ttype, const QRect& rect, int eflags=0, bool forceRepaint=0); void setErrcList(int, QString glabel); void setErrcShow(int, bool); void setShowSpeed(bool); void setRightMarginHidden(bool); int getLastX(); public slots: void setZoneTA(int zone); void setLayerTA(int layer); void setModeTA(bool mode) { taMode = mode; }; void changeScale(int idx=0); protected: void contextMenuEvent(QContextMenuEvent*); void paintEvent(QPaintEvent*); void resizeEvent(QResizeEvent*); void wheelEvent(QWheelEvent*); void drawTransfer(QPainter*, const QSize&, device*, const QRect& rect, bool rw); void drawErrc(QPainter*, const QSize&, device*, const QRect& rect); void drawJB(QPainter*, const QSize&, device*, const QRect& rect); void drawFT(QPainter*, const QSize&, device*, const QRect& rect); void drawTA(QPainter*, const QSize&, device*, const QRect& rect); void drawGrid(QPainter*, const QSize&, device*, int ttype); void drawGridTA(QPainter*, const QSize&, device*, int ttype); private slots: void setScalePolicyAuto(); void setScalePolicyFixed(); void setScaleTypeLog(); void setScaleTypeLin(); void setScaleValue( int val, int idx=-1); void scaleIn(int idx=0); void scaleOut(int idx=0); signals: void scaleChanged(); private: bool taMode; // 0 - Pit, 1 - Land int taZone; int taLayer; int errc2h(int h, int val); int jitter2h(int h, float val); int asymm2h(int h, float val); int ta2h(int h, int val); double Hscale; double HscaleLBA; float Vscale; float Vscale1X; int test; bool showspeed; devlist *devices; QPxSettings *settings; QString label; QString name[2]; QStringList dataNames; Scale *scale[2]; // float zeropos; uint8_t errcList; bool forceAll; uint64_t lastX; #ifdef CACHE_GRAPH QImage *img; #endif int margin_left, margin_right, margin_bottom; }; #endif qpxtool-0.7.1_002/gui/include/devsettings.h0000644000175000001440000000207611207673377020017 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef _DEVSETTINGS_H #define _DEVSETTINGS_H #include class QBoxLayout; class QGridLayout; class QTreeWidget; class QTreeWidgetItem; class ImagesList; class QLabel; class QLineEdit; class QCheckBox; class QComboBox; class QPushButton; class TextSlider; class QPxSettings; class device; class devSettings : public QDialog { Q_OBJECT public: devSettings(QPxSettings *iset, device *idev, QWidget *p=0, Qt::WindowFlags fl = 0); ~devSettings(); public slots: private slots: void setPage(int); private: QBoxLayout *layout; QBoxLayout *layoutc; ImagesList *ilist; QWidget *cpage; QPxSettings *set; device *dev; }; #endif qpxtool-0.7.1_002/lib/0000755000175000001440000000000011352116471013625 5ustar shultzusersqpxtool-0.7.1_002/lib/lib/0000755000175000001440000000000011352127612014372 5ustar shultzusersqpxtool-0.7.1_002/lib/Makefile0000644000175000001440000000360211315062705015265 0ustar shultzusersall: qpxtransport qpxplextor qpxpioneer qpxyamaha qpxscan #build targets qpxtransport: $(MAKE) -C qpxtransport DIR=qpxtransport qpxplextor: qpxtransport $(MAKE) -C qpxplextor DIR=qpxplextor qpxpioneer: qpxtransport $(MAKE) -C qpxpioneer DIR=qpxpioneer qpxyamaha: qpxtransport $(MAKE) -C qpxyamaha DIR=qpxyamaha qpxscan: qpxtransport qpxplextor $(MAKE) -C qpxscan DIR=qpxscan #clean targets clean: qpxtransport-clean qpxplextor-clean qpxpioneer-clean qpxyamaha-clean qpxscan-clean qpxtransport-clean: $(MAKE) -C qpxtransport DIR=qpxtransport clean qpxplextor-clean: $(MAKE) -C qpxplextor DIR=qpxplextor clean qpxpioneer-clean: $(MAKE) -C qpxpioneer DIR=qpxpioneer clean qpxyamaha-clean: $(MAKE) -C qpxyamaha DIR=qpxyamaha clean qpxscan-clean: $(MAKE) -C qpxscan DIR=qpxscan clean #install targets install: install-prereq qpxtransport-inst qpxplextor-inst qpxpioneer-inst qpxyamaha-inst qpxscan-inst install-prereq: mkdir -p $(DESTDIR)$(INCDIR)/qpxtool qpxtransport-inst: $(MAKE) -C qpxtransport DIR=qpxtransport install qpxplextor-inst: $(MAKE) -C qpxplextor DIR=qpxplextor install qpxpioneer-inst: $(MAKE) -C qpxpioneer DIR=qpxpioneer install qpxyamaha-inst: $(MAKE) -C qpxyamaha DIR=qpxyamaha install qpxscan-inst: $(MAKE) -C qpxscan DIR=qpxscan install #uninstall targets uninstall: qpxtransport-uninst qpxplextor-uninst qpxpioneer-uninst qpxyamaha-uninst qpxscan-uninst rm -rf $(DESTDIR)$(INCDIR)/qpxtool qpxtransport-uninst: $(MAKE) -C qpxtransport DIR=qpxtransport uninstall qpxplextor-uninst: $(MAKE) -C qpxplextor DIR=qpxplextor uninstall qpxpioneer-uninst: $(MAKE) -C qpxpioneer DIR=qpxpioneer uninstall qpxyamaha-uninst: $(MAKE) -C qpxyamaha DIR=qpxyamaha uninstall qpxscan-uninst: $(MAKE) -C qpxscan DIR=qpxscan uninstall .PHONY: all clean install install-prereq uninstall qpxtransport qpxplextor qpxpioneer qpxyamaha qpxscan qpxtool-0.7.1_002/lib/qpxtransport/0000755000175000001440000000000011352127612016411 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxtransport/common_functions.cpp0000644000175000001440000001434111334460113022474 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include "common_functions.h" // 64-bit wide functions int64_t bswap64__internal(char* c) { char d[8]; d[0]=c[7]; d[1]=c[6]; d[2]=c[5]; d[3]=c[4]; d[4]=c[3]; d[5]=c[2]; d[6]=c[1]; d[7]=c[0]; return *(int64_t*)d; } uint64_t bswap64u__internal(char* c) { char d[8]; d[0]=c[7]; d[1]=c[6]; d[2]=c[5]; d[3]=c[4]; d[4]=c[3]; d[5]=c[2]; d[6]=c[1]; d[7]=c[0]; return *(uint64_t*)d; } int64_t balign64__internal(char* c) { char d[8]; d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; d[4]=c[4]; d[5]=c[5]; d[6]=c[6]; d[7]=c[7]; return *(int64_t*)d; } uint64_t balign64u__internal(char* c) { char d[8]; d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; d[4]=c[4]; d[5]=c[5]; d[6]=c[6]; d[7]=c[7]; return *(uint64_t*)d; } int64_t qpx_bswap64(char* c) { return bswap64__internal(c); }; int64_t qpx_bswap64(unsigned char* c) { return bswap64__internal((char*)c); }; int64_t qpx_bswap64(int64_t c) { return bswap64__internal((char*)&c); } int64_t qpx_bswap64(uint64_t c) { return bswap64__internal((char*)&c); } uint64_t qpx_bswap64u(char* c) { return bswap64u__internal(c); }; uint64_t qpx_bswap64u(unsigned char* c) { return bswap64u__internal((char*)c); }; uint64_t qpx_bswap64u(int64_t c) { return bswap64u__internal((char*)&c); } uint64_t qpx_bswap64u(uint64_t c) { return bswap64u__internal((char*)&c); } int64_t to64(char* c) { return balign64__internal(c); }; int64_t to64(unsigned char* c) { return balign64__internal((char*)c); }; int64_t to64(int64_t c) { return c; } int64_t to64(uint64_t c) { return (int64_t)c; } uint64_t to64u(char* c) { return balign64u__internal(c); }; uint64_t to64u(unsigned char* c) { return balign64u__internal((char*)c); }; uint64_t to64u(int64_t c) { return (uint64_t)c; } uint64_t to64u(uint64_t c) { return c; } // 32-bit wide functions int32_t bswap32__internal(char* c) { char d[4]; d[0]=c[3]; d[1]=c[2]; d[2]=c[1]; d[3]=c[0]; return *(int32_t*)d; } uint32_t bswap32u__internal(char* c) { char d[4]; d[0]=c[3]; d[1]=c[2]; d[2]=c[1]; d[3]=c[0]; return *(uint32_t*)d; } int32_t balign32__internal(char* c) { char d[4]; d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; return *(int32_t*)d; } uint32_t balign32u__internal(char* c) { char d[4]; d[0]=c[0]; d[1]=c[1]; d[2]=c[2]; d[3]=c[3]; return *(uint32_t*)d; } int32_t qpx_bswap32(char* c) { return bswap32__internal(c); }; int32_t qpx_bswap32(unsigned char* c){ return bswap32__internal((char*)c); }; int32_t qpx_bswap32(int32_t c) { return bswap32__internal((char*)&c); } int32_t qpx_bswap32(uint32_t c) { return bswap32__internal((char*)&c); } uint32_t qpx_bswap32u(char* c) { return bswap32u__internal(c); }; uint32_t qpx_bswap32u(unsigned char* c) { return bswap32u__internal((char*)c); }; uint32_t qpx_bswap32u(int32_t c) { return bswap32u__internal((char*)&c); } uint32_t qpx_bswap32u(uint32_t c) { return bswap32u__internal((char*)&c); } int32_t to32(char* c) { return balign32__internal(c); }; int32_t to32(unsigned char* c) { return balign32__internal((char*)c); }; int32_t to32(int32_t c) { return c; } int32_t to32(uint32_t c) { return (int32_t)c; } uint32_t to32u(char* c) { return balign32u__internal(c); }; uint32_t to32u(unsigned char* c) { return balign32u__internal((char*)c); }; uint32_t to32u(int32_t c) { return *(uint32_t*)c; } uint32_t to32u(uint32_t c) { return c; } // 16-bit wide functions int16_t bswap16__internal(char* c) { char d[2]; d[0]=c[1]; d[1]=c[0]; return *(int16_t*)d; } uint16_t bswap16u__internal(char* c) { char d[2]; d[0]=c[1]; d[1]=c[0]; return *(uint16_t*)d; } int16_t balign16__internal(char* c) { char d[2]; d[0]=c[0]; d[1]=c[1]; return *(int16_t*)d; } uint16_t balign16u__internal(char* c) { char d[2]; d[0]=c[0]; d[1]=c[1]; return *(uint16_t*)d; } int16_t qpx_bswap16(char* c) { return bswap16__internal(c); } int16_t qpx_bswap16(unsigned char* c) { return bswap16__internal((char*)c); } int16_t qpx_bswap16(int16_t c) { return bswap16__internal((char*)&c); } int16_t qpx_bswap16(uint16_t c) { return bswap16__internal((char*)&c); } uint16_t qpx_bswap16u(char* c) { return bswap16u__internal(c); } uint16_t qpx_bswap16u(unsigned char* c) { return bswap16u__internal((char*)c); } uint16_t qpx_bswap16u(int16_t c) { return bswap16__internal((char*)&c); } uint16_t qpx_bswap16u(uint16_t c) { return bswap16__internal((char*)&c); } int16_t to16(char* c) { return balign16__internal(c); }; int16_t to16(unsigned char* c) { return balign16__internal((char*)c); }; int16_t to16(int16_t c) { return c; } int16_t to16(uint16_t c) { return (int16_t)c; } uint16_t to16u(char* c) { return balign16u__internal(c); }; uint16_t to16u(unsigned char* c) { return balign16u__internal((char*)c); }; uint16_t to16u(int16_t c) { return (uint16_t)c; } uint16_t to16u(uint16_t c) { return c; } void lba2msf(int lba, msf* time){ time->m = lba/4500; time->s = (lba/75)%60; time->f = lba % 75; } int msf2lba(msf time){ return time.m * 4500 + time.s * 75 + time.f; } void int2hms(int intt, hms* time){ time->h = intt/3600; time->m = (intt/60)%60; time->s = intt % 60; } #ifndef _WIN32 int min(int a, int b) { if (a<=b) return a; return b; } int max(int a, int b) { if (a>b) return a; return b; } #else int inet_aton(const char *cp, struct in_addr *addr) { addr->s_addr = inet_addr(cp); return 1; } #endif void remove_double_spaces(char* str) { int len = strlen(str); while(len--) { if (*str == 0x20 && str[1] == 0x20) strcpy(str, str+1); else str++; } } void remove_end_spaces(char* str) { int len = strlen(str); while (str[--len] == 0x20) str[len] = 0; } int dispers(int m, int* arr, int l) { if ((!m) || (!arr) || (l<2)) return 0; long disp = 0; int i; int q; for (i=0; i * * original version of CD-R(W) manufacturer identification code got from cdrecord, (C) Joerg Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include //#include //#include "transport.hxx" #include "qpx_mmc.h" #define SPINUP_REVERSE //#define MODE_PAGES_DEBUG //#define FEATURE_DEBUG #ifndef DEVTBL_DIRECT #include #endif int convert_to_ID (drive_info* drive); drive_info::drive_info(const char* _device){ device=(char*)malloc(bufsz_dev); strcpy(device,_device); rd_buf=(unsigned char*)malloc(bufsz_rd); if (!cmd.associate(device, NULL)) { // printf("** Can't open device: %16s\n",_device); err=1; mmc=-1; return; } mmc=0; life.ok=0; parms.interval=1; parms.tests=0; capabilities=0; rd_capabilities=0; wr_capabilities=0; wr_modes=0; get_performance_fail=0; ven_features=0; chk_features=0; plextor.gigarec=0; plextor.varirec_state_cd=0; plextor.varirec_pwr_cd=0; plextor.varirec_str_cd=0; plextor.varirec_state_dvd=0; plextor.varirec_pwr_dvd=0; plextor.varirec_str_dvd=0; plextor.powerec_state=0; plextor.plexeraser=0; ven_ID=0; dev_ID=0; iface_id=0; iface[0]=0; loader_id=0; parms.scan_speed_cd=8; parms.scan_speed_dvd=5; parms.spindown_idx=0; parms.speed_mult=176; silent=0; rpc.phase=0; rpc.region=0; plextor_silent.pstate = 0; plextor_silent.prd_cd = 0; plextor_silent.pwr_cd = 0; plextor_silent.prd_dvd = 0; // plextor_silent.pwr_dvd = 0; plextor_silent.paccess = 0; plextor_silent.peject = 0; plextor_silent.pload = 0; media.MID_type = MID_type_NONE; media.MID_size = 0; media.dvdcss.protection=0; media.dvdcss.p_titles=NULL; #if (DVDCSS_KEY_CACHE > 0) media.dvdcss.psz_cachefile[0]=0; media.dvdcss.psz_block=0; #endif } drive_info::~drive_info(){ // delete urd_buf; busy=1; // delete pthread_t; free(rd_buf); free(device); } /* bool drive_info::lock(){ if (!busy) {busy=true; return true; } else { return false; } } bool drive_info::unlock(){ busy=false; return true; } bool drive_info::isBusy(){ return busy; } void drive_info::wait_free(){ while (busy); } */ int print_sense (int err) { char str[128]; strcpy(str,"[unknown error]"); switch (SK(err)) { case 0x1: switch (ASC(err)) { case 0x0B: switch (ASCQ(err)) { case 0x00: strcpy(str,"WARNING"); break; case 0x01: strcpy(str,"WARNING - SPECIFIED TEMPERATURE EXCEEDED"); break; case 0x02: strcpy(str,"WARNING - ENCLOSURE DEGRADED"); break; default: sprintf(str,"WARNING, ASCQ=%02X",ASCQ(err)); break; } break; case 0x17: switch (ASCQ(err)) { case 0x00: strcpy(str,"RECOVERED DATA WITH NO ERROR CORRECTION APPLIED"); break; case 0x01: strcpy(str,"RECOVERED DATA WITH RETRIES"); break; case 0x02: strcpy(str,"RECOVERED DATA WITH POSITIVE HEAD OFFSET"); break; case 0x03: strcpy(str,"RECOVERED DATA WITH NEGATIVE HEAD OFFSET"); break; case 0x04: strcpy(str,"RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED"); break; case 0x05: strcpy(str,"RECOVERED DATA USING PREVIOUS SECTOR ID"); break; case 0x07: strcpy(str,"RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT"); break; case 0x08: strcpy(str,"RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE"); break; case 0x09: strcpy(str,"RECOVERED DATA WITHOUT ECC - DATA REWRITTEN"); break; default: strcpy(str,"RECOVERED DATA WITH NO ERROR CORRECTION APPLIED"); break; } break; case 0x18: switch (ASCQ(err)) { case 0x00: strcpy(str,"RECOVERED DATA WITH ERROR CORRECTION APPLIED"); break; case 0x01: strcpy(str,"RECOVERED DATA WITH ERROR CORR. & RETRIES APPLIED"); break; case 0x02: strcpy(str,"RECOVERED DATA - DATA AUTO-REALLOCATED"); break; case 0x03: strcpy(str,"RECOVERED DATA WITH CIRC"); break; case 0x04: strcpy(str,"RECOVERED DATA WITH L-EC"); break; case 0x05: strcpy(str,"RECOVERED DATA - RECOMMEND REASSIGNMENT"); break; case 0x06: strcpy(str,"RECOVERED DATA - RECOMMEND REWRITE"); break; case 0x08: strcpy(str,"RECOVERED DATA WITH LINKING"); break; default: strcpy(str,"RECOVERED DATA WITH ERROR CORRECTION APPLIED"); break; } break; case 0x5D: switch (ASCQ(err)) { case 0x01: strcpy(str,"FAILURE PREDICTION THRESHOLD EXCEEDED - Predicted Media failure"); break; case 0x02: strcpy(str,"LOGICAL UNIT FAILURE PREDICTION THRESHOLD EXCEEDED"); break; case 0x03: strcpy(str,"FAILURE PREDICTION THRESHOLD EXCEEDED - Predicted Spare Area Exhaustion"); break; case 0xFF: strcpy(str,"FAILURE PREDICTION THRESHOLD EXCEEDED (FALSE)"); break; default: strcpy(str,"LOGICAL UNIT FAILURE PREDICTION THRESHOLD EXCEEDED"); break; } break; case 0x73: switch (ASCQ(err)) { case 0x01: strcpy(str,"POWER CALIBRATION AREA ALMOST FULL"); break; case 0x06: strcpy(str,"RMA/PMA IS ALMOST FULL"); break; } break; } case 0x2: switch (ASC(err)) { case 0x04: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE"); break; case 0x01: strcpy(str,"LOGICAL UNIT IS IN PROCESS OF BECOMING READY"); break; case 0x02: strcpy(str,"LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED"); break; case 0x03: strcpy(str,"LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED"); break; case 0x04: strcpy(str,"LOGICAL UNIT NOT READY, FORMAT IN PROGRESS"); break; case 0x07: strcpy(str,"LOGICAL UNIT NOT READY, OPERATION IN PROGRESS"); break; case 0x08: strcpy(str,"LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS"); break; default: strcpy(str,"LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE"); break; } break; case 0x30: switch (ASCQ(err)) { case 0x00: strcpy(str,"INCOMPATIBLE MEDIUM INSTALLED"); break; case 0x01: strcpy(str,"CANNOT READ MEDIUM - UNKNOWN FORMAT"); break; case 0x02: strcpy(str,"CANNOT READ MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x03: strcpy(str,"CLEANING CARTRIDGE INSTALLED"); break; case 0x04: strcpy(str,"CANNOT WRITE MEDIUM - UNKNOWN FORMAT"); break; case 0x05: strcpy(str,"CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x06: strcpy(str,"CANNOT FORMAT MEDIUM - INCOMPATIBLE MEDIUM"); break; case 0x07: strcpy(str,"CLEANING FAILURE"); break; case 0x11: strcpy(str,"CANNOT WRITE MEDIUM - UNSUPPORTED MEDIUM VERSION"); break; default: strcpy(str,"INCOMPATIBLE MEDIUM INSTALLED"); break; } break; case 0x3A: switch (ASCQ(err)) { case 0x00: strcpy(str,"MEDIUM NOT PRESENT"); break; case 0x01: strcpy(str,"MEDIUM NOT PRESENT - TRAY CLOSED"); break; case 0x02: strcpy(str,"MEDIUM NOT PRESENT - TRAY OPEN"); break; default: strcpy(str,"MEDIUM NOT PRESENT"); break; } break; case 0x3E: strcpy(str,"LOGICAL UNIT HAS NOT SELF-CONFIGURED YET"); break; /* ASCQ=00: */ } break; case 0x3: switch (ASC(err)) { case 0x02: strcpy(str,"NO SEEK COMPLETE"); break; /* ASCQ = 0x00 */ case 0x06: strcpy(str,"NO REFERENCE POSITION FOUND"); break; case 0x0C: switch (ASCQ(err)) { case 0x00: strcpy(str,"WRITE ERROR"); break; case 0x07: strcpy(str,"WRITE ERROR - RECOVERY NEEDED"); break; case 0x08: strcpy(str,"WRITE ERROR - RECOVERY FAILED"); break; case 0x09: strcpy(str,"WRITE ERROR - LOSS OF STREAMING"); break; case 0x0A: strcpy(str,"WRITE ERROR - PADDING BLOCKS ADDED"); break; default: strcpy(str,"WRITE ERROR"); break; } break; case 0x11: switch (ASCQ(err)) { case 0x00: strcpy(str,"UNRECOVERED READ ERROR"); break; case 0x01: strcpy(str,"READ RETRIES EXHAUSTED"); break; case 0x02: strcpy(str,"ERROR TOO LONG TO CORRECT"); break; case 0x05: strcpy(str,"L-EC UNCORRECTABLE ERROR"); break; case 0x06: strcpy(str,"CIRC UNRECOVERED ERROR"); break; case 0x0F: strcpy(str,"ERROR READING UPC/EAN NUMBER"); break; case 0x10: strcpy(str,"ERROR READING ISRC NUMBER"); break; default: strcpy(str,"UNRECOVERED READ ERROR"); break; } break; case 0x15: switch (ASCQ(err)) { case 0x00: strcpy(str,"RANDOM POSITIONING ERROR"); break; case 0x01: strcpy(str,"MECHANICAL POSITIONING ERROR"); break; case 0x02: strcpy(str,"POSITIONING ERROR DETECTED BY READ OF MEDIUM"); break; default: strcpy(str,"RANDOM POSITIONING ERROR"); break; } break; case 0x31: switch (ASCQ(err)) { case 0x00: strcpy(str,"MEDIUM FORMAT CORRUPTED"); break; case 0x01: strcpy(str,"FORMAT COMMAND FAILED"); break; case 0x02: strcpy(str,"ZONED FORMATTING FAILED DUE TO SPARE LINKING"); break; default: strcpy(str,"MEDIUM FORMAT CORRUPTED"); break; } break; case 0x51: switch (ASCQ(err)) { case 0x00: strcpy(str,"ERASE FAILURE"); break; case 0x01: strcpy(str,"ERASE FAILURE - INCOMPLETE ERASE OPERATION DETECTED"); break; default: strcpy(str,"ERASE FAILURE"); break; } break; case 0x57: strcpy(str,"UNABLE TO RECOVER TABLE-OF-CONTENTS"); break; /* ASCQ = 00 */ case 0x72: switch (ASCQ(err)) { case 0x00: strcpy(str,"SESSION FIXATION ERROR"); break; case 0x01: strcpy(str,"SESSION FIXATION ERROR WRITING LEAD-IN"); break; case 0x02: strcpy(str,"SESSION FIXATION ERROR WRITING LEAD-OUT"); break; default: strcpy(str,"SESSION FIXATION ERROR"); break; } break; case 0x73: switch (ASCQ(err)) { case 0x00: strcpy(str,"CD CONTROL ERROR"); break; case 0x02: strcpy(str,"POWER CALIBRATION AREA IS FULL"); break; case 0x03: strcpy(str,"POWER CALIBRATION AREA ERROR"); break; case 0x04: strcpy(str,"PROGRAM MEMORY AREA UPDATE FAILURE"); break; case 0x05: strcpy(str,"PROGRAM MEMORY AREA IS FULL"); break; default: strcpy(str,"CD CONTROL ERROR"); break; } break; } break; case 0x4: switch (ASC(err)) { case 0x00: strcpy(str,"CLEANING REQUESTED"); break; /* ASCQ = 0x17 */ case 0x05: strcpy(str,"LOGICAL UNIT DOES NOT RESPOND TO SELECTION"); break; /* ASCQ = 0x00 */ case 0x08: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOGICAL UNIT COMMUNICATION FAILURE"); break; case 0x01: strcpy(str,"LOGICAL UNIT COMMUNICATION TIMEOUT"); break; case 0x02: strcpy(str,"LOGICAL UNIT COMMUNICATION PARITY ERROR"); break; case 0x03: strcpy(str,"LOGICAL UNIT COMMUNICATION CRC ERROR (ULTRA-DMA/32)"); break; } break; case 0x09: switch (ASCQ(err)) { case 0x00: strcpy(str,"TRACK FOLLOWING ERROR"); break; case 0x01: strcpy(str,"TRACKING SERVO FAILURE"); break; case 0x02: strcpy(str,"FOCUS SERVO FAILURE"); break; case 0x03: strcpy(str,"SPINDLE SERVO FAILURE"); break; case 0x04: strcpy(str,"HEAD SELECT FAULT"); break; default: strcpy(str,"TRACKING ERROR"); break; } break; case 0x15: switch (ASCQ(err)) { case 0x00: strcpy(str,"RANDOM POSITIONING ERROR"); break; case 0x01: strcpy(str,"MECHANICAL POSITIONING ERROR"); break; default: strcpy(str,"RANDOM POSITIONING ERROR"); break; } break; case 0x1B: strcpy(str,"SYNCHRONOUS DATA TRANSFER ERROR"); break; /* ASCQ = 0x00 */ case 0x3B: strcpy(str,"MECHANICAL POSITIONING OR CHANGER ERROR"); break; /* ASCQ = 0x16 */ case 0x3E: switch (ASCQ(err)) { case 0x01: strcpy(str,"LOGICAL UNIT FAILURE"); break; case 0x02: strcpy(str,"TIMEOUT ON LOGICAL UNIT"); break; default: strcpy(str,"LOGICAL UNIT FAILURE"); break; } break; case 0x40: strcpy(str,"DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)"); break; case 0x44: strcpy(str,"INTERNAL TARGET FAILURE"); break; case 0x46: strcpy(str,"UNSUCCESSFUL SOFT RESET"); break; case 0x47: strcpy(str,"SCSI PARITY ERROR"); break; case 0x4A: strcpy(str,"COMMAND PHASE ERROR"); break; case 0x4B: strcpy(str,"DATA PHASE ERROR"); break; case 0x4C: strcpy(str,"LOGICAL UNIT FAILED SELF-CONFIGURATION"); break; case 0x53: strcpy(str,"MEDIA LOAD OR EJECT FAILED"); break; case 0x65: strcpy(str,"VOLTAGE FAULT"); break; } break; case 0x5: switch (ASC(err)) { case 0x07: strcpy(str,"MULTIPLE PERIPHERAL DEVICES SELECTED"); break; /* ASCQ = 0x00 */ case 0x1A: strcpy(str,"PARAMETER LIST LENGTH ERROR"); break; /* ASCQ = 0x00 */ case 0x20: strcpy(str,"INVALID COMMAND OPERATION CODE"); break; /* ASCQ = 0x00 */ case 0x21: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOGICAL BLOCK ADDRESS OUT OF RANGE"); break; case 0x01: strcpy(str,"INVALID ELEMENT ADDRESS"); break; case 0x02: strcpy(str,"INVALID ADDRESS FOR WRITE"); break; default: strcpy(str,"LOGICAL BLOCK ADDRESS OUT OF RANGE"); break; } break; case 0x24: strcpy(str,"INVALID FIELD IN CDB"); break; case 0x25: strcpy(str,"LOGICAL UNIT NOT SUPPORTED"); break; case 0x26: switch (ASCQ(err)) { case 0x00: strcpy(str,"INVALID FIELD IN PARAMETER LIST"); break; case 0x01: strcpy(str,"PARAMETER NOT SUPPORTED"); break; case 0x02: strcpy(str,"PARAMETER VALUE INVALID"); break; case 0x03: strcpy(str,"THRESHOLD PARAMETERS NOT SUPPORTED"); break; } break; case 0x2B: strcpy(str,"COPY CANNOT EXECUTE SINCE INITIATOR CANNOT DISCONNECT"); break; /* ASCQ = 0x00 */ case 0x2C: switch (ASCQ(err)) { case 0x00: strcpy(str,"COMMAND SEQUENCE ERROR"); break; case 0x03: strcpy(str,"CURRENT PROGRAM AREA IS NOT EMPTY"); break; case 0x04: strcpy(str,"CURRENT PROGRAM AREA IS EMPTY"); break; } break; case 0x30: switch (ASCQ(err)) { case 0x00: strcpy(str,"INCOMPATIBLE MEDIUM INSTALLED"); break; case 0x01: strcpy(str,"CANNOT READ MEDIUM - UNKNOWN FORMAT"); break; case 0x02: strcpy(str,"CANNOT READ MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x03: strcpy(str,"CLEANING CARTRIDGE INSTALLED"); break; case 0x04: strcpy(str,"CANNOT WRITE MEDIUM - UNKNOWN FORMAT"); break; case 0x05: strcpy(str,"CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x06: strcpy(str,"CANNOT FORMAT MEDIUM - INCOMPATIBLE MEDIUM"); break; case 0x07: strcpy(str,"CLEANING FAILURE"); break; case 0x08: strcpy(str,"CANNOT WRITE - APPLICATION CODE MISMATCH"); break; case 0x09: strcpy(str,"CURRENT SESSION NOT FIXATED FOR APPEND"); break; case 0x10: strcpy(str,"MEDIUM NOT FORMATTED"); break; } break; case 0x39: strcpy(str,"SAVING PARAMETERS NOT SUPPORTED"); break; /* ASCQ = 0x00 */ case 0x3D: strcpy(str,"INVALID BITS IN IDENTIFY MESSAGE"); break; /* ASCQ = 0x00 */ case 0x43: strcpy(str,"MESSAGE ERROR"); break; /* ASCQ = 0x00 */ case 0x53: strcpy(str,"MEDIUM REMOVAL PREVENTED"); break; /* ASCQ = 0x02 */ case 0x64: switch (ASCQ(err)) { case 0x00: strcpy(str,"ILLEGAL MODE FOR THIS TRACK"); break; case 0x01: strcpy(str,"INVALID PACKET SIZE"); break; } break; case 0x6F: switch (ASCQ(err)) { case 0x00: strcpy(str,"COPY PROTECTION KEY EXCHANGE FAILURE - AUTHENTICATION FAILURE"); break; case 0x01: strcpy(str,"COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT PRESENT"); break; case 0x02: strcpy(str,"COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED"); break; case 0x03: strcpy(str,"READ OF SCRAMBLED SECTOR WITHOUT AUTHENTICATION"); break; case 0x04: strcpy(str,"MEDIA REGION CODE IS MISMATCHED TO LOGICAL UNIT REGION"); break; case 0x05: strcpy(str,"LOGICAL UNIT REGION MUST BE PERMANENT/REGION RESET COUNT ERROR"); break; } break; case 0x72: switch (ASCQ(err)) { case 0x03: strcpy(str,"SESSION FIXATION ERROR . INCOMPLETE TRACK IN SESSION"); break; case 0x04: strcpy(str,"EMPTY OR PARTIALLY WRITTEN RESERVED TRACK"); break; case 0x05: strcpy(str,"NO MORE TRACK RESERVATIONS ALLOWED"); break; } break; } break; case 0x6: switch (ASC(err)) { case 0x28: switch (ASCQ(err)) { case 0x00: strcpy(str,"NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED"); break; case 0x01: strcpy(str,"IMPORT OR EXPORT ELEMENT ACCESSED"); break; } break; case 0x29: switch (ASCQ(err)) { case 0x00: strcpy(str,"POWER ON, RESET, OR BUS DEVICE RESET OCCURRED"); break; case 0x01: strcpy(str,"POWER ON OCCURRED"); break; case 0x02: strcpy(str,"BUS RESET OCCURRED"); break; case 0x03: strcpy(str,"BUS DEVICE RESET FUNCTION OCCURRED"); break; case 0x04: strcpy(str,"DEVICE INTERNAL RESET"); break; } break; case 0x2A: switch (ASCQ(err)) { case 0x00: strcpy(str,"PARAMETERS CHANGED"); break; case 0x01: strcpy(str,"MODE PARAMETERS CHANGED"); break; case 0x02: strcpy(str,"LOG PARAMETERS CHANGED"); break; case 0x03: strcpy(str,"RESERVATIONS PREEMPTED"); break; } break; case 0x2E: strcpy(str,"INSUFFICIENT TIME FOR OPERATION"); break; case 0x2F: strcpy(str,"COMMANDS CLEARED BY ANOTHER INITIATOR"); break; case 0x3B: switch (ASCQ(err)) { case 0x0D: strcpy(str,"MEDIUM DESTINATION ELEMENT FULL"); break; case 0x0E: strcpy(str,"MEDIUM SOURCE ELEMENT EMPTY"); break; case 0x0F: strcpy(str,"END OF MEDIUM REACHED"); break; case 0x11: strcpy(str,"MEDIUM MAGAZINE NOT ACCESSIBLE"); break; case 0x12: strcpy(str,"MEDIUM MAGAZINE REMOVED"); break; case 0x13: strcpy(str,"MEDIUM MAGAZINE INSERTED"); break; case 0x14: strcpy(str,"MEDIUM MAGAZINE LOCKED"); break; case 0x15: strcpy(str,"MEDIUM MAGAZINE UNLOCKED"); break; } break; case 0x3F: switch (ASCQ(err)) { case 0x00: strcpy(str,"TARGET OPERATING CONDITIONS HAVE CHANGED"); break; case 0x01: strcpy(str,"MICROCODE HAS BEEN CHANGED"); break; case 0x02: strcpy(str,"CHANGED OPERATING DEFINITION"); break; case 0x03: strcpy(str,"INQUIRY DATA HAS CHANGED"); break; } break; case 0x5A: switch (ASCQ(err)) { case 0x00: strcpy(str,"OPERATOR REQUEST OR STATE CHANGE INPUT"); break; case 0x01: strcpy(str,"OPERATOR MEDIUM REMOVAL REQUEST"); break; case 0x02: strcpy(str,"OPERATOR SELECTED WRITE PROTECT"); break; case 0x03: strcpy(str,"OPERATOR SELECTED WRITE PERMIT"); break; } break; case 0x5B: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOG EXCEPTION"); break; case 0x01: strcpy(str,"THRESHOLD CONDITION MET"); break; case 0x02: strcpy(str,"LOG COUNTER AT MAXIMUM"); break; case 0x03: strcpy(str,"LOG LIST CODES EXHAUSTED"); break; } break; case 0x5E: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOW POWER CONDITION ON"); break; case 0x01: strcpy(str,"IDLE CONDITION ACTIVATED BY TIMER"); break; case 0x02: strcpy(str,"STANDBY CONDITION ACTIVATED BY TIMER"); break; case 0x03: strcpy(str,"IDLE CONDITION ACTIVATED BY COMMAND"); break; case 0x04: strcpy(str,"STANDBY CONDITION ACTIVATED BY COMMAND"); break; } break; } break; case 0x7: switch (ASC(err)) { case 0x27: switch (ASCQ(err)) { case 0x00: strcpy(str,"WRITE PROTECTED"); break; case 0x01: strcpy(str,"HARDWARE WRITE PROTECTED"); break; case 0x02: strcpy(str,"LOGICAL UNIT SOFTWARE WRITE PROTECTED"); break; case 0x03: strcpy(str,"ASSOCIATED WRITE PROTECT"); break; case 0x04: strcpy(str,"PERSISTENT WRITE PROTECT"); break; case 0x05: strcpy(str,"PERMANENT WRITE PROTECT"); break; case 0x06: strcpy(str,"CONDITIONAL WRITE PROTECT"); break; default: strcpy(str,"WRITE PROTECTED"); break; } break; } break; case 0x8: strcpy(str,"BLANK CHECK"); break; case 0xB: switch (ASC(err)) { case 0x00: strcpy(str,"I/O PROCESS TERMINATED"); break; /* ASCQ = 06 */ case 0x11: strcpy(str,"READ ERROR - LOSS OF STREAMING"); break; /* ASCQ = 11 */ case 0x45: strcpy(str,"SELECT OR RESELECT FAILURE"); break; /* ASCQ = 00 */ case 0x48: strcpy(str,"INITIATOR DETECTED ERROR MESSAGE RECEIVED"); break; /* ASCQ = 00 */ case 0x49: strcpy(str,"INVALID MESSAGE ERROR"); break; /* ASCQ = 00 */ case 0x4D: strcpy(str,"TAGGED OVERLAPPED COMMANDS (NN = QUEUE TAG)"); break; /* ASCQ = xx */ } break; } printf("[%05X] %s", err, str); return 0; } int print_opcode (unsigned char opcode) { char str[128]; switch (opcode) { // case 0x00: strcpy(str," "); break; case 0x00: strcpy(str,"SPC_TEST_UNIT_READY "); break; case 0x03: strcpy(str,"SPC_REQUEST_SENSE "); break; case 0x04: strcpy(str,"MMC_FORMAT_UNIT "); break; case 0x12: strcpy(str,"SPC_INQUIRY "); break; case 0x15: strcpy(str,"MMC_MODE_SELECT6 "); break; case 0x16: strcpy(str,"SPC_RESERVE_6 "); break; case 0x17: strcpy(str,"SPC_RELEASE_6 "); break; case 0x1A: strcpy(str,"MMC_MODE_SENSE6 "); break; case 0x1B: strcpy(str,"MMC_START_STOP_UNIT "); break; case 0x1C: strcpy(str,"SPC_RECEIVE_DIAGNOSTIC_RESULTS "); break; case 0x1D: strcpy(str,"SPC_SEND_DIAGNOSTIC "); break; case 0x1E: strcpy(str,"SPC_PREVENT_ALLOW_MEDIUM_REMIVAL "); break; case 0x23: strcpy(str,"MMC_READ_FORMAT_CAPACITIES "); break; case 0x25: strcpy(str,"MMC_READ_RECORDED_CAPACITY "); break; case 0x28: strcpy(str,"MMC_READ "); break; case 0x2A: strcpy(str,"MMC_WRITE "); break; case 0x2B: strcpy(str,"MMC_SEEK "); break; case 0x2E: strcpy(str,"MMC_WRITE_AND_VERIFY "); break; case 0x2F: strcpy(str,"MMC_VERIFY "); break; case 0x35: strcpy(str,"MMC_SYNC_CACHE "); break; case 0x3B: strcpy(str,"SPC_WRITE_BUFFER "); break; case 0x3C: strcpy(str,"SPC_READ_BUFFER "); break; case 0x42: strcpy(str,"MMC_READ_SUB_CHANNEL "); break; case 0x43: strcpy(str,"MMC_READ_TOC_PMA_ATIP "); break; case 0x44: strcpy(str,"MMC_READ_HEADER "); break; case 0x45: strcpy(str,"MMC_PLAY_AUDIO "); break; case 0x46: strcpy(str,"MMC_GET_CONFIGURATION "); break; case 0x47: strcpy(str,"MMC_PLAY_AUDIO_MSF "); break; case 0x4A: strcpy(str,"MMC_GET_EVENT_STATUS_NOTIFICATION "); break; case 0x4B: strcpy(str,"MMC_PAUSE_RESUME "); break; case 0x4C: strcpy(str,"SPC_LOG_SELECT "); break; case 0x4D: strcpy(str,"SPC_LOG_SENSE "); break; case 0x4E: strcpy(str,"MMC_STOP_PLAY_SCAN "); break; case 0x51: strcpy(str,"MMC_READ_DISC_INFORMATION "); break; case 0x52: strcpy(str,"MMC_READ_TRACK_INFORMATION "); break; case 0x53: strcpy(str,"MMC_RESERVE_TRACK "); break; case 0x54: strcpy(str,"MMC_SEND_OPC_INFORMATION "); break; case 0x55: strcpy(str,"MMC_MODE_SELECT10 "); break; case 0x56: strcpy(str,"SPC_RESERVE_10 "); break; case 0x57: strcpy(str,"SPC_RELEASE_10 "); break; case 0x58: strcpy(str,"MMC_REPAIR_TRACK "); break; case 0x59: strcpy(str,"MMC_READ_MASTER_CUE "); break; case 0x5A: strcpy(str,"MMC_MODE_SENSE10 "); break; case 0x5B: strcpy(str,"MMC_CLOSE_TRACK_SESSION "); break; case 0x5C: strcpy(str,"MMC_READ_BUFFER_CAPACITY "); break; case 0x5D: strcpy(str,"MMC_SEND_CUE_SHEET "); break; case 0x5E: strcpy(str,"SPC_PERSISTENT_RESERVE_IN "); break; case 0x5F: strcpy(str,"SPC_PERSISTENT_RESERVE_OUT "); break; case 0x83: strcpy(str,"SPC_EXTENDED_COPY "); break; case 0x84: strcpy(str,"SPC_RECEIVE_COPY_RESULTS "); break; case 0x86: strcpy(str,"SPC_ACCESS_CONTROL_IN "); break; case 0x87: strcpy(str,"SPC_ACCESS_CONTROL_OUT "); break; case 0x8C: strcpy(str,"SPC_READ_ATTRIBUTE "); break; case 0x8D: strcpy(str,"SPC_WRITE_ATTRIBUTE "); break; case 0xA0: strcpy(str,"SPC_REPORT_LUNS "); break; case 0xA1: strcpy(str,"MMC_BLANK "); break; case 0xA2: strcpy(str,"MMC_SEND_EVENT / SPC_SECURITY_PROTOCOL_IN "); break; case 0xA3: strcpy(str,"MMC_SEND_KEY "); break; case 0xA4: strcpy(str,"MMC_REPORT_KEY "); break; case 0xA5: strcpy(str,"MMC_PLAY_AUDIO_12 "); break; case 0xA6: strcpy(str,"MMC_LOAD_UNLOAD "); break; case 0xA7: strcpy(str,"MMC_SET_READ_AHEAD / SMC_MOVE_MEDIUM_ATTACHED "); break; case 0xA8: strcpy(str,"MMC_READ_DVD "); break; case 0xAC: strcpy(str,"MMC_GET_PERFORMANCE "); break; case 0xAD: strcpy(str,"MMC_READ_DVD_STRUCTURE "); break; case 0xB4: strcpy(str,"SMC_READ_ELEMENT_STATUS_ATTACHED "); break; case 0xB5: strcpy(str,"SPC_SECURITY_PROTOCOL_OUT "); break; case 0xB6: strcpy(str,"MMC_SET_STREAMING "); break; case 0xB9: strcpy(str,"MMC_READ_CD_MSF "); break; case 0xBA: strcpy(str,"MMC_SCAN "); break; case 0xBB: strcpy(str,"MMC_SET_SPEED "); break; case 0xBC: strcpy(str,"MMC_PLAY_CD / SCC_SPARE_IN "); break; case 0xBD: strcpy(str,"MMC_MECHANISM_STATUS / SCC_SPARE_OUT "); break; case 0xBE: strcpy(str,"MMC_READ_CD / SCC_VOLUME_SET_IN "); break; case 0xBF: strcpy(str,"SCC_VOLUME_SET_OUT "); break; case 0xD4: strcpy(str,"PLEXTOR_GET_AUTH "); break; case 0xD5: strcpy(str,"PLEXTOR_SEND_AUTH "); break; //const char = 0xD8; case 0xE3: strcpy(str,"PLEXTOR_ERASER "); break; case 0xE4: strcpy(str,"PLEXTOR_AS_RD "); break; case 0xE5: strcpy(str,"PLEXTOR_AS_WR "); break; case 0xE7: strcpy(str,"SBC_FLUSH_CACHE "); break; case 0xE9: strcpy(str,"PLEXTOR_MODE "); break; case 0xEA: strcpy(str,"PLEXTOR_QCHECK "); break; case 0xEB: strcpy(str,"PLEXTOR_PREC_SPD "); break; case 0xED: strcpy(str,"PLEXTOR_MODE2 "); break; case 0xEE: strcpy(str,"PLEXTOR_RESTART "); break; // case 0xEF: strcpy(str,"PLEXTOR REBOOT ??? "); break; case 0xF1: strcpy(str,"PLEXTOR_EEPROM_READ "); break; case 0xF3: strcpy(str,"PLEXTOR_SCAN_TA_FETE "); break; case 0xF5: strcpy(str,"PLEXTOR_FETE_READOUT "); break; default: strcpy(str,"*unknown* "); } printf("[%02X] %s", opcode, str); return 0; } int probe_drive(const char* path, int idx) { drive_info* drive; int inq; // printf("Trying device: %s\n", path); drive = new drive_info(path); drive->silent++; inq = inquiry(drive); drive->silent--; switch (inq) { case 0x00: #if 0 // strcpy(drvtbl[drvcnt],_devtbl[i]); printf("[%02d] %s %s: %s %s %s\n",(drive->ven_ID & vendor_mask) ? "*" : " ", drvcnt, drive->device, drive->ven, drive->dev, drive->fw); #else printf("D: [%02d] '%s': '%s' '%s' '%s'\n", idx, drive->device, drive->ven, drive->dev, drive->fw); #endif break; case ERR_NO_DEV: // if (!drive->silent) printf("%s: no device found\n",drive->device); break; case ERR_NO_SCSI: // if (!drive->silent) printf("%s: not a valid SCSI device\n",drive->device); break; case ERR_NO_MMC: // printf("%s: %s %s %s",drive->device,drive->ven,drive->dev,drive->fw); // printf(": device is not MMC compliant\n"); // for (j=0; j<8; j++) // printf("Ver ID [%d] = 0x%04X\n",j,drive->ver_id[j]); break; default: // printf("%s: ???\n",drive->device); break; } delete drive; return inq; } int scanbus(int vendor_mask) { int i; // int inq; int drvcnt=0; #ifndef DEVTBL_DIRECT DIR *dir; struct dirent *dentry; struct stat st; str_dev devstr; int dlen; #endif printf("** scanning IDE/SATA/SCSI buses...\n"); #ifdef DEVTBL_DIRECT // used in win32 only for (i=0; strlen(_devtbl[i].name)>0 ; i++) { if (!probe_drive(_devtbl[i].name, drvcnt)) drvcnt++; } #else for (i=0; strlen(_devtbl[i].name)>0 ; i++) { dlen = strlen(_devtbl[i].name); dir = opendir("/dev"); if (dir) { dentry = readdir(dir); while (dentry) { if (!strncmp(dentry->d_name, _devtbl[i].name, dlen) && (!_devtbl[i].len || (strlen(dentry->d_name) == (size_t) _devtbl[i].len)) ) { sprintf(devstr, "/dev/%s", dentry->d_name); if (!lstat(devstr, &st) && S_ISBLK(st.st_mode) && !probe_drive(devstr, drvcnt)) drvcnt++; } dentry = readdir(dir); } closedir(dir); } } #endif printf("** Scan compleete: %d device(s) found\n", drvcnt); return (drvcnt); } void spinup(drive_info* drive, unsigned char secs) { long st, et; int err=0; char use_readcd = 0; const int addt = 25; #ifdef SPINUP_REVERSE int32_t lba = drive->media.capacity-1; #else int32_t lba = 0; #endif int blk = 16; st = getmsecs() + addt; if (drive->media.type & DISC_CD) { blk = 15; if (drive->capabilities & CAP_DAE) use_readcd = 1; } printf("SpinUp using READ%s command...\n", use_readcd ? " CD" : "" ); // if (use_readcd) read_cd(drive, 0, 1, 0xF8, 1); for ( et = getmsecs(); !err && (et-st) < (secs*1000); et = getmsecs() ) { #ifdef SPINUP_REVERSE lba-=blk; #else lba+=blk; #endif // err = seek(drive, lba); if (!drive->silent) printf("Remaining: %.3f sec...\r", secs - ((et-st) / 1000.0)); if (use_readcd) err = read_cd(drive, drive->rd_buf, lba, blk, 0xF8); else err = read(drive, drive->rd_buf, lba, blk); } if (use_readcd) read_cd(drive, drive->rd_buf, 0, 1, 0xF8); else read(drive, drive->rd_buf, 0, 1); // seek(drive, 0); msleep( addt ); } int inquiry(drive_info* drive) { unsigned char add_len; int i; if (drive->mmc == -1) return ERR_NO_DEV; drive->cmd[0] = SPC_INQUIRY; drive->cmd[4] = 36; drive->cmd[5] = 0; drive->err=drive->cmd.transport(READ,drive->rd_buf,36); if (drive->err) { if (!drive->silent) sperror("INQUIRY", drive->err); return ERR_NO_SCSI; } memcpy(drive->ven,drive->rd_buf+8,8); drive->ven[8] = 0; memcpy(drive->dev,drive->rd_buf+16,16); drive->dev[16] = 0; memcpy(drive->fw,drive->rd_buf+32,4); drive->fw[4] = 0; add_len = drive->rd_buf[4]; for (i=0; i<8; i++) drive->ver_id[i]=0; if (add_len >= 91) { drive->cmd[0] = SPC_INQUIRY; drive->cmd[4] = 5+add_len; drive->cmd[5] = 0; drive->err=drive->cmd.transport(READ,drive->rd_buf,5+add_len); if (drive->err) { if (!drive->silent) sperror("INQUIRY ADD", drive->err); } else { for (i=0; i<8; i++) drive->ver_id[i]= ntoh16(drive->rd_buf+58+i*2); } } if ((drive->rd_buf[0]&0x1F) != 5) return ERR_NO_MMC; drive->mmc=1; convert_to_ID(drive); return 0; } int isPlextor(drive_info* drive) { if (!strncmp(drive->ven,"PLEXTOR ",8)) { if( !strncmp(drive->dev,"CD-R ", 7)) return 1; if( !strncmp(drive->dev,"DVDR PX-708A",14) || !strncmp(drive->dev,"DVDR PX-708A2",15) || !strncmp(drive->dev,"DVDR PX-712A",14) || !strncmp(drive->dev,"DVDR PX-714A",14) || !strncmp(drive->dev,"DVDR PX-716A ",15) || !strncmp(drive->dev,"DVDR PX-716AL",15) || !strncmp(drive->dev,"DVDR PX-755A",14) || !strncmp(drive->dev,"DVDR PX-760A",14) ) return 1; } return 0; } int isPlextorLockPresent(drive_info* drive) { if( !strncmp(drive->dev,"CD-R PREMIUM2",15) || !strncmp(drive->dev,"DVDR PX-755A",14) || !strncmp(drive->dev,"DVDR PX-760A",14) ) return 1; else return 0; } int isYamaha(drive_info* drive) { return !strncmp(drive->ven,"YAMAHA ", 8); } int isPioneer(drive_info* drive) { return !strncmp(drive->ven,"PIONEER ", 8); } int test_unit_ready(drive_info* drive) { drive->cmd[0] = SPC_TEST_UNIT_READY; drive->cmd[3] = 0; return drive->err=drive->cmd.transport(NONE, NULL, 0); } int wait_unit_ready(drive_info* drive, int secs, bool need_media) { long st, et; st = getmsecs(); for ( et = getmsecs(); (et-st) < ((long)secs*1000); et = getmsecs() ) { if (!drive->silent) printf("Remaining: %.3f sec...\r", secs - ((et-st) / 1000.0)); if (!test_unit_ready(drive)) return 0; if (!need_media) { if (drive->err == 0x23A01) return 0; if (drive->err == 0x23A02) return 0; } msleep(100); // i++; } printf("wait_unit_ready(): Time Out (%ds)\n", secs); return 1; } int wait_fix(drive_info* drive, int secs){ long st, et; st = getmsecs(); for ( et = getmsecs(); (et-st) < ((long)secs*1000); et = getmsecs() ) { if (!drive->silent) printf("Remaining: %.3f sec...\r", secs - ((et-st) / 1000.0)); if (!read_disc_info(drive, 16)) return 0; // if not SC_NOT_READY or SC_UNIT_ATTENTION return if ((drive->err & 0xF0000) != 0x20000 && (drive->err & 0xF0000) != 0x60000 ) return 1; msleep(100); // i++; } printf("wait_fix(): Time Out (%ds)\n", secs); return 1; } int check_burnfree(drive_info* drive) { if (mode_sense(drive, MODE_PAGE_WRITE_PARAMETERS, 0, 60)) return -1; drive->rd_buf[8+2] |= 0x40; if (mode_select(drive, 60) || !(drive->rd_buf[8+2] & 0x40)) { printf("BURN-free seems to not supported for this media!\n"); } else { // printf("BURN-free supported:)\n"); drive->capabilities|=CAP_BURN_FREE; } return 0; } int check_write_modes(drive_info* drive) { drive->wr_modes = 0; if (mode_sense(drive, MODE_PAGE_WRITE_PARAMETERS, 0, 60)) return -1; for (int i=0; wr_modes[i].id; i++) { drive->rd_buf[8+2] &= 0xF0; drive->rd_buf[8+2] |= wr_modes[i].wtype; drive->rd_buf[8+4] &= 0xF0; drive->rd_buf[8+4] |= wr_modes[i].dtype; if (!mode_select(drive, 60)) { drive->wr_modes |= wr_modes[i].id; } } check_burnfree(drive); return 0; } int reserve_track(drive_info* drive, uint32_t size) { drive->cmd[0] = MMC_RESERVE_TRACK; drive->cmd[5] = (size >> 24) & 0xFF; drive->cmd[6] = (size >> 16) & 0xFF; drive->cmd[7] = (size >> 8) & 0xFF; drive->cmd[8] = size & 0xFF; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) {sperror ("RESERVE_TRACK",drive->err); return (drive->err);} return 0; } int close_track_session(drive_info* drive, int n, int cltype) { drive->cmd[0] = MMC_CLOSE_TRACK_SESSION; // drive->cmd[1] = immed ? 0x01 : 0x00; drive->cmd[1] = 0x01; drive->cmd[2] = cltype; drive->cmd[4] = (n >> 8) & 0xFF; drive->cmd[5] = n & 0xFF; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) {sperror ("MMC_CLOSE_TRACK_SESSION",drive->err); return (drive->err);} return 0; } int request_sense(drive_info* drive, char add){ drive->cmd[0]= SPC_REQUEST_SENSE; drive->cmd[4]= 0x12+add; drive->cmd[5]=0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x12) )) { if (!drive->silent) sperror ("REQUEST_SENSE",drive->err); return (drive->err); } return 0; } /* int mode_sense6(drive_info* drive, int page, int page_control, short dest_len) { drive->cmd[0]=MMC_MODE_SENSE6; drive->cmd[1]= 0x10; drive->cmd[2]=page_control << 6 | page; drive->cmd[4]=dest_len & 0xFF; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,dest_len) )) {sperror ("MODE_SENSE(6)",drive->err); return (drive->err); } return 0; } */ int mode_sense(drive_info* drive, int page, int page_control, int dest_len) { drive->cmd[0]=MMC_MODE_SENSE_10; drive->cmd[2]=page_control << 6 | page; drive->cmd[7]=(dest_len >> 8) & 0xFF; drive->cmd[8]=dest_len & 0xFF; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,dest_len) )) { if (!drive->silent) sperror ("MODE_SENSE(10)",drive->err); return (drive->err); } return 0; } /* int mode_select6(drive_info* drive, short dest_len) { drive->cmd[0]=MMC_MODE_SELECT6; // drive->cmd[1]= 0x10; drive->cmd[4]=dest_len & 0xFF; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf,dest_len) )) {sperror ("MODE_SELECT(6)",drive->err); return (drive->err); } return 0; } */ int mode_select(drive_info* drive, int dest_len) { drive->cmd[0]=MMC_MODE_SELECT_10; drive->cmd[1]= 0x10; /* drive->cmd[5]= drive->rd_buf[0]; drive->cmd[6]= drive->rd_buf[1]; */ drive->cmd[7]=(dest_len >> 8) & 0xFF; drive->cmd[8]=dest_len & 0xFF; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf,dest_len) )) { if (!drive->silent) sperror ("MODE_SELECT(10)",drive->err); return (drive->err); } // { sperror ("MODE_SELECT(10)",drive->err); return (drive->err); } return 0; } int get_configuration(drive_info* drive, int feature_number, unsigned int* data_length, int* current, unsigned char ReqType) { if (data_length) *data_length = 0; if (current) *current = 0; drive->cmd[0] = MMC_GET_CONFIGURATION; drive->cmd[1] = ReqType; drive->cmd[2] = (feature_number >> 8) & 0xFF; drive->cmd[3] = feature_number & 0xFF; drive->cmd[7] = 0; drive->cmd[8] = 8; drive->cmd[9] = 0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8))) { if (!drive->silent) sperror ("GET_CONFIGURATION (LENGTH)",drive->err); return (drive->err);} if (data_length) { *data_length = ntoh32u(drive->rd_buf); drive->cmd[7] = ((*data_length+4) >> 8) & 0xFF; drive->cmd[8] = (*data_length+4) & 0xFF; drive->cmd[9] = 0; if (*data_length > 4) if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,*data_length+4))) { if (!drive->silent) sperror ("GET_CONFIGURATION",drive->err); return (drive->err);} } if (current) *current = drive->rd_buf[10] & 0x01; return 0; } void detect_iface(drive_info* drive) { unsigned int len=0; get_configuration(drive, FEATURE_CORE, &len, NULL); drive->iface_id= (drive->rd_buf[12] << 12) | (drive->rd_buf[13] << 8) | (drive->rd_buf[14] << 4) | drive->rd_buf[15]; if (drive->iface_idiface,iface_list[drive->iface_id]); else strcpy(drive->iface,iface_list[iface_id_max+1]); } int write_buffer(drive_info* drive, uint8_t mode, uint8_t buff_id, uint32_t offs, uint32_t len) { drive->cmd[0] = SPC_WRITE_BUFFER; drive->cmd[1] = (mode & 0x0F); drive->cmd[2] = buff_id; drive->cmd[3] = (offs >> 16) & 0xFF; drive->cmd[4] = (offs >> 8) & 0xFF; drive->cmd[5] = (offs) & 0xFF; drive->cmd[6] = (len >> 16) & 0xFF; drive->cmd[7] = (len >> 8) & 0xFF; drive->cmd[8] = (len) & 0xFF; drive->cmd[9] = 0; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf, len) )) { if (!drive->silent) sperror ("WRITE_BUFFER",drive->err); return (drive->err); } return 0; } int read_buffer(drive_info* drive, uint8_t mode, uint8_t buff_id, uint32_t offs, uint32_t len) { printf("read buffer: mode %x, id %x, offs %x, len %x\n", mode, buff_id,offs,len); drive->cmd[0] = SPC_READ_BUFFER; drive->cmd[1] = (mode & 0x0F); drive->cmd[2] = buff_id; drive->cmd[3] = (offs >> 16) & 0xFF; drive->cmd[4] = (offs >> 8) & 0xFF; drive->cmd[5] = (offs) & 0xFF; drive->cmd[6] = (len >> 16) & 0xFF; drive->cmd[7] = (len >> 8) & 0xFF; drive->cmd[8] = (len) & 0xFF; drive->cmd[9] = 0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf, len) )) { if (!drive->silent) sperror ("READ_BUFFER",drive->err); return (drive->err); } return 0; } int read_echo_buffer_size(drive_info* drive) { drive->cmd[0] = SPC_READ_BUFFER; // drive->cmd[1] = 0x00; drive->cmd[1] = 0x0B; // echo buffer descriptor drive->cmd[8] = 4; drive->cmd[9] = 0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf, 4) )) { if (!drive->silent) sperror ("READ_ECHO_BUFFER_SIZE",drive->err); return (0); } return ntoh16(drive->rd_buf+2) & 0x1FFF; } int test_dma_speed(drive_info* drive, long msecs) { long st, et; long speed=0; int cnt =0; drive->silent--; uint32_t buf_size = read_echo_buffer_size(drive); printf("Echo buffer size: %d\n", buf_size); buf_size = 4096; if (!buf_size) { drive->silent++; return 0; } if (!drive->silent) printf("** Testing DMA speed...\n"); st = getmsecs(); for ( et = getmsecs(); (et-st) < (msecs); et = getmsecs() ) { if (write_buffer(drive, 0x0A, 0, 0, buf_size)) { if (!drive->silent) printf("WRITE BUFFER error! DMA speed test aborted!\n"); drive->silent++; return 1; } if (read_buffer(drive, 0x0A, 0, 0, buf_size)) { if (!drive->silent) printf("READ BUFFER error! DMA speed test aborted!\n"); drive->silent++; return 1; } cnt++; } speed = (buf_size * cnt / msecs); printf("DMA speed: %6ld kB/s (%d buffers of %d bytes in %ld msecs)\n", speed, cnt, buf_size, msecs); drive->silent++; return 0; } int flush_cache(drive_info* drive, bool IMMED) { // drive->cmd[0] = SBC_FLUSH_CACHE; drive->cmd[0] = MMC_SYNC_CACHE; drive->cmd[1] = IMMED ? 0x02 : 0; if ((drive->err=drive->cmd.transport(NONE, NULL, 0) )) { if (!drive->silent) sperror ("SBC_FLUSH_CACHE",drive->err); return (drive->err); } // { sperror ("SBC_FLUSH_CACHE",drive->err); return (drive->err); } return 0; } int set_cache(drive_info* drive, bool rd, bool wr) { memset(drive->rd_buf, 0, 20); drive->rd_buf[8] = MODE_PAGE_CACHING; drive->rd_buf[9] = 0x0A; drive->rd_buf[10] = (wr ? 0x04 : 0) | (rd ? 0 : 0x01); return (mode_select(drive, 0x20)); } int get_cache(drive_info* drive, bool *rd, bool *wr) { bool re,we; if (mode_sense(drive, MODE_PAGE_CACHING, 0, 20) || drive->rd_buf[8] != MODE_PAGE_CACHING) return 1; re = !(drive->rd_buf[10] & 0x01); we = !!(drive->rd_buf[10] & 0x04); printf("Cache: RD %s, WR %s\n", re ? "EN":"DIS", we ? "EN":"DIS"); if (rd) (*rd) = re; if (wr) (*wr) = we; return 0; } int get_mode_pages_list(drive_info* drive) { unsigned int len, i, ii; unsigned char ml=0, mn=0; if (!drive->silent) printf("\n** Reading supported mode pages...\n"); if (mode_sense(drive, 0x3F, 2, 0x4000)) return 1; len = ntoh16u (drive->rd_buf); // printf("data len: %4X (%4d), Header:\n", len, len); // for (i=0; i<8; i++) printf(" 0x%02X",drive->rd_buf[i] & 0xFF); printf("\n"); for (i=8; (ird_buf[i] & 0x3F; ml = drive->rd_buf[i+1] & 0xFF; ii = 0; while ((MODE_PAGES[ii].id != mn) && (MODE_PAGES[ii].id < 0x3F)) ii++; if (!drive->silent) { printf("Mode Page: 0x%02X [%s]", mn, MODE_PAGES[ii].name); #ifdef MODE_PAGES_DEBUG for (ii=0; ii<(ml+2); ii++) { if (!(ii%32)) printf("\n"); printf(" %02X",drive->rd_buf[i+ii] & 0xFF); } #endif printf("\n"); } ml += 2; } return 0; } int get_features_list(drive_info* drive) { unsigned int len, i, ii; unsigned short fn; unsigned char fv; unsigned int fl; if (!drive->silent) printf("\n** Reading supported features...\n"); if (get_configuration(drive, 0 , &len, NULL, 0)) return 1; #if 0 //#ifdef FEATURE_DEBUG printf("data len: %4X (%4d), Header:\n", len, len); for (i=0; i<8; i++) printf(" 0x%02X",drive->rd_buf[i] & 0xFF); printf("\n"); #endif for (i=8; (ird_buf+i); fv = drive->rd_buf[i+2]; fl = (unsigned int) drive->rd_buf[i+3]; ii = 0; while ((FEATURES[ii].id != fn) && (FEATURES[ii].id < 0xFFFF)) ii++; if (!drive->silent) { printf("Feature: 0x%04X, ver %2X [%s]", fn, fv, FEATURES[ii].name); #ifdef FEATURE_DEBUG for (ii=0; ii<(fl+4); ii++) { if (!(ii%32)) printf("\n"); printf(" %02X",drive->rd_buf[i+ii] & 0xFF); } #endif printf("\n"); } fl += 4; } return 0; } int get_profiles_list(drive_info* drive) { unsigned int len, i, ii; unsigned short profile; if (!drive->silent) printf("\n** Reading supported profiles...\n"); if (get_configuration(drive, FEATURE_PROFILE_LIST , &len, NULL, 0x02)) return 1; for( i = 0; (i < len-8) && (i<0x8000); i+=4 ) { profile = ntoh16u (drive->rd_buf+i+12); ii=0; while ((PROFILES[ii].id != profile) && (PROFILES[ii].id < 0xFFFF)) ii++; if (!drive->silent) printf("Profile: 0x%04X [%s]\n", profile, PROFILES[ii].name); #if 0 switch (profile) { case 0x08: // CD-ROM drive->rd_capabilities |= DEVICE_CD_ROM; drive->wr_capabilities |= DEVICE_CD_ROM; break; case 0x09: // CD-R drive->rd_capabilities |= DEVICE_CD_R; drive->wr_capabilities |= DEVICE_CD_R; break; case 0x0A: // CD-RW drive->rd_capabilities |= DEVICE_CD_RW; drive->wr_capabilities |= DEVICE_CD_RW; break; case 0x10: // DVD-ROM drive->rd_capabilities |= DEVICE_DVD_ROM; break; case 0x11: // DVD-R Sequential drive->rd_capabilities |= DEVICE_DVD_R; drive->wr_capabilities |= DEVICE_DVD_R; break; case 0x12: // DVD-RAM drive->rd_capabilities |= DEVICE_DVD_RAM; // drive->wr_capabilities |= DEVICE_DVD_RAM; break; case 0x13: // DVD-RW Restricted Overwrite drive->rd_capabilities |= DEVICE_DVD_RW; drive->wr_capabilities |= DEVICE_DVD_RW; break; case 0x14: // DVD-RW Sequential drive->rd_capabilities |= DEVICE_DVD_RW; drive->wr_capabilities |= DEVICE_DVD_RW; break; case 0x15: // DVD-R DL Sequential drive->rd_capabilities |= DEVICE_DVD_R_DL; drive->wr_capabilities |= DEVICE_DVD_R_DL; break; case 0x16: // DVD-R DL Layer Jump drive->rd_capabilities |= DEVICE_DVD_R_DL; drive->wr_capabilities |= DEVICE_DVD_R_DL; break; case 0x17: // DVD-RW DL drive->rd_capabilities |= DEVICE_DVD_RW_DL; drive->wr_capabilities |= DEVICE_DVD_RW_DL; break; case 0x1A: // DVD+RW drive->rd_capabilities |= DEVICE_DVD_PLUS_RW; drive->wr_capabilities |= DEVICE_DVD_PLUS_RW; break; case 0x1B: // DVD+R drive->rd_capabilities |= DEVICE_DVD_PLUS_R; drive->wr_capabilities |= DEVICE_DVD_PLUS_R; break; case 0x2A: // DVD+RW DL drive->rd_capabilities |= (DEVICE_DVD_PLUS_RW_DL); drive->wr_capabilities |= (DEVICE_DVD_PLUS_RW_DL); break; case 0x2B: // DVD+R DL drive->rd_capabilities |= (DEVICE_DVD_PLUS_R_DL); drive->wr_capabilities |= (DEVICE_DVD_PLUS_R_DL); break; case 0x40: // BD-ROM drive->rd_capabilities |= (DEVICE_BD_ROM); break; case 0x41: // BD-R Sequential drive->rd_capabilities |= (DEVICE_BD_R); drive->wr_capabilities |= (DEVICE_BD_R); break; case 0x42: // BD-R Random drive->rd_capabilities |= (DEVICE_BD_R); drive->wr_capabilities |= (DEVICE_BD_R); break; case 0x43: // BD-RE drive->rd_capabilities |= (DEVICE_BD_RE); drive->wr_capabilities |= (DEVICE_BD_RE); break; } #endif } profile = ntoh16(drive->rd_buf+6); ii=0; while ((PROFILES[ii].id != profile) && (PROFILES[ii].id < 0xFFFF)) ii++; if (!drive->silent) printf("Current: 0x%04X [%s]\n", profile, PROFILES[ii].name); return 0; } void detect_capabilities(drive_info* drive){ unsigned int len=4; drive->capabilities=CAP_SET_CD_SPEED; drive->rd_capabilities=0; drive->wr_capabilities=0; detect_mm_capabilities(drive); detect_iface(drive); get_drive_serial_number(drive); get_mode_pages_list(drive); if (drive->mmc>1) { // LU is MMC2 or later. Detecting capabilities by GET_CONFIGURATION get_profiles_list(drive); get_features_list(drive); get_configuration(drive, FEATURE_REMOVABLE_MEDIA , &len, NULL); if (len >= 0x0C) drive->capabilities|=CAP_REMOVABLE_MEDIA; get_configuration(drive, FEATURE_SMART , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_SMART; get_configuration(drive, FEATURE_MICROCODE_UPGRADE , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_MICROCODE_UPGRADE; get_configuration(drive, FEATURE_MORPHING , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_MORPHING; get_configuration(drive, FEATURE_POWER_MANAGEMENT , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_POWER_MANAGEMENT; get_configuration(drive, FEATURE_EMBEDDED_CHANGER , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_EMBEDDED_CHANGER; get_configuration(drive, FEATURE_DEFECT_MANAGEMENT , &len, NULL); if (len >= 0x08) { drive->capabilities|=CAP_DEFECT_MANAGEMENT; if (len >= 0x0C) { if (drive->rd_buf[12]&0x80) drive->capabilities|=CAP_SSA; } } get_configuration(drive, FEATURE_REAL_TIME_STREAMING , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_REAL_TIME_STREAMING; get_configuration(drive, FEATURE_MRW , &len, NULL); if (len >= 0x0C) { drive->rd_capabilities|=DEVICE_MRW; if (drive->rd_buf[12]&0x01) drive->wr_capabilities|=DEVICE_MRW; if (drive->rd_buf[12]&0x02) drive->rd_capabilities|=DEVICE_MRW_DVD; if (drive->rd_buf[12]&0x04) drive->wr_capabilities|=DEVICE_MRW_DVD; } get_configuration(drive, FEATURE_CD_READ , &len, NULL); // LU can operate with CD's if (len >= 0x0C) { // drive->rd_capabilities|=DEVICE_CD_ROM; if (drive->rd_buf[12]&0x1) drive->capabilities|=CAP_CD_TEXT; if (drive->rd_buf[12]&0x2) drive->capabilities|=CAP_C2; } get_configuration(drive, FEATURE_DDCD_READ , &len, NULL); // LU can Reed/Write DDCD's if (len >= 0x0C) { drive->rd_capabilities|=DEVICE_DDCD_R; drive->rd_capabilities|=DEVICE_DDCD_RW; get_configuration(drive, FEATURE_DDCD_R_WRITE , &len, NULL); if (len >= 0x0C) drive->wr_capabilities|=DEVICE_DDCD_R; get_configuration(drive, FEATURE_DDCD_RW_WRITE , &len, NULL); if (len >= 0x0C) drive->wr_capabilities|=DEVICE_DDCD_RW; } get_configuration(drive, FEATURE_DVD_READ , &len, NULL); // LU can operate with DVD's if (len >= 0x08) { if ((drive->rd_buf[10] >> 2) > 0) drive->mmc=5; if (len >= 0x0C) { if (drive->rd_buf[14]&0x01) drive->rd_capabilities|=DEVICE_DVD_R_DL; if (drive->rd_buf[14]&0x02) drive->rd_capabilities|=DEVICE_DVD_RW_DL; } get_configuration(drive, FEATURE_DVD_CPRM , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_DVD_CPRM; get_configuration(drive, FEATURE_DVD_CSS , &len, NULL); if (len >= 0x08) drive->capabilities|=CAP_DVD_CSS; get_configuration(drive, FEATURE_DVD_R_RW_WRITE , &len, NULL); if (len >= 0x08) { drive->wr_capabilities|=DEVICE_DVD_R; if (len >= 0x0C) { if (drive->rd_buf[12]&0x02) drive->wr_capabilities|=DEVICE_DVD_RW; if (drive->rd_buf[12]&0x04) drive->capabilities|= CAP_TEST_WRITE_DVD; //if (drive->rd_buf[12]&0x08) drive->wr_capabilities|=DEVICE_DVD_R_DL_SEQ; if (drive->rd_buf[12]&0x08) drive->wr_capabilities|=DEVICE_DVD_R_DL; } } get_configuration(drive, FEATURE_LAYER_JUMP_RECORDING , &len, NULL); //if (len >= 0x08) drive->wr_capabilities|=DEVICE_DVD_R_DL_LJ; if (len >= 0x08) drive->wr_capabilities|=DEVICE_DVD_R_DL; get_configuration(drive, FEATURE_DVD_PLUS_R , &len, NULL); if (len >= 0x08) { // drive->mmc=4; drive->rd_capabilities|=DEVICE_DVD_PLUS_R; if (drive->rd_buf[12]&0x01) drive->wr_capabilities|=DEVICE_DVD_PLUS_R; } get_configuration(drive, FEATURE_DVD_PLUS_RW , &len, NULL); if (len >= 0x0C) { drive->rd_capabilities|=DEVICE_DVD_PLUS_RW; if (drive->rd_buf[12]&0x01) drive->wr_capabilities|=DEVICE_DVD_PLUS_RW; } get_configuration(drive, FEATURE_DVD_PLUS_R_DOUBLE_LAYER , &len, NULL); if (len >= 0x0C) { // drive->mmc=5; drive->rd_capabilities|=DEVICE_DVD_PLUS_R_DL; if (drive->rd_buf[12]&0x01) drive->wr_capabilities|=DEVICE_DVD_PLUS_R_DL; } get_configuration(drive, FEATURE_DVD_PLUS_RW_DOUBLE_LAYER , &len, NULL); if (len >= 0x0C) { // drive->mmc=5; drive->rd_capabilities|=DEVICE_DVD_PLUS_RW_DL; if (drive->rd_buf[12]&0x01) drive->wr_capabilities|=DEVICE_DVD_PLUS_RW_DL; } } if (drive->wr_capabilities & DEVICE_DVD_RW) drive->rd_capabilities|=DEVICE_DVD_RW; if (drive->wr_capabilities & DEVICE_DVD_R_DL) drive->rd_capabilities|=DEVICE_DVD_R_DL; get_configuration(drive, FEATURE_BD_READ , &len, NULL); if ((len >=0x08) && (drive->rd_buf[11] >=28) ) { if (drive->rd_buf[16] | drive->rd_buf[17] | drive->rd_buf[18] | drive->rd_buf[19] | drive->rd_buf[20] | drive->rd_buf[21] | drive->rd_buf[22] | drive->rd_buf[23]) drive->rd_capabilities |= (DEVICE_BD_RE); if (drive->rd_buf[24] | drive->rd_buf[25] | drive->rd_buf[26] | drive->rd_buf[27] | drive->rd_buf[28] | drive->rd_buf[29] | drive->rd_buf[30] | drive->rd_buf[31]) drive->rd_capabilities |= (DEVICE_BD_R); if (drive->rd_buf[32] | drive->rd_buf[33] | drive->rd_buf[34] | drive->rd_buf[35] | drive->rd_buf[36] | drive->rd_buf[37] | drive->rd_buf[38] | drive->rd_buf[39]) drive->rd_capabilities |= (DEVICE_BD_ROM); } get_configuration(drive, FEATURE_BD_WRITE , &len, NULL); if ((len >=0x08) && (drive->rd_buf[11] >=20) ) { if (drive->rd_buf[16] | drive->rd_buf[17] | drive->rd_buf[18] | drive->rd_buf[19] | drive->rd_buf[20] | drive->rd_buf[21] | drive->rd_buf[22] | drive->rd_buf[23]) drive->wr_capabilities |= (DEVICE_BD_RE); if (drive->rd_buf[24] | drive->rd_buf[25] | drive->rd_buf[26] | drive->rd_buf[27] | drive->rd_buf[28] | drive->rd_buf[29] | drive->rd_buf[30] | drive->rd_buf[31]) drive->wr_capabilities |= (DEVICE_BD_R); } get_configuration(drive, FEATURE_HDDVD_READ , &len, NULL); if ((len >=0x08) ) { drive->rd_capabilities|=DEVICE_HDDVD_ROM; if ((len >=0x0C) ) { if (drive->rd_buf[12]&0x01) drive->rd_capabilities|=DEVICE_HDDVD_R; if (drive->rd_buf[14]&0x01) drive->rd_capabilities|=DEVICE_HDDVD_RAM; } } get_configuration(drive, FEATURE_HDDVD_WRITE , &len, NULL); if ((len >=0x0C) ) { if (drive->rd_buf[12]&0x01) drive->wr_capabilities|=DEVICE_HDDVD_R; if (drive->rd_buf[14]&0x01) drive->wr_capabilities|=DEVICE_HDDVD_RAM; } if (!drive->silent) printf("** Device is MMC-%d\n",drive->mmc); } } int read_atip(drive_info* drive) { unsigned char data[4]; int size = 0; int i; drive->media.ATIP_size = 0; drive->cmd[0]=MMC_READ_TOC_PMA_ATIP; drive->cmd[1]=0; drive->cmd[2]=4; // ATIP drive->cmd[3]=0; drive->cmd[8]=4; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(READ,data,4) )) {if (!drive->silent) sperror ("READ_ATIP",drive->err); drive->media.ATIP_size = 0; return 1;} size = ntoh16u((char*)data); size += 2; drive->cmd[0]=MMC_READ_TOC_PMA_ATIP; drive->cmd[1]=0; drive->cmd[2]=4; // ATIP drive->cmd[3]=0; drive->cmd[7]=(size >> 8) & 0xFF; drive->cmd[8]=size & 0xFF; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(READ,drive->media.ATIP,size) )) {sperror ("READ_ATIP",drive->err); drive->media.ATIP_size = 0; return 1;} drive->media.ATIP_size = size; if (!drive->silent) { printf("ATIP (%d bytes):\n",size); for (i=0; i<(min(size, 4)); i++) printf(" %3d (%02X)",drive->media.ATIP[i],drive->media.ATIP[i]); if (size > 4) for (i=0; i<(size-4); i++) { if (!(i % 8)) printf("\n"); else if (!(i % 4)) printf(" "); printf(" %3d (%02X)",drive->media.ATIP[i+4] & 0xFF,drive->media.ATIP[i+4] & 0xFF); } printf("\n"); } return 0; } int read_toc(drive_info* drive) { unsigned char data[4]; int size = 0; int i; drive->cmd[0]=MMC_READ_TOC_PMA_ATIP; drive->cmd[1]=0; drive->cmd[2]=0; // TOC drive->cmd[3]=0; drive->cmd[8]=4; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(READ,data,4) )) {sperror ("READ_TOC",drive->err); return 1;} // if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,2048) )) // {sperror ("READ_TOC",drive->err); return 1;} size = ntoh16u((char*)data); size += 2; drive->cmd[0]=MMC_READ_TOC_PMA_ATIP; drive->cmd[1]=0; drive->cmd[2]= 0; // TOC drive->cmd[3]=0; drive->cmd[7]=(size >> 8) & 0xFF; drive->cmd[8]=size & 0xFF; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,size) )) {if (!drive->silent) sperror ("READ_TOC",drive->err); return 1;} if (!drive->silent) { printf("TOC (%d bytes):\n",size); for (i=0; i<(min(size, 4)); i++) printf(" %3d (%02X)",drive->rd_buf[i] & 0xFF,drive->rd_buf[i] & 0xFF); if (size > 4) for (i=0; i<(size-4); i++) { if (!(i % 8)) printf("\n"); else if (!(i % 4)) printf(" "); printf(" %3d (%02X)",drive->rd_buf[i+4] & 0xFF,drive->rd_buf[i+4] & 0xFF); } printf("\n"); } return 0; } int read_disc_info(drive_info* drive, int len) { drive->cmd[0] = MMC_READ_DISC_INFORMATION; drive->cmd[7] = (len >> 8) & 0xFF; drive->cmd[8] = len & 0xFF; drive->cmd[9]=0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,len) )) {if (!drive->silent) sperror ("READ_DISC_INFO",drive->err); return 1;} return 0; } int read_track_info(drive_info* drive, trk* track, unsigned int track_n){ int size = 2048; drive->cmd[0] = MMC_READ_TRACK_INFORMATION; drive->cmd[1] = 0x01; drive->cmd[2] = (track_n >> 24) & 0xFF; drive->cmd[3] = (track_n >> 16) & 0xFF; drive->cmd[4] = (track_n >> 8) & 0xFF; drive->cmd[5] = track_n & 0xFF ; drive->cmd[7] = (size >> 8) & 0xFF ; drive->cmd[8] = size & 0xFF ; drive->cmd[9] = 0; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,size) )) {if (!drive->silent) sperror ("READ_TRACK_INFO",drive->err); return 1;} #if 0 int i, len; len = ( drive->rd_buf[0] << 8 ) | drive->rd_buf[1]; printf("\nTrack #%d info:\n ",track->n); for (i=0; ird_buf[i] & 0xFF); if (!((i+1)%8)) printf("\n ");} if (((i)%8)) printf("\n"); #endif track->n = ((drive->rd_buf[32]&0xFF) << 8) | (drive->rd_buf[2]&0xFF); track->session = ((drive->rd_buf[33]&0xFF) << 8) | (drive->rd_buf[3]&0xFF); track->track_mode = drive->rd_buf[5] & 0x0F; track->data_mode = drive->rd_buf[6] & 0x0F; track->start = ntoh32(drive->rd_buf+8); track->next_writable = ntoh32(drive->rd_buf+12); track->free = ntoh32(drive->rd_buf+16); track->size = ntoh32(drive->rd_buf+24); track->last = ntoh32(drive->rd_buf+28); // track->end = track->start+track->size-1; lba2msf(track->start,&track->msf_start); lba2msf(track->next_writable,&track->msf_next); lba2msf(track->free,&track->msf_free); lba2msf(track->size,&track->msf_size); lba2msf(track->last,&track->msf_last); // lba2msf(track->end,&track->msf_end); return 0; } int get_track_list(drive_info* drive){ int i; int tf,tl; if (read_track_info(drive, &drive->media.track[0], 1)) { // if (!drive->silent) printf("READ TRACK INFO failed! Trying to read TOC...\n"); read_toc(drive); tf = drive->rd_buf[2]; tl = drive->rd_buf[3]; drive->media.tracks = tl - tf +1; for (i=0; imedia.tracks; i++) { drive->media.track[i].n = i+1; drive->media.track[i].session = 1; drive->media.track[i].start = ntoh32(drive->rd_buf+i*8+8); drive->media.track[i].last = ntoh32(drive->rd_buf+i*8+16); drive->media.track[i].size = drive->media.track[i].last - drive->media.track[i].start + 1; drive->media.track[i].free = 0; drive->media.track[i].track_mode = drive->rd_buf[i*8+5] & 0x0F; // drive->media.track[i].data_mode = 0; drive->media.track[i].data_mode = (drive->rd_buf[i*8+5] >> 4) & 0x0F; lba2msf(drive->media.track[i].start, &drive->media.track[i].msf_start); lba2msf(drive->media.track[i].next_writable, &drive->media.track[i].msf_next); lba2msf(drive->media.track[i].last, &drive->media.track[i].msf_last); lba2msf(drive->media.track[i].free, &drive->media.track[i].msf_free); // lba2msf(drive->media.track[i].end, &drive->media.track[i].msf_end); lba2msf(drive->media.track[i].size, &drive->media.track[i].msf_size); } } else { read_disc_information(drive); for (i=0; imedia.tracks; i++) read_track_info(drive, &drive->media.track[i], i+1); } if (!drive->silent) printf("tracks: %d\n",drive->media.tracks); if ((drive->media.tracks) && (!drive->silent)) for (i=0; imedia.tracks; i++) { printf("\nTrack # : %d\n", drive->media.track[i].n); printf("Session #: %d\n", drive->media.track[i].session); printf("Track mode : %d\n",drive->media.track[i].track_mode); printf("Data mode : %d\n",drive->media.track[i].data_mode); printf("Track start : %d\n",drive->media.track[i].start); printf("Next writable : %d\n",drive->media.track[i].next_writable); printf("Free : %d\n",drive->media.track[i].free); printf("Size : %d\n",drive->media.track[i].size); printf("Last recorded : %d\n",drive->media.track[i].last); } return 0; } int read_capacity(drive_info* drive) { unsigned char data[8]; memset(data, 0, 8); drive->cmd[0] = SBC_READ_CAPACITY; drive->cmd[9] = 0; if ((drive->cmd.transport (READ,data,8))) { if (!drive->silent) sperror ("READ_CAPACITY",drive->err); drive->media.capacity = 0; drive->media.sectsize = 2048; } else { drive->media.capacity = ntoh32(data); if(drive->media.capacity) drive->media.capacity++; drive->media.sectsize = ntoh32(data+4); } lba2msf(drive->media.capacity, &drive->media.capacity_msf); return 0; } int read_capacity_free(drive_info* drive) { trk track; if (drive->media.dstatus == 2) { drive->media.capacity_free = 0; return 0; } read_disc_information(drive); if (!read_track_info(drive, &track, drive->media.tracks)) { //printf("track %d free: %d\n",drive->media.tracks,track.free); drive->media.capacity_free = track.free; lba2msf(drive->media.capacity_free,&drive->media.capacity_free_msf); return 0; } /* if (drive->media.type & DISC_CD) { //if (0) { if (((drive->media.last_lead_out >> 24) & 0xFF ) == 0xFF) { drive->media.capacity_free = 0; lba2msf(drive->media.capacity_free,&drive->media.capacity_free_msf); return 0; } else { drive->media.capacity_free = drive->media.last_lead_out - drive->media.capacity - 150 - 2; lba2msf(drive->media.capacity_free,&drive->media.capacity_free_msf); return 0; } } else if (drive->media.type & DISC_DVD) { // track.n = drive->media.sessions+1; read_track_info(drive, &track, drive->media.sessions+1); drive->media.capacity_free = track.free; lba2msf(drive->media.capacity_free,&drive->media.capacity_free_msf); return 0; } */ drive->media.capacity_free = 0; return 1; } int read_capacity_total(drive_info* drive) { unsigned int len; // char header[40]; unsigned int phsta=0, phend=0; // union { unsigned char _e[4+40],_11[4+256]; } dvd; drive->media.capacity_total = 0; int doffs; if (drive->media.type & DISC_CD) { msf lout; int ilout; // int atippr = read_atip(drive); // if (!atippr) drive->ATIP_len+=4; else return 1; if (!drive->media.ATIP_size) { drive->media.capacity_total = drive->media.capacity + drive->media.capacity_free; return 0; } else { lout.m=drive->media.ATIP[12]; lout.s=drive->media.ATIP[13]; lout.f=drive->media.ATIP[14]; ilout = msf2lba(lout); if (!drive->silent) printf("CD-R(W) Lead-Out: %02d:%02d.%02d\n", lout.m, lout.s, lout.f); drive->media.capacity_total = ilout-150; // lba2msf(drive->media.capacity_total, &lout); // ilout = msf2lba(lout); // if (!drive->silent) printf("CD-R(W) Capacity: %02d:%02d.%02d (sector %d)\n", lout.m, lout.s, lout.f, ilout); return 0; } } else if (drive->media.type & (DISC_DVDminus)) { if (drive->media.type & (DISC_DVDmRWR | DISC_DVDmRWS | DISC_DVDmRWDL)) { // DVD-RW len= 12+256; drive->cmd[0] = MMC_READ_FORMAT_CAPACITIES; drive->cmd[7] = len>>8; drive->cmd[8] = len & 0xFF; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,len))) {if (!drive->silent) sperror ("READ_FORMAT_CAPACITIES",drive->err); goto read_total_dvdmr; } printf ( "Capacity descriptors: %02x\n",drive->rd_buf[3] >> 3); doffs = 12; while (!drive->media.capacity_total) { if (!(drive->rd_buf[doffs+4] >> 2)) drive->media.capacity_total = ntoh32(drive->rd_buf+doffs); } if (!drive->media.capacity_total) { switch(drive->rd_buf[8] & 0x03) { case 0: printf("* Reserved\n"); goto read_total_dvdmr; case 1: printf("* Unformatted or blank media\n"); break; case 2: printf("* Formatted media\n"); break; case 3: printf("* No media or unknown capacity\n"); goto read_total_dvdmr; } drive->media.capacity_total = ntoh32(drive->rd_buf+4); } return 0; } else { // DVD-R read_total_dvdmr: len= 44; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x10; drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,len))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 10",drive->err); return 1;} phsta = ntoh32(drive->rd_buf+8); if ((drive->rd_buf[6] & 0x60) == 0) phend = ntoh32(drive->rd_buf+12); else phend = ntoh32(drive->rd_buf+16); drive->media.capacity_total = phend - phsta + 1; return 0; } } else if (drive->media.type & DISC_DVDplus) { if (drive->media.type & (DISC_DVDpRW | DISC_DVDpRWDL)) { #warning DVD+RW total sectors reading } else { len= 44; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x00; drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,len))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 00",drive->err); return 1;} phsta = ntoh32(drive->rd_buf+8); if ((drive->rd_buf[6] & 0x60) == 0) phend = ntoh32(drive->rd_buf+12); else phend = ntoh32(drive->rd_buf+16); drive->media.capacity_total = phend - phsta + 1; // printf("Phy start: %6X %d\n",phsta,phsta); // printf("Phy end : %6X %d\n",phend,phend); return 0; } } else if (drive->media.type & DISC_DVDRAM) { drive->media.capacity_total = drive->media.capacity + drive->media.capacity_free; return 0; } printf("Unknown media type, can't get available total capacity! Assuming value from READ_CAPACITY.\n"); drive->media.capacity_total = drive->media.capacity + drive->media.capacity_free; return 0; } int read_spare_capacities(drive_info* drive) { if (!(drive->media.type & (DISC_DVDRAM | DISC_HDDVD_RAM) )) { drive->media.spare_psa_total = 0; drive->media.spare_psa_free = 0; drive->media.spare_ssa_total = 0; drive->media.spare_ssa_free = 0; return 0; } drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x00; drive->cmd[8] = 0; drive->cmd[9] = 16; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,20))) if (!drive->silent) { sperror ("READ_DVD_STRUCTURE 00",drive->err); return 1;} drive->media.spare_psa_total = (drive->rd_buf[5]&0xF0) ? 5120 : 12800; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x0A; drive->cmd[8] = 0; drive->cmd[9] = 16; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,16))) if (!drive->silent) { sperror ("READ_DVD_STRUCTURE 0A",drive->err); return 1;} drive->media.spare_psa_free = ntoh32(drive->rd_buf+4); drive->media.spare_ssa_free = ntoh32(drive->rd_buf+8); drive->media.spare_ssa_total = ntoh32(drive->rd_buf+12); return 0; } int read_capacities(drive_info* drive) { // read_disc_info(drive, 24); // drive->media.last_lead_out = (drive->rd_buf[20]&0xFF) << 24 | drive->rd_buf[21]*75*60 + drive->rd_buf[22]*75 + drive->rd_buf[23]; if (read_capacity(drive)) printf("Error reading used capacity\n"); if (read_capacity_free(drive)) printf("Error reading free capacity\n"); if (read_capacity_total(drive)) { // printf("Error reading total capacity\n"); drive->media.capacity_total = drive->media.capacity + drive->media.capacity_free; } read_spare_capacities(drive); return 0; } int read_disc_information(drive_info* drive) { int i=0,len=0; drive->cmd[0] = MMC_READ_DISC_INFORMATION; drive->cmd[7] = 0x08; drive->cmd[8] = 0x00; drive->cmd[9] = 0x00; drive->cmd.transport (READ,drive->rd_buf,2048); len= (drive->rd_buf[0]<<8)|drive->rd_buf[1]; if (!drive->silent) printf("Disc info length: 0x%04X\n ",len); if (!drive->silent) for (i=0; ird_buf[i] & 0xFF); if (!((i+1)%8)) printf("\n "); } if (((i)%8)) printf("\n"); // if (len < 0x20) { if (len < 0x16) { drive->media.erasable = 0; drive->media.dstatus = 0; drive->media.sstatus = 0; drive->media.sessions = 0; drive->media.tracks = 0; return 1; } drive->media.erasable = (drive->rd_buf[2]&0x10); drive->media.dstatus = drive->rd_buf[2]&0x03; drive->media.sstatus = (drive->rd_buf[2]>>2)&0x03; drive->media.sessions = (drive->rd_buf[4]|(drive->rd_buf[9]<<8)); // if (!drive->media.sstatus) drive->media.sessions--; drive->media.tracks = drive->rd_buf[6]|(drive->rd_buf[11]<<8); if (!drive->silent) { printf(" first track# on disc: %d\n", drive->rd_buf[3]); printf(" first track# in last session: %d\n", drive->rd_buf[5]|(drive->rd_buf[10]<<8)); printf(" last track# in last session: %d\n", drive->media.tracks); printf(" disc type: %02X\n", drive->rd_buf[8]&0xFF); printf(" disc ID: %08X\n", ntoh32(drive->rd_buf[12])); printf(" Last session lead-in start: %d:%02d.%02d\n", (drive->rd_buf[16]<<8)|drive->rd_buf[17],drive->rd_buf[18],drive->rd_buf[19]); drive->media.last_lead_out = ((drive->rd_buf[20]&0xFF) << 24) | (drive->rd_buf[21]*75*60 + drive->rd_buf[22]*75 + drive->rd_buf[23]); printf(" Last possible lead-out start: %d:%02d.%02d (sector 0x%08X)\n", (drive->rd_buf[20]<<8)|drive->rd_buf[21],drive->rd_buf[22],drive->rd_buf[23],drive->media.last_lead_out); } /* if (!drive->media.sstatus) { drive->media.sessions--; drive->media.tracks--; } */ return 0; } int determine_cd_type(drive_info* drive) { // unsigned char* ATIP; // int ATIP_len; // int i; int ratip = read_atip(drive); if (ratip) { if (!drive->silent) printf("no ATIP found, assuming disc type: CD-ROM\n"); return DISC_CDROM; // CD-ROM // } else { // drive->ATIP_len += 4; } if (drive->media.ATIP_size < 8) { if (!drive->silent) printf("ATIP too small, assuming disc type: CD-ROM\n"); return DISC_CDROM; // CD-ROM } /* printf("ATIP_len=%d\nATIP data:",drive->ATIP_len); for (i=0; i< drive->ATIP_len; i++) printf("%4d",(drive->ATIP[i])&0xFF); printf("\n"); */ // CD-RW? int cdrw = !!(drive->media.ATIP[6] & 0x40); int cd_subtype = (drive->media.ATIP[6] & 0x38); if (cdrw) { if (!drive->silent) printf("disc type: CD-RW\n"); return (DISC_CDRW | cd_subtype); } if (!drive->silent) printf("disc type: CD-R\n"); return (DISC_CDR | cd_subtype); } int read_mediaid_dvd(drive_info* drive){ drive->media.MID[0]=0; for (int i=0; iparms.wr_speed_tbl_media[i] = -1; // if (drive->media.type & DISC_DVDRAM) { read_mediaid_dvdram(drive); if (!drive->err) return 0; } if (drive->media.type & DISC_DVDminus) { read_mediaid_dvdminus(drive); if (!drive->err) return 0; } else if (drive->media.type & DISC_DVDplus) { read_mediaid_dvdplus(drive); if (!drive->err) return 0; #if 1 } else { // try to read Media ID even media is reported as DVD-ROM if (read_mediaid_dvdplus(drive)) return read_mediaid_dvdminus(drive); #endif } return 0; } int read_mediaid_dvdram(drive_info* drive) { int i; unsigned int len; char header[40]; // union { unsigned char _e[4+40],_11[4+256]; } dvd; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x00; drive->cmd[8] = 0; drive->cmd[9] = 4; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,header,4))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 00",drive->err); return 1;} len = (header[0]<<8|header[1]) + 2; if (len>762) len= 762; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x00; drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->media.MID_raw,len))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 00",drive->err); return 1;} drive->media.MID_size = len-4; memcpy(drive->media.MID, drive->media.MID_raw + 4+597,16); drive->media.MID[12]=0; for (i=0; i<12; i++) if(drive->media.MID[i] == 0) drive->media.MID[i]=0x20; drive->media.MID_type = MID_type_DVDRAM; return 0; } int read_mediaid_dvdminus(drive_info* drive){ int i; unsigned int len; char header[40]; // union { unsigned char _e[4+40],_11[4+256]; } dvd; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x0e; drive->cmd[8] = 0; drive->cmd[9] = 4; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,header,4))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 0E",drive->err); return 1;} len = (header[0]<<8|header[1]) + 2; if (len>68) len= 68; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x0e; drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->media.MID_raw,len))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 0E",drive->err); return 1;} drive->media.MID_size = len-4; // drive->media.MID[0] = 0; memcpy(drive->media.MID, drive->media.MID_raw + 4+17,6); /* drive->media.MID[6]='-'; memcpy(drive->media.MID+7, drive->media.MID_raw + 29,6); drive->media.MID[12]=0; */ memcpy(drive->media.MID+6, drive->media.MID_raw + 4+25,6); drive->media.MID[11]=0; // drive->media.MID[12]='-'; // memcpy(drive->media.MID+13, drive->media.MID_raw + 37,6); // drive->media.MID[18]=0; for (i=0; i<12; i++) if(drive->media.MID[i] == 0) drive->media.MID[i]=0x20; drive->media.MID_type = MID_type_DVDm; return 0; } int read_mediaid_dvdplus(drive_info* drive){ int i; unsigned int len; char header[40]; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x11; drive->cmd[8] = 0; drive->cmd[9] = 4; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,header,4))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 11",drive->err); return 1;} len = (header[0]<<8|header[1]) + 2; if (len>260) len= 260; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x11; drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[11] = 0; if ((drive->err = drive->cmd.transport(READ,drive->media.MID_raw,len))) {if (!drive->silent) sperror ("READ_DVD_STRUCTURE 11",drive->err); return 1;} drive->media.MID_size = len-4; // drive->media.MID[0] = 0; memcpy(drive->media.MID, drive->media.MID_raw + 4+19,8); drive->media.MID[8]='-'; memcpy(drive->media.MID+9, drive->media.MID_raw + 4+27,3); drive->media.MID[12]='-'; sprintf(drive->media.MID+13, "%03d", drive->media.MID_raw[4+30]); drive->media.MID[16]=0; for (i=0; i<12; i++) if(drive->media.MID[i] == 0) drive->media.MID[i]=0x20; drive->media.MID_type = MID_type_DVDp; // process manufacturer defined write speeds... int wr_idx = 0; if (drive->media.MID_raw[4+31] > 32) { drive->parms.wr_speed_tbl_media[wr_idx] = drive->media.MID_raw[4+32] / 14.58; wr_idx++; } for (int i=0; i<6;i++) { //if ((drive->media.MID_raw[4+18] & (1 << i)) && (drive->media.MID_raw[4+64+i*32] == (i+1) )) { if ((drive->media.MID_raw[4+18] & (1 << i)) && (drive->media.MID_raw[4+64+i*32] >0)) { // printf("EI #%d\n",i); drive->parms.wr_speed_tbl_media[wr_idx] = drive->media.MID_raw[4+67+i*32] / 13.95; wr_idx++; } } return 0; } int read_mediaid_cd(drive_info* drive) { // printf("read_mediaid_cd()\n"); msf lin; int type; // int atippr = read_atip(drive); // if (!atippr) drive->ATIP_len+=4; else return 1; if (!drive->media.ATIP_size) return 1; lin.m=drive->media.ATIP[8]; lin.s=drive->media.ATIP[9]; lin.f=drive->media.ATIP[10]; type = lin.f % 10; lin.f -= type; int idx=0; int nf=1; while (mi[idx].lin.m && nf) if (lin.m == mi[idx].lin.m && lin.s == mi[idx].lin.s && lin.f == mi[idx].lin.f) nf=0; else idx++; // strncpy(drive->media.MID,mi[idx].name,47)); sprintf(drive->media.MID,"[%02d:%02d.%02d] %s",lin.m,lin.s,lin.f,mi[idx].name); drive->media.MID_type = MID_type_CD; return 0; } int determine_disc_type(drive_info* drive) { // int current = 0; // int i=0; drive->media.type = DISC_NODISC; drive->media.MID_type = MID_type_NONE; drive->media.MID_size = 0; // drive->media.type = Media_NoMedia; if (drive->mmc>1) { get_configuration(drive, FEATURE_PROFILE_LIST, NULL, 0); switch (drive->rd_buf[7]) { case 0: drive->media.type = DISC_NODISC; break; case PROFILE_CD_ROM: drive->media.type = DISC_CDROM; break; case PROFILE_CD_R: drive->media.type = DISC_CDR; break; case PROFILE_CD_RW: drive->media.type = DISC_CDRW; break; case PROFILE_DVD_ROM: drive->media.type = DISC_DVDROM; break; case PROFILE_DVD_R_SEQ: drive->media.type = DISC_DVDmR; break; case PROFILE_DVD_RAM: drive->media.type = DISC_DVDRAM; break; case PROFILE_DVD_RW_RESTOV: drive->media.type = DISC_DVDmRWR; break; case PROFILE_DVD_RW_SEQ: drive->media.type = DISC_DVDmRWS; break; case PROFILE_DVD_RW_DL: drive->media.type = DISC_DVDmRWDL; break; case PROFILE_DVD_R_DL_SEQ: drive->media.type = DISC_DVDmRDL; break; case PROFILE_DVD_R_DL_JUMP: drive->media.type = DISC_DVDmRDLJ; break; case PROFILE_DVD_PLUS_RW: drive->media.type = DISC_DVDpRW; break; case PROFILE_DVD_PLUS_R: drive->media.type = DISC_DVDpR; break; case PROFILE_DVD_PLUS_R_DL: drive->media.type = DISC_DVDpRDL; break; case PROFILE_DVD_PLUS_RW_DL: drive->media.type = DISC_DVDpRWDL; break; case PROFILE_BD_ROM: drive->media.type = DISC_BD_ROM; break; case PROFILE_BD_R_SEQ: drive->media.type = DISC_BD_R_SEQ; break; case PROFILE_BD_R_RND: drive->media.type = DISC_BD_R_RND; break; case PROFILE_BD_RE: drive->media.type = DISC_BD_RE; break; case PROFILE_HDDVD_ROM: drive->media.type = DISC_HDDVD_ROM; break; case PROFILE_HDDVD_R: drive->media.type = DISC_HDDVD_R; break; case PROFILE_HDDVD_RAM: drive->media.type = DISC_HDDVD_RAM; break; case PROFILE_HDDVD_RW: drive->media.type = DISC_HDDVD_RW; break; case PROFILE_HDDVD_R_DL: drive->media.type = DISC_HDDVD_RDL; break; case PROFILE_HDDVD_RW_DL: drive->media.type = DISC_HDDVD_RWDL; break; default: drive->media.type = DISC_UN; break; } if (!drive->media.type) return 0; read_disc_information(drive); if (drive->media.type & DISC_CD) { drive->media.type = determine_cd_type(drive); read_mediaid_cd(drive); if (!drive->silent) printf("** MID: '%s'\n",drive->media.MID); return 0; } else if (drive->media.type & DISC_DVD) { // drive->media.type=Media_DVD; 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; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,36))) if (!drive->silent) sperror ("READ_DVD_STRUCTURE",drive->err); drive->media.book_type = (drive->rd_buf[4] & 0xFF); drive->media.layers = 1 + ((drive->rd_buf[6] & 0x60) >> 5); read_mediaid_dvd(drive); if (!drive->silent) printf("** MID: '%s'\n",drive->media.MID); if ((!(drive->wr_capabilities & DEVICE_DVD))||(drive->media.type & DISC_DVDROM)) { if (!drive->silent) { printf("Device can't write DVD's or media detected as DVD-ROM,\n"); printf("trying to corectly detect DVD type...\n"); } switch ((drive->media.book_type>>4)&0x0F){ case BOOK_DVD_R: if (drive->media.layers == 1) drive->media.type = DISC_DVDmR; else drive->media.type = DISC_DVDmRDL; break; case BOOK_DVD_RW: drive->media.type = DISC_DVDmRW; break; case BOOK_DVD_PR: drive->media.type = DISC_DVDpR; break; case BOOK_DVD_PRW: drive->media.type = DISC_DVDpRW; break; case BOOK_DVD_PR_DL: drive->media.type = DISC_DVDpRDL; break; case BOOK_DVD_ROM: switch (drive->media.MID_type) { case MID_type_DVDRAM: drive->media.type = DISC_DVDRAM; break; case MID_type_DVDm: if (drive->media.erasable) { if (drive->media.layers == 1) drive->media.type = DISC_DVDmRW; else drive->media.type = DISC_DVDmRWDL; } else { if (drive->media.layers == 1) drive->media.type = DISC_DVDmR; else drive->media.type = DISC_DVDmRDL; } break; case MID_type_DVDp: if (drive->media.erasable) { if (drive->media.layers == 1) drive->media.type = DISC_DVDpRW; else drive->media.type = DISC_DVDpRWDL; } else { if (drive->media.layers == 1) drive->media.type = DISC_DVDpR; else drive->media.type = DISC_DVDpRDL; } break; default: break; } break; default: break; } } if (drive->media.type & DISC_DVDminus) read_writer_info(drive); // if (!drive->silent) printf("** Writer used: '%s'\n",drive->media.writer); read_disc_regions(drive); /* printf("DVD Copyright info: "); for (i=0;i<4;i++) printf("0x%02X ",drive->rd_buf[i]); printf("\n"); */ return 0; } } else { read_capacity(drive); if (drive->media.capacity) { // drive->media.type=Media_CD; drive->media.type = DISC_CDROM; read_disc_information(drive); } return 0; } return 1; } int get_spindown(drive_info* drive) { mode_sense(drive, 0x0D, 00, 192); if (drive->err) {drive->parms.spindown_idx=spindowns; return (drive->err);} drive->parms.spindown_idx = drive->rd_buf[11] & 0x0F; return 0; } int set_spindown(drive_info* drive) { memset(drive->rd_buf,0,16); drive->rd_buf[8] = 0x0D; drive->rd_buf[9] = 0x06; drive->rd_buf[11] = drive->parms.spindown_idx & 0x0F; drive->rd_buf[13] = 0x3C; drive->rd_buf[15] = 0x4B; mode_select(drive, 16); return 0; } int get_performance(drive_info* drive, bool rw, uint8_t type) { const int max_descs=52; const int desc_len=16; uint32_t len, descn; uint32_t r,w,lba; // int i; int j,offs; drive->cmd[0] = MMC_GET_PERFORMANCE; drive->cmd[1] = (!type) ? (0x04 * rw) : 0x00; drive->cmd[8] = (max_descs >> 8) & 0xFF; drive->cmd[9] = max_descs & 0xFF; drive->cmd[10] = type; drive->cmd[11] = 0x00; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf, 1024))) { if (!drive->silent) sperror ("GET_PERFORMANCE",drive->err); return (drive->err); } // return 1; len = ntoh32(drive->rd_buf); descn = len/desc_len; // printf("Performance data length: %d; decriptors: %d\n",len, descn); // printf("GET_PERFORMANCE response dump:\n"); // for (j=0; j*8rd_buf[i]); // printf("\n"); // } if (type == 0x03) for (j=0; jparms.wr_speed_tbl_kb[j] = -1; for (j=0; jperf.lba_s = ntoh32(drive->rd_buf+offs); offs = 8+j*desc_len+4; drive->perf.spd_s = ntoh32(drive->rd_buf+offs); offs = 8+j*desc_len+8; drive->perf.lba_e = ntoh32(drive->rd_buf+offs); offs = 8+j*desc_len+12; drive->perf.spd_e = ntoh32(drive->rd_buf+offs); offs = 8+j*desc_len+12; if (!rw) drive->parms.read_speed_kb = ntoh32(drive->rd_buf+offs); else drive->parms.write_speed_kb = ntoh32(drive->rd_buf+offs); // printf("\t%dkB/s@%d -> %dkB/s@%d\n", // drive->perf.spd_s,drive->perf.lba_s,drive->perf.spd_e,drive->perf.lba_e); } else if (type == 0x03) { offs = 8+j*desc_len+4; lba = ntoh32(drive->rd_buf+offs); offs = 8+j*desc_len+8; r = ntoh32(drive->rd_buf+offs); offs = 8+j*desc_len+12; w = ntoh32(drive->rd_buf+offs); // printf("LBA %d: \tW %dkB/s R %dkB/s\n", lba, w, r); drive->parms.wr_speed_tbl_kb[j] = ntoh32(drive->rd_buf+offs); drive->parms.max_write_speed_kb = max(drive->parms.max_write_speed_kb, drive->parms.wr_speed_tbl_kb[j]); } } return 0; } int detect_speeds(drive_info *drive) { int idx, spd, prev_spd, rspd_kb, wspd_kb; // bool gp=1; if (!drive->silent) printf("== Detecting supported read speeds...\n"); for (idx=1; idxparms.speed_tbl[idx]=-1; drive->parms.speed_tbl_kb[idx]=-1; } if (get_rw_speeds(drive)) { drive->parms.read_speed_kb = 1; drive->parms.write_speed_kb = 1; drive->parms.speed_mult = 1; return 1; } rspd_kb = drive->parms.read_speed_kb; wspd_kb = drive->parms.write_speed_kb; // speedidx = 0; // printf("media.type & DISC_CD = %LX\n", drive->media.type & DISC_CD ); // printf("media.type & DISC_DVD = %LX\n", drive->media.type & DISC_DVD ); if ( drive->media.type & DISC_DVD ) { drive->parms.read_speed_kb=22162; if (!set_rw_speeds(drive)) { get_rw_speeds(drive); if (!drive->silent) printf("Max DVD speed via GET_CD_SPEED: %dkB/s\n", drive->parms.read_speed_kb); //if ( (!drive->wr_capabilities) && (drive->capabilities & CAP_REAL_TIME_STREAMING) && (!get_performance(drive))) { if ( (drive->capabilities & CAP_REAL_TIME_STREAMING) // && !(drive->media.type & DISC_DVDRAM) && !(get_performance(drive, 0, 0))) { if (drive->perf.spd_e > 1) drive->parms.max_read_speed_kb = drive->perf.spd_e; // (int)(drive->perf.spd_e*((float)2294912/(float)drive->perf.lba_e)); // drive->parms.max_read_speed_kb = drive->perf.spd_e; drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/1350); if (!drive->silent) printf("Max DVD speed via GET_PERFORMANCE: %d X, %dkB/s\n", drive->parms.max_read_speed_dvd, drive->parms.max_read_speed_kb); drive->parms.speed_mult = drive->parms.read_speed_kb/drive->parms.max_read_speed_dvd; if (drive->parms.speed_mult < 600) { drive->parms.speed_mult = 176.4; } else { drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/1384); drive->parms.speed_mult = 1385; } } else { drive->parms.max_read_speed_kb = drive->parms.read_speed_kb; if (!drive->silent) printf("GET_PERFORMANCE error: using default multiplier\n"); drive->parms.max_read_speed_dvd = (drive->parms.max_read_speed_kb/1385); drive->parms.speed_mult = 1385; } // drive->parms.read_speed_kb = spd_kb; // set_rw_speeds(drive); // drive->parms.speed_mult= drive->parms.max_read_speed_kb/drive->parms.max_read_speed_dvd; if (!drive->silent) { printf("1X multiplier: %.1f kB/s\n", drive->parms.speed_mult); printf("Max spd: %d X, %d kB/s\n", drive->parms.max_read_speed_dvd, drive->parms.max_read_speed_kb); } idx=0; prev_spd=0; for (spd=1; ((idxparms.max_read_speed_dvd+2))); spd++) { // for (spd=1; ((idxparms.read_speed_kb = (int)(spd * (drive->parms.speed_mult+1)); if (!drive->silent) printf("Trying: %dX (%d kB/s)\n", spd, drive->parms.read_speed_kb); set_rw_speeds(drive); get_rw_speeds(drive); drive->parms.read_speed_dvd = (int) (drive->parms.read_speed_kb / drive->parms.speed_mult); if (prev_spd != drive->parms.read_speed_dvd) { // spd = drive->parms.read_speed_dvd; spd = max(spd, drive->parms.read_speed_dvd); drive->parms.speed_tbl[idx] = drive->parms.read_speed_dvd; drive->parms.speed_tbl_kb[idx] = drive->parms.read_speed_kb; if (!drive->silent) printf(" RD speed: %dX (%d kB/s)\n", drive->parms.speed_tbl[idx], drive->parms.speed_tbl_kb[idx]); prev_spd = drive->parms.read_speed_dvd; idx++; // if (drive->capabilities & CAP_REAL_TIME_STREAMING) get_performance(drive); } } #ifdef speedidx } else { speedidx=-1; #endif } } else { drive->parms.read_speed_kb=-1; if (!set_rw_speeds(drive)) { get_rw_speeds(drive); drive->parms.max_read_speed_kb = drive->parms.read_speed_kb; drive->parms.max_read_speed_cd = (drive->parms.max_read_speed_kb/176); // drive->parms.speed_mult=drive->parms.max_read_speed_kb/drive->parms.max_read_speed_cd; drive->parms.speed_mult=176.4; if (!drive->silent) printf("Maximum CD speed: %dX, %5d kB/s; 1X = %.1f kB/s\nSpeeds:\n", drive->parms.max_read_speed_cd, drive->parms.max_read_speed_kb, drive->parms.speed_mult); idx=0; prev_spd=0; for (spd=1; ((idxparms.max_read_speed_cd+2))); spd++) { // for (spd=1; ((idxparms.read_speed_kb = (int) (spd * (drive->parms.speed_mult+1)); if (!drive->silent) printf("Trying: %dX (%5d kB/s)\n", spd, drive->parms.read_speed_kb); set_rw_speeds(drive); get_rw_speeds(drive); drive->parms.read_speed_cd = (int) (drive->parms.read_speed_kb / drive->parms.speed_mult); if (prev_spd != drive->parms.read_speed_cd) { // spd = drive->parms.read_speed_cd; spd = max(spd, drive->parms.read_speed_cd); drive->parms.speed_tbl[idx] = drive->parms.read_speed_cd; drive->parms.speed_tbl_kb[idx] = drive->parms.read_speed_kb; if (!drive->silent) printf(" RD speed: %dX (%5d kB/s)\n", drive->parms.speed_tbl[idx], drive->parms.speed_tbl_kb[idx]); prev_spd = drive->parms.read_speed_cd; idx++; // if (drive->capabilities & CAP_REAL_TIME_STREAMING) get_performance(drive); } } #ifdef speedidx } else { speedidx=-1; #endif } } // combo_Speed->clear(); idx=0; #ifdef speedidx if (!speedidx) { while ((idxparms.speed_tbl[idx]>0)){ int mlt = 176; if ( drive->media.type & DISC_DVD ) mlt=1385; // combo_Speed->insertItem(QString().sprintf("%2dX (%dkB/s)", // drive->parms.speed_tbl[idx],mlt*drive->parms.speed_tbl[idx])); if ((spd_kb/drive->parms.speed_mult)==drive->parms.speed_tbl[idx]) speedidx = idx; idx++; } } else { speedidx = 0; } #endif // combo_Speed->insertItem(tr("max")); get_write_speed_tbl(drive); for (int i=0; iparms.wr_speed_tbl_kb[i] > 0; i++) { if (!drive->silent) printf(" WR speed: %.1fX (%d kB/s)\n", drive->parms.wr_speed_tbl_kb[i] / drive->parms.speed_mult, drive->parms.wr_speed_tbl_kb[i]); } drive->parms.read_speed_kb = rspd_kb; drive->parms.write_speed_kb = wspd_kb; set_rw_speeds(drive); // combo_Speed->setCurrentItem(speedidx); // show_read_speed(drive); return 0; } int get_write_speed_tbl(drive_info* drive) { int offs; int i, spdcnt; drive->parms.max_write_speed_kb = 0; if (drive->capabilities & CAP_REAL_TIME_STREAMING) { get_performance(drive, 0, 0x03); } else { mode_sense(drive, MODE_PAGE_MM_CAP_STATUS, 00, 256); offs=0; while (((drive->rd_buf[offs]) & 0x3F) != 0x2A) offs++; // drive->parms.write_speed_kb = ntoh16(drive->rd_buf+offs+28); spdcnt = ntoh16(drive->rd_buf+offs+30); for (i=0; iparms.wr_speed_tbl_kb[i] = -1; // printf("== Write speeds: %d\n",spdcnt); for (i=0; (iparms.wr_speed_tbl_kb[i] = ntoh16(drive->rd_buf+offs+32+i*4+2); drive->parms.max_write_speed_kb = max(drive->parms.max_write_speed_kb, drive->parms.wr_speed_tbl_kb[i]); // printf(" Speed #%02d: %d kB/s\n",i,drive->parms.wr_speed_tbl_kb[i]); } } return 0; } int get_rw_speeds(drive_info* drive) { int offs; /* PLEXTOR drives always returns maximum read speed via "get performance", not current! */ if (!drive->get_performance_fail && isPlextor(drive)) { drive->get_performance_fail=1; } //if ((drive->capabilities & CAP_REAL_TIME_STREAMING) && !(drive->media.type & DISC_DVDRAM)) { //if (!drive->get_performance_fail && (drive->capabilities & CAP_REAL_TIME_STREAMING)) { if (!drive->get_performance_fail // && !(drive->media.type & DISC_CD) && (drive->capabilities & CAP_REAL_TIME_STREAMING)) { if (!drive->silent) printf("Requesting curerent speeds via GET_PERFORMANCE command...\n"); if (!get_performance(drive, 0, 0) && !get_performance(drive, 1, 0)) return 0; drive->get_performance_fail=1; } if (!drive->silent) printf("Requesting curerent speeds via page 2A...\n"); if (!mode_sense(drive, MODE_PAGE_MM_CAP_STATUS, 00, 256)) { offs=0; while (((drive->rd_buf[offs]) & 0x3F) != 0x2A) offs++; drive->parms.read_speed_kb = ntoh16(drive->rd_buf+offs+14); drive->parms.write_speed_kb = ntoh16(drive->rd_buf+offs+28); return 0; } drive->parms.read_speed_kb = 0; drive->parms.write_speed_kb = 0; return 1; } int set_streaming(drive_info* drive) { char data[28]; memset(data, 0, 28); uint32_t* start_lba = (uint32_t*)&data[4]; uint32_t* end_lba = (uint32_t*)&data[8]; uint32_t* read_size = (uint32_t*)&data[12]; uint32_t* read_time = (uint32_t*)&data[16]; uint32_t* write_size = (uint32_t*)&data[20]; uint32_t* write_time = (uint32_t*)&data[24]; uint32_t speed_rd = 0xFFFFFFFF; uint32_t speed_wr = 0xFFFFFFFF; if (drive->parms.read_speed_kb) speed_rd = drive->parms.read_speed_kb; if (drive->parms.write_speed_kb) speed_wr = drive->parms.write_speed_kb; // if (read_capacity(drive)) return drive->err; *start_lba = ntoh32(0); *end_lba = ntoh32(drive->media.capacity); // *end_lba = ntoh32(0); *read_time = ntoh32(1000); *read_size = ntoh32(speed_rd); *write_time = ntoh32(1000); *write_size = ntoh32(speed_wr); drive->cmd[0] = MMC_SET_STREAMING; drive->cmd[10] = 28; drive->cmd[11] = 0; if ((drive->err=drive->cmd.transport(WRITE,data,28))) { if(!drive->silent) sperror ("SET_STREAMING",drive->err); return (drive->err); } return 0; } int set_cd_speed(drive_info* drive) { uint16_t speed_rd = 0xFFFF; uint16_t speed_wr = 0xFFFF; if (drive->parms.read_speed_kb) speed_rd = drive->parms.read_speed_kb; if (drive->parms.write_speed_kb) speed_wr = drive->parms.write_speed_kb; drive->cmd[0] = MMC_SET_SPEED; drive->cmd[1] = 0x01; drive->cmd[2] = (speed_rd >> 8) & 0xFF; drive->cmd[3] = speed_rd & 0xFF; // drive->cmd[4] = 0xFF; // drive->cmd[5] = 0xFF; drive->cmd[4] = (speed_wr >> 8) & 0xFF; drive->cmd[5] = speed_wr & 0xFF; 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); } return 0; } //#define __STREAMING_PRIOR int set_rw_speeds(drive_info* drive) { int rez=1; if ((drive->capabilities & CAP_REAL_TIME_STREAMING)) { //if ((drive->capabilities & CAP_REAL_TIME_STREAMING) && !(drive->media.type & DISC_CD)) { //if ((drive->capabilities & CAP_REAL_TIME_STREAMING) && !(drive->media.type & DISC_DVDRAM)) { if (!drive->silent) printf("Setting speeds via SET_STREAMING command...\n"); rez = set_streaming(drive); } if (rez) { if (!drive->silent) printf("Setting speeds via SET_CD_SPEED command...\n"); rez = set_cd_speed(drive); } /* #ifdef __STREAMING_PRIOR if (drive->media.type & DISC_CD) { rez = set_cd_speed(drive); } else if (drive->media.type & DISC_DVD) { { if ((rez = set_cd_speed(drive))) rez = set_streaming(drive); } } #else if ((drive->capabilities & CAP_SET_CD_SPEED) )//&& (drive->media.type & DISC_CD)) { if ((rez = set_cd_speed(drive))) rez = set_streaming(drive); } else if (drive->capabilities & CAP_REAL_TIME_STREAMING) { rez = set_streaming(drive); } #endif*/ return rez; } int get_media_status(drive_info* drive){ drive->cmd[0]=MMC_GET_EVENT_STATUS_NOTIFICATION; drive->cmd[1]=0x01; drive->cmd[4]=0x10; drive->cmd[7]=0; drive->cmd[8]=8; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8))) { sperror ("GET_EVENT_STATUS",drive->err); return (drive->err); } if (drive->rd_buf[5] & 0x01) drive->parms.status |= STATUS_OPEN; else drive->parms.status &= (~STATUS_OPEN); if (drive->rd_buf[5] & 0x02) drive->parms.status |= STATUS_MEDIA_PRESENT; else drive->parms.status &= (~STATUS_MEDIA_PRESENT); drive->parms.event = drive->rd_buf[4] & 0x0F; return 0; } int start_stop(drive_info* drive, bool start) { drive->cmd[0]=MMC_START_STOP_UNIT; drive->cmd[4]=0x01 | start; if ((drive->err=drive->cmd.transport(NONE,NULL,0))) { sperror ("START_STOP_UNIT",drive->err); return (drive->err); } return 0; } int load_eject(drive_info* drive, bool load, bool IMMED) { drive->cmd[0]=MMC_START_STOP_UNIT; drive->cmd[1]= IMMED ? 0x01 : 0x00; drive->cmd[4]=0x02 | load; if ((drive->err=drive->cmd.transport(NONE,NULL,0))) { if (drive->err != 0x55302) { sperror ("LOAD_EJECT",drive->err); return (drive->err); } printf("Trying to unlock media...\n"); drive->parms.status &= (~STATUS_LOCK); set_lock(drive); drive->cmd[0]=MMC_START_STOP_UNIT; drive->cmd[1]= IMMED ? 0x01 : 0x00; drive->cmd[4]=0x02 | load; if ((drive->err=drive->cmd.transport(NONE,NULL,0))) { sperror ("LOAD_EJECT",drive->err); return (drive->err); } } return 0; } int load_eject(drive_info* drive, bool IMMED) { get_media_status(drive); printf("Tray state: %s\n" ,(drive->parms.status & STATUS_OPEN) ? "open" : "close"); load_eject(drive, drive->parms.status & STATUS_OPEN, IMMED); return 0; } int get_lock(drive_info* drive){ // printf("get_lock()\n"); int offs; if (mode_sense(drive, 0x2A, 0, 256)) { sperror ("GET_LOCK",drive->err); return (drive->err); } offs=0; while (((drive->rd_buf[offs]) & 0x3F) != 0x2A) offs++; if (drive->rd_buf[offs+6] & 0x02) drive->parms.status |= STATUS_LOCK; else drive->parms.status &= (~STATUS_LOCK); //#ifndef __PXCONTROL // if (!drive->silent) printf("--- Disc %slocked\n",(drive->parms.status & STATUS_LOCK) ? "" : "UN") //#endif return 0; } int set_lock(drive_info* drive){ // printf("--- %slocking disc...\n",(drive->parms.status & STATUS_LOCK) ? "" : "UN"); drive->cmd[0]=SPC_PREVENT_ALLOW_MEDIUM_REMOVAL; drive->cmd[4]= (drive->parms.status & STATUS_LOCK) ? 1 : 0; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { sperror ("SET_LOCK",drive->err); get_lock(drive); return (drive->err); } get_lock(drive); return 0; } int play_audio_msf(drive_info* drive, msf beg, msf end){ drive->cmd[0]=MMC_PLAY_AUDIO_MSF; drive->cmd[3]=beg.m; drive->cmd[4]=beg.s; drive->cmd[5]=beg.f; drive->cmd[6]=end.m; drive->cmd[7]=end.s; drive->cmd[8]=end.f; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { sperror ("PLAY_AUDIO_MSF",drive->err); return (drive->err); } return 0; } int play_audio(drive_info* drive, int32_t beg, short int len){ drive->cmd[0]=MMC_PLAY_AUDIO; drive->cmd[2]=(beg>>24) & 0xFF; drive->cmd[3]=(beg>>16) & 0xFF; drive->cmd[4]=(beg>>8) & 0xFF; drive->cmd[5]=beg & 0xFF; drive->cmd[7]=(len>>8) & 0xFF; drive->cmd[8]=len & 0xFF; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { sperror ("PLAY_AUDIO",drive->err); return (drive->err); } return 0; } int seek(drive_info* drive, int32_t lba, unsigned char flags){ drive->cmd[0]=MMC_SEEK; drive->cmd[2]=(lba>>24) & 0xFF; drive->cmd[3]=(lba>>16) & 0xFF; drive->cmd[4]=(lba>>8) & 0xFF; drive->cmd[5]=lba & 0xFF; drive->cmd[9]=flags; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { sperror ("SEEK",drive->err); return (drive->err); } return 0; } int read_cd(drive_info* drive, unsigned char *data, int32_t lba, int sector_count, unsigned char flags, unsigned char FUA) { // int transfer_length = sector_count * 3072; // int sect_data = 2352; int sect_data = 3072; int transfer_length = sector_count * sect_data; if (sector_count<0) return -1; // printf("lba: %d, cnt: %d\n", lba,sector_count); drive->cmd[0]=MMC_READ_CD; drive->cmd[1]= FUA ? 0x08 : 0x00; drive->cmd[2]=(lba>>24) & 0xFF; drive->cmd[3]=(lba>>16) & 0xFF; drive->cmd[4]=(lba>>8) & 0xFF; drive->cmd[5]=lba & 0xFF; drive->cmd[8]=sector_count; drive->cmd[9]=flags; if ((drive->err=drive->cmd.transport(READ, data, transfer_length))) { sperror ("READ_CD",drive->err); return (drive->err); } return 0; } int read(drive_info* drive, unsigned char *data, int32_t lba, int sector_count, unsigned char FUA) { // int transfer_length = sector_count * 3072; int transfer_length = sector_count * 2048; if (sector_count<0) return -1; drive->cmd[0]=MMC_READ; drive->cmd[1]= FUA ? 0x08 : 0x00; drive->cmd[2]=(lba>>24) & 0xFF; drive->cmd[3]=(lba>>16) & 0xFF; drive->cmd[4]=(lba>>8) & 0xFF; drive->cmd[5]=lba & 0xFF; drive->cmd[8]=sector_count; if ((drive->err=drive->cmd.transport(READ, data, transfer_length))) {sperror ("READ",drive->err); return (drive->err);} return 0; } int read_one_ecc_block(drive_info* drive, unsigned char *data, int32_t lba) { drive->cmd[0] = MMC_READ; drive->cmd[2] = (lba>>24) & 0xFF; drive->cmd[3] = (lba>>16) & 0xFF; drive->cmd[4] = (lba>>8) & 0xFF; drive->cmd[5] = lba & 0xFF; drive->cmd[8] = 0x10; if ((drive->err=drive->cmd.transport(READ, data, 0x8000))) {sperror ("READ_ONE_ECC_BLOCK",drive->err); return (drive->err);} // if ((drive->err=drive->cmd.transport(READ,(void*)((unsigned char*)drive->rd_buf+(0x0001<<14)),0x34))) // {sperror ("READ_ONE_ECC_BLOCK",drive->err); return (drive->err);} return 0; } int get_drive_serial_number(drive_info* drive) { // char data[2048]; memset(data, 0, sizeof(data)); unsigned int data_length; unsigned int length; get_configuration(drive, FEATURE_LOGICAL_UNIT_SERIAL_NUMBER, &data_length, NULL); if (drive->err) return -1; length = drive->rd_buf[11]; drive->rd_buf[12+length]=0; if (data_length>8) strncpy(drive->serial, (char*)drive->rd_buf+12, 16); else drive->serial[0]=0; return 0; } int get_buffer_capacity(drive_info* drive){ int offs; if (mode_sense(drive, MODE_PAGE_MM_CAP_STATUS, 0, 192)) return 1; offs=0; while (((drive->rd_buf[offs]) & 0x3F) != 0x2A) offs++; drive->buffer_size= ntoh16u(drive->rd_buf+offs+0x0C); // printf("Buffer capacity: 0x%04X (%d)KB\n", drive->buffer_size, drive->buffer_size); return 0; } int get_wbuffer_capacity(drive_info* drive, uint32_t *btot, uint32_t *bfree){ uint8_t td[0x0C]; memset(td,0,0x0C); drive->cmd[0]=MMC_READ_BUFFER_CAPACITY; drive->cmd[8]=0x0C; if ((drive->err = drive->cmd.transport(READ,td,0x0C))) {sperror ("READ_BUFFER_CAPACITY",drive->err); return (drive->err);} (*btot) = ntoh32u(td+4); (*bfree) = ntoh32u(td+8); return 0; } int read_writer_info(drive_info* drive) { if (!(drive->media.type & DISC_DVDminus)) { strcpy(drive->media.writer, "n/a (only for DVD-R(W))"); return 1; } char format=0x0D; drive->media.writer[0]=0; drive->rd_buf[8]=0; drive->cmd[0]=MMC_READ_DVD_STRUCTURE; drive->cmd[5]=0x62; drive->cmd[7]=format; drive->cmd[8]=8; drive->cmd[9]=8; if ((drive->err = drive->cmd.transport(READ,drive->rd_buf,2056)) || (!drive->rd_buf[8])) { printf("Read Writer Info Method 1 failed\n"); drive->cmd[0]=MMC_READ_DVD_STRUCTURE; drive->cmd[5]=0x02; drive->cmd[7]=format; drive->cmd[8]=8; drive->cmd[9]=8; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,2056))) { printf("Read Writer Info Method 2 failed\n"); return 1; } } for (int i=0; i<0x3F; i++) { if (!drive->rd_buf[8+i]) drive->rd_buf[8+i]=0x20; } strncpy(drive->media.writer, (char*)drive->rd_buf+8, 0x3F); remove_double_spaces(drive->media.writer); // remove_end_spaces(drive->media.writer); return 0; } int detect_mm_capabilities(drive_info* drive){ char len; int offs; int i,j; if (mode_sense(drive, MODE_PAGE_MM_CAP_STATUS, 0, 256)) return 1; offs=0; while (((drive->rd_buf[offs]) & 0x3F) != 0x2A) offs++; len=drive->rd_buf[offs+1]; if (!drive->silent) printf("CD parameters page length: 0x%02X\n",len); if (len >= 28) {drive->mmc=3;} else if (len >= 24) {drive->mmc=2;} else {drive->mmc=1;} if (!drive->silent) for (i=offs; i<(offs+len+2);i+=8){ for (j=0;j<8;j++) printf(" %02X",drive->rd_buf[i+j] & 0xFF); printf("\n"); } // if (drive->mmc) drive->rd_capabilities|=DEVICE_CD_ROM; if (drive->rd_buf[offs+2] & 0x01)drive->rd_capabilities|=DEVICE_CD_R; if (drive->rd_buf[offs+2] & 0x02)drive->rd_capabilities|=DEVICE_CD_RW; if (drive->rd_buf[offs+3] & 0x01)drive->wr_capabilities|=DEVICE_CD_R; if (drive->rd_buf[offs+3] & 0x02)drive->wr_capabilities|=DEVICE_CD_RW; if (drive->rd_buf[offs+3] & 0x04)drive->capabilities|=CAP_TEST_WRITE_CD; if (drive->rd_buf[offs+4] & 0x01)drive->capabilities|=CAP_CD_AUDIO; if (drive->rd_buf[offs+4] & 0x02)drive->capabilities|=CAP_COMPOSITE; if (drive->rd_buf[offs+4] & 0x04)drive->capabilities|=CAP_DIGITAL_PORT_1; if (drive->rd_buf[offs+4] & 0x08)drive->capabilities|=CAP_DIGITAL_PORT_2; if (drive->rd_buf[offs+4] & 0x10)drive->capabilities|=CAP_MODE2_FORM1; if (drive->rd_buf[offs+4] & 0x20)drive->capabilities|=CAP_MODE2_FORM2; if (drive->rd_buf[offs+4] & 0x40)drive->capabilities|=CAP_MULTISESSION; if (drive->rd_buf[offs+4] & 0x80)drive->capabilities|=CAP_BURN_FREE; if (drive->rd_buf[offs+5] & 0x01)drive->capabilities|=CAP_DAE; if (drive->rd_buf[offs+5] & 0x02)drive->capabilities|=CAP_ACCURATE_STREAM; if (drive->rd_buf[offs+5] & 0x10)drive->capabilities|=CAP_C2; if (drive->rd_buf[offs+5] & 0x20)drive->capabilities|=CAP_ISRC; if (drive->rd_buf[offs+5] & 0x40)drive->capabilities|=CAP_UPC; if (drive->rd_buf[offs+5] & 0x80)drive->capabilities|=CAP_READ_BAR_CODE; if (drive->rd_buf[offs+6] & 0x01)drive->capabilities|=CAP_LOCK; if (drive->rd_buf[offs+6] & 0x08)drive->capabilities|=CAP_EJECT; drive->loader_id = (drive->rd_buf[offs+6] >> 5) & 0x07; if (drive->rd_buf[offs+7] & 0x10)drive->capabilities|=CAP_SIDE_CHANGE; switch (drive->mmc) { case 3: drive->parms.write_speed_kb=drive->rd_buf[37] << 8 | drive->rd_buf[36]; case 2: if (drive->rd_buf[offs+2] & 0x08)drive->rd_capabilities|=DEVICE_DVD_ROM; if (drive->rd_buf[offs+2] & 0x10)drive->rd_capabilities|=DEVICE_DVD_R; if (drive->rd_buf[offs+2] & 0x20)drive->rd_capabilities|=DEVICE_DVD_RAM; if (drive->rd_buf[offs+3] & 0x10)drive->wr_capabilities|=DEVICE_DVD_R; if (drive->rd_buf[offs+3] & 0x20)drive->wr_capabilities|=DEVICE_DVD_RAM; // break; case 1: drive->parms.max_read_speed_kb=drive->rd_buf[offs+9] <<8 | drive->rd_buf[offs+8]; drive->parms.read_speed_kb=drive->rd_buf[offs+15] <<8 | drive->rd_buf[offs+14]; drive->parms.max_write_speed_kb=drive->rd_buf[offs+19] <<8 | drive->rd_buf[offs+19]; drive->parms.write_speed_kb=drive->rd_buf[offs+21] << 8 | drive->rd_buf[offs+20]; break; } if (!drive->silent) printf("Max speeds:\tR@%dKBps / W@%dKBps\nCurrent speeds:\tR@%dKBps / W@%dKBps\n", drive->parms.max_read_speed_kb, drive->parms.max_write_speed_kb, drive->parms.read_speed_kb, drive->parms.write_speed_kb); if (isPlextor(drive) && strncmp(drive->dev,"CD-R", 4)) drive->capabilities|=CAP_TEST_WRITE_DVD_PLUS; return 0; } int convert_to_ID (drive_info* drive) { // printf("convert_to_ID() : %s %s\n", drive->ven, drive->dev); if (!strncmp(drive->ven,"PLEXTOR ",8)) { drive->ven_ID=DEV_PLEXTOR; if(!strncmp(drive->dev,"CD-R PX-W4824A",16)) drive->dev_ID=PLEXTOR_4824; else if(!strncmp(drive->dev,"CD-R PX-W5224A",16)) drive->dev_ID=PLEXTOR_5224; else if(!strncmp(drive->dev,"CD-R PREMIUM2",15)) drive->dev_ID=PLEXTOR_PREMIUM2; else if(!strncmp(drive->dev,"CD-R PREMIUM",14)) drive->dev_ID=PLEXTOR_PREMIUM; else if(!strncmp(drive->dev,"DVDR PX-708A2",15)) drive->dev_ID=PLEXTOR_708A2; else if(!strncmp(drive->dev,"DVDR PX-712A",14)) drive->dev_ID=PLEXTOR_712; else if(!strncmp(drive->dev,"DVDR PX-714A",14)) drive->dev_ID=PLEXTOR_716; else if(!strncmp(drive->dev,"DVDR PX-716A ",15)) drive->dev_ID=PLEXTOR_716; else if(!strncmp(drive->dev,"DVDR PX-716AL",15)) drive->dev_ID=PLEXTOR_716AL; else if(!strncmp(drive->dev,"DVDR PX-755A",14)) drive->dev_ID=PLEXTOR_760; else if(!strncmp(drive->dev,"DVDR PX-760A",14)) drive->dev_ID=PLEXTOR_760; else if(!strncmp(drive->dev,"CD-R ",8)) drive->dev_ID=PLEXTOR_OLD; else { drive->ven_ID = DEV_GENERIC; drive->dev_ID = 0; } } else if (!strncmp(drive->ven,"YAMAHA ",8)) { drive->ven_ID=DEV_YAMAHA; if(!strncmp(drive->dev,"CRW-F1",6)) drive->dev_ID=YAMAHA_F1; else drive->dev_ID=YAMAHA_OLD; } else { drive->ven_ID = DEV_GENERIC; drive->dev_ID = 0; } // printf("convert_to_ID() : %04X:%04X\n", drive->ven_ID, drive->dev_ID); return 0; } //----------------// // PX-755 AUTH // //----------------// int plextor_px755_do_auth(drive_info* dev) { if (!isPlextorLockPresent(dev)) { if (!dev->silent) printf("Plextor dev is older than PX-755, auth not needed\n"); return 0; } // cmd_px755_clear_auth_status(); plextor_px755_get_auth_code(dev, dev->rd_buf); plextor_px755_calc_auth_code(dev, dev->rd_buf); if (plextor_px755_send_auth_code(dev, dev->rd_buf)) { printf(" _______________________________________________________ \n"); printf("| |\n"); printf("| WARNING!!! Detected locked PX-755/PX-760 |\n"); printf("| or Premium-II |\n"); printf("| Device has 'protected' commands |\n"); printf("| you'll not get full fucntionality of this drive |\n"); printf("|_______________________________________________________|\n"); return 1; } else { if (!dev->silent) printf("PX-755/PX-760/Premium-II auth successfull:)\n"); return 0; } } int plextor_px755_get_auth_code(drive_info* dev, unsigned char* auth_code) { dev->cmd[0] = PLEXTOR_GET_AUTH; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,auth_code,16) )) { 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"); } return 0; } int plextor_px755_send_auth_code(drive_info* dev, unsigned char* auth_code) { dev->cmd[0] = PLEXTOR_SEND_AUTH; dev->cmd[1] = 0x01; dev->cmd[2] = 0x01; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(WRITE,auth_code,16) )) { if (!dev->silent) sperror ("PLEXTOR_PX755_SEND_AUTH_CODE",dev->err); return dev->err;} return 0; } /* int scan_plextor::cmd_px755_clear_auth_status(drive_info* dev) { dev->cmd[0] = PLEXTOR_SEND_AUTH; dev->cmd[1] = 0x01; dev->cmd[2] = 0x00; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(NONE,NULL,0) )) { if (!dev->silent) sperror ("PLEXTOR_PX755_CLEAR_AUTH_STATUS",dev->err); return dev->err;} return 0; } */ int plextor_px755_calc_auth_code(drive_info* dev, unsigned char* auth_code) { return 0; } qpxtool-0.7.1_002/lib/qpxtransport/qpx_mmc_css.cpp0000644000175000001440000020477411243442520021444 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * * DVD authentication and descrambling based on functions from libdvdcss * */ /***************************************************************************** * css.c: Functions for DVD authentication and descrambling ***************************************************************************** * Copyright (C) 1999-2003 VideoLAN * $Id: css.c 20629 2006-11-03 12:25:56Z diego $ * * Authors: Stéphane Borel * HÃ¥kan Hjort * * based on: * - css-auth by Derek Fawcus * - DVD CSS ioctls example program by Andrew T. Veliath * - The Divide and conquer attack by Frank A. Stevenson * (see http://www-2.cs.cmu.edu/~dst/DeCSS/FrankStevenson/index.html) * - DeCSSPlus by Ethan Hawke * - DecVOB * see http://www.lemuria.org/DeCSS/ by Tom Vogt for more information. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ #include #include #include #include #include //#include //#include "transport.hxx" #include #include "csstables.h" #define DVD_DISCKEY_SIZE 2048 // device commands int report_key(drive_info* drive, unsigned char key_class, unsigned char key_format, int len, unsigned int lba = 0); int read_disc_key(drive_info* drive, unsigned char DK[DVD_DISCKEY_SIZE]); int css_report_agid(drive_info* ); int cprm_report_agid(drive_info* ); int css_invalidate_agid(drive_info* ); int css_report_challenge(drive_info* ); int css_send_challenge(drive_info* ); int css_report_key1(drive_info* ); int css_send_key2(drive_info* ); int css_report_title_key(drive_info* drive, int lba, unsigned char* key); int css_report_asf(drive_info* ); // some functions from libdvdcss //int css_disckey( drive_info* drive); //int css_title ( drive_info* drive, int lba ); int css_titlekey( drive_info* drive, int lba, dvd_key_t p_title_key ); int css_unscramble( dvd_key_t p_key, unsigned char *p_sec ); int css_get_bus_key(drive_info* drive); static void css_CryptKey( int i_key_type, int i_variant, unsigned char const *p_challenge, unsigned char *p_key ); static void css_DecryptKey( unsigned char invert, unsigned char const *p_key, unsigned char const *p_crypted, unsigned char *p_result ); static int css_DecryptDiscKey ( drive_info*, unsigned char const *, dvd_key_t ); static int css_CrackDiscKey ( drive_info*, unsigned char * ); static int css_RecoverTitleKey( int i_start, unsigned char const *p_crypted, unsigned char const *p_decrypted, unsigned char const *p_sector_seed, unsigned char *p_key ); static void css_DecryptTitleKey( dvd_key_t p_disc_key, dvd_key_t p_titlekey ); static int css_CrackTitleKey( drive_info*, int i_pos, int i_len, dvd_key_t p_titlekey ); static int css_AttackPattern( unsigned char const p_sec[ DVDCSS_BLOCK_SIZE ], int i_pos, unsigned char *p_key ); static void css_printkey (char *, unsigned char const * ); int i_tries = 0; int i_success = 0; /** * \brief Seek in the disc and change the current key if requested. * * \param dvdcss a \e libdvdcss instance. * \param i_blocks an absolute block offset to seek to. * \param i_flags #DVDCSS_NOFLAGS, optionally ored with one of #DVDCSS_SEEK_KEY * or #DVDCSS_SEEK_MPEG. * \return the new position in blocks, or a negative value in case an error * happened. * * This function seeks to the requested position, in logical blocks. * * You typically set \p i_flags to #DVDCSS_NOFLAGS when seeking in a .IFO. * * If #DVDCSS_SEEK_MPEG is specified in \p i_flags and if \e libdvdcss finds it * reasonable to do so (ie, if the dvdcss method is not "title"), the current * title key will be checked and a new one will be calculated if necessary. * This flag is typically used when reading data from a VOB. * * If #DVDCSS_SEEK_KEY is specified, the title key will be always checked, * even with the "title" method. This is equivalent to using the now * deprecated dvdcss_title() call. This flag is typically used when seeking * in a new title. */ int seek_dvd ( drive_info* drive, int lba, int flags ) { /* title cracking method is too slow to be used at each seek */ if( ( ( flags & DVDCSS_SEEK_MPEG ) && ( drive->media.dvdcss.method != DVDCSS_METHOD_TITLE ) ) || ( flags & DVDCSS_SEEK_KEY ) ) { /* check the title key */ if( css_title( drive, lba ) ) { return -1; } } return seek( drive, lba ); } /** * \brief Read from the disc and decrypt data if requested. * * \param dvdcss a \e libdvdcss instance. * \param p_buffer a buffer that will contain the data read from the disc. * \param i_blocks the amount of blocks to read. * \param i_flags #DVDCSS_NOFLAGS, optionally ored with #DVDCSS_READ_DECRYPT. * \return the amount of blocks read, or a negative value in case an * error happened. * * This function reads \p i_blocks logical blocks from the DVD. * * You typically set \p i_flags to #DVDCSS_NOFLAGS when reading data from a * .IFO file on the DVD. * * If #DVDCSS_READ_DECRYPT is specified in \p i_flags, dvdcss_read() will * automatically decrypt scrambled sectors. This flag is typically used when * reading data from a .VOB file on the DVD. It has no effect on unscrambled * discs or unscrambled sectors, and can be safely used on those. * * \warning dvdcss_read() expects to be able to write \p i_blocks * * #DVDCSS_BLOCK_SIZE bytes in \p p_buffer. */ int read_dvd(drive_info* drive, unsigned char* data, int lba, int sector_count, int flags) // LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t dvdcss, void *p_buffer, // int i_blocks, // int i_flags ) { unsigned char* p_buffer; int i_ret=-1, i_index; // if (flags & DVDCSS_READ_DECRYPT) { // seek_dvd(drive,lba, DVDCSS_SEEK_KEY); // } if ( !read( drive, data, lba, sector_count )) { //i_ret = sector_count * DVDCSS_BLOCK_SIZE; i_ret = sector_count; } else { if (drive->err == 0x52100) i_ret = 0; } if( i_ret <= 0 || drive->media.dvdcss.protection != 0x01 || !(flags & DVDCSS_READ_DECRYPT) ) { return i_ret; } p_buffer = data; if( ! memcmp( drive->media.dvdcss.TK, "\0\0\0\0\0", 5 ) ) { /* For what we believe is an unencrypted title, * check that there are no encrypted blocks */ for( i_index = i_ret; i_index; i_index-- ) { if( p_buffer[0x14] & 0x30 ) { printf( "no key but found encrypted block\n" ); /* Only return the initial range of unscrambled blocks? */ /* or fail completely? return 0; */ return -1; break; } p_buffer = p_buffer + DVDCSS_BLOCK_SIZE; } } else { /* Decrypt the blocks we managed to read */ for( i_index = i_ret; i_index; i_index-- ) { // printf("Decrypting data...\n"); css_unscramble( drive->media.dvdcss.TK, p_buffer ); p_buffer[0x14] &= 0x8f; p_buffer = p_buffer + DVDCSS_BLOCK_SIZE; } } return i_ret; } // ********************************* int read_disc_regions(drive_info* drive) { //#warning "read_disc_regions()" int len=8; // unsigned char enc; // unsigned char regmask; int i; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x01; drive->cmd[8] = len >> 8; // -| drive->cmd[9] = len & 0xFF; // -- transfer length drive->cmd[11] = 0; if (( drive->err = drive->cmd.transport(READ,drive->rd_buf,len) )) { if (!drive->silent) sperror ("READ_DISC_REGIONS",drive->err); return drive->err; } #if 0 if (!drive->silent) { printf("READ_DISC_REGIONS data: "); for(i=0; ird_buf[i] & 0xFF); printf("\n"); } #endif drive->media.dvdcss.protection = drive->rd_buf[4]; drive->media.dvdcss.regmask = drive->rd_buf[5]; if (!drive->media.dvdcss.protection) { // printf("DVD is NOT protected\n"); return 0; } else { /* switch (drive->media.dvdcss.protection) { case 0x01: printf("DVD is CSS-protected\n"); break; case 0x02: printf("DVD is CPRM-protected\n"); break; default: printf("Unknown DVD protection shceme!\n"); break; }*/ // printf("Disc regions : "); if (drive->media.dvdcss.regmask != 0xFF) { for (i=0; i<8; i++) if (!((drive->media.dvdcss.regmask >> i) & 1)) { // printf("%d",i+1); drive->rpc.region = i+1; } // printf("\n"); // } else { // printf("Invalid region mask!\n"); } } return 0; } int read_disc_key(drive_info* drive, unsigned char DK[DVD_DISCKEY_SIZE]) { int len = 2052; // 4 (header) + 2048 (key) if (!(drive->rd_capabilities & DEVICE_DVD) || !(drive->capabilities & CAP_DVD_CSS)) return -1; drive->cmd[0] = MMC_READ_DVD_STRUCTURE; drive->cmd[7] = 0x02; drive->cmd[8] = len >> 8; // -| drive->cmd[9] = len & 0xFF; // -- transfer length drive->cmd[10] = drive->media.dvdcss.agid & 0xC0; drive->cmd[11] = 0; if (( drive->err = drive->cmd.transport(READ,drive->rd_buf,len) )) { if (!drive->silent) sperror ("READ_DISC_KEY",drive->err); return drive->err; } memcpy(DK, drive->rd_buf+4, 2048); return 0; } int report_key(drive_info* drive, unsigned char key_class, unsigned char key_format, int len, unsigned int lba) { if (!(drive->rd_capabilities & DEVICE_DVD) || !(drive->capabilities & CAP_DVD_CSS)) return -1; drive->cmd[0] = MMC_REPORT_KEY; drive->cmd[2] = (lba >> 24) & 0xFF; drive->cmd[3] = (lba >> 16) & 0xFF; drive->cmd[4] = (lba >> 8) & 0xFF; drive->cmd[5] = lba & 0xFF; drive->cmd[7] = key_class; drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[10] = (drive->media.dvdcss.agid & 0xC0) | (key_format & 0x3F); drive->cmd[11] = 0; if (( drive->err = drive->cmd.transport(READ,drive->rd_buf,len) )) { if (!drive->silent) sperror ("MMC REPORT KEY",drive->err); return drive->err; } return 0; } int get_rpc_state(drive_info* drive){ // int len=8; int i; unsigned char regmask; unsigned char t;//,vl,ul; unsigned char sh; if (!(drive->rd_capabilities & DEVICE_DVD) || !(drive->capabilities & CAP_DVD_CSS)) {drive->rpc.phase = 0; return -1;} /* drive->cmd[0] = MMC_REPORT_KEY; drive->cmd[7] = 0; // key class = 0 : DVD CSS/CPRM drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[10] = 0x08; // key format = 8 : RPC info drive->cmd[11] = 0; */ report_key(drive, 0, 0x08, 8); if (drive->err) { if (drive->err == 0x52400) { drive->rpc.phase = 1; return 0; } else { if (!drive->silent) sperror ("READ_RPC_STATE",drive->err); drive->rpc.phase = 0; return drive->err; } } /* printf("MMC_REPORT_KEY data: "); for(i=0; ird_buf[i] & 0xFF); printf("\n");*/ if (ntoh16(drive->rd_buf) < 6) return 1; drive->rpc.ch_u = drive->rd_buf[4] & 0x07; drive->rpc.ch_v = (drive->rd_buf[4] >> 3) & 0x07; t = (drive->rd_buf[4] >> 6) & 0x03; regmask = drive->rd_buf[5]; sh = drive->rd_buf[6]; drive->rpc.phase = 2; // printf("\n** Unit is RPC-II\n"); // printf("Current region : "); if (regmask != 0xFF) { for (i=0; i<8; i++) if (!((regmask >> i) & 1)) { // printf("%d",i+1); drive->rpc.region = i+1; } // printf("\n"); } else { // printf("does not set\n"); drive->rpc.region = 0; } // printf("User changes left : %d\n",drive->rpc.ch_u); // printf("Vendor resets left : %d\n",drive->rpc.ch_v); return 0; } int css_invalidate_agid(drive_info* drive) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; drive->cmd[0] = MMC_REPORT_KEY; drive->cmd[7] = 0; drive->cmd[8] = 0; drive->cmd[9] = 0; drive->cmd[10] = (drive->media.dvdcss.agid & 0xC0) | 0x3F; drive->cmd[11] = 0; if (( drive->err = drive->cmd.transport(NONE, NULL, 0) )) { if (!drive->silent) sperror ("MMC REPORT KEY (INVALIDATE AGID)",drive->err); return drive->err; } return 0; } int css_report_agid(drive_info* drive) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; report_key(drive, 0, 0x00, 8); if (drive->err) return -1; drive->media.dvdcss.agid = drive->rd_buf[7] & 0xC0; printf("CSS: AGID=%x\n",drive->media.dvdcss.agid >> 6); return 0; } int cprm_report_agid(drive_info* drive) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; report_key(drive, 0, 0x11, 8); if (drive->err) return -1; drive->media.dvdcss.agid = drive->rd_buf[7] & 0xC0; return 0; } int css_report_challenge(drive_info* drive) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; report_key(drive, 0, 0x01, 16); if (drive->err) return -1; for( int i = 0 ; i < (2*DVD_KEY_SIZE) ; i++ ) { drive->media.dvdcss.CK[i] = drive->rd_buf[13-i]; } printf("Report Challenge: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", drive->media.dvdcss.CK[0],drive->media.dvdcss.CK[1], drive->media.dvdcss.CK[2],drive->media.dvdcss.CK[3], drive->media.dvdcss.CK[4],drive->media.dvdcss.CK[5], drive->media.dvdcss.CK[6],drive->media.dvdcss.CK[7], drive->media.dvdcss.CK[8],drive->media.dvdcss.CK[9]); return 0; } int css_send_challenge(drive_info* drive) { int len = 16; if (!(drive->capabilities & CAP_DVD_CSS)) return -1; printf("Send Challenge: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", drive->media.dvdcss.CK[0],drive->media.dvdcss.CK[1], drive->media.dvdcss.CK[2],drive->media.dvdcss.CK[3], drive->media.dvdcss.CK[4],drive->media.dvdcss.CK[5], drive->media.dvdcss.CK[6],drive->media.dvdcss.CK[7], drive->media.dvdcss.CK[8],drive->media.dvdcss.CK[9]); drive->cmd[0] = MMC_SEND_KEY; drive->cmd[7] = 0; // key class = 0 : DVD CSS/CPRM drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[10] = (drive->media.dvdcss.agid & 0xC0) | 0x01; // key format = 1 : Challenge key drive->cmd[11] = 0; drive->rd_buf[0] = 0x00; drive->rd_buf[1] = 0x0E; drive->rd_buf[2] = 0; drive->rd_buf[3] = 0; for( int i = 0 ; i < (2*DVD_KEY_SIZE) ; i++ ) { drive->rd_buf[13-i] = drive->media.dvdcss.CK[i]; } drive->rd_buf[14]= 0; drive->rd_buf[15]= 0; if (( drive->err = drive->cmd.transport(WRITE,drive->rd_buf,len) )) { if (!drive->silent) sperror ("MMC SEND KEY (CHALLENGE)",drive->err); return drive->err; } // printf("Challenge KEY: "); // for (int i=0; i<10; i++) printf("%02X ",drive->media.dvdcss.CK[i]); // printf("\n"); return 0; } int css_report_key1(drive_info* drive) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; report_key(drive, 0, 0x02, 12); if (drive->err) return drive->err; for( int i = 0 ; i < DVD_KEY_SIZE ; i++ ) { drive->media.dvdcss.K1[i] = drive->rd_buf[8-i]; } printf("Report KEY1: %02X:%02X:%02X:%02X:%02X\n", drive->media.dvdcss.K1[0], drive->media.dvdcss.K1[1], drive->media.dvdcss.K1[2], drive->media.dvdcss.K1[3], drive->media.dvdcss.K1[4]); return 0; } int css_send_key2(drive_info* drive) { int len = 12; if (!(drive->capabilities & CAP_DVD_CSS)) return -1; printf("Send KEY2: %02X:%02X:%02X:%02X:%02X\n", drive->media.dvdcss.K2[0], drive->media.dvdcss.K2[1], drive->media.dvdcss.K2[2], drive->media.dvdcss.K2[3], drive->media.dvdcss.K2[4]); drive->cmd[0] = MMC_SEND_KEY; drive->cmd[7] = 0; // key class = 0 : DVD CSS/CPRM drive->cmd[8] = len>>8; drive->cmd[9] = len & 0xFF; drive->cmd[10] = (drive->media.dvdcss.agid & 0xC0) | 0x03; // key format = 2 : KEY 2 drive->cmd[11] = 0; drive->rd_buf[0] = 0x00; drive->rd_buf[1] = 0x0A; drive->rd_buf[2] = 0; drive->rd_buf[3] = 0; for( int i = 0 ; i < DVD_KEY_SIZE ; i++ ) { drive->rd_buf[8-i] = drive->media.dvdcss.K2[i]; } drive->rd_buf[9] = 0; drive->rd_buf[10]= 0; drive->rd_buf[11]= 0; if (( drive->err = drive->cmd.transport(WRITE,drive->rd_buf,len) )) { if (!drive->silent) sperror ("MMC SEND KEY (KEY2)",drive->err); return drive->err; } // printf("Challenge KEY: "); // for (int i=0; i<10; i++) printf("%02X ",drive->media.dvdcss.CK[i]); // printf("\n"); return 0; } int css_report_title_key(drive_info* drive, int lba, unsigned char* key) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; report_key(drive, 0, 0x04, 12, lba); if (drive->err) return drive->err; //memcpy((void*)drive->media.dvdcss.TK, drive->rd_buf+5, 5); memcpy(key, drive->rd_buf+5, 5); printf("Report Title KEY: "); //for (int i=0; i<5; i++) printf("%02X ",drive->media.dvdcss.TK[i]); for (int i=0; i<5; i++) printf("%02X ", key[i]); printf("\n"); return 0; } int css_report_asf(drive_info* drive) { if (!(drive->capabilities & CAP_DVD_CSS)) return -1; report_key(drive, 0, 0x05, 8); if (drive->err) return -1; drive->media.dvdcss.asf = drive->rd_buf[7] & 0x01; if (drive->media.dvdcss.asf) return 0; else return 1; } /* * * functions from libdvdcss (modified) * */ /***************************************************************************** * _dvdcss_disckey: get disc key. ***************************************************************************** * This function should only be called if DVD ioctls are present. * It will set dvdcss->i_method = DVDCSS_METHOD_TITLE if it fails to find * a valid disc key. * Two decryption methods are offered: * -disc key hash crack, * -decryption with player keys if they are available. *****************************************************************************/ int css_disckey( drive_info* drive ) { unsigned char p_buffer[ DVD_DISCKEY_SIZE ]; unsigned char p_disc_key[DVD_KEY_SIZE]; int i; #warning clean title keys if( css_get_bus_key( drive ) ) { return -1; } /* Get encrypted disc key */ if( read_disc_key( drive, p_buffer ) ) { printf( "CSS: ReadDiscKey failed\n" ); return -1; } /* This should have invaidated the AGID and got us ASF=1. */ if( css_report_asf( drive ) !=0 ) { /* Region mismatch (or region not set) is the most likely source. */ printf( "CSS: ASF not 1 after reading disc key (region mismatch?)\n" ); css_invalidate_agid( drive ); return -1; } /* Shuffle disc key using bus key */ for( i = 0 ; i < DVD_DISCKEY_SIZE ; i++ ) { p_buffer[ i ] ^= drive->media.dvdcss.BK[ 4 - (i % DVD_KEY_SIZE) ]; } #if 1 /* Decrypt disc key */ switch( drive->media.dvdcss.method ) { case DVDCSS_METHOD_KEY: /* Decrypt disc key with player key. */ css_printkey( (char*)("CSS: decrypting disc key "), p_buffer ); if( ! css_DecryptDiscKey( drive, p_buffer, p_disc_key ) ) { css_printkey( (char*)("CSS: decrypted disc key is "), p_disc_key ); break; } printf( "CSS: failed to decrypt the disc key, " "faulty drive/kernel? " "cracking title keys instead\n" ); /* Fallback, but not to DISC as the disc key might be faulty */ drive->media.dvdcss.method = DVDCSS_METHOD_TITLE; break; case DVDCSS_METHOD_DISC: /* Crack Disc key to be able to use it */ memcpy( p_disc_key, p_buffer, DVD_KEY_SIZE ); css_printkey( (char*)("CSS: cracking disc key "), p_disc_key ); if( ! css_CrackDiscKey( drive, p_disc_key ) ) { css_printkey( (char*)("CSS: cracked disc key is "), p_disc_key ); break; } printf( "CSS: failed to crack the disc key\n" ); memset( drive->media.dvdcss.DK, 0, DVD_KEY_SIZE ); drive->media.dvdcss.method = DVDCSS_METHOD_TITLE; break; default: printf( "CSS: disc key needs not be decrypted\n" ); memset( drive->media.dvdcss.DK, 0, DVD_KEY_SIZE ); break; } memcpy( drive->media.dvdcss.DK, p_disc_key, DVD_KEY_SIZE ); #endif return 0; } /***************************************************************************** * _dvdcss_unscramble: does the actual descrambling of data ***************************************************************************** * sec : sector to unscramble * key : title key for this sector *****************************************************************************/ int css_unscramble( dvd_key_t p_key, unsigned char *p_sec ) { unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6; unsigned char *p_end = p_sec + DVDCSS_BLOCK_SIZE; /* PES_scrambling_control */ if( !(p_sec[0x14] & 0x30) ) { return 0; } i_t1 = (p_key[0] ^ p_sec[0x54]) | 0x100; i_t2 = p_key[1] ^ p_sec[0x55]; i_t3 = (p_key[2] | (p_key[3] << 8) | (p_key[4] << 16)) ^ (p_sec[0x56] | (p_sec[0x57] << 8) | (p_sec[0x58] << 16)); i_t4 = i_t3 & 7; i_t3 = i_t3 * 2 + 8 - i_t4; p_sec += 0x80; i_t5 = 0; while( p_sec != p_end ) { i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1]; i_t2 = i_t1>>1; i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4; i_t4 = p_css_tab5[i_t4]; i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^ i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff; i_t3 = (i_t3 << 8 ) | i_t6; i_t6 = p_css_tab4[i_t6]; i_t5 += i_t6 + i_t4; *p_sec = p_css_tab1[*p_sec] ^ ( i_t5 & 0xff ); p_sec++; i_t5 >>= 8; } return 0; } /***************************************************************************** * GetBusKey : Go through the CSS Authentication process ***************************************************************************** * It simulates the mutual authentication between logical unit and host, * and stops when a session key (called bus key) has been established. * Always do the full auth sequence. Some drives seem to lie and always * respond with ASF=1. For instance the old DVD roms on Compaq Armada says * that ASF=1 from the start and then later fail with a 'read of scrambled * block without authentication' error. *****************************************************************************/ int css_get_bus_key(drive_info* drive) { // unsigned char p_buffer[10]; // unsigned char p_challenge[2*DVD_KEY_SIZE]; // dvd_key_t p_key1; // dvd_key_t p_key2; // dvd_key_t p_key_check; unsigned char p_key_check[DVD_KEY_SIZE]; unsigned char i_variant = 0; int i_ret = -1; int i; printf( "CSS: requesting AGID..\n" ); i_ret = css_report_agid( drive ); /* We might have to reset hung authentication processes in the drive * by invalidating the corresponding AGID'. As long as we haven't got * an AGID, invalidate one (in sequence) and try again. */ for( i = 0; i_ret == -1 && i < 4 ; ++i ) { printf( "CSS: ReportAgid failed, " "invalidating AGID %d\n", i ); /* This is really _not good_, should be handled by the OS. * Invalidating an AGID could make another process fail somewhere * in its authentication process. */ drive->media.dvdcss.agid = i; i_ret = css_invalidate_agid( drive ); printf( "CSS: requesting AGID\n" ); i_ret = css_report_agid( drive ); } /* Unable to authenticate without AGID */ if( i_ret == -1 ) { printf( "CSS: ReportAgid failed, fatal\n" ); return -1; } /* Setup a challenge, any values should work */ for( i = 0 ; i < 10; ++i ) { drive->media.dvdcss.CK[i] = i; } /* Get challenge from host */ // for( i = 0 ; i < 10 ; ++i ) // { // p_buffer[9-i] = p_challenge[i]; // } /* Send challenge to LU */ if( css_send_challenge( drive ) ) { printf( "CSS: SendChallenge failed\n" ); css_invalidate_agid( drive ); return -1; } /* Get key1 from LU */ if( css_report_key1( drive ) ) { printf( "CSS: ReportKey1 failed\n" ); css_invalidate_agid( drive ); return -1; } /* Send key1 to host */ // for( i = 0 ; i < DVD_KEY_SIZE ; i++ ) // { // p_key1[i] = p_buffer[4-i]; // } for( i = 0 ; i < 32 ; ++i ) { css_CryptKey( 0, i, drive->media.dvdcss.CK, p_key_check ); if( memcmp( p_key_check, drive->media.dvdcss.K1, DVD_KEY_SIZE ) == 0 ) { printf( "CSS: drive authenticated, using variant %d\n", i ); i_variant = i; break; } } if( i == 32) { printf( "CSS: drive would not authenticate\n" ); css_invalidate_agid( drive ); return -1; } /* Get challenge from LU */ if( css_report_challenge( drive)) { printf( "CSS: ReportKeyChallenge failed\n" ); css_invalidate_agid( drive ); return -1; } /* Send challenge to host */ // for( i = 0 ; i < 10 ; ++i ) // { // p_challenge[i] = p_buffer[9-i]; // } css_CryptKey( 1, i_variant, drive->media.dvdcss.CK, drive->media.dvdcss.K2 ); /* Get key2 from host */ // for( i = 0 ; i < DVD_KEY_SIZE ; ++i ) // { // p_buffer[4-i] = p_key2[i]; // } /* Send key2 to LU */ if( css_send_key2( drive ) ) { printf( "CSS: SendKey2 failed\n" ); css_invalidate_agid( drive ); return -1; } /* The drive has accepted us as authentic. */ printf( "CSS: authentication established\n" ); memcpy( drive->media.dvdcss.CK, drive->media.dvdcss.K1, DVD_KEY_SIZE ); memcpy( drive->media.dvdcss.CK + DVD_KEY_SIZE, drive->media.dvdcss.K2, DVD_KEY_SIZE ); // css_CryptKey( 2, i_variant, p_challenge, dvdcss->css.p_bus_key ); css_CryptKey( 2, i_variant, drive->media.dvdcss.CK, drive->media.dvdcss.BK ); return 0; } /***************************************************************************** * CryptKey : shuffles bits and unencrypt keys. ***************************************************************************** * Used during authentication and disc key negociation in GetBusKey. * i_key_type : 0->key1, 1->key2, 2->buskey. * i_variant : between 0 and 31. *****************************************************************************/ static void css_CryptKey( int i_key_type, int i_variant, unsigned char const *p_challenge, unsigned char *p_key ) { /* Permutation table for challenge */ unsigned char pp_perm_challenge[3][10] = { { 1, 3, 0, 7, 5, 2, 9, 6, 4, 8 }, { 6, 1, 9, 3, 8, 5, 7, 4, 0, 2 }, { 4, 0, 3, 5, 7, 2, 8, 6, 1, 9 } }; /* Permutation table for variant table for key2 and buskey */ unsigned char pp_perm_variant[2][32] = { { 0x0a, 0x08, 0x0e, 0x0c, 0x0b, 0x09, 0x0f, 0x0d, 0x1a, 0x18, 0x1e, 0x1c, 0x1b, 0x19, 0x1f, 0x1d, 0x02, 0x00, 0x06, 0x04, 0x03, 0x01, 0x07, 0x05, 0x12, 0x10, 0x16, 0x14, 0x13, 0x11, 0x17, 0x15 }, { 0x12, 0x1a, 0x16, 0x1e, 0x02, 0x0a, 0x06, 0x0e, 0x10, 0x18, 0x14, 0x1c, 0x00, 0x08, 0x04, 0x0c, 0x13, 0x1b, 0x17, 0x1f, 0x03, 0x0b, 0x07, 0x0f, 0x11, 0x19, 0x15, 0x1d, 0x01, 0x09, 0x05, 0x0d } }; unsigned char p_variants[32] = { 0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73, 0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42, 0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B, 0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 }; /* The "secret" key */ unsigned char p_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 }; unsigned char p_bits[30], p_scratch[10], p_tmp1[5], p_tmp2[5]; unsigned char i_lfsr0_o; /* 1 bit used */ unsigned char i_lfsr1_o; /* 1 bit used */ unsigned char i_css_variant, i_cse, i_index, i_combined, i_carry; unsigned char i_val = 0; unsigned int i_lfsr0, i_lfsr1; int i_term = 0; int i_bit; int i; for (i = 9; i >= 0; --i) p_scratch[i] = p_challenge[pp_perm_challenge[i_key_type][i]]; i_css_variant = ( i_key_type == 0 ) ? i_variant : pp_perm_variant[i_key_type-1][i_variant]; /* * This encryption engine implements one of 32 variations * one the same theme depending upon the choice in the * variant parameter (0 - 31). * * The algorithm itself manipulates a 40 bit input into * a 40 bit output. * The parameter 'input' is 80 bits. It consists of * the 40 bit input value that is to be encrypted followed * by a 40 bit seed value for the pseudo random number * generators. */ /* Feed the secret into the input values such that * we alter the seed to the LFSR's used above, then * generate the bits to play with. */ for( i = 5 ; --i >= 0 ; ) { p_tmp1[i] = p_scratch[5 + i] ^ p_secret[i] ^ p_crypt_tab2[i]; } /* * We use two LFSR's (seeded from some of the input data bytes) to * generate two streams of pseudo-random bits. These two bit streams * are then combined by simply adding with carry to generate a final * sequence of pseudo-random bits which is stored in the buffer that * 'output' points to the end of - len is the size of this buffer. * * The first LFSR is of degree 25, and has a polynomial of: * x^13 + x^5 + x^4 + x^1 + 1 * * The second LSFR is of degree 17, and has a (primitive) polynomial of: * x^15 + x^1 + 1 * * I don't know if these polynomials are primitive modulo 2, and thus * represent maximal-period LFSR's. * * * Note that we take the output of each LFSR from the new shifted in * bit, not the old shifted out bit. Thus for ease of use the LFSR's * are implemented in bit reversed order. * */ /* In order to ensure that the LFSR works we need to ensure that the * initial values are non-zero. Thus when we initialise them from * the seed, we ensure that a bit is set. */ i_lfsr0 = ( p_tmp1[0] << 17 ) | ( p_tmp1[1] << 9 ) | (( p_tmp1[2] & ~7 ) << 1 ) | 8 | ( p_tmp1[2] & 7 ); i_lfsr1 = ( p_tmp1[3] << 9 ) | 0x100 | p_tmp1[4]; i_index = sizeof(p_bits); i_carry = 0; do { for( i_bit = 0, i_val = 0 ; i_bit < 8 ; ++i_bit ) { i_lfsr0_o = ( ( i_lfsr0 >> 24 ) ^ ( i_lfsr0 >> 21 ) ^ ( i_lfsr0 >> 20 ) ^ ( i_lfsr0 >> 12 ) ) & 1; i_lfsr0 = ( i_lfsr0 << 1 ) | i_lfsr0_o; i_lfsr1_o = ( ( i_lfsr1 >> 16 ) ^ ( i_lfsr1 >> 2 ) ) & 1; i_lfsr1 = ( i_lfsr1 << 1 ) | i_lfsr1_o; i_combined = !i_lfsr1_o + i_carry + !i_lfsr0_o; /* taking bit 1 */ i_carry = ( i_combined >> 1 ) & 1; i_val |= ( i_combined & 1 ) << i_bit; } p_bits[--i_index] = i_val; } while( i_index > 0 ); /* This term is used throughout the following to * select one of 32 different variations on the * algorithm. */ i_cse = p_variants[i_css_variant] ^ p_crypt_tab2[i_css_variant]; /* Now the actual blocks doing the encryption. Each * of these works on 40 bits at a time and are quite * similar. */ i_index = 0; for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_scratch[i] ) { i_index = p_bits[25 + i] ^ p_scratch[i]; i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse; p_tmp1[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term; } p_tmp1[4] ^= p_tmp1[0]; for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp1[i] ) { i_index = p_bits[20 + i] ^ p_tmp1[i]; i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse; p_tmp2[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term; } p_tmp2[4] ^= p_tmp2[0]; for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp2[i] ) { i_index = p_bits[15 + i] ^ p_tmp2[i]; i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse; i_index = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term; p_tmp1[i] = p_crypt_tab0[i_index] ^ p_crypt_tab2[i_index]; } p_tmp1[4] ^= p_tmp1[0]; for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp1[i] ) { i_index = p_bits[10 + i] ^ p_tmp1[i]; i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse; i_index = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term; p_tmp2[i] = p_crypt_tab0[i_index] ^ p_crypt_tab2[i_index]; } p_tmp2[4] ^= p_tmp2[0]; for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp2[i] ) { i_index = p_bits[5 + i] ^ p_tmp2[i]; i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse; p_tmp1[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term; } p_tmp1[4] ^= p_tmp1[0]; for(i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp1[i] ) { i_index = p_bits[i] ^ p_tmp1[i]; i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse; p_key[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term; } return; } /***************************************************************************** * DecryptKey: decrypt p_crypted with p_key. ***************************************************************************** * Used to decrypt the disc key, with a player key, after requesting it * in _dvdcss_disckey and to decrypt title keys, with a disc key, requested * in _dvdcss_titlekey. * The player keys and the resulting disc key are only used as KEKs * (key encryption keys). * Decryption is slightly dependant on the type of key: * -for disc key, invert is 0x00, * -for title key, invert if 0xff. *****************************************************************************/ static void css_DecryptKey( unsigned char invert, unsigned char const *p_key, unsigned char const *p_crypted, unsigned char *p_result ) { unsigned int i_lfsr1_lo; unsigned int i_lfsr1_hi; unsigned int i_lfsr0; unsigned int i_combined; unsigned char o_lfsr0; unsigned char o_lfsr1; unsigned char k[5]; int i; i_lfsr1_lo = p_key[0] | 0x100; i_lfsr1_hi = p_key[1]; i_lfsr0 = ( ( p_key[4] << 17 ) | ( p_key[3] << 9 ) | ( p_key[2] << 1 ) ) + 8 - ( p_key[2] & 7 ); i_lfsr0 = ( p_css_tab4[i_lfsr0 & 0xff] << 24 ) | ( p_css_tab4[( i_lfsr0 >> 8 ) & 0xff] << 16 ) | ( p_css_tab4[( i_lfsr0 >> 16 ) & 0xff] << 8 ) | p_css_tab4[( i_lfsr0 >> 24 ) & 0xff]; i_combined = 0; for( i = 0 ; i < DVD_KEY_SIZE ; ++i ) { o_lfsr1 = p_css_tab2[i_lfsr1_hi] ^ p_css_tab3[i_lfsr1_lo]; i_lfsr1_hi = i_lfsr1_lo >> 1; i_lfsr1_lo = ( ( i_lfsr1_lo & 1 ) << 8 ) ^ o_lfsr1; o_lfsr1 = p_css_tab4[o_lfsr1]; o_lfsr0 = ((((((( i_lfsr0 >> 8 ) ^ i_lfsr0 ) >> 1 ) ^ i_lfsr0 ) >> 3 ) ^ i_lfsr0 ) >> 7 ); i_lfsr0 = ( i_lfsr0 >> 8 ) | ( o_lfsr0 << 24 ); i_combined += ( o_lfsr0 ^ invert ) + o_lfsr1; k[i] = i_combined & 0xff; i_combined >>= 8; } p_result[4] = k[4] ^ p_css_tab1[p_crypted[4]] ^ p_crypted[3]; p_result[3] = k[3] ^ p_css_tab1[p_crypted[3]] ^ p_crypted[2]; p_result[2] = k[2] ^ p_css_tab1[p_crypted[2]] ^ p_crypted[1]; p_result[1] = k[1] ^ p_css_tab1[p_crypted[1]] ^ p_crypted[0]; p_result[0] = k[0] ^ p_css_tab1[p_crypted[0]] ^ p_result[4]; p_result[4] = k[4] ^ p_css_tab1[p_result[4]] ^ p_result[3]; p_result[3] = k[3] ^ p_css_tab1[p_result[3]] ^ p_result[2]; p_result[2] = k[2] ^ p_css_tab1[p_result[2]] ^ p_result[1]; p_result[1] = k[1] ^ p_css_tab1[p_result[1]] ^ p_result[0]; p_result[0] = k[0] ^ p_css_tab1[p_result[0]]; return; } /***************************************************************************** * player_keys: alternate DVD player keys ***************************************************************************** * These player keys were generated using Frank A. Stevenson's PlayerKey * cracker. A copy of his article can be found here: * http://www-2.cs.cmu.edu/~dst/DeCSS/FrankStevenson/mail2.txt *****************************************************************************/ static const dvd_key_t player_keys[] = { { 0x01, 0xaf, 0xe3, 0x12, 0x80 }, { 0x12, 0x11, 0xca, 0x04, 0x3b }, { 0x14, 0x0c, 0x9e, 0xd0, 0x09 }, { 0x14, 0x71, 0x35, 0xba, 0xe2 }, { 0x1a, 0xa4, 0x33, 0x21, 0xa6 }, { 0x26, 0xec, 0xc4, 0xa7, 0x4e }, { 0x2c, 0xb2, 0xc1, 0x09, 0xee }, { 0x2f, 0x25, 0x9e, 0x96, 0xdd }, { 0x33, 0x2f, 0x49, 0x6c, 0xe0 }, { 0x35, 0x5b, 0xc1, 0x31, 0x0f }, { 0x36, 0x67, 0xb2, 0xe3, 0x85 }, { 0x39, 0x3d, 0xf1, 0xf1, 0xbd }, { 0x3b, 0x31, 0x34, 0x0d, 0x91 }, { 0x45, 0xed, 0x28, 0xeb, 0xd3 }, { 0x48, 0xb7, 0x6c, 0xce, 0x69 }, { 0x4b, 0x65, 0x0d, 0xc1, 0xee }, { 0x4c, 0xbb, 0xf5, 0x5b, 0x23 }, { 0x51, 0x67, 0x67, 0xc5, 0xe0 }, { 0x53, 0x94, 0xe1, 0x75, 0xbf }, { 0x57, 0x2c, 0x8b, 0x31, 0xae }, { 0x63, 0xdb, 0x4c, 0x5b, 0x4a }, { 0x7b, 0x1e, 0x5e, 0x2b, 0x57 }, { 0x85, 0xf3, 0x85, 0xa0, 0xe0 }, { 0xab, 0x1e, 0xe7, 0x7b, 0x72 }, { 0xab, 0x36, 0xe3, 0xeb, 0x76 }, { 0xb1, 0xb8, 0xf9, 0x38, 0x03 }, { 0xb8, 0x5d, 0xd8, 0x53, 0xbd }, { 0xbf, 0x92, 0xc3, 0xb0, 0xe2 }, { 0xcf, 0x1a, 0xb2, 0xf8, 0x0a }, { 0xec, 0xa0, 0xcf, 0xb3, 0xff }, { 0xfc, 0x95, 0xa9, 0x87, 0x35 } }; /***************************************************************************** * DecryptDiscKey ***************************************************************************** * Decryption of the disc key with player keys: try to decrypt the disc key * from every position with every player key. * p_struct_disckey: the 2048 byte DVD_STRUCT_DISCKEY data * p_disc_key: result, the 5 byte disc key *****************************************************************************/ static int css_DecryptDiscKey( drive_info* drive, unsigned char const *p_struct_disckey, dvd_key_t p_disc_key ) { dvd_key_t p_verify; unsigned int i, n = 0; /* Decrypt disc key with the above player keys */ for( n = 0; n < sizeof(player_keys) / sizeof(dvd_key_t); n++ ) { css_printkey( (char*) ("CSS: trying player key "), player_keys[n] ); for( i = 1; i < 409; i++ ) { /* Check if player key n is the right key for position i. */ css_DecryptKey( 0, player_keys[n], p_struct_disckey + 5 * i, p_disc_key ); /* The first part in the struct_disckey block is the * 'disc key' encrypted with itself. Using this we * can check if we decrypted the correct key. */ css_DecryptKey( 0, p_disc_key, p_struct_disckey, p_verify ); /* If the position / player key pair worked then return. */ if( memcmp( p_disc_key, p_verify, DVD_KEY_SIZE ) == 0 ) { return 0; } } } /* Have tried all combinations of positions and keys, * and we still didn't succeed. */ memset( p_disc_key, 0, DVD_KEY_SIZE ); return -1; } static int css_investigate( unsigned char *hash, unsigned char *ckey ) { dvd_key_t key; css_DecryptKey( 0, ckey, hash, key ); return memcmp( key, ckey, DVD_KEY_SIZE ); } #define K1TABLEWIDTH 10 static int css_CrackDiscKey( drive_info* drive, unsigned char *p_disc_key ) { unsigned char B[5] = { 0,0,0,0,0 }; /* Second Stage of mangle cipher */ unsigned char C[5] = { 0,0,0,0,0 }; /* Output Stage of mangle cipher * IntermediateKey */ unsigned char k[5] = { 0,0,0,0,0 }; /* Mangling cipher key * Also output from CSS( C ) */ unsigned char out1[5]; /* five first output bytes of LFSR1 */ unsigned char out2[5]; /* five first output bytes of LFSR2 */ unsigned int lfsr1a; /* upper 9 bits of LFSR1 */ unsigned int lfsr1b; /* lower 8 bits of LFSR1 */ unsigned int tmp, tmp2, tmp3, tmp4,tmp5; int i,j; unsigned int nStepA; /* iterator for LFSR1 start state */ unsigned int nStepB; /* iterator for possible B[0] */ unsigned int nTry; /* iterator for K[1] possibilities */ unsigned int nPossibleK1; /* #of possible K[1] values */ unsigned char* K1table; /* Lookup table for possible K[1] */ unsigned int* BigTable; /* LFSR2 startstate indexed by * 1,2,5 output byte */ /* * Prepare tables for hash reversal */ /* initialize lookup tables for k[1] */ K1table = (unsigned char*) malloc( 65536 * K1TABLEWIDTH ); memset( K1table, 0 , 65536 * K1TABLEWIDTH ); if( K1table == NULL ) { return -1; } tmp = p_disc_key[0] ^ p_css_tab1[ p_disc_key[1] ]; for( i = 0 ; i < 256 ; i++ ) /* k[1] */ { tmp2 = p_css_tab1[ tmp ^ i ]; /* p_css_tab1[ B[1] ]*/ for( j = 0 ; j < 256 ; j++ ) /* B[0] */ { tmp3 = j ^ tmp2 ^ i; /* C[1] */ tmp4 = K1table[ K1TABLEWIDTH * ( 256 * j + tmp3 ) ]; /* count of entries here */ tmp4++; /* if( tmp4 == K1TABLEWIDTH ) { print_debug( dvdcss, "Table disaster %d", tmp4 ); } */ if( tmp4 < K1TABLEWIDTH ) { K1table[ K1TABLEWIDTH * ( 256 * j + tmp3 ) + tmp4 ] = i; } K1table[ K1TABLEWIDTH * ( 256 * j + tmp3 ) ] = tmp4; } } /* Initing our Really big table */ BigTable = (unsigned int*) malloc( 16777216 * sizeof(int) ); memset( BigTable, 0 , 16777216 * sizeof(int) ); if( BigTable == NULL ) { return -1; } tmp3 = 0; printf( "CSS: initializing the big table\n" ); for( i = 0 ; i < 16777216 ; i++ ) { tmp = (( i + i ) & 0x1fffff0 ) | 0x8 | ( i & 0x7 ); for( j = 0 ; j < 5 ; j++ ) { tmp2=((((((( tmp >> 3 ) ^ tmp ) >> 1 ) ^ tmp ) >> 8 ) ^ tmp ) >> 5 ) & 0xff; tmp = ( tmp << 8) | tmp2; out2[j] = p_css_tab4[ tmp2 ]; } j = ( out2[0] << 16 ) | ( out2[1] << 8 ) | out2[4]; BigTable[j] = i; } /* * We are done initing, now reverse hash */ tmp5 = p_disc_key[0] ^ p_css_tab1[ p_disc_key[1] ]; for( nStepA = 0 ; nStepA < 65536 ; nStepA ++ ) { lfsr1a = 0x100 | ( nStepA >> 8 ); lfsr1b = nStepA & 0xff; /* Generate 5 first output bytes from lfsr1 */ for( i = 0 ; i < 5 ; i++ ) { tmp = p_css_tab2[ lfsr1b ] ^ p_css_tab3[ lfsr1a ]; lfsr1b = lfsr1a >> 1; lfsr1a = ((lfsr1a&1)<<8) ^ tmp; out1[ i ] = p_css_tab4[ tmp ]; } /* cumpute and cache some variables */ C[0] = nStepA >> 8; C[1] = nStepA & 0xff; tmp = p_disc_key[3] ^ p_css_tab1[ p_disc_key[4] ]; tmp2 = p_css_tab1[ p_disc_key[0] ]; /* Search through all possible B[0] */ for( nStepB = 0 ; nStepB < 256 ; nStepB++ ) { /* reverse parts of the mangling cipher */ B[0] = nStepB; k[0] = p_css_tab1[ B[0] ] ^ C[0]; B[4] = B[0] ^ k[0] ^ tmp2; k[4] = B[4] ^ tmp; nPossibleK1 = K1table[ K1TABLEWIDTH * (256 * B[0] + C[1]) ]; /* Try out all possible values for k[1] */ for( nTry = 0 ; nTry < nPossibleK1 ; nTry++ ) { k[1] = K1table[ K1TABLEWIDTH * (256 * B[0] + C[1]) + nTry + 1 ]; B[1] = tmp5 ^ k[1]; /* reconstruct output from LFSR2 */ tmp3 = ( 0x100 + k[0] - out1[0] ); out2[0] = tmp3 & 0xff; tmp3 = tmp3 & 0x100 ? 0x100 : 0xff; tmp3 = ( tmp3 + k[1] - out1[1] ); out2[1] = tmp3 & 0xff; tmp3 = ( 0x100 + k[4] - out1[4] ); out2[4] = tmp3 & 0xff; /* Can be 1 off */ /* test first possible out2[4] */ tmp4 = ( out2[0] << 16 ) | ( out2[1] << 8 ) | out2[4]; tmp4 = BigTable[ tmp4 ]; C[2] = tmp4 & 0xff; C[3] = ( tmp4 >> 8 ) & 0xff; C[4] = ( tmp4 >> 16 ) & 0xff; B[3] = p_css_tab1[ B[4] ] ^ k[4] ^ C[4]; k[3] = p_disc_key[2] ^ p_css_tab1[ p_disc_key[3] ] ^ B[3]; B[2] = p_css_tab1[ B[3] ] ^ k[3] ^ C[3]; k[2] = p_disc_key[1] ^ p_css_tab1[ p_disc_key[2] ] ^ B[2]; if( ( B[1] ^ p_css_tab1[ B[2] ] ^ k[ 2 ] ) == C[ 2 ] ) { if( ! css_investigate( &p_disc_key[0] , &C[0] ) ) { goto end; } } /* Test second possible out2[4] */ out2[4] = ( out2[4] + 0xff ) & 0xff; tmp4 = ( out2[0] << 16 ) | ( out2[1] << 8 ) | out2[4]; tmp4 = BigTable[ tmp4 ]; C[2] = tmp4 & 0xff; C[3] = ( tmp4 >> 8 ) & 0xff; C[4] = ( tmp4 >> 16 ) & 0xff; B[3] = p_css_tab1[ B[4] ] ^ k[4] ^ C[4]; k[3] = p_disc_key[2] ^ p_css_tab1[ p_disc_key[3] ] ^ B[3]; B[2] = p_css_tab1[ B[3] ] ^ k[3] ^ C[3]; k[2] = p_disc_key[1] ^ p_css_tab1[ p_disc_key[2] ] ^ B[2]; if( ( B[1] ^ p_css_tab1[ B[2] ] ^ k[ 2 ] ) == C[ 2 ] ) { if( ! css_investigate( &p_disc_key[0] , &C[0] ) ) { goto end; } } } } } end: memcpy( p_disc_key, &C[0], DVD_KEY_SIZE ); free( K1table ); free( BigTable ); return 0; } /***************************************************************************** * RecoverTitleKey: (title) key recovery from cipher and plain text * Function designed by Frank Stevenson ***************************************************************************** * Called from Attack* which are in turn called by CrackTitleKey. Given * a guessed(?) plain text and the cipher text. Returns -1 on failure. *****************************************************************************/ static int css_RecoverTitleKey( int i_start, unsigned char const *p_crypted, unsigned char const *p_decrypted, unsigned char const *p_sector_seed, unsigned char *p_key ) { unsigned char p_buffer[10]; unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6; unsigned int i_try; unsigned int i_candidate; unsigned int i, j; int i_exit = -1; for( i = 0 ; i < 10 ; i++ ) { p_buffer[i] = p_css_tab1[p_crypted[i]] ^ p_decrypted[i]; } for( i_try = i_start ; i_try < 0x10000 ; i_try++ ) { i_t1 = i_try >> 8 | 0x100; i_t2 = i_try & 0xff; i_t3 = 0; /* not needed */ i_t5 = 0; /* iterate cipher 4 times to reconstruct LFSR2 */ for( i = 0 ; i < 4 ; i++ ) { /* advance LFSR1 normaly */ i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1]; i_t2 = i_t1 >> 1; i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4; i_t4 = p_css_tab5[i_t4]; /* deduce i_t6 & i_t5 */ i_t6 = p_buffer[i]; if( i_t5 ) { i_t6 = ( i_t6 + 0xff ) & 0x0ff; } if( i_t6 < i_t4 ) { i_t6 += 0x100; } i_t6 -= i_t4; i_t5 += i_t6 + i_t4; i_t6 = p_css_tab4[ i_t6 ]; /* feed / advance i_t3 / i_t5 */ i_t3 = ( i_t3 << 8 ) | i_t6; i_t5 >>= 8; } i_candidate = i_t3; /* iterate 6 more times to validate candidate key */ for( ; i < 10 ; i++ ) { i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1]; i_t2 = i_t1 >> 1; i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4; i_t4 = p_css_tab5[i_t4]; i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^ i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff; i_t3 = ( i_t3 << 8 ) | i_t6; i_t6 = p_css_tab4[i_t6]; i_t5 += i_t6 + i_t4; if( ( i_t5 & 0xff ) != p_buffer[i] ) { break; } i_t5 >>= 8; } if( i == 10 ) { /* Do 4 backwards steps of iterating t3 to deduce initial state */ i_t3 = i_candidate; for( i = 0 ; i < 4 ; i++ ) { i_t1 = i_t3 & 0xff; i_t3 = ( i_t3 >> 8 ); /* easy to code, and fast enough bruteforce * search for byte shifted in */ for( j = 0 ; j < 256 ; j++ ) { i_t3 = ( i_t3 & 0x1ffff ) | ( j << 17 ); i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^ i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff; if( i_t6 == i_t1 ) { break; } } } i_t4 = ( i_t3 >> 1 ) - 4; for( i_t5 = 0 ; i_t5 < 8; i_t5++ ) { if( ( ( i_t4 + i_t5 ) * 2 + 8 - ( (i_t4 + i_t5 ) & 7 ) ) == i_t3 ) { p_key[0] = i_try>>8; p_key[1] = i_try & 0xFF; p_key[2] = ( ( i_t4 + i_t5 ) >> 0 ) & 0xFF; p_key[3] = ( ( i_t4 + i_t5 ) >> 8 ) & 0xFF; p_key[4] = ( ( i_t4 + i_t5 ) >> 16 ) & 0xFF; i_exit = i_try + 1; } } } } if( i_exit >= 0 ) { p_key[0] ^= p_sector_seed[0]; p_key[1] ^= p_sector_seed[1]; p_key[2] ^= p_sector_seed[2]; p_key[3] ^= p_sector_seed[3]; p_key[4] ^= p_sector_seed[4]; } return i_exit; } /***************************************************************************** * DecryptTitleKey ***************************************************************************** * Decrypt the title key using the disc key. * p_disc_key: result, the 5 byte disc key * p_titlekey: the encrypted title key, gets overwritten by the decrypted key *****************************************************************************/ static void css_DecryptTitleKey( dvd_key_t p_disc_key, dvd_key_t p_titlekey ) { css_DecryptKey( 0xff, p_disc_key, p_titlekey, p_titlekey ); } /***************************************************************************** * CrackTitleKey: try to crack title key from the contents of a VOB. ***************************************************************************** * This function is called by _dvdcss_titlekey to find a title key, if we've * chosen to crack title key instead of decrypting it with the disc key. * The DVD should have been opened and be in an authenticated state. * i_pos is the starting sector, i_len is the maximum number of sectors to read *****************************************************************************/ static int css_CrackTitleKey( drive_info* drive, int i_pos, int i_len, dvd_key_t p_titlekey ) { unsigned char p_buf[ DVDCSS_BLOCK_SIZE ]; const unsigned char p_packstart[4] = { 0x00, 0x00, 0x01, 0xba }; int i_reads = 0; int i_encrypted = 0; int b_stop_scanning = 0; int b_read_error = 0; int i_ret; printf( "CSS: cracking title key at block %x\n", i_pos ); i_tries = 0; i_success = 0; do { // i_ret = dvdcss->pf_seek( dvdcss, i_pos ); i_ret = seek_dvd( drive, i_pos, DVDCSS_NOFLAGS ); if( i_ret ) { printf( "CSS: seek failed\n" ); } i_ret = read_dvd(drive, drive->rd_buf, i_pos, 1, DVDCSS_NOFLAGS); memcpy(p_buf, drive->rd_buf, DVDCSS_BLOCK_SIZE); // i_ret = dvdcss_read( dvdcss, p_buf, 1, DVDCSS_NOFLAGS ); /* Either we are at the end of the physical device or the auth * have failed / were not done and we got a read error. */ if( i_ret <= 0 ) { if( i_ret == 0 ) { printf( "CSS: read returned 0 (end of device?)\n" ); } else if( !b_read_error ) { printf( "CSS: read error at block %i, resorting to " "secret arcanes to recover\n", i_pos ); /* Reset the drive before trying to continue */ #warning "Reset the drive before trying to continue" // _dvdcss_close( dvdcss ); // _dvdcss_open( dvdcss ); b_read_error = 1; continue; } break; } /* Stop when we find a non MPEG stream block. * (We must have reached the end of the stream). * For now, allow all blocks that begin with a start code. */ if( memcmp( p_buf, p_packstart, 3 ) ) { printf( "CSS: non MPEG block found at block %i " "(end of title)\n", i_pos ); break; } if( p_buf[0x0d] & 0x07 ) printf( "CSS: stuffing in pack header\n" ); /* PES_scrambling_control does not exist in a system_header, * a padding_stream or a private_stream2 (and others?). */ if( p_buf[0x14] & 0x30 && ! ( p_buf[0x11] == 0xbb || p_buf[0x11] == 0xbe || p_buf[0x11] == 0xbf ) ) { i_encrypted++; if( css_AttackPattern(p_buf, i_reads, p_titlekey) > 0 ) { b_stop_scanning = 1; } #if 0 if( AttackPadding(p_buf, i_reads, p_titlekey) > 0 ) { b_stop_scanning = 1; } #endif } i_pos++; i_len--; i_reads++; /* Emit a progress indication now and then. */ if( !( i_reads & 0xfff ) ) { printf( "CSS: at block %i, still cracking...\n", i_pos ); } /* Stop after 2000 blocks if we haven't seen any encrypted blocks. */ if( i_reads >= 2000 && i_encrypted == 0 ) break; } while( !b_stop_scanning && i_len > 0); if( !b_stop_scanning ) { printf( "CSS: end of title reached\n" ); } /* Print some statistics. */ printf( "CSS: successful attempts %d/%d, scrambled blocks %d/%d\n", i_success, i_tries, i_encrypted, i_reads ); if( i_success > 0 /* b_stop_scanning */ ) { printf( "CSS: vts key initialized\n" ); return 1; } if( i_encrypted == 0 && i_reads > 0 ) { memset( p_titlekey, 0, DVD_KEY_SIZE ); printf( "CSS: no scrambled sectors found\n" ); return 0; } memset( p_titlekey, 0, DVD_KEY_SIZE ); return -1; } /****************************************************************************** * The original Ethan Hawke (DeCSSPlus) attack (modified). ****************************************************************************** * Tries to find a repeating pattern just before the encrypted part starts. * Then it guesses that the plain text for first encrypted bytes are * a contiuation of that pattern. *****************************************************************************/ static int css_AttackPattern( unsigned char const p_sec[ DVDCSS_BLOCK_SIZE ], int i_pos, unsigned char *p_key ) { unsigned int i_best_plen = 0; unsigned int i_best_p = 0; unsigned int i, j; /* For all cycle length from 2 to 48 */ for( i = 2 ; i < 0x30 ; i++ ) { /* Find the number of bytes that repeats in cycles. */ for( j = i + 1; j < 0x80 && ( p_sec[0x7F - (j%i)] == p_sec[0x7F - j] ); j++ ) { /* We have found j repeating bytes with a cycle length i. */ if( j > i_best_plen ) { i_best_plen = j; i_best_p = i; } } } /* We need at most 10 plain text bytes?, so a make sure that we * have at least 20 repeated bytes and that they have cycled at * least one time. */ if( ( i_best_plen > 3 ) && ( i_best_plen / i_best_p >= 2) ) { int res; i_tries++; memset( p_key, 0, DVD_KEY_SIZE ); res = css_RecoverTitleKey( 0, &p_sec[0x80], &p_sec[ 0x80 - (i_best_plen / i_best_p) * i_best_p ], &p_sec[0x54] /* key_seed */, p_key ); i_success += ( res >= 0 ); #if 0 if( res >= 0 ) { fprintf( stderr, "key is %02x:%02x:%02x:%02x:%02x ", p_key[0], p_key[1], p_key[2], p_key[3], p_key[4] ); fprintf( stderr, "at block %5d pattern len %3d period %3d %s\n", i_pos, i_best_plen, i_best_p, (res>=0?"y":"n") ); } #endif return ( res >= 0 ); } return 0; } /***************************************************************************** * _dvdcss_title: crack or decrypt the current title key if needed ***************************************************************************** * This function should only be called by dvdcss->pf_seek and should eventually * not be external if possible. *****************************************************************************/ int css_title ( drive_info* drive, int lba) { dvd_title_t *p_title; dvd_title_t *p_newtitle; dvd_key_t p_title_key; int i_ret = -1; #if (DVDCSS_KEY_CACHE > 0) int i_fd, b_cache = 0; #endif if( ! drive->media.dvdcss.protection == 0x01 ) { return 0; } /* Check if we've already cracked this key */ p_title = drive->media.dvdcss.p_titles; while( p_title != NULL && p_title->p_next != NULL && p_title->p_next->i_startlb <= lba ) { p_title = p_title->p_next; } if( p_title != NULL && p_title->i_startlb == lba ) { /* We've already cracked this key, nothing to do */ memcpy( drive->media.dvdcss.TK, p_title->p_key, sizeof(dvd_key_t) ); return 0; } #if (DVDCSS_KEY_CACHE > 0) /* Check whether the key is in our disk cache */ if( drive->media.dvdcss.psz_cachefile[0] ) { /* XXX: be careful, we use sprintf and not snprintf */ sprintf( drive->media.dvdcss.psz_block, "%.10x", lba ); i_fd = open( drive->media.dvdcss.psz_cachefile, O_RDONLY ); b_cache = 1; if( i_fd >= 0 ) { char psz_key[DVD_KEY_SIZE * 3]; unsigned int k0, k1, k2, k3, k4; psz_key[DVD_KEY_SIZE * 3 - 1] = '\0'; if( read( i_fd, psz_key, DVD_KEY_SIZE * 3 - 1 ) == DVD_KEY_SIZE * 3 - 1 && sscanf( psz_key, "%x:%x:%x:%x:%x", &k0, &k1, &k2, &k3, &k4 ) == 5 ) { p_title_key[0] = k0; p_title_key[1] = k1; p_title_key[2] = k2; p_title_key[3] = k3; p_title_key[4] = k4; css_printkey( (char*) "CSS: title key found in cache ", p_title_key ); /* Don't try to save it again */ b_cache = 0; i_ret = 1; } close( i_fd ); } } #endif /* Crack or decrypt CSS title key for current VTS */ if( i_ret < 0 ) { i_ret = css_titlekey( drive, lba, p_title_key ); if( i_ret < 0 ) { printf ( "CSS: fatal error in vts css key\n" ); return i_ret; } if( i_ret == 0 ) { printf( "CSS: unencrypted title\n" ); /* We cache this anyway, so we don't need to check again. */ } } #if (DVDCSS_KEY_CACHE > 0) /* Key is valid, we store it on disk. */ if( drive->media.dvdcss.psz_cachefile[0] && b_cache ) { i_fd = open( drive->media.dvdcss.psz_cachefile, O_RDWR|O_CREAT, 0644 ); if( i_fd >= 0 ) { char psz_key[DVD_KEY_SIZE * 3 + 2]; sprintf( psz_key, "%02x:%02x:%02x:%02x:%02x\r\n", p_title_key[0], p_title_key[1], p_title_key[2], p_title_key[3], p_title_key[4] ); write( i_fd, psz_key, DVD_KEY_SIZE * 3 + 1 ); close( i_fd ); } } #endif /* Find our spot in the list */ p_newtitle = NULL; p_title = drive->media.dvdcss.p_titles; while( ( p_title != NULL ) && ( p_title->i_startlb < lba ) ) { p_newtitle = p_title; p_title = p_title->p_next; } /* Save the found title */ p_title = p_newtitle; /* Write in the new title and its key */ p_newtitle = (dvd_title_t*) malloc( sizeof( dvd_title_t ) ); p_newtitle->i_startlb = lba; memcpy( p_newtitle->p_key, p_title_key, DVD_KEY_SIZE ); /* Link it at the head of the (possibly empty) list */ if( p_title == NULL ) { p_newtitle->p_next = drive->media.dvdcss.p_titles; drive->media.dvdcss.p_titles = p_newtitle; } /* Link the new title inside the list */ else { p_newtitle->p_next = p_title->p_next; p_title->p_next = p_newtitle; } memcpy( drive->media.dvdcss.TK, p_title_key, DVD_KEY_SIZE ); return 0; } /***************************************************************************** * _dvdcss_titlekey: get title key. *****************************************************************************/ int css_titlekey( drive_info* drive, int lba, dvd_key_t p_title_key ) { // static unsigned char p_garbage[ DVDCSS_BLOCK_SIZE ]; /* we never read it back */ unsigned char p_key[ DVD_KEY_SIZE ]; int i, i_ret = 0; if( drive->media.dvdcss.method == DVDCSS_METHOD_KEY || drive->media.dvdcss.method == DVDCSS_METHOD_DISC ) { /* We have a decrypted Disc key and the ioctls are available, * read the title key and decrypt it. */ printf( "CSS: getting title key at block %i the classic way\n", lba ); /* We need to authenticate again every time to get a new session key */ if( css_get_bus_key( drive ) ) { return -1; } /* Get encrypted title key */ if (css_report_title_key(drive, lba, p_key)) //if( ioctl_ReadTitleKey( dvdcss->i_fd, &dvdcss->css.i_agid, // lba, p_key ) < 0 ) { printf( "CSS: ReadTitleKey failed (region mismatch?)\n" ); i_ret = -1; } /* Test ASF, it will be reset to 0 if we got a Region error */ //switch( GetASF( dvdcss ) ) switch( css_report_asf( drive ) ) { case -1: /* An error getting the ASF status, something must be wrong. */ printf( "CSS: lost ASF requesting title key\n" ); css_invalidate_agid(drive); // ioctl_InvalidateAgid( dvdcss->i_fd, &dvdcss->css.i_agid ); i_ret = -1; break; case 1: /* This might either be a title that has no key, * or we encountered a region error. */ printf( "CSS: lost ASF requesting title key\n" ); break; case 2: /* Drive status is ok. */ /* If the title key request failed, but we did not loose ASF, * we might stil have the AGID. Other code assume that we * will not after this so invalidate it(?). */ if( i_ret < 0 ) { css_invalidate_agid(drive); // ioctl_InvalidateAgid( dvdcss->i_fd, &dvdcss->css.i_agid ); } break; } if( !( i_ret < 0 ) ) { /* Decrypt title key using the bus key */ for( i = 0 ; i < DVD_KEY_SIZE ; i++ ) { p_key[ i ] ^= drive->media.dvdcss.BK[ 4 - (i % DVD_KEY_SIZE) ]; } /* If p_key is all zero then there really wasn't any key present * even though we got to read it without an error. */ if( !( p_key[0] | p_key[1] | p_key[2] | p_key[3] | p_key[4] ) ) { i_ret = 0; } else { css_printkey( (char*) "CSS: initial disc key ", drive->media.dvdcss.DK ); css_DecryptTitleKey( drive->media.dvdcss.DK, p_key ); css_printkey( (char*) "CSS: decrypted title key ", p_key ); i_ret = 1; } /* All went well either there wasn't a key or we have it now. */ memcpy( p_title_key, p_key, DVD_KEY_SIZE ); css_printkey( (char*)"CSS: title key is ", p_title_key ); return i_ret; } /* The title key request failed */ printf( "CSS: resetting drive and cracking title key\n" ); /* Read an unscrambled sector and reset the drive */ read(drive, drive->rd_buf, 0, 1); // dvdcss->pf_seek( dvdcss, 0 ); // dvdcss->pf_read( dvdcss, p_garbage, 1 ); // dvdcss->pf_seek( dvdcss, 0 ); css_disckey( drive ); /* Fallback */ } /* METHOD is TITLE, we can't use the ioctls or requesting the title key * failed above. For these cases we try to crack the key instead. */ /* For now, the read limit is 9Gb / 2048 = 4718592 sectors. */ i_ret = css_CrackTitleKey( drive, lba, 4718592, p_key ); memcpy( p_title_key, p_key, DVD_KEY_SIZE ); css_printkey( (char*) "CSS: title key is ", p_title_key ); return i_ret; } /***************************************************************************** * PrintKey : debug function that dumps a key value *****************************************************************************/ static void css_printkey( char *prefix, unsigned char const *data ) { printf( "%s%02X:%02X:%02X:%02X:%02X\n", prefix, data[0], data[1], data[2], data[3], data[4] ); } qpxtool-0.7.1_002/lib/qpxtransport/sense.cpp0000644000175000001440000004315511122707065020243 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include "sense.h" int sense2str(int err, char* str) { strcpy(str,"[unknown error]"); switch (SK(err)) { case 0x1: switch (ASC(err)) { case 0x0B: switch (ASCQ(err)) { case 0x00: strcpy(str,"WARNING"); break; case 0x01: strcpy(str,"WARNING - SPECIFIED TEMPERATURE EXCEEDED"); break; case 0x02: strcpy(str,"WARNING - ENCLOSURE DEGRADED"); break; default: sprintf(str,"WARNING, ASCQ=%02X",ASCQ(err)); break; } break; case 0x17: switch (ASCQ(err)) { case 0x00: strcpy(str,"RECOVERED DATA WITH NO ERROR CORRECTION APPLIED"); break; case 0x01: strcpy(str,"RECOVERED DATA WITH RETRIES"); break; case 0x02: strcpy(str,"RECOVERED DATA WITH POSITIVE HEAD OFFSET"); break; case 0x03: strcpy(str,"RECOVERED DATA WITH NEGATIVE HEAD OFFSET"); break; case 0x04: strcpy(str,"RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED"); break; case 0x05: strcpy(str,"RECOVERED DATA USING PREVIOUS SECTOR ID"); break; case 0x07: strcpy(str,"RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT"); break; case 0x08: strcpy(str,"RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE"); break; case 0x09: strcpy(str,"RECOVERED DATA WITHOUT ECC - DATA REWRITTEN"); break; default: strcpy(str,"RECOVERED DATA WITH NO ERROR CORRECTION APPLIED"); break; } break; case 0x18: switch (ASCQ(err)) { case 0x00: strcpy(str,"RECOVERED DATA WITH ERROR CORRECTION APPLIED"); break; case 0x01: strcpy(str,"RECOVERED DATA WITH ERROR CORR. & RETRIES APPLIED"); break; case 0x02: strcpy(str,"RECOVERED DATA - DATA AUTO-REALLOCATED"); break; case 0x03: strcpy(str,"RECOVERED DATA WITH CIRC"); break; case 0x04: strcpy(str,"RECOVERED DATA WITH L-EC"); break; case 0x05: strcpy(str,"RECOVERED DATA - RECOMMEND REASSIGNMENT"); break; case 0x06: strcpy(str,"RECOVERED DATA - RECOMMEND REWRITE"); break; case 0x08: strcpy(str,"RECOVERED DATA WITH LINKING"); break; default: strcpy(str,"RECOVERED DATA WITH ERROR CORRECTION APPLIED"); break; } break; case 0x5D: switch (ASCQ(err)) { case 0x01: strcpy(str,"FAILURE PREDICTION THRESHOLD EXCEEDED - Predicted Media failure"); break; case 0x02: strcpy(str,"LOGICAL UNIT FAILURE PREDICTION THRESHOLD EXCEEDED"); break; case 0x03: strcpy(str,"FAILURE PREDICTION THRESHOLD EXCEEDED - Predicted Spare Area Exhaustion"); break; case 0xFF: strcpy(str,"FAILURE PREDICTION THRESHOLD EXCEEDED (FALSE)"); break; default: strcpy(str,"LOGICAL UNIT FAILURE PREDICTION THRESHOLD EXCEEDED"); break; } break; case 0x73: switch (ASCQ(err)) { case 0x01: strcpy(str,"POWER CALIBRATION AREA ALMOST FULL"); break; case 0x06: strcpy(str,"RMA/PMA IS ALMOST FULL"); break; } break; } case 0x2: switch (ASC(err)) { case 0x04: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE"); break; case 0x01: strcpy(str,"LOGICAL UNIT IS IN PROCESS OF BECOMING READY"); break; case 0x02: strcpy(str,"LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED"); break; case 0x03: strcpy(str,"LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED"); break; case 0x04: strcpy(str,"LOGICAL UNIT NOT READY, FORMAT IN PROGRESS"); break; case 0x07: strcpy(str,"LOGICAL UNIT NOT READY, OPERATION IN PROGRESS"); break; case 0x08: strcpy(str,"LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS"); break; default: strcpy(str,"LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE"); break; } break; case 0x30: switch (ASCQ(err)) { case 0x00: strcpy(str,"INCOMPATIBLE MEDIUM INSTALLED"); break; case 0x01: strcpy(str,"CANNOT READ MEDIUM - UNKNOWN FORMAT"); break; case 0x02: strcpy(str,"CANNOT READ MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x03: strcpy(str,"CLEANING CARTRIDGE INSTALLED"); break; case 0x04: strcpy(str,"CANNOT WRITE MEDIUM - UNKNOWN FORMAT"); break; case 0x05: strcpy(str,"CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x06: strcpy(str,"CANNOT FORMAT MEDIUM - INCOMPATIBLE MEDIUM"); break; case 0x07: strcpy(str,"CLEANING FAILURE"); break; case 0x11: strcpy(str,"CANNOT WRITE MEDIUM - UNSUPPORTED MEDIUM VERSION"); break; default: strcpy(str,"INCOMPATIBLE MEDIUM INSTALLED"); break; } break; case 0x3A: switch (ASCQ(err)) { case 0x00: strcpy(str,"MEDIUM NOT PRESENT"); break; case 0x01: strcpy(str,"MEDIUM NOT PRESENT - TRAY CLOSED"); break; case 0x02: strcpy(str,"MEDIUM NOT PRESENT - TRAY OPEN"); break; default: strcpy(str,"MEDIUM NOT PRESENT"); break; } break; case 0x3E: strcpy(str,"LOGICAL UNIT HAS NOT SELF-CONFIGURED YET"); break; /* ASCQ=00: */ } break; case 0x3: switch (ASC(err)) { case 0x02: strcpy(str,"NO SEEK COMPLETE"); break; /* ASCQ = 0x00 */ case 0x06: strcpy(str,"NO REFERENCE POSITION FOUND"); break; case 0x0C: switch (ASCQ(err)) { case 0x00: strcpy(str,"WRITE ERROR"); break; case 0x07: strcpy(str,"WRITE ERROR - RECOVERY NEEDED"); break; case 0x08: strcpy(str,"WRITE ERROR - RECOVERY FAILED"); break; case 0x09: strcpy(str,"WRITE ERROR - LOSS OF STREAMING"); break; case 0x0A: strcpy(str,"WRITE ERROR - PADDING BLOCKS ADDED"); break; default: strcpy(str,"WRITE ERROR"); break; } break; case 0x11: switch (ASCQ(err)) { case 0x00: strcpy(str,"UNRECOVERED READ ERROR"); break; case 0x01: strcpy(str,"READ RETRIES EXHAUSTED"); break; case 0x02: strcpy(str,"ERROR TOO LONG TO CORRECT"); break; case 0x05: strcpy(str,"L-EC UNCORRECTABLE ERROR"); break; case 0x06: strcpy(str,"CIRC UNRECOVERED ERROR"); break; case 0x0F: strcpy(str,"ERROR READING UPC/EAN NUMBER"); break; case 0x10: strcpy(str,"ERROR READING ISRC NUMBER"); break; default: strcpy(str,"UNRECOVERED READ ERROR"); break; } break; case 0x15: switch (ASCQ(err)) { case 0x00: strcpy(str,"RANDOM POSITIONING ERROR"); break; case 0x01: strcpy(str,"MECHANICAL POSITIONING ERROR"); break; case 0x02: strcpy(str,"POSITIONING ERROR DETECTED BY READ OF MEDIUM"); break; default: strcpy(str,"RANDOM POSITIONING ERROR"); break; } break; case 0x31: switch (ASCQ(err)) { case 0x00: strcpy(str,"MEDIUM FORMAT CORRUPTED"); break; case 0x01: strcpy(str,"FORMAT COMMAND FAILED"); break; case 0x02: strcpy(str,"ZONED FORMATTING FAILED DUE TO SPARE LINKING"); break; default: strcpy(str,"MEDIUM FORMAT CORRUPTED"); break; } break; case 0x51: switch (ASCQ(err)) { case 0x00: strcpy(str,"ERASE FAILURE"); break; case 0x01: strcpy(str,"ERASE FAILURE - INCOMPLETE ERASE OPERATION DETECTED"); break; default: strcpy(str,"ERASE FAILURE"); break; } break; case 0x57: strcpy(str,"UNABLE TO RECOVER TABLE-OF-CONTENTS"); break; /* ASCQ = 00 */ case 0x72: switch (ASCQ(err)) { case 0x00: strcpy(str,"SESSION FIXATION ERROR"); break; case 0x01: strcpy(str,"SESSION FIXATION ERROR WRITING LEAD-IN"); break; case 0x02: strcpy(str,"SESSION FIXATION ERROR WRITING LEAD-OUT"); break; default: strcpy(str,"SESSION FIXATION ERROR"); break; } break; case 0x73: switch (ASCQ(err)) { case 0x00: strcpy(str,"CD CONTROL ERROR"); break; case 0x02: strcpy(str,"POWER CALIBRATION AREA IS FULL"); break; case 0x03: strcpy(str,"POWER CALIBRATION AREA ERROR"); break; case 0x04: strcpy(str,"PROGRAM MEMORY AREA UPDATE FAILURE"); break; case 0x05: strcpy(str,"PROGRAM MEMORY AREA IS FULL"); break; default: strcpy(str,"CD CONTROL ERROR"); break; } break; } break; case 0x4: switch (ASC(err)) { case 0x00: strcpy(str,"CLEANING REQUESTED"); break; /* ASCQ = 0x17 */ case 0x05: strcpy(str,"LOGICAL UNIT DOES NOT RESPOND TO SELECTION"); break; /* ASCQ = 0x00 */ case 0x08: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOGICAL UNIT COMMUNICATION FAILURE"); break; case 0x01: strcpy(str,"LOGICAL UNIT COMMUNICATION TIMEOUT"); break; case 0x02: strcpy(str,"LOGICAL UNIT COMMUNICATION PARITY ERROR"); break; case 0x03: strcpy(str,"LOGICAL UNIT COMMUNICATION CRC ERROR (ULTRA-DMA/32)"); break; } break; case 0x09: switch (ASCQ(err)) { case 0x00: strcpy(str,"TRACK FOLLOWING ERROR"); break; case 0x01: strcpy(str,"TRACKING SERVO FAILURE"); break; case 0x02: strcpy(str,"FOCUS SERVO FAILURE"); break; case 0x03: strcpy(str,"SPINDLE SERVO FAILURE"); break; case 0x04: strcpy(str,"HEAD SELECT FAULT"); break; default: strcpy(str,"TRACKING ERROR"); break; } break; case 0x15: switch (ASCQ(err)) { case 0x00: strcpy(str,"RANDOM POSITIONING ERROR"); break; case 0x01: strcpy(str,"MECHANICAL POSITIONING ERROR"); break; default: strcpy(str,"RANDOM POSITIONING ERROR"); break; } break; case 0x1B: strcpy(str,"SYNCHRONOUS DATA TRANSFER ERROR"); break; /* ASCQ = 0x00 */ case 0x3B: strcpy(str,"MECHANICAL POSITIONING OR CHANGER ERROR"); break; /* ASCQ = 0x16 */ case 0x3E: switch (ASCQ(err)) { case 0x01: strcpy(str,"LOGICAL UNIT FAILURE"); break; case 0x02: strcpy(str,"TIMEOUT ON LOGICAL UNIT"); break; default: strcpy(str,"LOGICAL UNIT FAILURE"); break; } break; case 0x40: strcpy(str,"DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)"); break; case 0x44: strcpy(str,"INTERNAL TARGET FAILURE"); break; case 0x46: strcpy(str,"UNSUCCESSFUL SOFT RESET"); break; case 0x47: strcpy(str,"SCSI PARITY ERROR"); break; case 0x4A: strcpy(str,"COMMAND PHASE ERROR"); break; case 0x4B: strcpy(str,"DATA PHASE ERROR"); break; case 0x4C: strcpy(str,"LOGICAL UNIT FAILED SELF-CONFIGURATION"); break; case 0x53: strcpy(str,"MEDIA LOAD OR EJECT FAILED"); break; case 0x65: strcpy(str,"VOLTAGE FAULT"); break; } break; case 0x5: switch (ASC(err)) { case 0x07: strcpy(str,"MULTIPLE PERIPHERAL DEVICES SELECTED"); break; /* ASCQ = 0x00 */ case 0x1A: strcpy(str,"PARAMETER LIST LENGTH ERROR"); break; /* ASCQ = 0x00 */ case 0x20: strcpy(str,"INVALID COMMAND OPERATION CODE"); break; /* ASCQ = 0x00 */ case 0x21: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOGICAL BLOCK ADDRESS OUT OF RANGE"); break; case 0x01: strcpy(str,"INVALID ELEMENT ADDRESS"); break; case 0x02: strcpy(str,"INVALID ADDRESS FOR WRITE"); break; default: strcpy(str,"LOGICAL BLOCK ADDRESS OUT OF RANGE"); break; } break; case 0x24: strcpy(str,"INVALID FIELD IN CDB"); break; case 0x25: strcpy(str,"LOGICAL UNIT NOT SUPPORTED"); break; case 0x26: switch (ASCQ(err)) { case 0x00: strcpy(str,"INVALID FIELD IN PARAMETER LIST"); break; case 0x01: strcpy(str,"PARAMETER NOT SUPPORTED"); break; case 0x02: strcpy(str,"PARAMETER VALUE INVALID"); break; case 0x03: strcpy(str,"THRESHOLD PARAMETERS NOT SUPPORTED"); break; } break; case 0x2B: strcpy(str,"COPY CANNOT EXECUTE SINCE INITIATOR CANNOT DISCONNECT"); break; /* ASCQ = 0x00 */ case 0x2C: switch (ASCQ(err)) { case 0x00: strcpy(str,"COMMAND SEQUENCE ERROR"); break; case 0x03: strcpy(str,"CURRENT PROGRAM AREA IS NOT EMPTY"); break; case 0x04: strcpy(str,"CURRENT PROGRAM AREA IS EMPTY"); break; } break; case 0x30: switch (ASCQ(err)) { case 0x00: strcpy(str,"INCOMPATIBLE MEDIUM INSTALLED"); break; case 0x01: strcpy(str,"CANNOT READ MEDIUM - UNKNOWN FORMAT"); break; case 0x02: strcpy(str,"CANNOT READ MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x03: strcpy(str,"CLEANING CARTRIDGE INSTALLED"); break; case 0x04: strcpy(str,"CANNOT WRITE MEDIUM - UNKNOWN FORMAT"); break; case 0x05: strcpy(str,"CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT"); break; case 0x06: strcpy(str,"CANNOT FORMAT MEDIUM - INCOMPATIBLE MEDIUM"); break; case 0x07: strcpy(str,"CLEANING FAILURE"); break; case 0x08: strcpy(str,"CANNOT WRITE - APPLICATION CODE MISMATCH"); break; case 0x09: strcpy(str,"CURRENT SESSION NOT FIXATED FOR APPEND"); break; case 0x10: strcpy(str,"MEDIUM NOT FORMATTED"); break; } break; case 0x39: strcpy(str,"SAVING PARAMETERS NOT SUPPORTED"); break; /* ASCQ = 0x00 */ case 0x3D: strcpy(str,"INVALID BITS IN IDENTIFY MESSAGE"); break; /* ASCQ = 0x00 */ case 0x43: strcpy(str,"MESSAGE ERROR"); break; /* ASCQ = 0x00 */ case 0x53: strcpy(str,"MEDIUM REMOVAL PREVENTED"); break; /* ASCQ = 0x02 */ case 0x64: switch (ASCQ(err)) { case 0x00: strcpy(str,"ILLEGAL MODE FOR THIS TRACK"); break; case 0x01: strcpy(str,"INVALID PACKET SIZE"); break; } break; case 0x6F: switch (ASCQ(err)) { case 0x00: strcpy(str,"COPY PROTECTION KEY EXCHANGE FAILURE - AUTHENTICATION FAILURE"); break; case 0x01: strcpy(str,"COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT PRESENT"); break; case 0x02: strcpy(str,"COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED"); break; case 0x03: strcpy(str,"READ OF SCRAMBLED SECTOR WITHOUT AUTHENTICATION"); break; case 0x04: strcpy(str,"MEDIA REGION CODE IS MISMATCHED TO LOGICAL UNIT REGION"); break; case 0x05: strcpy(str,"LOGICAL UNIT REGION MUST BE PERMANENT/REGION RESET COUNT ERROR"); break; } break; case 0x72: switch (ASCQ(err)) { case 0x03: strcpy(str,"SESSION FIXATION ERROR . INCOMPLETE TRACK IN SESSION"); break; case 0x04: strcpy(str,"EMPTY OR PARTIALLY WRITTEN RESERVED TRACK"); break; case 0x05: strcpy(str,"NO MORE TRACK RESERVATIONS ALLOWED"); break; } break; } break; case 0x6: switch (ASC(err)) { case 0x28: switch (ASCQ(err)) { case 0x00: strcpy(str,"NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED"); break; case 0x01: strcpy(str,"IMPORT OR EXPORT ELEMENT ACCESSED"); break; } break; case 0x29: switch (ASCQ(err)) { case 0x00: strcpy(str,"POWER ON, RESET, OR BUS DEVICE RESET OCCURRED"); break; case 0x01: strcpy(str,"POWER ON OCCURRED"); break; case 0x02: strcpy(str,"BUS RESET OCCURRED"); break; case 0x03: strcpy(str,"BUS DEVICE RESET FUNCTION OCCURRED"); break; case 0x04: strcpy(str,"DEVICE INTERNAL RESET"); break; } break; case 0x2A: switch (ASCQ(err)) { case 0x00: strcpy(str,"PARAMETERS CHANGED"); break; case 0x01: strcpy(str,"MODE PARAMETERS CHANGED"); break; case 0x02: strcpy(str,"LOG PARAMETERS CHANGED"); break; case 0x03: strcpy(str,"RESERVATIONS PREEMPTED"); break; } break; case 0x2E: strcpy(str,"INSUFFICIENT TIME FOR OPERATION"); break; case 0x2F: strcpy(str,"COMMANDS CLEARED BY ANOTHER INITIATOR"); break; case 0x3B: switch (ASCQ(err)) { case 0x0D: strcpy(str,"MEDIUM DESTINATION ELEMENT FULL"); break; case 0x0E: strcpy(str,"MEDIUM SOURCE ELEMENT EMPTY"); break; case 0x0F: strcpy(str,"END OF MEDIUM REACHED"); break; case 0x11: strcpy(str,"MEDIUM MAGAZINE NOT ACCESSIBLE"); break; case 0x12: strcpy(str,"MEDIUM MAGAZINE REMOVED"); break; case 0x13: strcpy(str,"MEDIUM MAGAZINE INSERTED"); break; case 0x14: strcpy(str,"MEDIUM MAGAZINE LOCKED"); break; case 0x15: strcpy(str,"MEDIUM MAGAZINE UNLOCKED"); break; } break; case 0x3F: switch (ASCQ(err)) { case 0x00: strcpy(str,"TARGET OPERATING CONDITIONS HAVE CHANGED"); break; case 0x01: strcpy(str,"MICROCODE HAS BEEN CHANGED"); break; case 0x02: strcpy(str,"CHANGED OPERATING DEFINITION"); break; case 0x03: strcpy(str,"INQUIRY DATA HAS CHANGED"); break; } break; case 0x5A: switch (ASCQ(err)) { case 0x00: strcpy(str,"OPERATOR REQUEST OR STATE CHANGE INPUT"); break; case 0x01: strcpy(str,"OPERATOR MEDIUM REMOVAL REQUEST"); break; case 0x02: strcpy(str,"OPERATOR SELECTED WRITE PROTECT"); break; case 0x03: strcpy(str,"OPERATOR SELECTED WRITE PERMIT"); break; } break; case 0x5B: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOG EXCEPTION"); break; case 0x01: strcpy(str,"THRESHOLD CONDITION MET"); break; case 0x02: strcpy(str,"LOG COUNTER AT MAXIMUM"); break; case 0x03: strcpy(str,"LOG LIST CODES EXHAUSTED"); break; } break; case 0x5E: switch (ASCQ(err)) { case 0x00: strcpy(str,"LOW POWER CONDITION ON"); break; case 0x01: strcpy(str,"IDLE CONDITION ACTIVATED BY TIMER"); break; case 0x02: strcpy(str,"STANDBY CONDITION ACTIVATED BY TIMER"); break; case 0x03: strcpy(str,"IDLE CONDITION ACTIVATED BY COMMAND"); break; case 0x04: strcpy(str,"STANDBY CONDITION ACTIVATED BY COMMAND"); break; } break; } break; case 0x7: switch (ASC(err)) { case 0x27: switch (ASCQ(err)) { case 0x00: strcpy(str,"WRITE PROTECTED"); break; case 0x01: strcpy(str,"HARDWARE WRITE PROTECTED"); break; case 0x02: strcpy(str,"LOGICAL UNIT SOFTWARE WRITE PROTECTED"); break; case 0x03: strcpy(str,"ASSOCIATED WRITE PROTECT"); break; case 0x04: strcpy(str,"PERSISTENT WRITE PROTECT"); break; case 0x05: strcpy(str,"PERMANENT WRITE PROTECT"); break; case 0x06: strcpy(str,"CONDITIONAL WRITE PROTECT"); break; default: strcpy(str,"WRITE PROTECTED"); break; } break; } break; case 0x8: strcpy(str,"BLANK CHECK"); break; case 0xB: switch (ASC(err)) { case 0x00: strcpy(str,"I/O PROCESS TERMINATED"); break; /* ASCQ = 06 */ case 0x11: strcpy(str,"READ ERROR - LOSS OF STREAMING"); break; /* ASCQ = 11 */ case 0x45: strcpy(str,"SELECT OR RESELECT FAILURE"); break; /* ASCQ = 00 */ case 0x48: strcpy(str,"INITIATOR DETECTED ERROR MESSAGE RECEIVED"); break; /* ASCQ = 00 */ case 0x49: strcpy(str,"INVALID MESSAGE ERROR"); break; /* ASCQ = 00 */ case 0x4D: strcpy(str,"TAGGED OVERLAPPED COMMANDS (NN = QUEUE TAG)"); break; /* ASCQ = xx */ } break; } return 0; } qpxtool-0.7.1_002/lib/qpxtransport/threads.cpp0000644000175000001440000001776511243601636020571 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include "threads.h" #include /* * sync_pipe_add_arg & protect_arg functions from ethereal * * Ethereal - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs * */ /* Append an arg (realloc) to an argc/argv array */ /* (add a string pointer to a NULL-terminated array of string pointers) */ char ** add_arg(char **args, int *argc, const char *arg) { /* Grow the array; "*argc" currently contains the number of string pointers, *not* counting the NULL pointer at the end, so we have to add 2 in order to get the new size of the array, including the new pointer and the terminating NULL pointer. */ args = (char**) realloc( (void*) args, (*argc + 2) * sizeof (char *)); /* Stuff the pointer into the penultimate element of the array, which is the one at the index specified by "*argc". */ args[*argc] = (char*) arg; /* Now bump the count. */ (*argc)++; /* We overwrite the NULL pointer; put it back right after the element we added. */ args[*argc] = NULL; return args; } #ifdef _WIN32 /* Quote the argument element if necessary, so that it will get * reconstructed correctly in the C runtime startup code. Note that * the unquoting algorithm in the C runtime is really weird, and * rather different than what Unix shells do. See stdargv.c in the C * runtime sources (in the Platform SDK, in src/crt). * * Stolen from GLib's protect_argv(), an internal routine that quotes * string in an argument list so that they arguments will be handled * correctly in the command-line string passed to CreateProcess() * if that string is constructed by gluing those strings together. */ char * protect_arg (const char *argv) { char *new_arg; const char *p = argv; char *q; int len = 0; bool need_dblquotes = FALSE; while (*p) { if (*p == ' ' || *p == '\t') need_dblquotes = TRUE; else if (*p == '"') len++; else if (*p == '\\') { const char *pp = p; while (*pp && *pp == '\\') pp++; if (*pp == '"') len++; } len++; p++; } q = new_arg = (char*) malloc (len + need_dblquotes*2 + 1); p = argv; if (need_dblquotes) *q++ = '"'; while (*p) { if (*p == '"') *q++ = '\\'; else if (*p == '\\') { const char *pp = p; while (*pp && *pp == '\\') pp++; if (*pp == '"') *q++ = '\\'; } *q++ = *p; p++; } if (need_dblquotes) *q++ = '"'; *q++ = '\0'; return new_arg; } void string_append_c(char* args, char c) { int slen = strlen(args); args[slen] = c; args[slen+1] = 0; } void string_append(char* args, char* arg) { int slen = strlen(args); int alen = strlen(arg); memcpy(args+slen, arg, alen); args[slen+alen] = 0; } int close(HANDLE h) { CloseHandle(h); } #endif #if defined (__unix) || defined (__unix__) Mutex::Mutex() { pthread_mutex_init(&m, NULL); } Mutex::~Mutex() { pthread_mutex_destroy(&m); } void Mutex::lock() { // printf("%p mutex.lock()\n", this); pthread_mutex_lock(&m); } void Mutex::unlock() { // printf("%p mutex.unlock()\n", this); pthread_mutex_unlock(&m); } #elif defined (_WIN32) Mutex::Mutex() { InitializeCriticalSection(&m); } Mutex::~Mutex() { DeleteCriticalSection(&m); } void Mutex::lock() { EnterCriticalSection(&m); } void Mutex::unlock() { LeaveCriticalSection(&m); } int WIN32_thread_create(HANDLE *tid, void *attr, void*(*func)(void*), void* arg) { *tid = CreateThread(NULL,0, (DWORD WINAPI (*)(void*)) func,arg,0,NULL); if (!(*tid)) return 1; else return 0; }; int WIN32_thread_join(HANDLE& tid, void **ret) { DWORD tret; if (WaitForSingleObject(tid, INFINITE) == WAIT_FAILED) return -1; if (ret) { if (!GetExitCodeThread(tid, &tret)) return -1; *ret = (void*) tret; } CloseHandle(tid); tid = NULL; return 0; }; #endif //int createchild(char **argv, pipe_t &rdpipe, bool r, pipe_t &wrpipe, bool w) int createChildProcess(char **argv, pipe_t *rdpipe, pipe_t *wrpipe) { printf("createchild(): pipes: %p, %p\n", rdpipe, wrpipe); #if defined (__unix) || defined (__unix__) int cpid; if (rdpipe) { if (pipe(*rdpipe)) { printf("Can't create pipe for stdout/stderr\n"); return -1; } printf("rdpipe = %d, %d\n", (*rdpipe)[0], (*rdpipe)[1]); } if (wrpipe) { if (pipe(*wrpipe)) { printf("Can't create pipe for stdout/stderr\n"); if (rdpipe) { close(*rdpipe[0]); close(*rdpipe[1]); } return -1; } printf("wrpipe = %d, %d\n", (*wrpipe)[0], (*wrpipe)[1]); } if ((cpid = fork()) == -1) { printf("Can't fork()\n"); if (rdpipe) { close((*rdpipe)[0]); close((*rdpipe)[1]); } if (wrpipe) { close((*wrpipe)[0]); close((*wrpipe)[1]); } return -1; } if (!cpid) { printf("child: fork() ok:)\n"); if (rdpipe) { close((*rdpipe)[0]); // unused read end close(STDOUT_FILENO); close(STDERR_FILENO); dup2((*rdpipe)[1], STDOUT_FILENO); dup2((*rdpipe)[1], STDERR_FILENO); } if (wrpipe) { close((*wrpipe)[1]); // unused write end close(STDIN_FILENO); dup2((*wrpipe)[0], STDIN_FILENO); } printf("starting %s...\n", argv[0]); execvp(argv[0], argv); printf("Can't exec() %s: %s\n", argv[0], strerror(errno)); _exit(0); } else { if (rdpipe) close((*rdpipe)[1]); // unused write end if (wrpipe) close((*wrpipe)[0]); // unused read end } return cpid; #elif defined (_WIN32) char args[1024] = ""; char *quoted_arg; SECURITY_ATTRIBUTES sa; STARTUPINFO si; PROCESS_INFORMATION pi; HANDLE ipiper; HANDLE ipipew; HANDLE opiper; HANDLE opipew; sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; if (rdpipe) { if (!CreatePipe(&ipiper, &ipipew, &sa, 5120)) { printf("Can't create pipe for stdout/stderr\n"); return -1; } // printf("rdpipeH = %d, %d\n", (int)ipiper, (int)ipipew); (*rdpipe)[0] = _open_osfhandle((long)ipiper, _O_BINARY); (*rdpipe)[1] = _open_osfhandle((long)ipipew, _O_BINARY); printf("rdpipeF = %d, %d\n", (*rdpipe)[0], (*rdpipe)[1]); } if (wrpipe) { if (!CreatePipe(&opiper, &opipew, &sa, 5120)) { if (rdpipe) { close((*rdpipe)[0]); close((*rdpipe)[1]); } printf("Can't create pipe for stdin\n"); return -1; } // printf("wrpipeH = %d, %d\n", (int)opipew, (int)opipew); (*wrpipe)[0] = _open_osfhandle((long)opiper, _O_BINARY); (*wrpipe)[1] = _open_osfhandle((long)opipew, _O_BINARY); printf("wrpipeF = %d, %d\n", (*wrpipe)[0], (*wrpipe)[1]); } memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; /* this hides the console window */ if (wrpipe) si.hStdInput = opiper; if (rdpipe) { si.hStdOutput = ipipew; si.hStdError = ipipew; } for(int i=0; argv[i] != 0; i++) { if(i != 0) string_append_c(args, ' '); // don't prepend a space before the path!!! quoted_arg = protect_arg(argv[i]); string_append(args, quoted_arg); free(quoted_arg); } if(!CreateProcessA(NULL, args, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)) { if (rdpipe) { close((*rdpipe)[0]); close((*rdpipe)[1]); } if (wrpipe) { close((*wrpipe)[0]); close((*wrpipe)[1]); } errno = GetLastError(); printf("Can't CreateProcess():\n%s\nERR: [%d] %s\n", args, errno, strerror(errno)); return -1; } if (rdpipe) close((*rdpipe)[1]); if (wrpipe) close((*wrpipe)[0]); return (int) pi.hProcess; #endif } qpxtool-0.7.1_002/lib/qpxtransport/include/0000755000175000001440000000000011336720755020045 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxtransport/include/qpx_transport.h0000644000175000001440000002203511265027446023142 0ustar shultzusers// // This is part of dvd+rw-tools by Andy Polyakov // // Use-it-on-your-own-risk, GPL bless... // // For further details see http://fy.chalmers.se/~appro/linux/DVD+RW/ // // // modified to use with QPxTool http://qpxtool.sf.net (C) 2005-2009, Gennady "ShultZ" Kozlov // #include #ifndef __qpx_transport_h #define __qpx_transport_h #if defined(__unix) || defined(__unix__) extern long getmsecs(); #include #include #include #ifndef EMEDIUMTYPE #define EMEDIUMTYPE EINVAL #endif #ifndef ENOMEDIUM #define ENOMEDIUM ENODEV #endif //* #elif defined(_WIN32) #include #include #include #include #define ssize_t LONG_PTR #define off64_t __int64 #if !defined(__MINGW32__) #include "win32err.h" #endif #define poll(a,b,t) Sleep(t) #define getmsecs() GetTickCount() #include #define ENV_LOCALE ".OCP" //*/ #endif #define CREAM_ON_ERRNO_NAKED(s) \ switch ((s)[12]) \ { case 0x04: errno=EAGAIN; break; \ case 0x20: errno=ENODEV; break; \ case 0x21: if ((s)[13]==0) errno=ENOSPC; \ else errno=EINVAL; \ break; \ case 0x30: errno=EMEDIUMTYPE; break; \ case 0x3A: errno=ENOMEDIUM; break; \ } #define CREAM_ON_ERRNO(s) do { CREAM_ON_ERRNO_NAKED(s) } while(0) #define FATAL_START(er) (0x80|(er)) #define ERRCODE(s) ((((s)[2]&0x0F)<<16)|((s)[12]<<8)|((s)[13])) #define SK(errcode) (((errcode)>>16)&0xF) #define ASC(errcode) (((errcode)>>8)&0xFF) #define ASCQ(errcode) ((errcode)&0xFF) extern void sperror (const char *cmd, int err); //, Scsi_Command *scsi); class autofree { private: unsigned char *ptr; public: autofree(); ~autofree(); unsigned char *operator=(unsigned char *str) { return ptr=str; } operator unsigned char *() { return ptr; } }; #if defined(__linux) //#include #include //#include //#include //#include #include #if !defined(SG_FLAG_LUN_INHIBIT) # if defined(SG_FLAG_UNUSED_LUN_INHIBIT) # define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT # else # define SG_FLAG_LUN_INHIBIT 0 # endif #endif #ifndef CHECK_CONDITION #define CHECK_CONDITION 0x01 #endif typedef enum { NONE=CGC_DATA_NONE, // 3 READ=CGC_DATA_READ, // 2 WRITE=CGC_DATA_WRITE // 1 } Direction; #ifdef SG_IO static const int Dir_xlate [4] = { // should have been defined // private in USE_SG_IO scope, // but it appears to be too 0, // implementation-dependent... SG_DXFER_TO_DEV, // 1,CGC_DATA_WRITE SG_DXFER_FROM_DEV, // 2,CGC_DATA_READ SG_DXFER_NONE }; // 3,CGC_DATA_NONE class USE_SG_IO { private: int yes_or_no; public: USE_SG_IO(); ~USE_SG_IO(); operator int() const { return yes_or_no; } int operator[] (Direction dir) const { return Dir_xlate[dir]; } }; static const class USE_SG_IO use_sg_io; #endif class Scsi_Command { private: // long cmd_time; int fd,autoclose; char *filename; struct cdrom_generic_command cgc; union sense_union { struct request_sense s; unsigned char u[18]; } _sense; #ifdef SG_IO struct sg_io_hdr sg_io; #else struct { int cmd_len,timeout; } sg_io; #endif public: Scsi_Command(); Scsi_Command(int f); Scsi_Command(void*f); ~Scsi_Command(); int associate (const char *file,const struct stat *ref); unsigned char &operator[] (size_t i); unsigned char &operator()(size_t i); unsigned char *sense(); void timeout(int i); size_t residue(); int transport(Direction dir=NONE,void *buf=NULL,size_t sz=0); int umount(int f); int is_reload_needed (); }; #elif defined(__OpenBSD__) || defined(__NetBSD__) #include #include #include #include #include typedef off_t off64_t; #define stat64 stat #define fstat64 fstat #define open64 open #define pread64 pread #define pwrite64 pwrite #define lseek64 lseek typedef enum { NONE=0, READ=SCCMD_READ, WRITE=SCCMD_WRITE } Direction; class Scsi_Command { private: int fd,autoclose; char *filename; scsireq_t req; public: Scsi_Command(); Scsi_Command(int f); Scsi_Command(void*f); ~Scsi_Command(); int associate (const char *file,const struct stat *ref); unsigned char &operator[] (size_t i); unsigned char &operator()(size_t i); unsigned char *sense(); void timeout(int i); size_t residue(); int transport(Direction dir=NONE,void *buf=NULL,size_t sz=0); int umount(int f); int is_reload_needed (); }; #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #include #include #include #include #include #include #include #include typedef off_t off64_t; #define stat64 stat #define fstat64 fstat #define open64 open #define pread64 pread #define pwrite64 pwrite #define lseek64 lseek #define ioctl_fd (((struct cam_device *)ioctl_handle)->fd) typedef enum { NONE=CAM_DIR_NONE, READ=CAM_DIR_IN, WRITE=CAM_DIR_OUT } Direction; class Scsi_Command { private: int fd,autoclose; char *filename; struct cam_device *cam; union ccb ccb; public: Scsi_Command(); Scsi_Command(int f); Scsi_Command(void *f); ~Scsi_Command(); int associate (const char *file,const struct stat *ref); unsigned char &operator[] (size_t i); unsigned char &operator()(size_t i); unsigned char *sense(); void timeout(int i); size_t residue(); int transport(Direction dir=NONE,void *buf=NULL,size_t sz=0); int umount(int f); #define RELOAD_NEVER_NEEDED // according to Matthew Dillon int is_reload_needed (); }; //* #elif defined(_WIN32) #if defined(__MINGW32__) #include #define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,6,METHOD_BUFFERED,FILE_ANY_ACCESS) #define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,7,METHOD_BUFFERED,FILE_ANY_ACCESS) #define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,8,METHOD_BUFFERED,FILE_ANY_ACCESS) #else #include #include #endif typedef enum { NONE=SCSI_IOCTL_DATA_UNSPECIFIED, READ=SCSI_IOCTL_DATA_IN, WRITE=SCSI_IOCTL_DATA_OUT } Direction; typedef struct { SCSI_PASS_THROUGH_DIRECT spt; unsigned char sense[18]; } SPKG; class Scsi_Command { private: HANDLE fd; int autoclose; char *filename; SPKG p; public: Scsi_Command(); Scsi_Command(void*f); ~Scsi_Command(); int associate (const char *file,const struct stat *ref=NULL); unsigned char &operator[] (size_t i); unsigned char &operator()(size_t i); unsigned char *sense(); void timeout(int i); size_t residue() { return 0; } // bogus int transport(Direction dir=NONE,void *buf=NULL,size_t sz=0); int umount (int f=-1); #define RELOAD_NEVER_NEEDED int is_reload_needed (); }; //*/ #elif defined (__APPLE__) && defined (__MACH__) // // This code targets Darwin Kernel Version 6.x, a.k.a. Mac OS X v10.2, // or later, but upon initial release was tested only on PowerPC under // Darwin Kernel Version 8.7.0, a.k.a. Mac OS X v10.4.7 (Tiger). // typedef off_t off64_t; #define stat64 stat #define fstat64 fstat #define open64 open #define pread64 pread #define pwrite64 pwrite #define lseek64 lseek #include #include #include #include #include static int iokit_err (IOReturn ioret,SCSITaskStatus stat, const unsigned char *sense); // NB! ellipsis is GCC-ism, but conveniently Apple ships only gcc:-) #define MMCIO(h,func,...) ({ \ MMCDeviceInterface **di = (MMCDeviceInterface **)h;\ SCSITaskStatus stat; \ union { \ SCSI_Sense_Data s; \ unsigned char u[18]; \ } sense; \ IOReturn ioret; \ memset (&sense,0,sizeof(sense)); \ ioret = (*di)->func(di,__VA_ARGS__,&stat,&sense.s); \ iokit_err (ioret,stat,sense.u); }) typedef enum { NONE=kSCSIDataTransfer_NoDataTransfer, READ=kSCSIDataTransfer_FromTargetToInitiator, WRITE=kSCSIDataTransfer_FromInitiatorToTarget } Direction; class Scsi_Command { private: int autoclose,_timeout; char *filename; io_object_t scsiob; IOCFPlugInInterface **plugin; MMCDeviceInterface **mmcdif; SCSITaskDeviceInterface **taskif; unsigned char cdb[16]; union { SCSI_Sense_Data s; unsigned char u[18]; } _sense; size_t cdblen,resid; public: Scsi_Command(); Scsi_Command(void *f); ~Scsi_Command(); int associate (const char *file,const struct stat *ref=NULL); unsigned char &operator[] (size_t i); unsigned char &operator() (size_t i); unsigned char *sense(); void timeout(int i); size_t residue(); int transport(Direction dir=NONE,void *buf=NULL,size_t sz=0); int umount(int f=-1); #define RELOAD_NEVER_NEEDED int is_reload_needed(int not_used); }; #else #error "Unsupported OS" #undef ERRCODE #undef CREAM_ON_ERRNO #undef CREAM_ON_ERRNO_NAKED #endif #endif qpxtool-0.7.1_002/lib/qpxtransport/include/qpx_opcodes.h0000644000175000001440000001035011325562502022531 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #ifndef __qpxtool_opcodes_h #define __qpxtool_opcodes_h /* const char SPC_ = 0x; const char MMC_ = 0x; */ /* SCSI primary commands */ const char SPC_TEST_UNIT_READY = 0x00; const char SPC_REQUEST_SENSE = 0x03; const char SPC_INQUIRY = 0x12; const char SPC_RESERVE_6 = 0x16; const char SPC_RELEASE_6 = 0x17; const char SPC_RECEIVE_DIAGNOSTIC_RESULTS = 0x1C; const char SPC_SEND_DIAGNOSTIC = 0x1D; const char SPC_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E; const char SPC_WRITE_BUFFER = 0x3B; const char SPC_READ_BUFFER = 0x3C; const char SPC_LOG_SELECT = 0x4C; const char SPC_LOG_SENSE = 0x4D; const char SPC_RESERVE_10 = 0x56; const char SPC_RELEASE_10 = 0x57; const char SPC_PERSISTENT_RESERVE_IN = 0x5E; const char SPC_PERSISTENT_RESERVE_OUT = 0x5F; const char SPC_EXTENDED_COPY = 0x83; const char SPC_RECEIVE_COPY_RESULTS = 0x84; const char SPC_ACCESS_CONTROL_IN = 0x86; const char SPC_ACCESS_CONTROL_OUT = 0x87; const char SPC_READ_ATTRIBUTE = 0x8C; const char SPC_WRITE_ATTRIBUTE = 0x8D; const char SPC_REPORT_LUNS = 0xA0; const char SPC_SECURITY_PROTOCOL_IN = 0xA2; const char SPC_SECURITY_PROTOCOL_OUT = 0xB5; const char SMC_MOVE_MEDIUM_ATTACHED = 0xA7; const char SMC_READ_ELEMENT_STATUS_ATTACHED = 0xB4; /* SCSI controller commands */ const char SCC_SPARE_IN = 0xBC; const char SCC_SPARE_OUT = 0xBD; const char SCC_VOLUME_SET_IN = 0xBE; const char SCC_VOLUME_SET_OUT = 0xBF; /* SCSI multimedia commands */ const char MMC_FORMAT_UNIT = 0x04; const char MMC_MODE_SELECT_6 = 0x15; const char MMC_MODE_SENSE_6 = 0x1A; const char MMC_START_STOP_UNIT = 0x1B; const char MMC_READ_FORMAT_CAPACITIES = 0x23; const char SBC_READ_CAPACITY = 0x25; const char MMC_READ = 0x28; const char MMC_WRITE = 0x2A; const char MMC_SEEK = 0x2B; const char MMC_WRITE_AND_VERIFY = 0x2E; const char MMC_VERIFY = 0x2F; const char MMC_SYNC_CACHE = 0x35; const char MMC_READ_SUB_CHANNEL = 0x42; const char MMC_READ_TOC_PMA_ATIP = 0x43; const char MMC_READ_HEADER = 0x44; const char MMC_PLAY_AUDIO = 0x45; const char MMC_GET_CONFIGURATION = 0x46; const char MMC_PLAY_AUDIO_MSF = 0x47; const char MMC_GET_EVENT_STATUS_NOTIFICATION = 0x4A; const char MMC_PAUSE_RESUME = 0x4B; const char MMC_STOP_PLAY_SCAN = 0x4E; const char MMC_READ_DISC_INFORMATION = 0x51; const char MMC_READ_TRACK_INFORMATION = 0x52; const char MMC_RESERVE_TRACK = 0x53; const char MMC_SEND_OPC_INFORMATION = 0x54; const char MMC_MODE_SELECT_10 = 0x55; const char MMC_REPAIR_TRACK = 0x58; const char MMC_READ_MASTER_CUE = 0x59; const char MMC_MODE_SENSE_10 = 0x5A; const char MMC_CLOSE_TRACK_SESSION = 0x5B; const char MMC_READ_BUFFER_CAPACITY = 0x5C; const char MMC_SEND_CUE_SHEET = 0x5D; const char MMC_BLANK = 0xA1; const char MMC_SEND_EVENT = 0xA2; const char MMC_SEND_KEY = 0xA3; const char MMC_REPORT_KEY = 0xA4; const char MMC_PLAY_AUDIO_12 = 0xA5; const char MMC_LOAD_UNLOAD = 0xA6; const char MMC_SET_READ_AHEAD = 0xA7; const char MMC_READ_DVD = 0xA8; const char MMC_GET_PERFORMANCE = 0xAC; const char MMC_READ_DVD_STRUCTURE = 0xAD; const char MMC_SET_STREAMING = 0xB6; const char MMC_READ_CD_MSF = 0xB9; const char MMC_SCAN = 0xBA; const char MMC_SET_SPEED = 0xBB; const char MMC_PLAY_CD = 0xBC; const char MMC_MECHANISM_STATUS = 0xBD; const char MMC_READ_CD = 0xBE; const char PLEXTOR_GET_AUTH = 0xD4; const char PLEXTOR_SEND_AUTH = 0xD5; //const char = 0xD8; const char PLEXTOR_PLEXERASER = 0xE3; const char PLEXTOR_AS_RD = 0xE4; const char PLEXTOR_AS_WR = 0xE5; const char SBC_FLUSH_CACHE = 0xE7; const char PLEXTOR_MODE = 0xE9; const char PLEXTOR_QCHECK = 0xEA; const char PLEXTOR_PREC_SPD = 0xEB; const char PLEXTOR_MODE2 = 0xED; const char PLEXTOR_EEPROM_READ = 0xF1; const char PLEXTOR_SCAN_TA_FETE = 0xF3; const char PLEXTOR_FETE_READOUT = 0xF5; #endif // __qpxtool_opcodes_h qpxtool-0.7.1_002/lib/qpxtransport/include/common_functions.h0000644000175000001440000001451111276263437023602 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #ifndef __common_functions_h #define __common_functions_h //#warning "COMMON_FUNCTIONS_H" #include #if defined(__unix) || defined(__unix__) //#warning "UNIX" #if defined(__APPLE__) && defined(__MACH__) #include #elif defined(__linux) #include #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #endif #include #elif defined(_WIN32) #include #include #ifndef _SOCKLEN_T typedef int socklen_t; #define EADDRINUSE WSAEADDRINUSE #define ECONNABORTED WSAECONNABORTED #define SHUT_RD SD_RECEIVE #define SHUT_WR SD_SEND #define SHUT_RDWR SD_BOTH #endif #endif typedef struct{ int m; int s; int f; } msf; typedef struct{ int h; int m; int s; } hms; extern int64_t qpx_bswap64(char* c); extern int64_t qpx_bswap64(unsigned char* c); extern int64_t qpx_bswap64(int64_t c_); extern int64_t qpx_bswap64(uint64_t c_); extern uint64_t qpx_bswap64u(char* c); extern uint64_t qpx_bswap64u(unsigned char* c); extern uint64_t qpx_bswap64u(int64_t c_); extern uint64_t qpx_bswap64u(uint64_t c_); extern int32_t qpx_bswap32(char* c); extern int32_t qpx_bswap32(unsigned char* c); extern int32_t qpx_bswap32(int32_t c_); extern int32_t qpx_bswap32(uint32_t c_); extern uint32_t qpx_bswap32u(char* c); extern uint32_t qpx_bswap32u(unsigned char* c); extern uint32_t qpx_bswap32u(int32_t c_); extern uint32_t qpx_bswap32u(uint32_t c_); extern int16_t qpx_bswap16(char* c); extern int16_t qpx_bswap16(unsigned char* c); extern int16_t qpx_bswap16(int16_t c); extern int16_t qpx_bswap16(uint16_t c); extern uint16_t qpx_bswap16u(char* c); extern uint16_t qpx_bswap16u(unsigned char* c); extern uint16_t qpx_bswap16u(int16_t c); extern uint16_t qpx_bswap16u(uint16_t c); extern int64_t to64(char* c); extern int64_t to64(unsigned char* c); extern int64_t to64(int64_t c_); extern int64_t to64(uint64_t c_); extern uint64_t to64u(char* c); extern uint64_t to64u(unsigned char* c); extern uint64_t to64u(int64_t c_); extern uint64_t to64u(uint64_t c_); extern int32_t to32(char* c); extern int32_t to32(unsigned char* c); extern int32_t to32(int32_t c_); extern int32_t to32(uint32_t c_); extern uint32_t to32u(char* c); extern uint32_t to32u(unsigned char* c); extern uint32_t to32u(int32_t c_); extern uint32_t to32u(uint32_t c_); extern int16_t to16(char* c); extern int16_t to16(unsigned char* c); extern int16_t to16(int16_t c_); extern int16_t to16(uint16_t c_); extern uint16_t to16u(char* c); extern uint16_t to16u(unsigned char* c); extern uint16_t to16u(int16_t c_); extern uint16_t to16u(uint16_t c_); //#if qpx_BYTE_ORDER == qpx_BIG_ENDIAN #if BYTE_ORDER == BIG_ENDIAN //#warning "BIG ENDIAN" #define ntoh64(x) to64(x) #define ntoh64u(x) to64u(x) #define ntoh32(x) to32(x) #define ntoh32u(x) to32u(x) #define ntoh16(x) to16(x) #define ntoh16u(x) to16u(x) #define hton64(x) to64(x) #define hton64u(x) to64u(x) #define hton32(x) to32(x) #define hton32u(x) to32u(x) #define hton16(x) to16(x) #define hton16u(x) to16u(x) #define be2cpu64(x) hton64(x) #define be2cpu64u(x) hton64u(x) #define be2cpu32(x) hton32(x) #define be2cpu32u(x) hton32u(x) #define be2cpu16(x) hton16(x) #define be2cpu16u(x) hton16u(x) #define cpu2be64(x) hton64(x) #define cpu2be64u(x) hton64u(x) #define cpu2be32(x) hton32(x) #define cpu2be32u(x) hton32u(x) #define cpu2be16(x) hton16(x) #define cpu2be16u(x) hton16u(x) #define le2cpu64(x) qpx_bswap64(x) #define le2cpu64u(x) qpx_bswap64u(x) #define le2cpu32(x) qpx_bswap32(x) #define le2cpu32u(x) qpx_bswap32u(x) #define le2cpu16(x) qpx_bswap16(x) #define le2cpu16u(x) qpx_bswap16u(x) #define cpu2le64(x) qpx_bswap64(x) #define cpu2le64u(x) qpx_bswap64u(x) #define cpu2le32(x) qpx_bswap32(x) #define cpu2le32u(x) qpx_bswap32u(x) #define cpu2le16(x) qpx_bswap16(x) #define cpu2le16u(x) qpx_bswap16u(x) //#elif qpx_BYTE_ORDER == qpx_LITTLE_ENDIAN #elif BYTE_ORDER == LITTLE_ENDIAN //#warning "LITTLE ENDIAN" #define ntoh64(x) qpx_bswap64(x) #define ntoh64u(x) qpx_bswap64u(x) #define ntoh32(x) qpx_bswap32(x) #define ntoh32u(x) qpx_bswap32u(x) #define ntoh16(x) qpx_bswap16(x) #define ntoh16u(x) qpx_bswap16u(x) #define hton64(x) qpx_bswap64(x) #define hton64u(x) qpx_bswap64u(x) #define hton32(x) qpx_bswap32(x) #define hton32u(x) qpx_bswap32u(x) #define hton16(x) qpx_bswap16(x) #define hton16u(x) qpx_bswap16u(x) #define be2cpu64(x) qpx_bswap64(x) #define be2cpu64u(x) qpx_bswap64u(x) #define be2cpu32(x) qpx_bswap32(x) #define be2cpu32u(x) qpx_bswap32u(x) #define be2cpu16(x) qpx_bswap16(x) #define be2cpu16u(x) qpx_bswap16u(x) #define cpu2be64(x) qpx_bswap64(x) #define cpu2be64u(x) qpx_bswap64u(x) #define cpu2be32(x) qpx_bswap32(x) #define cpu2be32u(x) qpx_bswap32u(x) #define cpu2be16(x) qpx_bswap16(x) #define cpu2be16u(x) qpx_bswap16u(x) #define le2cpu64(x) to64(x) #define le2cpu64u(x) to64u(x) #define le2cpu32(x) to32(x) #define le2cpu32u(x) to32u(x) #define le2cpu16(x) to16(x) #define le2cpu16u(x) to16u(x) #define cpu2le64(x) to64(x) #define cpu2le64u(x) to64u(x) #define cpu2le32(x) to32(x) #define cpu2le32u(x) to32u(x) #define cpu2le16(x) to16(x) #define cpu2le16u(x) to16u(x) //#elif qpx_BYTE_ORDER == qpx_PDP_ENDIAN #elif BYTE_ORDER == PDP_ENDIAN #error "PDP endian not supported!" #endif extern void lba2msf(int lba, msf* time); extern int msf2lba(msf time); extern void int2hms(int intt, hms* time); #if defined (_WIN32) #include #define msleep(t) Sleep(t) #define sleep(t) Sleep((t) << 10) extern int inet_aton(const char *cp, struct in_addr *addr); #else #define msleep(t) usleep((t) << 10) extern int min(int a, int b); extern int max(int a, int b); #endif extern void remove_double_spaces(char* str); extern void remove_end_spaces(char* str); //extern void file_path_name(char* str, char* fpath, char* fname); //extern void file_suf_rm(char* str); extern int dispers(int m, int* arr, int l); #endif qpxtool-0.7.1_002/lib/qpxtransport/include/sense.h0000644000175000001440000000120611122707065021322 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #ifndef __sense_h #define __sense_h #define SK(errcode) (((errcode)>>16)&0xF) #define ASC(errcode) (((errcode)>>8)&0xFF) #define ASCQ(errcode) ((errcode)&0xFF) extern int sense2str(int err, char* str); #endif qpxtool-0.7.1_002/lib/qpxtransport/include/qpx_mmc.h0000644000175000001440000003135411334221160021650 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #ifndef __qpxtool_mmc_h #define __qpxtool_mmc_h //#include #include #include //#ifdef HAVE_LIMITS_H #include //#endif #include #include "qpx_mmc_defs.h" #define bufsz_dev 0x0000FF #define bufsz_rd 0x010000 #define bufsz_ATIP 0x000800 typedef struct{ int n; int session; int track_mode; int data_mode; int start; msf msf_start; int next_writable; msf msf_next; int free; msf msf_free; int packet_size; int size; msf msf_size; int last; msf msf_last; // int end; // msf msf_end; } trk; typedef struct{ int test; int idx; int32_t lba; int block,blocks; float speed_kb; float speed_x; int speed_h; int err_total; int err_max; int err_cur; int err_min; int err_m; int err_d; float err_avg; int pit; int land; float jmax; float jmin; float bmax; float bmin; long time; int nte, ote; int nfe, ofe; int ext; } block_data; #define DVD_KEY_SIZE 5 #define DVDCSS_KEY_CACHE 0 #define DVDCSS_METHOD_NONE 0 #define DVDCSS_METHOD_KEY 1 #define DVDCSS_METHOD_DISC 2 #define DVDCSS_METHOD_TITLE 3 #define DVDCSS_BLOCK_SIZE 2048 #define DVDCSS_NOFLAGS 0 #define DVDCSS_READ_DECRYPT (1 << 0) #define DVDCSS_SEEK_MPEG (1 << 0) #define DVDCSS_SEEK_KEY (1 << 1) typedef uint8_t dvd_key_t[DVD_KEY_SIZE]; typedef struct dvd_title_s { int i_startlb; dvd_key_t p_key; struct dvd_title_s *p_next; } dvd_title_t; typedef struct { bool asf; /* Authenication Success Flag */ uint8_t agid; /* Current Authenication Grant ID */ dvd_key_t BK; /* Current session key (Bus Key) */ dvd_key_t DK; /* This DVD disc's key */ uint8_t CK[2*DVD_KEY_SIZE]; dvd_key_t K1; dvd_key_t K2; dvd_key_t TK; /* Current title key */ dvd_title_s *p_titles; uint8_t protection; uint8_t regmask; int method; int pos; #if (DVDCSS_KEY_CACHE > 0) char psz_cachefile[PATH_MAX]; char *psz_block; #endif } dvdcss_t; #define MID_RAW_MAX 1024 enum mid_type_t { MID_type_NONE = 0, MID_type_CD = 1, MID_type_DVDp = 2, MID_type_DVDm = 4, MID_type_DVDRAM = 8 }; typedef struct { char MID[48]; // MediaID for DVD, manufacturer for CD mid_type_t MID_type; uint8_t ATIP[bufsz_ATIP]; int ATIP_size; uint16_t MID_size; unsigned char MID_raw[4+MID_RAW_MAX]; uint64_t type; // Media subtype int book_type; // Book type (DVD) int layers; // Layers num (!CD) int sectsize; int32_t capacity; // Recorded capacity in sectors msf capacity_msf; int32_t capacity_free; // Free sectors msf capacity_free_msf; int32_t capacity_total; // Total sectors msf capacity_total_msf; int spare_psa_total, spare_ssa_total, spare_psa_free, spare_ssa_free; int last_lead_out; int dstatus; // Empty/Apeendable/Complete int sstatus; int sessions; int tracks; int erasable; char writer[0x3F]; trk track[0xFF]; dvdcss_t dvdcss; } media_info; #define speed_tbl_size 64 #define STATUS_OPEN 0x0001 #define STATUS_MEDIA_PRESENT 0x0002 #define STATUS_LOCK 0x0004 typedef struct { uint8_t status; uint8_t event; int interval; int tests; int8_t spindown_idx; int16_t speed_idx; float speed_mult; int16_t speed_tbl[speed_tbl_size]; int32_t speed_tbl_kb[speed_tbl_size]; int16_t wr_speed_tbl[speed_tbl_size]; int32_t wr_speed_tbl_kb[speed_tbl_size]; float wr_speed_tbl_media[speed_tbl_size]; int32_t scan_speed_cd; int32_t scan_speed_dvd; int32_t read_speed_kb; int32_t read_speed_cd; int32_t read_speed_dvd; int32_t max_read_speed_kb; int32_t max_read_speed_cd; int32_t max_read_speed_dvd; int32_t max_write_speed_kb; int32_t max_write_speed_cd; int32_t max_write_speed_dvd; int32_t write_speed_kb; int32_t write_speed_cd; int32_t write_speed_dvd; } drive_parms; typedef struct { int32_t lba_s; int32_t spd_s; int32_t lba_e; int32_t spd_e; } perf_desc; typedef struct { int max; int min; int m; int d; } err; /* typedef struct { err* BLER; err* E11; err* E21; err* E31; err* E12; err* E22; err* E32; int tot[7]; int max[7]; float avg[7]; uint32_t color[7]; uint32_t colorl[7]; } _Exx; */ typedef struct { char type; char len; char state; char rd; char wr; char access; char eject; char load; char psaved; char pstate; char prd_cd; char prd_dvd; char pwr_cd; // char pwr_dvd; char paccess; char peject; char pload; } plex_silent; typedef struct { uint8_t number; uint8_t type; // 0x25 == -R, 0xA1 == +R char MID[12]; uint8_t crap2; uint8_t enabled; char counter[2]; uint8_t speed; uint8_t crap3[13]; } as_entry; typedef struct { uint8_t number[2]; uint8_t crap[30]; } as_data; typedef struct { char sizeb[2]; char crap1[4]; char dbcnt; char entry_size; as_entry entry[32]; as_data entry_data[32][7]; char state; int size; } plex_as; typedef struct { bool ok; uint16_t dn; hms cr, cw, dr, dw; } plex_life; typedef struct { char gigarec; // Current GigaRec value char gigarec_disc; // GigaRec value of inserted CD char powerec_state; // Current PoweRec state uint16_t powerec_spd; // Current PoweRec recomended speed char varirec_state_cd; // Current VariRec CD state char varirec_pwr_cd; // Current VariRec CD LaserPower char varirec_str_cd; // Current VariRec CD Strategy char varirec_state_dvd; // Current VariRec DVD state char varirec_pwr_dvd; // Current VariRec DVD LaserPower char varirec_str_dvd; // Current VariRec DVD Strategy char hcdr; // Hide CD-R State char securec; char securec_disc; char sss; // SingleSession State char spdread; // SpeedRead char testwrite_dvdplus; // Simulation on DVD+R(W) char plexeraser; // PlexEraser mode } plex_features; typedef struct { char amqr; char forcespeed; uint32_t tattoo_i; uint32_t tattoo_o; uint32_t tattoo_rows; } yamaha_features; typedef struct { char silent; char limit; } pio_quiet; typedef struct { uint8_t phase; uint8_t region; uint8_t ch_u; uint8_t ch_v; } rpc_state; class drive_info { public: drive_info(const char* _device); ~drive_info(); // bool isBusy(); // bool lock(); // bool unlock(); // void wait_free(); Scsi_Command cmd; int err; char* device; // device adress char ven[9]; // vendor string uint32_t ven_ID; // drive vendor ID char dev[17]; // model string uint32_t dev_ID; // model ID char fw[5]; // FirmWare char serial[17]; // drive serial# char TLA[5]; // TLA# - only rof Plextor PX-712, PX-716 uint16_t ver_id[8]; // int z; uint32_t buffer_size; // drive buffer size uint64_t capabilities; // common capabilities uint64_t rd_capabilities; // read capabilities uint64_t wr_capabilities; // write capabilities uint32_t wr_modes; // write modes uint32_t ven_features; // vendor-specific features uint32_t chk_features; // media check features uint32_t iface_id; str_if iface; uint8_t loader_id; short book_plus_r; short book_plus_rw; short book_plus_rdl; yamaha_features yamaha; plex_features plextor; plex_life life; plex_as astrategy; plex_silent plextor_silent; pio_quiet pioneer; media_info media; drive_parms parms; perf_desc perf; uint8_t* rd_buf; char mmc; rpc_state rpc; bool get_performance_fail; char silent; private: bool busy; }; static const int drive_info_size=sizeof(drive_info); extern int print_sense (int err); extern int print_opcode (uint8_t opcode); extern int scanbus(int vendor_mask=0); extern int inquiry(drive_info* drive); extern int isPlextor(drive_info* drive); extern int isPlextorLockPresent(drive_info* drive); extern int isYamaha(drive_info* drive); extern int isPioneer(drive_info* drive); extern int test_unit_ready(drive_info* drive); extern int wait_unit_ready(drive_info* drive, int secs, bool need_media=1); extern int check_burnfree(drive_info* drive); extern int check_write_modes(drive_info* drive); extern int reserve_track(drive_info* drive, uint32_t size); extern int close_track_session(drive_info* drive, int n, int cltype); extern int wait_fix(drive_info* drive, int secs); extern int request_sense(drive_info* drive, char add); extern int get_configuration(drive_info* drive, int feature_number, uint32_t* data_length, int* current, uint8_t ReqType = 0x02); extern void detect_iface(drive_info* drive); extern int write_buffer(drive_info* drive, uint8_t mode, uint8_t buff_id, uint32_t offs, uint32_t len); extern int read_buffer(drive_info* drive, uint8_t mode, uint8_t buff_id, uint32_t offs, uint32_t len); extern int test_dma_speed(drive_info* drive, long msecs = 250); extern int flush_cache(drive_info* drive, bool IMMED); extern int set_cache(drive_info* drive, bool rd, bool wr); extern int get_cache(drive_info* drive, bool *rd = NULL, bool *wr = NULL); // some DVD related functions extern int get_rpc_state(drive_info* drive); extern int read_disc_regions(drive_info* drive); extern int css_disckey( drive_info* drive); extern int css_title ( drive_info* drive, int32_t lba); //extern int css_titlekey( drive_info* drive, int lba, dvd_key_t p_title_key ); //extern int css_unscramble( dvd_key_t p_key, uint8_t *p_sec ); //extern void css_printkey (char *, uint8_t const * ); // device capabilities detection functions extern int get_profiles_list(drive_info* drive); extern int get_features_list(drive_info* drive); extern int get_mode_pages_list(drive_info* drive); extern void detect_capabilities(drive_info* drive); // media information functions extern int read_atip(drive_info* drive, int silent); extern int read_toc(drive_info* drive, int silent); extern int read_track_info(drive_info* drive, trk* track, uint32_t track_n); extern int get_track_list(drive_info* drive); extern int read_disc_information(drive_info* drive); extern int read_capacities(drive_info* drive); extern int read_disc_info(drive_info* drive, int len); extern int determine_cd_type(drive_info* drive); //extern int determine_cdrw_subtype(drive_info* drive); extern int read_mediaid_dvd(drive_info* drive); extern int read_mediaid_dvdram(drive_info* drive); extern int read_mediaid_dvdminus(drive_info* drive); extern int read_mediaid_dvdplus(drive_info* drive); extern int determine_disc_type(drive_info* drive); extern int mode_sense(drive_info* drive, int page, int page_control, int dest_len); extern int mode_select(drive_info* drive, int dest_len); // speed settings extern int get_spindown(drive_info* drive); extern int set_spindown(drive_info* drive); extern int get_performance(drive_info* drive, bool rw, uint8_t type); extern int get_write_speed_tbl(drive_info* drive); extern int set_streaming(drive_info* drive); extern int get_rw_speeds(drive_info* drive); extern int set_rw_speeds(drive_info* drive); extern int detect_speeds(drive_info *drive); // media change detection, media lock, load/eject extern int get_media_status(drive_info* drive); extern int start_stop(drive_info* drive, bool start); extern int load_eject(drive_info* drive, bool load, bool IMMED); extern int load_eject(drive_info* drive, bool IMMED); extern int get_lock(drive_info* drive); extern int set_lock(drive_info* drive); //extern void spinup(drive_info* drive); extern void spinup(drive_info* drive, uint8_t secs = 2); extern int seek(drive_info* drive, int32_t lba, uint8_t flags = 0); extern int play_audio_msf(drive_info* drive, msf beg, msf end); extern int play_audio(drive_info* drive, int32_t beg, short int len); extern int read_cd(drive_info* drive, uint8_t *data, int32_t lba, int sector_count, uint8_t flags, uint8_t FUA = 0); extern int read(drive_info* drive, uint8_t *data, int32_t lba, int sector_count, uint8_t FUA = 0); extern int read_one_ecc_block(drive_info* drive, uint8_t *data, int32_t lba); extern int get_drive_serial_number(drive_info* drive); extern int get_buffer_capacity(drive_info* drive); extern int get_wbuffer_capacity(drive_info* drive, uint32_t *btot, uint32_t *bfree); extern int read_writer_info(drive_info* drive); extern int read_dvd(drive_info* drive, uint8_t *data, int32_t lba, int sector_count, int flags = 0); extern int seek_dvd( drive_info* drive, int32_t lba, int flags ); extern int detect_mm_capabilities(drive_info* drive); //extern int detect_check_capabilities(drive_info* drive); //extern int convert_to_ID (drive_info* drive); extern int plextor_px755_do_auth(drive_info* dev); extern int plextor_px755_get_auth_code(drive_info* dev, unsigned char* auth_code); extern int plextor_px755_send_auth_code(drive_info* dev, unsigned char* auth_code); // extern int cmd_px755_clear_auth_status(drive_info* dev); extern int plextor_px755_calc_auth_code(drive_info* dev, unsigned char* auth_code); #endif qpxtool-0.7.1_002/lib/qpxtransport/include/threads.h0000644000175000001440000000323111243601563021637 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef DR_THREADS_H #define DR_THREADS_H #if defined (__unix) || defined (__unix__) #include #include class Mutex { public: Mutex(); ~Mutex(); void lock(); void unlock(); private: pthread_mutex_t m; }; #define thread_t pthread_t #define thread_create(id,attr,func,arg) pthread_create(id,attr,func,arg) #define thread_join(id,f) pthread_join(id, f) #define thread_exit(r) pthread_exit((void*)(r)) #elif defined (_WIN32) #include class Mutex { public: Mutex(); ~Mutex(); void lock(); void unlock(); private: CRITICAL_SECTION m; }; #define thread_t HANDLE extern int WIN32_thread_create(HANDLE *tid, void *attr, void*(*func)(void*), void* arg); extern int WIN32_thread_join(HANDLE& tid, void **ret); #define thread_create(id,attr,func,arg) WIN32_thread_create(id,attr,func,arg) #define thread_join(id,f) WIN32_thread_join(id, f) #define thread_exit(r) ExitThread(r) extern int close(HANDLE h); #endif typedef int pipe_t[2]; extern char **add_arg(char **args, int *argc, const char *arg); //extern int createchild(char **argv, pipe_t &rdpipe, bool r, pipe_t &wrpipe, bool w); extern int createChildProcess(char **argv, pipe_t *rdpipe = NULL, pipe_t *wrpipe = NULL); #endif // DR_THREADS_H qpxtool-0.7.1_002/lib/qpxtransport/include/qpx_mmc_defs.h0000644000175000001440000007006111336720545022664 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #ifndef __qpxtool_mmc_defs_h #define __qpxtool_mmc_defs_h //#ifdef HAVE_LIMITS_H #include //#endif #include #include #include "qpx_opcodes.h" typedef char str_vendor[9]; typedef char str_dev[16]; struct dev_desc { str_dev name; int len; }; typedef char str_if[16]; typedef char str_lo[64]; typedef char str8[8]; typedef char str_32[32]; typedef struct { uint8_t id; str_lo name; } desc8; typedef struct { uint16_t id; str_lo name; } desc16; typedef struct { uint32_t id; str_lo name; } desc32; typedef struct { uint64_t id; str_lo name; } desc64; typedef struct{ msf lin; str_lo name; } manuf; static const uint32_t rpc_phase_max=2; static const str8 rpc_phase[rpc_phase_max+1]={ "n/a", "RPC-I", "RPC-II" }; static const uint32_t spindowns=16; static const str8 spindown_tbl[spindowns+1]={ "vendor","125ms","250ms","500ms","1s","2s","4s","8s", "16s","32s","1min","2min","4min","8min","16min","32min", "unknown" }; static const uint32_t iface_id_max=8; static const str_if iface_list[iface_id_max+2]={ "Unspecified\0", "SCSI\0", "ATAPI\0", "IEEE1394-1995\0", "IEEE1394A\0", "Fibre Channel\0", "IEEE1394B\0", "Serial ATAPI\0", "USB (1.1/2.0)\0", "\0", }; static const str_if disc_status_list[4]= { "Blank", "Incomplete", "Finalized", "Random Access", // "[READ_DISK_INFO error]", }; static const str_if session_status_list[4]= { "Empty", "Incomplete", "Reserved", "Complete", // "[READ_DISK_INFO error]", }; static const str_lo loader_list[8]={ "Caddy/Slot", "Tray", "Pop-up", "", "Changer (individual discs)", "Changer (cartridge mechanism)", "", "" }; static const str8 track_mode[16]={ "Blank","<1>","Audio","<3>", "Data","<5>","<6>","Packet", "<8>","<9>","<10>","<11>", "<12>","<13>","<14>","<15>" }; static const str8 data_mode[16]={ "<0>","Mode1","Mode2","<3>", "<4>","<5>","<6>","<7>", "<8>","<9>","<10>","<11>", "<12>","<13>","<14>","<15>" }; #define EVENT_NO_CHANGE 0x00 #define EVENT_EJECT 0x01 #define EVENT_MEDIA_NEW 0x02 #define EVENT_MEDIA_REMOVED 0x03 #define EVENT_MEDIA_CHANGED 0x04 #define EVENT_MEDIA_BG_DONE 0x05 #define EVENT_MEDIA_BG_REST 0x06 static const str_32 media_event[16]={ "No Change", "Eject requested", "New Media", "Media Removal", "Media Changed", "BGformat done", "BGformat restart", "", "", "", "", "", "", "", "", "" }; static const str_32 cdrw_subtype_tbl[8]={ "Normal Speed", "High Speed", "Ultra Speed", "Ultra Speed+", "", "", "", "" }; static const str_32 cdr_subtype_tbl[8]={ "", "", "Type A, low beta (A-)", "Type A, high beta (A+)", "Type B, low beta (B-)", "Type B, high beta (B+)", "Type C, low beta (C-)", "Type C, high beta (C+)" }; static const manuf mi[]={ { { 97, 22, 60 }, "Acer" }, { { 97, 45, 20 }, "Acer" }, { { 97, 22, 20 }, "Advanced Digital Media" }, { { 97, 42, 20 }, "Advanced Digital Media" }, { { 97, 25, 50 }, "AMS" }, { { 97, 23, 30 }, "AUDIO DISTRIBUTORS" }, { { 97, 28, 30 }, "Auvistar" }, { { 97, 46, 50 }, "Auvistar" }, { { 97, 22, 40 }, "CIS Technology" }, { { 97, 45, 40 }, "CIS Technology" }, { { 97, 26, 60 }, "CMC Magnetics" }, { { 97, 46, 60 }, "CMC Magnetics" }, { { 97, 23, 60 }, "Customer Pressing Oosterhout" }, { { 97, 28, 50 }, "DELPHI" }, { { 97, 27, 0 }, "DIGITAL STORAGE" }, { { 97, 48, 40 }, "DIGITAL STORAGE" }, { { 97, 23, 10 }, "Doremi" }, { { 97, 13, 30 }, "DST" }, { { 97, 22, 30 }, "EXIMPO" }, { { 97, 26, 0 }, "FORNET" }, { { 97, 45, 0 }, "FORNET" }, { { 97, 26, 40 }, "FUJI" }, { { 97, 46, 40 }, "FUJI" }, { { 97, 29, 50 }, "General Magnetics" }, { { 97, 28, 10 }, "GIGASTORAGE" }, { { 97, 49, 10 }, "GIGASTORAGE" }, { { 97, 16, 30 }, "Grand Advance" }, { { 97, 31, 30 }, "Grand Advance" }, { { 97, 51, 10 }, "Grand Advance" }, { { 97, 45, 50 }, "Guann Yinn" }, { { 97, 24, 50 }, "Guann Yinn" }, { { 97, 24, 60 }, "Harmonic Hall" }, { { 97, 29, 0 }, "Harmonic Hall" }, { { 97, 29, 30 }, "Hile Optical Disc" }, { { 97, 51, 50 }, "Hile Optical Disc" }, { { 97, 25, 20 }, "Hitachi Maxell" }, { { 97, 47, 10 }, "Hitachi Maxell" }, { { 97, 25, 30 }, "INFODISC" }, { { 97, 51, 20 }, "INFODISC" }, { { 97, 24, 40 }, "kdg mediatech" }, { { 97, 28, 40 }, "King Pro" }, { { 97, 49, 20 }, "King Pro" }, { { 97, 27, 40 }, "Kodak" }, { { 97, 48, 10 }, "Kodak" }, { { 97, 26, 50 }, "Lead Data" }, { { 97, 48, 60 }, "Lead Data" }, { { 97, 23, 0 }, "Matsushita" }, { { 97, 49, 60 }, "Matsushita" }, { { 97, 15, 20 }, "Mitsubishi" }, { { 97, 34, 20 }, "Mitsubishi" }, { { 97, 50, 20 }, "Mitsubishi" }, { { 97, 27, 50 }, "Mitsui" }, { { 97, 48, 50 }, "Mitsui" }, { { 97, 17, 0 }, "Moser Baer India" }, { { 97, 25, 0 }, "MPO" }, { { 97, 28, 20 }, "MultiMediaMasters & Machinary" }, { { 97, 46, 20 }, "MultiMediaMasters & Machinary" }, { { 97, 23, 20 }, "Nacar Media srl" }, { { 97, 15, 30 }, "NAN-YA" }, { { 97, 28, 0 }, "Opti.Me.S. S.p.A." }, { { 97, 49, 30 }, "Opti.Me.S. S.p.A." }, { { 97, 21, 40 }, "Optical Disc Manuf." }, { { 97, 26, 30 }, "OPTICAL DISC CORPRATION" }, { { 97, 23, 50 }, "OPTROM.INC." }, { { 97, 27, 30 }, "Pioneer" }, { { 97, 48, 30 }, "Pioneer" }, { { 97, 27, 10 }, "Plasmon" }, { { 97, 48, 20 }, "Plasmon" }, { { 97, 26, 10 }, "POSTECH" }, { { 97, 47, 40 }, "POSTECH" }, { { 97, 27, 20 }, "Princo" }, { { 97, 47, 20 }, "Princo" }, { { 96, 43, 20 }, "Prodisc" }, { { 96, 43, 30 }, "Prodisc" }, // Ritek ? { { 97, 32, 10 }, "Prodisc" }, { { 97, 47, 60 }, "Prodisc" }, { { 97, 27, 60 }, "Ricoh" }, { { 97, 48, 0 }, "Ricoh" }, { { 97, 15, 10 }, "Ritek" }, { { 97, 31, 0 }, "Ritek" }, { { 97, 47, 50 }, "Ritek" }, { { 97, 22, 10 }, "Seantram" }, { { 97, 16, 20 }, "SHENZEN SG&GAST" }, { { 97, 26, 20 }, "SKC" }, { { 97, 24, 10 }, "SONY" }, { { 97, 46, 10 }, "SONY" }, { { 97, 29, 0 }, "Taeil Media" }, { { 97, 24, 0 }, "Taiyo Yuden" }, { { 97, 46, 0 }, "Taiyo Yuden" }, { { 97, 18, 60 }, "TAROKO" }, { { 97, 15, 0 }, "TDK Corporation" }, { { 97, 32, 0 }, "TDK Corporation" }, { { 97, 49, 0 }, "TDK Corporation" }, { { 97, 29, 20 }, "UNIDISC" }, { { 97, 24, 30 }, "UNITECH" }, { { 97, 45, 10 }, "UNITECH" }, { { 97, 29, 10 }, "Vanguard" }, { { 97, 50, 10 }, "Vanguard" }, { { 97, 49, 40 }, "VICTOR" }, { { 97, 23, 40 }, "VICTOR" }, { { 97, 29, 40 }, "VIVA MAGNETICS" }, { { 97, 25, 40 }, "VIVASTAR" }, { { 97, 25, 60 }, "Xcitec" }, { { 97, 45, 60 }, "Xcitec" }, { { 0, 0, 0 }, "UNKNOWN" } }; #define MODE_PAGE_RW_ERR_CTL 0x01 #define MODE_PAGE_MTRAINIER 0x02 #define MODE_PAGE_WRITE_PARAMETERS 0x05 #define MODE_PAGE_VERIFY_ERR_RECOVERY 0x07 #define MODE_PAGE_CACHING 0x08 #define MODE_PAGE_MEDIUM_SUPPORTED 0x0B #define MODE_PAGE_CD_DEV_PARANETERS 0x0D #define MODE_PAGE_CD_AUDIO_CTL 0x0E #define MODE_PAGE_POWER_CONDITION 0x1A #define MODE_PAGE_FAULT_REPORTING 0x1C #define MODE_PAGE_TIMEOUT_PROTECT 0x1D #define MODE_PAGE_MM_CAP_STATUS 0x2A #define MODE_PAGE_MTRAINIER2 0x2C #define MODE_PAGE_YAMAHA_TATTOO 0x31 static const desc8 MODE_PAGES[]={ // { "" , 0x00}, { 0x00, "vendor"}, { 0x01, "R/W error control"}, { 0x02, "Mt.Rainier"}, { 0x05, "Write parameters"}, { 0x07, "Verify error recovery"}, { 0x08, "Caching"}, { 0x0B, "Medium types supported"}, { 0x0D, "CD device parameters"}, { 0x0E, "CD Audio control"}, { 0x1A, "Power condition"}, { 0x1C, "Fault/Failure reporting"}, { 0x1D, "Time-out & Protect"}, { 0x2A, "MM Capabilities & Mechanical status"}, { 0x2C, "Mt.Rainier"}, { 0x31, "Yamaha DiscT@2"}, { 0x3F, "???"} }; #define FEATURE_PROFILE_LIST 0x000 #define FEATURE_CORE 0x001 #define FEATURE_MORPHING 0x002 #define FEATURE_REMOVABLE_MEDIA 0x003 #define FEATURE_WRITE_PROTECT 0x004 #define FEATURE_RANDOM_READABLE 0x010 #define FEATURE_MULTI_READ 0x01D #define FEATURE_CD_READ 0x01E #define FEATURE_DVD_READ 0x01F #define FEATURE_RANDOM_WRITABLE 0x020 #define FEATURE_INCREMENTAL_STREAMING_WRITABLE 0x021 #define FEATURE_SECTOR_ERASABLE 0x022 #define FEATURE_FORMATTABLE 0x023 #define FEATURE_DEFECT_MANAGEMENT 0x024 #define FEATURE_WRITE_ONCE 0x025 #define FEATURE_RESTRICTED_OVERWRITE 0x026 #define FEATURE_CD_RW_CAV_WRITE 0x027 #define FEATURE_MRW 0x028 #define FEATURE_ENHANCED_DEFECT_REPORTING 0x029 #define FEATURE_DVD_PLUS_RW 0x02A #define FEATURE_DVD_PLUS_R 0x02B #define FEATURE_RIGID_RESTRICTED_OVERWRITE 0x02C #define FEATURE_CD_TRACK_AT_ONCE 0x02D #define FEATURE_CD_MASTERING 0x02E #define FEATURE_DVD_R_RW_WRITE 0x02F #define FEATURE_DDCD_READ 0x030 #define FEATURE_DDCD_R_WRITE 0x031 #define FEATURE_DDCD_RW_WRITE 0x032 #define FEATURE_LAYER_JUMP_RECORDING 0x033 #define FEATURE_CD_RW_MEDIA_WRITE_SUPPORT 0x037 #define FEATURE_BD_R_POW 0x038 #define FEATURE_DVD_PLUS_RW_DOUBLE_LAYER 0x03A #define FEATURE_DVD_PLUS_R_DOUBLE_LAYER 0x03B #define FEATURE_BD_READ 0x040 #define FEATURE_BD_WRITE 0x041 #define FEATURE_HDDVD_READ 0x050 #define FEATURE_HDDVD_WRITE 0x051 #define FEATURE_HDDVD_RW_FRAGREC 0x052 #define FEATURE_POWER_MANAGEMENT 0x100 #define FEATURE_SMART 0x101 #define FEATURE_EMBEDDED_CHANGER 0x102 #define FEATURE_CD_AUDIO_ANALOG_PLAY 0x103 #define FEATURE_MICROCODE_UPGRADE 0x104 #define FEATURE_TIMEOUT 0x105 #define FEATURE_DVD_CSS 0x106 #define FEATURE_REAL_TIME_STREAMING 0x107 #define FEATURE_LOGICAL_UNIT_SERIAL_NUMBER 0x108 #define FEATURE_MEDIA_SERIAL_NUMBER 0x109 #define FEATURE_DISC_CONTROL_BLOCKS 0x10A #define FEATURE_DVD_CPRM 0x10B #define FEATURE_FIRMWARE_DATE 0x10C static const desc16 FEATURES[]={ { 0x0000, "PROFILE_LIST"}, { 0x0001, "CORE"}, { 0x0002, "MORPHING"}, { 0x0003, "REMOVABLE MEDIA"}, { 0x0004, "WRITE PROTECT"}, { 0x0010, "RANDOM READABLE"}, { 0x001D, "MULTI READ"}, { 0x001E, "CD READ"}, { 0x001F, "DVD READ"}, { 0x0020, "RANDOM WRITABLE"}, { 0x0021, "INCREMENTAL STREAMING WRITABLE"}, { 0x0022, "SECTOR ERASABLE"}, { 0x0023, "FORMATTABLE"}, { 0x0024, "DEFECT MANAGEMENT"}, { 0x0025, "WRITE ONCE"}, { 0x0026, "RESTRICTED OVERWRITE"}, { 0x0027, "CD-RW CAV WRITE"}, { 0x0028, "MRW"}, { 0x0029, "ENHANCED DEFECT REPORTING"}, { 0x002A, "DVD+RW"}, { 0x002B, "DVD+R"}, { 0x002C, "RIGID RESTRICTED OVERWRITE"}, { 0x002D, "CD TRACK AT ONCE"}, { 0x002E, "CD MASTERING (SESSION AT ONCE)"}, { 0x002F, "DVD+R(W) WRITE"}, { 0x0030, "DDCD READ"}, { 0x0031, "DDCD-R WRITE"}, { 0x0032, "DDCD-RW WRITE"}, { 0x0033, "LAYER JUMP RECORDING"}, { 0x0037, "CD-RW MEDIA WRITE SUPPORT"}, { 0x0038, "BD-R PSEUDO-OVERWRITE (POW)"}, { 0x003A, "DVD+RW DOUBLE LAYER"}, { 0x003B, "DVD+R DOUBLE LAYER"}, { 0x0040, "BD READ"}, { 0x0041, "BD WRITE"}, { 0x0042, "TIME SAFE RECORDING (TSR)"}, { 0x0050, "HD-DVD READ"}, { 0x0051, "HD-DVD WRITE"}, { 0x0080, "HYBRID DISC READ"}, { 0x0100, "POWER MANAGEMENT"}, { 0x0101, "S.M.A.R.T."}, { 0x0102, "EMBEDDED CHANGER"}, { 0x0103, "CD AUDIO ANALOG PLAY"}, { 0x0104, "MICROCODE UPGRADE"}, { 0x0105, "TIME-OUT"}, { 0x0106, "DVD CSS"}, { 0x0107, "REAL TIME STREAMING"}, { 0x0108, "LOGICAL UNIT SERIAL NUMBER"}, { 0x0109, "MEDIA SERIAL NUMBER"}, { 0x010A, "DISC CONTROL BLOCKS"}, { 0x010B, "DVD CPRM"}, { 0x010C, "FIRMWARE DATE"}, { 0x010D, "AACS"}, { 0x0110, "VCPS"}, { 0xFF00, "PLEXTOR Autostrategy"}, { 0xFFFF, "???"} }; #define PROFILE_NONE 0x0000 #define PROFILE_NON_REMOVABLE 0x0001 #define PROFILE_REMOVABLE 0x0002 #define PROFILE_MOPTIC_E 0x0003 #define PROFILE_OPTIC_WO 0x0004 #define PROFILE_AS_MO 0x0005 #define PROFILE_CD_ROM 0x0008 #define PROFILE_CD_R 0x0009 #define PROFILE_CD_RW 0x000A #define PROFILE_DVD_ROM 0x0010 #define PROFILE_DVD_R_SEQ 0x0011 #define PROFILE_DVD_RAM 0x0012 #define PROFILE_DVD_RW_RESTOV 0x0013 #define PROFILE_DVD_RW_SEQ 0x0014 #define PROFILE_DVD_R_DL_SEQ 0x0015 #define PROFILE_DVD_R_DL_JUMP 0x0016 #define PROFILE_DVD_RW_DL 0x0017 #define PROFILE_DVD_PLUS_RW 0x001A #define PROFILE_DVD_PLUS_R 0x001B #define PROFILE_DVD_PLUS_RW_DL 0x002A #define PROFILE_DVD_PLUS_R_DL 0x002B #define PROFILE_DDCD_ROM 0x0020 #define PROFILE_DDCD_R 0x0021 #define PROFILE_DDCD_RW 0x0022 #define PROFILE_BD_ROM 0x040 #define PROFILE_BD_R_SEQ 0x041 #define PROFILE_BD_R_RND 0x042 #define PROFILE_BD_RE 0x043 #define PROFILE_HDDVD_ROM 0x050 #define PROFILE_HDDVD_R 0x051 #define PROFILE_HDDVD_RAM 0x052 #define PROFILE_HDDVD_RW 0x053 #define PROFILE_HDDVD_R_DL 0x058 #define PROFILE_HDDVD_RW_DL 0x05A #define PROFILE_NO_PROFILE 0xFFFF static const desc16 PROFILES[]={ { 0x0000, "NONE"}, { 0x0001, "NON_REMOVABLE"}, { 0x0002, "REMOVABLE"}, { 0x0003, "MO-ERASABLE"}, { 0x0004, "MO-WO"}, { 0x0005, "AS-MO"}, { 0x0008, "CD-ROM"}, { 0x0009, "CD-R"}, { 0x000A, "CD-RW"}, { 0x0010, "DVD-ROM"}, { 0x0011, "DVD-R Sequential"}, { 0x0012, "DVD-RAM"}, { 0x0013, "DVD-RW Restricted Overwrite"}, { 0x0014, "DVD-RW Sequential"}, { 0x0015, "DVD-R/DL Sequential"}, { 0x0016, "DVD-R/DL Layer Jump"}, { 0x0017, "DVD-RW/DL"}, { 0x001A, "DVD+RW"}, { 0x001B, "DVD+R"}, { 0x0020, "DD CD-ROM"}, { 0x0021, "DD CD-R"}, { 0x0022, "DD CD-RW"}, { 0x002A, "DVD+RW/DL"}, { 0x002B, "DVD+R/DL"}, { 0x0040, "BD-ROM"}, { 0x0041, "BD-R Sequential"}, { 0x0042, "BD-R Random"}, { 0x0043, "BD-RE"}, { 0x0050, "HD DVD-ROM"}, { 0x0051, "HD DVD-R"}, { 0x0052, "HD DVD-RAM"}, { 0x0053, "HD DVD-RW"}, { 0x0058, "HD DVD-R/DL"}, { 0x005A, "HD DVD-RW/DL"}, { 0xFFFF, "NO PROFILE"} }; static const dev_desc _devtbl[]= { #if defined(__linux) { "hd\0", 3}, // IDE devices { "scd\0", 0}, // SCSI devices, kernel 2.4 { "sr\0", 0 }, // SCSI devices, kernel 2.6 #elif defined(__OpenBSD__) || defined(__NetBSD__) { "rcd\0", 0 }, #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) { "acd\0", 0 }, { "cd\0", 0 }, #elif (defined (__APPLE__) && defined(__MACH__)) { "disk\0", 0 }, #elif defined(_WIN32) { "C:", 0 }, { "D:", 0 }, { "E:", 0 }, { "F:", 0 }, { "G:", 0 }, { "H:", 0 }, { "I:", 0 }, { "J:", 0 }, { "K:", 0 }, { "L:", 0 }, { "M:", 0 }, { "N:", 0 }, { "O:", 0 }, { "P:", 0 }, { "Q:", 0 }, { "R:", 0 }, { "S:", 0 }, { "T:", 0 }, { "U:", 0 }, { "V:", 0 }, { "W:", 0 }, { "X:", 0 }, { "Y:", 0 }, { "Z:", 0 }, #endif { "", -1 } }; #if defined (_WIN32) #define DEVTBL_DIRECT #endif #define ERR_NO_DEV 0x0002 #define ERR_NO_SCSI 0x0003 #define ERR_NO_MMC 0x0004 #define WTYPE_PACKET 0 #define WTYPE_TAO 1 #define WTYPE_SAO 2 #define WTYPE_RAW 3 #define WTYPE_LJ 4 typedef struct { char wtype; char dtype; uint32_t id; char name[32]; } wr_mode; // write modes static const wr_mode wr_modes[] = { { 0, 8, 0x00000001, "Packet"}, { 1, 8, 0x00000002, "TAO"}, { 2, 8, 0x00000004, "SAO"}, { 2, 0, 0x00000010, "SAO/RAW"}, { 2, 1, 0x00000020, "SAO/16"}, { 2, 2, 0x00000040, "SAO/96R"}, { 2, 3, 0x00000080, "SAO/96P"}, { 3, 1, 0x00000100, "RAW/16"}, { 3, 2, 0x00000200, "RAW/96R"}, { 3, 3, 0x00000400, "RAW/96P"}, { 4, 8, 0x00000800, "LayerJump"}, { -1, -1, 0x00, ""} }; // track/session close modes #define CLOSE_NONE 0x00 #define CLOSE_TRACK 0x01 #define CLOSE_SESSION 0x02 #define CLOSE_FINALIZE 0x06 #define DISC_NODISC 0 #define DISC_CDROM 1ULL #define DISC_CDR (1ULL << 1) #define DISC_CDRW (1ULL << 2) #define DISC_CD (DISC_CDROM | DISC_CDR | DISC_CDRW) #define DISC_CDRWSUBT (7ULL << 3) #define DISC_CDRWNS (0ULL << 3) #define DISC_CDRWHS (1ULL << 3) #define DISC_CDRWUS (2ULL << 3) #define DISC_CDRWUSP (3ULL << 3) #define DISC_DVDROM (1ULL << 6) #define DISC_DVDRAM (1ULL << 7) #define DISC_DVDmR (1ULL << 8) #define DISC_DVDmRW (1ULL << 9) #define DISC_DVDmRWS (1ULL << 10) #define DISC_DVDmRWR (1ULL << 11) #define DISC_DVDmRDL (1ULL << 12) #define DISC_DVDmRDLJ (1ULL << 13) #define DISC_DVDpRW (1ULL << 14) #define DISC_DVDpRWDL (1ULL << 15) #define DISC_DVDpR (1ULL << 16) #define DISC_DVDpRDL (1ULL << 17) #define DISC_DVDmRWDL (1ULL << 31) #define DISC_DVDminus (DISC_DVDmR | DISC_DVDmRW | DISC_DVDmRWS | DISC_DVDmRWR | DISC_DVDmRWDL | DISC_DVDmRDL | DISC_DVDmRDLJ) #define DISC_DVDplus (DISC_DVDpR | DISC_DVDpRW | DISC_DVDpRDL | DISC_DVDpRWDL) #define DISC_DVD (DISC_DVDROM | DISC_DVDRAM | DISC_DVDminus | DISC_DVDplus) #define DISC_DDCD_ROM (1ULL << 18) #define DISC_DDCD_R (1ULL << 19) #define DISC_DDCD_RW (1ULL << 20) #define DISC_DDCD (DISC_DDCD_ROM | DISC_DDCD_R | DISC_DDCD_RW) #define DISC_BD_ROM (1ULL << 21) #define DISC_BD_R_SEQ (1ULL << 22) #define DISC_BD_R_RND (1ULL << 23) #define DISC_BD_RE (1ULL << 24) #define DISC_BD (DISC_BD_ROM | DISC_BD_R_SEQ | DISC_BD_R_RND | DISC_BD_RE) #define DISC_HDDVD_ROM (1ULL << 25) #define DISC_HDDVD_R (1ULL << 26) #define DISC_HDDVD_RAM (1ULL << 27) #define DISC_HDDVD_RW (1ULL << 28) #define DISC_HDDVD_RDL (1ULL << 29) #define DISC_HDDVD_RWDL (1ULL << 30) #define DISC_HDDVD (DISC_HDDVD_ROM | DISC_HDDVD_R | DISC_HDDVD_RAM | DISC_HDDVD_RW | DISC_HDDVD_RDL | DISC_HDDVD_RWDL) #define DISC_UN (1ULL << 63) static const desc64 MEDIA[]={ { DISC_NODISC, "No Media"}, { DISC_CDROM, "CD-ROM" }, { DISC_CDR, "CD-R" }, { DISC_CDRW, "CD-RW" }, /* #define DISC_CDRWSUBT = { 0x70000000, "" }, #define DISC_CDRWMS = { 0x10000000, "" }, #define DISC_CDRWHS = { 0x20000000, "" }, #define DISC_CDRWUS = { 0x30000000, "" }, #define DISC_CDRWUSP = { 0x40000000, "" }, */ { DISC_DVDROM, "DVD-ROM" }, { DISC_DVDRAM, "DVD-RAM" }, { DISC_DVDmR, "DVD-R" }, { DISC_DVDmRW, "DVD-RW (unknown subtype)" }, { DISC_DVDmRWS, "DVD-RW (Sequential)" }, { DISC_DVDmRWR, "DVD-RW (Restricted overwrite)" }, { DISC_DVDmRDL, "DVD-R DL (Sequential)" }, { DISC_DVDmRDLJ, "DVD-R DL (Layer Jump)" }, { DISC_DVDpRW, "DVD+RW" }, { DISC_DVDpRWDL, "DVD+RW DL" }, { DISC_DVDpR, "DVD+R" }, { DISC_DVDpRDL, "DVD+R DL" }, { DISC_DDCD_ROM, "DDCD-ROM" }, { DISC_DDCD_R, "DDCD-R" }, { DISC_DDCD_RW, "DDCD-RW" }, { DISC_BD_ROM, "BD-ROM" }, { DISC_BD_R_SEQ, "BD-R (Sequential)" }, { DISC_BD_R_RND, "BD-R (Random)" }, { DISC_BD_RE, "BD-RE" }, { DISC_HDDVD_ROM, "HDDVD-ROM" }, { DISC_HDDVD_RAM, "HDDVD-RAM" }, { DISC_HDDVD_R, "HDDVD-R" }, { DISC_HDDVD_RW, "HDDVD-RW" }, { DISC_HDDVD_RDL, "HDDVD-R DL" }, { DISC_HDDVD_RWDL,"HDDVD-RW DL" }, { DISC_UN, "unknown" }, { 0xFFFFFFFFULL, "???" } }; #define BOOK_DVD_ROM 0x00 #define BOOK_DVD_RAM 0x01 #define BOOK_DVD_R 0x02 #define BOOK_DVD_RW 0x03 #define BOOK_HDDVD_ROM 0x04 #define BOOK_HDDVD_RAM 0x05 #define BOOK_HDDVD_R 0x06 #define BOOK_DVD_PRW 0x09 #define BOOK_DVD_PR 0x0A #define BOOK_DVD_PRW_DL 0x0D #define BOOK_DVD_PR_DL 0x0E static const str_dev book_type_tbl[16]={ "DVD-ROM", "DVD-RAM", "DVD-R", "DVD-RW", "HD DVD-ROM", "HD DVD-RAM", "HD DVD-R ","unknown", "unknown", "DVD+RW", "DVD+R", "unknown", "unknown", "DVD+RW DL", "DVD+R DL", "unknown" }; #define COMMAND_FAILED -0x01 #define Media_BLANK 0x80 #define Media_NOTBLANK 0x7F #define Media_NoMedia 0x00 #define Media_CD 0x01 #define Media_DVD 0x02 #define CAP_REMOVABLE_MEDIA 1ULL #define CAP_MORPHING (1ULL << 1) #define CAP_EMBEDDED_CHANGER (1ULL << 2) #define CAP_MICROCODE_UPGRADE (1ULL << 3) #define CAP_SMART (1ULL << 4) #define CAP_REAL_TIME_STREAMING (1ULL << 5) #define CAP_POWER_MANAGEMENT (1ULL << 6) #define CAP_DEFECT_MANAGEMENT (1ULL << 7) #define CAP_DVD_CSS (1ULL << 8) #define CAP_DVD_CPRM (1ULL << 9) #define CAP_C2 (1ULL << 10) #define CAP_CD_TEXT (1ULL << 11) #define CAP_CD_AUDIO (1ULL << 12) #define CAP_DAE (1ULL << 13) #define CAP_ACCURATE_STREAM (1ULL << 14) #define CAP_COMPOSITE (1ULL << 15) #define CAP_DIGITAL_PORT_1 (1ULL << 16) #define CAP_DIGITAL_PORT_2 (1ULL << 17) #define CAP_MULTISESSION (1ULL << 18) #define CAP_MODE2_FORM1 (1ULL << 19) #define CAP_MODE2_FORM2 (1ULL << 20) #define CAP_TEST_WRITE_CD (1ULL << 21) #define CAP_READ_BAR_CODE (1ULL << 22) #define CAP_UPC (1ULL << 23) #define CAP_ISRC (1ULL << 24) #define CAP_SIDE_CHANGE (1ULL << 25) #define CAP_LOCK (1ULL << 26) #define CAP_EJECT (1ULL << 27) #define CAP_TEST_WRITE_DVD (1ULL << 28) #define CAP_SSA (1ULL << 29) //#define CAP_ = 0x00000000; #define CAP_SET_CD_SPEED (1ULL << 30) #define NCAP_SET_CD_SPEED (~CAP_SET_CD_SPEED); #define CAP_TEST_WRITE_DVD_PLUS (1ULL << 31) #define CAP_BURN_FREE (1ULL << 32) static const desc64 capabilities[] = { { CAP_REMOVABLE_MEDIA, "Removable media" }, { CAP_COMPOSITE, "Composite out" }, { CAP_DIGITAL_PORT_1, "Didital port 1" }, { CAP_DIGITAL_PORT_2, "Didital port 2" }, { CAP_MULTISESSION, "Multisession" }, { CAP_MODE2_FORM1, "Mode 2 Form 1" }, { CAP_MODE2_FORM2, "Mode 2 Form 2" }, { CAP_READ_BAR_CODE, "Bar Code Read" }, { CAP_BURN_FREE, "BURN-free" }, { CAP_TEST_WRITE_CD, "Test Write CD" }, { CAP_TEST_WRITE_DVD, "Test Write DVD-" }, { CAP_TEST_WRITE_DVD_PLUS, "Test Write DVD+" }, { CAP_UPC, "UPC" }, { CAP_ISRC, "ISRC" }, { CAP_SIDE_CHANGE, "Side Change" }, { CAP_EJECT, "Media Eject" }, { CAP_LOCK, "Media Lock" }, { CAP_SMART, "S.M.A.R.T." }, { CAP_MICROCODE_UPGRADE, "Firmware upgrade" }, { CAP_MORPHING, "Morphing" }, { CAP_POWER_MANAGEMENT, "Power Management" }, { CAP_EMBEDDED_CHANGER, "Embedded Changer" }, { CAP_C2, "C2 Pointers" }, { CAP_CD_AUDIO, "Audio-CD" }, { CAP_DAE, "DAE" }, { CAP_CD_TEXT, "CD-text" }, { CAP_ACCURATE_STREAM, "Accurate Stream" }, { CAP_DEFECT_MANAGEMENT, "Defect Management" }, { CAP_REAL_TIME_STREAMING, "Realtime Streaming" }, { CAP_SSA, "Spare Area Info" }, { CAP_DVD_CSS, "DVD CSS" }, { CAP_DVD_CPRM, "DVD CPRM" }, { 0, "" } }; // RW #define DEVICE_CD_ROM 1ULL // + #define DEVICE_CD_R (1ULL << 1) // ++ #define DEVICE_CD_RW (1ULL << 2) // ++ #define DEVICE_DVD_ROM (1ULL << 3) // + #define DEVICE_DVD_RAM (1ULL << 4) // ++ #define DEVICE_DVD_R (1ULL << 5) // ++ #define DEVICE_DVD_RW (1ULL << 6) // ++ //#define DEVICE_DVD_R_DL_SEQ (1ULL << 7) // ++ //#define DEVICE_DVD_R_DL_LJ (1ULL << 8) // ++ //#define DEVICE_DVD_R_DL (DEVICE_DVD_R_DL_SEQ | DEVICE_DVD_R_DL_LJ) // ++ #define DEVICE_DVD_R_DL (1ULL << 7) // ++ #define DEVICE_DVD_RW_DL (1ULL << 9) // ++ #define DEVICE_DVD_PLUS_R (1ULL << 10) // ++ #define DEVICE_DVD_PLUS_RW (1ULL << 11) // ++ #define DEVICE_DVD_PLUS_R_DL (1ULL << 12) // ++ #define DEVICE_DVD_PLUS_RW_DL (1ULL << 13) // ++ #define DEVICE_DVD (DEVICE_DVD_ROM | DEVICE_DVD_RAM \ | DEVICE_DVD_R | DEVICE_DVD_RW | DEVICE_DVD_R_DL | DEVICE_DVD_RW_DL \ | DEVICE_DVD_PLUS_R | DEVICE_DVD_PLUS_RW | DEVICE_DVD_PLUS_R_DL | DEVICE_DVD_PLUS_RW_DL) #define DEVICE_MRW (1ULL << 14) // ++ #define DEVICE_MRW_DVD (1ULL << 15) // ++ #define DEVICE_DDCD_R (1ULL << 16) // ++ #define DEVICE_DDCD_RW (1ULL << 17) // ++ #define DEVICE_BD_ROM (1ULL << 18) // + #define DEVICE_BD_R (1ULL << 19) // ++ #define DEVICE_BD_RE (1ULL << 20) // ++ #define DEVICE_BD (DEVICE_BD_ROM | DEVICE_BD_R | DEVICE_BD_RE) #define DEVICE_HDDVD_ROM (1ULL << 21) // + #define DEVICE_HDDVD_R (1ULL << 22) // ++ #define DEVICE_HDDVD_RAM (1ULL << 23) // ++ #define DEVICE_HDDVD_RW (1ULL << 24) // #define DEVICE_HDDVD_R_DL (1ULL << 25) // #define DEVICE_HDDVD_RW_DL (1ULL << 26) // #define DEVICE_HDDVD (DEVICE_HDDVD_ROM \ | DEVICE_HDDVD_RAM | DEVICE_HDDVD_R | DEVICE_HDDVD_RW \ | DEVICE_HDDVD_R_DL | DEVICE_HDDVD_RW_DL) #define CD_SPEED_MULT 177 #define DVD_SPEED_MULT 1385 static const desc64 rw_capabilities[] = { // { DEVICE_CD_ROM, "CD-ROM" }, { DEVICE_CD_R, "CD-R" }, { DEVICE_CD_RW, "CD-RW" }, { DEVICE_MRW, "CD-MRW" }, { DEVICE_DDCD_R, "DDCD-R" }, { DEVICE_DDCD_RW, "DDCD-RW" }, { 0, "-" }, { DEVICE_DVD_ROM, "DVD-ROM" }, { DEVICE_DVD_RAM, "DVD-RAM" }, { DEVICE_DVD_R, "DVD-R" }, { DEVICE_DVD_RW, "DVD-RW" }, // { DEVICE_DVD_R_DL_SEQ (1ULL << 7) // ++ // { DEVICE_DVD_R_DL_LJ (1ULL << 8) // ++ // { DEVICE_DVD_R_DL (DEVICE_DVD_R_DL_SEQ | DEVICE_DVD_R_DL_LJ) // ++ { DEVICE_DVD_R_DL, "DVD-R/DL" }, { DEVICE_DVD_RW_DL, "DVD-RW/DL" }, { DEVICE_DVD_PLUS_R, "DVD+R" }, { DEVICE_DVD_PLUS_RW, "DVD+RW" }, { DEVICE_DVD_PLUS_R_DL, "DVD+R/DL" }, { DEVICE_DVD_PLUS_RW_DL,"DVD+RW/DL" }, { DEVICE_MRW_DVD, "DVD+MRW" }, { 0, "-" }, { DEVICE_BD_ROM, "BD-ROM" }, { DEVICE_BD_R, "BD-R" }, { DEVICE_BD_RE, "BD-RE" }, { DEVICE_HDDVD_ROM, "HDDVD-ROM" }, { DEVICE_HDDVD_R, "HDDVD-R" }, { DEVICE_HDDVD_RAM, "HDDVD-RAM" }, // { DEVICE_HDDVD_RW, "HDDVD-RW" }, // { DEVICE_HDDVD_R_DL, "HDDVD-R/DL" }, // { DEVICE_HDDVD_RW_DL, "HDDVD-RW/DL"}, { 0, "" } }; #define ERR_INVALID_OPCODE 0x00052000 #define ERR_NO_MEDIUM 0x00023A00 #define ERR_NO_ERROR 0x00000000 // **** Vendors definition #define DEV_GENERIC 0x00000001 #define DEV_PLEXTOR 0x00000002 #define DEV_PIONEER 0x00000004 #define DEV_NEC 0x00000008 #define DEV_LITEON 0x00000010 #define DEV_BENQ_RD 0x00000020 #define DEV_BENQ_WR 0x00000040 #define DEV_YAMAHA 0x00000080 #define DEV_ASUS 0x00000100 #define DEV_TSST 0x00000200 #define DEV_LG 0x00000400 #define DEV_TEAC 0x00000800 // Vendor-specififc features #define PX_POWEREC 0x00000001 #define PX_GIGAREC 0x00000002 #define PX_VARIREC_CD 0x00000004 #define PX_VARIREC_DVD 0x00000008 #define PX_HCDRSS 0x00000010 #define PX_SPDREAD 0x00000020 #define PX_SECUREC 0x00000040 #define PX_SILENT 0x00000080 #define PX_ASTRATEGY 0x00000100 #define PX_BITSET_R 0x00000200 #define PX_BITSET_RDL 0x00000400 #define PX_SIMUL_PLUS 0x00000800 #define PX_ERASER 0x00001000 #define PIO_QUIET 0x00002000 #define YMH_AMQR 0x00004000 #define YMH_FORCESPEED 0x00008000 #define YMH_TATTOO 0x00010000 #define LTN_ERASER 0x00020000 // Yamaha devices #define YAMAHA_OLD 0x00000001 #define YAMAHA_F1 0x00000002 // Plextor devices #define PLEXTOR_OLD 0x00000001 #define PLEXTOR_4824 0x00000100 #define PLEXTOR_5224 0x00000200 #define PLEXTOR_PREMIUM 0x00000400 #define PLEXTOR_708 0x00000800 #define PLEXTOR_708A2 0x00001000 #define PLEXTOR_712 0x00002000 #define PLEXTOR_714 0x00004000 #define PLEXTOR_716 0x00008000 #define PLEXTOR_716AL 0x00010000 #define PLEXTOR_755 0x00020000 #define PLEXTOR_760 0x00040000 #define PLEXTOR_PREMIUM2 0x00080000 //Pioneer devices #define PIO_OLD 0x00000001 #define PIO_DVR_106 0x00000002 #define PIO_DVR_107 0x00000004 #define PIO_DVR_108 0x00000008 #define PIO_DVR_109 0x00000010 #define PIO_DVR_110 0x00000020 #define PIO_DVR_111 0x00000040 #define PIO_DVR_112 0x00000040 //Asus devices #define ASUS_1612 0x00000001 #define ASUS_2014 0x00000002 //Nec devices #define NEC_OLD 0x00000001 #define NEC_3520 0x00000002 #define NEC_3530 0x00000004 #define NEC_3540 0x00000008 #define NEC_4550 0x00000010 #define NEC_4570 0x00000020 #define NEC_4650 0x00000040 #define NEC_7170 0x00000080 #define NEC_7200 0x00000100 //LiteOn devices #define LTN_OLD 0x00000001 #define LTN_CDR_G7 0x00000002 #define LTN_SDVDR_G1 0x00000004 #define LTN_SDVDR_G2 0x00000008 #define LTN_SDVDR_G3 0x00000010 #define LTN_DVDR_G1 0x00000020 #define LTN_DVDR_G2 0x00000040 #define LTN_DVDR_G3 0x00000080 #define LTN_DVDR_G4 0x00000100 #define LTN_DVDR_G5 0x00000200 #define LTN_DVDR_G6 0x00000400 #define LTN_DVDR_G7 0x00000800 #define LTN_DVDR_G8 0x00001000 #define LTN_iHAx1 0x00002000 #define LTN_iHAx2 0x00004000 #define LTN_iHAx3 0x00008000 #define LTN_iHAx4 0x00010000 //BenQ devices #define BENQ_OLD 0x00000001 #define BENQ_DV1650V 0x00000002 #define BENQ_DW1620 0x00000004 #define BENQ_DW1625 0x00000008 #define BENQ_DW1640 0x00000010 #define BENQ_DW1650 0x00000020 #define BENQ_DW1655 0x00000040 #define TSST_H2 0x00000002 // **** end of devices list #endif qpxtool-0.7.1_002/lib/qpxtransport/include/csstables.h0000644000175000001440000004447111132647653022212 0ustar shultzusers/***************************************************************************** * csstables.h: CSS Tables for DVD unscrambling ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN * $Id: csstables.h 20629 2006-11-03 12:25:56Z diego $ * * Author: Stéphane Borel * * based on: * - css-auth by Derek Fawcus * - DVD CSS ioctls example program by Andrew T. Veliath * - The Divide and conquer attack by Frank A. Stevenson * - DeCSSPlus by Ethan Hawke * - DecVOB * see http://www.lemuria.org/DeCSS/ by Tom Vogt for more information. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ static unsigned char p_css_tab1[ 256 ] = { 0x33, 0x73, 0x3b, 0x26, 0x63, 0x23, 0x6b, 0x76, 0x3e, 0x7e, 0x36, 0x2b, 0x6e, 0x2e, 0x66, 0x7b, 0xd3, 0x93, 0xdb, 0x06, 0x43, 0x03, 0x4b, 0x96, 0xde, 0x9e, 0xd6, 0x0b, 0x4e, 0x0e, 0x46, 0x9b, 0x57, 0x17, 0x5f, 0x82, 0xc7, 0x87, 0xcf, 0x12, 0x5a, 0x1a, 0x52, 0x8f, 0xca, 0x8a, 0xc2, 0x1f, 0xd9, 0x99, 0xd1, 0x00, 0x49, 0x09, 0x41, 0x90, 0xd8, 0x98, 0xd0, 0x01, 0x48, 0x08, 0x40, 0x91, 0x3d, 0x7d, 0x35, 0x24, 0x6d, 0x2d, 0x65, 0x74, 0x3c, 0x7c, 0x34, 0x25, 0x6c, 0x2c, 0x64, 0x75, 0xdd, 0x9d, 0xd5, 0x04, 0x4d, 0x0d, 0x45, 0x94, 0xdc, 0x9c, 0xd4, 0x05, 0x4c, 0x0c, 0x44, 0x95, 0x59, 0x19, 0x51, 0x80, 0xc9, 0x89, 0xc1, 0x10, 0x58, 0x18, 0x50, 0x81, 0xc8, 0x88, 0xc0, 0x11, 0xd7, 0x97, 0xdf, 0x02, 0x47, 0x07, 0x4f, 0x92, 0xda, 0x9a, 0xd2, 0x0f, 0x4a, 0x0a, 0x42, 0x9f, 0x53, 0x13, 0x5b, 0x86, 0xc3, 0x83, 0xcb, 0x16, 0x5e, 0x1e, 0x56, 0x8b, 0xce, 0x8e, 0xc6, 0x1b, 0xb3, 0xf3, 0xbb, 0xa6, 0xe3, 0xa3, 0xeb, 0xf6, 0xbe, 0xfe, 0xb6, 0xab, 0xee, 0xae, 0xe6, 0xfb, 0x37, 0x77, 0x3f, 0x22, 0x67, 0x27, 0x6f, 0x72, 0x3a, 0x7a, 0x32, 0x2f, 0x6a, 0x2a, 0x62, 0x7f, 0xb9, 0xf9, 0xb1, 0xa0, 0xe9, 0xa9, 0xe1, 0xf0, 0xb8, 0xf8, 0xb0, 0xa1, 0xe8, 0xa8, 0xe0, 0xf1, 0x5d, 0x1d, 0x55, 0x84, 0xcd, 0x8d, 0xc5, 0x14, 0x5c, 0x1c, 0x54, 0x85, 0xcc, 0x8c, 0xc4, 0x15, 0xbd, 0xfd, 0xb5, 0xa4, 0xed, 0xad, 0xe5, 0xf4, 0xbc, 0xfc, 0xb4, 0xa5, 0xec, 0xac, 0xe4, 0xf5, 0x39, 0x79, 0x31, 0x20, 0x69, 0x29, 0x61, 0x70, 0x38, 0x78, 0x30, 0x21, 0x68, 0x28, 0x60, 0x71, 0xb7, 0xf7, 0xbf, 0xa2, 0xe7, 0xa7, 0xef, 0xf2, 0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff }; static unsigned char p_css_tab2[ 256 ] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, 0x49, 0x48, 0x4b, 0x4a, 0x4d, 0x4c, 0x4f, 0x4e, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x5b, 0x5a, 0x59, 0x58, 0x5f, 0x5e, 0x5d, 0x5c, 0x52, 0x53, 0x50, 0x51, 0x56, 0x57, 0x54, 0x55, 0x6d, 0x6c, 0x6f, 0x6e, 0x69, 0x68, 0x6b, 0x6a, 0x64, 0x65, 0x66, 0x67, 0x60, 0x61, 0x62, 0x63, 0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a, 0x79, 0x78, 0x76, 0x77, 0x74, 0x75, 0x72, 0x73, 0x70, 0x71, 0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 0x9b, 0x9a, 0x99, 0x98, 0x9f, 0x9e, 0x9d, 0x9c, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x89, 0x88, 0x8b, 0x8a, 0x8d, 0x8c, 0x8f, 0x8e, 0xb6, 0xb7, 0xb4, 0xb5, 0xb2, 0xb3, 0xb0, 0xb1, 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8, 0xa4, 0xa5, 0xa6, 0xa7, 0xa0, 0xa1, 0xa2, 0xa3, 0xad, 0xac, 0xaf, 0xae, 0xa9, 0xa8, 0xab, 0xaa, 0xdb, 0xda, 0xd9, 0xd8, 0xdf, 0xde, 0xdd, 0xdc, 0xd2, 0xd3, 0xd0, 0xd1, 0xd6, 0xd7, 0xd4, 0xd5, 0xc9, 0xc8, 0xcb, 0xca, 0xcd, 0xcc, 0xcf, 0xce, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf6, 0xf7, 0xf4, 0xf5, 0xf2, 0xf3, 0xf0, 0xf1, 0xed, 0xec, 0xef, 0xee, 0xe9, 0xe8, 0xeb, 0xea, 0xe4, 0xe5, 0xe6, 0xe7, 0xe0, 0xe1, 0xe2, 0xe3 }; static unsigned char p_css_tab3[ 512 ] = { 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff }; static unsigned char p_css_tab4[ 256 ] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; static unsigned char p_css_tab5[ 256 ] = { 0xff, 0x7f, 0xbf, 0x3f, 0xdf, 0x5f, 0x9f, 0x1f, 0xef, 0x6f, 0xaf, 0x2f, 0xcf, 0x4f, 0x8f, 0x0f, 0xf7, 0x77, 0xb7, 0x37, 0xd7, 0x57, 0x97, 0x17, 0xe7, 0x67, 0xa7, 0x27, 0xc7, 0x47, 0x87, 0x07, 0xfb, 0x7b, 0xbb, 0x3b, 0xdb, 0x5b, 0x9b, 0x1b, 0xeb, 0x6b, 0xab, 0x2b, 0xcb, 0x4b, 0x8b, 0x0b, 0xf3, 0x73, 0xb3, 0x33, 0xd3, 0x53, 0x93, 0x13, 0xe3, 0x63, 0xa3, 0x23, 0xc3, 0x43, 0x83, 0x03, 0xfd, 0x7d, 0xbd, 0x3d, 0xdd, 0x5d, 0x9d, 0x1d, 0xed, 0x6d, 0xad, 0x2d, 0xcd, 0x4d, 0x8d, 0x0d, 0xf5, 0x75, 0xb5, 0x35, 0xd5, 0x55, 0x95, 0x15, 0xe5, 0x65, 0xa5, 0x25, 0xc5, 0x45, 0x85, 0x05, 0xf9, 0x79, 0xb9, 0x39, 0xd9, 0x59, 0x99, 0x19, 0xe9, 0x69, 0xa9, 0x29, 0xc9, 0x49, 0x89, 0x09, 0xf1, 0x71, 0xb1, 0x31, 0xd1, 0x51, 0x91, 0x11, 0xe1, 0x61, 0xa1, 0x21, 0xc1, 0x41, 0x81, 0x01, 0xfe, 0x7e, 0xbe, 0x3e, 0xde, 0x5e, 0x9e, 0x1e, 0xee, 0x6e, 0xae, 0x2e, 0xce, 0x4e, 0x8e, 0x0e, 0xf6, 0x76, 0xb6, 0x36, 0xd6, 0x56, 0x96, 0x16, 0xe6, 0x66, 0xa6, 0x26, 0xc6, 0x46, 0x86, 0x06, 0xfa, 0x7a, 0xba, 0x3a, 0xda, 0x5a, 0x9a, 0x1a, 0xea, 0x6a, 0xaa, 0x2a, 0xca, 0x4a, 0x8a, 0x0a, 0xf2, 0x72, 0xb2, 0x32, 0xd2, 0x52, 0x92, 0x12, 0xe2, 0x62, 0xa2, 0x22, 0xc2, 0x42, 0x82, 0x02, 0xfc, 0x7c, 0xbc, 0x3c, 0xdc, 0x5c, 0x9c, 0x1c, 0xec, 0x6c, 0xac, 0x2c, 0xcc, 0x4c, 0x8c, 0x0c, 0xf4, 0x74, 0xb4, 0x34, 0xd4, 0x54, 0x94, 0x14, 0xe4, 0x64, 0xa4, 0x24, 0xc4, 0x44, 0x84, 0x04, 0xf8, 0x78, 0xb8, 0x38, 0xd8, 0x58, 0x98, 0x18, 0xe8, 0x68, 0xa8, 0x28, 0xc8, 0x48, 0x88, 0x08, 0xf0, 0x70, 0xb0, 0x30, 0xd0, 0x50, 0x90, 0x10, 0xe0, 0x60, 0xa0, 0x20, 0xc0, 0x40, 0x80, 0x00 }; static unsigned char p_crypt_tab0[ 256 ] = { 0xB7, 0xF4, 0x82, 0x57, 0xDA, 0x4D, 0xDB, 0xE2, 0x2F, 0x52, 0x1A, 0xA8, 0x68, 0x5A, 0x8A, 0xFF, 0xFB, 0x0E, 0x6D, 0x35, 0xF7, 0x5C, 0x76, 0x12, 0xCE, 0x25, 0x79, 0x29, 0x39, 0x62, 0x08, 0x24, 0xA5, 0x85, 0x7B, 0x56, 0x01, 0x23, 0x68, 0xCF, 0x0A, 0xE2, 0x5A, 0xED, 0x3D, 0x59, 0xB0, 0xA9, 0xB0, 0x2C, 0xF2, 0xB8, 0xEF, 0x32, 0xA9, 0x40, 0x80, 0x71, 0xAF, 0x1E, 0xDE, 0x8F, 0x58, 0x88, 0xB8, 0x3A, 0xD0, 0xFC, 0xC4, 0x1E, 0xB5, 0xA0, 0xBB, 0x3B, 0x0F, 0x01, 0x7E, 0x1F, 0x9F, 0xD9, 0xAA, 0xB8, 0x3D, 0x9D, 0x74, 0x1E, 0x25, 0xDB, 0x37, 0x56, 0x8F, 0x16, 0xBA, 0x49, 0x2B, 0xAC, 0xD0, 0xBD, 0x95, 0x20, 0xBE, 0x7A, 0x28, 0xD0, 0x51, 0x64, 0x63, 0x1C, 0x7F, 0x66, 0x10, 0xBB, 0xC4, 0x56, 0x1A, 0x04, 0x6E, 0x0A, 0xEC, 0x9C, 0xD6, 0xE8, 0x9A, 0x7A, 0xCF, 0x8C, 0xDB, 0xB1, 0xEF, 0x71, 0xDE, 0x31, 0xFF, 0x54, 0x3E, 0x5E, 0x07, 0x69, 0x96, 0xB0, 0xCF, 0xDD, 0x9E, 0x47, 0xC7, 0x96, 0x8F, 0xE4, 0x2B, 0x59, 0xC6, 0xEE, 0xB9, 0x86, 0x9A, 0x64, 0x84, 0x72, 0xE2, 0x5B, 0xA2, 0x96, 0x58, 0x99, 0x50, 0x03, 0xF5, 0x38, 0x4D, 0x02, 0x7D, 0xE7, 0x7D, 0x75, 0xA7, 0xB8, 0x67, 0x87, 0x84, 0x3F, 0x1D, 0x11, 0xE5, 0xFC, 0x1E, 0xD3, 0x83, 0x16, 0xA5, 0x29, 0xF6, 0xC7, 0x15, 0x61, 0x29, 0x1A, 0x43, 0x4F, 0x9B, 0xAF, 0xC5, 0x87, 0x34, 0x6C, 0x0F, 0x3B, 0xA8, 0x1D, 0x45, 0x58, 0x25, 0xDC, 0xA8, 0xA3, 0x3B, 0xD1, 0x79, 0x1B, 0x48, 0xF2, 0xE9, 0x93, 0x1F, 0xFC, 0xDB, 0x2A, 0x90, 0xA9, 0x8A, 0x3D, 0x39, 0x18, 0xA3, 0x8E, 0x58, 0x6C, 0xE0, 0x12, 0xBB, 0x25, 0xCD, 0x71, 0x22, 0xA2, 0x64, 0xC6, 0xE7, 0xFB, 0xAD, 0x94, 0x77, 0x04, 0x9A, 0x39, 0xCF, 0x7C }; static unsigned char p_crypt_tab1[ 256 ] = { 0x8C, 0x47, 0xB0, 0xE1, 0xEB, 0xFC, 0xEB, 0x56, 0x10, 0xE5, 0x2C, 0x1A, 0x5D, 0xEF, 0xBE, 0x4F, 0x08, 0x75, 0x97, 0x4B, 0x0E, 0x25, 0x8E, 0x6E, 0x39, 0x5A, 0x87, 0x53, 0xC4, 0x1F, 0xF4, 0x5C, 0x4E, 0xE6, 0x99, 0x30, 0xE0, 0x42, 0x88, 0xAB, 0xE5, 0x85, 0xBC, 0x8F, 0xD8, 0x3C, 0x54, 0xC9, 0x53, 0x47, 0x18, 0xD6, 0x06, 0x5B, 0x41, 0x2C, 0x67, 0x1E, 0x41, 0x74, 0x33, 0xE2, 0xB4, 0xE0, 0x23, 0x29, 0x42, 0xEA, 0x55, 0x0F, 0x25, 0xB4, 0x24, 0x2C, 0x99, 0x13, 0xEB, 0x0A, 0x0B, 0xC9, 0xF9, 0x63, 0x67, 0x43, 0x2D, 0xC7, 0x7D, 0x07, 0x60, 0x89, 0xD1, 0xCC, 0xE7, 0x94, 0x77, 0x74, 0x9B, 0x7E, 0xD7, 0xE6, 0xFF, 0xBB, 0x68, 0x14, 0x1E, 0xA3, 0x25, 0xDE, 0x3A, 0xA3, 0x54, 0x7B, 0x87, 0x9D, 0x50, 0xCA, 0x27, 0xC3, 0xA4, 0x50, 0x91, 0x27, 0xD4, 0xB0, 0x82, 0x41, 0x97, 0x79, 0x94, 0x82, 0xAC, 0xC7, 0x8E, 0xA5, 0x4E, 0xAA, 0x78, 0x9E, 0xE0, 0x42, 0xBA, 0x28, 0xEA, 0xB7, 0x74, 0xAD, 0x35, 0xDA, 0x92, 0x60, 0x7E, 0xD2, 0x0E, 0xB9, 0x24, 0x5E, 0x39, 0x4F, 0x5E, 0x63, 0x09, 0xB5, 0xFA, 0xBF, 0xF1, 0x22, 0x55, 0x1C, 0xE2, 0x25, 0xDB, 0xC5, 0xD8, 0x50, 0x03, 0x98, 0xC4, 0xAC, 0x2E, 0x11, 0xB4, 0x38, 0x4D, 0xD0, 0xB9, 0xFC, 0x2D, 0x3C, 0x08, 0x04, 0x5A, 0xEF, 0xCE, 0x32, 0xFB, 0x4C, 0x92, 0x1E, 0x4B, 0xFB, 0x1A, 0xD0, 0xE2, 0x3E, 0xDA, 0x6E, 0x7C, 0x4D, 0x56, 0xC3, 0x3F, 0x42, 0xB1, 0x3A, 0x23, 0x4D, 0x6E, 0x84, 0x56, 0x68, 0xF4, 0x0E, 0x03, 0x64, 0xD0, 0xA9, 0x92, 0x2F, 0x8B, 0xBC, 0x39, 0x9C, 0xAC, 0x09, 0x5E, 0xEE, 0xE5, 0x97, 0xBF, 0xA5, 0xCE, 0xFA, 0x28, 0x2C, 0x6D, 0x4F, 0xEF, 0x77, 0xAA, 0x1B, 0x79, 0x8E, 0x97, 0xB4, 0xC3, 0xF4 }; static unsigned char p_crypt_tab2[ 256 ] = { 0xB7, 0x75, 0x81, 0xD5, 0xDC, 0xCA, 0xDE, 0x66, 0x23, 0xDF, 0x15, 0x26, 0x62, 0xD1, 0x83, 0x77, 0xE3, 0x97, 0x76, 0xAF, 0xE9, 0xC3, 0x6B, 0x8E, 0xDA, 0xB0, 0x6E, 0xBF, 0x2B, 0xF1, 0x19, 0xB4, 0x95, 0x34, 0x48, 0xE4, 0x37, 0x94, 0x5D, 0x7B, 0x36, 0x5F, 0x65, 0x53, 0x07, 0xE2, 0x89, 0x11, 0x98, 0x85, 0xD9, 0x12, 0xC1, 0x9D, 0x84, 0xEC, 0xA4, 0xD4, 0x88, 0xB8, 0xFC, 0x2C, 0x79, 0x28, 0xD8, 0xDB, 0xB3, 0x1E, 0xA2, 0xF9, 0xD0, 0x44, 0xD7, 0xD6, 0x60, 0xEF, 0x14, 0xF4, 0xF6, 0x31, 0xD2, 0x41, 0x46, 0x67, 0x0A, 0xE1, 0x58, 0x27, 0x43, 0xA3, 0xF8, 0xE0, 0xC8, 0xBA, 0x5A, 0x5C, 0x80, 0x6C, 0xC6, 0xF2, 0xE8, 0xAD, 0x7D, 0x04, 0x0D, 0xB9, 0x3C, 0xC2, 0x25, 0xBD, 0x49, 0x63, 0x8C, 0x9F, 0x51, 0xCE, 0x20, 0xC5, 0xA1, 0x50, 0x92, 0x2D, 0xDD, 0xBC, 0x8D, 0x4F, 0x9A, 0x71, 0x2F, 0x30, 0x1D, 0x73, 0x39, 0x13, 0xFB, 0x1A, 0xCB, 0x24, 0x59, 0xFE, 0x05, 0x96, 0x57, 0x0F, 0x1F, 0xCF, 0x54, 0xBE, 0xF5, 0x06, 0x1B, 0xB2, 0x6D, 0xD3, 0x4D, 0x32, 0x56, 0x21, 0x33, 0x0B, 0x52, 0xE7, 0xAB, 0xEB, 0xA6, 0x74, 0x00, 0x4C, 0xB1, 0x7F, 0x82, 0x99, 0x87, 0x0E, 0x5E, 0xC0, 0x8F, 0xEE, 0x6F, 0x55, 0xF3, 0x7E, 0x08, 0x90, 0xFA, 0xB6, 0x64, 0x70, 0x47, 0x4A, 0x17, 0xA7, 0xB5, 0x40, 0x8A, 0x38, 0xE5, 0x68, 0x3E, 0x8B, 0x69, 0xAA, 0x9B, 0x42, 0xA5, 0x10, 0x01, 0x35, 0xFD, 0x61, 0x9E, 0xE6, 0x16, 0x9C, 0x86, 0xED, 0xCD, 0x2E, 0xFF, 0xC4, 0x5B, 0xA0, 0xAE, 0xCC, 0x4B, 0x3B, 0x03, 0xBB, 0x1C, 0x2A, 0xAC, 0x0C, 0x3F, 0x93, 0xC7, 0x72, 0x7A, 0x09, 0x22, 0x3D, 0x45, 0x78, 0xA9, 0xA8, 0xEA, 0xC9, 0x6A, 0xF7, 0x29, 0x91, 0xF0, 0x02, 0x18, 0x3A, 0x4E, 0x7C }; static unsigned char p_crypt_tab3[ 288 ] = { 0x73, 0x51, 0x95, 0xE1, 0x12, 0xE4, 0xC0, 0x58, 0xEE, 0xF2, 0x08, 0x1B, 0xA9, 0xFA, 0x98, 0x4C, 0xA7, 0x33, 0xE2, 0x1B, 0xA7, 0x6D, 0xF5, 0x30, 0x97, 0x1D, 0xF3, 0x02, 0x60, 0x5A, 0x82, 0x0F, 0x91, 0xD0, 0x9C, 0x10, 0x39, 0x7A, 0x83, 0x85, 0x3B, 0xB2, 0xB8, 0xAE, 0x0C, 0x09, 0x52, 0xEA, 0x1C, 0xE1, 0x8D, 0x66, 0x4F, 0xF3, 0xDA, 0x92, 0x29, 0xB9, 0xD5, 0xC5, 0x77, 0x47, 0x22, 0x53, 0x14, 0xF7, 0xAF, 0x22, 0x64, 0xDF, 0xC6, 0x72, 0x12, 0xF3, 0x75, 0xDA, 0xD7, 0xD7, 0xE5, 0x02, 0x9E, 0xED, 0xDA, 0xDB, 0x4C, 0x47, 0xCE, 0x91, 0x06, 0x06, 0x6D, 0x55, 0x8B, 0x19, 0xC9, 0xEF, 0x8C, 0x80, 0x1A, 0x0E, 0xEE, 0x4B, 0xAB, 0xF2, 0x08, 0x5C, 0xE9, 0x37, 0x26, 0x5E, 0x9A, 0x90, 0x00, 0xF3, 0x0D, 0xB2, 0xA6, 0xA3, 0xF7, 0x26, 0x17, 0x48, 0x88, 0xC9, 0x0E, 0x2C, 0xC9, 0x02, 0xE7, 0x18, 0x05, 0x4B, 0xF3, 0x39, 0xE1, 0x20, 0x02, 0x0D, 0x40, 0xC7, 0xCA, 0xB9, 0x48, 0x30, 0x57, 0x67, 0xCC, 0x06, 0xBF, 0xAC, 0x81, 0x08, 0x24, 0x7A, 0xD4, 0x8B, 0x19, 0x8E, 0xAC, 0xB4, 0x5A, 0x0F, 0x73, 0x13, 0xAC, 0x9E, 0xDA, 0xB6, 0xB8, 0x96, 0x5B, 0x60, 0x88, 0xE1, 0x81, 0x3F, 0x07, 0x86, 0x37, 0x2D, 0x79, 0x14, 0x52, 0xEA, 0x73, 0xDF, 0x3D, 0x09, 0xC8, 0x25, 0x48, 0xD8, 0x75, 0x60, 0x9A, 0x08, 0x27, 0x4A, 0x2C, 0xB9, 0xA8, 0x8B, 0x8A, 0x73, 0x62, 0x37, 0x16, 0x02, 0xBD, 0xC1, 0x0E, 0x56, 0x54, 0x3E, 0x14, 0x5F, 0x8C, 0x8F, 0x6E, 0x75, 0x1C, 0x07, 0x39, 0x7B, 0x4B, 0xDB, 0xD3, 0x4B, 0x1E, 0xC8, 0x7E, 0xFE, 0x3E, 0x72, 0x16, 0x83, 0x7D, 0xEE, 0xF5, 0xCA, 0xC5, 0x18, 0xF9, 0xD8, 0x68, 0xAB, 0x38, 0x85, 0xA8, 0xF0, 0xA1, 0x73, 0x9F, 0x5D, 0x19, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x72, 0x39, 0x25, 0x67, 0x26, 0x6D, 0x71, 0x36, 0x77, 0x3C, 0x20, 0x62, 0x23, 0x68, 0x74, 0xC3, 0x82, 0xC9, 0x15, 0x57, 0x16, 0x5D, 0x81 }; qpxtool-0.7.1_002/lib/qpxtransport/qpx_transport.cpp0000644000175000001440000006534711265027372022065 0ustar shultzusers// // This is part of dvd+rw-tools by Andy Polyakov // // Use-it-on-your-own-risk, GPL bless... // // For further details see http://fy.chalmers.se/~appro/linux/DVD+RW/ // // // modified to use with QPxTool http://qpxtool.sf.net (C) 2005-2009, Gennady "ShultZ" Kozlov // #include #include "qpx_transport.h" const unsigned char scsi_command_size[8] = { 6, 10, 10, 12, 16, 12, 10, 10 }; #define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7] #if defined(__unix) || defined(__unix__) #include #include #include //#include //#include #include //#include #include long getmsecs() { struct timeval tv; gettimeofday (&tv,NULL); return tv.tv_sec*1000+tv.tv_usec/1000; } long getusecs() { struct timeval tv; gettimeofday (&tv,NULL); return tv.tv_sec*1000000+tv.tv_usec; } #include #ifndef EMEDIUMTYPE #define EMEDIUMTYPE EINVAL #endif #ifndef ENOMEDIUM #define ENOMEDIUM ENODEV #endif //* #elif defined(_WIN32) #include #include #define EINVAL ERROR_BAD_ARGUMENTS #define ENOMEM ERROR_OUTOFMEMORY #define EMEDIUMTYPE ERROR_MEDIA_INCOMPATIBLE #define ENOMEDIUM ERROR_MEDIA_OFFLINE #define ENODEV ERROR_BAD_COMMAND #define EAGAIN ERROR_NOT_READY #define ENOSPC ERROR_DISK_FULL #define EIO ERROR_NOT_SUPPORTED #define ENXIO ERROR_GEN_FAILURE static class _win32_errno { public: operator int() { return GetLastError(); } int operator=(int e) { SetLastError(e); return e; } } _sys_errno; #ifdef errno #undef errno #endif #define errno _sys_errno inline void perror (const char *str) { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, // Default language (LPTSTR) &lpMsgBuf, 0, NULL ); if (str) fprintf (stderr,"%s: %s",str,lpMsgBuf); else fprintf (stderr,"%s",lpMsgBuf); LocalFree(lpMsgBuf); } #define exit(e) ExitProcess(e) #endif // _WIN32 void sperror (const char *cmd,int err) //, Scsi_Command *scsi) { int saved_errno=errno; char sense_str[255]; sense2str(err, sense_str); if (err==-1) { fprintf (stderr,"\n:-( unable to %s : [%d] ", cmd, saved_errno); errno=saved_errno, perror (NULL); } else fprintf (stderr,"\n:-[ %s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh]: %s\n", cmd, SK(err), ASC(err), ASCQ(err),sense_str); } autofree::autofree() { ptr=NULL; } autofree::~autofree() { if (ptr) free(ptr); } #if defined(__linux) #include #include #include #include #include #include #include #include #if !defined(SG_FLAG_LUN_INHIBIT) # if defined(SG_FLAG_UNUSED_LUN_INHIBIT) # define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT # else # define SG_FLAG_LUN_INHIBIT 0 # endif #endif #ifndef CHECK_CONDITION #define CHECK_CONDITION 0x01 #endif #ifdef SG_IO USE_SG_IO::USE_SG_IO() { struct utsname buf; uname (&buf); // was CDROM_SEND_PACKET declared dead in 2.5? yes_or_no=(strcmp(buf.release,"2.5.43")>=0); } USE_SG_IO::~USE_SG_IO(){} #endif Scsi_Command::Scsi_Command() { fd=-1, autoclose=1; filename=NULL; } Scsi_Command::Scsi_Command(int f) { fd=f, autoclose=0; filename=NULL; } Scsi_Command::Scsi_Command(void*f) { fd=(long)f, autoclose=0; filename=NULL; } Scsi_Command::~Scsi_Command() { if (fd>=0 && autoclose) close(fd),fd=-1; if (filename) free(filename),filename=NULL; } int Scsi_Command::associate (const char *file,const struct stat *ref=NULL) { struct stat sb; /* * O_RDWR is expected to provide for none set-root-uid * execution under Linux kernel 2.6[.8]. Under 2.4 it * falls down to O_RDONLY... */ if ((fd=open (file,O_RDWR|O_NONBLOCK)) < 0 && (fd=open (file,O_RDONLY|O_NONBLOCK)) < 0) return 0; if (fstat(fd,&sb) < 0) return 0; if (!S_ISBLK(sb.st_mode)) { errno=ENOTBLK;return 0; } if (ref && (!S_ISBLK(ref->st_mode) || ref->st_rdev!=sb.st_rdev)) { errno=ENXIO; return 0; } filename=strdup(file); return 1; } int Scsi_Command::transport(Direction dir,void *buf,size_t sz) { int ret = 0; #ifdef SG_IO #define KERNEL_BROKEN 0 if (use_sg_io) { sg_io.dxferp = buf; sg_io.dxfer_len = sz; sg_io.dxfer_direction = use_sg_io[dir]; /* cmd length fix */ // printf("opcode: %02X, cmd.len: %d\n",sg_io.cmdp[0],sg_io.cmd_len); sg_io.cmd_len = (sg_io.cmd_len < COMMAND_SIZE(sg_io.cmdp[0])) ? COMMAND_SIZE(sg_io.cmdp[0]):sg_io.cmd_len; // printf("new cmd.len: %d\n",sg_io.cmd_len); if (ioctl (fd,SG_IO,&sg_io)) return -1; #if !KERNEL_BROKEN if ((sg_io.info&SG_INFO_OK_MASK) != SG_INFO_OK) #else if (sg_io.status) #endif { errno=EIO; ret=-1; #if !KERNEL_BROKEN if (sg_io.masked_status&CHECK_CONDITION) #endif { ret = ERRCODE(sg_io.sbp); if (ret==0) ret=-1; else CREAM_ON_ERRNO(sg_io.sbp); } } return ret; } else #undef KERNEL_BROKEN #endif { cgc.buffer = (unsigned char *)buf; cgc.buflen = sz; cgc.data_direction = dir; if (ioctl (fd,CDROM_SEND_PACKET,&cgc)) { ret = ERRCODE(_sense.u); if (ret==0) ret=-1; } } return ret; } unsigned char &Scsi_Command::operator[] (size_t i) { if (i==0) { memset(&cgc,0,sizeof(cgc)), memset(&_sense,0,sizeof(_sense)); cgc.quiet = 1; cgc.sense = &_sense.s; #ifdef SG_IO if (use_sg_io) { memset(&sg_io,0,sizeof(sg_io)); sg_io.interface_id= 'S'; sg_io.mx_sb_len = sizeof(_sense); sg_io.cmdp = cgc.cmd; sg_io.sbp = _sense.u; sg_io.flags = SG_FLAG_LUN_INHIBIT|SG_FLAG_DIRECT_IO; } #endif } sg_io.cmd_len = i+1; return cgc.cmd[i]; } unsigned char &Scsi_Command::operator()(size_t i) { return _sense.u[i]; } unsigned char *Scsi_Command::sense() { return _sense.u; } void Scsi_Command::timeout(int i) { cgc.timeout=sg_io.timeout=i*1000; } #ifdef SG_IO size_t Scsi_Command::residue() { return use_sg_io?sg_io.resid:0; } #else size_t Scsi_Command::residue() { return 0; } #endif int Scsi_Command::umount(int f) { struct stat fsb,msb; struct mntent *mb; FILE *fp; pid_t pid,rpid; int ret=0,rval; if (f==-1) f=fd; if (fstat (f,&fsb) < 0) return -1; if ((fp=setmntent ("/proc/mounts","r"))==NULL) return -1; while ((mb=getmntent (fp))!=NULL) { if (stat (mb->mnt_fsname,&msb) < 0) continue; // corrupted line? if (msb.st_rdev == fsb.st_rdev) { ret = -1; if ((pid = fork()) == (pid_t)-1) break; if (pid == 0) execl ("/bin/umount","umount",mb->mnt_dir,NULL); while (1) { rpid = waitpid (pid,&rval,0); if (rpid == (pid_t)-1) { if (errno==EINTR) continue; else break; } else if (rpid != pid) { errno = ECHILD; break; } if (WIFEXITED(rval)) { if (WEXITSTATUS(rval) == 0) ret=0; else errno=EBUSY; // most likely break; } else { errno = ENOLINK; // some phony errno break; } } break; } } endmntent (fp); return ret; } int Scsi_Command::is_reload_needed () { return ioctl (fd,CDROM_MEDIA_CHANGED,CDSL_CURRENT) == 0; } #elif defined(__OpenBSD__) || defined(__NetBSD__) #include #include #include #include #include typedef off_t off64_t; #define stat64 stat #define fstat64 fstat #define open64 open #define pread64 pread #define pwrite64 pwrite #define lseek64 lseek Scsi_Command::Scsi_Command() { fd=-1, autoclose=1; filename=NULL; } Scsi_Command::Scsi_Command(int f) { fd=f, autoclose=0; filename=NULL; } Scsi_Command::Scsi_Command(void*f){ fd=(long)f, autoclose=0; filename=NULL; } Scsi_Command::~Scsi_Command() { if (fd>=0 && autoclose) close(fd),fd=-1; if (filename) free(filename),filename=NULL; } int Scsi_Command::associate (const char *file,const struct stat *ref) { struct stat sb; fd=open(file,O_RDWR|O_NONBLOCK); // this is --^^^^^^-- why we have to run set-root-uid... if (fd < 0) return 0; if (fstat(fd,&sb) < 0) return 0; if (!S_ISCHR(sb.st_mode)) { errno=EINVAL; return 0; } if (ref && (!S_ISCHR(ref->st_mode) || ref->st_rdev!=sb.st_rdev)) { errno=ENXIO; return 0; } filename=strdup(file); return 1; } unsigned char &Scsi_Command::operator[] (size_t i) { if (i==0) { memset(&req,0,sizeof(req)); req.flags = SCCMD_ESCAPE; req.timeout = 30000; req.senselen = 18; //sizeof(req.sense); } req.cmdlen = i+1; return req.cmd[i]; } unsigned char &Scsi_Command::operator()(size_t i) { return req.sense[i]; } unsigned char *Scsi_Command::sense() { return req.sense; } void Scsi_Command::timeout(int i) { req.timeout=i*1000; } size_t Scsi_Command::residue() { return req.datalen-req.datalen_used; } int Scsi_Command::transport(Direction dir,void *buf,size_t sz) { int ret=0; /* cmd length fix */ // printf("CMD: (%2d) %02x\n", req.cmdlen, req.cmd[0]); req.cmdlen = (req.cmdlen < COMMAND_SIZE(req.cmd[0])) ? COMMAND_SIZE(req.cmd[0]):req.cmdlen; req.databuf = (caddr_t)buf; req.datalen = sz; req.flags |= dir; if (ioctl (fd,SCIOCCOMMAND,&req) < 0) return -1; if (req.retsts==SCCMD_OK) return 0; errno=EIO; ret=-1; if (req.retsts==SCCMD_SENSE) { ret = ERRCODE(req.sense); if (ret==0) ret=-1; else CREAM_ON_ERRNO(req.sense); } return ret; } // this code is basically redundant... indeed, we normally want to // open device O_RDWR, but we can't do that as long as it's mounted. // in other words, whenever this routine is invoked, device is not // mounted, so that it could as well just return 0; int Scsi_Command::umount(int f) { struct stat fsb,msb; #if defined(__NetBSD__) struct statvfs *mntbuf; #else struct statfs *mntbuf; #endif int ret=0,mntsize,i; if (f==-1) f=fd; if (fstat (f,&fsb) < 0) return -1; if ((mntsize=getmntinfo(&mntbuf,MNT_NOWAIT))==0)return -1; for (i=0;i #include #include #include #include #include #include #include typedef off_t off64_t; #define stat64 stat #define fstat64 fstat #define open64 open #define pread64 pread #define pwrite64 pwrite #define lseek64 lseek #define ioctl_fd (((struct cam_device *)ioctl_handle)->fd) Scsi_Command::Scsi_Command() { cam=NULL, fd=-1, autoclose=1; filename=NULL; } Scsi_Command::Scsi_Command(int f) { char pass[32]; // periph_name is 16 chars long cam=NULL, fd=-1, autoclose=1, filename=NULL; memset (&ccb,0,sizeof(ccb)); ccb.ccb_h.func_code = XPT_GDEVLIST; if (ioctl (f,CAMGETPASSTHRU,&ccb) < 0) return; sprintf (pass,"/dev/%.15s%u",ccb.cgdl.periph_name,ccb.cgdl.unit_number); cam=cam_open_pass (pass,O_RDWR,NULL); } Scsi_Command::Scsi_Command(void *f) { cam=(struct cam_device *)f, autoclose=0; fd=-1; filename=NULL; } Scsi_Command::~Scsi_Command() { if (cam && autoclose) cam_close_device(cam), cam=NULL; if (fd>=0) close(fd); if (filename) free(filename), filename=NULL; } int Scsi_Command::associate (const char *file,const struct stat *ref) { struct stat sb; char pass[32]; // periph_name is 16 chars long fd=open(file,O_RDONLY|O_NONBLOCK); // all if (ref) code is actually redundant, it never runs // as long as RELOAD_NEVER_NEEDED... if (ref && fd<0 && errno==EPERM) { // expectedly we would get here if file is /dev/passN if (stat(file,&sb) < 0) return 0; if (!S_ISCHR(ref->st_mode) || ref->st_rdev!=sb.st_rdev) return (errno=ENXIO,0); fd=open(file,O_RDWR); } if (fd < 0) return 0; if (fstat(fd,&sb) < 0) return 0; if (!S_ISCHR(sb.st_mode)) return (errno=EINVAL,0); if (ref && (!S_ISCHR(ref->st_mode) || ref->st_rdev!=sb.st_rdev)) return (errno=ENXIO,0); memset (&ccb,0,sizeof(ccb)); ccb.ccb_h.func_code = XPT_GDEVLIST; if (ioctl(fd,CAMGETPASSTHRU,&ccb)<0) return (close(fd),fd=-1,0); sprintf (pass,"/dev/%.15s%u",ccb.cgdl.periph_name,ccb.cgdl.unit_number); cam=cam_open_pass (pass,O_RDWR,NULL); if (cam==NULL) return (close(fd),fd=-1,0); filename=strdup(file); return 1; } unsigned char& Scsi_Command::operator[] (size_t i) { if (i==0) { memset(&ccb,0,sizeof(ccb)); ccb.ccb_h.path_id = cam->path_id; ccb.ccb_h.target_id = cam->target_id; ccb.ccb_h.target_lun = cam->target_lun; cam_fill_csio (&(ccb.csio), 1, // retries NULL, // cbfncp CAM_DEV_QFRZDIS, // flags MSG_SIMPLE_Q_TAG, // tag_action NULL, // data_ptr 0, // dxfer_len sizeof(ccb.csio.sense_data), // sense_len 0, // cdb_len 30*1000); // timeout } ccb.csio.cdb_len = i+1; return ccb.csio.cdb_io.cdb_bytes[i]; } unsigned char& Scsi_Command::operator()(size_t i) { return ((unsigned char *)&ccb.csio.sense_data)[i]; } unsigned char *Scsi_Command::sense() { return (unsigned char*)&ccb.csio.sense_data; } void Scsi_Command::timeout(int i) { ccb.ccb_h.timeout=i*1000; } size_t Scsi_Command::residue() { return ccb.csio.resid; } int Scsi_Command::transport(Direction dir,void *buf,size_t sz) { int ret=0; ccb.csio.ccb_h.flags |= dir; ccb.csio.data_ptr = (u_int8_t *)buf; ccb.csio.dxfer_len = sz; if ((ret = cam_send_ccb(cam, &ccb)) < 0) return -1; if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) return 0; /* cmd length fix */ // printf("CMD: (%2d) %02x\n", ccb.csio.cdb_len, ccb.csio.cdb_io.cdb_bytes[0]); ccb.csio.cdb_len = (ccb.csio.cdb_len < COMMAND_SIZE(ccb.csio.cdb_io.cdb_bytes[0])) ? COMMAND_SIZE(ccb.csio.cdb_io.cdb_bytes[0]):ccb.csio.cdb_len; unsigned char *sense=(unsigned char *)&ccb.csio.sense_data; errno = EIO; // FreeBSD 5-CURRENT since 2003-08-24, including 5.2 fails to // pull sense data automatically, at least for ATAPI transport, // so I reach for it myself... if ((ccb.csio.scsi_status==SCSI_STATUS_CHECK_COND) && !(ccb.ccb_h.status&CAM_AUTOSNS_VALID)) { u_int8_t _sense[18]; u_int32_t resid=ccb.csio.resid; memset(_sense,0,sizeof(_sense)); operator[](0) = 0x03; // REQUEST SENSE ccb.csio.cdb_io.cdb_bytes[4] = sizeof(_sense); ccb.csio.cdb_len = 6; ccb.csio.ccb_h.flags |= CAM_DIR_IN|CAM_DIS_AUTOSENSE; ccb.csio.data_ptr = _sense; ccb.csio.dxfer_len = sizeof(_sense); ccb.csio.sense_len = 0; ret = cam_send_ccb(cam, &ccb); ccb.csio.resid = resid; if (ret<0) return -1; if ((ccb.ccb_h.status&CAM_STATUS_MASK) != CAM_REQ_CMP) return errno=EIO,-1; memcpy(sense,_sense,sizeof(_sense)); } ret = ERRCODE(sense); if (ret == 0) ret = -1; else CREAM_ON_ERRNO(sense); return ret; } int Scsi_Command::umount(int f) { struct stat fsb,msb; struct statfs *mntbuf; int ret=0,mntsize,i; if (f==-1) f=fd; if (fstat (f,&fsb) < 0) return -1; if ((mntsize=getmntinfo(&mntbuf,MNT_NOWAIT))==0)return -1; for (i=0;i1) DeviceIoControl(fd,FSCTL_UNLOCK_VOLUME, NULL,0,NULL,0,&junk,NULL); CloseHandle (fd),fd=INVALID_HANDLE_VALUE; } if (filename) free(filename),filename=NULL; } int Scsi_Command::associate (const char *file,const struct stat *ref) { char dev[32]; sprintf(dev,"%.*s\\",sizeof(dev)-2,file); if (GetDriveType(dev)!=DRIVE_CDROM) return errno=EINVAL,0; sprintf(dev,"\\\\.\\%.*s",sizeof(dev)-5,file); fd=CreateFile (dev,GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,OPEN_EXISTING,0,NULL); if (fd!=INVALID_HANDLE_VALUE) filename=strdup(dev); return fd!=INVALID_HANDLE_VALUE; } unsigned char &Scsi_Command::operator[] (size_t i) { if (i==0) { memset(&p,0,sizeof(p)); p.spt.Length = sizeof(p.spt); p.spt.DataIn = SCSI_IOCTL_DATA_UNSPECIFIED; p.spt.TimeOutValue = 30; p.spt.SenseInfoLength = sizeof(p.sense); p.spt.SenseInfoOffset = offsetof(SPKG,sense); } p.spt.CdbLength = i+1; return p.spt.Cdb[i]; } unsigned char &Scsi_Command::operator()(size_t i) { return p.sense[i]; } unsigned char *Scsi_Command::sense() { return p.sense; }; void Scsi_Command::timeout(int i) { p.spt.TimeOutValue=i; } int Scsi_Command::transport(Direction dir,void *buf,size_t sz) { DWORD bytes; int ret=0; /* cmd length fix */ // printf("CMD: (%2d) %02x\n", p.spt.CdbLength, p.spt.Cdb[0]); p.spt.CdbLength = (p.spt.CdbLength < COMMAND_SIZE(p.spt.Cdb[0])) ? COMMAND_SIZE(p.spt.Cdb[0]):p.spt.CdbLength; p.spt.DataBuffer = buf; p.spt.DataTransferLength = sz; p.spt.DataIn = dir; if (DeviceIoControl (fd,IOCTL_SCSI_PASS_THROUGH_DIRECT, &p,sizeof(p.spt), &p,sizeof(p), &bytes,FALSE) == 0) return -1; if (p.sense[0]&0x70) { SetLastError (ERROR_GEN_FAILURE); ret = ERRCODE(p.sense); if (ret==0) ret=-1; else CREAM_ON_ERRNO(p.sense); } #if 0 else if (p.spt.Cdb[0] == 0x00) // TEST UNIT READY { unsigned char _sense[18]; operator[](0) = 0x03; // REQUEST SENSE p.spt.Cdb[4] = sizeof(_sense); p.spt.CdbLength = 6; p.spt.DataBuffer = _sense; p.spt.DataTransferLength = sizeof(_sense); p.spt.DataIn = READ; if (DeviceIoControl (fd,IOCTL_SCSI_PASS_THROUGH_DIRECT, &p,sizeof(p.spt), &p,sizeof(p), &bytes,FALSE) == 0) return -1; if ((ret = ERRCODE(_sense))) CREAM_ON_ERRNO(_sense); } #endif return ret; } int Scsi_Command::umount (int f) { DWORD junk; HANDLE h = (f==-1) ? fd : (HANDLE)f; if (DeviceIoControl(h,FSCTL_LOCK_VOLUME,NULL,0,NULL,0,&junk,NULL) && DeviceIoControl(h,FSCTL_DISMOUNT_VOLUME,NULL,0,NULL,0,&junk,NULL)) { if (h==fd) autoclose++; return 0; } return -1; } int Scsi_Command::is_reload_needed () { return 0; } //*/ #elif defined (__APPLE__) && defined (__MACH__) static int iokit_err (IOReturn ioret,SCSITaskStatus stat, const unsigned char *sense) { int ret=-1; if (ioret==kIOReturnSuccess) ret = 0; else if (ioret==kIOReturnNoDevice) errno = ENXIO; else if (ioret==kIOReturnNoMemory) errno = ENOMEM; else if (ioret==kIOReturnExclusiveAccess) errno = EBUSY; else errno = EIO; if (ret) return ret; if (stat==kSCSITaskStatus_CHECK_CONDITION) { ret = ERRCODE(sense); if (ret==0) errno=EIO, ret=-1; else CREAM_ON_ERRNO(sense); } else if (stat!=kSCSITaskStatus_GOOD) errno = EIO, ret = -1; return ret; } Scsi_Command::Scsi_Command() { scsiob=IO_OBJECT_NULL, plugin=NULL, mmcdif=NULL, taskif=NULL; autoclose=1; filename=NULL; } Scsi_Command::Scsi_Command(void *f) { taskif = (SCSITaskDeviceInterface **)f, autoclose=0; filename=NULL; } Scsi_Command::~Scsi_Command() { if (autoclose) { if (taskif) (*taskif)->ReleaseExclusiveAccess(taskif), (*taskif)->Release(taskif), taskif=NULL; if (mmcdif) (*mmcdif)->Release(mmcdif), mmcdif=NULL; if (plugin) IODestroyPlugInInterface(plugin), plugin=NULL; if (scsiob) IOObjectRelease(scsiob), scsiob=IO_OBJECT_NULL; } if (filename) free(filename), filename=NULL; } int Scsi_Command::associate (const char *file,const struct stat *ref) { struct stat sb; io_object_t scsiob=IO_OBJECT_NULL,parent; CFMutableDictionaryRef match,bsddev; CFNumberRef num; int i; if (ref) sb = *ref; else if (stat(file,&sb)) return 0; if (!(S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode))) return !(errno=ENOTBLK); if ((match = CFDictionaryCreateMutable(kCFAllocatorDefault,0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)) == NULL) return !(errno=ENOMEM); if ((bsddev = CFDictionaryCreateMutable(kCFAllocatorDefault,0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)) == NULL) return CFRelease(match),!(errno=ENOMEM); i = major(sb.st_rdev); num = CFNumberCreate(kCFAllocatorDefault,kCFNumberIntType,&i); CFDictionarySetValue(bsddev,CFSTR("BSD Major"),num); CFRelease(num); i = minor(sb.st_rdev); num = CFNumberCreate(kCFAllocatorDefault,kCFNumberIntType,&i); CFDictionarySetValue(bsddev,CFSTR("BSD Minor"),num); CFRelease(num); CFDictionarySetValue(match,CFSTR(kIOPropertyMatchKey),bsddev); CFRelease(bsddev); if ((scsiob = IOServiceGetMatchingService(kIOMasterPortDefault,match)) == IO_OBJECT_NULL) return !(errno=ENXIO); // traverse up to "SCSITaskAuthoringDevice" kern_return_t kret; while ((kret=IORegistryEntryGetParentEntry(scsiob,kIOServicePlane, &parent)) == kIOReturnSuccess) { CFStringRef uclient; const char *s; int cmp; IOObjectRelease(scsiob); scsiob = parent; uclient = (CFStringRef)IORegistryEntryCreateCFProperty(scsiob, CFSTR(kIOPropertySCSITaskDeviceCategory), kCFAllocatorDefault,0); if (uclient) { s = CFStringGetCStringPtr(uclient,kCFStringEncodingMacRoman); cmp = strcmp(s,kIOPropertySCSITaskAuthoringDevice); CFRelease(uclient); if (cmp==0) break; } } if (kret!=kIOReturnSuccess) { if (scsiob!=IO_OBJECT_NULL) IOObjectRelease(scsiob); return !(errno=ENXIO); } SInt32 score=0; if (IOCreatePlugInInterfaceForService(scsiob, kIOMMCDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugin,&score) != kIOReturnSuccess) { IOObjectRelease(scsiob); return !(errno=ENXIO); } if ((*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOMMCDeviceInterfaceID), (void**)&mmcdif) != S_OK) { IODestroyPlugInInterface(plugin), plugin=NULL; IOObjectRelease(scsiob); return !(errno=ENXIO); } if ((taskif = (*mmcdif)->GetSCSITaskDeviceInterface(mmcdif)) == NULL) { (*mmcdif)->Release(mmcdif), mmcdif=NULL; IODestroyPlugInInterface(plugin), plugin=NULL; IOObjectRelease(scsiob); return !(errno=ENXIO); } // // Note that in order to ObtainExclusiveAccess no corresponding // /dev/[r]diskN may remain open by that time. For reference, // acquiring exclusive access temporarily removes BSD block // storage device from I/O registry as well as corresponding // /dev entries. // if ((*taskif)->ObtainExclusiveAccess(taskif) != kIOReturnSuccess) { (*taskif)->Release(taskif), taskif=NULL; (*mmcdif)->Release(mmcdif), mmcdif=NULL; IODestroyPlugInInterface(plugin), plugin=NULL; IOObjectRelease(scsiob), scsiob=IO_OBJECT_NULL; return !(errno=EBUSY); } filename=strdup(file); return 1; } unsigned char& Scsi_Command::operator[] (size_t i) { if (i==0) { memset (cdb,0,sizeof(cdb)); memset (&_sense,0,sizeof(_sense)); _timeout = 30; } cdblen = i+1; return cdb[i]; } unsigned char& Scsi_Command::operator()(size_t i) { return _sense.u[i]; } unsigned char* Scsi_Command::sense() { return _sense.u; } void Scsi_Command::timeout(int i) { _timeout=i; } size_t Scsi_Command::residue() { return resid; } int Scsi_Command::transport(Direction dir,void *buf,size_t sz) { int ret=0; SCSITaskInterface **cmd; SCSITaskStatus stat; UInt64 bytes; IOVirtualRange range = { (IOVirtualAddress)buf, sz }; /* cmd length fix */ // printf("CMD: (%2d) %02x\n", cdblen, cdb[0]); cdblen = (cdblen < COMMAND_SIZE(cdb[0])) ? COMMAND_SIZE(cdb[0]):cdblen; resid = sz; cmd = (*taskif)->CreateSCSITask(taskif); if (cmd==NULL) return (errno=ENOMEM),-1; (*cmd)->SetCommandDescriptorBlock(cmd,cdb,cdblen); (*cmd)->SetScatterGatherEntries(cmd,&range,1,sz,dir); (*cmd)->SetTimeoutDuration(cmd,_timeout*1000); if ((*cmd)->ExecuteTaskSync(cmd,&_sense.s,&stat,&bytes) != kIOReturnSuccess) errno=EIO, ret=-1; else if (stat==kSCSITaskStatus_GOOD) { resid = sz - bytes; } else if (stat==kSCSITaskStatus_CHECK_CONDITION) { ret = ERRCODE(_sense.u); if (ret==0) errno=EIO, ret=-1; else CREAM_ON_ERRNO(_sense.u); } else { //SCSIServiceResponse resp; //(*taskif)->GetSCSIServiceResponse(taskif,&resp); errno=EIO, ret=-1; } (*cmd)->Release(cmd); return ret; } int Scsi_Command::umount(int f) { struct stat sb; dev_t ref; int i,n; if (f>=0) { if (fstat (f,&sb)) return -1; if (!S_ISCHR(sb.st_mode)) return errno=ENOTBLK,-1; ref = sb.st_rdev; // /dev/rdiskN and /dev/diskN have same st_rdev } else { char bsdname [16]; CFStringRef devname = (CFStringRef)IORegistryEntrySearchCFProperty ( scsiob,kIOServicePlane, CFSTR("BSD Name"), kCFAllocatorDefault, kIORegistryIterateRecursively); if (devname==NULL) return 0; // already exclusive sprintf (bsdname,"/dev/%.*s",(int)(sizeof(bsdname)-6), CFStringGetCStringPtr (devname,0)); CFRelease (devname); if (stat (bsdname,&sb)) return -1; ref = sb.st_rdev; } if ((n=getfsstat (NULL,0,MNT_NOWAIT)) < 0) return -1; n += 4, n *= sizeof(struct statfs); struct statfs *p = (struct statfs *)alloca(n); if ((n=getfsstat (p,n,MNT_NOWAIT)) < 0) return -1; for (i=0;if_mntfromname,&sb)==0 && S_ISBLK(sb.st_mode) && sb.st_rdev==ref) #if 0 // looks neat, but causes irritaing popups on console... return unmount (p->f_mntonname,0); #else { int ret=0,rval; pid_t pid,rpid; ret = -1; if ((pid = fork()) == (pid_t)-1) return -1; if (pid == 0) // if diskutil will be proven broken, // don't allow growisofs to be used as // attack vector... setuid (getuid ()), execl ("/usr/sbin/diskutil", "diskutil","unmount", p->f_mntonname,(void*)NULL), exit (errno); while (1) { rpid = waitpid (pid,&rval,0); if (rpid == (pid_t)-1) { if (errno==EINTR) continue; else break; } else if (rpid != pid) { errno = ECHILD; break; } if (WIFEXITED(rval)) { if (WEXITSTATUS(rval) == 0) ret=0; else errno=EBUSY; // most likely break; } else if (WIFSTOPPED(rval) || WIFCONTINUED(rval)) continue; else { errno = ENOLINK; // some phony errno break; } } // diskutil(8) seem to unmount only volfs-managed // media, so I check if it managed to unmount and // try the system call if it didn't... if (ret==0) { struct statfs fs; if (statfs (p->f_mntonname,&fs)==0 && !strcmp (fs.f_mntfromname,p->f_mntfromname)) return unmount (p->f_mntonname,0); } return ret; } #endif } return 0; // not mounted? } #define RELOAD_NEVER_NEEDED int Scsi_Command::is_reload_needed(int not_used) { return 0; } #else #error "Unsupported OS" #endif qpxtool-0.7.1_002/lib/qpxscan/0000755000175000001440000000000011352127612015301 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxscan/Makefile0000644000175000001440000000055211330262245016741 0ustar shultzusersSRC = qpx_scan \ qpx_scan_algo \ qpx_writer HDRS = include/qpx_scan.h \ include/qpx_scan_plugin_api.h \ include/qpx_writer.h LIBN = qpxscan SRCS = $(patsubst %,%.cpp, $(SRC)) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) VER_MAJOR = 0 VER_MINOR = 7 VER_MICRO = 0 LDLIBS += $(LIBS_DL) -lqpxtransport -lqpxplextor -L../lib $(LIBS_INET) include ../Makefile.lib qpxtool-0.7.1_002/lib/qpxscan/qpx_scan_algo.cpp0000644000175000001440000005321711334461351020634 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #define EMAXLINE 1024 #define USE_FFLUSH //void qscanner::show_avg(struct timeval s, struct timeval e, long lba) void qscanner::show_avg_speed(long lba) { double btime; int spdKB; float spdX; btime = (e.tv_sec - s.tv_sec) + (e.tv_usec - s.tv_usec)/1000000.0; spdKB = (int) (((lba - lba_sta + 1) << 1) / btime); spdX = spdKB/(float)spd1X; printf("\nTest time: %6.2fs\navg speed: %5.3f X %5d kB/s\n", btime, spdX, spdKB); } void qscanner::calc_cur_speed(long sects) { double btime; // int spdKB; // float spdX; btime = (blke.tv_sec - blks.tv_sec) + (blke.tv_usec - blks.tv_usec)/1000000.0; spdKB = (int) ((sects << 1) / btime); spdX = spdKB/(float)spd1X; // printf("\nTest time: %6.2fs\navg speed: %5.3f X %5d kB/s\n", btime, spdX, spdKB); } int qscanner::readline(int fd, char *buf, int maxlen) { int cnt=0; char *cbuf=buf; int r; int sret; fd_set rd_set; timeval tv; FD_ZERO(&rd_set); if (tchar>=0) { cbuf[0] = tchar; cnt++; cbuf++; tchar = -1; } while ( !stop_req && (cnt<(maxlen-1))) { FD_SET(fd, &rd_set); tv.tv_sec = 1; tv.tv_usec = 0; #ifndef _WIN32 sret = select(fd+1, &rd_set, NULL, NULL, &tv); #else // sret = WaitForSingleObject((void*)fd, 1000); // errno = GetLastError(); sret = 1; errno = 0; #endif // printf("readline select(): %d, errno = [%d] %s\n", sret, errno, strerror(errno)); if (sret < 0) { printf("select(): %s\n", strerror(errno)); if (errno == EINTR) continue; return -1; } else if (sret > 0 && FD_ISSET(fd, &rd_set)) { r = read(fd, cbuf, 1); if (r<0) { printf("read = %d, %d, %s\n", r, errno, strerror(errno)); switch (errno) { case EAGAIN: printf("EAGAIN\n"); continue; case EINTR: printf("EINTR\n"); continue; default: return -1; } } if (!r) return -1; // look for CR/LF/CR+LF if (cnt && ((buf[cnt-1] == 0x0A) || (buf[cnt-1] == 0x0D))) { if (buf[cnt] != 0x0A && buf[cnt] != 0x0D) { tchar = buf[cnt]; // } else { // printf("cr+lf\n"); } buf[cnt-1]='\n'; buf[cnt]=0; return cnt; } cnt++; cbuf++; } } if (stop_req) return -1; buf[cnt]='\n'; buf[cnt+1]=0; return cnt+1; } // // CD/DVD read transfer rate // int qscanner::run_rd_transfer() { // int flushcnt = FLUSH_LINES; bool use_readcd = 0; int bsize = -1; int rsize = -1; long lba; // double btime; int err=0; int br =0; dev->parms.read_speed_kb = (int) (speed * dev->parms.speed_mult); set_rw_speeds(dev); get_rw_speeds(dev); speed = (int) (dev->parms.read_speed_kb / (dev->parms.speed_mult - 0.5)); if (dev->media.type & DISC_CD) { printf("Running READ transfer rate test on CD at speed %d...\n", speed); if (dev->capabilities & CAP_DAE) use_readcd = 1; rsize=15; //bsize=75; bsize = rsize*10; // 2 sec spd1X = 150; } else if (dev->media.type & DISC_DVD) { printf("Running READ transfer rate test on DVD at speed %d...\n", speed); rsize=16; bsize= rsize * 64; // 2M spd1X = 1385; // check if DVD is region-protected // dev->silent++; get_rpc_state(dev); read_disc_regions(dev); //dev->media.dvdcss.method = DVDCSS_METHOD_DISC; switch (dev->media.dvdcss.protection) { case 0: // unprotected DVD dev->media.dvdcss.method = DVDCSS_METHOD_NONE; break; case 1: // CSS/CPPM protected DVD case 2: // CPRM - protected DVD // just to auth to be able read data dev->media.dvdcss.method = DVDCSS_METHOD_KEY; if (css_disckey(dev)) { printf("DVD auth failure!\n"); return -1; } break; default: printf("Unknown DVD protection scheme: %02X\n",dev->media.dvdcss.protection); dev->media.dvdcss.method = DVDCSS_METHOD_NONE; break; } //dev->silent--; } else { printf("Can't run read transfer rate test: unsupported media!\n"); return -1; } if (stop_req) return 0; printf("Using %s command\n", use_readcd ? "READ CD" : "READ"); // set_read_speed(); // wait_unit_ready(dev, 6); spinup(dev, 4); // spin up (4 seconds) // flush_cache(dev); seek(dev, lba_sta); // wait_unit_ready(dev, 6); msleep(300); gettimeofday(&s, NULL); printf("Reading blocks: %ld - %ld (%ld MB)\n", lba_sta, lba_end, (lba_end-lba_sta) >> 9); gettimeofday(&blks, NULL); #ifdef USE_FFLUSH fflush(stdout); #endif for (lba=lba_sta; (!stop_req) && !err && lba=lba_end) rsize = lba_end-lba; if (use_readcd) err = read_cd(dev, dev->rd_buf, lba, rsize, 0xF8); else err = read(dev, dev->rd_buf, lba, rsize); br += rsize; if (err) { if ((err & 0x7FF00) == 0x23A00){ printf("Media removed! Terminating scan...\n"); } else { printf("Read error! Terminating scan...\n"); } } // printf("lba=%d +%d\n",lba,rsize); if (lba>lba_sta && (!(lba%bsize) || lba+rsize == lba_end || stat_req)) { gettimeofday(&blke, NULL); /* btime=(blke.tv_sec - blks.tv_sec) + (blke.tv_usec - blks.tv_usec)/1000000.0; spdKB = (bsize << 1) / btime; spdX = spdKB/(float)spd1X; */ calc_cur_speed( br ); printf("lba: %7ld speed: %6.2f X %6d kB/s\r", lba, spdX, spdKB); #ifdef USE_FFLUSH fflush(stdout); #endif gettimeofday(&blks, NULL); stat_req=0; br=0; } } gettimeofday(&e, NULL); show_avg_speed(lba); return 0; } #ifdef DISABLE_INTERNAL_WT int qscanner::run_wr_transfer() { ssize_t n; pid_t cpid; pipe_t pipefd; char linei[EMAXLINE+1]; char lines[16]; char linef[64]; int argc; char **argv; if (dev->media.type & DISC_CD) { printf("Running WRITE transfer rate test for CD at speed %d...\n", speed); } else if (dev->media.type & DISC_DVD) { printf("Running WRITE transfer rate test for DVD at speed %d...\n", speed); } // creating argv... argc = 0; argv = (char**) malloc(sizeof(char*)); argv[0] = NULL; // execlp("cat", "cat", "/home/kgs/cdrecord.log.cd", NULL); argv = add_arg(argv, &argc, "cdrecord"); sprintf(linei, "dev=%s", dev->device); argv = add_arg(argv, &argc, linei); argv = add_arg(argv, &argc, "-v"); if (WT_simul) argv = add_arg(argv, &argc, "-dummy"); argv = add_arg(argv, &argc, "gracetime=2"); argv = add_arg(argv, &argc, "driveropts=burnfree"); sprintf(lines, "speed=%d", speed); argv = add_arg(argv, &argc, lines); if (dev->media.type & DISC_DVDpRW) { sprintf(linef, "tsize=%dk", dev->media.capacity_total * 2); } else { sprintf(linef, "tsize=%dk", dev->media.capacity_free * 2); } argv = add_arg(argv, &argc, linef); argv = add_arg(argv, &argc, "-sao"); #ifndef _WIN32 argv = add_arg(argv, &argc, "/dev/zero"); #else argv = add_arg(argv, &argc, "ZERO"); #endif printf("qscan: starting cdrecord...\n"); printf("cdrecord args: \n"); for(int i=0; argv[i]; i++) printf("%s ",argv[i]); printf("\n"); // printf("DUMMY mode, not executing cdrecord\n"); // return 0; if ((cpid = createChildProcess(argv, &pipefd, NULL)) == -1) { printf("qscan: can't create child process\n"); return -1; } printf("qscan: child created, reading from pipe...\n"); int wn, woffs; while((n = readline((int)pipefd[0], linei, EMAXLINE))>=0) { // while((n = read(pipefd[0], lineo, EMAXLINE)) > 0) { // sprintf(linei,"\nread #%d: %d bytes\n\0",idx, n); // write(sockfd, linei, strlen(linei)); // idx++; // printf(lineo); woffs=0; while (woffsmedia.type & (DISC_CD)) { writer = new qpxwriter_cd(dev); wsize=25; bsize=150; spd1X = 176; } else if (dev->media.type & (DISC_DVDminus)) { writer = new qpxwriter_dvdminus(dev); wsize=32; bsize=1024; spd1X = 1385; } else if (dev->media.type & (DISC_DVDplus)) { writer = new qpxwriter_dvdplus(dev); wsize=32; bsize=1024; spd1X = 1385; } else if (dev->media.type & (DISC_DVDRAM)) { writer = new qpxwriter_dvdram(dev); wsize=32; bsize=1024; spd1X = 1385; } else { printf("Internal write transfer rate test not implemented for mounted media!"); return -1; } // lba_end = 4096; get_wbuffer_capacity(dev,&ubuft,&ubuff); printf("Write buffer capacity: %d kB\n", ubuft >> 10); wait_unit_ready(dev, 6); printf("Writing blocks: %ld - %ld (%ld MB)\n", lba_sta, lba_end, (lba_end-lba_sta) >> 9); dev->parms.write_speed_kb = speed * spd1X; set_rw_speeds(dev); get_rw_speeds(dev); writer->setSimul(WT_simul); if (dev->media.type & DISC_CD) { printf("Running write transfer rate test on CD at speed %d...\n", dev->parms.write_speed_kb / spd1X); spd1X = 150; } else if (dev->media.type & DISC_DVD) { printf("Running write transfer rate test on DVD at speed %d...\n", dev->parms.write_speed_kb / spd1X); } if (writer->open_session()) { printf("Can't open session!\n"); goto write_cleanup; } if (writer->send_opc()) { printf("OPC failed!\n"); goto write_cleanup; } if (writer->open_track(lba_end)) { printf("Can't start new track!\n"); goto write_cleanup; } printf("Starting write...\n"); memset(dev->rd_buf,0,bufsz_rd); gettimeofday(&s, NULL); gettimeofday(&blks, NULL); for (lba=lba_sta; !stop_req && !err && lba=lba_end) wsize = lba_end-lba; get_wbuffer_capacity(dev,&ubuft,&ubuff); // if (ubuff >=0 && ubuff<(wsize<<11)) { if ((ubuff >> 11)<((uint32_t)wsize)) { msleep(20); } if (wsize && writer->write_data(lba, wsize)) { printf("\nWrite error at sector %d (wsize=%d)\n", lba, wsize); stop_req = 1; } if (!(lba%bsize) || lba+wsize == lba_end || stat_req || stop_req || !wsize) { ubufp = (uint32_t) (ubuft ? 100*( 1.0f-ubuff/(float)ubuft) : 0); gettimeofday(&blke, NULL); /* btime=(blke.tv_sec - blks.tv_sec) + (blke.tv_usec - blks.tv_usec)/1000000.0; spdKB = (bsize << 1) / btime; spdX = spdKB/(float)spd1X; */ calc_cur_speed(((lba-1)%bsize) + 1); printf("lba: %7d speed: %6.2f X %6d kB/s, written: %4ldMB/%4ldMB, Ubuf: %3d%%\r", lba, spdX, spdKB, (lba-lba_sta) >> 9, (lba_end-lba_sta) >> 9, ubufp); gettimeofday(&blks, NULL); stat_req=0; #ifdef USE_FFLUSH fflush(stdout); #endif } } printf("\n"); gettimeofday(&e, NULL); show_avg_speed(lba); writer->close_track(); writer->fixate(); start_stop(dev,0); start_stop(dev,1); delete writer; writer = NULL; return 0; write_cleanup: printf("Errors before writing! cleaning up...\n"); flush_cache(dev,true); start_stop(dev,0); start_stop(dev,1); delete writer; writer = NULL; return 1; } #endif // #ifdef DISABLE_INTERNAL_WT // // CD algo's // int qscanner::run_cd_errc() { cd_errc err, err_tot, err_max; int errc_data; long lba=lba_sta; long lbao; if (!attached) return -1; if (!(dev->media.type & DISC_CD)) return 1; lba=0; errc_data = plugin->errc_data(); // seek(dev,lba); if (plugin->start_test(CHK_ERRC_CD,lba,speed)) { printf("CD ERRC test init failed!\n"); return 2; } printf("Running CD Error Correction test at speed %d...\n", speed); spd1X = 150; gettimeofday(&s, NULL); wait_unit_ready(dev, 6); printf("\nTesting %ld sectors: %ld - %ld\n", lba_end-lba_sta+1, lba_sta, lba_end); printf(" lba | speed | BLER | E11 E21 E31 | E12 E22 E32 | UNCR\n"); for (; (!stop_req) && lbascan_block((void*)&err,&lba)) { printf("\nBlock scan error! terminating...\n"); stop_req=1; } gettimeofday(&blke, NULL); calc_cur_speed(lba-lbao); printf("cur : %6ld | %6.2f X %5d kB/s | %5ld | %5ld %5ld %5ld | %5ld %5ld %5ld | %5ld\r", lba, spdX, spdKB, err.bler, err.e11,err.e21,err.e31, err.e12,err.e22,err.e32, err.uncr); err_tot+=err; err_max.EMAX(err); #ifdef USE_FFLUSH fflush(stdout); #endif } plugin->end_test(); gettimeofday(&e, NULL); show_avg_speed(lba); printf("\n%ld sectors tested: %ld - %ld\n", lba-lba_sta, lba_sta, lba-1); printf("Test summary:\n"); printf(" BLER | E11 E21 E31 | E12 E22 E32 | UNCR\n"); printf("tot : %5ld | %5ld %5ld %5ld | %5ld %5ld %5ld | %5ld\n", err_tot.bler, err_tot.e11,err_tot.e21,err_tot.e31, err_tot.e21,err_tot.e22,err_tot.e32, err_tot.uncr); printf("max : %5ld | %5ld %5ld %5ld | %5ld %5ld %5ld | %5ld\n", err_max.bler, err_max.e11,err_max.e21,err_max.e31, err_max.e21,err_max.e22,err_max.e32, err_max.uncr); printf("avg : %5.2f | %5.2f %5.2f %5.2f | %5.2f %5.2f %5.2f | %5.2f\n", err_tot.bler/(float)lba, err_tot.e11/(float)lba,err_tot.e21/(float)lba,err_tot.e31/(float)lba, err_tot.e21/(float)lba,err_tot.e22/(float)lba,err_tot.e32/(float)lba, err_tot.uncr/(float)lba); #ifdef USE_FFLUSH fflush(stdout); #endif return 0; } int qscanner::run_cd_jb() { cdvd_jb jb, jb_min, jb_max; long lba=lba_sta; long lbao; if (!attached) return -1; if (!(dev->media.type & DISC_CD)) return 1; // seek(dev,lba); if (plugin->start_test(CHK_JB_CD,lba,speed)) { printf("CD Jitter/Asymm test init failed!\n"); return 2; } printf("Running CD Jitter/Asymm test at speed %d...\n", speed); spd1X = 150; gettimeofday(&s, NULL); wait_unit_ready(dev, 6); printf("\nTesting %ld sectors: %ld - %ld\n", lba_end-lba_sta+1, lba_sta, lba_end); printf(" lba | speed | Jitter | Asymm\n"); for (; (!stop_req) && lbascan_block((void*)&jb,&lba)) { printf("\nBlock scan error! terminating...\n"); stop_req=1; } gettimeofday(&blke, NULL); calc_cur_speed(lba-lbao); printf("cur : %6ld | %6.2f X %5d kB/s | %6.2f | %6.2f\r", lba, spdX, spdKB, jb.jitter/1000.0, jb.asymm/10.0); jb_min.EMIN(jb); jb_max.EMAX(jb); #ifdef USE_FFLUSH fflush(stdout); #endif } plugin->end_test(); gettimeofday(&e, NULL); show_avg_speed(lba); printf("\n%ld sectors tested: %ld - %ld\n", lba-lba_sta, lba_sta, lba-1); printf("Test summary:\n"); printf(" Jitter | Asymm\n"); printf(" min : %6.2f | %6.2f\n", jb_min.jitter/100.0, jb_min.asymm/10.0); printf(" max : %6.2f | %6.2f\n", jb_max.jitter/100.0, jb_max.asymm/10.0); // printf(" avg : %6.2f | %6.2f", lba, jb_max.jitter/100.0, jb_max.asymm/10.0); #ifdef USE_FFLUSH fflush(stdout); #endif return 0; } int qscanner::run_cd_ta() { if (!attached) return -1; if (!(dev->media.type & DISC_CD)) return 1; printf("Running CD Time Analyser test...\n"); printf("Can't start test: not implemented!\n"); return -1; } // // DVD algo's // int qscanner::run_dvd_errc() { dvd_errc err, err_tot, err_max; int errc_data; long lba=lba_sta; long lbas; long lbao; long pi8=0, pi8_max=0; long po8=0, po8_max=0; if (!attached) return -1; if (!(dev->media.type & DISC_DVD)) return 1; // lba=0; slba=0; errc_data = plugin->errc_data(); // seek(dev,lba); if (plugin->start_test(CHK_ERRC_DVD,lba,speed)) { printf("DVD ERRC test init failed!\n"); return 2; } printf("Running DVD Error Correction test at speed %d...\n", speed); spd1X = 1385; gettimeofday(&s, NULL); wait_unit_ready(dev, 6); lbas = lba; printf("\nTesting %ld sectors: %ld - %ld\n", lba_end-lba_sta+1, lba_sta, lba_end); printf(" lba | speed | PIE PI8 PIF | POE PO8 POF | UNCR\n"); for (; (!stop_req) && lbascan_block((void*)&err,&lba)) { printf("\nBlock scan error! terminating...\n"); stop_req=1; } err_tot+=err; err_max.EMAX(err); pi8+=err.pie; po8+=err.poe; gettimeofday(&blke, NULL); calc_cur_speed(lba-lbao); // if (!(lba & 0x7F)) { if ((lba-lbas) >= 0x80) { if (pi8_maxend_test(); gettimeofday(&e, NULL); show_avg_speed(lba); printf("\n%ld sectors tested: %ld - %ld\n", lba-lba_sta, lba_sta, lba-1); printf("Test summary:\n"); printf(" PIE PI8 PIF | POE PO8 POF | UNCR\n"); printf("tot : %5ld %5ld %5ld | %5ld %5ld %5ld | %5ld\n", err_tot.pie,err_tot.pie,err_tot.pif, err_tot.poe,err_tot.poe,err_tot.pof, err_tot.uncr); printf("max : %5ld %5ld %5ld | %5ld %5ld %5ld | %5ld\n", err_max.pie,pi8_max,err_max.pif, err_max.poe,po8_max,err_max.pof, err_max.uncr); printf("avg : %5.2f %5.2f %5.2f | %5.2f %5.2f %5.2f | %5.2f\n", err_tot.pie/(float)(lba>>4),err_tot.pie/(float)(lba>>7),err_tot.pif/(float)(lba>>4), err_tot.poe/(float)(lba>>4),err_tot.poe/(float)(lba>>7),err_tot.pof/(float)(lba>>4), err_tot.uncr/(float)(lba>>4)); #ifdef USE_FFLUSH fflush(stdout); #endif return 0; } int qscanner::run_dvd_jb() { cdvd_jb jb, jb_min, jb_max; long lba=lba_sta; long lbao; if (!attached) return -1; if (!(dev->media.type & DISC_DVD)) return 1; // seek(dev,lba); if (plugin->start_test(CHK_JB_DVD,lba,speed)) { printf("DVD Jitter/Asymm test init failed!\n"); return 2; } printf("Running DVD Jitter/Asymm test at speed %d...\n", speed); spd1X = 1385; gettimeofday(&s, NULL); wait_unit_ready(dev, 6); printf("\nTesting %ld sectors: %ld - %ld\n", lba_end-lba_sta+1, lba_sta, lba_end); printf(" lba | speed | Jitter | Asymm\n"); for (; (!stop_req) && lbascan_block((void*)&jb,&lba)) { printf("\nBlock scan error! terminating...\n"); stop_req=1; } gettimeofday(&blke, NULL); calc_cur_speed(lba-lbao); printf("cur : %6ld | %6.2f X %5d kB/s | %6.2f | %6.2f\r", lba, spdX, spdKB, jb.jitter/1000.0, jb.asymm/10.0); jb_min.EMIN(jb); jb_max.EMAX(jb); #ifdef USE_FFLUSH fflush(stdout); #endif } plugin->end_test(); gettimeofday(&e, NULL); show_avg_speed(lba); printf("\n%ld sectors tested: %ld - %ld\n", lba-lba_sta, lba_sta, lba-1); printf("Test summary:\n"); printf(" Jitter | Asymm\n"); printf(" min : %6.2f | %6.2f\n", jb_min.jitter/100.0, jb_min.asymm/10.0); printf(" max : %6.2f | %6.2f\n", jb_max.jitter/100.0, jb_max.asymm/10.0); // printf(" avg : %6.2f | %6.2f", lba, jb_max.jitter/100.0, jb_max.asymm/10.0); #ifdef USE_FFLUSH fflush(stdout); #endif return 0; } int qscanner::run_fete() { struct cdvd_ft ft, ft_max, ft_min; long lba=lba_sta; long lbao; if (!attached) return -1; if (dev->media.type & DISC_CD) { printf("Running FE/TE test for CD at speed %d...\n", speed); // if (dev->capabilities & CAP_DAE) use_readcd = 1; // rsize=15; bsize=75; spd1X = 150; } else if (dev->media.type & DISC_DVD) { printf("Running FE/TE test for DVD at speed %d...\n", speed); // rsize=16; bsize=128; spd1X = 1385; } else { printf("Can't run FE/TE test: not supported media!\n"); return 1; } wait_unit_ready(dev, 6); if (plugin->start_test(CHK_FETE,lba,speed)) { printf("Scan init failed!\n"); return 2; } gettimeofday(&s, NULL); // wait_unit_ready(dev, 6); printf("\nTesting %ld sectors: %ld - %ld\n", lba_end-lba_sta+1, lba_sta, lba_end); printf(" lba | speed | FE | TE\n"); gettimeofday(&blks, NULL); for (; (!stop_req) && lbascan_block((void*)&ft,&lba)) { printf("\nBlock scan error! terminating...\n"); stop_req=1; } gettimeofday(&blke, NULL); ft_max.EMAX(ft); calc_cur_speed(lba-lbao); // show current data printf("cur : %6ld | %6.2f X %5d kB/s | %4d | %4d\n", lba, spdX, spdKB, ft.fe, ft.te); blks.tv_sec = blke.tv_sec; blks.tv_usec = blke.tv_usec; #ifdef USE_FFLUSH fflush(stdout); #endif } plugin->end_test(); gettimeofday(&e, NULL); show_avg_speed(lba); printf("\n%ld sectors tested: %ld - %ld\n", lba-lba_sta, lba_sta, lba-1); printf("Test summary:\n"); printf(" FE | TE\n"); printf("max : %4d | %4d\n", ft_max.fe, ft_max.te); #ifdef USE_FFLUSH fflush(stdout); #endif return 0; } int qscanner::run_dvd_ta() { struct cdvd_ta ta; long lba; if (!attached) return -1; if (!(dev->media.type & DISC_DVD)) return 1; printf("Running DVD Time Analyser test...\n"); if (plugin->start_test(CHK_TA,lba,speed)) { printf("Scan init failed!\n"); return 2; } for (int i=0; i<3*dev->media.layers; i++) { ta.pass = i; plugin->scan_block(&ta, &lba); printf(" idx pits lands\n"); for (int idx=0; idx * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #if defined (__unix) || defined (__unix__) || (defined(__APPLE__) && defined(__MACH__)) #include #elif defined (_WIN32) #include #define dlopen(n,f) LoadLibraryA(n) #define dlsym(l,n) GetProcAddress(l,n) #define dlclose(l) FreeLibrary(l) char serr[255]; char* dlerror() { int err = GetLastError(); if (!err) return 0; sprintf(serr, "Library load error %d", err); return serr; }; #endif #include #include //#include #include "qpx_scan.h" #include #include #define FALLBACK_PLUGIN_NAME "C2P" qscanner::qscanner(drive_info* idev) { dev=idev; writer=NULL; plugin=NULL; pluginlib=NULL; plugin_create=NULL; plugin_destroy=NULL; attached=0; listed = 0; speed = -1; lba_sta=0; lba_end=-1; tchar=-1; } qscanner::~qscanner() { if (attached) plugin_detach(); } void qscanner::setTestSpeed(int ispeed) { speed = ispeed; } bool qscanner::setTestWrite(bool simul) { if (dev->media.type & DISC_DVDplus) { if (isPlextor(dev)) { if (isPlextorLockPresent(dev) || !plextor_px755_do_auth(dev) ) { printf("Turning PLEXTOR DVD+R(W) TestWrite %s\n", simul ? "ON" : "OFF"); WT_simul = 0; dev->plextor.testwrite_dvdplus = simul; return plextor_set_testwrite_dvdplus(dev); } else { printf("Found locked PLEXTOR drive. Can't handle DVD+R(W) TestWrite!\n"); return 1; } } else { if (simul) { printf("TestWrite on DVD+R(W) supported on PLEXTOR drives only!\n"); WT_simul = 0; return 1; } else { WT_simul = 0; return 0; } } } else { if ((dev->media.type & DISC_CD) && (dev->capabilities & CAP_TEST_WRITE_CD)) { printf("Turning TestWrite (CD) %s\n", simul ? "ON" : "OFF"); WT_simul = simul; return 0; } else if ((dev->media.type & DISC_DVDminus) && (dev->capabilities & CAP_TEST_WRITE_DVD)) { printf("Turning TestWrite (DVD) %s\n", simul ? "ON" : "OFF"); WT_simul = simul; return 0; } else { WT_simul = 0; if (simul) { if ((dev->media.type & DISC_DVDRAM)) { printf("DVD-RAM media doesn't support TestWrite!\n"); } else { printf("Drive doesn't support TestWrite on this media!\n"); } return 1; } else { return 0; } } } } void qscanner::stop() { stop_req=1; if (writer) writer->stop(); }; void qscanner::stat() { stat_req=1; }; int qscanner::run(char *test) { int r=-1; stop_req=0; stat_req=0; if (!dev->media.type) { printf("No media detected!\n"); return 1; } if (!(dev->media.type & (DISC_CD | DISC_DVD))) { printf("Unsupported media!\n"); return 2; } // set_speed(dev,speed); if (!strcmp(test, "rt")) { if (lba_end<0 || lba_end>dev->media.capacity) lba_end = dev->media.capacity-1; r=run_rd_transfer(); } else if (!strcmp(test, "wt")) { if (lba_end<0 || lba_end>dev->media.capacity_total) lba_end = dev->media.capacity_total-1; r=run_wr_transfer(); } else if (!strcmp(test, "errc")) { if (lba_end<0 || lba_end>dev->media.capacity) lba_end = dev->media.capacity-1; if (dev->media.type & DISC_CD) { r=run_cd_errc(); } else if (dev->media.type & DISC_DVD) { r=run_dvd_errc(); } } else if (!strcmp(test, "jb")) { if (lba_end<0 || lba_end>dev->media.capacity) lba_end = dev->media.capacity-1; if (dev->media.type & DISC_CD) { r=run_cd_jb(); } else if (dev->media.type & DISC_DVD) { r=run_dvd_jb(); } } else if (!strcmp(test, "ft")) { if (lba_end<0 || lba_end>dev->media.capacity_total) lba_end = dev->media.capacity_total-1; r=run_fete(); } else if (!strcmp(test, "ta")) { if (dev->media.type & DISC_CD) { r=run_cd_ta(); } else if (dev->media.type & DISC_DVD) { r=run_dvd_ta(); } } return r; } int qscanner::check_test(unsigned int test) { if (!attached) return -1; return plugin->check_test(test); } int qscanner::errc_data() { if (!attached) return -1; return plugin->errc_data(); } int* qscanner::get_test_speeds(unsigned int test) { if (!attached) return NULL; return plugin->get_test_speeds(test); } int qscanner::plugins_probe(bool test, bool probe_enable) { char *pname; char *ppath; DIR *dir; struct dirent *dentry; int i; int r=1; for (i=0; strlen(ppaths[i]) && !attached; i++) { ppath = (char*) ppaths[i]; if (!dev->silent) printf("Looking for plugins in %s...\n", ppath); dir = opendir(ppath); if (dir) { dentry = readdir(dir); while(dentry && !attached) { if (!strncmp(dentry->d_name,"libqscan_",9)) { if (!dev->silent) printf("FOUND: %s\n", dentry->d_name); pname = (char*) malloc (strlen(dentry->d_name) + strlen(ppath) +2 ); #ifdef _WIN32 sprintf(pname, "%s\\%s", ppath, dentry->d_name); #else sprintf(pname, "%s/%s", ppath, dentry->d_name); #endif plugin_attach(pname, probe_enable, 0, !test); if (attached) { r=0; if (test) { plugin_detach(); } else { if (!strcmp(plugin->name(), FALLBACK_PLUGIN_NAME)) { // printf("Found fallback plugin, return...\n"); plugin_detach(); r=1; } } } free(pname); } dentry = readdir(dir); } closedir(dir); } } return r; } int qscanner::plugin_attach_fallback() { return plugin_attach(FALLBACK_PLUGIN_NAME); } int qscanner::plugin_attach(char* name) { char *pname; char *ppath; DIR *dir; struct dirent *dentry; int i; int r=1; if (attached || !name) return 2; for (i=0; strlen(ppaths[i]) && !attached; i++) { ppath = (char*) ppaths[i]; if (!dev->silent) printf("Looking for plugins in %s...\n", ppath); dir = opendir(ppath); if (dir) { dentry = readdir(dir); while(dentry && !attached) { if (!strncmp(dentry->d_name,"libqscan_",9)) { if (!dev->silent) printf("FOUND: %s\n", dentry->d_name); pname = (char*) malloc (strlen(dentry->d_name) + strlen(ppath) +2 ); #ifdef _WIN32 sprintf(pname, "%s\\%s", ppath, dentry->d_name); #else sprintf(pname, "%s/%s", ppath, dentry->d_name); #endif plugin_attach(pname, 0, 1, 1); if (attached) { if ( strcmp(plugin->name(), name)) plugin_detach(); else r=0; } free(pname); } dentry = readdir(dir); } closedir(dir); } } if (!attached) printf("Can't find plugin '%s'\n", name); else if (!strcmp(plugin->name(), FALLBACK_PLUGIN_NAME)) { printf("Fallback plugin loaded: '%s'\n", name); } else { printf("Forced plugin loaded: '%s'\n", name); } return r; } int qscanner::plugin_attach(char* pname, bool probe_enable, bool no_detach, bool silent) { bool blacklisted=0; drivedesc* devlist; if (attached) return 2; listed=0; // pluginlib = dlopen( pname, RTLD_NOW | RTLD_GLOBAL); pluginlib = dlopen( pname, RTLD_LAZY | RTLD_GLOBAL); if (!pluginlib) { printf("0 dlopen err: %s\n",dlerror()); // printf("can't open library!\n"); goto plugin_attach_liberr; } // if (!dev->silent) printf("pluginlib = %p\n", pluginlib); #ifndef _WIN32 if (dlerror()) { printf("1 dlopen err: %s\n",dlerror()); goto plugin_attach_err; } #endif if (!dev->silent) printf("plugin lib opened: %s\n",pname); plugin_create = (scan_plugin* (*) (drive_info*)) dlsym(pluginlib, "plugin_create"); #ifndef _WIN32 if (dlerror()) { #else if (!plugin_create) { #endif printf("error searching symbol \"plugin_create\" : %s\n",dlerror()); goto plugin_attach_err; } // printf("symbol \"plugin_create\" found!\n"); //*(void **) (&plugin_destroy) = dlsym(pluginlib, "plugin_destroy"); plugin_destroy = (void (*) (scan_plugin*)) dlsym(pluginlib, "plugin_destroy"); #ifndef _WIN32 if (dlerror()) { #else if (!plugin_destroy) { #endif printf("error searching symbol \"plugin_destroy\" : %s\n", dlerror()); goto plugin_attach_err; } // printf("symbol \"plugin_destroy\" found!\n"); /* slist = (drivedesc*) dlsym(pluginlib, "devlist"); e = dlerror(); if (e){ printf("%s\nerror searching symbol \"devlist\"\n",e); goto plugin_attach_err; } */ // printf("creating plugin\n"); plugin = plugin_create(dev); // printf("plugin info\n"); if (!silent) printf("Found plugin: %s (%s)\n",plugin->name(),plugin->desc()); if (plugin->blklist) { devlist = plugin->blklist; if (!dev->silent) { printf("Devices in blacklist:\n"); for(int d=0; devlist[d].ven_ID>0; d++) { printf(" %s %s*\n",devlist[d].ven,devlist[d].dev); } } for(int d=0; !blacklisted && devlist[d].ven_ID>0; d++) { if (!strncmp(dev->ven, devlist[d].ven, strlen(devlist[d].ven)) && !strncmp(dev->dev,devlist[d].dev, strlen(devlist[d].dev))) blacklisted=1; } devlist = NULL; if (blacklisted) { printf("Plugin %s: device '%s' '%s' blacklisted! Detaching plugin...\n", plugin->name(), dev->ven, dev->dev); attached=1; plugin_detach(); return 1; } } if (!probe_enable && plugin->devlist) { devlist = plugin->devlist; dev->chk_features = 0; if (!dev->silent) { printf("Devices supported by this plugin:\n"); for(int d=0; devlist[d].ven_ID>0 && devlist[d].dev_ID>0;d++) { printf(" %s %s\n",devlist[d].ven,devlist[d].dev); } } for(int d=0; !listed && devlist[d].ven_ID>0 && devlist[d].dev_ID>0;d++) { if (!strncmp(dev->ven, devlist[d].ven, strlen(devlist[d].ven)) && !strncmp(dev->dev,devlist[d].dev, strlen(devlist[d].dev))) { dev->ven_ID = devlist[d].ven_ID; dev->dev_ID = devlist[d].dev_ID; dev->chk_features = devlist[d].tests; listed = 1; if (!silent) printf("device listed as: %s %s\n",devlist[d].ven,devlist[d].dev); } } } if (!no_detach && !listed && (!probe_enable || plugin->probe_drive() == DEV_FAIL)) { if (!dev->silent) { if (probe_enable) printf("Device probe failed! detaching plugin\n"); else printf("Device not listed! detaching plugin\n"); } attached=1; plugin_detach(); return 1; } attached=1; if (!dev->silent) printf("plugin attached: %s\n", pname); return 0; plugin_attach_err: dlclose(pluginlib); plugin_attach_liberr: attached=0; printf("error attaching scan plugin %s\n", pname); plugin=NULL; plugin_create=NULL; plugin_destroy=NULL; listed=0; return -1; } void qscanner::plugin_detach() { if (!dev->silent) printf("detaching plugin...\n"); if (!attached) return; // if (plugin_destroy!=NULL && plugin!=NULL) (*plugin_destroy) (plugin); attached=0; dlclose(pluginlib); plugin=NULL; pluginlib=NULL; plugin_create=NULL; plugin_destroy=NULL; } //int qscanner::plugin_info() {} const char* qscanner::plugin_name() { if (!attached) return NULL; return plugin->name(); } const char* qscanner::plugin_desc() { if (!attached) return NULL; return plugin->desc(); } qpxtool-0.7.1_002/lib/qpxscan/include/0000755000175000001440000000000011336773400016730 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxscan/include/qpx_writer.h0000644000175000001440000000441711332257621021311 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef QPXWRITER_H #define QPXWRITER_H class drive_info; class qpxwriter { public: qpxwriter(drive_info *idev); virtual ~qpxwriter() {}; virtual void setSimul(bool isimul); virtual int send_opc(); virtual int open_session(); virtual int open_track(uint32_t size); virtual int close_track(); virtual int fixate(); virtual int write_data(int32_t lba, int sects); void stop(); protected: virtual int mmc_write(int32_t lba, int sects); drive_info *dev; bool stop_req; bool simul; }; // CD-R/W // mostly usable, SAO only, tested on CD-RW class qpxwriter_cd : public qpxwriter { public: qpxwriter_cd(drive_info *idev) : qpxwriter(idev) {}; virtual ~qpxwriter_cd() {}; virtual int send_opc(); // virtual int open_session(); virtual int open_track(uint32_t size); virtual int close_track(); virtual int fixate(); protected: int set_write_parameters_def(bool bfree, bool simul); int send_cue_sheet(uint32_t tsize); int write_lead_in(); }; // DVD-R(W) [/DL] // tested on single layer media only, both -R and -RW OK class qpxwriter_dvdminus : public qpxwriter { public: qpxwriter_dvdminus(drive_info *idev) : qpxwriter(idev) {}; virtual ~qpxwriter_dvdminus() {}; virtual int open_session(); virtual int open_track(uint32_t size); virtual int close_track(); virtual int fixate(); }; // DVD+R(W) [/DL] // tested on single layer media only, both +R and +RW OK class qpxwriter_dvdplus : public qpxwriter { public: qpxwriter_dvdplus(drive_info *idev) : qpxwriter(idev) {}; virtual ~qpxwriter_dvdplus() {}; virtual int open_session(); virtual int open_track(uint32_t size); virtual int close_track(); virtual int fixate(); private: int fixate_rw(); int fixate_r(); }; // DVD-RAM // OK class qpxwriter_dvdram : public qpxwriter { public: qpxwriter_dvdram(drive_info *idev) : qpxwriter(idev) {}; virtual ~qpxwriter_dvdram() {}; }; #endif qpxtool-0.7.1_002/lib/qpxscan/include/qpx_scan.h0000644000175000001440000000526311326024341020713 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QPX_SCAN_H #define __QPX_SCAN_H #include #include #include //class drive_info; typedef char path[128]; static const path ppaths[] = { #if defined (__unix) || defined (__unix__) || (defined(__APPLE__) && defined(__MACH__)) "/usr/lib/qpxtool", "/usr/local/lib/qpxtool", "/usr/lib64/qpxtool", "/usr/local/lib64/qpxtool", #elif defined (_WIN32) "plugins", "C:\\Program files\\QPxTool\\plugins", #endif "" }; class qpxwriter; //static const int ppaths_cnt = sizeof(ppaths) / sizeof(path); class qscanner { public: qscanner(drive_info* idev); ~qscanner(); drive_info* device() { return dev; }; void setTestSpeed(int); bool setTestWrite(bool); int run(char*); int check_test(unsigned int); int errc_data(); int* get_test_speeds(unsigned int); // int plugins_probe(); int plugins_probe(bool test, bool probe_enable); int plugin_attach_fallback(); int plugin_attach(char* name); int plugin_attach(char* pname, bool probe_enable, bool no_detach, bool silent=1); void plugin_detach(); // int plugin_info(); const char* plugin_name(); const char* plugin_desc(); bool is_plugin_attached() { return attached; }; // int detect_check_capabilities(); inline void setInterval(int sta, int end) { lba_sta = sta; lba_end = end; }; void stop(); void stat(); private: bool stop_req, stat_req; struct timeval s,e,blks,blke; long lba_sta, lba_end; int spd1X; int spdKB; float spdX; bool WT_simul; //void show_avg(struct timeval s, struct timeval e, long lba); void show_avg_speed(long lba); //void calc_cur_speed(long sects, int* spdKB, float* spdX); void calc_cur_speed(long sects); int readline(int fd, char *buf, int maxlen); int run_rd_transfer(); int run_wr_transfer(); int run_fete(); int run_cd_errc(); int run_cd_jb(); int run_cd_ta(); int run_dvd_errc(); int run_dvd_jb(); int run_dvd_ta(); int speed; bool attached; drive_info *dev; scan_plugin *plugin; qpxwriter *writer; #if defined (_WIN32) HINSTANCE__ *pluginlib; #else void *pluginlib; #endif scan_plugin* (*plugin_create) (drive_info*); void (*plugin_destroy) (scan_plugin*); bool listed; // unsigned int chk_features; // media check features char tchar; }; #endif // __QPX_SCAN_H qpxtool-0.7.1_002/lib/qpxscan/include/qpx_scan_plugin_api.h0000644000175000001440000001443511336720227023132 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QPX_SCAN_PLUGIN_API_H #define __QPX_SCAN_PLUGIN_API_H #include #include /* typedef enum testID{ none = 0, cd_errc, cd_jb, cd_fete, cd_ta, dvd_errc, dvd_jb, dvd_fete, dvd_ta }; */ #define CHK_RD_CD 0x00000001 #define CHK_WR_CD 0x00000002 #define CHK_RD_DVD 0x00000004 #define CHK_WR_DVD 0x00000008 #define CHK_ERRC 0x00000010 // Error correction #define CHK_JB 0x00000020 // Jitter/Asymmetry #define CHK_FETE 0x00000040 // Focus/Tracking #define CHK_TA 0x00000080 // Time Analyser #define CHK_ERRC_CD 0x00000100 #define CHK_JB_CD 0x00000200 #define CHK_FT_CD 0x00000400 #define CHK_TA_CD 0x00000800 #define CHK_TA_CDROM 0x00001800 #define CHK_ERRC_DVD 0x00002000 #define CHK_JB_DVD 0x00004000 #define CHK_FT_DVD 0x00008000 #define CHK_TA_DVD 0x00010000 #define CHK_TA_DVDROM 0x00020000 // ERRC returned data #define ERRC_DATA_BLER 0x01 #define ERRC_DATA_E11 0x02 #define ERRC_DATA_E21 0x04 #define ERRC_DATA_E31 0x08 #define ERRC_DATA_E12 0x10 #define ERRC_DATA_E22 0x20 #define ERRC_DATA_E32 0x40 #define ERRC_DATA_PIE 0x06 #define ERRC_DATA_PIF 0x08 #define ERRC_DATA_POE 0x30 #define ERRC_DATA_POF 0x40 #define ERRC_DATA_UNCR 0x80 static const char errc_names_cd[][5] = { "BLER", "E11", "E21", "E31", "E12", "E22", "E32", "UNCR" }; static const char errc_names_dvd[][5] = { "---", "PIE", "PI8", "PIF", "POE", "PO8", "POF", "UNCR" }; #define DEV_OK 0 #define DEV_PROBED 1 #define DEV_FAIL 2 struct drivedesc{ char ven[9]; int ven_ID; char dev[17]; int dev_ID; int tests; }; typedef struct drivedesc drivedesclist[]; class cd_errc { public: cd_errc() {bler=0; e11=0; e21=0; e31=0; e12=0; e22=0; e32=0; uncr=0;}; ~cd_errc() {}; inline cd_errc& EMAX(cd_errc& o) { if (bler jitter) jitter = o.jitter; if (o.asymm > asymm) asymm = o.asymm; } return *this; }; inline cdvd_jb& EMIN(cdvd_jb& o) { if (!set) { jitter = o.jitter; asymm = o.asymm; set = 1; } else { if (o.jitter < jitter) jitter = o.jitter; if (o.asymm < asymm) asymm = o.asymm; } return *this; }; private: bool set; }; class cdvd_ft { public: cdvd_ft() {fe=0; te=0;} ~cdvd_ft() {}; inline cdvd_ft& EMAX(cdvd_ft& o) { if (o.fe > fe) fe = o.fe; if (o.te > te) te = o.te; return *this; }; inline cdvd_ft& operator= (cdvd_ft& o) { fe = o.fe; te = o.te; return *this; }; inline cdvd_ft& operator+= (cdvd_ft& o) { fe += o.fe; te += o.te; return *this; }; int fe; int te; }; #define TA_HIST_SIZE 512 class cdvd_ta { public: cdvd_ta() { pass=-1; clear(); }; ~cdvd_ta() {}; void clear() { memset(pit, 0, sizeof(int32_t)*TA_HIST_SIZE); memset(land, 0, sizeof(int32_t)*TA_HIST_SIZE); }; int pass; int32_t pit[TA_HIST_SIZE]; int32_t land[TA_HIST_SIZE]; }; class drive_info; class scan_plugin { public: scan_plugin(drive_info* idev=NULL) { devlist = NULL; blklist = NULL; } virtual ~scan_plugin() {} virtual int probe_drive() { return DEV_FAIL; } // virtual int check_drive()=0; virtual int check_test(unsigned int test)=0; virtual int errc_data()=0; virtual int* get_test_speeds(unsigned int test) { return NULL; }; virtual int start_test(unsigned int test, long slba, int &speed)=0; virtual int scan_block(void* data, long* ilba)=0; virtual int end_test()=0; virtual const char* name()=0; virtual const char* desc()=0; drivedesc *devlist; drivedesc *blklist; protected: void set_read_speed(int &speed) { dev->parms.read_speed_kb = (int) (speed * dev->parms.speed_mult); set_rw_speeds(dev); get_rw_speeds(dev); speed = (int) (dev->parms.read_speed_kb / dev->parms.speed_mult); } void set_write_speed(int &speed) { dev->parms.write_speed_kb = (int) (speed * dev->parms.speed_mult); set_rw_speeds(dev); get_rw_speeds(dev); speed = (int) (dev->parms.write_speed_kb / dev->parms.speed_mult); } drive_info* dev; unsigned int test; }; extern "C" { scan_plugin* plugin_create(drive_info* idev); void plugin_destroy(scan_plugin* iplugin); } //typedef char drive_supported(drive_info* drive); #endif // __QPX_SCAN_PLUGIN_API_H qpxtool-0.7.1_002/lib/qpxscan/qpx_writer.cpp0000644000175000001440000002235611332264211020214 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009-2010 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include "qpx_writer.h" #define WTYPE_CD_DEFAULT WTYPE_TAO qpxwriter::qpxwriter(drive_info *idev) { dev = idev; stop_req = 0; } void qpxwriter::stop() { stop_req=1; printf("\nqpxwriter: terminating...\n"); } void qpxwriter::setSimul(bool isimul) { simul = isimul; }; int qpxwriter::send_opc() { return 0; } int qpxwriter::open_session() { return 0; } int qpxwriter::open_track(uint32_t size) { return 0; } int qpxwriter::close_track() { return 0; } int qpxwriter::fixate() { return 0; } int qpxwriter::mmc_write(int32_t lba, int sects) { // printf("qpxwriter: sector %ld (wsize=%d)\n", lba, sects); dev->cmd[0] = MMC_WRITE; dev->cmd[2] = (lba >> 24) & 0xFF; dev->cmd[3] = (lba >> 16) & 0xFF; dev->cmd[4] = (lba >> 8) & 0xFF; dev->cmd[5] = lba & 0xFF; dev->cmd[7] = (sects >> 8); dev->cmd[8] = sects & 0xFF; if ((dev->err=dev->cmd.transport(WRITE, dev->rd_buf, sects * 2048))) { // printf("\nqpxwriter: Write error at sector %ld (wsize=%d)\n", lba, sects); if (dev->err != 0x20408) sperror ("MMC_WRITE",dev->err); return (dev->err); } return 0; } int qpxwriter::write_data(int32_t lba, int sects) { int r=0; /* if (lba>=0) { bool f=0; do { if (f) usleep(20000); else f=1; get_wbuffer_capacity(dev,&ubuft,&ubuff); // if (ubuft) printf("%8d buf: %d %%\n", lba, 100*(ubuft-ubuff) / ubuft); //} while ( dev->err == 0x20408 || (ubuff < sects*2048)); } while ( !stop_req && !dev->err && (ubuff < sects*2048)); } if (stop_req) return -1; */ // printf("test_unit_ready: %d\n",test_unit_ready(dev)); if (lba>=0) for (int i=0; ird_buf[i*2048+0] = ((lba+i) >> 24) & 0xFF; dev->rd_buf[i*2048+1] = ((lba+i) >> 16) & 0xFF; dev->rd_buf[i*2048+2] = ((lba+i) >> 8) & 0xFF; dev->rd_buf[i*2048+3] = (lba+i) & 0xFF; } do { if (r) { // printf("waiting...\n"); msleep(500); } r = mmc_write(lba,sects); } while (r == 0x20408); // for some drives like Plextor & LiteOn return r; } int qpxwriter_cd::send_opc() { printf("Performing OPC...\n"); dev->cmd[0] = MMC_SEND_OPC_INFORMATION; dev->cmd[1] = 0x01; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))) {sperror ("SEND_OPC",dev->err); return (dev->err);} return (wait_unit_ready(dev, 60)); } int qpxwriter_cd::set_write_parameters_def(bool bfree, bool simul) { printf("Setting write parameters...\n"); // printf("simul: %s\n", simul ? "ON":"OFF"); if (mode_sense(dev, MODE_PAGE_WRITE_PARAMETERS, 0, 60)) return -1; if (!!(dev->rd_buf[8+2] & 0x40) == bfree) { printf("BURN-Free is %s\n", (dev->rd_buf[8+2] & 0x40) ? "ON" : "OFF" ); } else { printf("Turning BURN-Free %s\n", bfree ? "ON" : "OFF" ); } /* printf("TestWrite is %s\n", (dev->rd_buf[8+2] & 0x10) ? "ON" : "OFF" ); if (!!(dev->rd_buf[8+2] & 0x10) != simul) { } */ /* for (int i=0; i<52; i++) { if (!(i%8)) printf("\n"); printf(" %02X", dev->rd_buf[i+8]); } printf("\n"); */ memset(dev->rd_buf, 0, 60); dev->rd_buf[8+0] = 0x05; dev->rd_buf[8+1] = 0x32; dev->rd_buf[8+2] = ( (bfree ? 0x40 : 0) | (simul ? 0x10 : 0) ); // setting BURN-Free and TestWrite dev->rd_buf[8+2] |= WTYPE_CD_DEFAULT; // write type = SAO dev->rd_buf[8+3] = 0x04; // track mode dev->rd_buf[8+4] = 0x08; // data block type: Mode1 dev->rd_buf[8+8] = 0; // session format dev->rd_buf[8+15] = 0x96; // audio pause length = 150 frames (2 sec) /* for (int i=0; i<52; i++) { if (!(i%8)) printf("\n"); printf(" %02X", dev->rd_buf[i+8]); } printf("\n"); */ return (mode_select(dev,60)); } int qpxwriter_cd::send_cue_sheet(uint32_t tsize) { int foffs=0; int lout = tsize+150; printf("Sending CUE sheet...\n"); memset(dev->rd_buf,0,bufsz_rd); // lead-in dev->rd_buf[foffs+0] = 0x41; dev->rd_buf[foffs+3] = 0x14; // for lead-in data form = 0x14 foffs+=8; // track 0 pregap dev->rd_buf[foffs+0] = 0x41; dev->rd_buf[foffs+1] = 0x01; // track #1 dev->rd_buf[foffs+2] = 0x00; // index = 0 - pregap dev->rd_buf[foffs+3] = 0x10; // data form = 0x10 // addr 00:00.00 msf dev->rd_buf[foffs+5] = 0x00; dev->rd_buf[foffs+6] = 0x00; dev->rd_buf[foffs+7] = 0x00; foffs+=8; // track 0 start dev->rd_buf[foffs+0] = 0x41; dev->rd_buf[foffs+1] = 0x01; // track #1 dev->rd_buf[foffs+2] = 0x01; // index = 1 - track start dev->rd_buf[foffs+3] = 0x10; // data form = 0x10 // addr 00:02.00 msf dev->rd_buf[foffs+5] = 0x00; dev->rd_buf[foffs+6] = 0x02; dev->rd_buf[foffs+7] = 0x00; foffs+=8; // lead-out dev->rd_buf[foffs+0] = 0x41; dev->rd_buf[foffs+1] = 0xAA; // AA - lead-out dev->rd_buf[foffs+2] = 0x01; // for lead-out index = 1 dev->rd_buf[foffs+3] = 0x14; // for lead-in data form = 0x14 // lead-out end addr dev->rd_buf[foffs+5] = lout/4500; dev->rd_buf[foffs+6] = (lout/75)%60; dev->rd_buf[foffs+7] = lout%75; /* printf("Lead-Out pos: %02d:%02d.%02d\n", dev->rd_buf[foffs+5], dev->rd_buf[foffs+6], dev->rd_buf[foffs+7] ); */ foffs+=8; dev->cmd[0] = MMC_SEND_CUE_SHEET; dev->cmd[6] = (foffs >> 16) & 0xFF; dev->cmd[7] = (foffs >> 8) & 0xFF; dev->cmd[8] = foffs & 0xFF; if ((dev->err=dev->cmd.transport(WRITE, dev->rd_buf, foffs))) {sperror ("SEND_CUE_SHEET",dev->err); return (dev->err);} return 0; } int qpxwriter_cd::write_lead_in() { memset(dev->rd_buf,0,bufsz_rd); int32_t lba = -150; printf("Writing Lead-In...\n"); for(int i=0; i<6; i++) { if (write_data(lba,25)) return dev->err; lba+=25; } return 0; } /* int qpxwriter_cd::open_session() { return (set_write_parameters_def(0,0)); } */ int qpxwriter_cd::open_track(uint32_t size) { #if (WTYPE_CD_DEFAULT == WTYPE_SAO) printf("Writing in SAO mode\n"); #elif (WTYPE_CD_DEFAULT == WTYPE_TAO) printf("Writing in TAO mode\n"); #endif if (set_write_parameters_def( ((dev->capabilities & CAP_BURN_FREE)) ,simul)) { return 1; } /* mode_sense(dev, 0x05, 0, 60); for (int i=0; i<52; i++) { if (!(i%8)) printf("\n"); printf(" %02X", dev->rd_buf[i+8]); } */ #if (WTYPE_CD_DEFAULT == WTYPE_SAO) if (send_cue_sheet(size)) return 1; if (write_lead_in()) return 1; #endif return 0; } int qpxwriter_cd::close_track() { printf("Closing track...\n"); if (flush_cache(dev, true)) return 1; wait_unit_ready(dev, 300, 1); #if (WTYPE_CD_DEFAULT == WTYPE_TAO) close_track_session(dev,1, CLOSE_TRACK); // close track #endif /* do { usleep(20000); get_buffer_capacity(dev,&ubuft,&ubuff); printf("buf: %d %%\r", 100*(ubuft-ubuff) / ubuft); } while (ubuffcapabilities & CAP_BURN_FREE)); bfree = 1; if (mode_sense(dev, MODE_PAGE_WRITE_PARAMETERS, 0, 60)) return -1; if (!!(dev->rd_buf[8+2] & 0x40) == bfree) { printf("BURN-Free is %s\n", (dev->rd_buf[8+2] & 0x40) ? "ON" : "OFF" ); } else { printf("Turning BURN-Free %s\n", bfree ? "ON" : "OFF" ); } dev->rd_buf[8+2] = ( (bfree ? 0x40 : 0) | (simul ? 0x10 : 0) ); // setting BURN-Free and TestWrite dev->rd_buf[8+2] |= WTYPE_SAO; // write type = SAO return (mode_select(dev,60)); } int qpxwriter_dvdminus::open_track(uint32_t size) { return (reserve_track(dev,size)); } int qpxwriter_dvdminus::close_track() { /* if (dev->media.type & (DISC_DVDmR | DISC_DVDmRDL)) { printf("\nClosing track...\n"); close_track_session(dev,1, CLOSE_TRACK); // close track wait_unit_ready(dev, 1200, 1); } */ return 0; } int qpxwriter_dvdminus::fixate() { flush_cache(dev, 1); printf("\nWaiting for drive to become ready...\n"); wait_unit_ready(dev, 300, 1); printf("\nClosing session...\n"); close_track_session(dev,1, CLOSE_SESSION); // close session wait_unit_ready(dev, 300, 1); return 0; } // // DVD+ functions... // int qpxwriter_dvdplus::open_session() { printf("Setting write parameters...\n"); if (mode_sense(dev, MODE_PAGE_WRITE_PARAMETERS, 0, 60)) return -1; dev->rd_buf[8+2] &= 0xF0; dev->rd_buf[8+2] |= WTYPE_SAO; // write type = SAO return (mode_select(dev,60)); } int qpxwriter_dvdplus::open_track(uint32_t size) { return 0; } int qpxwriter_dvdplus::close_track() { flush_cache(dev, 1); wait_unit_ready(dev, 300, 1); return 0; } int qpxwriter_dvdplus::fixate() { if (dev->media.type & (DISC_DVDpRW | DISC_DVDpRWDL)) { return fixate_rw(); } else if (dev->media.type & (DISC_DVDpR | DISC_DVDpRDL)) { return fixate_r(); } return 0; } int qpxwriter_dvdplus::fixate_rw() { close_track_session(dev,1, CLOSE_SESSION); // close session wait_unit_ready(dev, 300, 1); return 0; } int qpxwriter_dvdplus::fixate_r() { printf("Closing track...\n"); close_track_session(dev,1, CLOSE_TRACK); // close track wait_unit_ready(dev, 300, 1); printf("Closing session...\n"); close_track_session(dev,1, CLOSE_SESSION); // close session wait_unit_ready(dev, 300, 1); return 0; } qpxtool-0.7.1_002/lib/qpxpioneer/0000755000175000001440000000000011352127612016016 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxpioneer/pioneer_spdctl.cpp0000644000175000001440000000404111243442652021536 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2006 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include "pioneer_spdctl.h" int pioneer_get_quiet(drive_info* drive) { drive->cmd[0] = 0x3C; drive->cmd[1] = 0x01; drive->cmd[2] = 0xF4; drive->cmd[7] = 0x01; if ((drive->err = drive->cmd.transport(READ, drive->rd_buf, 256))) {if (!drive->silent) sperror("PIO_GET_QUIET", drive->err); return drive->err;} drive->pioneer.limit = drive->rd_buf[0]; drive->pioneer.silent = drive->rd_buf[2]; return 0; } int pioneer_set_quiet(drive_info* drive, char silent, bool limit, bool save) { drive->cmd[0] = 0xBB; drive->cmd[1] = save? 0x0C : 0x04; drive->cmd[2] = limit? 0x00 : 0xFF; drive->cmd[3] = limit? 0x00 : 0xFF; drive->cmd[10]= (save? 0xC0 : 0x80) | silent; if ((drive->err = drive->cmd.transport(NONE, NULL, 0))) {if (!drive->silent) sperror("PIO_SET_QUIET", drive->err); return drive->err;} return 0; } int pioneer_set_silent(drive_info* drive, char silent, bool save) { pioneer_get_quiet(drive); if (!drive->silent) printf("Setting Quiet mode to \"%s\"... ", pioneer_silent_tbl[(int)silent]); pioneer_set_quiet(drive, silent, drive->pioneer.limit, save); pioneer_get_quiet(drive); if (!drive->silent) printf("%s\n", (drive->pioneer.silent == silent) ? "OK":"FAIL"); return drive->err; } int pioneer_set_spdlim(drive_info* drive, bool limit, bool save) { pioneer_get_quiet(drive); if (!drive->silent) printf("Setting SpeedLimit %s... ", limit ? "ON":"OFF"); pioneer_set_quiet(drive, drive->pioneer.silent, limit, save); pioneer_get_quiet(drive); if (!drive->silent) printf("%s\n", (drive->pioneer.limit == limit) ? "OK":"FAIL"); return drive->err; } qpxtool-0.7.1_002/lib/qpxpioneer/Makefile0000644000175000001440000000037211267556674017503 0ustar shultzusersSRC = pioneer_spdctl HDRS = include/pioneer_spdctl.h LIBN = qpxpioneer SRCS = $(patsubst %,%.cpp, $(SRC)) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) VER_MAJOR = 0 VER_MINOR = 7 VER_MICRO = 0 LDLIBS += -lqpxtransport -L../lib include ../Makefile.lib qpxtool-0.7.1_002/lib/qpxpioneer/include/0000755000175000001440000000000011301457745017450 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxpioneer/include/pioneer_spdctl.h0000644000175000001440000000174611301457745022643 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2006 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #ifndef __pioneer_spdctl #define __pioneer_spdctl #define PIO_SILENT_STD 0x00 #define PIO_SILENT_PERF 0x01 #define PIO_SILENT_QUIET 0x02 const str_dev pioneer_silent_tbl[]={ "Standard", "Performance", "Quiet"}; #define PIO_SPD_NOLIMIT 0x00 #define PIO_SPD_LIMIT 0x01 extern int pioneer_get_quiet(drive_info* drive); extern int pioneer_set_quiet(drive_info* drive, char silent, bool limit, bool save); extern int pioneer_set_silent(drive_info* drive, char silent, bool save); extern int pioneer_set_spdlim(drive_info* drive, bool limit, bool save); #endif qpxtool-0.7.1_002/lib/qpxplextor/0000755000175000001440000000000011352127612016052 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxplextor/Makefile0000644000175000001440000000037711267556666017545 0ustar shultzusersSRC = plextor_features HDRS = include/plextor_features.h LIBN = qpxplextor SRCS = $(patsubst %,%.cpp, $(SRC)) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) VER_MAJOR = 0 VER_MINOR = 7 VER_MICRO = 0 LDLIBS += -lqpxtransport -L../lib include ../Makefile.lib qpxtool-0.7.1_002/lib/qpxplextor/plextor_features.cpp0000644000175000001440000010615211323345025022154 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * * * Some Plextor commands got from PxScan and CDVDlib (C) Alexander Noe` * */ #include #include #include //#include #include #include #include #include "plextor_features.h" static const char progress[] = { '-', '\\', '|', '/', 0 }; #define ASDB_SAVE_DEBUG #define ASDB_LOAD_DEBUG // #define DEBUG_SECUREC //#define SHOW_RAW_TIME int plextor_reboot(drive_info* drive) { drive->cmd[0] = 0xEE; if ((drive->err=drive->cmd.transport(NONE,NULL,0) )) { sperror ("reset",drive->err); return 1; } return 0; } int plextor_get_TLA(drive_info* drive) { if (strncmp(drive->ven,"PLEXTOR ",8) || !strncmp(drive->dev,"CD-R PREMIUM2",15)) { strcpy(drive->TLA,"N/A\0"); return 1; } drive->cmd[0] = PLEXTOR_EEPROM_READ; drive->cmd[8] = 0x01; drive->cmd[9] = 0x00; drive->cmd[10] = 0x00; drive->cmd[11] = 0x00; // The Plextor PX-716 does not understand this command.... if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x100))) { //printf("Possible PX-716...\n"); drive->cmd[0] = 0xF1; drive->cmd[1] = 0x01; drive->cmd[8] = 0x01; drive->cmd[9] = 0x00; drive->cmd[10] = 0x00; drive->cmd[11] = 0x00; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x100) )) { sperror ("Plextor get TLA",drive->err); strcpy(drive->TLA,"N/A\0"); return 1; } } memcpy(drive->TLA,drive->rd_buf+0x29,4); drive->TLA[4] = 0; return 0; } int plextor_read_eeprom_CDR(drive_info* drive) { // unsigned int i,j; drive->cmd[0] = 0xF1; drive->cmd[1] = 0x00; drive->cmd[7] = 0x00; drive->cmd[8] = 0x01; drive->cmd[9] = 0x00; drive->cmd[10] = 0x00; drive->cmd[11] = 0x00; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,256) )) { sperror ("Plextor read CDR EEPROM",drive->err); return drive->err; } return 0; } int plextor_read_eeprom_PX712(drive_info* drive) { // unsigned int i,j; drive->cmd[0] = 0xF1; drive->cmd[1] = 0x00; drive->cmd[7] = 0x00; drive->cmd[8] = 0x02; drive->cmd[9] = 0x00; drive->cmd[10] = 0x00; drive->cmd[11] = 0x00; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,512) )) { sperror ("Plextor read PX712 EEPROM",drive->err); return drive->err; } return 0; } int plextor_read_eeprom_block(drive_info* drive, unsigned char idx, unsigned int sz) { // unsigned int i,j; int offs=idx*sz; // unsigned char* buf=drive->rd_buf+offs; drive->cmd[0] = 0xF1; drive->cmd[1] = 0x01; drive->cmd[7] = idx; drive->cmd[8] = (sz >> 8) & 0xFF; drive->cmd[9] = sz & 0xFF; drive->cmd[10] = 0x00; drive->cmd[11] = 0x00; // if ((drive->err=drive->cmd.transport(READ,buf,sz) )) if ((drive->err=drive->cmd.transport(READ,drive->rd_buf + offs,sz) )) { sperror ("Plextor read EEPROM",drive->err); return drive->err; } /* printf("EEPROM block #%d:\n",idx); for(i=0;i<(sz/0x10);i++) { printf("| %X0 | ", i); for(j=0;j<0x10;j++) printf("%02X ",buf[i*0x10+j]); printf("|"); for(j=0;j<0x10;j++) { if (buf[i*0x10+j] > 0x20) printf("%c",buf[i*0x10+j]); else printf(" "); } printf("|\n"); }; */ return 0; } int plextor_read_eeprom(drive_info* drive, int* len) { int l=0; if (!isPlextor(drive)) { if (len) *len=0; return 1; } switch(drive->dev_ID) { case PLEXTOR_OLD: case PLEXTOR_4824: case PLEXTOR_5224: case PLEXTOR_PREMIUM: case PLEXTOR_PREMIUM2: plextor_read_eeprom_CDR(drive); if ( drive->err ) { if (len) *len=0; return 1; } l = 256; break; case PLEXTOR_708: case PLEXTOR_708A2: case PLEXTOR_712: plextor_read_eeprom_PX712(drive); if ( drive->err ) { if (len) *len=0; return 1; } l = 512; break; case PLEXTOR_714: case PLEXTOR_716: case PLEXTOR_716AL: case PLEXTOR_755: case PLEXTOR_760: for (unsigned char idx=0; idx<4; idx++) { plextor_read_eeprom_block(drive, idx, 256); if ( drive->err ) { if (len) *len=l; return 1; } l+=256; } break; default: printf("Don't know how to read eeprom from this device: %04X:%04X\n", drive->ven_ID, drive->dev_ID); if (len) *len=0; break; } if (len) *len=l; return 0; } int plextor_get_life(drive_info* drive) { uint32_t ucr=0; uint32_t ucw=0; uint32_t udr=0; uint32_t udw=0; drive->life.ok=0; // printf("plextor_get_life()\n"); if (drive->ven_ID != DEV_PLEXTOR) return 1; if (plextor_read_eeprom(drive)) { printf("Error reading eeprom!\n"); return 1; } switch (drive->dev_ID) { case PLEXTOR_OLD: case PLEXTOR_4824: case PLEXTOR_5224: case PLEXTOR_PREMIUM: case PLEXTOR_PREMIUM2: drive->life.dn = ntoh16(drive->rd_buf+0x0078); ucr = ntoh32(drive->rd_buf+0x006C); ucw = ntoh32(drive->rd_buf+0x007A); break; default: drive->life.dn = ntoh16(drive->rd_buf+0x0120); ucr = ntoh32(drive->rd_buf+0x0122); ucw = ntoh32(drive->rd_buf+0x0126); udr = ntoh32(drive->rd_buf+0x012A); udw = ntoh32(drive->rd_buf+0x012E); break; } drive->life.ok=1; int2hms(ucr, &drive->life.cr); int2hms(ucw, &drive->life.cw); int2hms(udr, &drive->life.dr); int2hms(udw, &drive->life.dw); return 0; } int plextor_get_speeds(drive_info* drive) { int sel, max, last; drive->cmd[0]=PLEXTOR_PREC_SPD; drive->cmd[9]=0x0A; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x0A) )) { if (!drive->silent) sperror ("GET_SPEEDS",drive->err);return drive->err;} // sel = (drive->rd_buf[5]<<8) | drive->rd_buf[4]; // max = (drive->rd_buf[7]<<8) | drive->rd_buf[6]; // last = (drive->rd_buf[9]<<8) | drive->rd_buf[8]; sel = ntoh16(drive->rd_buf+4); max = ntoh16(drive->rd_buf+6); last = ntoh16(drive->rd_buf+8); if (!drive->silent) { printf("Selected write speed : %5d kB/s (%d X)\n", sel, sel/177); printf("Max for this media : %5d kB/s (%d X)\n", max, max/177); printf("Last actual speed : %5d kB/s (%d X)\n", last, last/177); } return 0; } int plextor_get_powerec(drive_info* drive) { drive->cmd[0]=PLEXTOR_MODE2; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=0x00; drive->cmd[9]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("GET_POWEREC",drive->err); return drive->err; } drive->plextor.powerec_state = drive->rd_buf[2]; // drive->plextor.powerec_spd = ((drive->rd_buf[4] & 0xFF)<<8) | (drive->rd_buf[5] & 0xFF); drive->plextor.powerec_spd = ntoh16(drive->rd_buf+4); if (!drive->silent) printf("\tPoweRec %s, Recomended speed: %d kB/s\n", drive->plextor.powerec_state ? "ON" : "OFF",drive->plextor.powerec_spd); // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } int plextor_set_powerec(drive_info* drive) { printf("\tTurning PoweRec %s\n",drive->plextor.powerec_state ? "ON" : "OFF"); drive->cmd[0]=PLEXTOR_MODE2; drive->cmd[1]=PLEX_SET_MODE | (drive->plextor.powerec_state?1:0); drive->cmd[2]=0x00; drive->cmd[9]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("SET_POWEREC",drive->err);return drive->err;} drive->plextor.powerec_state = drive->rd_buf[2] & 0xFF; // drive->plextor.powerec_spd = ((drive->rd_buf[4] & 0xFF)<<8) | (drive->rd_buf[5] & 0xFF); drive->plextor.powerec_spd = ntoh16(drive->rd_buf+4); // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); // plextor_get_speeds(drive); return 0; } void plextor_print_silentmode_state(drive_info* drive) { int val, idx; val=drive->plextor_silent.rd; idx=0; printf("Active SilentMode settings:\n"); printf("\tSM Read speed : "); if ( drive->media.type & DISC_DVD ) { while ((silent_dvd_rd_tbl[idx].val!=0xFF) & (silent_dvd_rd_tbl[idx].val!=(val & 0xFF))) idx++; printf("%s\n",silent_dvd_rd_tbl[idx].name); // printf("%s : %d\n",silent_dvd_rd_tbl[idx].name, val); } else { while ((silent_cd_rd_tbl[idx].val!=0xFF) & (silent_cd_rd_tbl[idx].val!=(val & 0xFF))) idx++; printf("%s\n",silent_cd_rd_tbl[idx].name); // printf("%s : %d\n",silent_cd_rd_tbl[idx].name, val); } val=drive->plextor_silent.wr; idx=0; printf("\tSM Write speed : "); if ( drive->media.type & DISC_DVD ) { // while ((silent_dvd_wr_tbl[idx].val!=0xFF) & (silent_dvd_wr_tbl[idx].val!=(val & 0xFF))) idx++; // printf("%s : %d\n",silent_dvd_wr_tbl[idx].name, val); printf("MAX\n"); } else { while ((silent_cd_wr_tbl[idx].val!=0xFF) & (silent_cd_wr_tbl[idx].val!=(val & 0xFF))) idx++; printf("%s\n",silent_cd_wr_tbl[idx].name); // printf("%s : %d\n",silent_cd_wr_tbl[idx].name, val); } printf("\tSM Access time : %s\n",drive->plextor_silent.access?"SLOW":"FAST"); printf("\tSM Load speed : %d\n",drive->plextor_silent.load); printf("\tSM Eject speed : %d\n",drive->plextor_silent.eject); if (!drive->plextor_silent.psaved) { printf("Saved SilentMode settings not found\n"); return; } printf("Saved SilentMode settings:\n"); printf("\tPSM Silent State : %s\n",drive->plextor_silent.pstate?"ON":"OFF"); printf("\tPSM CD Read speed : %dX\n",drive->plextor_silent.prd_cd); printf("\tPSM CD Write speed : %dX\n",drive->plextor_silent.pwr_cd); printf("\tPSM DVD Read speed : %dX\n",drive->plextor_silent.prd_dvd); // printf("\tPSM DVD Write speed: %d\n",drive->plextor_silent.pwr_dvd); printf("\tPSM Access time : %s\n",drive->plextor_silent.paccess?"SLOW":"FAST"); printf("\tPSM Load speed : %d\n",drive->plextor_silent.pload); printf("\tPSM Eject speed : %d\n",drive->plextor_silent.peject); } void plextor_get_silentmode_saved(drive_info* drive) { int len; if (plextor_read_eeprom(drive, &len) || len<0x110) return; drive->plextor_silent.psaved = 1; drive->plextor_silent.pstate = (drive->rd_buf[0x100] == 1); drive->plextor_silent.paccess = (drive->rd_buf[0x101] == 2); drive->plextor_silent.prd_cd = drive->rd_buf[0x102]; drive->plextor_silent.prd_dvd = drive->rd_buf[0x103]; drive->plextor_silent.pwr_cd = drive->rd_buf[0x104]; // drive->plextor_silent.pwr_dvd = 16; // = drive->rd_buf[0x106]; // ??? /* drive->plextor_silent.pload = drive->rd_buf[0x108] - 47; drive->plextor_silent.peject = 48 - drive->rd_buf[0x107]; */ drive->plextor_silent.pload = drive->rd_buf[0x108] - 47; drive->plextor_silent.peject = -(drive->rd_buf[0x107]+48); } int plextor_get_silentmode(drive_info* drive) { drive->plextor_silent.psaved = 0; drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_SILENT; drive->cmd[3]=0x04; drive->cmd[10]=0x08; if (( drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("GET_SILENT_MODE",drive->err); return drive->err; } if (( drive->err=drive->cmd.transport(READ,(void*)&(drive->plextor_silent),8) )) { if (!drive->silent) sperror ("GET_SILENT_MODE",drive->err); return drive->err; } // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); plextor_get_silentmode_saved(drive); return 0; } int plextor_set_silentmode_tray(drive_info* drive, int disc_type, int permanent) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_SILENT_TRAY; drive->cmd[3]=disc_type | 2*!!permanent; drive->cmd[4]=drive->plextor_silent.eject; drive->cmd[6]=drive->plextor_silent.load; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { if (!drive->silent) sperror ("SET_SILENT_MODE_DISC",drive->err);return drive->err;} // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } int plextor_set_silentmode_disc(drive_info* drive, int disc_type, int permanent) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_SILENT_DISC; drive->cmd[3]=disc_type | 2*!!permanent; drive->cmd[4]=drive->plextor_silent.rd; if (disc_type == SILENT_CD) { drive->cmd[5]=drive->plextor_silent.wr; } else { drive->cmd[5]=0xFF; } drive->cmd[6]=drive->plextor_silent.access; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { if (!drive->silent) sperror ("SET_SILENT_MODE_DISC",drive->err);return drive->err;} // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } int plextor_set_silentmode_disable(drive_info* drive, int permanent) { drive->plextor_silent.rd=0x07; drive->plextor_silent.wr=0x07; drive->plextor_silent.access=0; plextor_set_silentmode_disc(drive, 0, permanent); drive->plextor_silent.eject=0x50; drive->plextor_silent.load=0x50; plextor_set_silentmode_tray(drive, 0, permanent); return 0; } void print_gigarec_value(drive_info* drive) { // plextor_get_gigarec(drive); int g,i; printf("GigaRec state : "); i=drive->plextor.gigarec; g=0; while ((gigarec_tbl[g].val!=0xFF) & (gigarec_tbl[g].val!=(i & 0xFF))) g++; printf("%s\nDisc GigaRec rate : ",gigarec_tbl[g].name); i=drive->plextor.gigarec_disc; g=0; while ((gigarec_tbl[g].val!=0xFF) & (gigarec_tbl[g].val!=(i & 0xFF))) g++; printf("%s\n",gigarec_tbl[g].name); } int plextor_set_gigarec(drive_info* drive) { // printf(" applying gigarec setting... "); // print_gigarec_value(i); drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_SET_MODE; drive->cmd[2]=PLEX_MODE_GIGAREC; drive->cmd[3]=(drive->plextor.gigarec?1:0); drive->cmd[4]=drive->plextor.gigarec; drive->cmd[10]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("SET_GIGAREC",drive->err); return drive->err;} drive->plextor.gigarec = drive->rd_buf[3]; drive->plextor.gigarec_disc = drive->rd_buf[4]; // print_gigarec_value(drive); // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } int plextor_get_gigarec(drive_info* drive) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_GIGAREC; drive->cmd[10]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("GET_GIGAREC",drive->err); return drive->err;} drive->plextor.gigarec = drive->rd_buf[3]; drive->plextor.gigarec_disc = drive->rd_buf[4]; // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } void print_varirec(drive_info* drive, int disc_type) { int v,i,s; if (disc_type == VARIREC_DVD) { i=drive->plextor.varirec_pwr_dvd; s=drive->plextor.varirec_str_dvd; } else { i=drive->plextor.varirec_pwr_cd; s=drive->plextor.varirec_str_cd; } v=0; while ((varirec_pwr_tbl[v].val!=0xFF) & (varirec_pwr_tbl[v].val!=(i & 0xFF))) v++; printf("\tVariRec %s power : %s\n", (disc_type == VARIREC_DVD)? "DVD":"CD ", varirec_pwr_tbl[v].name); printf("\tVariRec %s strategy : %s [%d]\n", (disc_type == VARIREC_DVD)? "DVD":"CD ", (disc_type == VARIREC_DVD)? varirec_str_dvd_tbl[s] : varirec_str_cd_tbl[s], s); } int plextor_set_varirec(drive_info* drive, int disc_type) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_SET_MODE; drive->cmd[2]=PLEX_MODE_VARIREC; if (disc_type == VARIREC_DVD) { drive->cmd[3]=disc_type + 2*!!drive->plextor.varirec_state_dvd; drive->cmd[4]=drive->plextor.varirec_pwr_dvd; drive->cmd[5]=drive->plextor.varirec_str_dvd; }else{ drive->cmd[3]=disc_type + 2*!!drive->plextor.varirec_state_cd; drive->cmd[4]=drive->plextor.varirec_pwr_cd; drive->cmd[5]=drive->plextor.varirec_str_cd; } drive->cmd[10]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("SET_VARIREC",drive->err);return drive->err;} if (disc_type == VARIREC_DVD) { drive->plextor.varirec_state_dvd = drive->rd_buf[2]; drive->plextor.varirec_pwr_dvd = drive->rd_buf[3]; drive->plextor.varirec_str_dvd = drive->rd_buf[5]; }else{ drive->plextor.varirec_state_cd = drive->rd_buf[2]; drive->plextor.varirec_pwr_cd = drive->rd_buf[3]; drive->plextor.varirec_str_cd = drive->rd_buf[5]; } // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } int plextor_get_varirec(drive_info* drive, int disc_type) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_VARIREC; drive->cmd[3]=0x02 | disc_type; drive->cmd[10]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("GET_VARIREC",drive->err); return drive->err;} if (disc_type == VARIREC_DVD) { drive->plextor.varirec_state_dvd = drive->rd_buf[2]; drive->plextor.varirec_pwr_dvd = drive->rd_buf[3]; drive->plextor.varirec_str_dvd = drive->rd_buf[5]; }else{ drive->plextor.varirec_state_cd = drive->rd_buf[2]; drive->plextor.varirec_pwr_cd = drive->rd_buf[3]; drive->plextor.varirec_str_cd = drive->rd_buf[5]; } // printf("\t"); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); return 0; } void print_securec_state(drive_info* drive) { printf("SecuRec state : "); printf("%s\n", drive->plextor.securec ? "ON" : "OFF" ); printf("Disc is protected : "); printf("%s\n", drive->plextor.securec ? "YES" : "NO" ); } int plextor_get_securec_state(drive_info* drive) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[2]=PLEX_MODE_SECUREC; drive->cmd[10]=0x08; if ((drive->err = drive->cmd.transport(READ, drive->rd_buf, 8))) { if (!drive->silent) sperror("PLEXTOR_GET_SECUREC", drive->err); return drive->err;} drive->plextor.securec = drive->rd_buf[3]; drive->plextor.securec_disc = drive->rd_buf[4]; // drive->plextor.gigarec = (drive->rd_buf[3] & 0xFF); // drive->plextor.gigarec_disc = (drive->rd_buf[4] & 0xFF); #ifdef DEBUG_SECUREC printf("get_securec() data: "); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); #endif // DEBUG_SECUREC return 0; } int plextor_set_securec(drive_info* drive, char len, char* passwd) { int i; drive->cmd[0]=PLEXTOR_SEND_AUTH; if ((passwd) && (len)) { printf("Turning SecuRec ON\n"); // printf("Setting SecuRec passwd to '%s' (len = %d)\n", passwd, len); drive->cmd[2]=0x01; drive->cmd[3]=0x01; drive->cmd[4]=0x02; drive->cmd[10]=0x10; drive->rd_buf[0]=0; drive->rd_buf[1]=len; for(i=0;i<0x0E;i++) if (ird_buf[i+2]=passwd[i]; else drive->rd_buf[i+2]=0; if ((drive->err = drive->cmd.transport(WRITE, drive->rd_buf, 0x10))) {if (!drive->silent) sperror("PLEXTOR_SET_SECUREC", drive->err); return drive->err;} }else{ printf("Turning SecuRec OFF\n"); if ((drive->err = drive->cmd.transport(NONE, NULL, 0))) {if (!drive->silent) sperror("PLEXTOR_SET_SECUREC", drive->err); return drive->err;} } // if ((drive->dev_ID == PLEXTOR_760)) plextor_px755_do_auth(drive); return 0; } void print_speedread_state(drive_info* drive){ printf("\tSpeedRead: %s\n",drive->plextor.spdread ? "on" : "off" ); } int plextor_set_speedread(drive_info* drive, int state) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_SET_MODE; drive->cmd[2]=PLEX_MODE_SPDREAD; drive->cmd[3]=!!state; drive->cmd[10]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("SET_SPDREAD",drive->err); return drive->err; } // printf("** SPDREAD: "); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); drive->plextor.spdread=drive->rd_buf[2]; return 0; } int plextor_get_speedread(drive_info* drive) { // return 1; drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_SPDREAD; drive->cmd[3]=0; drive->cmd[10]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("GET_SPDREAD",drive->err); return drive->err; } drive->plextor.spdread=drive->rd_buf[2]; return 0; } void print_hcdr_state(drive_info* drive) { printf("\tHide CD-R: %s\n",drive->plextor.hcdr ? "on" : "off"); } void print_sss_state(drive_info* drive) { printf("\tSingleSession: %s\n",drive->plextor.sss ? "on" : "off"); } int plextor_get_hidecdr_singlesession(drive_info* drive) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_SS_HIDE; drive->cmd[9]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8))) { if (!drive->silent) sperror ("GET_HCDR_SSS",drive->err); return drive->err; } drive->plextor.hcdr = !!(drive->rd_buf[2] & 0x02); drive->plextor.sss = (drive->rd_buf[2]) & 0x01; return 0; } int plextor_set_hidecdr_singlesession(drive_info* drive, int hidecdr_state, int singlesession_state) { if (plextor_get_hidecdr_singlesession(drive)) return 1; // printf("Trying to change SS/HIDE state to %d...\n",2*!!hidecdr_state + !!singlesession_state); drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_SET_MODE; drive->cmd[2]=PLEX_MODE_SS_HIDE; drive->cmd[3]=2*!!hidecdr_state + !!singlesession_state; drive->cmd[9]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("SET_HCDR_SSS",drive->err); return drive->err;} // printf("** HCDR_SSS: "); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); drive->plextor.hcdr = !!(drive->rd_buf[2] & 0x02); drive->plextor.sss = (drive->rd_buf[2]) & 0x01; return 0; } int plextor_set_hidecdr(drive_info* drive, int state) { if (plextor_get_hidecdr_singlesession(drive)) return 1; drive->plextor.hcdr = !!state; return plextor_set_hidecdr_singlesession(drive, drive->plextor.hcdr, drive->plextor.sss); } int plextor_set_singlesession(drive_info* drive, int state) { if (plextor_get_hidecdr_singlesession(drive)) return 1; drive->plextor.sss = !!state; return plextor_set_hidecdr_singlesession(drive, drive->plextor.hcdr, drive->plextor.sss); } int plextor_get_bitset(drive_info* drive, int disc_type) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_BITSET; drive->cmd[3]=disc_type; drive->cmd[9]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("PLEXTOR_GET_BITSET",drive->err); return drive->err; } switch (disc_type) { case PLEX_BITSET_R: drive->book_plus_r = ((drive->rd_buf[2] & 0x02) == 0x02); break; case PLEX_BITSET_RDL: drive->book_plus_rdl = ((drive->rd_buf[2] & 0x01) == 0x01); break; } return 0; } int plextor_set_bitset(drive_info* drive, int disc_type) { char book; switch (disc_type) { case PLEX_BITSET_R: book = (drive->book_plus_r); break; case PLEX_BITSET_RDL: book = (drive->book_plus_rdl); break; default: printf("PLEXTOR_SET_BITSET: Invalid disc_type"); return 1; } drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_SET_MODE; drive->cmd[2]=PLEX_MODE_BITSET; drive->cmd[3]=disc_type; drive->cmd[5]=book; drive->cmd[9]=0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("PLEXTOR_SET_BITSET",drive->err); return drive->err;} return 0; } int plextor_get_testwrite_dvdplus(drive_info* drive) { drive->cmd[0]=PLEXTOR_MODE; drive->cmd[1]=PLEX_GET_MODE; drive->cmd[2]=PLEX_MODE_TESTWRITE_DVDPLUS; drive->cmd[10]= 0x08; if ((drive->err=drive->cmd.transport(READ, drive->rd_buf, 8) )) { if (!drive->silent) sperror ("PLEXTOR_GET_TESTWRITE_DVDPLUS",drive->err); return drive->err; } drive->plextor.testwrite_dvdplus = !!drive->rd_buf[2]; return 0; } int plextor_set_testwrite_dvdplus(drive_info* drive) { drive->cmd[0] = PLEXTOR_MODE; drive->cmd[1] = PLEX_SET_MODE; drive->cmd[2] = PLEX_MODE_TESTWRITE_DVDPLUS; drive->cmd[3] = drive->plextor.testwrite_dvdplus; if ((drive->err=drive->cmd.transport(NONE, NULL, 0) )) { if (!drive->silent) sperror ("PLEXTOR_SET_TESTWRITE_DVDPLUS",drive->err); return drive->err;} return 0; } int plextor_plexeraser(drive_info* drive) { long i; printf("Destucting disc [mode=%02X]... \n",drive->plextor.plexeraser); // return 0; drive->cmd[0] = PLEXTOR_PLEXERASER; drive->cmd[1] = 0x06; drive->cmd[2] = drive->plextor.plexeraser; if ((drive->err=drive->cmd.transport(NONE, NULL, 0) )) { if (!drive->silent) sperror ("PLEXTOR_DO_PLEXERASER",drive->err); return drive->err;} while (test_unit_ready(drive)) { msleep(1000); i++; } return 0; } //-----------------// // AUTOSTRATEGY // //-----------------// int plextor_print_autostrategy_state(drive_info* drive) { printf("AutoStrategy mode : "); switch (drive->astrategy.state) { case AS_OFF: printf("OFF"); break; case AS_AUTO: printf("AUTO"); break; case AS_FORCED: printf("FORCED"); break; case AS_ON: printf("ON"); break; default: printf("???"); } printf(" [%d]\n",drive->astrategy.state); return 0; } int plextor_get_autostrategy(drive_info* drive) { drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[10]= 0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("PLEXTOR_GET_AUTOSTRATEGY",drive->err); return drive->err;} // printf("** GET AS: "); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); drive->astrategy.state = (drive->rd_buf[2] & 0x0F); return 0; } int plextor_set_autostrategy(drive_info* drive) { drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[2] = PLEX_SET_MODE + (drive->astrategy.state & 0x0F); drive->cmd[10]= 0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,8) )) { if (!drive->silent) sperror ("PLEXTOR_SET_AUTOSTRATEGY",drive->err); return drive->err;} // printf("** SET AS: "); for (int i=0; i<8; i++) printf("0x%02X ",drive->rd_buf[i]&0xFF); printf("\n"); drive->astrategy.state = (drive->rd_buf[2] & 0x0F); plextor_print_autostrategy_state(drive); return 0; } int plextor_get_autostrategy_db_entry_count(drive_info* drive) { drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[1] = 0x02; drive->cmd[10]= 0x08; if ((drive->err=drive->cmd.transport(READ,(void*)&(drive->astrategy),8) )) { if (!drive->silent) sperror ("PLEXTOR_GET_ASDB_ENTRY_COUNT",drive->err); return drive->err;} // drive->astrategy.dbcnt = drive->rd_buf[6]; // printf ("\t AS DB entries: %d\n", drive->astrategy.dbcnt); return 0; } int plextor_get_autostrategy_db(drive_info* drive)//, void* database) { int size = 8 + (int)drive->astrategy.dbcnt * 32; int i,j; drive->cmd[0] = PLEXTOR_AS_RD; // 0xE4 drive->cmd[1] = 0x02; drive->cmd[9]= (size >> 8) & 0xFF ; drive->cmd[10]= size & 0xFF ; if ((drive->err=drive->cmd.transport(READ,(void*)&(drive->astrategy),size) )) { if (!drive->silent) sperror ("PLEXTOR_GET_ASDB",drive->err); return drive->err;} printf("** AS DB entries: %d\n",drive->astrategy.dbcnt); //* for (j=0; jastrategy.dbcnt; j++) { for (i=0; i<12;i++) if (drive->astrategy.entry[j].MID[i] < 0x20) drive->astrategy.entry[j].MID[i] = 0x20; printf("S#%02d |%c| DVD%cR [%02X] | %3dX | %13s | %d\n", drive->astrategy.entry[j].number, drive->astrategy.entry[j].enabled ? '*':' ', (drive->astrategy.entry[j].type == 0xA1)? '+':'-', drive->astrategy.entry[j].type, drive->astrategy.entry[j].speed, drive->astrategy.entry[j].MID, (drive->astrategy.entry[j].counter[0] <<8) | drive->astrategy.entry[j].counter[1]); } //*/ /* char ch; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,size) )) { sperror ("PLEXTOR_GET_ASDB",drive->err); return drive->err;} printf("ASDB dump:\n"); for (i=0; i<8; i++) printf("%02X ", drive->rd_buf[i] & 0xFF); printf("\n"); for (j=0; jastrategy.dbcnt; j++) { for (i=0; i<32; i++) printf("%02X ", drive->rd_buf[j*32+i+8] & 0xFF); printf("\n"); for (i=0; i<32; i++) { if (drive->rd_buf[j*32+i+8] > 0x1F) ch = drive->rd_buf[j*32+i+8]; else ch = 0x20; printf("%c", ch); } printf("\n"); } */ return 0; } // EXPERIMENTAL STRATEGY SAVE int plextor_get_strategy(drive_info* drive){ int cnt,acnt; int i,s,offs; unsigned char *entry; unsigned char *entry_data; printf("RETR AS cnt...\n"); drive->cmd[0] = PLEXTOR_AS_RD; // 0xE4 drive->cmd[1] = 0x02; drive->cmd[2] = 0x03; drive->cmd[10]= 0x08; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x08) )) { if (!drive->silent) sperror ("PLEXTOR_GET_STRATEGY",drive->err); return drive->err;} acnt= drive->rd_buf[0]; cnt= drive->rd_buf[6]; drive->astrategy.dbcnt = cnt; for (i=0; i<8; i++) printf("%02X ", drive->rd_buf[i]); printf("\nStrategies count: %d\n", drive->astrategy.dbcnt); printf("RETR AS data...\n"); drive->cmd[0] = PLEXTOR_AS_RD; // 0xE4 drive->cmd[1] = 0x02; drive->cmd[2] = 0x03; drive->cmd[9] = cnt; drive->cmd[10]= 0x10; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,cnt*0x100 + 0x10) )) { if (!drive->silent) sperror ("PLEXTOR_GET_STRATEGY_DATA",drive->err); return drive->err;} #ifdef ASDB_SAVE_DEBUG printf("DB HDR0:\n"); for (i=0; i<8; i++) printf("%02X ", drive->rd_buf[i]); printf("\n"); for (s=0; srd_buf[offs+i]); printf("\n"); } offs = 8 + cnt*0x20; printf("DB HDR1:\n"); for (i=0; i<8; i++) printf("%02X ", drive->rd_buf[offs+i]); printf("\n"); for (s=0; srd_buf[offs+i]); printf("\n"); } } #endif for (s=0; sastrategy.entry[s]); entry_data = (unsigned char*)&(drive->astrategy.entry_data[s]); offs = 8 + s*0x20; for (i=0; i<0x20; i++) entry[i] = drive->rd_buf[offs+i]; offs = 0x10 + cnt*0x20 + s*0xE0; for (i=0; i<(0x20*7); i++) entry_data[i] = drive->rd_buf[offs+i]; } return 0; } // EXPERIMENTAL STRATEGY LOAD int plextor_add_strategy(drive_info* drive){ int i, cnt = drive->astrategy.dbcnt; int offs; unsigned char* entry; plextor_clear_autostrategy_db(drive); printf("Adding strategy...\n"); // sending strategy headers for (i=0; i<(8+cnt*0x20); i++) drive->rd_buf[i]=0; drive->rd_buf[0]= (cnt >> 3) & 0xFF; drive->rd_buf[1]= (cnt*0x20 + 6) & 0xFF; drive->rd_buf[2]=0x02; drive->rd_buf[3]=0x80; drive->rd_buf[6]= cnt; drive->rd_buf[7]=0x20; entry = (unsigned char*) &drive->astrategy.entry; for (i=0; ird_buf[8+i] = entry[i]; for (i=0; ird_buf[8+i*0x20] = (unsigned char)((i+1) & 0xFF); #ifdef ASDB_LOAD_DEBUG printf("DB HDR0:\n"); for (i=0; i<8; i++) printf("%02X ", drive->rd_buf[i]); printf("\n"); for (int s=0; srd_buf[offs+i]); printf("\n"); } #endif drive->cmd[0] = PLEXTOR_AS_WR; // 0xE5 drive->cmd[1] = 0x02; drive->cmd[9] = (cnt >> 3) & 0xFF; drive->cmd[10]= (cnt*0x20 + 0x08) & 0xFF; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf,cnt*0x20+8) )) { if (!drive->silent) sperror ("PLEXTOR_ADD_STRATEGY_HDR",drive->err); return drive->err;} // sending strategy parameters for (i=0; i<(8+cnt*0xE0); i++) drive->rd_buf[i]=0; drive->rd_buf[0]= ((cnt*0xE) >> 4) & 0xFF; drive->rd_buf[1]= (cnt*0xE0 + 6) & 0xFF; drive->rd_buf[2]=0x02; drive->rd_buf[3]=0x81; drive->rd_buf[6]= cnt * 7; drive->rd_buf[7]=0x20; entry = (unsigned char*) &drive->astrategy.entry_data; for (i=0; ird_buf[8+i] = entry[i]; for (i=0; ird_buf[i*0xE0+s1*0x20+8] = ((i*7+s1)>>8) & 0xFF; drive->rd_buf[i*0xE0+s1*0x20+9] = (i*7+s1) & 0xFF; } #ifdef ASDB_LOAD_DEBUG printf("DB HDR1:\n"); for (i=0; i<8; i++) printf("%02X ", drive->rd_buf[i]); printf("\n"); for (int s=0; srd_buf[offs+i]); printf("\n"); } } #endif drive->cmd[0] = PLEXTOR_AS_WR; // 0xE5 drive->cmd[1] = 0x02; drive->cmd[9] = ((cnt*0xE) >> 4) & 0xFF; drive->cmd[10]= (cnt*0xE0 + 0x08) & 0xFF; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf,cnt*0xE0+8) )) { if (!drive->silent) sperror ("PLEXTOR_ADD_STRATEGY_DATA",drive->err); return drive->err;} return 0; } int plextor_clear_autostrategy_db(drive_info* drive) { for (int i=0; i<8; i++) drive->rd_buf[i]=0; drive->rd_buf[1]=0x06; drive->rd_buf[2]=0x02; drive->rd_buf[3]=0xFF; drive->cmd[0] = PLEXTOR_AS_WR; // 0xE5 drive->cmd[1] = 0x02; drive->cmd[10]= 0x08; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf,0x08) )) { if (!drive->silent) sperror ("PLEXTOR_CLEAR_ASTRATEGY_DB",drive->err); return drive->err;} return 0; } // int plextor_modify_autostrategy_db(drive_info* drive, int index, int action) { drive->rd_buf[0]=0x00; drive->rd_buf[1]=0x08; drive->rd_buf[2]=0x02; drive->rd_buf[3]=0x00; drive->rd_buf[4]=0x00; drive->rd_buf[5]=0x00; drive->rd_buf[6]=0x01; drive->rd_buf[7]=0x02; drive->rd_buf[8]=index; drive->rd_buf[9]=action; drive->cmd[0] = PLEXTOR_AS_WR; // 0xE5 drive->cmd[1] = 0x02; drive->cmd[10]= 0x0A; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf,0x0A) )) { if (!drive->silent) sperror ("PLEXTOR_MODIFY_ASDB",drive->err); return drive->err;} return 0; } int plextor_create_strategy(drive_info* drive, int mode) { int i=0; int p=0; // if (!drive->silent) printf("AS create: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", (CMD_PLEX_AS_RD) & 0xFF, 4, mode & 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0); drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[1] = 0x04; drive->cmd[2] = mode; if ((drive->err=drive->cmd.transport(NONE, NULL, 0) )) { if (!drive->silent) sperror ("PLEXTOR_CREATE_STRATEGY_START",drive->err); return drive->err;} if (!drive->silent) printf("AS CRE START...\n"); drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[1] = 0x01; drive->cmd[10]= 0x12; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x12) )) { if (!drive->silent) sperror ("PLEXTOR_AS_GET_STATUS",drive->err); return drive->err;} if (!drive->silent) printf(" AS CRE: "); for (i=0; i<0x12; i++) printf("%02X ", drive->rd_buf[i] & 0x0FF); printf("\n"); // Waiting until Strategy is created while (test_unit_ready(drive)) { sleep(1); printf("%c\r", progress[p++]); if (p==4) p=0; i++; } printf("Strategy creation time: %d sec\n",i); drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[1] = 0x01; drive->cmd[10]= 0x12; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x12) )) { if (!drive->silent) sperror ("PLEXTOR_AS_GET_STATUS",drive->err); return drive->err;} // if (!drive->silent) printf(" AS CRE DONE: "); for (i=0; i<0x12; i++) printf("%02X ", drive->rd_buf[i]) & 0x0FF; printf("\n"); return 0; } int plextor_media_check(drive_info* drive, int mode) { int i=0; int p=0; // if (!drive->silent) printf("MQCK CDB: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", // (PLEXTOR_AS_RD) & 0xFF, 1, mode & 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0); if ( !(drive->media.type & (DISC_DVD)) ) { printf("Media Quality Check supported on DVD media only!\n"); return -1; } drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[1] = 0x01; drive->cmd[2] = mode; if ((drive->err=drive->cmd.transport(NONE, NULL, 0))) { if (!drive->silent) sperror ("PLEXTOR_MEDIA_QUALITY_CHECK_START",drive->err); return drive->err;} printf("Starting MQCK...\n"); // Waiting until Media is checked while (test_unit_ready(drive)) { sleep(1); printf("%c\r", progress[p++]); if (p==4) p=0; i++; } printf("\nMedia Check time: %d sec", i); drive->cmd[0] = PLEXTOR_AS_RD; drive->cmd[1] = 0x01; drive->cmd[10]= 0x12; if ((drive->err=drive->cmd.transport(READ,drive->rd_buf,0x12) )) { if (!drive->silent) sperror ("PLEXTOR_AS_GET_STATUS",drive->err); return drive->err; } if(!drive->silent) { printf("Media Check result RAW: "); for (i=0; i<0x12; i++) printf("%02X ", drive->rd_buf[i]); printf("\n"); } return 0; } qpxtool-0.7.1_002/lib/qpxplextor/include/0000755000175000001440000000000011323343517017477 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxplextor/include/plextor_features.h0000644000175000001440000002261311323332455023246 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * * * Some Plextor commands got from PxScan and CDVDlib (C) Alexander Noe` * */ #ifndef __PLEXTOR_FEATURES_H #define __PLEXTOR_FEATURES_H const unsigned char PLEX_GET_MODE = 0x00; const unsigned char PLEX_SET_MODE = 0x10; const unsigned char PLEX_MODE_SS_HIDE = 0x01; const unsigned char PLEX_MODE_VARIREC = 0x02; const unsigned char PLEX_MODE_GIGAREC = 0x04; const unsigned char PLEX_MODE_SILENT_DISC = 0x06; const unsigned char PLEX_MODE_SILENT_TRAY = 0x07; const unsigned char PLEX_MODE_SILENT = 0x08; const unsigned char PLEX_MODE_TESTWRITE_DVDPLUS = 0x21; const unsigned char PLEX_MODE_BITSET = 0x22; const unsigned char PLEX_MODE_SECUREC = 0xD5; const unsigned char PLEX_BITSET_R = 0x0A; const unsigned char PLEX_BITSET_RDL = 0x0E; const unsigned char PLEX_MODE_SPDREAD = 0xBB; typedef struct { const unsigned char val; char name[4]; } REC; // GigaRec definitions const unsigned char GIGAREC_06 = 0x83; const unsigned char GIGAREC_07 = 0x82; const unsigned char GIGAREC_08 = 0x81; const unsigned char GIGAREC_09 = 0x84; const unsigned char GIGAREC_10 = 0x00; const unsigned char GIGAREC_11 = 0x04; const unsigned char GIGAREC_12 = 0x01; const unsigned char GIGAREC_13 = 0x02; const unsigned char GIGAREC_14 = 0x03; const unsigned char GIGAREC_OFF = GIGAREC_10; const REC gigarec_tbl[]={ { GIGAREC_06, "0.6" }, { GIGAREC_07, "0.7" }, { GIGAREC_08, "0.8" }, { GIGAREC_09, "0.9" }, { GIGAREC_10, "OFF" }, { GIGAREC_11, "1.1" }, { GIGAREC_12, "1.2" }, { GIGAREC_13, "1.3" }, { GIGAREC_14, "1.4" }, { 0xFF,"N/A" } }; // VariRec definitions const unsigned char VARIREC_CD = 0x00; const unsigned char VARIREC_DVD = 0x10; const unsigned char VARIREC_CD_STRATEGY = 0x03; const unsigned char VARIREC_DVD_STRATEGY = 0x04; const unsigned char VARIREC_PLUS_1 = 0x01; const unsigned char VARIREC_PLUS_2 = 0x02; const unsigned char VARIREC_PLUS_3 = 0x03; const unsigned char VARIREC_PLUS_4 = 0x04; const unsigned char VARIREC_NULL = 0x00; const unsigned char VARIREC_MINUS_1 = 0x81; const unsigned char VARIREC_MINUS_2 = 0x82; const unsigned char VARIREC_MINUS_3 = 0x83; const unsigned char VARIREC_MINUS_4 = 0x84; const REC varirec_pwr_tbl[]={ { VARIREC_MINUS_4,"-4" }, { VARIREC_MINUS_3,"-3" }, { VARIREC_MINUS_2,"-2" }, { VARIREC_MINUS_1,"-1" }, { VARIREC_NULL, " 0" }, { VARIREC_PLUS_1, "+1" }, { VARIREC_PLUS_2, "+2" }, { VARIREC_PLUS_3, "+3" }, { VARIREC_PLUS_4, "+4" }, { 0xFF,"N/A" } }; typedef char str16[16]; const unsigned char varirec_max_str_cd=7; const str16 varirec_str_cd_tbl[]={ "Default", "Azo", "Cyanine", "PhtaloCyanine A", "PhtaloCyanine B", "PhtaloCyanine C", "PhtaloCyanine D" }; const unsigned char varirec_max_str_dvd=9; const str16 varirec_str_dvd_tbl[]={ "Default", "Strategy0", "Strategy1", "Strategy2", "Strategy3", "Strategy4", "Strategy5", "Strategy6", "Strategy7" }; // Silent Mode definitions const unsigned char SILENT_CD_WR_48X = 0x08; const unsigned char SILENT_CD_WR_32X = 0x06; const unsigned char SILENT_CD_WR_24X = 0x05; const unsigned char SILENT_CD_WR_16X = 0x03; const unsigned char SILENT_CD_WR_8X = 0x01; const unsigned char SILENT_CD_WR_4X = 0x00; const REC silent_cd_wr_tbl[]={ { SILENT_CD_WR_48X, "48X" }, { SILENT_CD_WR_32X, "32X" }, { SILENT_CD_WR_24X, "24X" }, { SILENT_CD_WR_16X, "16X" }, { SILENT_CD_WR_8X, "8X" }, { SILENT_CD_WR_4X, "4X" }, { 0xFF, "max" } }; const unsigned char SILENT_CD_RD_48X = 0x05; const unsigned char SILENT_CD_RD_40X = 0x04; const unsigned char SILENT_CD_RD_32X = 0x03; const unsigned char SILENT_CD_RD_24X = 0x02; const unsigned char SILENT_CD_RD_8X = 0x01; const unsigned char SILENT_CD_RD_4X = 0x00; const REC silent_cd_rd_tbl[]={ { SILENT_CD_RD_48X, "48X" }, { SILENT_CD_RD_40X, "40X" }, { SILENT_CD_RD_32X, "32X" }, { SILENT_CD_RD_24X, "24X" }, { SILENT_CD_RD_8X, "8X" }, { SILENT_CD_RD_4X, "4X" }, { 0xFF, "max" } }; /* const unsigned char SILENT_DVD_WR_18X = 0x08; const unsigned char SILENT_DVD_WR_16X = 0x06; const unsigned char SILENT_DVD_WR_12X = 0x05; const unsigned char SILENT_DVD_WR_8X = 0x03; const unsigned char SILENT_DVD_WR_6X = 0x01; const unsigned char SILENT_DVD_WR_4X = 0x00; const REC silent_dvd_wr_tbl[]={ { SILENT_DVD_WR_18X, "18X" }, { SILENT_DVD_WR_16X, "16X" }, { SILENT_DVD_WR_12X, "12X" }, { SILENT_DVD_WR_8X, "8X" }, { SILENT_DVD_WR_6X, "6X" }, { SILENT_DVD_WR_4X, "4X" }, { 0xFF, "max" } }; */ const unsigned char SILENT_DVD_RD_16X = 0x04; const unsigned char SILENT_DVD_RD_12X = 0x03; const unsigned char SILENT_DVD_RD_8X = 0x02; const unsigned char SILENT_DVD_RD_5X = 0x01; const unsigned char SILENT_DVD_RD_2X = 0x00; const REC silent_dvd_rd_tbl[]={ { SILENT_DVD_RD_16X, "16X" }, { SILENT_DVD_RD_12X, "12X" }, { SILENT_DVD_RD_8X, "8X" }, { SILENT_DVD_RD_5X, "5X" }, { SILENT_DVD_RD_2X, "2X" }, { 0xFF, "max" } }; const unsigned char SILENT_CD = 0x01; const unsigned char SILENT_DVD = 0x05; const unsigned char SILENT_ACCESS_FAST = 0x00; const unsigned char SILENT_ACCESS_SLOW = 0x02; // PX-716 Autostrategy definitions const unsigned char AS_OFF = 0x00; const unsigned char AS_AUTO = 0x01; // PX-755/PX-760 AS extentions const unsigned char AS_FORCED = 0x04; const unsigned char AS_ON = 0x08; const unsigned char ASDB_ENABLE = 0x01; const unsigned char ASDB_DISABLE = 0x00; const unsigned char ASDB_DELETE = 0xFF; const unsigned char ASDB_CRE_QUICK = 0x01; const unsigned char ASDB_CRE_FULL = 0x05; const unsigned char ASDB_REPLACE = 0x00; const unsigned char ASDB_ADD = 0x02; const unsigned char AS_MEDIACK_QUICK = 0x11; const unsigned char AS_MEDIACK_ADV = 0x31; const unsigned char PLEXERASER_QUICK = 0x11; const unsigned char PLEXERASER_FULL = 0x31; extern int plextor_reboot(drive_info* drive); extern int plextor_get_TLA(drive_info* drive); // extern int plextor_read_eeprom(drive_info* drive, int* len=NULL); extern int plextor_get_life(drive_info* drive); // PoweRec extern int plextor_set_powerec(drive_info* drive); extern int plextor_get_powerec(drive_info* drive); extern int plextor_get_speeds(drive_info* drive); // silent mode extern void plextor_print_silentmode_state(drive_info* drive); extern int plextor_get_silentmode(drive_info* drive); extern int plextor_set_silentmode_tray(drive_info* drive, int disc_type, int permanent); extern int plextor_set_silentmode_disc(drive_info* drive, int disc_type, int permanent); extern int plextor_set_silentmode_disable(drive_info* drive, int permanent); // GigaRec extern void print_gigarec_value(drive_info* drive); extern int plextor_set_gigarec(drive_info* drive); extern int plextor_get_gigarec(drive_info* drive); // VariRec extern void print_varirec(drive_info* drive, int disc_type); extern int plextor_set_varirec(drive_info* drive, int disc_type); extern int plextor_get_varirec(drive_info* drive, int disc_type); // SecuRec extern void print_securec_state(drive_info* drive); extern int plextor_get_securec_state(drive_info* drive); extern int plextor_set_securec(drive_info* drive, char len, char* passwd); // SpeedRead extern void print_speedread_state(drive_info* drive); extern int plextor_set_speedread(drive_info* drive, int state); extern int plextor_get_speedread(drive_info* drive); // Hide-CDR / SingleSession extern void print_hcdr_state(drive_info* drive); extern void print_sss_state(drive_info* drive); extern int plextor_get_hidecdr_singlesession(drive_info* drive); extern int plextor_set_hidecdr(drive_info* drive, int state); extern int plextor_set_singlesession(drive_info* drive, int state); // Bitsetting extern int plextor_get_bitset(drive_info* drive, int disc_type); extern int plextor_set_bitset(drive_info* drive, int disc_type); // Simulation on DVD+ extern int plextor_get_testwrite_dvdplus(drive_info* drive); extern int plextor_set_testwrite_dvdplus(drive_info* drive); // PlexEraser extern int plextor_plexeraser(drive_info* drive); // AUTOSTRATEGY // get/set autostrategy mode extern int plextor_print_autostrategy_state(drive_info* drive); extern int plextor_get_autostrategy(drive_info* drive); extern int plextor_set_autostrategy(drive_info* drive); // read autostrategy database extern int plextor_get_autostrategy_db_entry_count(drive_info* drive); extern int plextor_get_autostrategy_db(drive_info* drive); // returns detailed strategies data extern int plextor_get_strategy(drive_info* drive); // loads strategy to drive extern int plextor_add_strategy(drive_info* drive); // clears autostrategy database extern int plextor_clear_autostrategy_db(drive_info* drive); // use action = ASDB_ENABLE/DISABLE/DELETE extern int plextor_modify_autostrategy_db(drive_info* drive, int index, int action); extern int plextor_create_strategy(drive_info* drive, int mode); extern int plextor_media_check(drive_info* drive, int mode); #if 0 // PX-755/760 Auth extern int px755_do_auth(drive_info* drive); extern int px755_get_auth_code(drive_info* drive,unsigned char* auth_code); extern int px755_send_auth_code(drive_info* drive,unsigned char* auth_code); extern int px755_clear_auth_status(drive_info* drive); extern int px755_calc_auth_code(unsigned char* auth_code); #endif #endif //__PLEXTOR_FEATURES qpxtool-0.7.1_002/lib/Makefile.lib0000644000175000001440000000153111352116471016032 0ustar shultzusers LIB_SHORT = lib$(LIBN).so LIB_SONAME = $(LIB_SHORT).$(VER_MAJOR) LIB_SONAMEV= $(LIB_SONAME).$(VER_MINOR) LIB = $(LIB_SONAMEV).$(VER_MICRO) CXXFLAGS += -I. -I./include -I../include LDFLAGS += -shared -Wl,-soname,$(LIB_SONAME) all: $(LIB) $(LIB): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) mkdir -p ../lib ln -fs ../$(DIR)/$(LIB) ../lib/$(LIB_SHORT) clean: rm -f $(LIB_SHORT)* $(OBJS) ../lib/$(LIB_SHORT) *~ include/*~ install: mkdir -p $(DESTDIR)$(LIBDIR) install -m 755 $(LIB) $(DESTDIR)$(LIBDIR) ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/$(LIB_SONAME) ln -sf $(LIB_SONAME) $(DESTDIR)$(LIBDIR)/$(LIB_SHORT) install -m 644 $(HDRS) $(DESTDIR)$(INCDIR)/qpxtool uninstall: rm -f $(DESTDIR)$(LIBDIR)/$(LIB_SHORT) rm -f $(DESTDIR)$(LIBDIR)/$(LIB_SONAME) rm -f $(DESTDIR)$(LIBDIR)/$(LIB) .PHONY: all clean install uninstall qpxtool-0.7.1_002/lib/qpxyamaha/0000755000175000001440000000000011352127612015615 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxyamaha/Makefile0000644000175000001440000000037411267556626017301 0ustar shultzusersSRC = yamaha_features HDRS = include/yamaha_features.h LIBN = qpxyamaha SRCS = $(patsubst %,%.cpp, $(SRC)) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) VER_MAJOR = 0 VER_MINOR = 7 VER_MICRO = 0 LDLIBS += -lqpxtransport -L../lib include ../Makefile.lib qpxtool-0.7.1_002/lib/qpxyamaha/yamaha_features.cpp0000644000175000001440000001742211334220103021452 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include //#include #include #include #include #include "yamaha_features.h" int yamaha_check_amqr(drive_info* drive) { // unsigned char len=0; unsigned int ilen=0; int offs=0; int r; // int i; mode_sense(drive, MODE_PAGE_WRITE_PARAMETERS, 00, 256); ilen = ntoh16u (drive->rd_buf); /* printf("data len: %4X (%4d), Header:\n", ilen, ilen); for (i=0; i<8; i++) printf(" %02X",drive->rd_buf[i] & 0xFF); printf("\n"); */ offs=0; while (((drive->rd_buf[offs]) & 0x3F) != MODE_PAGE_WRITE_PARAMETERS) offs++; /* len=drive->rd_buf[offs+1]; printf("Page:\n"); for (i=0; i<(len+2); i++) { if (!(i%8)) printf("\n"); printf(" %02X",drive->rd_buf[i+8] & 0xFF); } printf("\n"); */ if (!ilen) return 1; // drive->silent++; /* drive->rd_buf[offs+2] &= 0xB0; drive->rd_buf[offs+2] |= 0x08; drive->rd_buf[offs+3] &= 0xF0; drive->rd_buf[offs+4] &= 0xF0; drive->rd_buf[offs+8] = 0x00; */ /* drive->rd_buf[offs+2] = 0x32; drive->rd_buf[offs+2] = 0x88; drive->rd_buf[offs+3] = 0x00; drive->rd_buf[offs+4] = 0x00; drive->rd_buf[offs+8] = 0x00; */ r = mode_select(drive, ilen); // drive->silent--; return r; } int yamaha_set_amqr(drive_info* drive) { return 1; } int yamaha_check_forcespeed(drive_info* drive) { int offs; int speed; int speed_wr; mode_sense(drive, MODE_PAGE_MM_CAP_STATUS, 00, 256); offs=0; while (((drive->rd_buf[offs]) & 0x3F) != MODE_PAGE_MM_CAP_STATUS) offs++; speed = ntoh16(drive->rd_buf+offs+14); speed_wr = ntoh16(drive->rd_buf+offs+28); drive->cmd[0] = MMC_SET_SPEED; drive->cmd[1] = 0x01; drive->cmd[2] = (speed >> 8) & 0xFF; drive->cmd[3] = speed & 0xFF; // drive->cmd[4] = 0xFF; // drive->cmd[5] = 0xFF; drive->cmd[4] = (speed_wr >> 8) & 0xFF; drive->cmd[5] = speed_wr & 0xFF; drive->cmd[11] = 0x80; if ((drive->err=drive->cmd.transport(NONE,NULL,0) )) { return (drive->err); } return 0; } int yamaha_set_forcespeed(drive_info* drive) { int speed = 0xFFFF; int speed_wr = 0xFFFF; if (drive->parms.read_speed_kb) speed = drive->parms.read_speed_kb; if (drive->parms.write_speed_kb) speed_wr = drive->parms.write_speed_kb; drive->cmd[0] = MMC_SET_SPEED; drive->cmd[1] = 0x01; drive->cmd[2] = (speed >> 8) & 0xFF; drive->cmd[3] = speed & 0xFF; // drive->cmd[4] = 0xFF; // drive->cmd[5] = 0xFF; drive->cmd[4] = (speed_wr >> 8) & 0xFF; drive->cmd[5] = speed_wr & 0xFF; drive->cmd[11] = 0x80; if ((drive->err=drive->cmd.transport(NONE,NULL,0) )) { return (drive->err); } return 0; } int yamaha_f1_get_tattoo(drive_info* drive) { unsigned int ilen=0; int offs=0; drive->yamaha.tattoo_i=0; drive->yamaha.tattoo_o=0; drive->yamaha.tattoo_rows=0; drive->silent++; mode_sense(drive, MODE_PAGE_YAMAHA_TATTOO, 00, 256); drive->silent--; if (drive->err) { if (drive->err == 0x52400) return 1; return 0; } ilen = ntoh16u (drive->rd_buf); if (ilen < 22) return 1; offs=0; while (((drive->rd_buf[offs]) & 0x3F) != MODE_PAGE_YAMAHA_TATTOO) offs++; /* unsigned char len=0; int r; int i; printf("data len: %4X (%4d), Header:\n", ilen, ilen); for (i=0; i<8; i++) printf(" %02X",drive->rd_buf[i] & 0xFF); printf("\n"); len=drive->rd_buf[offs+1]; printf("Page:"); for (i=0; i<(len+2); i++) { if (!(i%8)) printf("\n"); printf(" %02X",drive->rd_buf[i+8] & 0xFF); } printf("\n"); */ drive->yamaha.tattoo_i = (drive->rd_buf[offs+4] << 16) | (drive->rd_buf[offs+5] << 8) | drive->rd_buf[offs+6]; drive->yamaha.tattoo_o = (drive->rd_buf[offs+7] << 16) | (drive->rd_buf[offs+8] << 8) | drive->rd_buf[offs+9]; drive->yamaha.tattoo_rows = drive->yamaha.tattoo_o - drive->yamaha.tattoo_i; return 0; } int yamaha_write(drive_info* drive, char mode, char bufid, int offs, int plen) { // printf("Mode: %d, BufID: %d, offs: %d, plen: %d, blen: %d\n", mode, bufid, offs, plen, blen); // drive->cmd[0] = SPC_WRITE_BUFFER; drive->cmd[0] = 0x3B; drive->cmd[1] = mode & 7; drive->cmd[2] = bufid; // drive->cmd[1] = 0x01; // drive->cmd[2] = 0; drive->cmd[3] = (offs >> 16) & 0xFF; drive->cmd[4] = (offs >> 8) & 0xFF; drive->cmd[5] = offs & 0xFF; drive->cmd[6] = (plen >> 16) & 0xFF; drive->cmd[7] = (plen >> 8) & 0xFF; drive->cmd[8] = plen & 0xFF; if ((drive->err=drive->cmd.transport(WRITE,drive->rd_buf, plen << 11) )) { if (!drive->silent) sperror ("YAMAHA_WRITE", drive->err); return (drive->err); } return 0; } int yamaha_set_tattoo_speed(drive_info* drive) { int speed = 0x06E5; int speed_wr = 0x02C2; drive->cmd[0] = MMC_SET_SPEED; drive->cmd[1] = 0x00; drive->cmd[2] = (speed >> 8) & 0xFF; drive->cmd[3] = speed & 0xFF; drive->cmd[4] = (speed_wr >> 8) & 0xFF; drive->cmd[5] = speed_wr & 0xFF; if ((drive->err=drive->cmd.transport(NONE,NULL,0) )) { if (!drive->silent) sperror ("YAMAHA_SET_SPEED",drive->err); return (drive->err); } return 0; } int yamaha_f1_do_tattoo(drive_info* drive, unsigned char *iimage, uint32_t bsize){ uint32_t maxbuf = 20480; char *crow; char *imagec; uint32_t i,j; uint32_t tattoo_size; uint32_t blen = 2048; drive->parms.status |= STATUS_LOCK; set_lock(drive); yamaha_f1_get_tattoo(drive); if (!drive->yamaha.tattoo_rows) { printf("No space left on CD! Can't write zero size tattoo!\n"); drive->parms.status &= (~STATUS_LOCK); set_lock(drive); return 2; } tattoo_size = drive->yamaha.tattoo_rows * sizeof (tattoo_row); if (iimage) { // image = (tattoo_row*) iimage; if (bsize != tattoo_size) { printf("yamaha_f1_do_tattoo(): RAW image size must be exactly %d bytes (3744x%d)\n", tattoo_size,drive->yamaha.tattoo_rows); return 1; } imagec = (char*) iimage; } else { printf("yamaha_f1_do_tattoo(): got no image buffer! writing test image...\n"); // image = (tattoo_row*) malloc( tattoo_size ); imagec = (char*) malloc( tattoo_size ); for (i=0; iyamaha.tattoo_rows; i++) { for (j=0; j< sizeof(tattoo_row); j++) { if (j<20) imagec[i*3744+j]=0xFF; else if ((j>1000) && (j<1040)) imagec[i*3744+j]=0xFF; else imagec[i*3744+j]=0; // image[i][j]=0xFF; } } } drive->parms.status |= STATUS_LOCK; set_lock(drive); yamaha_set_tattoo_speed(drive); printf("Sending T@2 data (%d rows)...\n", drive->yamaha.tattoo_rows); // int b=0; crow = imagec; i = 0; while (ird_buf, 0, maxbuf); blen = min(maxbuf, tattoo_size-i); memcpy(drive->rd_buf, crow+i, blen); // printf("block #%2d: %5d bytes / %2d sect\n",b,blen,blen/2048); // printf("block %d\n",i); if (!i) { if(yamaha_write(drive, 1, 0, drive->yamaha.tattoo_i, maxbuf/2048)) goto tattoo_err; } else { // blen = (blen+2047) / 2048 * 2048; // yamaha_write(drive, 1, 0, 0, 10, blen); if(yamaha_write(drive, 1, 0, 0, maxbuf/2048)) goto tattoo_err; } // b++; printf("."); i+=maxbuf; } if (yamaha_write(drive, 1, 0, drive->yamaha.tattoo_o, 0)) goto tattoo_err; printf(".\n"); printf("Burning T@2...\n"); // printf("\nwait_unit_ready()...\n"); if (wait_unit_ready(drive, 1000)) printf("Error %05X...\n", drive->err); // printf("\nwait_fix()...\n"); if (wait_fix(drive, 1000)) printf("Error %05X...\n", drive->err); printf("\nDone!\n"); goto tattoo_done; tattoo_err: sperror("Error writing T@2", drive->err); tattoo_done: drive->parms.status &= (~STATUS_LOCK); set_lock(drive); if (drive->parms.status & STATUS_LOCK) { drive->parms.status &= (~STATUS_LOCK); set_lock(drive); } load_eject(drive, false, false); if (!iimage) free(imagec); return 0; } qpxtool-0.7.1_002/lib/qpxyamaha/include/0000755000175000001440000000000011303161601017230 5ustar shultzusersqpxtool-0.7.1_002/lib/qpxyamaha/include/yamaha_features.h0000644000175000001440000000162711303161130022542 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * * */ #ifndef __YAMAHA_FEATURES_H #define __YAMAHA_FEATURES_H typedef char tattoo_row[3744]; // AMQR extern int yamaha_check_amqr(drive_info* drive); extern int yamaha_set_amqr(drive_info* drive); // Force Speed extern int yamaha_check_forcespeed(drive_info* drive); extern int yamaha_set_forcespeed(drive_info* drive); // DiscT@2 extern int yamaha_f1_get_tattoo(drive_info* drive); extern int yamaha_f1_do_tattoo(drive_info* drive, unsigned char *iimage, uint32_t tsize); #endif qpxtool-0.7.1_002/lib/include/0000755000175000001440000000000011205231130015233 5ustar shultzusersqpxtool-0.7.1_002/lib/include/qpx_transport.h0000644000175000001440000000006311135321464020343 0ustar shultzusers#include "../qpxtransport/include/qpx_transport.h" qpxtool-0.7.1_002/lib/include/qpx_opcodes.h0000644000175000001440000000006111135321476017744 0ustar shultzusers#include "../qpxtransport/include/qpx_opcodes.h" qpxtool-0.7.1_002/lib/include/common_functions.h0000644000175000001440000000006611135321764021005 0ustar shultzusers#include "../qpxtransport/include/common_functions.h" qpxtool-0.7.1_002/lib/include/plextor_features.h0000644000175000001440000000006411135321577021020 0ustar shultzusers#include "../qpxplextor/include/plextor_features.h" qpxtool-0.7.1_002/lib/include/qpx_mmc.h0000644000175000001440000000005511135321450017057 0ustar shultzusers#include "../qpxtransport/include/qpx_mmc.h" qpxtool-0.7.1_002/lib/include/threads.h0000644000175000001440000000005511205231130017036 0ustar shultzusers#include "../qpxtransport/include/threads.h" qpxtool-0.7.1_002/lib/include/yamaha_features.h0000644000175000001440000000006211135321676020561 0ustar shultzusers#include "../qpxyamaha/include/yamaha_features.h" qpxtool-0.7.1_002/lib/include/pioneer_spdctl.h0000644000175000001440000000006211135321550020424 0ustar shultzusers#include "../qpxpioneer/include/pioneer_spdctl.h" qpxtool-0.7.1_002/lib/include/qpx_mmc_defs.h0000644000175000001440000000006211203213314020051 0ustar shultzusers#include "../qpxtransport/include/qpx_mmc_defs.h" qpxtool-0.7.1_002/lib/include/qpx_scan.h0000644000175000001440000000005111135321635017230 0ustar shultzusers#include "../qpxscan/include/qpx_scan.h" qpxtool-0.7.1_002/lib/include/qpx_scan_plugin_api.h0000644000175000001440000000006411135321654021444 0ustar shultzusers#include "../qpxscan/include/qpx_scan_plugin_api.h" qpxtool-0.7.1_002/man/0000755000175000001440000000000011323424660013632 5ustar shultzusersqpxtool-0.7.1_002/man/qscan.1.gz0000644000175000001440000000324611272260400015436 0ustar shultzusers‹aéJXmO#7þœüŠQîC[)Y8ÚkÕ|*@£B’²pÇPåì:‰aß°½YrÊïŒí}!õ¤lrkÏ3/žyfŒwÛG°„É#Î!OB.A/9œŽ¯àt8^žÁôêèlt øŽý¡×ö.ÿ„Žî@ç#}ö=8̤ˆºp°¿ÿ;¾9åIÂÂ5øË<ÒÿÀ_é·(]uœì{¿uÚž(ãÃóa§mßÞö H•FtšF0O%<æ,z 1Ú—KóDC:‡4Ó"`¾³Hþ×ñdêüNûv~dozÑ>–wÐöfê…^ƒágtnn{þ=…yÆwp;¿xkwföIó,Ìsõ]™¹Ù§ÌS¿G¦§¡Ðh¹‚äÀ—Ænãë`è_Œ¦—£É¸ ž"[$’üée¹”ø R)y Eš¸xŠd…ÐË*ž!_‰€+Ú—†iÁ4fEå ‘‹¢´@5)äŠÃŠ'!bªŒb.c–„ }ær !sTŸèh *ϲT´EQÀ$‡C•«.ñä± gBó4éÂxxÜ…)ZÌ1/¦Ò©D¸ÔrÍD„8"A7cf|‹Òô˜†¥ÖYoï1{¢8x 8n[p/áz¯2Â[ê8*Kñï´)¢3Ž a4vÁ?öGø<¼<앨ùDHþ?냊6TK±BÇ©¦1Ú¥eEè…ÓkÖœ70çLcz+¯MépF‡ØÇ#wyë`£¸· ¯ûm4È…”«5Т‘„ï—¾³ÖZN6[™.Ù^CÀJ0!ï©@ àq™>G– à_ûÛÒ /€<ŒØšK«tÔ* ¹5ÉxräöÆ\ãWߥt¥G¢ÕÞÉù®MAØo;BÀh‘LÙÒ{΂‰×/°B¡úÕ®B$?4÷÷»ƒ~wØï‚çy(ÞýÚïþãö›d™˜DÂ!ñÛ’_¯Gµ8ËU Ój™âÄ7Š+S‰têl…IËfX [uç–„´äQ†0­g™@ïÚ`7ùF]Æy¨Û° 0$g¡)œBbI0–($}“·5ïÐ>]>‘ƒáWpf ÒH…ÖðެrÉ@+ÄÍ;pK„˜ æ¶gVÑ!#ËGä6”0‘Pz+ºnŸ“(:pÓ³«ÓÑnàпòaGÃñßîëßÁçÁÅä6¦bóÛœ.‡“1l‘`3Ń/ðÇÙðúrrwÏ1j&Ù‚“?ÓÊ'§ÜÑ(-½J¥tLFÖ‰VTŠZZ-Ô3às† ¹jÉV‚X—ål³Àð|æŽUZ­ò“,mµH5ñí«º#VŠâQK?Wyk’J¾ÄÕ`½€¢D}”;’Ú¤O¸Ä½q¼s¿=¹z»í-ïÑ„g]‹ÑÁ¿CÆ¥F-Wv¯÷ÈÚljȺþð¦¬Mo (Á¥©pøÐ,0®- d\š.™Ž( «¼\±(w¹…BW¨½ç›ÓI©¢ 61§ÞnºužÐ@ÅRË’Vè}ÝÛK¦Rֲ݆5»×lzIašü á!A.)–Lï¶h¶¶£‰«#‡;0¢¶qŒ2†ãÝ+œ6¯äMžhŽTs#õ¦Ðœ¬‚Í\oîgÍÌœõ¿ÊOrÇTòc/XòàÁ˜\0ô½ÅA#“i€öâ,R ¤d‡ý´TOiÿÕIˆÍÒÜêÅ*•Íú/ê»'“2$¨¾Cùθ´ˆR¥˜4Ô„"µÍÕ–E–,QsLu‰ccód)^”¶=¡cXòPÎõ•EÙÊᯭQ¶ÇO¦ïÂLG8­MG'ø˜Ð¯ÉIdnT±s€ÌgšdÁ5:; ï6ù~æL¾Z»1t†á~e;¦Ý®EL#$‹ÖßøKl›O…­bwq4zöÿ-Õíºx6¼]®|WdàŠËYªxÝù8ãR÷0¯Ó,ÃL£È„|–/šYè<ýbü$í5ˆ#$ÊK×KPPiÊ%%ÊaÔtÁÙ⦰áõá9òfóÞ׋ªë’À¨jp+g0;!°W°ê6æÆß¼™ú DŸ–zʰǃVgŠz½›†JYïH¼âQR²ã§öÔÝ<^ÜÙ ~oi°„õéɲ[ß¾»R¢¶uü+m.¾ÍaHç”ÆAà0Á_°?†y¯ÍòOÖšΜ6U´ë;3tÀÃ7×!ÔjèDŒì´2…b.›—Þ9[ä"ù£à3/äTdíÿ§»¾qpxtool-0.7.1_002/man/Makefile0000644000175000001440000000125711323424660015277 0ustar shultzusersMAN1DIR = $(DESTDIR)$(MANDIR)/man1 MAN8DIR = $(DESTDIR)$(MANDIR)/man8 all: clean: install: mkdir -p $(MAN1DIR) mkdir -p $(MAN8DIR) install -m 0644 f1tattoo.1.gz $(MAN1DIR) install -m 0644 pxfw.8.gz $(MAN8DIR) install -m 0644 cdvdcontrol.1.gz $(MAN1DIR) install -m 0644 qscan.1.gz $(MAN1DIR) install -m 0644 qscand.1.gz $(MAN1DIR) install -m 0644 qpxtool.1.gz $(MAN1DIR) install -m 0644 readdvd.1.gz $(MAN1DIR) uninstall: rm -f $(MAN1DIR)/f1tattoo.1.gz rm -f $(MAN8DIR)/pxfw.8.gz rm -f $(MAN1DIR)/cdvdcontrol.1.gz rm -f $(MAN1DIR)/qscan.1.gz rm -f $(MAN1DIR)/qscand.1.gz rm -f $(MAN1DIR)/qpxtool.1.gz rm -f $(MAN1DIR)/readdvd.1.gz .PHONY: all clean install uninstall qpxtool-0.7.1_002/man/f1tattoo.1.gz0000644000175000001440000000174411271244276016107 0ustar shultzusers‹¾HåJVÛnã6}¶¾bà—¾XÌ¥E‹ E±Ž­l&Ž9»ÉÖy ¥QD,- $eoúõ‘äk²m ˆ¦53gn‡C‹Eò /½7”‹¥Ã ê2C ¾@ø8}€ñ4¾ÞÀìáêf2zâi‹@Ìÿ€þÖ¾ý ~Î +«ô.ÏÏ¥7±,eö IQkÿþ4k³îï á\üÒÄÒ"!¼éð6î;á"„L¹æ.!Gék‹ Or% ×0‡÷Ÿ!õJѵÉÓôn–L’‚E~µÃû+ÔÏ´ϰÈí[q˜Á8þD ’NÊŠŽ—°•†^ä÷ÿf·S¶r¿åJ£ Ýïÿת*_:+Úí­š´Æq2ºŸÌæ“»éA…¨oÜ(­Êú¤¦tF#@ÓµÃFÚ•ë´”žL Sþàá=8é•Ë_aÑQ¿˜f…—Ú¤¯²T%d¯(Úp®ãáüá>¦*3H*Ë=üFù‚ý’÷̪5ºÚö.0Në®Âò*ŸMÑÓWÔ1lçÇR;Ýk‹øžRšEAãâHr('~oez—Àã,âÌ×h§µQå—‡:£h0Žq4!™ž¢Á—N¿!Ë]sˆ„l¾iî„TGY.kǽƒ¦{A¯ç6ÕΡk7^®¥ÒrIçe4&šÑiü4ÞNÑ X ®ŽÐø…W˜ÍSΟ 5MÙ4­­ÅÒÇÂv %*8ôžŽ·œöºårWÂÍ5™µ´Åì-ÞN´ãñ;XðOçãpÐ5:«<˜Ž7Ÿn–‚ZÉ<1ã‘×nyæ} vÍ„!íLz ¹5«;àñw‚Ìc±Ó í!³vß4¿m {½´Àô+¨|û¥fU‘,kG«n'D Ùr kqÜš;²F»4úñÂí`j_Õ¾%kü8¼ÝðÈ<ºônÎ÷zZ9ÿ†œá–aÇN68½Jºé”ÂqC8åR®°kÉÖOS7wR¸CÝæÿf<ŸÊ-…¶~Ιbxï»jþHÐ%Ò”pEG¯âv¨UeÍWÄ{Ç×Ó\ÜÊ—Z•6¸1ø4³œ”qpxtool-0.7.1_002/man/qpxtool.1.gz0000644000175000001440000000045011322627236016043 0ustar shultzusers‹%;Kqpxtool.1mPËN1]Û¯8éJ4£.Œ;yLp" „…†Mi/0ÉL;v >¾Þ ‚.tqs“sr9j)ñÚ¼Gï+”-U¤[²Ø9KqKæ ÓÐ/º8£“Á8ívüËEn¤Yo…A(+aWR=ƒÓº‚R˜Uøâèy=<~B™£ A²§Ét–²ngQ^ùX½ª/ ¼~/`˜~!òðï¢'ËE9‡²ÅŠ—R‘ÙwÞiü½ô÷Íw²úMôVÆßÝ[Ok˜f×óÑì~4´)’Î,l%Uór ’%ÍOÓ¡ŽS5rƒ6˜ãZoÞï ö‡…%’Ë«Xq€½I÷ó”ÔxÒ äB|ÀÔ%·ØFO ðÞÃÏ ®e³Žö‹Þ9-½O‹Ëvqqá™úõe?æ8ûôYªn‡,™6Œ†iÙu6¢ûà~ÁCv„FeǯtA®•ÂÜQêÚÉ\T^ í@T•wc+gtU‘d¶©kmÂÞž{‰Â5†ëpáîXë„ ÞVfgÔžÛ\'Ñ0‰Ò$‚8ŽÉ=zJ¢o­½o–©?&Ô³ì¾èU\0ë{§±­?\f±²Ë OÎÈ~´ö‡,µÜTuãJYQ+e5æ²ÜšÂì€-"Ø®d¾»ÒMU„¦þPotM¥vÄpM \#ѺŽÀ¾®Øú)_aþÃ6kph¬„¥ÎÙ‹ŽÐêÈí1†ôX•üh@º!@Yîç EGÇ`®Ÿ•üÉ|Bö£ïð@Œ9•¤1ð™Ïã­¤·8 ð™ŠAUÙJ·¢©CÑ[¦˜¤él>CiôúM>foµÔD˜% 5=(ì‚—-TH×¹.¨3˜_;Húåî=ïMð.pÙМ =—>Ƴ»ôøg£Ø‡¸…€¦Ûâþ'þ‘€På±/=šá¤×©µTT³±°ŽÆÔ§hBÜjtò½QœÀ[ó‘Àz:ŽK­Ȭ#!+ÙNƒ/ŸŠ– tÜ:û q‡e ¸÷žµÿ@ðuM'¯ÏrMM½Á5*g9Ö}<ÏToqÈÎÿàA3ÃHqpxtool-0.7.1_002/man/qscand.1.gz0000644000175000001440000000073011322627300015577 0ustar shultzusers‹q";Kqscand.1m’Ms›0†ÏæWìp饢N{ê­þP]& f™N[rÑ4‰ aOòë#ñ¸“£Wûì¾ZmT„ð¯/¹ {0Ø ïQÀ °5Â.y€Mh¶ºƒôa}oÀ-š0Qþ‰!¼qëË2‚-–Øþy¹üê´*ÅŰzhìo¸ÕÏ>…¯ ,£›0ˆ˜Ë”¬îiÌrA@¡=kóΆwËwÔfò S<û•ìS³0(ŽëûCêGw|0ðŸ¨ÝG¼=!’Ÿ$Nrš}_m(Ym·e HçnÉrštŸåP³‰ën)ÛdqšÇûäb×5¿1|®eYC%OØÃ“€—%ö=Xíwž¤\›ªzlw¾I?Å)ô–—·SÁýXËÝÓ;/Hý©±éf[ÁbÑ×ú ^ `ŠQ>FiÁ±ÕÊÅ-æ@¡Õ “,ŸñõíaN-<&ð0TWŒÔeFŒ§ÐjJzJy‰WŽÜ(•d\ã¯íŸ¯‘½E%Uua;ÏvÚØ«‚3ëÕ÷¨Ì½Çú½7N¯›â‘lÝ t¼Bmgô [Tvl~ÝójêÛ‘pž×‹à@S›Zqpxtool-0.7.1_002/man/readdvd.1.gz0000644000175000001440000000164411271244325015751 0ustar shultzusers‹ÕHåJmUÉrã6=‹_Ñ¥¹J´ì¤Rž¢…ã¨b-eÊŽgF:@DËD 0IYùútƒÔâ‰$@¡—×ÝOẠ…”µåh›£p(¡Ò-”Âýü îãyü8|€åÓèa:zây‡A¸úº­{º·ü BVå=¸ ~§_îQk!dU^~ƒ¿Ì¿¹©»g?¸ Ý L(Ò|8‹»Áé÷uŸ¥ôY*ý BƒÚ‹W³ƒ£©,8z¥lºG©Ûl`d½UBFŸ7\È‘¶5Bj¬­Š’JÜæ&ýášÌÉ×ùb™L“n°ÞN¾÷ó ½²Mn-\Ÿô%Lâgbá–ÎOû»ÿÃp}³Þ=ÂNå*Gû|_÷|ÚðZ7ïzC6Mha'ãÇér5]Ì/$ðÚÖ#®°ó‘ÐV•èü=ñcÑÇ tiÈ\ã¡¥Œ€Ñ o™°R*÷#N~ÊÍtƒ”XÞ"s=Ä=HÆÉ”ÞÃÕ°OɈþ¢,þMÑScŠR¥"iU!ÌM "Ͻ[•Öä95“«ŠÂØæl™ã[IÑvt¹¡¦÷Aéê-bæZZ¦p#±¾ÉäK  •b»=s)zO¸ Z´ rÆÜøôû%ÔÔ/JbߥNšÌè÷‘íUàߢŸ½™]®0G´MBÎqIéƒqY‹õ(™Ü̱¤%joýœÇRgÛ/ñ#£TFOñ‚ÊOyg"]$ðò¿X|ùÑÙê ô/w×6ã¨7‰zqÔãV&÷Þר÷­µ÷Ͳð=J³Âîë~ÎÐq¾y*ç¨!wÄß³¨…ÊÅ–ºo<ñ ;yž´0]ëžµîæ¸ÌÜ•·–Ñm{¬ûæj¤ØÉƒêtü€¥j|ßò¾ãµ =8»Ðq@Ο:­“ˆ4rPeŽ$зµ+e›¸&—N§rtõh·†Ö½‘§ÓË1µ5’tÊwv-oÓùŠTt¼š>Ç0[LžµùçD_i ?î,v & ßTÙ ?œ YÆad½2•f^*+kQ—ùчñÞ<~ÔÁؔơ !IÁ Sü2œ-â÷ÂG*ÖNÀN¤3—Ì"0ŸÁ3ÒLiÇK4^úl¾UšÕZi‡–mª¢Û1:'ñèšû`Ò)>]3\¦§¯{àº"a “"Ó±ˆr‘©XÉ\…¢LB•‰b¦Äû‹âýéÅéõÑqõñøÃÙ‰ÀÿÓ‹á©ßño~Ý‹®èîãÿÞ¡/ÎåÊ{{?ãó{•$2\‰á¬Œ‹ßÅ¿õ±^t[”bß?MRʸÛñ‡`{qt~Úí4—ŒzâFãw¡ÅTbRƱpÏt"VºÌÄU¬î Q cªE(ÃqøÛÅåÕðlØíŒ&ÇMƽx4¹îøãlýÁ—^(§Ÿ°Ý¯âËåÕÍÙåÅW^Jì§Ã“ë3þ²ÛIïÍ4Z¨œ”2Tž“jšN”,Ê Š™,„Ì”ÈË4ÕYkWmíà L|q3ÑÚ͒ȈíR&…‡Š·,Ê\­í–ÖFÁL,„ÌaÓ‰ H4˱"üíuÄ;ßÉ™ˆq™ç @<©+2Šå8Þ`Îvb¼;=ºùx}:lŸ’ÝUÎÎ3Ñq¬—Q2­¶ß{TzXd²PSxÉqT UQ`•'‘œ&:Wç:TžxMåµ <ñkªÞÉàÚsFòƒî<ÞËiÍð·^*^:TAiþˆb•†ÑÌc5ÄqD:¡ó2–…ù;U*¼V22 Å'™E †U`¡ì ¶Cu€¡J–:—s‡%ï°ZÄZß œÔ¬(Òþîîr¹ôSkò@Ϭ›Gó4^!Ô ’l4užK¸lÒ'ÛŠŽ%ý–ÞÓÙû9„ ç2U~¢Š]»ÞŸsŽ…\5]Éi õ­—’ûâˆèˆ¡`"ΧØõÉð ?nŽ<ñqxLz½‹2õÿ)¦³êèÍ/tÁ¾Ad.òb¤ +Ÿ9nèÿ%å}Vf‹þ™Ø…?íÎÂÛ~ UqJ¾eŸå=dJqàö­¶FsÒÙÐx¤{ÍB,")È[ò „rçÜæœ5¿é¯S'j)h‡±\‘g‘@’Q‹df´­K8Âñp°{¡ üê»,âädØAµö]¦Ô¶EAØï°ˆ-&ôTY“{.ƒË¡¸ÝàFù]¿Z…¸{}Ð\sÒ÷}ï´ï ß÷AîýÖ÷~·ëÙYšqÙí4?‰G×”†¤xgN–\/T…ÊæQBŽ¿Ì" a‘; Î$‰ˆÄ'9“š§ÅJ > ÄœBØŸÛB‹Ó¢\`u”pp´tÈB#ÜI™ÁñK› Vs ÝqLúå© ¢I°qÎþ±èõdÞ›#%° Ò¼û…/(6EòAÖÜ‘øž}q6¡¥Ø16‘hd•­ê|ãa+L:¢%¯Ô /;`Qßð%Ý`ë@…”ËÍ3²»1©ÁŒ=¡¨QC¦Œ)­XJ‡Äû:ß¹‹†$”¬ºr>¿£a½oˆgÔ¤pc,Âê²ÝhÎ4‹†ØÉ„åê©ó”•p–ú€‰2T TRó¬dWþcŸ8EƒÂÙÎ {Àô¤±ÒÌ™øÁºŠn´n©ž”ó1æ­x±q©‘‹¥Â±ìzû{/›¬&“&¯Pý%n¡ŠÛÜê-|'§ø0³l25×Êú«È@ˆyÃujZvÍõÈ«6!G âc qÖË·k¨ˆ‹|¦Ë8¤"†CG çurè/ßþœ|åêýEþ™}åÜ·³#„øÆ.󭌂;âÍ’à° ·¢UƱM6 Œ¼§ •¬‘I&ERJˆ9‘6N~ñ@üiæHñ3•Æ’`Ð÷Ê”;X¯vC ÀÐ…›`ÒÀà\Ù,} hV¬RE<¹ øŽzח綘PQgHO™>SðÜVT>5‹Ê8* åU¶æÛÂþS 'Ô]úÌózNžT%¡Ã«kß5 ;6Ç"3¡²ææ©y¥ª­Ÿ Ÿ²ÙñN©Ô­7”¶o€Á¢|]Û0^Åg)*üΦ¢ÕÃZôw)Ü$lê¼cql£1èv(ÕWG5¤³²hÄÖpS¢Iùxbò|PfüPØíäœ/Š­ßõFè!z=KÇ‹ ´¬Xmü“‘À&Þ`&3b2SqZs OUÿE©ÿ2‘\á±”Qm;FZr61›ƒÞšÕ±—3¹ÿÜË‘„ªUiµ˜ê¹`¬†º,Ò’3ØBecXgaÃöeÝÎYBù’Ù,š¢Ü ./ ù ”{„°~B&ÏÔ°<Le€hw‘j{›o©Á:©Àâé¡;ù!o”à’£pç¤å$.ó™{h•«NÚÇåd >ÒL#+“«LãÔìÖËCׄ”ЩÚrNÚ: ¨R«Hãh&ÝÞÓfßÞ‹ÁÑ¥ßùˆýaJMßâ¯üŽÔÃß_FŬ’7)“€j™/. ²,#0AYsÍ=¸°¦Ûd3 Ì»&¬³¾c†ÂO"á)¨À¹Qy`Q±Ãî~!/WÿtÄøß [ÝÉ”óêžÿÆÃŸ¸ÅðľÿÚãÑd&×”ºv¾ÛI3‚¥8Ec®bcE†ªž ¿@‰Ñ‹rÍG†8¡Ìb‚žœÝTÚ›³+*DÇæ$1#’ó–™Áäl–/:ùj}(=VêätoÓ¢]]¯AHL ¸ØPµNLo²ã6)d½jbºúß¨Ššµ*Û-@ž€Í …‘ÍYaàÿR®è@§Z‡Ô2KêʟÛJâSM—~²!±j›™#”¹ÃV¤}¢ Šyƒ%Ã2i°p¦ØÎ£Io3T=ÊP÷ze@Ìjts2Ø%\AI–DN5§Lf4¿µ7»uXâêíSl6Ôù -ƒb­Â~>º¾8»x߯ºÖJ¹ú}Ûpäj*,/bf& ‚ˆ8»‡K€–sº#®Z—6…3˜™Ÿñlô tvŒC‡OiŒ—›ÓþŒÏ6™á™&ËÌÊk…aÉ.MŸOðÑN_Xþ/ŒokÍÜÿ <ì&œhÉ´µUPkØO±Íõf-9ót5áoçsÉþL¥‚ Ù‚UËR¤=ÜÉ*èôs!DYص™Ô–ØÕÁ3R*‡6ï>•`¬RØÐ.t-Âä\iÚ-hkƒ©‹›i·sRR™çK*96E3'\díÆÚ¯ò tƒYh¡D‡Spóm/p`}EÎHL[Ëÿnš—Ìv»úøRk·«½3®]ÂÆý…%„ÿl×°T*¯’'öI¥Žß¢£±Í¼þšQ‹„BC÷#ζÌ<`´‚ó×\Ó8Œ`K0“ðú›¯ëAt·sDóðÜ´4ÖË‹’s{¢ 'ûP§¼áÃ,.'¦rÔopPòqg>ž+ÖlØL®uŠUŒ¬9/ïîqÇк.¡Ëˆà©²IÈIÁq8ÖºðÅ?F½—"½Ÿ,«ù®õ`E{:l‰gy~m´Î¦ãçǶJ±Vt’Í«xU5{›”¡«†iŒ¥*”8°“ ˆ®lš׊ž–h·­yÏ Ü˜*•*hƒÙËcÂ×™˜À¬ê3™›ÌNåH5àSn9.Ú´mô·j»FŒ¸5ÍCŸd†î‚)³Y£¯¶IŠ5Y°¢ÏbQ!{Y{DA˜Ëûh^ÎEÓ3ÉÅNm£¿>¸÷žšq¬Yl''áCO¼õÄ~½>ðÄáþ¿m+°ÌT€2¾zBgÉßcå7e‡‹Gw¿¶yœd[øþÓÂ!ñG#ÿ€thÈVÔmˆæÐ7là7äí=% ¶Ý·(þí^CÖÆªÅO6%½yýlQbMR>Ò®É÷šS-Oªê¬Â×Õ²æ=_·CÍl^£¦I”å4à§„è˓ɡœà¹Pqþáhûhd» å\Ê,æ:ƒ)mgÊ1ÌÊ Pãmº¾@§«Fy”eiî^×!Ä3²°3Kž?5µiY¡Ø¸3}FJ´h˜»‘fk³Ž$!rçá.àºiJŸ™öTH¯Zð„°¥àðÞRZH­M=¤Æ”õÐÒê ¶Ã¬GÉ„µ»|®ÌcªfÔiÃ:Z}`¯ž4ªLØï:Ju…l¨Oèçô¨gÒŒƒ2Ωa–ö&¡íâ+AÓ8'—zEÂ7… †%õž¯"çyu0]Cw'!$Ö—ê¬A·XDãŒm×x+¢þŽpHCbódH8…¶ ‰ú!bÅ®wÆ|F7¨†H :Yû"Au®ŒøbjH7tjÎTî¥03Nˆ£Þ!¥¢W‡ß5âyEìÕÀêƒ{®ÏyÑ!/j\Á®qww`•³ÐeËŒô «Ë m?tGf…+;)[n¿Ðu·Äôˆ[^”t'@ŸÙ±ô2iÐ]V]¢¹`6c?šãìÍëy&s%rŪÑ|Ú¸’¦ìàwì‰Ô@6D§ÑªA°²Â°ßí‰ß5õsj * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // const unsigned char op_blacklist[]={ 0xAC, 0xDE, 0xDF , 0xF8 }; const unsigned char op_blacklist[]={ 0xDE, 0xDF, 0xF8 }; // used in TEST mode const int op_blacklist_sz=sizeof(op_blacklist); int op_blacklisted(unsigned char opcode){ if (op_blacklist_sz) for (int i=0; i #include #include #include #include #include #include #include #include "pxfw.h" #include "version.h" long fsize(FILE* f){ struct stat st; fstat(fileno(f),&st); return st.st_size; } int custom_command (drive_info* dev, unsigned char opcode) { dev->cmd[0]=opcode; if ((dev->err=dev->cmd.transport(NONE,NULL,0))) return dev->err; return 0; } void FW_convert_to_ID (int* dev_ID, char* buf, int* FWSZ_CRC) { *FWSZ_CRC=0; if (!strncmp(buf,"PLEXTOR CD-R PX-W4824A",24)) { *dev_ID=PLEXTOR_4824; *FWSZ_CRC=0x79FFE; } else if (!strncmp(buf,"PLEXTOR CD-R PX-W5224A",24)) { *dev_ID=PLEXTOR_5224; *FWSZ_CRC=0x79FFE; } else if (!strncmp(buf,"PLEXTOR CD-R PREMIUM2",23)) { *dev_ID=PLEXTOR_PREMIUM2; *FWSZ_CRC=0xEFFFE; } else if (!strncmp(buf,"PLEXTOR CD-R PREMIUM",22)) { *dev_ID=PLEXTOR_PREMIUM; *FWSZ_CRC=0x7C7FE; } else if (!strncmp(buf,"PLEXTOR DVDR PX-708A",22)) { *dev_ID=PLEXTOR_708; *FWSZ_CRC=0xEFFFE; } else if (!strncmp(buf,"PLEXTOR DVDR PX-712A",22)) { *dev_ID=PLEXTOR_712 | PLEXTOR_708A2; *FWSZ_CRC=0xEFFFE; // *FWSZ_CRC=0xFAD9E; // *FWSZ_CRC=0x0F0000; } else if (!strncmp(buf,"PLEXTOR DVDR PX-716A ",23)) { *dev_ID=PLEXTOR_716 | PLEXTOR_714; *FWSZ_CRC=0xEFFFE; } else if (!strncmp(buf,"PLEXTOR DVDR PX-716AL",23)) { *dev_ID=PLEXTOR_716AL; *FWSZ_CRC=0xEFFFE; } else if (!strncmp(buf,"PLEXTOR DVDR PX-760A",22)) { *dev_ID=PLEXTOR_760 | PLEXTOR_755; *FWSZ_CRC=0x1EFFFE; } else *dev_ID = 0; } void PLEXTOR_convert_to_ID (drive_info* dev, int* FWSZ) { *FWSZ=0; if (!strncmp(dev->ven,"PLEXTOR ",8)) { dev->ven_ID=DEV_PLEXTOR; if(!strncmp(dev->dev,"CD-R PX-W4824A",16)) { dev->dev_ID=PLEXTOR_4824; *FWSZ=524288; } else if(!strncmp(dev->dev,"CD-R PX-W5224A",16)) { dev->dev_ID=PLEXTOR_5224; *FWSZ=524288; } else if(!strncmp(dev->dev,"CD-R PREMIUM ",15)) { dev->dev_ID=PLEXTOR_PREMIUM; *FWSZ=524288; } else if(!strncmp(dev->dev,"CD-R PREMIUM2",15)) { dev->dev_ID=PLEXTOR_PREMIUM2; *FWSZ=983040; } else if(!strncmp(dev->dev,"DVDR PX-708A ",15)) { dev->dev_ID=PLEXTOR_708; *FWSZ=983040; } else if(!strncmp(dev->dev,"DVDR PX-708A2",15)) { dev->dev_ID=PLEXTOR_708A2; *FWSZ=1028096; } else if(!strncmp(dev->dev,"DVDR PX-712A",14)) { dev->dev_ID=PLEXTOR_712; *FWSZ=1028096; } else if(!strncmp(dev->dev,"DVDR PX-714A",14)) { dev->dev_ID=PLEXTOR_714; *FWSZ=983040; } else if(!strncmp(dev->dev,"DVDR PX-716A ",15)) { dev->dev_ID=PLEXTOR_716; *FWSZ=983040; } else if(!strncmp(dev->dev,"DVDR PX-716AL",15)) { dev->dev_ID=PLEXTOR_716AL; *FWSZ=983040; } else if(!strncmp(dev->dev,"DVDR PX-755A",14)) { dev->dev_ID=PLEXTOR_755; *FWSZ=2031616; } else if(!strncmp(dev->dev,"DVDR PX-760A",14)) { dev->dev_ID=PLEXTOR_760; *FWSZ=2031616; } else dev->dev_ID=PLEXTOR_OLD; } } /* int plextor_read_eeprom(drive_info* dev, unsigned char idx, unsigned int sz) { // char* data; unsigned int i,j; int offs=idx*sz; unsigned char* buf=dev->rd_buf+offs; dev->cmd[0] = 0xF1; dev->cmd[1] = 0x01; dev->cmd[7] = idx; dev->cmd[8] = (sz >> 8) & 0xFF; dev->cmd[9] = sz & 0xFF; if ((dev->err=dev->cmd.transport(READ,buf,sz) )) { sperror ("read EEPROM",dev->err); return (0); } printf("EEPROM block #%d:\n",idx); for(i=0;i<(sz/0x10);i++) { printf("| %X0 | ", i); for(j=0;j<0x10;j++) printf("%02X ",buf[i*0x10+j]); printf("|"); for(j=0;j<0x10;j++) { if (buf[i*0x10+j] > 0x20) printf("%c",buf[i*0x10+j]); else printf(" "); } printf("|\n"); }; return 1; } */ int fwblk_send(drive_info* dev, int offs, int blksz, bool last) { dev->cmd[0] = 0x3B; dev->cmd[1] = last ? 0x05:0x04; dev->cmd[2] = 0x00; dev->cmd[3] = (offs >> 16) & 0xFF; dev->cmd[4] = (offs >> 8) & 0xFF; dev->cmd[5] = offs & 0xFF; dev->cmd[6] = (blksz >> 16) & 0xFF; dev->cmd[7] = (blksz >> 8) & 0xFF; dev->cmd[8] = blksz & 0xFF; dev->cmd[9] = 0x00; dev->cmd[10]= 0x00; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,blksz) )){ sperror ("SEND_FWBLK",dev->err); if (!last) return 1; } return 0; } int fwblk_read(drive_info* dev, int offs, int blksz, unsigned char flag) { printf("data read...\n"); return 1; } /* dev->cmd[0] = 0x3B; // cmd[1] = last ? 0x05:0x04; dev->cmd[1] = flag; dev->cmd[2] = 0x00; dev->cmd[3] = (offs >> 16) & 0xFF; dev->cmd[4] = (offs >> 8) & 0xFF; dev->cmd[5] = offs & 0xFF; dev->cmd[6] = (blksz >> 16) & 0xFF; dev->cmd[7] = (blksz >> 8) & 0xFF; dev->cmd[8] = blksz & 0xFF; dev->cmd[9] = 0x00; dev->cmd[10]= 0x00; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,blksz) )){ sperror ("READ_FWBLK",dev->err); return 1; } return 0; } */ void csum_init(unsigned short int *csum, int FW_dev_ID){ *csum = 0; if (FW_dev_ID <= PLEXTOR_PREMIUM) *csum = 0x8000; } void csum_update(unsigned short int *csum, unsigned char* buf, int len) { int i; unsigned int ad; for (i=0; i1) { // printf("Parsing additional options...\n"); for (i=1; i(i+1)) { i++; flags |= FL_DEV; devname = argv[i]; } else { printf("Option %s needs parameter\n",argv[i]); exit (1); } } else if(!strcmp(argv[i],"-if")) { if(argc>(i+1)) { i++; flags |= FL_FWIF; fwfname = argv[i]; } else { printf("Option %s needs parameter\n",argv[i]); exit (1); } } else if(!strcmp(argv[i],"-oe")) { if(argc>(i+1)) { i++; flags |= FL_EEOF; eefname = argv[i]; } else { printf("Option %s needs parameter\n",argv[i]); exit (1); } } else if(!strcmp(argv[i],"-h")) flags |= FL_HELP; else if(!strcmp(argv[i],"-l")) flags |= FL_SCAN; else if(!strcmp(argv[i],"-u")) flags |= FL_UPDATE; // else if(!strcmp(argv[i],"-b")) flags |= FL_BACKUP; else if(!strcmp(argv[i],"-v")) flags |= FL_DEBUG; else if(!strcmp(argv[i],"-t")) flags |= FL_TEST; else if(!strcmp(argv[i],"-e")) flags |= FL_EEPROM; else if(!strcmp(argv[i],"-r")) flags |= FL_RESET; else if(!strcmp(argv[i],"-f")) flags |= FL_FORCE; else { printf("Illegal option: %s.\nUse -h for details\n",argv[i]); // usage(argv[0]); exit (1); } } } if (flags & FL_DEBUG) { printf("Flags: "); if (flags & FL_DEV) printf(" DEV"); if (flags & FL_FWIF) printf(" FWIF"); if (flags & FL_HELP) printf(" HELP"); if (flags & FL_UPDATE) printf(" UPDATE"); if (flags & FL_BACKUP) printf(" BACKUP"); if (flags & FL_DEBUG) printf(" DEBUG"); if (flags & FL_TEST) printf(" TEST"); if (flags & FL_EEPROM) printf(" EEPROM"); if (flags & FL_RESET) printf(" RESET"); } if (flags & FL_HELP) { usage(argv[0]); exit (0); } if (flags & FL_SCAN) { scanbus(); exit (0); } if (!(flags & FL_DEV)) { printf("\n*** No device selected! ***\n\n"); usage(argv[0]); scanbus(); exit (3); } dev = new drive_info(devname); if (dev->err) { printf("%s: can't open device: %s\n", argv[0], devname); delete dev; return 4; } printf("\nDevice : %s\n",devname); inquiry(dev); PLEXTOR_convert_to_ID(dev,&fwsz); // dev->silent++; // detect_mm_capabilities(dev); // dev->silent--; printf("Vendor : '%s'\n",dev->ven); printf("Model : '%s'", dev->dev); if ( isPlextor(dev) ) { // if ( dev->ven_ID == DEV_PLEXTOR ) { plextor_get_TLA(dev); printf(" (TLA#%s)",dev->TLA); } printf("\nF/W : '%s'\n",dev->fw); if (get_drive_serial_number(dev)) printf("Serial#: %s\n",dev->serial); if ((dev->ven_ID != DEV_PLEXTOR) && (!(flags & FL_FORCE))){ printf("%s: Only PLEXTOR drives supported!\n",argv[0]); return 1; } else { if ((dev->dev_ID == PLEXTOR_OLD)){ printf("%s: Not supported PLEXTOR drive!\n",argv[0]); return 1; } } // plextor_get_life(dev); if (flags & FL_RESET) { plextor_reboot (dev); exit (0); } if (flags & FL_EEPROM) { int eelen; // unsigned char buf[1024]; plextor_read_eeprom(dev, &eelen); if (flags & FL_EEOF) { eefile = fopen(eefname,"w"); if (!eefile) { printf("%s: Can't write file: %s\n",argv[0],eefname); exit (2); } fwrite(dev->rd_buf, eelen, 1, eefile); fclose(eefile); } exit (0); } if (flags & FL_TEST) { for (unsigned int opcode=0x0000; opcode<0x0100; opcode++) { printf("Trying OpCode: "); print_opcode((unsigned char)opcode); if (!op_blacklisted((unsigned char)opcode)) { int err = custom_command(dev, (opcode & 0x00FF)); if (!err) printf ("OK"); else if (err==-1) printf ("command didn't passed to dev"); else if (err==0x52000) printf ("*** command not supported ***"); else print_sense(err); } else { printf("!!! BLACK LIST !!!"); } printf("\n"); } exit(0); } if (!(flags & FL_FWIF)) exit(3); fwfile = fopen(fwfname, "r"); if (!fwfile) { printf("%s: Can't open file: %s\n",argv[0],fwfname); return 1; } // fwblk=4096; const int FB=64; const int HH=16; fwfsz=fsize(fwfile); if (!fread(dev->rd_buf, FB, 1, fwfile)) { printf("%s: error reading file: %s\n", argv[0], fwfname); return 1; } printf("this dev FW size : %7d (%06X)\n",fwsz,fwsz); printf("FW file size : %7d (%06X)\n",fwfsz,fwfsz); printf("First %d bytes of FW:\n", FB); for (i=0; i<(FB/HH); i++){ printf("| "); for (j=0; jrd_buf[i*HH+j] & 0xFF); printf(" | "); for (j=0; jrd_buf[i*HH+j] & 0xFF) > 0x20) printf("%c",dev->rd_buf[i*HH+j] & 0xFF); else printf(" "); printf(" |\n"); } FW_convert_to_ID(&FW_dev_ID,(char*) dev->rd_buf,&crc_offs); // if (FW_dev_ID & (PLEXTOR_PREMIUM | PLEXTOR_PREMIUM2)) if (FW_dev_ID & (PLEXTOR_5224 | PLEXTOR_4824)) fwblk = 16384; else fwblk = 4096; if (flags & FL_BACKUP) { printf("BackUp feature not implemented yet...\n"); return 1; for (i=0; ird_buf[i]=0; i=0; if ((err = fwblk_read(dev, i*fwblk, fwblk, 2))) { printf("** error reading data\n"); }; printf("First %d bytes of FW:\n", FB); for (i=0; i<(FB/HH); i++){ printf("| "); for (j=0; jrd_buf[i*HH+j] & 0xFF); printf(" | "); for (j=0; jrd_buf[i*HH+j] & 0xFF) > 0x20) printf("%c", dev->rd_buf[i*HH+j] & 0xFF); else printf(" "); printf(" |\n"); } } fseek(fwfile,0,SEEK_SET); last=0; // printf("fwblocks = %d\n",fwblocks); fwblocks=fwfsz/fwblk; fwblocks_crc=(crc_offs+2)/fwblk_crc; #if 0 csum_init(&CSUM, FW_dev_ID); for (i=0;ird_buf, fwblk_crc, 1, fwfile); if (i == (fwblocks_crc-1)) last=1; if (last) { blen = fwblk_crc - 2; crca = i*fwblk_crc+blen; fCSUM = (dev->rd_buf[fwblk_crc-2] << 8) | dev->rd_buf[fwblk_crc-1]; printf("blk offs: %06X, last: %06X\n", fwblk_crc*i, fwblk_crc*i+blen); } else blen = fwblk_crc; // printf("Offset %04X, block # %X\n",i*fwblk,i); // printf ("%02X: %4dB CRC=%04X\n",i,blen,CRC16blk); csum_update(&CSUM, dev->rd_buf, blen); } #else unsigned char *fw = (unsigned char*) malloc(fwfsz); printf("FW buffer @%p\n", fw); if (!fread(fw, fwfsz, 1, fwfile)) { printf("%s: error reading file: %s\n", argv[0], fwfname); return 1; } /* for (int of=2; ofdev_ID & FW_dev_ID)) { printf("FW is not for selected dev!\n"); fclose(fwfile); exit(4); } if (flags & FL_UPDATE) { if (fwfsz!=fwsz) { printf("*** File size does not match FW size! ***\n"); delete dev; fclose(fwfile); exit(3); } if (CSUM_diff) { if (!(flags & FL_FORCE)) { printf("*** CheckSum incorrect, you can try -f option AT YOUR RISC to Force flashing ...\n"); delete dev; fclose(fwfile); exit(3); } else { printf("*** CheckSum incorrect, but -f option found. Force flashing...\n"); } } determine_disc_type(dev); // printf("Disc type: %02X\n",dev->media.type); if (dev->media.type > 1) { printf("Disc found, doing eject...\n"); if (load_eject(dev, false, false)) { printf("Can't eject disc:( remove disc manualy and try again\n"); delete dev; fclose(fwfile); exit (1); } } printf("Waiting for dev to become ready... "); if (!wait_unit_ready(dev,2,0)) { printf(" OK!\n"); } else { printf("\nDrive not ready! Aborting...\n"); delete dev; fclose(fwfile); exit(1); } last=0; printf("Sending FirmWare to dev, %d bytes per block\n", fwblk); fseek(fwfile,0,SEEK_SET); // for (i=0;i<(fwblocks);i++) { for (i=0;!last;i++) { if (!fread(dev->rd_buf, fwblk, 1, fwfile)) { printf("%s: error reading file: %s\n", argv[0], fwfname); return 1; } // printf("Block #%d:\n",i); if (feof(fwfile) || (i == (fwblocks-1) )) { last=1; printf("\nData transfer complete: %d bytes (%X blocks). Updating...\n", (i+1)*fwblk, i+1); } err = fwblk_send(dev, i*fwblk, fwblk, last); if (err) { printf("FW UPDATE ERROR!\n"); last=1; } } inquiry(dev); printf("FW update complete! New INQUIRY data:\n"); printf("Vendor : '%s'\n",dev->ven); printf("Model : '%s'\n",dev->dev); printf("F/W : '%s'\n",dev->fw); } printf("\n"); delete dev; fclose(fwfile); return 0; } qpxtool-0.7.1_002/console/pxfw/pxfw.h0000644000175000001440000000345711166634627016666 0ustar shultzusers/* * This file is a part of QPxTool project * Copyright (C) 2006-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PXFW_H #define __PXFW_H // const int WR_PLEXTOR = 0x0001; /* const uint32_t PX_OLD = 0x0001; const uint32_t PX_PREMIUM = 0x0002; const uint32_t PX_708 = 0x0004; const uint32_t PX_708A2 = 0x0008; const uint32_t PX_712 = 0x0010; const uint32_t PX_714 = 0x0020; const uint32_t PX_716 = 0x0040; const uint32_t PX_716AL = 0x0080; const uint32_t PX_755 = 0x0100; const uint32_t PX_760 = 0x0200; const uint32_t PX_PREMIUM2 = 0x0400; */ const uint32_t FL_HELP = 0x00000001; const uint32_t FL_DEV = 0x00000002; const uint32_t FL_FWIF = 0x00000004; const uint32_t FL_FWOF = 0x00000008; const uint32_t FL_UPDATE = 0x00000010; const uint32_t FL_BACKUP = 0x00000020; const uint32_t FL_DEBUG = 0x00000040; const uint32_t FL_TEST = 0x00000080; const uint32_t FL_RESET = 0x00000100; const uint32_t FL_FORCE = 0x00000200; const uint32_t FL_SCAN = 0x00000400; const uint32_t FL_EEPROM = 0x00000800; const uint32_t FL_EEIF = 0x00001000; const uint32_t FL_EEOF = 0x00002000; #endif // __PXFW_H qpxtool-0.7.1_002/console/pxfw/version.h0000644000175000001440000000071111176423760017350 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2007 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #define VERSION "0.5" qpxtool-0.7.1_002/console/Makefile0000644000175000001440000000123711255671267016177 0ustar shultzusersall: readdvd cdvdcontrol pxfw f1tattoo qscan qscand clean install uninstall: $(MAKE) -C readdvd DIR=readdvd $@ $(MAKE) -C cdvdcontrol DIR=cdvdcontrol $@ $(MAKE) -C pxfw DIR=pxfw $@ $(MAKE) -C f1tattoo DIR=f1tattoo $@ $(MAKE) -C qscan DIR=qscan $@ $(MAKE) -C qscand DIR=qscand $@ readdvd: $(MAKE) -C readdvd DIR=readdvd cdvdcontrol: $(MAKE) -C cdvdcontrol DIR=cdvdcontrol pxfw: $(MAKE) -C pxfw DIR=pxfw f1tattoo: $(MAKE) -C f1tattoo DIR=f1tattoo qscan: $(MAKE) -C qscan DIR=qscan qscand: $(MAKE) -C qscand DIR=qscand .PHONY: all clean install uninstall readdvd cdvdcontrol pxfw f1tattoo qscan qscand qpxtool-0.7.1_002/console/readdvd/0000755000175000001440000000000011352127612016131 5ustar shultzusersqpxtool-0.7.1_002/console/readdvd/kbhit.h0000644000175000001440000000055511204770727017417 0ustar shultzusers// KBHIT.H #ifndef KBHIT_H #define KBHIT_H #if defined (__unix) || defined (__unix__) #include #endif class keyboard { public: keyboard(); ~keyboard(); int kb_hit(); int kb_getch(); private: #if defined (__unix) || defined (__unix__) struct termios initial_settings, new_settings; #endif int peek_character; }; #endif qpxtool-0.7.1_002/console/readdvd/sectmap.h0000644000175000001440000000200511204723747017742 0ustar shultzusers/* * * sector map class header * Copyright (C) 2006-2007,2009, Gennady "ShultZ" Kozlov * */ #ifndef __SECTMAP_H #define __SECTMAP_H #define _FILE_OFFSET_BITS 64 #include #include enum mape { BM_WAIT = 0, BM_READ = 1, BM_DONE = 2, BM_FAIL = 3, BM_INV = 15 }; #define map_block_sz 16384 typedef mape map_block[map_block_sz]; extern long fsize(FILE* f); class smap { public: smap(char* fn, uint32_t sects); ~smap(); mape get(uint32_t sector); int32_t is_done(); int32_t get_wait(); int32_t get_read(); int32_t get_done(); int32_t get_fail(); int32_t get_tot(); uint32_t get_next(uint32_t *lba, mape state, uint32_t *count); void set(uint32_t sector, mape state, uint32_t count=0); void set_one(uint32_t sector, mape state); void fill(mape state); void set_file(char* fn); int32_t load(); int32_t save(); void lock(); void unlock(); private: uint32_t sectors; uint32_t blocks; map_block* arr; Mutex* mutex; char* fname; }; #endif qpxtool-0.7.1_002/console/readdvd/reader_disc.cpp0000644000175000001440000003575311326001306021106 0ustar shultzusers/* * * disc reader algo for DeadDiscReader * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * * initAllCSSKeys function from libdvdread * */ #define _FILE_OFFSET_BITS 64 #include #include #if (DVDCSS_KEY_CACHE > 0) #include #include #endif #include #include #include #include #include #include #include #include "reader_disc.h" #define sector_sz 2048 #if (DVDCSS_KEY_CACHE > 0) static int initCSSCache(drive_info *dev) { char psz_buffer[PATH_MAX]; char *psz_home; char *psz_cache; psz_home = getenv( "HOME" ); if( psz_home == NULL ) psz_home = getenv( "USERPROFILE" ); /* Cache our keys in ${HOME}/.dvdcss/ */ if( psz_home ) { snprintf( psz_buffer, PATH_MAX, "%s/.dvdcss", psz_home ); psz_buffer[PATH_MAX-1] = '\0'; psz_cache = psz_buffer; } if( psz_cache != NULL ) { /* Check that we can add the ID directory and the block filename */ if( strlen( psz_cache ) + 1 + 32 + 1 + (DVD_KEY_SIZE * 2) + 10 + 1 > PATH_MAX ) { printf( "CSS: cache directory name is too long\n" ); psz_cache = NULL; } } if( !psz_cache ) goto nocache; /* If the cache is enabled, write the cache directory tag */ if( psz_cache ) { char *psz_tag = "Signature: 8a477f597d28d172789f06886806bc55\r\n" "# This file is a cache directory tag created by libdvdcss.\r\n" "# For information about cache directory tags, see:\r\n" "# http://www.brynosaurus.com/cachedir/\r\n"; char psz_tagfile[PATH_MAX + 1 + 12 + 1]; int i_fd; sprintf( psz_tagfile, "%s/CACHEDIR.TAG", psz_cache ); i_fd = open( psz_tagfile, O_RDWR|O_CREAT, 0644 ); if( i_fd >= 0 ) { write( i_fd, psz_tag, strlen(psz_tag) ); close( i_fd ); } } /* If the cache is enabled, extract a unique disc ID */ if( psz_cache ) { unsigned char p_sector[DVDCSS_BLOCK_SIZE]; // char psz_debug[PATH_MAX + 30]; char psz_key[1 + DVD_KEY_SIZE * 2 + 1]; char *psz_title; unsigned char *psz_serial; int i; /* We read sector 0. If it starts with 0x000001ba (BE), we are * reading a VOB file, and we should not cache anything. */ if (!read( dev, p_sector, 0, 1 )) { goto nocache; } if( p_sector[0] == 0x00 && p_sector[1] == 0x00 && p_sector[2] == 0x01 && p_sector[3] == 0xba ) { goto nocache; } /* The data we are looking for is at sector 16 (32768 bytes): * - offset 40: disc title (32 uppercase chars) * - offset 813: manufacturing date + serial no (16 digits) */ if (!read( dev, p_sector, 16, 1 )) { goto nocache; } /* Get the disc title */ psz_title = (char *)p_sector + 40; psz_title[32] = '\0'; for( i = 0 ; i < 32 ; i++ ) { if( psz_title[i] <= ' ' ) { psz_title[i] = '\0'; break; } else if( psz_title[i] == '/' || psz_title[i] == '\\' ) { psz_title[i] = '-'; } } /* Get the date + serial */ psz_serial = p_sector + 813; psz_serial[16] = '\0'; /* Check that all characters are digits, otherwise convert. */ for( i = 0 ; i < 16 ; i++ ) { if( psz_serial[i] < '0' || psz_serial[i] > '9' ) { char psz_tmp[16 + 1]; sprintf( psz_tmp, "%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x", psz_serial[0], psz_serial[1], psz_serial[2], psz_serial[3], psz_serial[4], psz_serial[5], psz_serial[6], psz_serial[7] ); memcpy( psz_serial, psz_tmp, 16 ); break; } } /* Get disk key, since some discs have got same title, manufacturing * date and serial number, but different keys */ if( dev->media.dvdcss.protection == 0x01 ) { psz_key[0] = '-'; for( i = 0; i < DVD_KEY_SIZE; i++ ) { sprintf( &psz_key[1+i*2], "%.2x", dev->media.dvdcss.DK[i] ); } psz_key[1 + DVD_KEY_SIZE * 2] = '\0'; } else { psz_key[0] = 0; } /* We have a disc name or ID, we can create the cache dir */ i = sprintf( dev->media.dvdcss.psz_cachefile, "%s", psz_cache ); if (mkdir( dev->media.dvdcss.psz_cachefile, 0755 ) < 0 && errno != EEXIST ) { printf( "CSS: failed creating cache directory\n" ); dev->media.dvdcss.psz_cachefile[0] = '\0'; goto nocache; } i += sprintf( dev->media.dvdcss.psz_cachefile + i, "/%s-%s%s", psz_title, psz_serial, psz_key ); if ( mkdir( dev->media.dvdcss.psz_cachefile, 0755 ) < 0 && errno != EEXIST ) { printf( "CSS: failed creating cache subdirectory\n" ); dev->media.dvdcss.psz_cachefile[0] = '\0'; goto nocache; } i += sprintf( dev->media.dvdcss.psz_cachefile + i, "/"); /* Pointer to the filename we will use. */ dev->media.dvdcss.psz_block = dev->media.dvdcss.psz_cachefile + i; printf( "CSS: using CSS key cache dir: %s\n", dev->media.dvdcss.psz_cachefile ); } nocache: return 0; } #endif /* Loop over all titles and call dvdcss_title to crack the keys. */ static int initAllCSSKeys( drive_info *dev ) { struct timeval all_s, all_e; struct timeval t_s, t_e; char filename[ MAX_UDF_FILE_NAME_LEN ]; unsigned int start, len; int title; // int stitle; // bool st0; udf_t udf; /* char *nokeys_str = getenv("DVDREAD_NOKEYS"); if(nokeys_str != NULL) return 0; */ udf.dev = dev; udf.cache = NULL; if (!dev->silent) { printf( "libdvdread: Attempting to retrieve all CSS keys\n" ); } gettimeofday(&all_s, NULL); for( title = 0; title < 100; title++ ) { // stitle=0; st0=0; gettimeofday( &t_s, NULL ); if( title == 0 ) { sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); } else { sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 ); } start = UDFFindFile( &udf, filename, &len ); if( start != 0 && len != 0 ) { /* Perform CSS key cracking for this title. */ // st0=1; if (!dev->silent) { printf( "libdvdread: Get key for %s at 0x%08x, len %10d\n", filename, start, len ); } if( css_title( dev, (int)start ) < 0 ) { if (!dev->silent) { printf( "libdvdread: Error cracking CSS key for %s (0x%08x)\n", filename, start); } } gettimeofday( &t_e, NULL ); if (!dev->silent) { printf( "libdvdread: Elapsed time %ld\n", (long int) t_e.tv_sec - t_s.tv_sec ); } } if( title == 0 ) continue; // for (stitle = 1; stitle<9; stitle++) { // printf("stitle=%d\n", stitle); gettimeofday( &t_s, NULL ); //sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, stitle ); sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 ); start = UDFFindFile( &udf, filename, &len ); if( start == 0 || len == 0 ) break; /* Perform CSS key cracking for this title. */ if (!dev->silent) { printf( "libdvdread: Get key for %s at 0x%08x, len %10d\n", filename, start, len ); } if( css_title( dev, (int)start ) < 0 ) { if (!dev->silent) { printf( "libdvdread: Error cracking CSS key for %s (0x%08x)!!\n", filename, start); } } gettimeofday( &t_e, NULL ); if (!dev->silent) { printf( "libdvdread: Elapsed time %ld\n", (long int) t_e.tv_sec - t_s.tv_sec ); } // } // if( (!st0) && (stitle !=0) && (start == 0 || len == 0) ) break; } title--; if (!dev->silent) { printf( "libdvdread: Found %d VTS's\n", title ); } gettimeofday(&all_e, NULL); if (!dev->silent) { printf( "libdvdread: Elapsed time %ld\n", (long int) all_e.tv_sec - all_s.tv_sec ); } FreeUDFCache( &udf, udf.cache); if (!dev->silent) { printf("Title keys:\n"); dvd_title_t *p_title = dev->media.dvdcss.p_titles; while( p_title != NULL ) // && p_title->p_next != NULL { printf("STA: %8X, KEY: %02X:%02X:%02X:%02X:%02X\n",p_title->i_startlb, p_title->p_key[0], p_title->p_key[1], p_title->p_key[2], p_title->p_key[3], p_title->p_key[4]); p_title = p_title->p_next; } } return 0; } void *read_disc(void* arg) { rdparm_t* parm = (rdparm_t*) arg; drive_info* dev = parm->dev; smap* map = parm->map; imgwriter* iso = parm->iso; parm->stop=0; parm->running=1; parm->cnt_ok = 0; printf("%s: Starting reader thread #%d...\n", dev->device, parm->tidx); dvd_title_t *p_title = NULL; uint32_t title_next = 0xFFFFFFFF; struct timeval t_s, t_e; int32_t sects1X=75; uint32_t lba = 0; uint32_t scnt=1; int ctry=0; bool descramble=0; dev->silent=0; if (dev->media.type & DISC_CD) { printf("%s: media is CD\n",dev->device); scnt=15; sects1X=75; } else if (dev->media.type & DISC_DVD) { printf("%s: media is DVD\n",dev->device); scnt=16; sects1X=693; get_rpc_state(dev); read_disc_regions(dev); if (!dev->media.dvdcss.protection) { printf("DVD is NOT copy-protected\n"); } else { switch (dev->media.dvdcss.protection) { case 0x01: printf("DVD is CSS-protected\n"); break; case 0x02: printf("DVD is CPRM-protected\n"); break; default: printf("Unknown DVD protection shceme!\n"); break; } printf("Disc regions : "); if (dev->media.dvdcss.regmask != 0xFF) { for (int i=0; i<8; i++) if (!((dev->media.dvdcss.regmask >> i) & 1)) {printf("%d",i+1); /*dev->rpc.region = i+1;*/} printf("\n"); } else { printf("Invalid region mask!\n"); } } switch (dev->media.dvdcss.protection) { case 0: // unprotected DVD dev->media.dvdcss.method = DVDCSS_METHOD_NONE; break; case 1: // CSS/CPPM protected DVD // just to auth to be able read data // scnt=1; dev->media.dvdcss.method = DVDCSS_METHOD_KEY; //dev->media.dvdcss.method = DVDCSS_METHOD_DISC; if (css_disckey(dev)) { printf("DVD auth failure!\n"); goto exit_reader; } initAllCSSKeys( dev ); break; case 2: // CPRM - protected DVD // just to auth to be able read data dev->media.dvdcss.method = DVDCSS_METHOD_KEY; if (css_disckey(dev)) { printf("DVD auth failure!\n"); goto exit_reader; } break; default: // printf("Unknown DVD protection scheme: %02X\n",dev->media.dvdcss.protection); dev->media.dvdcss.method = DVDCSS_METHOD_NONE; break; } } else { printf("Unsupported media!\n"); goto exit_reader; } if (parm->pass >= PASS_RECOVER) scnt=1; map->lock(); if (parm->pass < PASS_RECOVER) { map->get_next(&lba, BM_WAIT, &scnt); } else { bool rce,wce; printf("Recover pass - trying to disable read cache...\n"); get_cache(dev,&rce,&wce); if (!rce) { printf("Read cache already disabled:)\n"); } else { if (set_cache(dev,0,wce)) { printf("It seems drive does not support disabling read cache!\n"); } else { printf("Read cache disabled successfully\n"); } } map->get_next(&lba, BM_FAIL, &scnt); } map->set(lba, BM_READ, scnt); map->unlock(); if (dev->media.dvdcss.protection == 0x01) { for (int i=0; imedia.dvdcss.TK[i]=0; p_title = dev->media.dvdcss.p_titles; descramble = 0; if (!p_title) { title_next = 0xFFFFFFFF; } else { title_next = p_title->i_startlb; } printf("\nSetting title key: %02X:%02X:%02X:%02X:%02X for %x-%x, CSS=%d\n", dev->media.dvdcss.TK[0], dev->media.dvdcss.TK[1], dev->media.dvdcss.TK[2], dev->media.dvdcss.TK[3], dev->media.dvdcss.TK[4], 0, title_next, descramble); } gettimeofday(&t_e,NULL); seek(dev,0); while (lba < dev->media.capacity) { if (lba == 0xFFFFFFFF) goto exit_reader; t_s.tv_sec = t_e.tv_sec; t_s.tv_usec = t_e.tv_usec; if (dev->media.type & DISC_CD) { read(dev, dev->rd_buf, lba, scnt); } else if (dev->media.type & DISC_DVD) { if (dev->media.dvdcss.protection == 0x01) { if (lba >= title_next && p_title) { // scnt = 16; while (lba >= title_next) { if (p_title->p_next) { title_next = p_title->p_next->i_startlb; } else { title_next = 0xFFFFFFFF; } if (lba >= title_next) p_title = p_title->p_next; } memcpy( dev->media.dvdcss.TK, p_title->p_key, sizeof(dvd_key_t) ); if( ! memcmp( dev->media.dvdcss.TK, "\0\0\0\0\0", 5 ) ) descramble = 0; else descramble=1; printf("\nSetting title key: %02X:%02X:%02X:%02X:%02X for %x-%x, CSS=%d\n", dev->media.dvdcss.TK[0], dev->media.dvdcss.TK[1], dev->media.dvdcss.TK[2], dev->media.dvdcss.TK[3], dev->media.dvdcss.TK[4], lba, title_next, descramble); p_title = p_title->p_next; } read_dvd(dev, dev->rd_buf, lba, scnt, descramble ? DVDCSS_READ_DECRYPT : 0); } else { read(dev, dev->rd_buf, lba, scnt); } } gettimeofday(&t_e,NULL); printf("%s: %5.2f X, lba %7d / %7d ( %06x / %06x ) scnt=%d\r", dev->device, ((float)scnt/(float)sects1X)/((t_e.tv_sec - t_s.tv_sec) + (t_e.tv_usec - t_s.tv_usec) / 1000000.0), lba, dev->media.capacity, lba, dev->media.capacity, scnt); if ((dev->err & 0x0FFF00) == 0x23A00) { printf("%s: media removed!\n", dev->device); map->lock(); map->set(lba, BM_WAIT, scnt); map->unlock(); goto exit_reader; } switch (parm->pass) { case PASS_FIRST: case PASS_CONT: if (!dev->err) { iso->write(lba, scnt, sector_sz, (void*)dev->rd_buf); ctry=0; } else { ctry++; } break; case PASS_RECOVER0: case PASS_RECOVER1: default: if (!dev->err) { iso->write(lba, scnt, sector_sz, (void*)dev->rd_buf); ctry=0; } else { ctry++; } break; } map->lock(); // set current block state if (!ctry) { map->set(lba, BM_DONE, scnt); parm->cnt_ok+=scnt; lba+=scnt; } else { if (parm->pass < PASS_RECOVER) map->set(lba, BM_FAIL, scnt); if (ctry == parm->tries) ctry=0; } map->unlock(); if (parm->stop) goto exit_reader; map->lock(); // get next block address if (parm->pass < PASS_RECOVER1) { if ((dev->media.type) & DISC_DVD && (dev->media.dvdcss.protection == 0x01)) { if ((lba!=title_next) && (lba+scnt > title_next) && p_title) { scnt = title_next - lba; } else { scnt = 16; } } map->get_next(&lba, BM_WAIT, &scnt); map->set(lba, BM_READ, scnt); } else { lba+=scnt; map->get_next(&lba, BM_FAIL, &scnt); map->set(lba, BM_READ, scnt); } map->unlock(); } exit_reader: printf("%s: exit\n", dev->device); parm->running=0; parm->result=1; thread_exit(parm->result); } qpxtool-0.7.1_002/console/readdvd/Makefile0000644000175000001440000000106111322563255017573 0ustar shultzusersSRCS = $(patsubst %,%.cpp, deadreader kbhit sectmap reader reader_disc imgwriter dvd_udf) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) BIN = readdvd$(BINSUFF) CXXFLAGS += -I. -I../../lib/include CFLAGS += -I. -I../../lib/include LDLIBS += -L../../lib/lib -lqpxtransport $(LIBS_THREAD) $(BIN): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) all:$(BIN) clean: rm -f $(BIN) $(OBJS) *~ install: mkdir -p $(DESTDIR)$(BINDIR) install -m 755 $(BIN) $(DESTDIR)$(BINDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/$(BIN) .PHONY: all clean install uninstall qpxtool-0.7.1_002/console/readdvd/kbhit.cpp0000644000175000001440000000253511263710034017740 0ustar shultzusers// KBHIT.CPP #include "kbhit.h" #if defined (__unix) || defined (__unix__) #include // read() #elif defined (_WIN32) #include #endif keyboard::keyboard() { #if defined (__unix) || defined (__unix__) tcgetattr(0,&initial_settings); new_settings = initial_settings; new_settings.c_lflag &= ~ICANON; new_settings.c_lflag &= ~ECHO; new_settings.c_lflag &= ~ISIG; new_settings.c_cc[VMIN] = 1; new_settings.c_cc[VTIME] = 0; tcsetattr(0, TCSANOW, &new_settings); #endif peek_character=-1; } keyboard::~keyboard() { #if defined (__unix) || defined (__unix__) tcsetattr(0, TCSANOW, &initial_settings); #endif } int keyboard::kb_hit() { #if defined (__unix) || defined (__unix__) unsigned char ch; int nread; if (peek_character != -1) return 1; new_settings.c_cc[VMIN]=0; tcsetattr(0, TCSANOW, &new_settings); nread = read(0,&ch,1); new_settings.c_cc[VMIN]=1; tcsetattr(0, TCSANOW, &new_settings); if (nread == 1) { peek_character = ch; return 1; } return 0; #elif defined (_WIN32) return kbhit(); #endif } int keyboard::kb_getch() { #if defined (__unix) || defined (__unix__) char ch; if (peek_character != -1) { ch = peek_character; peek_character = -1; } else { if (!read(0,&ch,1)) return 0; } return ch; #elif defined (_WIN32) if (kbhit()) return getch(); else return 0; #endif } qpxtool-0.7.1_002/console/readdvd/imgwriter.h0000644000175000001440000000105411204725335020315 0ustar shultzusers/* * * image writer class header * Copyright (C) 2007, Gennady "ShultZ" Kozlov * */ #ifndef __IMGWRITER_H #define __IMGWRITER_H #define _FILE_OFFSET_BITS 64 #include //#include //#include //#include #include class smap; class imgwriter { public: imgwriter(char* fn, smap* map); ~imgwriter(); int write(int lba, int scnt, int ssz, void* buff); // void set_file(char* fn); // int open(); // int close(); private: char* fname; FILE* iso; Mutex* mutex; }; #endif qpxtool-0.7.1_002/console/readdvd/reader.cpp0000644000175000001440000000353611204750556020113 0ustar shultzusers/* * * reader class for DeadDiscReader * Copyright (C) 2007,2009, Gennady "ShultZ" Kozlov * */ #define _FILE_OFFSET_BITS 64 #include #include //#include #include #include //#include #include #include #include "reader.h" #define sector_sz 2048 cdvdreader::cdvdreader( int itidx, int iparent, drive_info* idev, smap* imap, imgwriter* iiso, int ipass, int itries) { parm.running=0; parm.stop=0; parm.tidx=itidx; parm.parent=iparent; parm.dev=idev; parm.map=imap; parm.iso=iiso; parm.pass=ipass; parm.tries=itries; // printf("%02d: device: %s\n", parm.tidx, parm.dev->device); // printf("%02d: %s %s %s\n", parm.tidx, parm.dev->ven, parm.dev->dev, parm.dev->fw); } cdvdreader::~cdvdreader() { } void cdvdreader::set_dev(drive_info* idev) { parm.dev=idev; } void cdvdreader::set_map(smap* imap) { parm.map=imap; } void cdvdreader::set_iso(imgwriter* iiso) { parm.iso=iiso; } void cdvdreader::set_pass(int ipass) { parm.pass=ipass; } void cdvdreader::set_retry(int itries) { parm.tries=itries; } int cdvdreader::start() { // printf("Creating thread for %s\n", parm.dev->device); parm.running=1; return thread_create(&tid, NULL,read_disc,(void*)(&parm)); // printf("pthread for %s created successfully:)\n", parm.dev->device); } void cdvdreader::stop() { parm.stop=1; } bool cdvdreader::stoped() { return parm.stop; } void cdvdreader::wait() { // int x; while (parm.running) msleep(1); // x= thread_join(tid, NULL); // printf("thread %d exit state: %d\n", parm.tidx, x); } int cdvdreader::running() { return parm.running; } int cdvdreader::print_stat() { printf("%s: %7d (%06x) sectors read\n", parm.dev->device, parm.cnt_ok, parm.cnt_ok); return parm.cnt_ok; } qpxtool-0.7.1_002/console/readdvd/deadreader.cpp0000644000175000001440000001762411334460741020732 0ustar shultzusers/* * * DeadDiscReader * Copyright (C) 2006-2009, Gennady "ShultZ" Kozlov * it uses QPxTool SCSI transport library * */ #define MAX_THREADS 8 #define _FILE_OFFSET_BITS 64 #include #include #include #include //#include #include #include #include #include #include "version.h" int init_drives(drive_info** dev, char** dev_n) { printf("Initialising drives...\n"); int i=0; int n=0; while ((dev_n[i]) && (isilent++; detect_capabilities(dev[n]); printf("%2d: [%s] %s %s %s\n", n, dev[n]->device, dev[n]->ven, dev[n]->dev, dev[n]->fw); n++; } else { printf("Can't open device '%s'!\n", dev_n[i]); } i++; } printf("%d devices found\n", n); return n; } int sort_drives(drive_info** dev) { bool swap=1; int i; int devcnt=0; while (swap) { swap=0; for (i=0; i<(MAX_THREADS-1); i++) if((!dev[i]) && (dev[i+1])) { dev[i]=dev[i+1]; dev[i+1]=NULL; swap=1; } } for (i=0; iset_pass(pass); reader[i]->set_retry(retry); // printf("Starting thread %d\n", i); reader[i]->start(); } while (reader[0]->running()) { msleep(1); for (;kb.kb_hit();) { c=kb.kb_getch(); switch (c) { case 'w': case 'W': map->lock(); map->save(); map->unlock(); break; case 'q': case 'Q': for (i=0; istop(); break; default: break; } } } printf("\nWaiting for reader threads...\n"); for (i=0; iwait(); return 0; } void usage(char* av0) { printf("usage: %s [device_list] [options]\n", av0); printf("device_list - you may specify multiple reader devices:\n"); printf("\t-d /dev/dvd0 [-d /dev/dvd1 [-d /dev/dvd2[..]]]\n"); printf("options:\n"); printf("\t-o \tsave image to this file\n"); printf("\t-s \tset read speed (-1 = maximum)\n"); printf("\t-v, -vv\t\tbe verbose\n"); printf("\t-l,-s\t\tscan IDE/SCSI bus and exit\n"); printf("\t-h\t\tshow this help and exit\n"); printf("\ncontrol keys:\n"); printf("\t q - stop reading and exit\n"); printf("\t w - save current sector map and continue\n\n"); } #if defined (_WIN32) BOOL WINAPI sigint_handler (DWORD) { printf("\nSIGINT\n"); return true; } #endif int main(int argc, char** argv) { int spd=-1; int devcnt=0; drive_info* dev[MAX_THREADS]; char* dev_n[MAX_THREADS]; cdvdreader* reader[MAX_THREADS]; smap* map=NULL; imgwriter* iso=NULL; // FILE *f_img; int32_t capacity; int done; char* n_img=0; char n_map[1024]; // unsigned int fc, dc, ic; // bool rfail=0; // bool rcont=0; int i; int verbose=0; printf("** DVD reader v%s (c) 2006-2009 Gennady \"ShultZ\" Kozlov **\n", VERSION); printf("** multiple-device DVD reader with CSS support, optimized for corrupted media\n"); if (argc<2) { // usage(argv[0]); printf("No option specified!\nUse -h for details\n"); return 1; } for (i=1; i(i+1)) { i++; spd = atol(argv[i]); } else { printf("Option %s needs a parameter!\n", argv[i]); } } else if(!strcmp(argv[i],"-o")) { if(argc>(i+1)) { i++; n_img = argv[i]; } else { printf("Option %s needs a parameter!\n", argv[i]); } } else if(!strcmp(argv[i],"-d")) { if(argc>(i+1)) { i++; if (devcnt < MAX_THREADS) { dev_n[devcnt]=argv[i]; devcnt++; } else { printf("Maximum devices limit reached: %d\n", MAX_THREADS); } } else { printf("Option %s needs a parameter!\n", argv[i]); } } else { printf("Option not recognized: %s\n", argv[i]); } } if (!devcnt) { printf(" No devices selected!\n"); exit (1); } if (!n_img) { printf(" No image file selected!\n"); exit (2); } strcpy(n_map, n_img); strcat(n_map, ".smap"); printf(" image file : '%s'\n", n_img); printf(" bitmap file : '%s'\n", n_map); printf("\n"); devcnt = init_drives(dev, dev_n); printf(" Checking media...\n"); for (i=0; iparms.read_speed_kb = spd * 1350; set_rw_speeds(dev[i]); if(!dev[i]->media.type) { printf("%s: NO media!\n", dev[i]->device); } else { int mi=0; while ( MEDIA[mi].id != 0xFFFFFFFF && (dev[i]->media.type & (~DISC_CDRWSUBT)) != MEDIA [mi].id) mi++; printf("%s: media type: %s\n", dev[i]->device, MEDIA[mi].name); } if (!(dev[i]->media.type & DISC_DVD)) { printf("%s: no DVD found! removing device from list...\n", dev[i]->device); dev[i]=NULL; //exit (3); } else { read_capacities(dev[i]); } } devcnt = sort_drives(dev); if (!devcnt) { printf(" No discs detected!\n"); exit (3); } capacity = dev[0]->media.capacity; if (devcnt>1) { printf("Using %s as primary device\nChecking capacities (expecting %d sectors)...", dev[0]->device, capacity); for (i=1; idevice, dev[i]->media.capacity); if (dev[i]->media.capacity == dev[0]->media.capacity) { printf("OK\n"); } else { printf("failed! removing device from list...\n"); dev[i]=NULL; } } } devcnt = sort_drives(dev); printf("using %d devices\n", devcnt); map = new smap(n_map, capacity); iso = new imgwriter(n_img, map); #if defined (_WIN32) SetConsoleCtrlHandler(&sigint_handler, 1); #endif if (verbose) printf("Initializing threads...\n"); for (i=0; ilock(); done = map->get_done(); map->unlock(); if (!done) { printf("Starting first reading pass...\n"); read_multi(reader, devcnt, map, PASS_FIRST); } else { if (done < capacity) { printf("Continue reading incomplete image...\n"); read_multi(reader, devcnt, map, PASS_CONT); } } map->lock(); done = map->get_fail(); map->unlock(); if (!done || reader[0]->stoped()) goto dreader_done; printf("There are some corrupted sectors!\nStarting first RECOVERY pass...\n"); read_multi(reader, devcnt, map, PASS_RECOVER0, 1); map->lock(); done = map->get_fail(); map->unlock(); if (!done || reader[0]->stoped()) goto dreader_done; printf("There are hard corrupted sectors!\nStarting long RECOVERY pass...\n"); read_multi(reader, devcnt, map, PASS_RECOVER1, 4); dreader_done: if (verbose) printf("\nDestroing readers...\n"); for (i=0; iprint_stat(); delete reader[i]; } printf("Image summary:\n"); printf(" Sectors tot : %d\n", map->get_tot()); printf(" Sectors wait : %d\n", map->get_wait()); printf(" Sectors read : %d\n", map->get_read()); printf(" Sectors done : %d\n", map->get_done()); printf(" Sectors corrupted: %d\n", map->get_fail()); // printf("Closing image file...\n"); // fclose(f_img); // map->save(); // printf("Destroing drive_info*...\n"); for (i=0; i * it uses QPxTool SCSI transport library * */ #define _FILE_OFFSET_BITS 64 #include #include #include #include "sectmap.h" long fsize(FILE* f){ struct stat st; fstat(fileno(f), &st); return st.st_size; } smap::smap(char* fn, unsigned int sects) { sectors=sects; fname = fn; blocks=(sectors/map_block_sz) + !!(sectors%map_block_sz); arr=(map_block*)malloc(sizeof(map_block)*blocks); fill(BM_WAIT); mutex = new Mutex(); printf("* map: created for %d sectors\n", sectors); } smap::~smap() { save(); delete mutex; delete arr; } mape smap::get(unsigned int sector) { if (sector > sectors) return BM_INV; unsigned int row=sector/map_block_sz; unsigned int col=sector%map_block_sz; return arr[row][col]; } int smap::is_done() { return (sectors-get_done()); } int smap::get_wait() { unsigned int cnt=0; for (unsigned int i=0; i sectors) scnt = sectors - lba; // printf("smap::get_next(%x,%d,%d)\n",lba ? *lba : -1,state, count ? *count : -1); if (lba) offs=*lba; if (icount<2) { while ((get(offs) != state) && (offs= sectors) { if (icount > 2) { // printf("Can't find %d sectors block", icount); (*count)--; return get_next(lba, state, count); } else { offs = 0xFFFFFFFF; } } if (lba) *lba=offs; if (count) *count = icount; return offs; } void smap::set(unsigned int sector, mape state, unsigned int count) { // if (sector>sectors) return 1; // if (sector+count>sectors) return 2; if(count) { for (unsigned int i=0; i sectors) return; arr[row][col]=state; } void smap::fill(mape state){ for (unsigned int i=0; ilock(); } void smap::unlock() { mutex->unlock(); } qpxtool-0.7.1_002/console/readdvd/dvd_udf.h0000644000175000001440000000501111263703732017716 0ustar shultzusers/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ #ifndef DVD_UDF_H_INCLUDED #define DVD_UDF_H_INCLUDED /* * This code is based on dvdudf by: * Christian Wolff . * * Modifications by: * Billy Biggs . * Björn Englund . * * dvdudf: parse and read the UDF volume information of a DVD Video * Copyright (C) 1999 Christian Wolff for convergence integrated media * GmbH The author can be reached at scarabaeus@convergence.de, the * project's page is at http://linuxtv.org/dvd/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. Or, point your browser to * http://www.gnu.org/copyleft/gpl.html */ #if defined(HAVE_INTTYPES_H) #include #elif defined(HAVE_STDINT_H) #include #endif //#include "dvd_reader.h" //#ifdef __cplusplus //extern "C" { //#endif #define DVD_VIDEO_LB_LEN 2048 #define MAX_UDF_FILE_NAME_LEN 2048 /** * Looks for a file on the UDF disc/imagefile and returns the block number * where it begins, or 0 if it is not found. The filename should be an * absolute pathname on the UDF filesystem, starting with '/'. For example, * '/VIDEO_TS/VTS_01_1.IFO'. On success, filesize will be set to the size of * the file in bytes. * This implementation relies on that the file size is less than 2^32 * A DVD file can at most be 2^30 (-2048 ?). */ #include struct udf_t { drive_info *dev; void* cache; }; unsigned int UDFFindFile( udf_t *udf, char *filename, unsigned int *size ); void FreeUDFCache( udf_t *udf, void *cache); int UDFGetVolumeIdentifier( udf_t *udf, char *volid, unsigned int volid_size); int UDFGetVolumeSetIdentifier( udf_t *udf, unsigned char *volsetid, unsigned int volsetid_size); //#ifdef __cplusplus //}; //#endif #endif /* DVD_UDF_H_INCLUDED */ qpxtool-0.7.1_002/console/readdvd/reader_disc.h0000644000175000001440000000031711204747535020557 0ustar shultzusers/* * * disc reader functions for DeadDiscReader * Copyright (C) 2007, Gennady "ShultZ" Kozlov * */ #ifndef __READERDISC_H #define __READERDISC_H void *read_disc(void* arg); #endif qpxtool-0.7.1_002/console/readdvd/version.h0000644000175000001440000000071011242457763020000 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2006-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #define VERSION "1.0" qpxtool-0.7.1_002/console/readdvd/reader.h0000644000175000001440000000215111204747462017552 0ustar shultzusers/* * * reader class header * Copyright (C) 2007,2009, Gennady "ShultZ" Kozlov * */ #ifndef __READER_H #define __READER_H #define _FILE_OFFSET_BITS 64 //#include //#include //#include //#include #include const char PASS_FIRST = 0; const char PASS_CONT = 1; const char PASS_RECOVER = 2; const char PASS_RECOVER0= PASS_RECOVER; const char PASS_RECOVER1= 3; class drive_info; class map; class imgwriter; typedef struct { int tidx, parent; drive_info* dev; smap* map; imgwriter* iso; int running; int stop; int result; int cnt_ok; int tries; char pass; } rdparm_t; class cdvdreader { public: cdvdreader(int itidx, int iparent, drive_info* idev, smap* imap, imgwriter* iiso, int ipass=0, int itries=4); ~cdvdreader(); void set_dev(drive_info* idev); void set_map(smap* imap); void set_iso(imgwriter* iiso); void set_pass(int ipass); void set_retry(int itries); int start(); void stop(); bool stoped(); void wait(); int running(); int print_stat(); private: thread_t tid; rdparm_t parm; }; #endif qpxtool-0.7.1_002/console/readdvd/dvd_udf.cpp0000644000175000001440000007553011140601061020250 0ustar shultzusers/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * This code is based on dvdudf by: * Christian Wolff . * * Modifications by: * Billy Biggs . * Björn Englund . * * dvdudf: parse and read the UDF volume information of a DVD Video * Copyright (C) 1999 Christian Wolff for convergence integrated media * GmbH The author can be reached at scarabaeus@convergence.de, the * project's page is at http://linuxtv.org/dvd/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. Or, point your browser to * http://www.gnu.org/copyleft/gpl.html */ //#include "config.h" #include #include #include #include #include #include #include #if defined(HAVE_INTTYPES_H) #include #elif defined(HAVE_STDINT_H) #include #endif //#include "dvd_reader.h" #include "dvd_udf.h" //#include "dvdread_internal.h" #ifndef EMEDIUMTYPE #define EMEDIUMTYPE ENOENT #endif #ifndef HAVE_UINTPTR_T #warning "Assuming that (unsigned long) can hold (void *)" //typedef unsigned long uintptr_t; #endif #define DVD_ALIGN(ptr) (void *)((((uintptr_t)(ptr)) + (DVD_VIDEO_LB_LEN-1)) \ / DVD_VIDEO_LB_LEN * DVD_VIDEO_LB_LEN) typedef struct { void *start; void *aligned; } dvdalign_ptrs_t; typedef struct { dvdalign_ptrs_t *ptrs; uint32_t ptrs_in_use; uint32_t ptrs_max; } dvdalign_t; #if 0 extern void *GetAlignHandle(dvd_reader_t *device); extern void SetAlignHandle(dvd_reader_t *device, void *align); #endif /** * Allocates aligned memory (for use with reads from raw/O_DIRECT devices). * This memory must be freed with dvdalign_free() * The size of the memory that is allocate is num_lbs*2048 bytes. * The memory will be suitably aligned for use with * block reads from raw/O_DIRECT device. * @param num_lbs Number of logical blocks (2048 bytes) to allocate. * @return Returns pointer to allocated memory, or NULL on failure * This isn't supposed to be fast/efficient, if that is needed * this function should be rewritten to use posix_memalign or similar. * It's just needed for aligning memory for small block reads from * raw/O_DIRECT devices. * We assume that 2048 is enough alignment for all systems at the moment. * Not thread safe. Only use this from one thread. * Depends on sizeof(unsigned long) being at least as large as sizeof(void *) */ #if 0 static void *dvdalign_lbmalloc(dvd_reader_t *device, uint32_t num_lbs) { void *m; int n; dvdalign_t *a; m = malloc((num_lbs+1)*DVD_VIDEO_LB_LEN); if(m == NULL) { return m; } a = (dvdalign_t *)GetAlignHandle(device); if(a == NULL) { a = malloc(sizeof(dvdalign_t)); if(a == NULL) { return a; } a->ptrs = NULL; a->ptrs_in_use = 0; a->ptrs_max = 0; SetAlignHandle(device, (void *)a); } if(a->ptrs_in_use >= a->ptrs_max) { a->ptrs = realloc(a->ptrs, (a->ptrs_max+10)*sizeof(dvdalign_ptrs_t)); if(a->ptrs == NULL) { free(m); return NULL; } a->ptrs_max+=10; for(n = a->ptrs_in_use; n < a->ptrs_max; n++) { a->ptrs[n].start = NULL; a->ptrs[n].aligned = NULL; } n = a->ptrs_in_use; } else { for(n = 0; n < a->ptrs_max; n++) { if(a->ptrs[n].start == NULL) { break; } } } a->ptrs[n].start = m; a->ptrs[n].aligned = DVD_ALIGN(m); a->ptrs_in_use++; /* If this function starts to be used too much print a warning. Either there is a memory leak somewhere or we need to rewrite this to a more efficient version. */ if(a->ptrs_in_use > 50) { if(dvdread_verbose(device) >= 0) { fprintf(stderr, "libdvdread: dvdalign_lbmalloc(), more allocs than supposed: %u\n", a->ptrs_in_use); } } return a->ptrs[n].aligned; } /** * Frees memory allocated with dvdalign_lbmemory() * @param ptr Pointer to memory space to free * Not thread safe. */ static void dvdalign_lbfree(dvd_reader_t *device, void *ptr) { int n; dvdalign_t *a; a = (dvdalign_t *)GetAlignHandle(device); if(a && a->ptrs) { for(n = 0; n < a->ptrs_max; n++) { if(a->ptrs[n].aligned == ptr) { free(a->ptrs[n].start); a->ptrs[n].start = NULL; a->ptrs[n].aligned = NULL; a->ptrs_in_use--; if(a->ptrs_in_use == 0) { free(a->ptrs); a->ptrs = NULL; a->ptrs_max = 0; free(a); a = NULL; SetAlignHandle(device, (void *)a); } return; } } } if(dvdread_verbose(device) >= 0) { fprintf(stderr, "libdvdread: dvdalign_lbfree(), error trying to free mem: %08lx (%u)\n", (unsigned long)ptr, a ? a->ptrs_in_use : 0); } } /* Private but located in/shared with dvd_reader.c */ extern int UDFReadBlocksRaw( dvd_reader_t *device, uint32_t lb_number, size_t block_count, uint8_t *data, int encrypted ); /** @internal * Its required to either fail or deliver all the blocks asked for. * * @param data Pointer to a buffer where data is returned. This must be large * enough to hold lb_number*2048 bytes. * It must be aligned to system specific (2048) logical blocks size when * reading from raw/O_DIRECT device. */ static int DVDReadLBUDF( dvd_reader_t *device, uint32_t lb_number, size_t block_count, uint8_t *data, int encrypted ) { int ret; size_t count = block_count; while(count > 0) { ret = UDFReadBlocksRaw(device, lb_number, count, data, encrypted); if(ret <= 0) { /* One of the reads failed or nothing more to read, too bad. * We won't even bother returning the reads that went ok. */ return ret; } count -= (size_t)ret; lb_number += (uint32_t)ret; } return block_count; } #endif #ifndef NULL #define NULL ((void *)0) #endif struct Partition { int valid; char VolumeDesc[128]; uint16_t Flags; uint16_t Number; char Contents[32]; uint32_t AccessType; uint32_t Start; uint32_t Length; }; struct AD { uint32_t Location; uint32_t Length; uint8_t Flags; uint16_t Partition; }; struct extent_ad { uint32_t location; uint32_t length; }; struct avdp_t { struct extent_ad mvds; struct extent_ad rvds; }; struct pvd_t { uint8_t VolumeIdentifier[32]; uint8_t VolumeSetIdentifier[128]; }; struct lbudf { uint32_t lb; uint8_t *data; }; struct icbmap { uint32_t lbn; struct AD file; uint8_t filetype; }; struct udf_cache { int avdp_valid; struct avdp_t avdp; int pvd_valid; struct pvd_t pvd; int partition_valid; struct Partition partition; int rooticb_valid; struct AD rooticb; int lb_num; struct lbudf *lbs; int map_num; struct icbmap *maps; }; typedef enum { PartitionCache, RootICBCache, LBUDFCache, MapCache, AVDPCache, PVDCache } UDFCacheType; #if 0 extern void *GetUDFCacheHandle(dvd_reader_t *device); extern void SetUDFCacheHandle(dvd_reader_t *device, void *cache); #endif void FreeUDFCache(udf_t *udf, void *cache) { int n; struct udf_cache *c = (struct udf_cache *)cache; if(c == NULL) { return; } for(n = 0; n < c->lb_num; n++) { if(c->lbs[n].data) { /* free data */ //dvdalign_lbfree(device, c->lbs[n].data); free(c->lbs[n].data); } } c->lb_num = 0; if(c->lbs) { free(c->lbs); } if(c->maps) { free(c->maps); } free(c); } static int GetUDFCache(udf_t *udf, UDFCacheType type, uint32_t nr, void *data) { int n; struct udf_cache *c; /* if(DVDUDFCacheLevel(device, -1) <= 0) { return 0; } */ //c = (struct udf_cache *)GetUDFCacheHandle(device); c = (struct udf_cache *) udf->cache; if(c == NULL) { return 0; } switch(type) { case AVDPCache: if(c->avdp_valid) { *(struct avdp_t *)data = c->avdp; return 1; } break; case PVDCache: if(c->pvd_valid) { *(struct pvd_t *)data = c->pvd; return 1; } break; case PartitionCache: if(c->partition_valid) { *(struct Partition *)data = c->partition; return 1; } break; case RootICBCache: if(c->rooticb_valid) { *(struct AD *)data = c->rooticb; return 1; } break; case LBUDFCache: for(n = 0; n < c->lb_num; n++) { if(c->lbs[n].lb == nr) { *(uint8_t **)data = c->lbs[n].data; return 1; } } break; case MapCache: for(n = 0; n < c->map_num; n++) { if(c->maps[n].lbn == nr) { *(struct icbmap *)data = c->maps[n]; return 1; } } break; default: break; } return 0; } static int SetUDFCache(udf_t *udf, UDFCacheType type, uint32_t nr, void *data) { int n; struct udf_cache *c; /* if(DVDUDFCacheLevel(dev, -1) <= 0) { return 0; } */ //c = (struct udf_cache *)GetUDFCacheHandle(dev); c = (struct udf_cache *) udf->cache; if(c == NULL) { c = (struct udf_cache*) calloc(1, sizeof(struct udf_cache)); // fprintf(stderr, "calloc: %d\n", sizeof(struct udf_cache)); if(c == NULL) { return 0; } //SetUDFCacheHandle(udf, c); udf->cache = (void*) c; } switch(type) { case AVDPCache: c->avdp = *(struct avdp_t *)data; c->avdp_valid = 1; break; case PVDCache: c->pvd = *(struct pvd_t *)data; c->pvd_valid = 1; break; case PartitionCache: c->partition = *(struct Partition *)data; c->partition_valid = 1; break; case RootICBCache: c->rooticb = *(struct AD *)data; c->rooticb_valid = 1; break; case LBUDFCache: for(n = 0; n < c->lb_num; n++) { if(c->lbs[n].lb == nr) { /* replace with new data */ c->lbs[n].data = *(uint8_t **)data; c->lbs[n].lb = nr; return 1; } } c->lb_num++; c->lbs = (lbudf*) realloc(c->lbs, c->lb_num * sizeof(struct lbudf)); /* fprintf(stderr, "realloc lb: %d * %d = %d\n", c->lb_num, sizeof(struct lbudf), c->lb_num * sizeof(struct lbudf)); */ if(c->lbs == NULL) { c->lb_num = 0; return 0; } c->lbs[n].data = *(uint8_t **)data; c->lbs[n].lb = nr; break; case MapCache: for(n = 0; n < c->map_num; n++) { if(c->maps[n].lbn == nr) { /* replace with new data */ c->maps[n] = *(struct icbmap *)data; c->maps[n].lbn = nr; return 1; } } c->map_num++; c->maps = (icbmap*) realloc(c->maps, c->map_num * sizeof(struct icbmap)); /* fprintf(stderr, "realloc maps: %d * %d = %d\n", c->map_num, sizeof(struct icbmap), c->map_num * sizeof(struct icbmap)); */ if(c->maps == NULL) { c->map_num = 0; return 0; } c->maps[n] = *(struct icbmap *)data; c->maps[n].lbn = nr; break; default: return 0; } return 1; } /* For direct data access, LSB first */ #define GETN1(p) ((uint8_t)data[p]) #define GETN2(p) ((uint16_t)data[p] | ((uint16_t)data[(p) + 1] << 8)) #define GETN3(p) ((uint32_t)data[p] | ((uint32_t)data[(p) + 1] << 8) \ | ((uint32_t)data[(p) + 2] << 16)) #define GETN4(p) ((uint32_t)data[p] \ | ((uint32_t)data[(p) + 1] << 8) \ | ((uint32_t)data[(p) + 2] << 16) \ | ((uint32_t)data[(p) + 3] << 24)) /* This is wrong with regard to endianess */ #define GETN(p, n, target) memcpy(target, &data[p], n) static int Unicodedecode( uint8_t *data, int len, char *target ) { int p = 1, i = 0; if( ( data[ 0 ] == 8 ) || ( data[ 0 ] == 16 ) ) do { if( data[ 0 ] == 16 ) p++; /* Ignore MSB of unicode16 */ if( p < len ) { target[ i++ ] = data[ p++ ]; } } while( p < len ); target[ i ] = '\0'; return 0; } static int UDFDescriptor( uint8_t *data, uint16_t *TagID ) { *TagID = GETN2(0); // TODO: check CRC 'n stuff return 0; } static int UDFExtentAD( uint8_t *data, uint32_t *Length, uint32_t *Location ) { *Length = GETN4(0); *Location = GETN4(4); return 0; } static int UDFShortAD( uint8_t *data, struct AD *ad, struct Partition *partition ) { ad->Length = GETN4(0); ad->Flags = ad->Length >> 30; ad->Length &= 0x3FFFFFFF; ad->Location = GETN4(4); ad->Partition = partition->Number; // use number of current partition return 0; } static int UDFLongAD( uint8_t *data, struct AD *ad ) { ad->Length = GETN4(0); ad->Flags = ad->Length >> 30; ad->Length &= 0x3FFFFFFF; ad->Location = GETN4(4); ad->Partition = GETN2(8); //GETN(10, 6, Use); return 0; } static int UDFExtAD( uint8_t *data, struct AD *ad ) { ad->Length = GETN4(0); ad->Flags = ad->Length >> 30; ad->Length &= 0x3FFFFFFF; ad->Location = GETN4(12); ad->Partition = GETN2(16); //GETN(10, 6, Use); return 0; } static int UDFICB( uint8_t *data, uint8_t *FileType, uint16_t *Flags ) { *FileType = GETN1(11); *Flags = GETN2(18); return 0; } static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Number, char *Contents, uint32_t *Start, uint32_t *Length ) { *Flags = GETN2(20); *Number = GETN2(22); GETN(24, 32, Contents); *Start = GETN4(188); *Length = GETN4(192); return 0; } /** * Reads the volume descriptor and checks the parameters. Returns 0 on OK, 1 * on error. */ static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor ) { uint32_t lbsize, MT_L, N_PM; Unicodedecode(&data[84], 128, VolumeDescriptor); lbsize = GETN4(212); // should be 2048 MT_L = GETN4(264); // should be 6 N_PM = GETN4(268); // should be 1 if (lbsize != DVD_VIDEO_LB_LEN) return 1; return 0; } static int UDFFileEntry( uint8_t *data, uint8_t *FileType, struct Partition *partition, struct AD *ad ) { uint16_t flags; uint32_t L_EA, L_AD; uint32_t p; UDFICB( &data[ 16 ], FileType, &flags ); /* Init ad for an empty file (i.e. there isn't a AD, L_AD == 0 ) */ ad->Length = GETN4( 60 ); // Really 8 bytes a 56 ad->Flags = 0; ad->Location = 0; // what should we put here? ad->Partition = partition->Number; // use number of current partition L_EA = GETN4( 168 ); L_AD = GETN4( 172 ); p = 176 + L_EA; while( p < 176 + L_EA + L_AD ) { switch( flags & 0x0007 ) { case 0: UDFShortAD( &data[ p ], ad, partition ); p += 8; break; case 1: UDFLongAD( &data[ p ], ad ); p += 16; break; case 2: UDFExtAD( &data[ p ], ad ); p += 20; break; case 3: switch( L_AD ) { case 8: UDFShortAD( &data[ p ], ad, partition ); break; case 16: UDFLongAD( &data[ p ], ad ); break; case 20: UDFExtAD( &data[ p ], ad ); break; } p += L_AD; break; default: p += L_AD; break; } } return 0; } static int UDFFileIdentifier( uint8_t *data, uint8_t *FileCharacteristics, char *FileName, struct AD *FileICB ) { uint8_t L_FI; uint16_t L_IU; *FileCharacteristics = GETN1(18); L_FI = GETN1(19); UDFLongAD(&data[20], FileICB); L_IU = GETN2(36); if (L_FI) Unicodedecode(&data[38 + L_IU], L_FI, FileName); else FileName[0] = '\0'; return 4 * ((38 + L_FI + L_IU + 3) / 4); } /** * Maps ICB to FileAD * ICB: Location of ICB of directory to scan * FileType: Type of the file * File: Location of file the ICB is pointing to * return 1 on success, 0 on error; */ static int UDFMapICB( udf_t *udf, struct AD ICB, uint8_t *FileType, struct Partition *partition, struct AD *File ) { uint8_t *LogBlock; uint32_t lbnum; uint16_t TagID; struct icbmap tmpmap; lbnum = partition->Start + ICB.Location; tmpmap.lbn = lbnum; if(GetUDFCache(udf, MapCache, lbnum, &tmpmap)) { *FileType = tmpmap.filetype; *File = tmpmap.file; return 1; } //LogBlock = dvdalign_lbmalloc(device, 1); LogBlock = (uint8_t*) malloc(2048); if(!LogBlock) { return 0; } do { //if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <= 0 ) { if( read ( udf->dev, LogBlock, lbnum++, 1, 0 ) ) { TagID = 0; } else { UDFDescriptor( LogBlock, &TagID ); } if( TagID == 261 ) { UDFFileEntry( LogBlock, FileType, partition, File ); tmpmap.file = *File; tmpmap.filetype = *FileType; SetUDFCache(udf, MapCache, tmpmap.lbn, &tmpmap); //dvdalign_lbfree(device, LogBlock); free(LogBlock); return 1; }; } while( ( lbnum <= partition->Start + ICB.Location + ( ICB.Length - 1 ) / DVD_VIDEO_LB_LEN ) && ( TagID != 261 ) ); //dvdalign_lbfree(device, LogBlock); free(LogBlock); return 0; } /** * Dir: Location of directory to scan * FileName: Name of file to look for * FileICB: Location of ICB of the found file * return 1 on success, 0 on error; */ static int UDFScanDir( udf_t *udf, struct AD Dir, char *FileName, struct Partition *partition, struct AD *FileICB, int cache_file_info) { char filename[ MAX_UDF_FILE_NAME_LEN ]; uint8_t *directory; uint32_t lbnum; uint16_t TagID; uint8_t filechar; uint32_t p; uint8_t *cached_dir = NULL; uint32_t dir_lba; struct AD tmpICB; int found = 0; int in_cache = 0; /* Scan dir for ICB of file */ lbnum = partition->Start + Dir.Location; // if(DVDUDFCacheLevel(device, -1) > 0) { /* caching */ //if(!GetUDFCache(device, LBUDFCache, lbnum, &cached_dir)) { if(!GetUDFCache(udf, LBUDFCache, lbnum, &cached_dir)) { dir_lba = (Dir.Length + DVD_VIDEO_LB_LEN) / DVD_VIDEO_LB_LEN; //if((cached_dir = dvdalign_lbmalloc(device, dir_lba)) == NULL) { if((cached_dir = (uint8_t*) malloc(2048 * dir_lba)) == NULL) { return 0; } //if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <= 0 ) { if( read( udf->dev, cached_dir, lbnum, dir_lba, 0) ) { //dvdalign_lbfree(device, cached_dir); free(cached_dir); cached_dir = NULL; } SetUDFCache(udf, LBUDFCache, lbnum, &cached_dir); } else { in_cache = 1; } if(cached_dir == NULL) { return 0; } p = 0; while( p < Dir.Length ) { UDFDescriptor( &cached_dir[ p ], &TagID ); if( TagID == 257 ) { p += UDFFileIdentifier( &cached_dir[ p ], &filechar, filename, &tmpICB ); if(cache_file_info && !in_cache) { uint8_t tmpFiletype; struct AD tmpFile; if( !strcasecmp( FileName, filename ) ) { *FileICB = tmpICB; found = 1; } UDFMapICB(udf, tmpICB, &tmpFiletype, partition, &tmpFile); } else { if( !strcasecmp( FileName, filename ) ) { *FileICB = tmpICB; return 1; } } } else { if(cache_file_info && (!in_cache) && found) { return 1; } return 0; } } if(cache_file_info && (!in_cache) && found) { return 1; } return 0; // } //directory = dvdalign_lbmalloc(device, 2); directory = (uint8_t*) malloc(2 * 2048); if(!directory) { return 0; } /* if( DVDReadLBUDF( device, lbnum, 2, directory, 0 ) <= 0 ) { dvdalign_lbfree(device, directory); return 0; } */ if( read( udf->dev, directory, lbnum, 2, 0 ) <= 0 ) { free(directory); return 0; } p = 0; while( p < Dir.Length ) { if( p > DVD_VIDEO_LB_LEN ) { ++lbnum; p -= DVD_VIDEO_LB_LEN; Dir.Length -= DVD_VIDEO_LB_LEN; /* if( DVDReadLBUDF( device, lbnum, 2, directory, 0 ) <= 0 ) { dvdalign_lbfree(device, directory); return 0; } */ if( read( udf->dev, directory, lbnum, 2, 0 ) <= 0 ) { free(directory); return 0; } } UDFDescriptor( &directory[ p ], &TagID ); if( TagID == 257 ) { p += UDFFileIdentifier( &directory[ p ], &filechar, filename, FileICB ); if( !strcasecmp( FileName, filename ) ) { //dvdalign_lbfree(device, directory); free(directory); return 1; } } else { //dvdalign_lbfree(device, directory); free(directory); return 0; } } //dvdalign_lbfree(device, directory); free(directory); return 0; } static int UDFGetAVDP( udf_t *udf, struct avdp_t *avdp) { uint8_t *Anchor; uint32_t lbnum, MVDS_location, MVDS_length; uint16_t TagID; uint32_t lastsector; int terminate; struct avdp_t; if(GetUDFCache(udf, AVDPCache, 0, avdp)) { return 1; } /* Find Anchor */ lastsector = 0; lbnum = 256; /* Try #1, prime anchor */ terminate = 0; //Anchor = dvdalign_lbmalloc(device, 1); Anchor = (uint8_t*) malloc(2048); if(!Anchor) { return 0; } for(;;) { //if( DVDReadLBUDF( device, lbnum, 1, Anchor, 0 ) > 0 ) { if( ! read( udf->dev, Anchor, lbnum, 1, 0 ) ) { UDFDescriptor( Anchor, &TagID ); } else { TagID = 0; } if (TagID != 2) { /* Not an anchor */ if( terminate ) { //dvdalign_lbfree(device, Anchor); free(Anchor); errno = EMEDIUMTYPE; return 0; /* Final try failed */ } if( lastsector ) { /* We already found the last sector. Try #3, alternative * backup anchor. If that fails, don't try again. */ lbnum = lastsector; terminate = 1; } else { /* TODO: Find last sector of the disc (this is optional). */ if( lastsector ) { /* Try #2, backup anchor */ lbnum = lastsector - 256; } else { /* Unable to find last sector */ //dvdalign_lbfree(device, Anchor); free(Anchor); errno = EMEDIUMTYPE; return 0; } } } else { /* It's an anchor! We can leave */ break; } } /* Main volume descriptor */ UDFExtentAD( &Anchor[ 16 ], &MVDS_length, &MVDS_location ); avdp->mvds.location = MVDS_location; avdp->mvds.length = MVDS_length; /* Backup volume descriptor */ UDFExtentAD( &Anchor[ 24 ], &MVDS_length, &MVDS_location ); avdp->rvds.location = MVDS_location; avdp->rvds.length = MVDS_length; SetUDFCache(udf, AVDPCache, 0, avdp); //dvdalign_lbfree(device, Anchor); free(Anchor); return 1; } /** * Looks for partition on the disc. Returns 1 if partition found, 0 on error. * partnum: Number of the partition, starting at 0. * part: structure to fill with the partition information */ static int UDFFindPartition( udf_t *udf, int partnum, struct Partition *part ) { uint8_t *LogBlock; uint32_t lbnum, MVDS_location, MVDS_length; uint16_t TagID; int i, volvalid; struct avdp_t avdp; if(!UDFGetAVDP(udf, &avdp)) { return 0; } //LogBlock = dvdalign_lbmalloc(device, 1); LogBlock = (uint8_t*) malloc(2048); if(!LogBlock) { return 0; } /* Main volume descriptor */ MVDS_location = avdp.mvds.location; MVDS_length = avdp.mvds.length; part->valid = 0; volvalid = 0; part->VolumeDesc[ 0 ] = '\0'; i = 1; do { /* Find Volume Descriptor */ lbnum = MVDS_location; do { //if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <= 0 ) { if( read( udf->dev, LogBlock, lbnum++, 1, 0 ) ) { TagID = 0; } else { UDFDescriptor( LogBlock, &TagID ); } if( ( TagID == 5 ) && ( !part->valid ) ) { /* Partition Descriptor */ UDFPartition( LogBlock, &part->Flags, &part->Number, part->Contents, &part->Start, &part->Length ); part->valid = ( partnum == part->Number ); } else if( ( TagID == 6 ) && ( !volvalid ) ) { /* Logical Volume Descriptor */ if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) { /* TODO: sector size wrong! */ } else { volvalid = 1; } } } while( ( lbnum <= MVDS_location + ( MVDS_length - 1 ) / DVD_VIDEO_LB_LEN ) && ( TagID != 8 ) && ( ( !part->valid ) || ( !volvalid ) ) ); if( ( !part->valid) || ( !volvalid ) ) { /* Backup volume descriptor */ MVDS_location = avdp.mvds.location; MVDS_length = avdp.mvds.length; } } while( i-- && ( ( !part->valid ) || ( !volvalid ) ) ); //dvdalign_lbfree(device, LogBlock); free(LogBlock); /* We only care for the partition, not the volume */ return part->valid; } uint32_t UDFFindFile( udf_t *udf, char *filename, uint32_t *filesize ) { uint8_t *LogBlock; uint32_t lbnum; uint16_t TagID; struct Partition partition; struct AD RootICB, File, ICB; char tokenline[ MAX_UDF_FILE_NAME_LEN ]; char *token; uint8_t filetype; if(filesize) { *filesize = 0; } tokenline[0] = '\0'; strcat( tokenline, filename ); if(!(GetUDFCache(udf, PartitionCache, 0, &partition) && GetUDFCache(udf, RootICBCache, 0, &RootICB))) { /* Find partition, 0 is the standard location for DVD Video.*/ if( !UDFFindPartition( udf, 0, &partition ) ) { return 0; } SetUDFCache(udf, PartitionCache, 0, &partition); //LogBlock = dvdalign_lbmalloc(device, 1); LogBlock = (uint8_t*) malloc(2048); if(!LogBlock) { return 0; } /* Find root dir ICB */ lbnum = partition.Start; do { //if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <= 0 ) { if( read( udf->dev, LogBlock, lbnum++, 1, 0 ) ) { TagID = 0; } else { UDFDescriptor( LogBlock, &TagID ); } /* File Set Descriptor */ if( TagID == 256 ) { // File Set Descriptor UDFLongAD( &LogBlock[ 400 ], &RootICB ); } } while( ( lbnum < partition.Start + partition.Length ) && ( TagID != 8 ) && ( TagID != 256 ) ); //dvdalign_lbfree(device, LogBlock); free(LogBlock); /* Sanity checks. */ if( TagID != 256 ) { return 0; } if( RootICB.Partition != 0 ) { return 0; } SetUDFCache(udf, RootICBCache, 0, &RootICB); } /* Find root dir */ if( !UDFMapICB( udf, RootICB, &filetype, &partition, &File ) ) { return 0; } if( filetype != 4 ) { return 0; /* Root dir should be dir */ } { int cache_file_info = 0; /* Tokenize filepath */ token = strtok(tokenline, "/"); while( token != NULL ) { if( !UDFScanDir( udf, File, token, &partition, &ICB, cache_file_info)) { return 0; } if( !UDFMapICB( udf, ICB, &filetype, &partition, &File ) ) { return 0; } if(!strcmp(token, "VIDEO_TS")) { cache_file_info = 1; } token = strtok( NULL, "/" ); } } /* Sanity check. */ if( File.Partition != 0 ) { return 0; } if(filesize) { *filesize = File.Length; } /* Hack to not return partition.Start for empty files. */ if( !File.Location ) { return 0; } else { return partition.Start + File.Location; } } /** * Gets a Descriptor . * Returns 1 if descriptor found, 0 on error. * id, tagid of descriptor * bufsize, size of BlockBuf (must be >= DVD_VIDEO_LB_LEN) * and aligned for raw/O_DIRECT read. */ static int UDFGetDescriptor( udf_t *udf, int id, uint8_t *descriptor, int bufsize) { uint32_t lbnum, MVDS_location, MVDS_length; struct avdp_t avdp; uint16_t TagID; uint32_t lastsector; int i, terminate; int desc_found = 0; /* Find Anchor */ lastsector = 0; lbnum = 256; /* Try #1, prime anchor */ terminate = 0; if(bufsize < DVD_VIDEO_LB_LEN) { return 0; } if(!UDFGetAVDP(udf, &avdp)) { return 0; } /* Main volume descriptor */ MVDS_location = avdp.mvds.location; MVDS_length = avdp.mvds.length; i = 1; do { /* Find Descriptor */ lbnum = MVDS_location; do { //if( DVDReadLBUDF( device, lbnum++, 1, descriptor, 0 ) <= 0 ) { if( read( udf->dev, descriptor, lbnum++, 1, 0 ) ) { TagID = 0; } else { UDFDescriptor( descriptor, &TagID ); } if( (TagID == id) && ( !desc_found ) ) { /* Descriptor */ desc_found = 1; } } while( ( lbnum <= MVDS_location + ( MVDS_length - 1 ) / DVD_VIDEO_LB_LEN ) && ( TagID != 8 ) && ( !desc_found) ); if( !desc_found ) { /* Backup volume descriptor */ MVDS_location = avdp.rvds.location; MVDS_length = avdp.rvds.length; } } while( i-- && ( !desc_found ) ); return desc_found; } static int UDFGetPVD(udf_t *udf, struct pvd_t *pvd) { uint8_t *pvd_buf; if(GetUDFCache(udf, PVDCache, 0, pvd)) { return 1; } //pvd_buf = dvdalign_lbmalloc(device, 1); pvd_buf = (uint8_t*) malloc(2048); if(!pvd_buf) { return 0; } if(!UDFGetDescriptor( udf, 1, pvd_buf, 1*DVD_VIDEO_LB_LEN)) { //dvdalign_lbfree(device, pvd_buf); free(pvd_buf); return 0; } memcpy(pvd->VolumeIdentifier, &pvd_buf[24], 32); memcpy(pvd->VolumeSetIdentifier, &pvd_buf[72], 128); SetUDFCache(udf, PVDCache, 0, pvd); //dvdalign_lbfree(device, pvd_buf); free(pvd_buf); return 1; } /** * Gets the Volume Identifier string, in 8bit unicode (latin-1) * volid, place to put the string * volid_size, size of the buffer volid points to * returns the size of buffer needed for all data */ int UDFGetVolumeIdentifier(udf_t *udf, char *volid, uint32_t volid_size) { struct pvd_t pvd; uint32_t volid_len; /* get primary volume descriptor */ if(!UDFGetPVD(udf, &pvd)) { return 0; } volid_len = pvd.VolumeIdentifier[31]; if(volid_len > 31) { /* this field is only 32 bytes something is wrong */ volid_len = 31; } if(volid_size > volid_len) { volid_size = volid_len; } Unicodedecode(pvd.VolumeIdentifier, volid_size, volid); return volid_len; } /** * Gets the Volume Set Identifier, as a 128-byte dstring (not decoded) * WARNING This is not a null terminated string * volsetid, place to put the data * volsetid_size, size of the buffer volsetid points to * the buffer should be >=128 bytes to store the whole volumesetidentifier * returns the size of the available volsetid information (128) * or 0 on error */ int UDFGetVolumeSetIdentifier(udf_t *udf, uint8_t *volsetid, uint32_t volsetid_size) { struct pvd_t pvd; /* get primary volume descriptor */ if(!UDFGetPVD(udf, &pvd)) { return 0; } if(volsetid_size > 128) { volsetid_size = 128; } memcpy(volsetid, pvd.VolumeSetIdentifier, volsetid_size); return 128; } qpxtool-0.7.1_002/console/readdvd/imgwriter.cpp0000644000175000001440000000215611204725264020655 0ustar shultzusers/* * * image writer class for DeadDiscReader * Copyright (C) 2007, Gennady "ShultZ" Kozlov * */ #define __USE_LARGEFILE64 #define _FILE_OFFSET_BITS 64 #include //#include //#include //#include #include #include "imgwriter.h" imgwriter::imgwriter(char* fn, smap* map) { mutex = new Mutex(); fname=fn; if (!(iso = fopen(fname,"r+"))){ printf("can't open image file, creating new one!\n"); if (!(iso = fopen(fname,"w+"))){ printf("can't create image file!\n"); } } else { printf("image opened: '%s'\n", fname); map->load(); } } imgwriter::~imgwriter() { delete mutex; } int imgwriter::write(int lba, int scnt, int ssz, void* buff) { int res=0; mutex->lock(); iso = fopen(fname, "r+"); if (iso) { #ifdef fseeko fseeko(iso, ssz*(__off_t)lba, SEEK_SET); #else fseek(iso, ssz*(long int)lba, SEEK_SET); #endif fwrite(buff, ssz*scnt, 1, iso); fclose(iso); } mutex->unlock(); return res; } //void imgwriter::set_file(char* fn) { fname=fn; } //int imgwriter::open(){} //int imgwriter::close(){} qpxtool-0.7.1_002/console/qscan/0000755000175000001440000000000011352127612015625 5ustar shultzusersqpxtool-0.7.1_002/console/qscan/Makefile0000644000175000001440000000076511330262217017272 0ustar shultzusersSRCS = $(patsubst %,%.cpp, qscan) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) BIN = qscan$(BINSUFF) CXXFLAGS += -I. -I../../lib/include CFLAGS += -I. -I../../lib/include LDLIBS += -L../../lib/lib -lqpxtransport -lqpxscan -lqpxplextor $(BIN): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) all:$(BIN) clean: rm -f $(BIN) $(OBJS) *~ install: mkdir -p $(DESTDIR)$(BINDIR) install -m 4755 $(BIN) $(DESTDIR)$(BINDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/$(BIN) .PHONY: all clean install qpxtool-0.7.1_002/console/qscan/qscan.cpp0000644000175000001440000006765011336723470017462 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include #include #include #include #include #include #ifdef _WIN32 #include #endif #include "version.h" #define MSGPREF "qscan: " #define CAPDEV "CD: " #define CAPVND "CV: " #define CAPMEDIA "CM: " #define IDEV "ID: " #define IMEDIA "IM: " #define SMEDIA "SM: " //#define USE_SIGUSR2 #define FL_INFO 0x00000001 #define FL_SCANBUS 0x00000002 #define FL_DEV 0x00000004 #define FL_SPEED 0x00000008 #define FL_SPEEDS 0x00000010 #define FL_MINFO 0x00000020 #define FL_DEBUG 0x00000040 #define FL_LPLUGIN 0x00000080 #define FL_DINFO 0x00000100 #define FL_MID_RAW 0x00000200 qscanner *scanner; #if defined (__unix) || defined (__unix__) void sigint_handler (int) { printf("\nSIGINT\n"); if (scanner) { printf("Terminating scan...\n"); scanner->stop(); } // printf("\nwaiting scanner to stop\n"); } void sigusr_handler (int signum) { switch (signum) { case SIGUSR1: printf("\nSIGUSR1\n"); if (scanner) scanner->stat(); break; #ifdef USE_SIGUSR2 case SIGUSR2: printf("\nSIGUSR2\n"); if (scanner) scanner->stat(); break; #endif default: break; } } #elif defined (_WIN32) BOOL WINAPI sigint_handler (DWORD) { printf("\nSIGINT\n"); if (scanner) { printf("Terminating scan...\n"); scanner->stop(); } return true; // printf("\nwaiting scanner to stop\n"); } #endif void detect_vendor_features(drive_info *dev) { if (isPlextor(dev)) { plextor_get_life(dev); // if ((dev->dev_ID == PLEXTOR_755) || (dev->dev_ID == PLEXTOR_760) || (dev->dev_ID == PLEXTOR_PREMIUM2)) // if (isPlextorLockPresent(dev)) plextor_px755_do_auth(dev); if (!plextor_get_hidecdr_singlesession(dev)) dev->ven_features|=PX_HCDRSS; if (!plextor_get_speedread(dev)) dev->ven_features|=PX_SPDREAD; if (dev->wr_capabilities) { // if (!yamaha_check_amqr(dev)) dev->ven_features|=YMH_AMQR; if (!plextor_get_powerec(dev)) { dev->ven_features|=PX_POWEREC; // plextor_get_speeds(dev); } if (!plextor_get_gigarec(dev)) dev->ven_features|=PX_GIGAREC; if (!plextor_get_varirec(dev, VARIREC_CD)) dev->ven_features|=PX_VARIREC_CD; if (!plextor_get_silentmode(dev)) dev->ven_features|=PX_SILENT; if (!plextor_get_securec_state(dev)) dev->ven_features|=PX_SECUREC; } if (dev->wr_capabilities & DEVICE_DVD) { if (!plextor_get_varirec(dev, VARIREC_DVD)) dev->ven_features|=PX_VARIREC_DVD; if (!plextor_get_bitset(dev, PLEX_BITSET_R)) dev->ven_features|=PX_BITSET_R; if (!plextor_get_bitset(dev, PLEX_BITSET_RDL)) dev->ven_features|=PX_BITSET_RDL; if (!plextor_get_autostrategy(dev)) dev->ven_features|=PX_ASTRATEGY; if (!plextor_get_testwrite_dvdplus(dev)) dev->ven_features|=PX_SIMUL_PLUS; } //if ((dev->dev_ID == PLEXTOR_755) || (dev->dev_ID == PLEXTOR_760) || (dev->dev_ID == PLEXTOR_PREMIUM2)) if (isPlextorLockPresent(dev)) dev->ven_features|=PX_ERASER; #if 0 } else if (!strncmp(dev->ven,"YAMAHA",7)) { if (!yamaha_check_amqr(dev)) dev->ven_features|=YMH_AMQR; if (!yamaha_check_forcespeed(dev)) dev->ven_features|=YMH_FORCESPEED; #endif } } static struct option long_options[] = { {"help", 0, NULL, 'h'}, {"scan", 0, NULL, 'l'}, {"dev", 1, NULL, 'd'}, {"plugins", 0, NULL, 'p'}, {"force-plugin", 1, NULL, 'f'}, {"test", 1, NULL, 't'}, {"write", 0, NULL, 'W'}, {"speed", 1, NULL, 's'}, {"speeds", 0, NULL, 'S'}, {"rspeed", 1, NULL, 'r'}, {"wspeed", 1, NULL, 'w'}, {"info", 0, NULL, 'i'}, {"infoshort", 0, NULL, 'I'}, {"media", 0, NULL, 'm'}, {"mediashort",0, NULL, 'M'}, {"verbose", 0, NULL, 'v'}, {0,0,0,0} }; void show_available_errc_data(qscanner *scanner) { int errc_data = 0; drive_info *dev; if (!scanner || !(dev=scanner->device())) return; errc_data = scanner->errc_data(); printf(IMEDIA "ERRC data :"); if (dev->media.type & DISC_CD) { for (int i=0; i<8; i++) if (errc_data & (1<media.type & DISC_DVD) { for (int i=0; i<8; i++) if (errc_data & (1<\n"); printf("\n"); printf("qscan is a CD/DVD quality scanning utility\n"); printf("\n"); printf("-h --help you are reading this:)\n"); printf("-d --dev DEVICE use this device\n"); printf("-s --speed # test media at given speed (default: maximum). Don't use with -r or -w\n"); printf("-S --speeds detect available read/write speeds\n"); printf("-r --rspeed # set read speed\n"); printf("-w --wspeed # set write speed\n"); printf("-l --scanbus scan IDE/SATA/SCSI buses for MMC-compliant devices\n"); printf("-t --test TEST run specified test:\n"); printf(" rt : Read Transfer rate\n"); printf(" wt : Write Transfer rate\n"); printf(" errc : Error Correction \n"); printf(" jb : Jitter/Asymmetry\n"); printf(" ft : Focus/Tracking errors\n"); printf(" ta : Time Analyser\n"); printf("-W --write do real write instead simulation (for use with --test wt)\n"); printf("-p --plugins list all available plugins\n"); printf("-f --force PLUGIN force using specified plugin (default: autodetect)\n"); printf("-I --shortinfo print device info\n"); printf("-i --info print device info (with supported features list)\n"); printf("-m --media print media info\n"); printf("-M --mediashort print media info without raw media identification data\n"); printf("-v --verbose print a lot of debug info\n"); printf("\n"); return 0; case 'd': if (flags & FL_DEV) { printf("Duplicated device option ignored: %s\n", optarg); } else { device = optarg; flags |= FL_DEV; } break; case 'i': if (!device) { printf( MSGPREF "no device selected!\n"); } flags |= (FL_DINFO | FL_INFO); break; case 'I': if (!device) { printf( MSGPREF "no device selected!\n"); } flags |= FL_INFO; break; case 'M': if (!device) { printf( MSGPREF "no device selected!\n"); } flags |= FL_MINFO; break; case 'm': if (!device) { printf( MSGPREF "no device selected!\n"); } flags |= FL_MINFO; flags |= FL_MID_RAW; break; case 'S': flags |= FL_SPEEDS; break; case 's': flags |= FL_SPEED; speed = atol(optarg); break; case 'r': // printf(MSGPREF " -r option conflicts with -s!\n"); flags |= FL_SPEED; rspeed = atol(optarg); break; case 'w': flags |= FL_SPEED; wspeed = atol(optarg); break; case 'l': flags |= FL_SCANBUS; scanbus(); return 0; case 't': if (!(strcmp(optarg, "rt") && strcmp(optarg, "wt") && strcmp(optarg, "errc") && strcmp(optarg, "jb") && strcmp(optarg, "ft") && strcmp(optarg, "ta"))) { test = optarg; } else { printf( MSGPREF "invalid test name: %s\n", optarg); return 4; } break; case 'W': simul=0; break; case 'f': pname = optarg; break; case 'p': if (test) { printf( MSGPREF "option -p conflicts with -t !\n"); } else { flags |= FL_LPLUGIN; } break; case 'v': flags |= FL_DEBUG; break; default: break; } } if (!device) { printf( MSGPREF "no device specified! Try using -l to see list\n"); return 1; } dev = new drive_info(device); if (dev->mmc < 0) { printf( MSGPREF " can't open device %s!\n",device); delete dev; return 2; } switch (inquiry(dev)) { case 0: break; case ERR_NO_DEV: printf( MSGPREF "%s: no such device!\n",device); delete dev; return 3; case ERR_NO_SCSI: printf( MSGPREF "%s: device is not SCSI-compliant!\n",device); delete dev; return 3; case ERR_NO_MMC: printf( MSGPREF "%s: device is not MMC-compliant!\n",device); delete dev; return 3; default: printf( MSGPREF "%s: unknown error\n",device); delete dev; return 3; } printf( MSGPREF "using device '%s': '%s' '%s' '%s'\n", device, dev->ven, dev->dev, dev->fw); //dev->silent = 0; // get_features_list(dev); if (!(flags & FL_DEBUG)) dev->silent++; detect_capabilities(dev); get_buffer_capacity(dev); determine_disc_type(dev); read_capacities(dev); detect_vendor_features(dev); get_rw_speeds(dev); // if (!(flags & FL_DEBUG)) dev->silent--; // if (flags & (FL_INFO | FL_MINFO | FL_SPEED | FL_SPEEDS)) detect_speeds(dev); // test_dma_speed(dev); if (flags & FL_INFO) { printf(IDEV "Device: '%s'\n", device); printf(IDEV "Vendor: '%s'\n",dev->ven); printf(IDEV "Model : '%s'\n",dev->dev); printf(IDEV "F/W : '%s'\n",dev->fw); if (isPlextor(dev)) { plextor_get_TLA(dev); printf(IDEV "TLA# : %s\n",dev->TLA); } else { printf(IDEV "TLA# : N/A \n"); } printf(IDEV "Buffer: %d kB\n", dev->buffer_size); printf(IDEV "S/N : %s\n", dev->serial); printf(IDEV "IFace : %s\n", dev->iface); printf(IDEV "Loader: %s\n", loader_list[dev->loader_id]); if (dev->life.ok) { printf(IDEV "Discs loaded: %6d\n", dev->life.dn); printf(IDEV "Drive operating time:\n"); printf(IDEV " CD Rd : %4d:%02d:%02d\n", dev->life.cr.h, dev->life.cr.m, dev->life.cr.s); printf(IDEV " CD Wr : %4d:%02d:%02d\n", dev->life.cw.h, dev->life.cw.m, dev->life.cw.s); if (dev->rd_capabilities & DEVICE_DVD) printf(IDEV " DVD Rd : %4d:%02d:%02d\n", dev->life.dr.h, dev->life.dr.m, dev->life.dr.s); if (dev->wr_capabilities & DEVICE_DVD) printf(IDEV " DVD Wr : %4d:%02d:%02d\n", dev->life.dw.h, dev->life.dw.m, dev->life.dw.s); } } if (flags & (FL_INFO | FL_MINFO)) { get_rw_speeds(dev); printf(IDEV "Current read speed : %4.1fX ( %5d kB/s)\n", (float)dev->parms.read_speed_kb / dev->parms.speed_mult, dev->parms.read_speed_kb); if (dev->wr_capabilities) { printf(IDEV "Current write speed : %4.1fX ( %5d kB/s) \n", (float)dev->parms.write_speed_kb / dev->parms.speed_mult, dev->parms.write_speed_kb); } } if (dev->wr_capabilities) { check_write_modes(dev); } if (flags & FL_INFO) { printf(IDEV "Device Generic capabilities : 0x%016LX\n",dev->capabilities); printf(IDEV "Device Read capabilities : 0x%016LX\n",dev->rd_capabilities); printf(IDEV "Device Write capabilities : 0x%016LX\n",dev->wr_capabilities); } if (dev->wr_capabilities) { printf(IDEV "Supported write modes:"); for (int i=0; wr_modes[i].id; i++) { if ((dev->wr_modes & wr_modes[i].id) == wr_modes[i].id) printf(" %s", wr_modes[i].name); } printf("\n"); } if (flags & FL_DINFO) { printf("\nDevice capabilities:\n"); for (int idx=0; capabilities[idx].id || strlen(capabilities[idx].name); idx++) { if (capabilities[idx].id) printf(CAPDEV "%18s: %s\n", capabilities[idx].name, (dev->capabilities & capabilities[idx].id) ? "YES" : "-"); } if (dev->capabilities & CAP_DVD_CSS) { get_rpc_state(dev); printf(IDEV " RPC phase : %d\n", dev->rpc.phase); if (dev->rpc.phase == 2) { if (dev->rpc.region) printf(IDEV " Cur Region : %d\n", dev->rpc.region); else printf(IDEV " Cur Region : not set\n"); printf(IDEV " Changes left : %d\n", dev->rpc.ch_u); printf(IDEV " Resets left : %d\n", dev->rpc.ch_v); } } printf(CAPDEV "Media is locked : %s\n", (dev->parms.status & STATUS_LOCK) ? "LOCK": "OFF"); /* if (get_drive_serial_number(dev)) { text_serial->setText(drive->serial); } */ printf("\nVendor-specific features:\n"); #if 0 printf("AudioMaster Q.R.: %s\n", dev->ven_features & YMH_AMQR ? "YES" : "-"); // if ((dev->ven_features & YMH_AMQR) && ((flags & FL_CURRENT) || (flags & FL_YMH_AMQR))) // printf("AudioMaster Q.R. : %s\n", drive->yamaha.amqr ? "ON":"OFF"); printf("Yamaha ForceSpd : %s\n", dev->ven_features & YMH_FORCESPEED ? "YES" : "-"); // if ((dev->ven_features & YMH_FORCESPEED) && ((flags & FL_CURRENT) || (flags & FL_YMH_FORCESPEED))) // printf("Yamaha ForceSpeed : %s\n", drive->yamaha.forcespeed ? "ON":"OFF"); #endif printf(CAPVND "Hide CD-R : %s\n", dev->ven_features & PX_HCDRSS ? (dev->plextor.hcdr ? "ON":"OFF") : "-"); printf(CAPVND "SingleSession : %s\n", dev->ven_features & PX_HCDRSS ? (dev->plextor.sss ? "ON":"OFF") : "-"); printf(CAPVND "SpeedRead : %s\n", dev->ven_features & PX_SPDREAD ? (dev->plextor.spdread ? "ON":"OFF") : "-"); printf(CAPVND "Silent mode : %s\n", dev->ven_features & PX_SILENT ? (dev->plextor_silent.state ? "ON":"OFF") : "-"); if ((dev->ven_features & PX_SILENT) && (dev->plextor_silent.state)) plextor_print_silentmode_state(dev); printf(CAPVND "SecuRec : %s\n", dev->ven_features & PX_SECUREC ? (dev->plextor.securec ? "ON":"OFF") : "-"); printf(CAPVND "PoweRec : %s\n", dev->ven_features & PX_POWEREC ? (dev->plextor.powerec_state ? "ON":"OFF") : "-"); if (dev->ven_features & PX_POWEREC) { if (dev->media.type & DISC_CD) printf(CAPVND " PoweREC Speed : %dX (CD)\n",dev->plextor.powerec_spd / 176); if (dev->media.type & DISC_DVD) printf(CAPVND " PoweREC Speed : %dX (DVD)\n",dev->plextor.powerec_spd / 1385); } printf(CAPVND "GigaRec : %s\n", dev->ven_features & PX_GIGAREC ? "YES" : "-"); if (dev->ven_features & PX_GIGAREC) print_gigarec_value(dev); printf(CAPVND "VariRec CD : %s\n", dev->ven_features & PX_VARIREC_CD ? (dev->plextor.varirec_state_cd ? "ON":"OFF") : "-"); if ((dev->ven_features & PX_VARIREC_CD) && (dev->plextor.varirec_state_cd)) print_varirec(dev, VARIREC_CD); if (dev->wr_capabilities & DEVICE_DVD) { printf(CAPVND "VariRec DVD : %s\n", dev->ven_features & PX_VARIREC_DVD ? (dev->plextor.varirec_state_dvd ? "ON":"OFF") : "-"); if ((dev->ven_features & PX_VARIREC_DVD) && (dev->plextor.varirec_state_dvd)) print_varirec(dev, VARIREC_DVD); printf(CAPVND "DVD+R bitset : %s\n", dev->ven_features & PX_BITSET_R ? (dev->book_plus_r ? "DVD-ROM book" : "DVD+R book") : "-"); printf(CAPVND "DVD+R DL bitset : %s\n", dev->ven_features & PX_BITSET_RDL ? (dev->book_plus_rdl ? "DVD-ROM book" : "DVD+R DL book") : "-"); printf(CAPVND "DVD+ testwrite : %s\n", dev->ven_features & PX_SIMUL_PLUS ? (dev->plextor.testwrite_dvdplus ? "ON":"OFF") : "-"); printf(CAPVND "AutoStrategy : %s%s\n", dev->ven_features & PX_ASTRATEGY ? "YES" : "-", ((dev->dev_ID == PLEXTOR_755) || (dev->dev_ID == PLEXTOR_760)) ? " (EXTENDED)" : ""); if (dev->ven_features & PX_ASTRATEGY) { printf(CAPVND); plextor_print_autostrategy_state(dev); } } printf(CAPVND "PlexEraser : %s\n", dev->ven_features & PX_ERASER ? "YES" : "-"); printf("\nDevice Read/Write capabilities:\n"); for (int idx=0; rw_capabilities[idx].id || strlen(rw_capabilities[idx].name); idx++) { if (rw_capabilities[idx].id) printf(CAPMEDIA "%11s: %c%c\n", rw_capabilities[idx].name, (dev->rd_capabilities & rw_capabilities[idx].id) ? 'R' : '-', (dev->wr_capabilities & rw_capabilities[idx].id) ? 'W' : '-'); } if (!(flags & FL_MINFO)) goto end; } if ((flags & (FL_SPEEDS | FL_MINFO)) && dev->media.type) { printf(SMEDIA "Read speeds:\n"); printf(SMEDIA " RD speed max: %4.1fX (%d kB/s)\n", ((float)dev->parms.max_read_speed_kb) / dev->parms.speed_mult, dev->parms.max_read_speed_kb); for (int i=0; iparms.speed_tbl_kb[i] > 0; i++) { printf(SMEDIA " RD speed #%02d: %4.1fX (%d kB/s)\n", i, ((float)dev->parms.speed_tbl_kb[i]) / dev->parms.speed_mult, dev->parms.speed_tbl_kb[i]); } if (!(dev->media.type & ( DISC_CDROM | DISC_DDCD_ROM| DISC_DVDROM | DISC_BD_ROM | DISC_HDDVD_ROM))) { printf(SMEDIA "Write speeds:\n"); printf(SMEDIA"D WR speed max: %4.1fX (%d kB/s)\n", ((float)dev->parms.max_write_speed_kb) / dev->parms.speed_mult, dev->parms.max_write_speed_kb); for (int i=0; iparms.wr_speed_tbl_kb[i] > 0; i++) { printf(SMEDIA "D WR speed #%02d: %4.1fX (%d kB/s)\n", i, ((float)dev->parms.wr_speed_tbl_kb[i]) / ((float)dev->parms.speed_mult), dev->parms.wr_speed_tbl_kb[i]); } } } scanner = new qscanner(dev); if (pname) { // scanner = new qscanner(dev); scanner->plugin_attach(pname); } if (!pname && ((test && (strcmp(test,"rt") && strcmp(test,"wt"))) || (flags & (FL_MINFO | FL_LPLUGIN))) ) { if (!dev->silent) printf( MSGPREF "creating scanner...\n"); // scanner = new qscanner(dev); if (scanner->plugins_probe(!test && (flags & FL_LPLUGIN), false) && !(flags & FL_LPLUGIN) ) { printf( MSGPREF "Device not found in any plugin support list, trying to probe...\n"); if (scanner->plugins_probe(!test && (flags & FL_LPLUGIN), !(flags & FL_LPLUGIN))) { printf( MSGPREF "Probe failed! Trying fallback plugin...\n"); if (!(flags & FL_LPLUGIN)) { if (scanner->plugin_attach_fallback()) { printf( MSGPREF "Error loading fallback plugin!\n"); } } } } printf( MSGPREF "using plugin: %s\n", scanner->plugin_name() ? scanner->plugin_name() : "no plugin" ); } if (flags & FL_MINFO) { char *mt; int i=0; if (!dev->media.type) { printf(IMEDIA "Media type : No media\n"); return 0; } while ( MEDIA[i].id != 0xFFFFFFFF && (dev->media.type & (~DISC_CDRWSUBT)) != MEDIA [i].id) i++; mt = (char*) MEDIA[i].name ; if (dev->media.type & DISC_CD) { printf(IMEDIA "Media class : CD\n"); printf(IMEDIA "Media type : %s\n", mt); if (dev->media.type & DISC_CDR) { printf(IMEDIA "Disc Category : %s\n", cdr_subtype_tbl[ (dev->media.type >> 3) & 0x7]); } if (dev->media.type & DISC_CDRW) { printf(IMEDIA "Disc Category : %s\n", cdrw_subtype_tbl[ (dev->media.type >> 3) & 0x7]); } } else if (dev->media.type & DISC_DVD) { printf(IMEDIA "Media class : DVD\n"); printf(IMEDIA "Media type : %s\n", mt); printf(IMEDIA "Disc Category : %s [rev %d]\n", book_type_tbl[ (dev->media.book_type >> 4) & 0xF], dev->media.book_type & 0xF); if (!(dev->media.type & DISC_DVDRAM)) { get_rpc_state(dev); read_disc_regions(dev); } } else { printf(IMEDIA "Media type : unknown\n"); goto end; } if (scanner && scanner->is_plugin_attached()) { printf(IMEDIA "Available quality tests:%s%s%s%s%s%s\n", dev->media.capacity ? " rt" : "", dev->media.dstatus ? "" : " wt", scanner->check_test(CHK_ERRC) ? "" : " errc", scanner->check_test(CHK_JB) ? "" : " jb", scanner->check_test(CHK_FETE) ? "" : " ft", scanner->check_test(CHK_TA) ? "" : " ta" ); if (!scanner->check_test(CHK_ERRC)) { show_available_errc_data(scanner); int* sp = scanner->get_test_speeds(CHK_ERRC); if (!sp) sp = dev->parms.speed_tbl_kb; printf(IMEDIA "ERRC speeds :"); for (int i=0; i 0; i++) printf(" %.0fX",((float)sp[i]) / dev->parms.speed_mult); printf("\n"); } if (!scanner->check_test(CHK_JB)) { int* sp = scanner->get_test_speeds(CHK_JB); if (!sp) sp = dev->parms.speed_tbl_kb; printf(IMEDIA "JB speeds :"); for (int i=0; i 0; i++) printf(" %.0fX",((float)sp[i]) / dev->parms.speed_mult); printf("\n"); } } if ( dev->media.type & (DISC_DVD | DISC_BD | DISC_HDDVD) ) { printf(IMEDIA "Layers : %d\n", dev->media.layers); } else { printf(IMEDIA "Layers : 1\n"); } if ( dev->media.type & (DISC_DVD) ) { // read_disc_regions(drive); if (!dev->media.dvdcss.protection) { printf(IMEDIA "Protection : none\n"); } else { switch (dev->media.dvdcss.protection) { case 0x01: printf(IMEDIA "Protection : CSS/CPPM\n"); break; case 0x02: printf(IMEDIA "Protection : CPRM\n"); break; default: printf(IMEDIA "Protection : Unknown\n"); break; } printf(IMEDIA "Disc regions : "); if (dev->media.dvdcss.regmask != 0xFF) { for (i=0; i<8; i++) if (!((dev->media.dvdcss.regmask >> i) & 1)) { printf("%d",i+1); //dev->rpc.region = i+1; } printf("\n"); } else { printf("Invalid region mask!\n"); } } } else if ( dev->media.type & (DISC_BD) ) { printf(IMEDIA "Protection : ??? (BD)\n"); } else if ( dev->media.type & (DISC_HDDVD) ) { printf(IMEDIA "Protection : ??? (HDDVD)\n"); } printf(IMEDIA "Erasable : %s\n",dev->media.erasable ? "yes" : "no" ); printf(IMEDIA "Disc state : %s\n",disc_status_list[dev->media.dstatus]); printf(IMEDIA "Session state : %s\n",session_status_list[dev->media.sstatus]); printf(IMEDIA "Read capacity : %d sectors/%dMB/%02d:%02d.%02dMSF\n", dev->media.capacity, dev->media.capacity/512, dev->media.capacity/4500, ((dev->media.capacity)/75)%60, dev->media.capacity%75); printf(IMEDIA "Free capacity : %d sectors/%dMB/%02d:%02d.%02dMSF\n", dev->media.capacity_free, dev->media.capacity_free/512, dev->media.capacity_free/4500, ((dev->media.capacity_free)/75)%60, dev->media.capacity_free%75); printf(IMEDIA "Total capacity: %d sectors/%dMB/%02d:%02d.%02dMSF\n", dev->media.capacity_total, dev->media.capacity_total/512, dev->media.capacity_total/4500, ((dev->media.capacity_total)/75)%60, dev->media.capacity_total%75); if (dev->media.type & (DISC_DVDRAM | DISC_HDDVD_RAM) ) { printf(IMEDIA "DVD-RAM Spare Area information (free/total):\n"); printf(IMEDIA "Primary SA : %d (%dMB) / %d (%dMB)\n", dev->media.spare_psa_free, dev->media.spare_psa_free/512, dev->media.spare_psa_total, dev->media.spare_psa_total/512); printf(IMEDIA "Supplement. SA: %d (%dMB) / %d (%dMB)\n", dev->media.spare_ssa_free, dev->media.spare_ssa_free/512, dev->media.spare_ssa_total, dev->media.spare_ssa_total/512); } if ( !(dev->media.type & (DISC_CDROM | DISC_DVDROM)) ) printf(IMEDIA "Media ID : %s\n", dev->media.MID); if ( dev->media.type & (DISC_DVDminus) ) printf(IMEDIA "Written on : %s\n", dev->media.writer); if ((flags & FL_MID_RAW) && (dev->media.type & DISC_CD) && dev->media.ATIP_size) { for (int i=0; i<((dev->media.ATIP_size-4) >> 2); i++) { printf(IMEDIA "ATIP data %X : ", i); printf(" %02X %02X %02X %02X", dev->media.ATIP[(i<<2)+4], dev->media.ATIP[(i<<2)+5], dev->media.ATIP[(i<<2)+6], dev->media.ATIP[(i<<2)+7]); printf(" | %3d %3d %3d %3d\n", dev->media.ATIP[(i<<2)+4], dev->media.ATIP[(i<<2)+5], dev->media.ATIP[(i<<2)+6], dev->media.ATIP[(i<<2)+7]); } } if (dev->media.MID_size) { if (dev->parms.wr_speed_tbl_media[0] > 0) { printf(SMEDIA "Manufacturer defined write speeds:\n"); for (int i=0; iparms.wr_speed_tbl_media[i] > 0; i++) //for (int i=0; iparms.wr_speed_tbl_media[i]); } if (flags & FL_MID_RAW) { for (int i=0; i<(dev->media.MID_size >> 4); i++) { unsigned char c; printf(IMEDIA "MID raw data %X0: ", i); for (int ii=0; ii<16 && ( (i<<4) +ii) < dev->media.MID_size ; ii++) { printf("%02X ", (unsigned char) dev->media.MID_raw[(i<<4) + ii + 4]); } printf(" | "); for (int ii=0; ii<16 && ( (i<<4) +ii) < dev->media.MID_size ; ii++) { c = dev->media.MID_raw[(i<<4) + ii + 4]; printf("%c", (c > 32) ? c : '.' ); } printf("\n"); } } } get_track_list(dev); printf(IMEDIA "Total tracks : %d\n", dev->media.tracks); printf(IMEDIA "Track: Session TMode DMode Start End Size Free Next Writable\n"); printf("--------------------------------------------------------------------------------------------------\n"); if (dev->media.tracks) for (i=0; imedia.tracks; i++) { printf(IMEDIA "Track# %2d %2d %2d %2d %8d %8d %8d %8d %8d\n", dev->media.track[i].n, dev->media.track[i].session, dev->media.track[i].track_mode, dev->media.track[i].data_mode, dev->media.track[i].start, dev->media.track[i].last, dev->media.track[i].size, dev->media.track[i].free, dev->media.track[i].next_writable); } printf("--------------------------------------------------------------------------------------------------\n\n"); goto end; } if (test && !strcmp(test,"wt")) { if (!dev->media.type) { printf("No media!\n"); result=2; goto end; } if (dev->media.dstatus & !(dev->media.type & (DISC_DVDRAM | DISC_DVDpRW | DISC_DVDpRWDL))) { printf("Neither blank media nor DVD-RAM/DVD+RW found!\n"); result=3; goto end; } } // if (test && (strcmp(test,"rt") && strcmp(test,"wt")) && !scanner->is_plugin_attached()) { // } if (speed>0) scanner->setTestSpeed(speed); if (test) { // printf("setting signal handlers...\n"); #if defined (__unix) || defined (__unix__) signal(SIGINT, &sigint_handler); signal(SIGUSR1, &sigusr_handler); #ifdef USE_SIGUSR2 signal(SIGUSR2, &sigusr_handler); #endif #elif defined (_WIN32) SetConsoleCtrlHandler(&sigint_handler, 1); #endif // starting test... //fcntl(1, F_SETFL, fcntl(1, F_GETFL) | O_DIRECT); //fcntl(2, F_SETFL, fcntl(2, F_GETFL) | O_DIRECT); if (!strcmp(test, "wt")) { if ((dev->media.dstatus || !dev->media.capacity_free) && !(dev->media.type & (DISC_DVDRAM| DISC_DVDpRW | DISC_DVDpRWDL))) { // sprintf(linef, "tsize=%dk", 2295104 * 2); printf("Media should be blank to run write transfer rate. Aborting...\n"); result=4; goto end; } if (scanner->setTestWrite( simul )) { printf("Can't turn TestWrite %s\n", simul ? "ON" : "OFF"); result=5; goto end; // } else { // printf("TestWrite set\n"); } } else if (!strcmp(test, "errc")) { if (!scanner->check_test(CHK_ERRC)) { show_available_errc_data(scanner); } } result = scanner->run(test); } else { if (!(flags & FL_SPEED)) { printf( MSGPREF "no test selected!\n"); } else if (rspeed > 0 || wspeed > 0) { //printf("1X speed mult: %.1f\n", dev->parms.speed_mult); get_rw_speeds(dev); if (rspeed>0) { dev->parms.read_speed_kb = (int) (rspeed * dev->parms.speed_mult); printf(IDEV "Setting read speed : %2d X, %5d kB/s\n", rspeed, dev->parms.read_speed_kb); } if (dev->wr_capabilities && wspeed>0) { dev->parms.write_speed_kb = (int) (wspeed * dev->parms.speed_mult); printf(IDEV "Setting write speed : %2d X, %5d kB/s\n", wspeed, dev->parms.write_speed_kb); } set_rw_speeds(dev); get_rw_speeds(dev); if (rspeed>0) { printf(IDEV "Current read speed : %4.1f X, %5d kB/s\n", dev->parms.read_speed_kb / dev->parms.speed_mult, dev->parms.read_speed_kb); } if (dev->wr_capabilities && wspeed>0) { printf(IDEV "Current write speed : %4.1f X, %5d kB/s\n", dev->parms.write_speed_kb / dev->parms.speed_mult, dev->parms.write_speed_kb); } } } end: if (scanner) { if (!dev->silent) printf( MSGPREF "destroing scanner...\n"); delete scanner; } if (!dev->silent) printf( MSGPREF "destroing dev...\n"); delete dev; return result; } qpxtool-0.7.1_002/console/qscan/version.h0000644000175000001440000000071111135037327017464 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #define VERSION "0.7" qpxtool-0.7.1_002/console/f1tattoo/0000755000175000001440000000000011352127612016261 5ustar shultzusersqpxtool-0.7.1_002/console/f1tattoo/Makefile0000644000175000001440000000103711322563154017724 0ustar shultzusersSRCS = $(patsubst %,%.cpp, f1tattoo) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) BIN = f1tattoo$(BINSUFF) CXXFLAGS += -I. -I../../lib/include $(LPNG_INC) CFLAGS += -I. -I../../lib/include $(LPNG_INC) LDLIBS += -L../../lib/lib -lqpxtransport -lqpxyamaha $(LPNG_LIB) $(BIN): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) all:$(BIN) clean: rm -f $(BIN) $(OBJS) *~ install: mkdir -p $(DESTDIR)$(BINDIR) install -m 4755 $(BIN) $(DESTDIR)$(BINDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/$(BIN) .PHONY: all clean install uninstall qpxtool-0.7.1_002/console/f1tattoo/f1tattoo.cpp0000644000175000001440000002737511303161400020531 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2006,2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #ifdef USE_LIBPNG #include #endif #include "version.h" const uint32_t FL_HELP = 0x00000001; const uint32_t FL_SCAN = 0x00000002; const uint32_t FL_DEVICE = 0x00000004; const uint32_t FL_VERBOSE = 0x00000008; const uint32_t FL_CURRENT = 0x00000010; const uint32_t FL_SUPPORTED = 0x00000020; const uint32_t FL_TATTOO_TEST = 0x00000040; const uint32_t FL_TATTOO_RAW = 0x00000080; #ifdef USE_LIBPNG const uint32_t FL_TATTOO_PNG = 0x00000100; const uint32_t FL_TATTOO = FL_TATTOO_RAW | FL_TATTOO_PNG | FL_TATTOO_TEST; #else const uint32_t FL_TATTOO = FL_TATTOO_RAW | FL_TATTOO_TEST; #endif uint32_t flags = 0; int get_device_info(drive_info* drive) { drive->ven_features=0; drive->chk_features=0; detect_capabilities(drive); // detect_check_capabilities(drive); determine_disc_type(drive); if (!isYamaha(drive)) { printf ("%s: drive not supported\n", drive->device); return 1; } // if (!yamaha_check_amqr(drive)) drive->ven_features|=YMH_AMQR; // if (!yamaha_check_forcespeed(drive)) drive->ven_features|=YMH_FORCESPEED; if (!yamaha_f1_get_tattoo(drive)) drive->ven_features|=YMH_TATTOO; if (flags & FL_SUPPORTED) { printf("\n** Supported features:\n"); // printf("AudioMaster Q.R. : %s\n", drive->ven_features & YMH_AMQR ? "YES" : "---"); // printf("ForceSpeed : %s\n", drive->ven_features & YMH_FORCESPEED ? "YES" : "---"); printf("DiscT@2 : %s\n", drive->ven_features & YMH_TATTOO ? "YES" : "---"); } if (flags & FL_CURRENT) { printf("\n** Current drive settings:\n"); } if ((flags & (FL_CURRENT | FL_TATTOO | FL_TATTOO_TEST)) && (drive->ven_features & YMH_TATTOO)) { if (drive->yamaha.tattoo_rows) { printf("DiscT@2 info:\ninner: %d\nouter: %d\nimage: 3744x%d\n", drive->yamaha.tattoo_i, drive->yamaha.tattoo_o, drive->yamaha.tattoo_rows); } else { if (drive->media.type & DISC_CD) printf("Can't write DiscT@2 on inserted disc!\n"); else printf("No disc found! Can't get DiscT@2 info!\n"); } } return 0; } #ifdef USE_LIBPNG bool tattoo_read_png(unsigned char *buf, uint32_t rows, FILE *fp) { png_byte header[8]; // 8 is the maximum size that can be checked png_structp png_ptr; png_infop info_ptr; uint32_t number_of_passes; png_bytep png_row_pointer = NULL; unsigned char *raw_row_pointer; // unsigned char *tp = NULL; // int width; uint32_t row, col; int c; int32_t r,g,b; if (fread(header, 1, 8, fp) < 8) { printf("Error reading PNG header\n"); fclose(fp); return 1; } if (png_sig_cmp(header, 0, 8)) { printf("File not recognized as a PNG\n"); fclose(fp); return 1; } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) { printf("png_create_read_struct failed!\n"); fclose(fp); return 1; } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { printf("png_create_info_struct failed!\n"); fclose(fp); return 1; } if (setjmp(png_jmpbuf(png_ptr))) { printf("png_jmpbuf failed!\n"); fclose(fp); return 1; } png_init_io(png_ptr, fp); png_set_sig_bytes(png_ptr, 8); png_read_info(png_ptr, info_ptr); printf("Image size: %ld x %ld\n", info_ptr->width, info_ptr->height); if (info_ptr->width != 3744U || info_ptr->height != rows ) { printf("Image should be 3744 x %d", rows); return 1; } // width = info_ptr->width; // height = info_ptr->height; // bit_depth = info_ptr->bit_depth; number_of_passes = png_set_interlace_handling(png_ptr); png_read_update_info(png_ptr, info_ptr); printf("Color type: [%d] ", info_ptr->color_type); switch (info_ptr->color_type) { case PNG_COLOR_TYPE_GRAY: printf("PNG_COLOR_TYPE_GRAY\n"); break; case PNG_COLOR_TYPE_PALETTE: printf("PNG_COLOR_TYPE_PALETTE\n"); if (!(info_ptr->valid & PNG_INFO_PLTE)) { printf("PNG color type is indexed, but no palette found!"); goto err_read_png; } break; case PNG_COLOR_TYPE_RGB: printf("PNG_COLOR_TYPE_RGB\n"); break; case PNG_COLOR_TYPE_RGB_ALPHA: printf("PNG_COLOR_TYPE_RGB_ALPHA\n"); break; case PNG_COLOR_TYPE_GRAY_ALPHA: printf("PNG_COLOR_TYPE_GRAY_ALPHA\n"); break; default: printf("unlnown PNG color type!\n"); goto err_read_png; } printf("Bit depth : %d\n", info_ptr->bit_depth); if (info_ptr->bit_depth != 8) { printf("Unsupported bit depth!\n"); goto err_read_png; } if (info_ptr->valid & PNG_INFO_PLTE) { printf("Palette : %d colors\n", info_ptr->num_palette); } else { printf("Palette : NO\n"); } printf("ROW bytes : %ld\n", info_ptr->rowbytes); raw_row_pointer = buf; png_row_pointer = (png_byte*) malloc(info_ptr->rowbytes); for (row=0; rowwidth < 3744U) memset(raw_row_pointer, 0, 3744); switch (info_ptr->color_type) { case PNG_COLOR_TYPE_GRAY: for (col=0; colwidth; col++) { raw_row_pointer[col] = png_row_pointer[col] ^ 0xFF; // memcpy(raw_row_pointer, png_row_pointer, 3744); } break; case PNG_COLOR_TYPE_PALETTE: for (col=0; colwidth; col++) { c = png_row_pointer[col]; r = info_ptr->palette[c].red; g = info_ptr->palette[c].green; b = info_ptr->palette[c].blue; c = (r*11 + g*16 + b*5) / 32; raw_row_pointer[col] = c ^ 0xFF; } break; case PNG_COLOR_TYPE_RGB: for (col=0; colwidth; col++) { r = png_row_pointer[col*3]; g = png_row_pointer[col*3+1]; b = png_row_pointer[col*3+2]; c = (r*11 + g*16 + b*5) / 32; raw_row_pointer[col] = c ^ 0xFF; } break; case PNG_COLOR_TYPE_RGB_ALPHA: for (col=0; colwidth; col++) { r = png_row_pointer[col*4]; g = png_row_pointer[col*4+1]; b = png_row_pointer[col*4+2]; c = (r*11 + g*16 + b*5) / 32; raw_row_pointer[col] = c ^ 0xFF; } break; case PNG_COLOR_TYPE_GRAY_ALPHA: for (col=0; colwidth; col++) { raw_row_pointer[col] = png_row_pointer[col*2] ^ 0xFF; } break; } raw_row_pointer += 3744; } // if (tp) free(tp); if (png_row_pointer) free(png_row_pointer); return 1; err_read_png: // if (tp) free(tp); if (png_row_pointer) free(png_row_pointer); return 0; } #endif void usage(char* bin) { fprintf (stderr,"\nusage: %s [-d device] [optinos]\n",bin); #ifdef USE_LIBPNG printf("PNG support: YES\n"); #else printf("PNG support: NO\n"); #endif printf("\t-l, --scanbus list drives (scan IDE/SCSI bus)\n"); printf("\t-h, --help show help\n"); printf("\t-c, --current show current drive settings\n"); printf("\t-s, --supported show features supported by drive\n"); printf("\t--tattoo-raw burn selected RAW image as DiscT@2\n"); printf("\t--tattoo-png burn selected PNG image as DiscT@2\n"); #ifdef USE_LIBPNG printf("\t WARNING: f1tattoo compiled without libpng\n"); #endif printf("\t--tattoo-test burn tattoo test image\n"); printf("\t-v, --verbose be verbose\n"); } int main(int argc, char* argv[]) { int i; int drvcnt=0; char *device = NULL; char *tattoofn = NULL; unsigned char *tattoobuf = NULL; FILE *tattoof; drive_info* drive; bool fr=0; printf("** DiscT@2 writer for Yamaha CRW-F1 v%s (c) 2005-2006,2009 Gennady \"ShultZ\" Kozlov **\n", VERSION); for (i=1; i(i+1)) { i++; flags |= FL_DEVICE; device = argv[i]; } else { printf("Option %s needs parameter\n",argv[i]); exit (1); } } else if (!strcmp(argv[i],"-h")) flags |= FL_HELP; else if(!strcmp(argv[i],"--help")) flags |= FL_HELP; else if(!strcmp(argv[i],"-c")) flags |= FL_CURRENT; else if(!strcmp(argv[i],"--current")) flags |= FL_CURRENT; else if(!strcmp(argv[i],"-l")) flags |= FL_SCAN; else if(!strcmp(argv[i],"--scanbus")) flags |= FL_SCAN; else if(!strcmp(argv[i],"-s")) flags |= FL_SUPPORTED; else if(!strcmp(argv[i],"--supported")) flags |= FL_SUPPORTED; else if(!strcmp(argv[i],"-v")) flags |= FL_VERBOSE; else if(!strcmp(argv[i],"--verbose")) flags |= FL_VERBOSE; else if(!strcmp(argv[i],"--tattoo-test")) flags |= FL_TATTOO_TEST; else if(!strcmp(argv[i],"--tattoo-raw")) { flags |= FL_TATTOO_RAW; if (argc>(i+1)) { i++; tattoofn = argv[i]; } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--tattoo-png")) { #ifdef USE_LIBPNG flags |= FL_TATTOO_PNG; if (argc>(i+1)) { i++; tattoofn = argv[i]; } else { printf("option %s needs parameter!\n", argv[i]); return 5; } #else printf("Can't use PNG as input file: compiled without libpng"); #endif } else { printf("Illegal option: %s.\nUse -h for details\n",argv[i]); return 6; } } if (flags & FL_HELP) { usage(argv[0]); return 0; } if (!flags) { usage(argv[0]); return 1; } if (flags & FL_SCAN) { drvcnt = scanbus(DEV_YAMAHA); if (!drvcnt) printf("ERR: no drives found!\n"); return 2; } if (!(flags & FL_DEVICE)) { printf("** ERR: no device selected\n"); return 3; } // printf("____________________________\n"); printf("Device : %s\n", device); drive = new drive_info(device); if (drive->err) { printf("%s: device open error!\n", argv[0]); delete drive; return 4; } inquiry(drive); // convert_to_ID(drive); printf("Vendor : '%s'\n",drive->ven); printf("Model : '%s'\n",drive->dev); printf("F/W : '%s'\n",drive->fw); if (!(flags & FL_VERBOSE)) drive->silent++; if (get_drive_serial_number(drive)) printf("Serial#: %s\n",drive->serial); if (flags) { // if (flags & FL_VERBOSE) { printf("\nf1tattoo flags : "); if (flags & FL_DEVICE) printf(" DEVICE"); if (flags & FL_HELP) printf(" HELP"); if (flags & FL_CURRENT) printf(" CURRENT"); if (flags & FL_SCAN) printf(" SCAN"); if (flags & FL_VERBOSE) printf(" VERBOSE"); if (flags & FL_SUPPORTED) printf(" SUPPORTED"); if (flags & FL_TATTOO) printf(" TATTOO"); if (flags & FL_TATTOO_TEST) printf(" TATTOO_TEST"); printf("\n\n"); } get_device_info(drive); // printf("____________________________\n"); if (flags & FL_TATTOO) { if (!(drive->ven_features & YMH_TATTOO)) { printf("Selected device doesn't have DiscT@2 feature!\n"); delete drive; return 1; } if (flags & FL_TATTOO_TEST) { printf("%s: writing T@2 test image...\n", device); yamaha_f1_do_tattoo(drive, NULL, 0); } else { tattoof = fopen(tattoofn, "r"); if (!tattoof) { printf("Can't open tattoo file: %s", tattoofn); } else { printf("Reading tattoo file...\n"); tattoobuf = (unsigned char*) malloc (drive->yamaha.tattoo_rows * 3744); #ifdef USE_LIBPNG if (flags & FL_TATTOO_PNG) { fr = tattoo_read_png(tattoobuf, drive->yamaha.tattoo_rows, tattoof); } else { #endif memset(tattoobuf, 0, drive->yamaha.tattoo_rows * 3744); fr = (fread((void*)tattoobuf, 3744, drive->yamaha.tattoo_rows, tattoof) > 0); #ifdef USE_LIBPNG } #endif fclose(tattoof); if (fr) { yamaha_f1_do_tattoo(drive, tattoobuf, fr * 3744); } else { printf("Error reading T@2 image!\n"); } free(tattoobuf); } } } if (!(flags & FL_VERBOSE)) drive->silent--; delete drive; return 0; } qpxtool-0.7.1_002/console/f1tattoo/version.h0000644000175000001440000000071211334020356020114 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #define VERSION "0.7.1" qpxtool-0.7.1_002/console/cdvdcontrol/0000755000175000001440000000000011352127612017041 5ustar shultzusersqpxtool-0.7.1_002/console/cdvdcontrol/Makefile0000644000175000001440000000103311322563123020474 0ustar shultzusersSRCS = $(patsubst %,%.cpp, cdvdcontrol) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) BIN = cdvdcontrol$(BINSUFF) CXXFLAGS += -I. -I../../lib/include CFLAGS += -I. -I../../lib/include LDLIBS += -L../../lib/lib -lqpxtransport -lqpxplextor -lqpxyamaha -lqpxpioneer $(BIN): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) all:$(BIN) clean: rm -f $(BIN) $(OBJS) *~ install: mkdir -p $(DESTDIR)$(BINDIR) install -m 4755 $(BIN) $(DESTDIR)$(BINDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/$(BIN) .PHONY: all clean install uninstall qpxtool-0.7.1_002/console/cdvdcontrol/cdvdcontrol.cpp0000644000175000001440000013270611334222764022103 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * * Some Plextor commands got from PxScan and CDVDlib (C) Alexander Noe` * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include #include const uint32_t FL_HELP = 0x00000001; const uint32_t FL_SCAN = 0x00000002; const uint32_t FL_DEVICE = 0x00000004; const uint32_t FL_CURRENT = 0x00000008; const uint32_t FL_SUPPORTED = 0x00000010; const uint32_t FL_LOCK = 0x00000020; const uint32_t FL_POWEREC = 0x00000040; const uint32_t FL_GIGAREC = 0x00000080; const uint32_t FL_VARIREC_CD = 0x00000100; const uint32_t FL_VARIREC_CD_OFF = 0x00000200; const uint32_t FL_VARIREC_DVD = 0x00000400; const uint32_t FL_VARIREC_DVD_OFF = 0x00000800; const uint32_t FL_HCDR = 0x00001000; const uint32_t FL_SSS = 0x00002000; const uint32_t FL_SPDREAD = 0x00004000; const uint32_t FL_BOOK_R = 0x00008000; const uint32_t FL_BOOK_RDL = 0x00010000; const uint32_t FL_TESTWRITE = 0x00020000; const uint32_t FL_SILENT = 0x00040000; const uint32_t FL_AS = 0x00080000; const uint32_t FL_PXERASER = 0x00100000; const uint32_t FL_SECUREC = 0x00200000; const uint32_t FL_NOSECUREC = 0x00400000; const uint32_t FL_VERBOSE = 0x00800000; const uint32_t FL_YMH_AMQR = 0x01000000; const uint32_t FL_YMH_FORCESPEED = 0x02000000; const uint32_t FL_MQCK = 0x04000000; const uint32_t FL_PIOLIMIT = 0x08000000; const uint32_t FL_PIOQUIET = 0x10000000; const uint32_t FL_LOEJ = 0x20000000; const uint32_t FLAS_RETR = 0x00000001; const uint32_t FLAS_STOR = 0x00000002; const uint32_t FLAS_CREATE = 0x00000004; const uint32_t FLAS_DEL = 0x00000008; const uint32_t FLAS_VIEW = 0x00000010; const uint32_t FLAS_ACT = 0x00000020; const uint32_t FLAS_DEACT = 0x00000040; const uint32_t FLAS_CLEAR = 0x00000080; uint32_t flags = 0; uint32_t flags_as = 0; int get_device_info(drive_info* dev) { dev->ven_features=0; dev->chk_features=0; detect_capabilities(dev); // detect_check_capabilities(dev); determine_disc_type(dev); if ( !isPlextor(dev) && !isYamaha(dev) && !isPioneer(dev)) { printf ("%s: drive not supported, only common controls will work!\n", dev->device); // return 1; } if ( isPlextor(dev) ) { plextor_get_life(dev); if (dev->life.ok) { printf("Discs loaded: %6d\n", dev->life.dn); printf("Drive operating time:\n"); printf(" CD Rd : %4d:%02d:%02d\n", dev->life.cr.h, dev->life.cr.m, dev->life.cr.s); printf(" CD Wr : %4d:%02d:%02d\n", dev->life.cw.h, dev->life.cw.m, dev->life.cw.s); if (dev->rd_capabilities & DEVICE_DVD) printf(" DVD Rd : %4d:%02d:%02d\n", dev->life.dr.h, dev->life.dr.m, dev->life.dr.s); if (dev->wr_capabilities & DEVICE_DVD) printf(" DVD Wr : %4d:%02d:%02d\n", dev->life.dw.h, dev->life.dw.m, dev->life.dw.s); } // if ( isPlextorLockPresent(dev) ) plextor_px755_do_auth(dev); if (!plextor_get_hidecdr_singlesession(dev)) dev->ven_features|=PX_HCDRSS; if (!plextor_get_speedread(dev)) dev->ven_features|=PX_SPDREAD; if (dev->wr_capabilities) { // if (!yamaha_check_amqr(dev)) dev->ven_features|=YMH_AMQR; if (!plextor_get_powerec(dev)) { dev->ven_features|=PX_POWEREC; // plextor_get_speeds(dev); } if (!plextor_get_gigarec(dev)) dev->ven_features|=PX_GIGAREC; if (!plextor_get_varirec(dev, VARIREC_CD)) dev->ven_features|=PX_VARIREC_CD; // if (!plextor_get_securec(dev)) dev->ven_features|=PX_SECUREC; if (!plextor_get_silentmode(dev)) dev->ven_features|=PX_SILENT; if (!plextor_get_securec_state(dev)) dev->ven_features|=PX_SECUREC; } if (dev->wr_capabilities & DEVICE_DVD) { if (!plextor_get_varirec(dev, VARIREC_DVD)) dev->ven_features|=PX_VARIREC_DVD; if (!plextor_get_bitset(dev, PLEX_BITSET_R)) dev->ven_features|=PX_BITSET_R; if (!plextor_get_bitset(dev, PLEX_BITSET_RDL)) dev->ven_features|=PX_BITSET_RDL; if (!plextor_get_autostrategy(dev)) dev->ven_features|=PX_ASTRATEGY; if (!plextor_get_testwrite_dvdplus(dev)) dev->ven_features|=PX_SIMUL_PLUS; } #warning "PlexEraser DETECTION. Just assume PX755/760 and Premium-II" // if ((dev->dev_ID == PLEXTOR_755) || (dev->dev_ID == PLEXTOR_760) || (dev->dev_ID == PLEXTOR_PREMIUM2)) if ( isPlextorLockPresent(dev) ) dev->ven_features|=PX_ERASER; if (!yamaha_check_amqr(dev)) dev->ven_features|=YMH_AMQR; } else if ( isYamaha(dev) ) { if (!yamaha_check_amqr(dev)) dev->ven_features|=YMH_AMQR; if (!yamaha_check_forcespeed(dev)) dev->ven_features|=YMH_FORCESPEED; if (!yamaha_f1_get_tattoo(dev)) dev->ven_features|=YMH_TATTOO; } else if ( isPioneer(dev) ) { if (!pioneer_get_quiet(dev)) dev->ven_features|=PIO_QUIET; } // printf("Trying opcode E9 modes...\n"); // for (int i=0; i<256; i++) {if (!plextor_get_mode(dev,i)) printf(" MODE 0x%02X\n",i);} // printf("Trying opcode ED modes...\n"); // for (int i=0; i<256; i++) {if (!plextor_get_mode2(dev,i)) printf(" MODE 0x%02X\n",i);} if (flags & FL_SUPPORTED) { // printf("____________________________\n"); printf("\n** Supported features:\n"); printf("AudioMaster Q.R. : %s\n", dev->ven_features & YMH_AMQR ? "YES" : "-"); printf("Yamaha ForceSpeed : %s\n", dev->ven_features & YMH_FORCESPEED ? "YES" : "-"); printf("Yamaha DiscT@2 : %s\n", dev->ven_features & YMH_TATTOO ? "YES" : "-"); printf("Hide CD-R : %s\n", dev->ven_features & PX_HCDRSS ? "YES" : "-"); printf("SingleSession : %s\n", dev->ven_features & PX_HCDRSS ? "YES" : "-"); printf("SpeedRead : %s\n", dev->ven_features & PX_SPDREAD ? "YES" : "-"); printf("PoweRec : %s\n", dev->ven_features & PX_POWEREC ? "YES" : "-"); printf("GigaRec : %s\n", dev->ven_features & PX_GIGAREC ? "YES" : "-"); printf("VariRec CD : %s\n", dev->ven_features & PX_VARIREC_CD ? "YES" : "-"); printf("VariRec DVD : %s\n", dev->ven_features & PX_VARIREC_DVD ? "YES" : "-"); printf("SecuRec : %s\n", dev->ven_features & PX_SECUREC ? "YES" : "-"); printf("Silent mode : %s\n", dev->ven_features & PX_SILENT ? "YES" : "-"); printf("DVD+R bitsetting : %s\n", dev->ven_features & PX_BITSET_R ? "YES" : "-"); printf("DVD+R DL bitsetting : %s\n", dev->ven_features & PX_BITSET_RDL ? "YES" : "-"); printf("DVD+R(W) testwrite : %s\n", dev->ven_features & PX_SIMUL_PLUS ? "YES" : "-"); printf("AutoStrategy : %s%s\n", dev->ven_features & PX_ASTRATEGY ? "YES" : "-", (dev->ven_features & PX_ASTRATEGY) && (dev->dev_ID & (PLEXTOR_755 | PLEXTOR_760)) ? " (EXTENDED)" : ""); printf("PlexEraser : %s\n", dev->ven_features & PX_ERASER ? "YES" : "-"); printf("Pioneer QuietMode : %s\n", dev->ven_features & PIO_QUIET ? "YES" : "-"); } // get_media_info(dev); // if (dev->rd_capabilities & DEVICE_DVD) { if (flags & FL_CURRENT) { // printf("____________________________\n"); printf("\n** Current drive settings:\n"); } if ((dev->capabilities & CAP_LOCK) && (flags & FL_CURRENT)) { get_lock(dev); printf("Lock state : %s\n", (dev->parms.status & STATUS_LOCK) ? "ON":"OFF"); } // if ((dev->ven_features & YMH_AMQR) && ((flags & FL_CURRENT) || (flags & FL_YMH_AMQR))) // printf("AudioMaster Q.R. : %s\n", dev->yamaha.amqr ? "ON":"OFF"); // if ((dev->ven_features & YMH_FORCESPEED) && ((flags & FL_CURRENT) || (flags & FL_YMH_FORCESPEED))) // printf("Yamaha ForceSpeed : %s\n", dev->yamaha.forcespeed ? "ON":"OFF"); if ((dev->ven_features & YMH_TATTOO) && (flags & FL_CURRENT)) { if (dev->yamaha.tattoo_rows) { printf("Yamaha DiscT@2 : inner %d outer %d image 3744 x %d\n", dev->yamaha.tattoo_i, dev->yamaha.tattoo_o, dev->yamaha.tattoo_rows); } else { if (dev->media.type & DISC_CD) printf("DiscT@2: Can't write T@2 on inserted disc! No space left?\n"); else printf("DiscT@2: No disc found! Can't get T@2 info!\n"); } } if ((dev->ven_features & PX_HCDRSS) && ((flags & FL_CURRENT) || (flags & FL_HCDR))) printf("Hide-CDR state : %s\n", dev->plextor.hcdr ? "ON":"OFF"); if ((dev->ven_features & PX_HCDRSS) && ((flags & FL_CURRENT) || (flags & FL_SSS))) printf("SingleSession state : %s\n", dev->plextor.sss ? "ON":"OFF"); if ((dev->ven_features & PX_SPDREAD) && ((flags & FL_CURRENT) || (flags & FL_SPDREAD))) printf("SpeedRead state : %s\n", dev->plextor.spdread ? "ON":"OFF"); if ((dev->ven_features & PX_POWEREC) && ((flags & FL_CURRENT) || (flags & FL_POWEREC))) { printf("PoweRec state : %s\n", dev->plextor.powerec_state ? "ON":"OFF"); if (dev->media.type & DISC_CD) printf(" PoweRec Speed : %dX (CD)\n",dev->plextor.powerec_spd / 176); if (dev->media.type & DISC_DVD) printf(" PoweRec Speed : %dX (DVD)\n",dev->plextor.powerec_spd / 1385); // show_powerec_speed(); } if ((dev->ven_features & PX_GIGAREC) && ((flags & FL_CURRENT) || (flags & FL_GIGAREC))) print_gigarec_value(dev); if ((dev->ven_features & PX_VARIREC_CD) && ((flags & FL_CURRENT) || (flags & FL_VARIREC_CD))) { printf("VariRec CD state : %s\n", dev->plextor.varirec_state_cd ? "ON":"OFF"); if (dev->plextor.varirec_state_cd) print_varirec(dev, VARIREC_CD); } if ((dev->ven_features & PX_VARIREC_DVD) && ((flags & FL_CURRENT) || (flags & FL_VARIREC_DVD))) { printf("VariRec DVD state : %s\n", dev->plextor.varirec_state_dvd ? "ON":"OFF"); if (dev->plextor.varirec_state_dvd) print_varirec(dev, VARIREC_DVD); } if ((dev->ven_features & PX_SECUREC) && ((flags & FL_CURRENT) || (flags & FL_SECUREC))) printf("SecuRec state : %s\n", dev->plextor.securec ? "ON":"OFF"); if ((dev->ven_features & PX_SILENT) && ((flags & FL_CURRENT) || (flags & FL_SILENT))) { printf("Silent mode : %s\n",dev->plextor_silent.state ? "ON":"OFF"); if (dev->plextor_silent.state) plextor_print_silentmode_state(dev); } if ((dev->ven_features & PX_BITSET_R) && ((flags & FL_CURRENT) || (flags & FL_BOOK_R))) printf("DVD+R bitsetting : %s\n", dev->book_plus_r ? "ON":"OFF"); if ((dev->ven_features & PX_BITSET_RDL) && ((flags & FL_CURRENT) || (flags & FL_BOOK_RDL))) printf("DVD+R DL bitsetting : %s\n", dev->book_plus_rdl ? "ON":"OFF"); if ((dev->ven_features & PX_SIMUL_PLUS) && ((flags & FL_CURRENT) || (flags & FL_TESTWRITE))) printf("DVD+R(W) testwrite : %s\n", dev->plextor.testwrite_dvdplus ? "ON":"OFF"); if ((dev->ven_features & PX_ASTRATEGY) && ((flags & FL_CURRENT) || (flags & FL_AS))) plextor_print_autostrategy_state(dev); if (dev->ven_features & PX_ERASER) printf("PlexEraser : supported\n"); if ((dev->ven_features & PIO_QUIET) && ((flags & FL_CURRENT) || (flags & FL_PIOQUIET))) printf("QuietMode setting : %s\n", pioneer_silent_tbl[(int)dev->pioneer.silent]); if ((dev->ven_features & PIO_QUIET) && ((flags & FL_CURRENT) || (flags & FL_PIOLIMIT))) printf("Speed Limit : %s\n", dev->pioneer.limit ? "ON" : "OFF" ); return 0; } void usage(char* bin) { fprintf (stderr,"\nusage: %s [-d device] [options]\n",bin); printf("Common options:\n"); printf("\t-l, --scanbus list drives (scan IDE/SCSI bus)\n"); printf("\t-h, --help show help\n"); printf("\t-v, --verbose be verbose\n"); printf("\t-c, --current show current drive settings\n"); printf("\t-s, --supported show supported features\n"); printf("\t--[un]lock lock/unlock disc in drive\n"); printf("\t--lockt toggle media lock state\n"); printf("\t--eject eject media\n"); printf("\t--load load media (only for tray devices)\n"); printf("\t--loej load/eject media (toggle tray state)\n"); printf("\t--loej-immed don't wait for media is loaded or ejected\n"); printf("\noptions for Plextor devices:\n"); printf("\t--spdread [on|off] turn SpeedRead on/off (default: off)\n"); printf("\t--sss [on|off] turn SingleSession on/off (default: off)\n"); printf("\t--hcdr [on|off] turn Hide-CDR on/off (default: off)\n"); printf("\t--powerec [on|off] turn PoweREC on/off (default: on)\n"); // printf("\t--amqr [on|off] turn Yamaha AMQR on/off (default: off)\n"); // printf("\t--forcespeed [on|off] turn Yamaha ForceSpeed on/off (default: off)\n"); printf("\t--gigarec set GigaREC rate or turn it off\n"); printf("\t values: 0.6, 0.7, 0.8, 0.9, 1.1, 1.2, 1.3, 1.4, off\n"); printf("\t--varirec-cd set VariREC power for CD or turn VariREC off\n"); printf("\t values: +4, +3, +2, +1, 0, -1, -2, -3, -4, off\n"); printf("\t--varirec-cd-strategy set VariREC strategy for CD\n"); printf("\t values: default, azo, cya, pha, phb, phc, phd\n"); printf("\t--varirec-dvd set VariREC power for DVD or turn VariREC off\n"); printf("\t values: +4, +3, +2, +1, 0, -1, -2, -3, -4, off\n"); printf("\t--varirec-dvd-strategy set VariREC strategy for DVD\n"); printf("\t values: default, 0, 1, 2, 3, 4, 5, 6, 7\n"); printf("\t--securec set SecuREC password and turn it on\n"); printf("\t passwd must be 4..10 characters length\n"); printf("\t--nosecurec turn SecuRec off\n"); printf("\t--bitset+r [on|off] turn on/off setting DVD-ROM book on DVD+R media\n"); printf("\t--bitset+rdl [on|off] turn on/off setting DVD-ROM book on DVD+R DL media\n"); printf("\t--mqck run MediaQuality Check\n"); printf("\t--mqck-speed # set MQCK speed (default: maximum)\n"); printf("\t--as-mode AS: select AutoStrategy mode: forced,auto,on,off,\n"); printf("\t--as-list AS: view strategies list\n"); printf("\t--as-on # AS: activate strategy #\n"); printf("\t--as-off # AS: deactivate strategy #\n"); printf("\t--as-del # AS: delete strategy #\n"); printf("\t--as-create AS: create new strategy for inserted DVD media (PX-755/PX-760 only)\n"); printf("\t mode: q = quick, f = full\n"); printf("\t action: a = add, r = replace\n"); printf("\t--as-save AS: save Strategies / EXPERIMENTAL /\n"); printf("\t--as-load AS: load Strategy from file / EXPERIMENTAL /\n"); printf("\t--as-clear AS: remove ALL strategies from database\n"); printf("\t--dvd+testwrite [on|off] turn on/off testwrite on DVD+R(W) media\n"); printf("\t--silent [on|off] just turn Silent Mode on/off (default: on)\n"); printf("\t--sm-nosave don't save Silent Mode settings\n"); printf("\t--sm-cd-rd # set max CD READ speed (default: 32X)\n"); printf("\t values: 4, 8, 24, 32, 40, 48\n"); printf("\t--sm-cd-wr # set max CD WRITE speed (default: 32X)\n"); printf("\t values: 4, 8, 16, 24, 32, 48\n"); printf("\t--sm-dvd-rd # set max DVD READ speed (default: 12X)\n"); printf("\t values: 2, 5, 8, 12, 16\n"); // printf("\t--sm-dvd-wr # set max DVD WRITE speed (default: 8X)\n"); // printf("\t values: 4, 6, 8, 12, 16\n"); printf("\t--sm-load # set tray load speed. spd can be 0 to 80 (default: 63)\n"); printf("\t--sm-eject # set tray eject speed. spd can be 0 to 80 (default: 0)\n"); printf("\t--sm-access set access time, has effect only with CD/DVD speed setting\n"); printf("\t--destruct perform PlexEraser function\n"); printf("\t WARNING! data on inserted CD-R/DVD-R will be lost!\n"); printf("\t works on PX-755/PX-760/Premium2 only\n"); printf("\noptions for Pioneer devices:\n"); printf("\t--pio-limit [on|off] limit (or not) read speed by 24x for CD and 8x for DVD\n"); printf("\t--pio-quiet [quiet|perf|std] select QuietMode setting: Quiet, Performance or Standard (default: quiet)\n"); printf("\t--pio-nosave don't save settings to drive (changes will be lost after reboot)\n"); } int main (int argc, char* argv[]) { int i; int drvcnt=0; char* device=NULL; drive_info* dev=NULL; char aslfn[2048]; char assfn[2048]; // char asfn2[1032]; FILE* asf; // FILE* asf2; int powerec = 1; int gigarec = GIGAREC_10; int varirec_cd_pwr = VARIREC_NULL; int varirec_cd_str = 0; int varirec_dvd_pwr = VARIREC_NULL; int varirec_dvd_str = 0; int hcdr = 1; int sss = 1; int spdread = 1; int bookr = 1; int bookrdl = 1; int testwrite = 1; int as_mqck = -1; int as_mqck_spd = -1; int as = AS_AUTO; int ascre = ASDB_CRE_QUICK; int as_idx_act = 0; int as_idx_deact = 0; int as_idx_del = 0; int silent = 1; int silent_load = 63; int silent_eject = 0; int silent_access = SILENT_ACCESS_FAST; int silent_cd_rd = SILENT_CD_RD_32X; int silent_cd_wr = SILENT_CD_WR_32X; int silent_dvd_rd = SILENT_DVD_RD_12X; // int silent_dvd_wr = SILENT_DVD_WR_8X; int silent_cd = 0; int silent_dvd = 0; int silent_tray = 0; int silent_save = 1; int pxeraser = 0; int amqr = 0; int forcespeed = 0; char passwd[256]; char piosilent = PIO_SILENT_QUIET; bool piolimit = 1; int eject = 2; int lock = 2; bool loej_immed = 0; printf("** CDVD Control v%s (c) 2005-2009 Gennady \"ShultZ\" Kozlov\n", VERSION); // printf("Parsing commandline options (%d args)...\n",argc-1); for (i=1; i(i+1)) { i++; flags |= FL_DEVICE; device = argv[i]; } else { printf("Option %s needs parameter\n",argv[i]); exit (1); } } else if(!strcmp(argv[i],"-h")) flags |= FL_HELP; else if(!strcmp(argv[i],"--help")) flags |= FL_HELP; else if(!strcmp(argv[i],"-c")) flags |= FL_CURRENT; else if(!strcmp(argv[i],"--current")) flags |= FL_CURRENT; else if(!strcmp(argv[i],"-s")) flags |= FL_SUPPORTED; else if(!strcmp(argv[i],"--supported")) flags |= FL_SUPPORTED; else if(!strcmp(argv[i],"-l")) flags |= FL_SCAN; else if(!strcmp(argv[i],"--scanbus")) flags |= FL_SCAN; // ************ Lock else if(!strcmp(argv[i],"--unlock")) { if ( !(flags & FL_LOCK)) { flags |= FL_LOCK; lock=0; } else { printf("Conflicting/duplicated lock/unlock option!\n"); } } else if(!strcmp(argv[i],"--lock")) { if ( !(flags & FL_LOCK)) { flags |= FL_LOCK; lock=1; } else { printf("Conflicting/duplicated lock/unlock option!\n"); } } else if(!strcmp(argv[i],"--lockt")) { if ( !(flags & FL_LOCK)) { flags |= FL_LOCK; lock=2; } else { printf("Conflicting/duplicated lock/unlock option!\n"); } } else if(!strcmp(argv[i],"--load")) { if ( !(flags & FL_LOEJ)) { flags |= FL_LOEJ; eject=0; } else { printf("Conflicting/duplicated load/eject option!\n"); } } else if(!strcmp(argv[i],"--eject")) { if ( !(flags & FL_LOEJ)) { flags |= FL_LOEJ; eject=1; } else { printf("Conflicting/duplicated load/eject option!\n"); } } else if(!strcmp(argv[i],"--loej")) { if ( !(flags & FL_LOEJ)) { flags |= FL_LOEJ; eject=2; } else { printf("Conflicting/duplicated load/eject option!\n"); } } else if(!strcmp(argv[i],"--loej-immed")) { loej_immed = true; } else if(!strcmp(argv[i],"--spdread")) { flags |= FL_SPDREAD; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) spdread = 0; else if (!strcmp(argv[i],"on")) spdread = 1; else { printf("Illegal argument for SpeedRead: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--sss")) { flags |= FL_SSS; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) sss = 0; else if (!strcmp(argv[i],"on")) sss = 1; else { printf("Illegal argument for SingleSession: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--hcdr")) { flags |= FL_HCDR; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) hcdr = 0; else if (!strcmp(argv[i],"on")) hcdr = 1; else { printf("Illegal argument for Hide-CDR: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } // ************ PoweREC else if(!strcmp(argv[i],"--powerec")) { flags |= FL_POWEREC; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) powerec = 0; else if (!strcmp(argv[i],"on")) powerec = 1; else { printf("Illegal argument for PoweRec: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } // ************ GigaREC else if(!strcmp(argv[i],"--gigarec")) { if (argc>(i+1)) { i++; flags |= FL_GIGAREC; if (!strcmp(argv[i],"0.6")) gigarec = GIGAREC_06; else if (!strcmp(argv[i],"0.7")) gigarec = GIGAREC_07; else if (!strcmp(argv[i],"0.8")) gigarec = GIGAREC_08; else if (!strcmp(argv[i],"0.9")) gigarec = GIGAREC_09; else if (!strcmp(argv[i],"1.0")) gigarec = GIGAREC_10; else if (!strcmp(argv[i],"off")) gigarec = GIGAREC_10; else if (!strcmp(argv[i],"1.1")) gigarec = GIGAREC_11; else if (!strcmp(argv[i],"1.2")) gigarec = GIGAREC_12; else if (!strcmp(argv[i],"1.3")) gigarec = GIGAREC_13; else if (!strcmp(argv[i],"1.4")) gigarec = GIGAREC_14; else { printf("Illegal GigaREC value: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } // ************ VariREC CD else if(!strcmp(argv[i],"--varirec-cd")) { if (argc>(i+1)) { i++; flags |= FL_VARIREC_CD; int val = 0; if (!strcmp(argv[i],"off")) flags |= FL_VARIREC_CD_OFF; else { val = strtol(argv[i], NULL, 0); if (errno || val<-4 || val>4) { printf("Illegal VariREC CD power value: %s\n", argv[i]); return 5; } else switch(val) { case -4: varirec_cd_pwr = VARIREC_MINUS_4; break; case -3: varirec_cd_pwr = VARIREC_MINUS_3; break; case -2: varirec_cd_pwr = VARIREC_MINUS_2; break; case -1: varirec_cd_pwr = VARIREC_MINUS_1; break; case 0: varirec_cd_pwr = VARIREC_NULL; break; case 1: varirec_cd_pwr = VARIREC_PLUS_1; break; case 2: varirec_cd_pwr = VARIREC_PLUS_2; break; case 3: varirec_cd_pwr = VARIREC_PLUS_3; break; case 4: varirec_cd_pwr = VARIREC_PLUS_4; break; } } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--varirec-cd-strategy")) { if (argc>(i+1)) { i++; int val = atol(argv[i]); if (!errno && val>=-1 && val<6) { varirec_cd_str = val+1; } else if (!strcmp(argv[i],"default")) varirec_cd_str = 0; else if (!strcmp(argv[i],"azo")) varirec_cd_str = 1; else if (!strcmp(argv[i],"cya")) varirec_cd_str = 2; else if (!strcmp(argv[i],"pha")) varirec_cd_str = 3; else if (!strcmp(argv[i],"phb")) varirec_cd_str = 4; else if (!strcmp(argv[i],"phc")) varirec_cd_str = 5; else if (!strcmp(argv[i],"phd")) varirec_cd_str = 6; else { printf("Illegal VariREC CD strategy: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } // ************ VariREC DVD else if(!strcmp(argv[i],"--varirec-dvd")) { if (argc>(i+1)) { i++; flags |= FL_VARIREC_DVD; int val = 0; if (!strcmp(argv[i],"off")) flags |= FL_VARIREC_DVD_OFF; else { val = strtol(argv[i], NULL, 0); if (errno || val<-4 || val>4) { printf("Illegal VariREC DVD power value: %s\n", argv[i]); return 5; } else switch(val) { case -4: varirec_dvd_pwr = VARIREC_MINUS_4; break; case -3: varirec_dvd_pwr = VARIREC_MINUS_3; break; case -2: varirec_dvd_pwr = VARIREC_MINUS_2; break; case -1: varirec_dvd_pwr = VARIREC_MINUS_1; break; case 0: varirec_dvd_pwr = VARIREC_NULL; break; case 1: varirec_dvd_pwr = VARIREC_PLUS_1; break; case 2: varirec_dvd_pwr = VARIREC_PLUS_2; break; case 3: varirec_dvd_pwr = VARIREC_PLUS_3; break; case 4: varirec_dvd_pwr = VARIREC_PLUS_4; break; } } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--varirec-dvd-strategy")) { if (argc>(i+1)) { i++; int val = atol(argv[i]); if (!errno && val>=-1 && val<8) { varirec_dvd_str = val+1; } else if (!strcmp(argv[i],"default")) varirec_dvd_str = 0; else { printf("Illegal VariREC DVD strategy: %s\n", argv[i]); } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--securec")) { if (argc>(i+1)) { i++; strcpy(passwd,argv[i]); flags |= FL_SECUREC; // printf("SecuRec pass: %s\n", passwd); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--nosecurec")) flags |= FL_NOSECUREC; else if(!strcmp(argv[i],"--bitset+r")) { flags |= FL_BOOK_R; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) bookr = 0; else if (!strcmp(argv[i],"on")) bookr = 1; } } else if(!strcmp(argv[i],"--bitset+rdl")) { flags |= FL_BOOK_RDL; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) bookrdl = 0; else if (!strcmp(argv[i],"on")) bookrdl = 1; } } else if(!strcmp(argv[i],"--dvd+testwrite")) { flags |= FL_TESTWRITE; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) testwrite = 0; else if (!strcmp(argv[i],"on")) testwrite = 1; } } else if(!strcmp(argv[i],"--mqck")) { flags |= FL_MQCK; if (argc>(i+1)) { i++; as_idx_act = (int)strtol(argv[i], NULL, 0); if (!strcmp(argv[i],"quick")) as_mqck = AS_MEDIACK_QUICK; else if (!strcmp(argv[i],"adv")) as = AS_MEDIACK_ADV; else if (!strcmp(argv[i],"advanced")) as = AS_MEDIACK_ADV; else printf("invalid MQCK mode requested: %s\n", argv[i]); } } else if(!strcmp(argv[i],"--mqck-speed")) { if (argc>(i+1)) { i++; as_mqck_spd = (int)strtol(argv[i], NULL, 0); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--as-mode")) { flags |= FL_AS; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"forced")) as = AS_FORCED; else if (!strcmp(argv[i],"on")) as = AS_ON; else if (!strcmp(argv[i],"auto")) as = AS_AUTO; else if (!strcmp(argv[i],"off")) as = AS_OFF; else printf("invalid AutoStrategy mode requested: %s\n", argv[i]); } } else if(!strcmp(argv[i],"--as-create")) { flags_as |= FLAS_CREATE; ascre = 0; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"q")) ascre |= ASDB_CRE_QUICK; else if (!strcmp(argv[i],"f")) ascre |= ASDB_CRE_FULL; else printf("invalid --as-create parameter 1: '%s'. Only 'q|f' are valid\n", argv[i]); } if (argc>(i+1)) { i++; if (!strcmp(argv[i],"a")) ascre |= ASDB_ADD; else if (!strcmp(argv[i],"r")) ascre |= ASDB_REPLACE; else printf("invalid --as-create parameter 2: '%s'. Only 'a|r' are valid\n", argv[i]); } } else if(!strcmp(argv[i],"--as-list")) { flags_as |= FLAS_VIEW; } else if(!strcmp(argv[i],"--as-clear")) { flags_as |= FLAS_CLEAR; } else if(!strcmp(argv[i],"--as-on")) { flags_as |= FLAS_ACT; if (argc>(i+1)) { i++; as_idx_act = (int)strtol(argv[i], NULL, 0); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--as-off")) { flags_as |= FLAS_DEACT; if (argc>(i+1)) { i++; as_idx_deact = (int)strtol(argv[i], NULL, 0); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--as-del")) { flags_as |= FLAS_DEL; if (argc>(i+1)) { i++; as_idx_del = (int)strtol(argv[i], NULL, 0); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--as-save")) { if (argc>(i+1)) { i++; flags_as |= FLAS_RETR; strcpy(assfn, argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--as-load")) { if (argc>(i+1)) { i++; flags_as |= FLAS_STOR; strcpy(aslfn, argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--silent")) { flags |= FL_SILENT; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) silent = 0; else if (!strcmp(argv[i],"on")) silent = 1; } } else if(!strcmp(argv[i],"--sm-load")) { flags |= FL_SILENT; silent = 1; silent_tray = 1; if (argc>(i+1)) { i++; silent_load = (int)strtol(argv[i], NULL, 0); // printf("tray load speed: %d\n", silent_load); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--sm-eject")) { flags |= FL_SILENT; silent = 1; silent_tray = 1; if (argc>(i+1)) { i++; silent_eject = (int)strtol(argv[i], NULL, 0); // printf("tray load speed: %d\n", silent_load); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--sm-access")) { flags |= FL_SILENT; silent = 1; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"fast")) silent_access = SILENT_ACCESS_FAST; else if (!strcmp(argv[i],"slow")) silent_access = SILENT_ACCESS_SLOW; } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--sm-cd-rd")) { flags |= FL_SILENT; silent = 1; silent_cd = 1; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"48")) silent_cd_rd = SILENT_CD_RD_48X; else if (!strcmp(argv[i],"40")) silent_cd_rd = SILENT_CD_RD_40X; else if (!strcmp(argv[i],"32")) silent_cd_rd = SILENT_CD_RD_32X; else if (!strcmp(argv[i],"24")) silent_cd_rd = SILENT_CD_RD_24X; else if (!strcmp(argv[i], "8")) silent_cd_rd = SILENT_CD_RD_8X; else if (!strcmp(argv[i], "4")) silent_cd_rd = SILENT_CD_RD_4X; else printf("invalid --sm-cd-rd parameter: %s\n", argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--sm-cd-wr")) { flags |= FL_SILENT; silent = 1; silent_cd = 1; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"48")) silent_cd_wr = SILENT_CD_WR_48X; else if (!strcmp(argv[i],"32")) silent_cd_wr = SILENT_CD_WR_32X; else if (!strcmp(argv[i],"24")) silent_cd_wr = SILENT_CD_WR_24X; else if (!strcmp(argv[i],"16")) silent_cd_wr = SILENT_CD_WR_16X; else if (!strcmp(argv[i], "8")) silent_cd_wr = SILENT_CD_WR_8X; else if (!strcmp(argv[i], "4")) silent_cd_wr = SILENT_CD_WR_4X; else printf("invalid --sm-cd-wr parameter: %s\n", argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--sm-dvd-rd")) { flags |= FL_SILENT; silent = 1; silent_dvd = 1; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"16")) silent_dvd_rd = SILENT_DVD_RD_16X; else if (!strcmp(argv[i],"12")) silent_dvd_rd = SILENT_DVD_RD_12X; else if (!strcmp(argv[i], "8")) silent_dvd_rd = SILENT_DVD_RD_8X; else if (!strcmp(argv[i], "5")) silent_dvd_rd = SILENT_DVD_RD_5X; else if (!strcmp(argv[i], "2")) silent_dvd_rd = SILENT_DVD_RD_2X; else printf("invalid --sm-dvd-rd parameter: %s\n", argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } /* else if(!strcmp(argv[i],"--sm-dvd-wr")) { flags |= FL_SILENT; silent = 1; silent_dvd = 1; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"18")) silent_dvd_wr = SILENT_DVD_WR_18X; else if (!strcmp(argv[i],"16")) silent_dvd_wr = SILENT_DVD_WR_12X; else if (!strcmp(argv[i],"12")) silent_dvd_wr = SILENT_DVD_WR_12X; else if (!strcmp(argv[i], "8")) silent_dvd_wr = SILENT_DVD_WR_8X; else if (!strcmp(argv[i], "6")) silent_dvd_wr = SILENT_DVD_WR_6X; else if (!strcmp(argv[i], "4")) silent_dvd_wr = SILENT_DVD_WR_4X; else printf("invalid --sm-dvd-wr parameter: %s\n", argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } */ else if(!strcmp(argv[i],"--sm-nosave")) silent_save = 0; else if(!strcmp(argv[i],"--destruct")) { if (argc>(i+1)) { i++; if (!strcmp(argv[i],"quick")) { flags |= FL_PXERASER; pxeraser = PLEXERASER_QUICK; } if (!strcmp(argv[i],"full")) { flags |= FL_PXERASER; pxeraser = PLEXERASER_FULL; } } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"--amqr")) { flags |= FL_YMH_AMQR; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) amqr = 0; else if (!strcmp(argv[i],"on")) amqr = 1; } } else if(!strcmp(argv[i],"--forcespeed")) { flags |= FL_YMH_FORCESPEED; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) forcespeed = 0; else if (!strcmp(argv[i],"on")) forcespeed = 1; } // printf("\t--pio-limit [on|off] limit (or not) read speed by 24x for CD and 8x for DVD\n"); // printf("\t--pio-quiet [quiet|perf|std] select QuietMode setting: Quiet, Performance or Standard (default: quiet)\n"); // printf("\t--pio-nosave don't save settings to drive (changes will be lost after reboot)\n"); } else if(!strcmp(argv[i],"--pio-nosave")) { silent_save = 0; } else if(!strcmp(argv[i],"--pio-limit")) { flags |= FL_PIOLIMIT; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"off")) piolimit = 0; else if (!strcmp(argv[i],"on")) piolimit = 1; } } else if(!strcmp(argv[i],"--pio-quiet")) { flags |= FL_PIOQUIET; if (argc>(i+1)) { i++; if (!strcmp(argv[i],"quiet")) piosilent = PIO_SILENT_QUIET; else if (!strcmp(argv[i],"perf")) piosilent = PIO_SILENT_PERF; else if (!strcmp(argv[i],"std")) piosilent = PIO_SILENT_STD; else printf("invalid --pio-quiet parameter: %s\n", argv[i]); } else { printf("option %s needs parameter!\n", argv[i]); return 5; } } else if(!strcmp(argv[i],"-v")) flags |= FL_VERBOSE; else if(!strcmp(argv[i],"--verbose")) flags |= FL_VERBOSE; else { printf("unknown option: %s\n", argv[i]); return 6; } } if (flags & FL_HELP) { usage(argv[0]); return 0; } if (!flags) { usage(argv[0]); return 1; } if (flags & FL_SCAN) { drvcnt = scanbus( DEV_PLEXTOR | DEV_YAMAHA ); if (!drvcnt) printf("ERR: no drives found!\n"); return 2; } if (!(flags & FL_DEVICE)) { printf("** ERR: no device selected\n"); return 3; } // printf("____________________________\n"); printf("Device : %s\n", device); dev = new drive_info(device); if (dev->err) { printf("%s: can't open device: %s\n", argv[0], device); delete dev; return 4; } inquiry(dev); // convert_to_ID(dev); printf("Vendor : '%s'\n",dev->ven); printf("Model : '%s'",dev->dev); if ( isPlextor(dev)) { plextor_get_TLA(dev); printf(" (TLA#%s)",dev->TLA); } printf("\nF/W : '%s'\n",dev->fw); if (!(flags & FL_VERBOSE)) dev->silent++; if (get_drive_serial_number(dev)) printf("Serial#: %s\n",dev->serial); if (flags) { // if (flags & FL_VERBOSE) { printf("\nCDVD Control flags : "); if (flags & FL_VERBOSE) printf(" VERBOSE"); if (flags & FL_DEVICE) printf(" DEVICE"); if (flags & FL_HELP) printf(" HELP"); if (flags & FL_CURRENT) printf(" CURRENT"); if (flags & FL_SUPPORTED) printf(" SUPPORTED"); if (flags & FL_SCAN) printf(" SCAN"); if (flags & FL_LOCK) printf(" LOCK"); if (flags & FL_HCDR) printf(" HCDR"); if (flags & FL_SSS) printf(" SSS"); if (flags & FL_SPDREAD) printf(" SPDREAD"); if (flags & FL_POWEREC) printf(" POWEREC"); if (flags & FL_GIGAREC) printf(" GIGAREC"); if (flags & FL_VARIREC_CD) printf(" VARIREC_CD"); if (flags & FL_VARIREC_DVD) printf(" VARIREC_DVD"); if (flags & FL_SECUREC) printf(" SECUREC"); if (flags & FL_BOOK_R) printf(" BITSET_R"); if (flags & FL_BOOK_RDL) printf(" BITSET_RDL"); if (flags & FL_TESTWRITE) printf(" DVD+TESTWRITE"); if (flags & FL_AS) printf(" AS"); if (flags & FL_SILENT) printf(" SILENT"); if (flags & FL_YMH_AMQR) printf(" AMQR"); if (flags & FL_YMH_FORCESPEED) printf(" FORCESPEED"); if (flags & FL_PIOLIMIT) printf(" PIOLIMIT"); if (flags & FL_PIOQUIET) printf(" PIOQUIET"); if (flags & FL_LOEJ) printf(" LOEJ"); if (flags_as & FLAS_RETR) printf(" AS_RETR"); if (flags_as & FLAS_STOR) printf(" AS_STOR"); if (flags_as & FLAS_CREATE) printf(" AS_CREATE"); if (flags_as & FLAS_DEL) printf(" AS_DEL"); if (flags_as & FLAS_VIEW) printf(" AS_VIEW"); if (flags_as & FLAS_ACT) printf(" AS_ACT"); if (flags_as & FLAS_DEACT) printf(" AS_DEACT"); if (flags_as & FLAS_CLEAR) printf(" AS_CLEAR"); printf("\n\n"); } // printf("____________________________\n"); if (flags & FL_LOCK) { // dev->silent++; switch (lock) { case 0: printf("Unlocking media...\n"); dev->parms.status &= (~STATUS_LOCK); break; case 1: printf("Locking media...\n"); dev->parms.status |= STATUS_LOCK; break; case 2: printf("Toggle media lock state...\n"); get_lock(dev); dev->parms.status ^= STATUS_LOCK; break; } set_lock(dev); printf("Media is%s locked\n", (dev->parms.status & STATUS_LOCK) ? "" : " NOT"); // dev->silent--; } if (flags & FL_LOEJ) { // printf("loej_immed: %d\n",loej_immed); if (eject == 2) { load_eject(dev, loej_immed); } else { load_eject(dev,!eject, loej_immed); } } // PLEXTOR features if (flags & FL_POWEREC) { // printf("Set PoweREC...\n"); dev->plextor.powerec_state = powerec; plextor_set_powerec(dev); } /* if (flags & FL_YMH_AMQR) { dev->yamaha.amqr = amqr; yamaha_set_amqr(dev); } if (flags & FL_YMH_FORCESPEED) { dev->yamaha.forcespeed = forcespeed; yamaha_set_forcespeed(dev); } */ if (flags & FL_GIGAREC) { // printf("Set GigaREC...\n"); dev->plextor.gigarec = gigarec; plextor_set_gigarec(dev); } if (flags & FL_VARIREC_CD) { // printf("Set VariREC CD...\n"); // printf("PWR = %02X STR = %02X\n",varirec_cd_pwr, varirec_cd_str); dev->plextor.varirec_state_cd = !(flags & FL_VARIREC_CD_OFF); dev->plextor.varirec_pwr_cd = varirec_cd_pwr; dev->plextor.varirec_str_cd = varirec_cd_str; plextor_set_varirec(dev, VARIREC_CD); } if (flags & FL_VARIREC_DVD) { // printf("Set VariREC DVD...\n"); // printf("PWR = %02X STR = %02X\n",varirec_dvd_pwr, varirec_dvd_str); dev->plextor.varirec_state_dvd = !(flags & FL_VARIREC_DVD_OFF); dev->plextor.varirec_pwr_dvd = varirec_dvd_pwr; dev->plextor.varirec_str_dvd = varirec_dvd_str; plextor_set_varirec(dev, VARIREC_DVD); } if (flags & FL_NOSECUREC) { plextor_set_securec(dev, 0, NULL); } else if (flags & FL_SECUREC) { int pwdlen = (char)strlen(passwd); if ((pwdlen>=4) && (pwdlen<=10)) plextor_set_securec(dev, pwdlen, passwd); else printf("Invalid SecuRec password length! must be 4..10\n"); } if (flags & FL_HCDR) { plextor_set_hidecdr(dev, hcdr); } if (flags & FL_SSS) { plextor_set_singlesession(dev, sss); } if (flags & FL_SPDREAD) { plextor_set_speedread(dev, spdread); } if (flags & FL_BOOK_R) { dev->book_plus_r = bookr; plextor_set_bitset(dev, PLEX_BITSET_R); } if (flags & FL_BOOK_RDL) { dev->book_plus_rdl = bookrdl; plextor_set_bitset(dev, PLEX_BITSET_RDL); } if (flags & FL_AS) { dev->astrategy.state = as; plextor_set_autostrategy(dev); } if (flags & FL_MQCK) { if (dev->media.type & ( DISC_CDROM | DISC_DDCD_ROM| DISC_DVDROM | DISC_BD_ROM | DISC_HDDVD_ROM)) { printf("Can't run MQCK on stamped media!\n"); return 5; } detect_speeds(dev); printf("Available write speeds:\n"); printf("WR speed max: %4.1fX (%d kB/s)\n", ((float)dev->parms.max_write_speed_kb) / dev->parms.speed_mult, dev->parms.max_write_speed_kb); for (int i=0; iparms.wr_speed_tbl_kb[i] > 0; i++) { printf(" speed #%02d: %4.1fX (%d kB/s)\n", i, ((float)dev->parms.wr_speed_tbl_kb[i]) / ((float)dev->parms.speed_mult), dev->parms.wr_speed_tbl_kb[i]); } if (as_mqck >= 0) { dev->parms.max_write_speed_kb = (int) (as_mqck_spd * dev->parms.speed_mult), set_rw_speeds(dev); get_rw_speeds(dev); if ( !(dev->media.type & (DISC_DVD)) ) { printf("MQCK: Media Quality Check supported on DVD media only!\n"); return 5; } printf("Starting media check at speed %.1f X...\n", ((float)dev->parms.max_write_speed_kb) / dev->parms.speed_mult); if (plextor_media_check(dev, as_mqck)) { if ((dev->err & 0x0FFF00) == 0x023A00) printf("MQCK: No media found\n"); else printf("MQCK: Error starting Media Check\n"); return 5; } if (!dev->rd_buf[0x11]) { if ((dev->rd_buf[0x10] & 0xFF) == 0xFF) printf("MQCK: Cant' run Media Check: AUTOSTRATEGY is OFF\n"); else printf("MQCK: Media is GOOD for writing at selected speed\n"); } else { switch (dev->rd_buf[0x10]) { case 0x01: printf("MQCK: Write error may occur\n"); break; case 0x03: printf("MQCK: Drive may not write correctly at selected speed\n"); break; default: printf("MQCK: Unknown MQCK error: 0x%02X\n", dev->rd_buf[0x10]); } } } } dev->silent--; if (flags_as & FLAS_VIEW) { plextor_get_autostrategy_db_entry_count(dev); plextor_get_autostrategy_db(dev); } if (flags_as & FLAS_CLEAR) { printf("deleting all AutoStrategy entries...\n"); plextor_clear_autostrategy_db(dev); } if (flags_as & FLAS_ACT) { printf("activating strategy #%d\n", as_idx_act); plextor_modify_autostrategy_db(dev, as_idx_act, ASDB_ENABLE); } if (flags_as & FLAS_DEACT) { printf("DEactivating strategy #%d\n", as_idx_deact); plextor_modify_autostrategy_db(dev, as_idx_deact, ASDB_DISABLE); } if (flags_as & FLAS_DEL) { printf("DELETING strategy #%d\n", as_idx_del); plextor_modify_autostrategy_db(dev, as_idx_del, ASDB_DELETE); } if (flags_as & FLAS_CREATE) { printf("AS: Creating new strategy, mode: %s, action: %s...\n", (ascre & ASDB_CRE_FULL) == ASDB_CRE_FULL? "FULL" : "QUICK", (ascre & ASDB_ADD) == ASDB_ADD? "ADD" : "REPLACE"); plextor_create_strategy(dev, ascre); } if (flags_as & FLAS_RETR) { unsigned char hdr[9]; memset(hdr, 0, 9); printf("AS RETR...\n"); plextor_get_strategy(dev); printf("Saving AS DB...\n"); asf = fopen(assfn,"wb"); if (!asf) { printf("can't create asdb file!\n"); return 6; } memcpy(hdr,"ASDB ",5); hdr[5] = dev->astrategy.dbcnt; fwrite((void*)hdr,1,8,asf); for (i=0; iastrategy.dbcnt; i++) { fwrite((void*)&dev->astrategy.entry[i],1,0x20,asf); for (int j=0; j<7; j++) fwrite((void*)&dev->astrategy.entry_data[i][j],1,0x20,asf); } fclose(asf); } if (flags_as & FLAS_STOR) { unsigned char hdr[9]; memset(hdr, 0, 9); printf("AS STOR...\n"); printf("Loading AS DB...\n"); asf = fopen(aslfn,"rb"); if (!asf) { printf("can't open asdb file!\n"); return 6; } if (fread((void*)hdr,1,8,asf)<8) { printf("error reading asdb file!\n"); return 6; } if (!strncmp((char*)hdr,"ASDB ",5)) dev->astrategy.dbcnt = hdr[5]; i=0; while (!feof(asf) && iastrategy.dbcnt) { if (fread((void*)&dev->astrategy.entry[i],1,0x20,asf)<0x20) { printf("error reading asdb file!\n"); return 6; } for (int j=0; j<7; j++) if (fread((void*)&dev->astrategy.entry_data[i][j],1,0x20,asf)<0x20) { printf("error reading asdb file!\n"); return 6; } i++; } fclose(asf); if (dev->astrategy.dbcnt != i) { printf("Can't read all strategies! File corrupted!\n"); return 5; } printf("%d strategies loaded, sending to drive...\n",dev->astrategy.dbcnt); plextor_add_strategy(dev); } if (flags_as & (FLAS_ACT | FLAS_DEACT | FLAS_DEL | FLAS_CREATE | FLAS_STOR | FLAS_CLEAR)) { printf("AutoStrategy DB modified...\n"); plextor_get_autostrategy_db_entry_count(dev); plextor_get_autostrategy_db(dev); } dev->silent++; if (flags & FL_TESTWRITE) { dev->plextor.testwrite_dvdplus = testwrite; plextor_set_testwrite_dvdplus(dev); } if (flags & FL_SILENT) { plextor_get_silentmode(dev); if (!silent) plextor_set_silentmode_disable(dev, silent_save); else { if (!dev->plextor_silent.state) { silent_cd = 1; silent_dvd = 1; silent_tray = 1; } if (silent_cd) { dev->plextor_silent.access = silent_access; dev->plextor_silent.rd = silent_cd_rd; dev->plextor_silent.wr = silent_cd_wr; plextor_set_silentmode_disc(dev, SILENT_CD, silent_save); } if (silent_dvd) { dev->plextor_silent.access = silent_access; dev->plextor_silent.rd = silent_dvd_rd; // dev->plextor_silent.wr = silent_dvd_wr; plextor_set_silentmode_disc(dev, SILENT_DVD, silent_save); } if (silent_tray) { dev->plextor_silent.load = silent_load; dev->plextor_silent.eject = silent_eject; plextor_set_silentmode_tray(dev, SILENT_CD, silent_save); } } } if (flags & FL_PXERASER) { dev->plextor.plexeraser = pxeraser; plextor_plexeraser(dev); } // PIONEER features if (flags & FL_PIOQUIET) { pioneer_set_silent(dev, silent, silent_save); } if (flags & FL_PIOLIMIT) { pioneer_set_spdlim(dev, piolimit, silent_save); } get_device_info(dev); if (!(flags & FL_VERBOSE)) dev->silent--; delete dev; return 0; } qpxtool-0.7.1_002/console/cdvdcontrol/version.h0000644000175000001440000000071011334020365020672 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #define VERSION "1.4" qpxtool-0.7.1_002/console/qscand/0000755000175000001440000000000011352127612015771 5ustar shultzusersqpxtool-0.7.1_002/console/qscand/qscand_defs.h0000644000175000001440000000217611205512422020414 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef QSCAND_DEFS_H #define QSCAND_DEFS_H #if defined (__unix) || defined (__unix__) #include #include #include #include #include #include #define DAEMON_EN #elif defined (_WIN32) #include #endif #define CLIENTS_MAX 16 #define MAXLINE 1024 #define DEFPORT 46660 #define LISTENQ 16 //#define AUTOPORT_ENABLE //#define ECHO_CHILD #define IDENT "QSCAND\n" #define IDENT_LEN sizeof(IDENT) #define IDENTV "qScand 0.1\n" #define IDENTV_LEN sizeof(IDENTV) #define PROMPT "qscand $ " #define PROMPT_LEN sizeof(PROMPT) extern pid_t pid; extern bool daemonized; extern bool debug; extern bool term; #endif // QSCAND_DEFS_H qpxtool-0.7.1_002/console/qscand/Makefile0000644000175000001440000000100111322563235017423 0ustar shultzusersSRCS = $(patsubst %,%.cpp, qscand child) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) BIN = qscand$(BINSUFF) CXXFLAGS += -I. -I../../lib/include CFLAGS += -I. -I../../lib/include LDLIBS += -L../../lib/lib -lqpxtransport $(BIN): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LIBS_THREAD) $(LIBS_INET) all:$(BIN) clean: rm -f $(BIN) $(OBJS) *~ install: mkdir -p $(DESTDIR)$(BINDIR) install -m 755 $(BIN) $(DESTDIR)$(BINDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/$(BIN) .PHONY: all clean install qpxtool-0.7.1_002/console/qscand/qscand.cpp0000644000175000001440000002164111207227154017753 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include #include #include "qscand.h" #ifndef _WIN32 #include #endif #include bool term; int childl; pid_t pid; // pid_t cpids[CLIENTS_MAX]; bool daemonized=0; bool debug=0; #if defined (__unix) || defined (__unix__) void sigint_handler (int) #elif defined (_WIN32) BOOL WINAPI sigint_handler (DWORD) #endif { if (!childl) { if (debug && !daemonized && clients>0) printf("%d: SIGINT. %d client(s) left. Terminating connections...\n", pid, clients); // while (clients) msleep((1 << 8)); // if (debug && !daemonized) // printf("%d: SIGINT. Terminating listener...\n", pid); } else if (childl == 1) { if (debug && !daemonized) printf("%d: SIGINT. Terminating client connection...\n", pid); } term=1; #if defined (_WIN32) return 1; #endif }; #ifdef DAEMON_EN int daemonize() { pid_t pid; switch (pid = fork()) { case -1: return -1; case 0: openlog("qscand", LOG_PID, LOG_DAEMON); close(0); close(1); close(2); daemonized = 1; break; default: exit(0); } if (setsid() == -1) return -1; return 0; } #endif static struct option long_options[] = { {"help", 0, NULL, 'h'}, #ifdef DAEMON_EN {"nodaemon", 0, NULL, 'n'}, #endif {"debug", 0, NULL, 'd'}, {"iface", 1, NULL, 'i'}, {"port", 1, NULL, 'p'}, #ifdef AUTOPORT_ENABLE {"portauto", 0, NULL, 'a'}, #endif {0,0,0,0} }; int child_create(int idx) { int r; if ((r = thread_create(&childs[idx].tid, NULL, &child_thread, (void*)&childs[idx].arg))) { #ifdef DAEMON_EN syslog(LOG_ERR, "Error creating thread!\n"); #else printf("Error creating thread!\n"); #endif return r; close(childs[idx].arg.connfd); } return 0; } int main (int argc, char **argv) { // pid_t cpid; char *iface=NULL; uint32_t ip; uint16_t port; int listenfd; struct sockaddr_in srvaddr; socklen_t srvaddr_len = sizeof(srvaddr); int cli_idx; #ifdef _WIN32 WSADATA WSAdata; #endif bool portauto=0; bool nodaemon=0; daemonized = 0; struct timeval tv; fd_set rd_set; FD_ZERO(&rd_set); term=0; clients=0; cli_idx=-1; pid=getpid(); // for (int i=0; i\n"); printf("\n"); printf("-h --help you are reading this:)\n"); #ifdef DAEMON_EN printf("-n --nodaemon don't daemonize\n"); #endif printf("-i --iface listen on interface with selected address\n"); printf("-p --port listen selected port\n"); #ifdef AUTOPORT_ENABLE printf("-a --portauto autoselect port listen to\n"); #endif printf("-d --debug debug\n"); printf("\n"); exit(0); case 'n': nodaemon=1; #ifndef DAEMON_EN printf("daemon mode not available, option '-n' ignored!\n"); #endif break; case 'd': debug=1; break; case 'i': iface = optarg; break; case 'p': { unsigned long lp = strtol(optarg, NULL, 10); if (errno == ERANGE || lp > 65535) { printf("port number out of range!\n"); } else { port = lp; } } break; #ifdef AUTOPORT_ENABLE case 'a': portauto=1; break; #endif default: printf("Invalid option: -%c\n", c); break; } } if (!port && !portauto) port = DEFPORT; #ifdef _WIN32 if ((errno = WSAStartup(MAKEWORD(1,1), &WSAdata))) { printf("Can't initialize winsock: [%d] %s\n", errno, strerror(errno)); return -1; } #endif if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) == 0) { printf("%d: Can't create socket. Terminating\n", pid); return -1; } // fcntl(listenfd, F_SETFL, fcntl(listenfd, F_GETFL) | O_NONBLOCK); //listenfd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); memset (&srvaddr, 0, sizeof(srvaddr)); #if defined (__unix) || defined (__unix__) signal(SIGINT, &sigint_handler); // signal(SIGCHLD, &sigchld_handler); #elif defined (_WIN32) SetConsoleCtrlHandler(&sigint_handler, 1); #endif srvaddr.sin_family = AF_INET; if (!iface || !inet_aton(iface, &srvaddr.sin_addr)) { srvaddr.sin_addr.s_addr = ip; } srvaddr.sin_port = htons(port); int on=1; setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (char*)&on, sizeof(on)); if (bind( listenfd, (struct sockaddr*) &srvaddr, srvaddr_len)) { #ifdef _WIN32 errno = GetLastError(); #endif // if (errno) { if (errno != EADDRINUSE || !portauto) { printf("%d: Can'n bind() %s:%d: [%d] %s\n", pid, inet_ntoa(srvaddr.sin_addr), ntohs(srvaddr.sin_port), errno, strerror(errno)); return -1; } else { printf("%d: Can'n bind() %s:%d, trying to autoassig port...\n", pid, inet_ntoa(srvaddr.sin_addr), ntohs(srvaddr.sin_port)); srvaddr.sin_port = 0; if (bind( listenfd, (struct sockaddr*) &srvaddr, srvaddr_len)) { printf("%d: Can'n bind(): %s\n", pid, strerror(errno)); return -1; } } } if (listen(listenfd, LISTENQ)) { #ifdef _WIN32 errno = GetLastError(); #endif printf("%d: Can'n listen() %s:%d: [%d] %s\n", pid, inet_ntoa(srvaddr.sin_addr), ntohs(srvaddr.sin_port), errno, strerror(errno)); return -1; } // printf("listenfd: %d\n", listenfd); getsockname(listenfd, (struct sockaddr*) &srvaddr, &srvaddr_len); #ifdef DAEMON_EN if (!nodaemon) daemonize(); pid = getpid(); if (daemonized) { syslog(LOG_INFO, "Listening %s:%d\n", inet_ntoa(srvaddr.sin_addr), port); syslog(LOG_DEBUG, "daemonized\n"); } else #endif printf("%d: Listening %s:%d\n", pid, inet_ntoa(srvaddr.sin_addr), port); cmutex = new Mutex(); child_list_clear(); for (; !term ;) { // printf("listen loop...\n"); socklen_t cliaddr_len = sizeof(childs[cli_idx].arg.cliaddr); FD_SET(listenfd, &rd_set); tv.tv_sec =1; tv.tv_usec=0; cli_idx = child_find_unused(); if (cli_idx<0) continue; childs[cli_idx].arg.connfd=0; // printf("select...\n"); int sret = select(listenfd+1, &rd_set, NULL, NULL, &tv); // printf("Sret = %d, err: %s\n", sret, strerror(errno)); if ( sret > 0 ) { if ( FD_ISSET(listenfd, &rd_set) ) { // #ifndef _WIN32 childs[cli_idx].arg.connfd = accept(listenfd,(struct sockaddr*) &childs[cli_idx].arg.cliaddr, &cliaddr_len); /* #else int tconnfd = accept(listenfd,(struct sockaddr*) &childs[cli_idx].arg.cliaddr, &cliaddr_len); #endif */ if (errno == ECONNABORTED) { childs[cli_idx].arg.used=0; continue; } #if 0 //#ifdef _WIN32 // childs[cli_idx].arg.connfd = _get_osfhandle( tconnfd ); childs[cli_idx].arg.connfd = _open_osfhandle( tconnfd, _O_RDWR | _O_BINARY | _O_SEQUENTIAL); // write(childs[cli_idx].arg.connfd, "012345678\n", 10); // write(tconnfd, "012345678\n", 10); printf("connfd: %d, errno: [%d] %s\n", childs[cli_idx].arg.connfd, errno, strerror(errno)); #endif } } //if (errno == EINTR) continue; if (childs[cli_idx].arg.connfd > 0) { // write(connfd, IDENT, IDENT_LEN); // fcntl(connfd, F_SETFL, fcntl(connfd, F_GETFL) | O_NONBLOCK); cmutex->lock(); if (clients>=CLIENTS_MAX) { write(childs[cli_idx].arg.connfd, "QSCAND: clients limit reached!\n", 31); close(childs[cli_idx].arg.connfd); childs[cli_idx].arg.used=0; cmutex->unlock(); continue; } cmutex->unlock(); if (!child_create(cli_idx)) { cmutex->lock(); clients++; cmutex->unlock(); if (debug && !daemonized) printf("%d: Clients: %d\n", pid, clients); /* for (int i=0; i * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef QSCAND_H #define QSCAND_H #include #endif // QSCAND_H qpxtool-0.7.1_002/console/qscand/child.cpp0000644000175000001440000002665011316130202017556 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include #include #include #include #include #include #include "child.h" int clients; Mutex* cmutex; child_t childs[CLIENTS_MAX+1]; int child_find_unused() { // printf("Child find unused..."); int idx = -1; int i=0; cmutex->lock(); while (idx<0 && i<(CLIENTS_MAX+1)) { if (!childs[i].arg.used) { childs[i].arg.used=1; idx=i; } i++; } cmutex->unlock(); return idx; }; void child_list_clear() { for (int i=0; i<(CLIENTS_MAX+1); i++) childs[i].arg.used=0; } const char helpstr[] = "QSCAND: valid commands:\n\ close close connection\n\ list|scanbus list available devices\n\ dinfo show device info (have to set device first)\n\ minfo show media info (have to set device first)\n\ run run test (have to set device and test type first)\n\ \n\ get get current parameters\n\ set = set parameter. PAR can be:\n\ dev - set device, VAL should be like '/dev/hdX' or '/dev/sdX'\n\ test - set test type, VAL should be one of folowing:\n\ rt - read transfer rate\n\ wt - write transfer rate\n\ errc - error correction test\n\ jb - jitter/asymmetry test\n\ ft - focus/tracking test\n\ ta - time analyser\n\ speed - set test speed, VAL should be integer\n\ simul - set test speed, VAL should be 0 or 1 (default: 1)\n\ "; const int helpstr_sz = sizeof(helpstr); enum qscan_mode { none = 0, scanbus = 1, scan, dinfo, minfo, help }; char tchar = -1; enum fdtype_t { FD_PIPE = 1, FD_SOCKET = 2 }; //int readline(int fd, char *buf, int maxlen, fdtype_t fdtype = FD_PIPE) int readline(int fd, char *buf, int maxlen, fdtype_t fdtype) { int cnt=0; char *cbuf=buf; int r; int sret; fd_set rd_set; timeval tv; FD_ZERO(&rd_set); // printf("tchar=%02X\n", tchar); if (tchar>=0) { cbuf[0] = tchar; cnt++; cbuf++; tchar = -1; } while ( !term && (cnt<(maxlen-1))) { FD_SET(fd, &rd_set); tv.tv_sec = 1; tv.tv_usec = 0; #ifdef _WIN32 if (fdtype == FD_SOCKET) { #endif sret = select(fd+1, &rd_set, NULL, NULL, &tv); #ifdef _WIN32 errno = GetLastError(); } else { sret = 1; errno = 0; } #endif // printf("select(%d): %s\n", fd, strerror(errno)); if (sret < 0) { #ifndef _WIN32 if (debug) { if (debug && !daemonized) printf("readline() %d select: %s\n", fd, strerror(errno)); } #endif if (errno == EINTR) continue; return -1; } else if (sret > 0 && FD_ISSET(fd, &rd_set)) { #ifdef _WIN32 if (fdtype == FD_SOCKET) r = recv(fd, cbuf, 1, 0); else #endif r = read(fd, cbuf, 1); if (r<0) { if (debug && !daemonized) printf("read = %d, %d, %s\n", r, errno, strerror(errno)); switch (errno) { case EAGAIN: // printf("EAGAIN\n"); continue; case EINTR: // printf("EINTR\n"); continue; default: return -1; } } if (!r) return -1; // look for CR/LF/CR+LF if (fdtype == FD_SOCKET) { if (buf[cnt] == 0x0A || buf[cnt] == 0x0D) goto readline_end; } else if (cnt && (buf[cnt-1] == 0x0A || buf[cnt-1] == 0x0D)) { if (buf[cnt] != 0x0A && buf[cnt] != 0x0D) tchar = buf[cnt]; buf[cnt-1]='\n'; buf[cnt]=0; return cnt; } cnt++; cbuf++; } } if (term) return -1; readline_end: buf[cnt]='\n'; buf[cnt+1]=0; return cnt+1; } void child_proc(child_arg_t *arg) { ssize_t n; char speeds[16]; char linei [MAXLINE+1]; char lineo [MAXLINE+IDENT_LEN+1]; pipe_t pipefd; pid_t cpid; qscan_mode mode = none; char device[128] = "\0"; char test[8] = "\0"; int speed = -1; bool WT_simul = 1; #ifdef _WIN32 send(arg->connfd, IDENTV, IDENTV_LEN, 0); #else write(arg->connfd, IDENTV, IDENTV_LEN); #endif for (;;) { mode = none; if (term) return; #ifdef _WIN32 send(arg->connfd, PROMPT, PROMPT_LEN, 0); #else write(arg->connfd, PROMPT, PROMPT_LEN); #endif if ((n = readline(arg->connfd, linei, MAXLINE, FD_SOCKET)) < 0) { //if ((n = fgets(line, MAXLINE, arg->connfd)) == EOF) { //printf("Client disconnected\n"); return; } if (n<=1) continue; linei[n]=0; #ifdef _WIN32 send(arg->connfd, "\n", 1, 0); #else write(arg->connfd, "\n", 1); #endif if (debug && !daemonized) printf("%s:%d : command: %s", inet_ntoa(arg->cliaddr.sin_addr), ntohs(arg->cliaddr.sin_port), linei); if (!strcmp(linei, "help\n")) { #ifdef _WIN32 send(arg->connfd, helpstr, helpstr_sz, 0); #else write(arg->connfd, helpstr, helpstr_sz); #endif continue; } else if (!strcmp(linei, "close\n")) { // shutdown(arg->connfd, SHUT_RDWR); return; // } else if (!strcmp(linei, "qhelp\n")) { // mode = help; } else if (!strcmp(linei, "list\n") || !strcmp(linei, "scanbus\n")) { mode = scanbus; } else if (!strcmp(linei, "dinfo\n")) { mode = dinfo; } else if (!strcmp(linei, "minfo\n")) { mode = minfo; } else if (!strcmp(linei, "run\n")) { mode = scan; } else if (!strcmp(linei, "get\n")) { sprintf(lineo, "current parameters:\ndevice: '%s'\ntest : '%s'\nspeed : %d\nsimul : %s\n", device, test, speed, WT_simul ? "on" : "off"); #ifdef _WIN32 send(arg->connfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif continue; } else if (!strncmp(linei, "set", 3)) { char *linet = linei+4; size_t len; if ((strlen(linei) <=4) || linei[3]!=' ') { sprintf(lineo, "QSCAND: set: needs parameter!\n"); #ifdef _WIN32 send(arg->connfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif continue; } if (!strncmp(linet, "dev=", 4)) { linet+=4; len = strlen(linet); if (lenconnfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif } } else if (!strncmp(linet, "test=", 5)) { linet+=5; len = strlen(linet); if (lenconnfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif } } else if (!strncmp(linet, "speed=", 6)) { linet+=6; speed = atol(linet); } else if (!strncmp(linet, "simul=", 6)) { linet+=6; WT_simul = atol(linet) ? 1 : 0; } else { sprintf(lineo, "QSCAND: set: invalid parameter!\n"); #ifdef _WIN32 send(arg->connfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif } continue; } else { // sprintf(lineo, "str len: %d, cmd len: %d. '%d'\n", n, strlen(linei), linei); //sprintf(lineo, "str len: %d, cmd len: %d, last %02x %02x\n", n, strlen(linei), linei[n-2], linei[n-1]); // write(arg->connfd, lineo, strlen(lineo)); sprintf(lineo, "QSCAND: invalid command. try \"help\"\n"); #ifdef _WIN32 send(arg->connfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif } if (mode != none) { int argc = 0; char **argv = (char**) malloc(sizeof(char*)); argv[0] = NULL; if ( ((mode == scan) || (mode == dinfo) || (mode == minfo)) && !strlen(device)) { #ifdef DAEMON_EN if (daemonized) syslog(LOG_WARNING, "QSCAND: No device specified!\n"); else #endif printf("QSCAND: No device specified!\n"); _exit(0); } if ( (mode == scan) && !strlen(test)) { #ifdef DAEMON_EN if (daemonized) syslog(LOG_WARNING, "QSCAND: No test specified!\n"); else #endif printf("QSCAND: No test specified!\n"); _exit(0); } argv = add_arg(argv, &argc, "qscan"); switch (mode) { case scanbus: argv = add_arg(argv, &argc, "-l"); break; case scan: argv = add_arg(argv, &argc, "-d"); argv = add_arg(argv, &argc, device); argv = add_arg(argv, &argc, "-t"); argv = add_arg(argv, &argc, test); sprintf(speeds,"%d", speed); argv = add_arg(argv, &argc, "-s"); argv = add_arg(argv, &argc, speeds); if (!strcmp(test, "wt") && !WT_simul) argv = add_arg(argv, &argc, "-W"); break; case dinfo: argv = add_arg(argv, &argc, "-d"); argv = add_arg(argv, &argc, device); argv = add_arg(argv, &argc, "-Ip"); break; case minfo: argv = add_arg(argv, &argc, "-d"); argv = add_arg(argv, &argc, device); argv = add_arg(argv, &argc, "-m"); break; case help: argv = add_arg(argv, &argc, "-h"); break; default: if (debug && !daemonized) printf("unknown mode: %d\n", mode); return; } if ((cpid = createChildProcess(argv, &pipefd, NULL)) == -1) { #ifdef DAEMON_EN if (daemonized) syslog(LOG_ERR, "Can't start child!\n"); else #endif printf("QSCAND: Can't start child!\n"); return; } else { // parent. copy messages from pipe to socket close(pipefd[1]); // unused write end sprintf(lineo, "QSCAND: child created, reading from pipe...\n"); #ifdef _WIN32 send(arg->connfd, lineo, strlen(lineo), 0); #else write(arg->connfd, lineo, strlen(lineo)); #endif int wn, woffs; while((n = readline((int)pipefd[0], lineo, MAXLINE, FD_PIPE))>=0) { // while((n = read(pipefd[0], lineo, MAXLINE)) > 0) { // sprintf(linei,"\nread #%d: %d bytes\n\0",idx, n); // write(arg->connfd, linei, strlen(linei)); // idx++; // printf(lineo); woffs=0; while (woffsconnfd, lineo+woffs, n-woffs, 0); #else wn = write(arg->connfd, lineo+woffs, n-woffs); #endif if (wn<0) { switch (errno) { case EAGAIN: break; default: woffs=n; } } else { woffs+=wn; } } } #ifdef DAEMON_EN if (daemonized) syslog(LOG_WARNING, "Pipe end!\n"); else #endif printf("QSCAND: Pipe end!\n"); close(pipefd[0]); } } // if (mode != none) } } void *child_thread(void *argp) { child_arg_t *arg = (child_arg_t*)argp; // childl++; // pid=getpid(); // close(listenfd); #ifdef DAEMON_EN if (daemonized) syslog(LOG_INFO, "Client connected: %s:%d\n", inet_ntoa(arg->cliaddr.sin_addr), ntohs(arg->cliaddr.sin_port)); else #endif printf("%d: Client connected: %s:%d\n", pid, inet_ntoa(arg->cliaddr.sin_addr), ntohs(arg->cliaddr.sin_port)); /* serve connection */ child_proc(arg); #ifdef DAEMON_EN if (daemonized) syslog(LOG_INFO, "Client disconnected: %s:%d\n", inet_ntoa(arg->cliaddr.sin_addr), ntohs(arg->cliaddr.sin_port)); else #endif printf("%d: Client disconnected: %s:%d\n", pid, inet_ntoa(arg->cliaddr.sin_addr), ntohs(arg->cliaddr.sin_port)); if (debug && !daemonized) printf("%d: Closing client socket...\n", pid); shutdown(arg->connfd, SHUT_RDWR); close(arg->connfd); cmutex->lock(); clients--; arg->used = 0; cmutex->unlock(); return 0; // thread_exit(0); } qpxtool-0.7.1_002/console/qscand/child.h0000644000175000001440000000161611205454555017237 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef CHILDPROC_H #define CHILDPROC_H #include #include #include typedef struct { bool used; struct sockaddr_in cliaddr; int connfd; } child_arg_t; typedef struct { thread_t tid; child_arg_t arg; } child_t; extern child_t childs[CLIENTS_MAX+1]; extern void *child_thread(void *argp); extern int child_find_unused(); extern void child_list_clear(); extern int clients; extern Mutex *cmutex; #endif // CHILDPROC_H qpxtool-0.7.1_002/Makefile0000644000175000001440000000366711352116471014533 0ustar shultzusersPREFIX = /usr BINDIR = /usr/bin SBINDIR = /usr/sbin LIBDIR = /usr/lib PLUGINDIR = /usr/lib/qpxtool INCDIR = /usr/include MANDIR = /usr/share/man BINSUFF = LIBS_HW = LIBS_INET = LIBS_DL = -ldl LIBS_THREAD = -lpthread LPNG_INC = -I/usr/include/libpng12 LPNG_LIB = -L/usr/lib -lpng12 CXXFLAGS += -Wall -O2 -fPIC -DUSE_LIBPNG CFLAGS += -Wall -O2 -fPIC -DUSE_LIBPNG # additional debug options CXXFLAGS += -g CFLAGS += -g export PREFIX BINDIR SBINDIR LIBDIR PLUGINDIR INCDIR MANDIR BINSUFF LIBS_HW LIBS_INET LIBS_DL LIBS_THREAD export LPNG_INC LPNG_LIB export CXXFLAGS CFLAGS all: cli gui cli: lib console plugins man lib: $(MAKE) -C lib console: lib $(MAKE) -C console plugins: lib $(MAKE) -C plugins man: $(MAKE) -C man gui: lib $(MAKE) -C gui clean: $(MAKE) -C lib clean $(MAKE) -C console clean $(MAKE) -C plugins clean $(MAKE) -C man clean $(MAKE) -C gui clean install: all cli_install gui_install cli_install: $(MAKE) -C lib install $(MAKE) -C console install $(MAKE) -C plugins install $(MAKE) -C man install gui_install: $(MAKE) -C gui install uninstall: cli_uninstall gui_uninstall cli_uninstall: $(MAKE) -C lib uninstall $(MAKE) -C console uninstall $(MAKE) -C plugins uninstall $(MAKE) -C man uninstall gui_uninstall: $(MAKE) -C gui uninstall help: @echo "" @echo "Alailable targets:" @echo "all - build all" @echo "cli - build libs and console tools" @echo "gui - build gui only" @echo "install - install all" @echo "cli_install - install libs and console tools" @echo "gui_install - install gui only" @echo "" @echo "clean - clean source tree from object files" @echo "uninstall - uninstall all" @echo "cli_uninstall - uninstall libs and console tools" @echo "gui_uninstall - uninstall gui only" .PHONY: all clean cli lib console plugins man nogui gui install cli_install gui_install uninstall cli_uninstall gui_uninstall help qpxtool-0.7.1_002/qpxtool.spec0000644000175000001440000000650611353373400015446 0ustar shultzusers%define summary CD/DVD media check/drive control tools %define name qpxtool %define version 0.7.1_002 %define release 1 %define vendor Gennady "ShultZ" Kozlov %define packager Gennady "ShultZ" Kozlov %define email qpxtool@mail.ru Summary: %{summary} Name: %{name} Version: %{version} Release: %{release} Group: Applications/Media License: GPL URL: http://qpxtool.sourceforge.net Vendor: %{vendor} Packager: %{packager} %{email} Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) #BuildRequires: libpng-devel Requires: %{name}-lib = %{version}-%{release} #Requires: libpng %package lib Summary: QPxTool libraries Group: Development/Libraries %package gui Summary: QPxTool Qt4 GUI Group: X11/Applications Requires: %{name} = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release} %package devel Summary: QPxTool development files Group: Development/Libraries Requires: %{name}-lib = %{version}-%{release} %description QPxTool is the way to get full control over your CD/DVD drives. It is the Open Source Solution which intends to give you access to all available Quality Checks (Q-Checks) on written and blank media, that are available for your drive. This will help you to find the right media and the optimized writing speed for your hardware, which will increase the chance for a long data lifetime. Console CD/DVD media check and drive control tools and libraries qscan - quality check tool qscand - network quality check daemon (frontend to qscan) readdvd - a little tool for reading damaged CD/DVD (multi-pass) cdvdcontrol - extended drive features control tool pxfw - firmware flasher for Plextor drives f1tattoo - DiscT@2 tool for Yamaha CRW-F1 Authors: -------- Gennady "ShultZ" Kozlov %description lib Required libraries for QPxTool CD/DVD media check and drive control tools Authors: -------- Gennady "ShultZ" Kozlov %description devel Developnemt files for QPxTool CD/DVD media check and drive control tools Authors: -------- Gennady "ShultZ" Kozlov %description gui Qt4 frontend for CD/DVD media check and drive control tools Authors: -------- Gennady "ShultZ" Kozlov %prep %setup -q -n %{name}-%{version} %build #### ./configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} make %{?_smp_mflags} %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %post lib /sbin/ldconfig %postun lib /sbin/ldconfig %files %defattr(-,root,root) /usr/bin/* /usr/sbin/* %{_mandir}/man1/* %{_mandir}/man8/* %{_libdir}/qpxtool/libqscan_* %doc AUTHORS COPYING ChangeLog README TODO %exclude /usr/bin/qpxtool %files lib %defattr(-,root,root) %{_libdir}/libqpx* %files gui %defattr(-,root,root) /usr/bin/qpxtool /usr/share/pixmaps/qpxtool.png /usr/share/applications/qpxtool.desktop /usr/share/qpxtool/locale/* %files devel %defattr(-,root,root) /usr/include/qpxtool/* %clean [ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT %changelog * Wed Nov 11 2009 Gennady "ShultZ" Kozlov - main package splitted to main,lib * Wed Oct 21 2009 Gennady "ShultZ" Kozlov - splitted packages: main, devel, gui * Tue Jul 21 2009 Gennady "ShultZ" Kozlov - initial spec file created qpxtool-0.7.1_002/README0000644000175000001440000000303011336172101013725 0ustar shultzusers************************************************************ QPxTool 0.7.1 http://qpxtool.sourceforge.net Authors: Gennady "ShultZ" Kozlov SCSI transport code (transport.cpp, transport.h) based on transport.hxx from dvd+rw-tools some plextor-specific code got from pxScan/CDVDlib (C) Alex Noe` CD-R(W) manufacturer identification code got from cdrecord (C) Joerg Schilling ************************************************************ Features: - detecting drive R/W and general features - Read/Write transfer rate tests - CD quality tests: - C1/C2/CU (logarythmic scale) - Extended Error Correction test on Plextor & BENQ drives - FE/TE (Plextor) - Jitter/Asymmetry - DVD quality tests: - PIE/PIF - Extended Error Correction test on Plextor & BENQ drives - Jitter/Asymmetry - FE/TE (Plextor, Lite-On, BENQ) - TA (only PX-7[14|16|55|60] can do this) - Saving test results as HTML or PDF or in internal XML-based format to see them later - Results printing - Plextor features control (via cdvdcontrol): - Hide-CDR - Single-Session - Speed Read - GigaRec - PoweRec - Silent mode - VariRec (CD & DVD) - Bitsetting on DVD+R & DVD+R DL - Simulation on DVD+R(W) - AutoStrategy - Media Quality Check - PlexEraser - SecuRec - AutoStrategy - Other vendors features: - Pioneer DVR-A**XL QuietMode (tested on A09) - DiscT@2 burning on Yamaha CRW-F1 (via f1tattoo and from gui), accepts PNG images ************************************************************ qpxtool-0.7.1_002/confclean0000755000175000001440000000016111337441007014732 0ustar shultzusers#!/bin/sh rm -f Makefile rm -f gui/Makefile rm -f lib/Makefile.lib rm -f plugins/Makefile.plugin rm -f config.h qpxtool-0.7.1_002/configure0000755000175000001440000004337211353430602014773 0ustar shultzusers#!/bin/sh TMPC=tmp.c TMPB=tmpb GMAKE="no" MAKE="make" QMAKE4_NAMES="qmake qmake4 qmake-qt4 qmake-4" OSDEFS="" OSLIBS="" OSLIBS_HW="" OSLIBS_INET="" OSLIBS_DL="" OSLIBS_THREAD="" __cc=cc __cxx=c++ __defprefix="" __prefix="" __enable_debug=no __enable_png=yes __enable_gui=yes __wt_internal=yes __qmake="" __plugins_liteon_noprobe=no __binsuff="" __libpref="lib" __libsuff=".so" lpng_iopts="" lpng_ldflags="" LPNG_DEFS="" PLUGIN_DEFS="" DEFS="" qt_ver="" qt_dir="" cleanup() { rm -f $TMPC $TMPB } check_make() { echo -n "Checking for make... " x=`gmake -v 2>/dev/null` if test "$?" -gt 0; then x=`make -v 2>/dev/null` if test "$?" -gt 0; then echo "no" echo "Make not found! Can't continue" exit fi MAKE="make" else MAKE="gmake" fi echo "yes" echo -n "Checking if we have GNU Make... " if test "$OSL" = "mingw32" ; then make_t0=`$MAKE -v | tr '[A-Z]' '[a-z]' | grep make | grep ver | cut -d ' ' -f 1` else make_t0=`$MAKE -v | tr '[A-Z]' '[a-z]' | grep make | cut -d ' ' -f 1` fi if test "$make_t0" = "gnu" ; then GMAKE="yes" else GMAKE="no" fi echo $GMAKE } check_compiler() { echo -n "Checking C compiler... " cc_name=`$__cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` cc_ver=`$__cc -dumpversion 2>&1` if test "$?" -gt 0; then cc_name="not found" cc_ver="" fi echo -n $cc_name $cc_ver case $cc_name in "not found") echo "" echo "** No C compiler found, can not continue!" exit 1 ;; gcc) echo "" ;; *) echo " only gcc tested!" ;; esac echo -n "Checking C++ compiler... " cxx_name=`$__cxx -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` cxx_ver=`$__cxx -dumpversion 2>&1` if test "$?" -gt 0; then cxx_name="not found" cxx_ver="" fi echo $cxx_name $cxx_ver if test "$cxx_name" = "not found" ; then echo "" echo "** No C++ compiler found, can not continue!" exit 1 fi } check_libpng() { __enable_png=no echo -n "Checking for libpng... " lpng_ver=`libpng-config --version 2>/dev/null` if test "$?" -gt 0; then lpng_ver="not found" fi echo $lpng_ver if test "$lpng_ver" != "not found" ; then echo -n " libpng compiler flags: " lpng_iopts=`libpng-config --I_opts` echo $lpng_iopts echo -n " libpng linker flags: " lpng_ldflags=`libpng-config --ldflags` echo $lpng_ldflags echo -n "Checking png.h presense... " echo " #include int main(int ac, char** av) { return 0; } " > $TMPC $__cc $lpng_iopts $TMPC -o $TMPB 2>&1 1>/dev/null if test "$?" -gt 0; then echo "no" lpng_iopts="" lpng_ldflags="" else echo "yes" echo -n "Checking png.h usability... " echo " #include int main(int ac, char** av) { png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); return 0; } " > $TMPC $__cc $lpng_iopts $lpng_ldflags $TMPC -o $TMPB 2>&1 1>/dev/null if test "$?" -gt 0; then echo "no" lpng_iopts="" lpng_ldflags="" else echo "yes" __enable_png=yes LPNG_DEFS="-DUSE_LIBPNG" fi fi fi } qt_check_qmake() { qt_ver=`$1 -v 2>/dev/null` if test "$?" -gt 0; then qt_ver="not found" qt_dir="" else qt_ver=`$1 -v 2>/dev/null | tail -n 1 | cut -d' ' -f 4 ` qt_dir=`$1 -v 2>/dev/null | tail -n 1 | cut -d' ' -f 6 ` fi case $qt_ver in "not found") __qmake="" ;; 4.*) __qmake=$1 ;; *) echo "Unknown/unsupported Qt version" __qmake="" ;; esac } qt_check_default() { for qmake4 in $QMAKE4_NAMES ; do qt_check_qmake $qmake4 if test "$qt_dir" != "" ; then return fi done } ckeck_qt4() { __enable_gui=no echo -n "Checking for Qt4... " if test "$__qmake" = "" ; then qt_check_default else qt_check_qmake $__qmake fi if test "$qt_dir" = "" ; then echo "no, GUI will not be compiled. If you really have Qt4 and want to build GUI try --qmake=/path/to/qmake" else __enable_gui=yes echo "$qt_dir ($qt_ver), qmake command: $__qmake" fi } create_makefile_top() { echo "* Makefile" rm -f Makefile echo "#ifndef __CONFIG_H__" > config.h echo "#define __CONFIG_H__" >> config.h echo "#define INSTALL_PREFIX \"$__prefix\"" >> config.h echo "#endif //__CONFIG_H__" >> config.h echo "PREFIX = $__prefix BINDIR = $__bindir SBINDIR = $__sbindir LIBDIR = $__libdir PLUGINDIR = $__plugindir INCDIR = $__incdir MANDIR = $__mandir BINSUFF = $__binsuff LIBS_HW = $OSLIBS_HW LIBS_INET = $OSLIBS_INET LIBS_DL = $OSLIBS_DL LIBS_THREAD = $OSLIBS_THREAD LPNG_INC = $lpng_iopts LPNG_LIB = $lpng_ldflags " >> Makefile echo "CXXFLAGS += -Wall -O2 $OSDEFS $LPNG_DEFS $PLUGIN_DEFS $DEFS" >> Makefile echo "CFLAGS += -Wall -O2 $OSDEFS $LPNG_DEFS $PLUGIN_DEFS $DEFS" >> Makefile if test "$__enable_debug" = "yes" ; then echo "# additional debug options" >> Makefile echo "CXXFLAGS += -g" >> Makefile echo "CFLAGS += -g" >> Makefile fi if test "$OSL" = "darwin" ; then echo "QMAKESPEC=macx-g++" >> Makefile echo "export QMAKESPEC" >> Makefile fi if test "$GMAKE" = "yes" ; then echo "export PREFIX BINDIR SBINDIR LIBDIR PLUGINDIR INCDIR MANDIR BINSUFF LIBS_HW LIBS_INET LIBS_DL LIBS_THREAD" >> Makefile echo "export LPNG_INC LPNG_LIB" >> Makefile echo "export CXXFLAGS CFLAGS" >> Makefile fi echo " all: cli gui cli: lib console plugins man" >> Makefile echo " lib: \$(MAKE) -C lib console: lib \$(MAKE) -C console plugins: lib \$(MAKE) -C plugins man: \$(MAKE) -C man " >> Makefile echo " gui: lib" >> Makefile if test "$__enable_gui" = "yes" ; then echo " \$(MAKE) -C gui" >> Makefile fi echo " clean:" >> Makefile echo " \$(MAKE) -C lib clean \$(MAKE) -C console clean \$(MAKE) -C plugins clean \$(MAKE) -C man clean" >> Makefile if test "$__enable_gui" = "yes" ; then echo " \$(MAKE) -C gui clean" >> Makefile fi echo " install: all cli_install gui_install" >> Makefile echo " cli_install:" >> Makefile echo " \$(MAKE) -C lib install \$(MAKE) -C console install \$(MAKE) -C plugins install \$(MAKE) -C man install" >> Makefile echo " gui_install:" >> Makefile if test "$__enable_gui" = "yes" ; then echo " \$(MAKE) -C gui install" >> Makefile fi echo " uninstall: cli_uninstall gui_uninstall" >> Makefile echo " cli_uninstall:" >> Makefile echo " \$(MAKE) -C lib uninstall \$(MAKE) -C console uninstall \$(MAKE) -C plugins uninstall \$(MAKE) -C man uninstall" >> Makefile echo " gui_uninstall:" >> Makefile if test "$__enable_gui" = "yes" ; then echo " \$(MAKE) -C gui uninstall" >> Makefile fi echo " help: @echo \"\" @echo \"Alailable targets:\" @echo \"all - build all\" @echo \"cli - build libs and console tools\" @echo \"gui - build gui only\" @echo \"install - install all\" @echo \"cli_install - install libs and console tools\" @echo \"gui_install - install gui only\" @echo \"\" @echo \"clean - clean source tree from object files\" @echo \"uninstall - uninstall all\" @echo \"cli_uninstall - uninstall libs and console tools\" @echo \"gui_uninstall - uninstall gui only\"" >> Makefile echo " .PHONY: all clean cli lib console plugins man nogui gui install cli_install gui_install uninstall cli_uninstall gui_uninstall help" >> Makefile } create_makefile_gui() { mf="gui/Makefile" echo "* $mf" rm -f $mf if test "$OSL" = "netbsd" ; then qt_dir="/usr/pkg/qt4" echo "QTDIR=$qt_dir" >> $mf echo "LDFLAGS+=-Wl,-R/usr/X11R7/lib" >> $mf fi echo "QTDIR=$qt_dir" >> $mf echo "QMAKE4= $__qmake" >> $mf if test "$GMAKE" = "yes" ; then echo "export QTDIR QMAKE4" >> $mf fi echo " all: Makefile.qmake" >> $mf if test "$OSL" = "mingw32" ; then if test "$__enable_debug" = "yes" ; then echo " \$(MAKE) -f Makefile.qmake debug $@" >> $mf else echo " \$(MAKE) -f Makefile.qmake release $@" >> $mf fi else echo " \$(MAKE) -f Makefile.qmake $@" >> $mf if test "$__enable_debug" = "no" ; then if test "$OSL" = "darwin" ; then # echo " strip qpxtool.app/Contents/MacOS/qpxtool" >> $mf echo " " >> $mf else echo " strip --strip-unneeded qpxtool" >> $mf fi fi fi echo " lrelease -verbose qpxtool.pro" >> $mf echo " clean: Makefile.qmake rm -f Makefile.qmake rm -f qpxtool$__binsuff rm -f obj/* rm -f moc/* rm -f *~ rm -f src/*~ rm -f include/*~ rm -f locale/*.qm rm -f qrc_qpxtool.cpp" >> $mf case "$OSL" in "mingw32") echo " install: Makefile.qmake" >> $mf if test "$__enable_debug" = "yes" ; then echo " install -m 755 debug/qpxtool.exe \$(DESTDIR)\$(BINDIR)" >> $mf else echo " install -m 755 release/qpxtool.exe \$(DESTDIR)\$(BINDIR)" >> $mf fi echo " uninstall: rm -f \$(DESTDIR)\$(BINDIR)/qpxtool.exe" >> $mf ;; *) echo " install: Makefile.qmake" >> $mf if test "$OSL" = "darwin" ; then echo " install -m 755 qpxtool.app/Contents/MacOS/qpxtool \$(DESTDIR)\$(BINDIR)/qpxtool" >> $mf else echo " install -m 755 qpxtool \$(DESTDIR)\$(BINDIR)/qpxtool" >> $mf fi echo " mkdir -p \$(DESTDIR)\$(PREFIX)/share/qpxtool/locale" >> $mf echo " install -m 644 locale/*.qm \$(DESTDIR)\$(PREFIX)/share/qpxtool/locale" >> $mf echo " mkdir -p \$(DESTDIR)\$(PREFIX)/share/pixmaps" >> $mf echo " install -m 644 images/q.png \$(DESTDIR)\$(PREFIX)/share/pixmaps/qpxtool.png" >> $mf echo " mkdir -p \$(DESTDIR)\$(PREFIX)/share/applications" >> $mf echo " install -m 644 qpxtool.desktop \$(DESTDIR)\$(PREFIX)/share/applications/qpxtool.desktop" >> $mf echo " uninstall: rm -f \$(DESTDIR)\$(BINDIR)/qpxtool rm -rf \$(DESTDIR)\$(PREFIX)/share/qpxtool rm -f \$(DESTDIR)\$(PREFIX)/share/pixmaps/qpxtool.png rm -f \$(DESTDIR)\$(PREFIX)/share/applications/qpxtool.desktop" >> $mf ;; esac echo " Makefile.qmake: rm -f Makefile.qmake \$(QMAKE4) LIBS+=-L../lib/lib LIBS+=-lqpxtransport $QDEBUG -o Makefile.qmake" >> $mf echo " .PHONY: all clean install uninstall" >> $mf } create_makefile_lib() { mf="lib/Makefile.lib" echo "* $mf" rm -f $mf case "$OSL" in darwin) echo " LIB_SHORT = $__libpref\$(LIBN)$__libsuff LIB = $__libpref\$(LIBN).\$(VER_MAJOR).\$(VER_MINOR).\$(VER_MICRO)$__libsuff CXXFLAGS += -I. -I./include -I../include LDFLAGS += -dynamiclib -Wl -install_name \$(LIBDIR)/\$(LIB_SHORT) " >> $mf ;; mingw32) echo " LIB_SHORT = $__libpref\$(LIBN)$__libsuff LIB = \$(LIB_SHORT) CXXFLAGS += -I. -I./include -I../include LDFLAGS += -shared -Wl,-soname,\$(LIB_SHORT) " >> $mf ;; *) echo " LIB_SHORT = $__libpref\$(LIBN)$__libsuff LIB_SONAME = \$(LIB_SHORT).\$(VER_MAJOR) LIB_SONAMEV= \$(LIB_SONAME).\$(VER_MINOR) LIB = \$(LIB_SONAMEV).\$(VER_MICRO) CXXFLAGS += -I. -I./include -I../include LDFLAGS += -shared -Wl,-soname,\$(LIB_SONAME) " >> $mf ;; esac echo " all: \$(LIB) \$(LIB): \$(OBJS) \$(CXX) \$(CXXFLAGS) \$(LDFLAGS) $^ -o \$@ \$(LDLIBS) mkdir -p ../lib ln -fs ../\$(DIR)/\$(LIB) ../lib/\$(LIB_SHORT) " >> $mf case "$OSL" in darwin) echo " clean: rm -f \$(LIB)* \$(OBJS) ../lib/\$(LIB) *~ include/*~ install: " >> $mf if test "$__enable_debug" = "no" ; then if test "$OSL" != "darwin" ; then echo " strip --strip-unneeded \$(LIB)" >> $mf fi fi echo " mkdir -p \$(DESTDIR)\$(LIBDIR) install -m 755 \$(LIB) \$(DESTDIR)\$(LIBDIR) ln -sf \$(LIB) \$(DESTDIR)\$(LIBDIR)/\$(LIB_SHORT) install -m 644 \$(HDRS) \$(DESTDIR)\$(INCDIR)/qpxtool uninstall: rm -f \$(DESTDIR)\$(LIBDIR)/\$(LIB_SHORT) rm -f \$(DESTDIR)\$(LIBDIR)/\$(LIB) " >> $mf ;; mingw32) echo " clean: rm -f \$(LIB_SHORT)* \$(OBJS) ../lib/\$(LIB_SHORT) *~ include/*~ install: mkdir -p \$(DESTDIR)\$(LIBDIR) install -m 755 \$(LIB) \$(DESTDIR)\$(LIBDIR) uninstall: rm -f \$(DESTDIR)\$(LIBDIR)/\$(LIB) " >> $mf ;; *) echo " clean: rm -f \$(LIB_SHORT)* \$(OBJS) ../lib/\$(LIB_SHORT) *~ include/*~ install: " >> $mf if test "$__enable_debug" = "no" ; then if test "$OSL" != "darwin" ; then echo " strip --strip-unneeded \$(LIB)" >> $mf fi fi echo " mkdir -p \$(DESTDIR)\$(LIBDIR) install -m 755 \$(LIB) \$(DESTDIR)\$(LIBDIR) ln -sf \$(LIB) \$(DESTDIR)\$(LIBDIR)/\$(LIB_SONAME) ln -sf \$(LIB_SONAME) \$(DESTDIR)\$(LIBDIR)/\$(LIB_SHORT) install -m 644 \$(HDRS) \$(DESTDIR)\$(INCDIR)/qpxtool uninstall: rm -f \$(DESTDIR)\$(LIBDIR)/\$(LIB_SHORT) rm -f \$(DESTDIR)\$(LIBDIR)/\$(LIB_SONAME) rm -f \$(DESTDIR)\$(LIBDIR)/\$(LIB) " >> $mf ;; esac echo " .PHONY: all clean install uninstall" >> $mf } create_makefile_plugin() { mf="plugins/Makefile.plugin" echo "* $mf" rm -f $mf case "$OSL" in darwin) PLUGIN_LDFLAGS=" -dynamiclib -Wl" ;; *) PLUGIN_LDFLAGS=" -shared -Wl,-soname,\$(LIB_SONAME)" ;; esac echo " SRC = qscan_plugin qscan_cmd HDRS = qscan_plugin.h SRCS = \$(patsubst %,%.cpp, \$(SRC)) OBJS = \$(patsubst %.cpp,%.o,\$(SRCS)) LIB_SHORT = lib\$(LIBN)$__libsuff LIB_SONAME = \$(LIB_SHORT) LIB = \$(LIB_SHORT) CPPFLAGS += -I. -I../../lib/include LDFLAGS += $PLUGIN_LDFLAGS LDLIBS += -L../../lib/lib -lqpxtransport -lqpxscan all: \$(LIB) \$(LIB): \$(OBJS) \$(CXX) \$(CXXFLAGS) \$(LDFLAGS) $^ -o \$@ \$(LDLIBS) mkdir -p ../lib ln -fs ../\$(DIR)/\$(LIB) ../lib/\$(LIB_SHORT) clean: rm -f \$(LIB_SHORT) \$(OBJS) ../lib/\$(LIB_SHORT) *~ include/*~ install: " > $mf if test "$__enable_debug" = "no" ; then if test "$OSL" != "darwin" ; then echo " strip --strip-unneeded \$(LIB_SHORT)" >> $mf fi fi echo " mkdir -p \$(DESTDIR)\$(PLUGINDIR) install -m 755 \$(LIB_SHORT) \$(DESTDIR)\$(PLUGINDIR) uninstall: rm -f \$(DESTDIR)\$(PLUGINDIR)/\$(LIB_SHORT) .PHONY: all clean install uninstall " >> $mf } show_help() { echo "--prefix=PREFIX set installation prefix" echo "--bindir=BINDIR set path to install binaries" echo "--sbindir=SBINDIR set path to install system binaries" echo "--libdir=LIBDIR set path to install libraries" echo "--mandir=MANDIR set path to install mans" echo "--qmake=QMAKE_COMMAND set QT4 qmake command" echo " default is to check folowing: $QMAKE4_NAMES" echo "--disable-png disable PNG support in f1tattoo (auto)" echo "--disable-gui don't compile GUI" echo "--enable-debug build debug version" echo "--disable-liteon-probe disable device probing in LiteOn plugin" echo " enabled by default, but this code may cause some devices hang" echo "--disable-internal-wt disable internal CD/DVD writing implementation and use cdrecord instead" exit } #echo "Parsing parameters..." for arg in $* ; do case $arg in --help|-h) show_help ;; --prefix=*) __prefix=`echo $arg | cut -d '=' -f 2-` ;; --bindir=*) bindir=`echo $arg | cut -d '=' -f 2-` ;; --sbindir=*) sbindir=`echo $arg | cut -d '=' -f 2-` ;; --libdir=*) libdir=`echo $arg | cut -d '=' -f 2-` ;; --mandir=*) mandir=`echo $arg | cut -d '=' -f 2-` ;; --qmake=*) __qmake=`echo $arg | cut -d '=' -f 2-` ;; --disable-png) __enable_png="no" ;; --disable-gui) __enable_gui="no" ;; --enable-debug) __enable_debug="yes" ;QDEBUG="CONFIG+=debug" ;; --disable-liteon-probe) __plugins_liteon_noprobe="yes" ; PLUGIN_DEFS+="-DPLUGINS_LITEON_NOPROBE" ;; --disable-internal-wt) __wt_internal="no" ; DEFS+="-DDISABLE_INTERNAL_WT" ;; *) echo "invalid argument: $arg" exit ;; esac done echo -n "Checking OS... " OS=`uname -s` OSL=`uname -s | tr '[A-Z]' '[a-z]'` echo $OS case $OSL in linux) OSDEFS="-fPIC" OSLIBS_DL="-ldl" OSLIBS_THREAD="-lpthread" __defprefix="/usr/local" ;; darwin) OSDEFS="-D__unix -fPIC" OSLIBS_THREAD="-lpthread" OSLIBS_HW="-framework CoreFoundation -framework IOKit" __defprefix="/usr" __libsuff=".dylib" ;; freebsd) OSDEFS="-fPIC" OSLIBS_THREAD="-lpthread" OSLIBS_HW="-lcam" __defprefix="/usr" ;; netbsd|openbsd) OSDEFS="-fPIC" OSLIBS_THREAD="-lpthread" __defprefix="/usr" ;; mingw32*) OSL="mingw32" __cc=gcc __cpp=g++ OSLIBS_THREAD="" OSLIBS_INET="-lws2_32" __defprefix="/c/Progra~1/QPxTool" __binsuff=".exe" __libpref="" __libsuff=".dll" ;; *) echo "OS not supported: $OS" ;; esac if test "$__prefix" = "" ; then __prefix=$__defprefix fi echo -n "Checking machine arch... " ARCH=`uname -m | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-'` BHOST=`uname -srv` case "$OSL" in linux) __bindir=$__prefix/bin __sbindir=$__prefix/sbin if test "$ARCH" = "x86_64" ; then __libdir=$__prefix/lib64 else __libdir=$__prefix/lib fi __plugindir=$__libdir/qpxtool __incdir=$__prefix/include __mandir=$__prefix/share/man ;; netbsd|openbsd|freebsd|darwin) __bindir=$__prefix/bin __sbindir=$__prefix/sbin __libdir=$__prefix/lib __plugindir=$__libdir/qpxtool __incdir=$__prefix/include __mandir=$__prefix/share/man ;; mingw32*) __bindir=$__prefix __sbindir=$__prefix __libdir=$__prefix __plugindir=$__prefix/plugins __incdir=$__prefix/include __mandir=$__prefix/man ;; *) __bindir=$__prefix/bin __sbindir=$__prefix/sbin __libdir=$__prefix/lib __plugindir=$__libdir/qpxtool __incdir=$__prefix/include __mandir=$__prefix/man ;; esac echo $ARCH if test "$bindir" != "" ; then __bindir=$bindir fi if test "$sbindir" != "" ; then __sbindir=$sbindir fi if test "$libdir" != "" ; then __libdir=$libdir fi if test "$mandir" != "" ; then __mandir=$mandir fi check_make check_compiler if test "$__enable_png" = "yes" ; then check_libpng fi if test "$__enable_gui" = "yes" ; then ckeck_qt4 fi echo "" echo "** Creating Makefiles..." create_makefile_top create_makefile_lib create_makefile_plugin if test "$__enable_gui" = "yes" ; then create_makefile_gui fi echo "" echo "** install prefix: "$__prefix echo "** debug version: "$__enable_debug echo "** PNG support: "$__enable_png echo "** build gui: "$__enable_gui echo "** use internal WT: "$__wt_internal echo "" echo "Installation paths:" echo " bin : "$__bindir echo " sbin : "$__sbindir echo " libs : "$__libdir echo " plugins : "$__plugindir echo " includes : "$__incdir"/qpxtool" echo " man : "$__mandir echo "** Configuration finished! run \`$MAKE\` now" cleanup qpxtool-0.7.1_002/Session.vim0000644000175000001440000001742511337001630015221 0ustar shultzuserslet SessionLoad = 1 if &cp | set nocp | endif let s:cpo_save=&cpo set cpo&vim imap :Ex i imap :TlistToggle imap :wa :make && ./run.sh imap :wa :make i imap :tabn i imap :tabp i imap :copen imap :w i vmap  "+yi vmap  :call OpenCloseFold() nmap  :call OpenCloseFold() map  :qa map  :wa :mks! nmap  dd nmap  nmap ; :%s/\<=expand("") \>/ vmap <  >gv map Q gq nmap gx NetrwBrowseX nmap :tabp nmap :tabn nmap :wa :make nmap :wa :make && ./run.sh nmap :TlistToggle nmap :Ex nnoremap NetrwBrowseX :call netrw#NetrwBrowseX(expand(""),0) vmap :Ex i omap :Ex vmap :TlistToggle omap :TlistToggle vmap :wa :make && ./run.sh omap :wa :make && ./run.sh vmap :wa :make i omap :wa :make vmap :tabn i omap :tabn vmap :tabp i omap :tabp vmap :copen nmap :copen vmap :w i nmap :w map imap  yypi imap  :call OpenCloseFold() imap  =InsertTabWrapper() inoremap  u imap  "+gPi inoremap  omni#cpp#maycomplete#Complete() imap  ddi inoremap . omni#cpp#maycomplete#Dot() inoremap : omni#cpp#maycomplete#Scope() inoremap > omni#cpp#maycomplete#Arrow() imap >Ins> i imap [ [] imap { { }O let &cpo=s:cpo_save unlet s:cpo_save set autoindent set backspace=indent,eol,start set backup set complete=.,k,b,t set completeopt=menu,longest set fileencodings=ucs-bom,utf-8,default,latin1 set formatoptions=tqcr set helplang=ru set hidden set incsearch set laststatus=2 set matchpairs=(:),{:} set mouse=a set mousemodel=popup set omnifunc=omni#cpp#complete#Main set ruler set scrolljump=7 set scrolloff=7 set shiftwidth=4 set showcmd set smartindent set softtabstop=4 set statusline=%<%f%h%m%r\ %b\ %{&encoding}\ 0x\ \ %l,%c%V\ %P set tabstop=4 set whichwrap=b,s,<,>,[,] set wildcharm= set wildmenu let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 let v:this_session=expand(":p") silent only cd ~/projects/qpxtool-0.7.0_039 if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' let s:wipebuf = bufnr('%') endif set shortmess=aoO badd +150 plugins/liteon/qscan_cmd.cpp badd +1 plugins/plextor/qscan_cmd.cpp args plugins/liteon/qscan_cmd.cpp edit plugins/liteon/qscan_cmd.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 133 normal zo 137 normal zo 133 normal zo 144 normal zo 148 normal zo 152 normal zo 144 normal zo 170 normal zo 173 normal zo 170 normal zo let s:l = 150 - ((20 * winheight(0) + 23) / 47) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 150 normal! 01l tabedit plugins/plextor/qscan_cmd.cpp set splitbelow splitright set nosplitbelow set nosplitright wincmd t set winheight=1 winwidth=1 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=/*%s*/ setlocal complete=.,k,b,t setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= setlocal errorformat= setlocal noexpandtab if &filetype != 'cpp' setlocal filetype=cpp endif set foldcolumn=1 setlocal foldcolumn=1 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} set foldmethod=syntax setlocal foldmethod=syntax setlocal foldminlines=1 setlocal foldnestmax=20 set foldtext=MyFoldText() setlocal foldtext=MyFoldText() setlocal formatexpr= setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:} setlocal modeline setlocal modifiable setlocal nrformats=octal,hex set number setlocal number setlocal numberwidth=4 setlocal omnifunc=omni#cpp#complete#Main setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal noscrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=4 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal wrap setlocal wrapmargin=0 46 normal zo 247 normal zo 393 normal zo 397 normal zo 393 normal zo let s:l = 264 - ((46 * winheight(0) + 23) / 46) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 264 normal! 0 tabnext 2 if exists('s:wipebuf') silent exe 'bwipe ' . s:wipebuf endif unlet! s:wipebuf set winheight=1 winwidth=20 shortmess=filnxtToO let s:sx = expand(":p:r")."x.vim" if file_readable(s:sx) exe "source " . s:sx endif let &so = s:so_save | let &siso = s:siso_save doautoall SessionLoadPost unlet SessionLoad " vim: set ft=vim : qpxtool-0.7.1_002/config.h0000644000175000001440000000013611352116471014475 0ustar shultzusers#ifndef __CONFIG_H__ #define __CONFIG_H__ #define INSTALL_PREFIX "/usr" #endif //__CONFIG_H__ qpxtool-0.7.1_002/slack-desc0000644000175000001440000000101311245310054015000 0ustar shultzusersqpxtool: qpxtool: QPxTool - CD/DVD media check/drive control tools qpxtool: qpxtool: qpxtool: qpxtool - Qt4 frontend for other tools qpxtool: qpxtool: qscan - quality check tool qpxtool: qscand - network quality check daemon (frontend to qscan) qpxtool: readdvd - a little tool for reading damaged CD/DVD (multi-pass) qpxtool: cdvdcontrol - extended drive features control tool qpxtool: pxfw - firmware flasher for Plextor drives qpxtool: f1tattoo - DiscT@2 tool for Yamaha CRW-F1 qpxtool: qpxtool-0.7.1_002/status.html0000644000175000001440000002110211332264701015262 0ustar shultzusers
QPxTool 0.7 status: Release

Platforms support status
OS arch status notes
GNU/Linuxx86OK
x86-64OK
SPARCOK
MacOS XPPC
x86OK
FreeBSDOK
OpenBSDOK
NetBSDOK
win32x86OK no daemon mode in qscand
no png support in f1tattoo
print preview does not work if no printer installed


qpxtool: GUI controls
Feature Detect Control
Hide CD-R++
Single Session++
SpeedRead++
DVD+R bitsetting++
DVD+R DL bitsetting++
DVD+R(W) testwrite++
PoweRec++
VariRec CD++
VariRec DVD++
GigaRec++
SecuRec++
Silent Mode++
AutoStrategy++
MQCK++
AS DB++
AS DB Save/Load
PlexEraser++

qscan: Scan algo status
Algo CD DVD BD HD DVD
Read transfer OK OK
Write transfer OK OK
Error correction OK OK
Jitter/Asymmetry OK OK
Focus/Tracking OK OK
Time Analyser OK

qscan: Scan plugins status
CD DVD
Plugin probe sectors per interval ERRC JB FE/TE TA ERRC JB FE/TE TA
CD
ideal is 75
DVD
ideal is 16
PLEXTOR never 75 16 FULL FULL FULL FULL FULL FULL OK
PIONEER 75 16 bler,e22 pie,pif
ASUS ~75 ~16 bler,e22 pie,pif
NEC 75 16 bler,e22 pie,pif
LITE-ON dangerous 75 ~17 bler,e22,e32 pie,pif FULL
BENQ 75 ? FULL FULL FULL
BENQ ROM 75 256 bler,e22 jitter pie,pif jitter
TSST ? ? bler,e22 pie,pif
Generic C2 75 N/A C2 only N/A N/A N/A N/A N/A N/A N/A

Legend
done
unfinished
untested
unstable
planning
qpxtool-0.7.1_002/AUTHORS0000644000175000001440000000005211122707065014124 0ustar shultzusersGennady "ShultZ" Kozlov qpxtool-0.7.1_002/SupportedDevices0000644000175000001440000001025211336176660016302 0ustar shultzusersPer-plugin supported divices list (hardcoded in plugins, does not need probing) ******************************************************************** ** C2P ** Generic scan plugin for devices supported C2 pointers ** works on drives that can report C2 pointers with READ_CD command ******************************************************************** ** ASUS ** Scan plugin for real ASUS devices (based on MediaTek chipset) ** ASUS DRW-1612 ASUS DRW-1814 ASUS DRW-2014S1 ASUS DRW-2014L1 ******************************************************************** ** PLEXTOR ** Scan plugin for PLEXTOR devices (based on SANYO chipset) ** PLEXTOR CD-R PREMIUM PLEXTOR CD-R PREMIUM2 PLEXTOR DVDR PX-708A2 PLEXTOR DVDR PX-712A PLEXTOR DVDR PX-714A PLEXTOR DVDR PX-716A PLEXTOR DVDR PX-716AL PLEXTOR DVDR PX-755A PLEXTOR DVDR PX-760A ******************************************************************** ** LITEON ** Scan plugin for LITE-ON and LITE-ON-based devices, MediaTek chipset ** ** iHAS-xxx and iHAP-xxx devices also works if Lite-On plugin probe is not disabled ** LITE-ON LTR-52327S LITE-ON DVDRW LDW-811S LITE-ON DVDRW LDW-451S LITE-ON DVDRW LDW-851S LITE-ON DVDRW SOHW-812S LITE-ON DVD+RW SOHW-802S LITE-ON DVDRW SOHW-832S LITE-ON DVD+RW SOHW-822S LITE-ON DVDRW SOHW-1213S LITE-ON DVDRW SOHW-1613S LITE-ON DVDRW SOHW-1633S LITE-ON DVDRW SOHW-1653S LITE-ON DVDRW SOHW-1673S LITE-ON DVDRW SOHW-1693S LITE-ON DVDRW SHW-1635S LITE-ON DVDRW SHW-16H5S LITE-ON DVDRW SHW-160P6S LITE-ON DVDRW SHW-160H6S LITE-ON DVDRW SHM-165P6S LITE-ON DVDRW SHM-165H6S LITE-ON DVDRW SH-16A7 LITE-ON DVDRW LH-16W1 LITE-ON DVDRW LH-16A1 LITE-ON DVDRW LH-18A1 LITE-ON DVDRW LH-20A1 LITE-ON DVDRW DH-20A3 LITE-ON DVDRW DH-20A4 Slimtype DVD+RW SDW-421S Slimtype DVDRW SDW-431S Slimtype DVDRW SOSW-852S Slimtype DVD+RW SOSW-862S Slimtype DVDRW SOSW-813S Slimtype DVDRW SOSW-833S Slimtype DVD A DS8A2S SONY DVD RW DW-U18A SONY DVD RW DRU-700A SONY DVD RW DW-D18A SONY DVD RW DW-U20A SONY DVD RW DW-U21A SONY DVD RW DRU-710A SONY DVD RW DW-D22A SONY DVD RW DW-D23A SONY DVD RW DRU-720A SONY DVD RW DW-D26A SONY DVD RW DRU-800A SONY DVD RW DW-Q28A SONY DVD RW DW-Q30A SONY DVD RW DW-Q31A SONY DVD RW DW-Q120A SONY DVD RW DW-G120A TEAC DV-W58G TEAC DV-W58G-A TEAC DV-W512G TEAC DV-W516G TEAC DV-W516GA TEAC DV-W516GB PLEXTOR DVR PX-806 PLEXTOR DVR PX-850 SONY DVD RW DW-D56A SONY DVD+RW DW-R56A SONY DVD RW DW-Q58A SONY DVD RW DW-Q60A ******************************************************************** ** NEC ** Scan plugin for NEC devices ** _NEC DVD_RW ND-3520 _NEC DVD_RW ND-353 _NEC DVD_RW ND-354 _NEC DVD_RW ND-355 _NEC DVD_RW ND-357 _NEC DVD_RW ND-365 _NEC DVD_RW ND-455 _NEC DVD_RW ND-457 _NEC DVD_RW ND-465 Optiarc DVD RW AD-717 ******************************************************************** ** TSST ** Scan plugin for Toshiba-Samsung devices ** TSSTcorp CDDVDRW SH-S202N ******************************************************************** ** PIONEER ** Scan plugin for PIONEER and PIONEER-based devices ** PIONEER DVD-RW DVR-106 PIONEER DVD-RW DVR-107 PIONEER DVD-RW DVR-108 PIONEER DVD-RW DVR-109 PIONEER DVD-RW DVR-110 PIONEER DVD-RW DVR-111 PIONEER DVD-RW DVR-112 ASUS DRW-0402P ASUS DRW-0804P ASUS DRW-1604P ASUS DRW-1608P ASUS DRW-1608P2 ASUS DRW-1608P3 TEAC DV-W50D TEAC DV-W58D TEAC DV-W516D PLEXTOR DVR PX-810 ******************************************************************** ** BENQ_DVDROM ** Scan plugin for BENQ DVD-ROM devices ** PLEXTOR DVD-ROM PX-130 ******************************************************************** ** BENQ ** Scan plugin for BENQ and BENQ-based devices ** BENQ DVD DD DW1620 BENQ DVD DD DW1625 BENQ DVD DD DW1640 BENQ DVD DD DW1650 BENQ DVD DD DW1655 ******************************************************************** qpxtool-0.7.1_002/INSTALL0000644000175000001440000000045011207222377014111 0ustar shultzusersAlailable targets: all - build all cli - build libs and console tools gui - build gui only install - install all cli_install - install libs and console tools gui_install - install gui only clean - clean source tree from object files uninstall - uninstall all qpxtool-0.7.1_002/ChangeLog0000644000175000001440000003623111353373332014640 0ustar shultzusersQPxTool ChangeLog *********************************************** ** 0.7.1_002 (2010-03-27) - some AutoStrategy-related fixes in gui - fixed binary stripping in MacOSX *********************************************** ** 0.7.1 (2010-03-10) - fixed some typos - added qscand and qpxtool man pages, just description now (Thomas Maguin) - some fixes in Makefiles created by 'configure' - extended BENQ CD ERCC test - added POE info to BENQ DVD ERRC test - fixed ERRC speeds in BENQ plugin - DVD FE/TE test in Lite-On plugin implemented (speed graph is not valid) - DVD FE/TE test in BENQ plugin introduced (but unusable now) - fixed starting address in generic 'C2P' plugin - added blacklist in Lite-On plugin: HL-DT-ST devices and TEAC CD-W552E readdvd: - some additional media checks - disabling read cache if possible cdvdcontrol: - fixed displaying saved SilentMode tray speeds libqscan: - fixed DVD ERRC algo for drives based on MediaTek chipsets (Lite-On, TSST) - fixed write transfer rate test on DVD+RW - fixed info about last block in read transfer rate test - internal write transfer rate implementation: - CD-R(W) (SAO & TAO write modes supported, TAO is used by default) - DVD-R(W), sequential write only (only single layer media tested) - DVD+R(W) (only single layer media tested) - DVD-RAM gui: - added German translation (Thomas Maguin) - some interface changes - some fixes in print preview - Plextor MQCK results shows correctly now - independent Jitter/Asymmetry scaling - does not loose media info, tests results and selected tests speeds then selecting plugin - fixed displaying saved SilentMode speed limits - fixed bugs with lrelease (thanks to Carsten Lohrke) - media info autoupdating (gui depends on libqpxtransport now) gui settings: - reports autosaving - autostart tests on inserted media - default tests for blank and written media setting - ejecting media after tests finished *********************************************** ** 0.7.0 (2009-12-24) gui: - printpreview mostly rewritten to workaround QTextDocument margins bug - added russian translation *********************************************** ** 0.7.0 RC4 (2009-12-08) libqpxyamaha: - additional checks for raw files gui: - implemented results saving/loading functions (via virtual "results viewer" device) - changed printpreview rendering mode for QT 4.4+ (much faster) - some fixes in printpreview *********************************************** ** 0.7.0 RC3 (2009-11-23) - NEC scan plugin: fixed returning drive to normal operation after test finished - implemented probing in all plugins - spec file: main package splitted to main, libs; fixed paths qscan: - added spare area info for DVD-RAM media libqpxscan: - fixed write transfer test could not start on DVD+R on non-PLEXTOR drives libqpxtransport: - fixed reading DVD+R recorded capacity on ASUS DRW-2014 *********************************************** ** 0.7.0 RC2 (2009-11-09) - fixed some bugs with big-endian CPU's (tested on SPARC) *********************************************** ** 0.7.0 RC1 (2009-11-02) - spec file: qpxtool separated to 3 packages: main, devel, gui - man pages: device names section is for all supported platorms now - added test speeds reporting by plugins libqpxtransport: - bus scaning code reworked gui: - fixed test capabilities updating when selecting plugin *********************************************** ** 0.7.0pre6 (2009-10-17) - mans path changed to man1 (except pxfw one) - added some path options to configure script - some MacOSX fixes in configure script - some code cleanup - fixes in transport code - some minor bugfixes gui: - added color presets - added qscan plugin selection - optimized print preview *********************************************** ** 0.7.0pre5 (2009-09-30) - added options to configuration script - successfully builds on OpenBSD (needs GNU Make) all features works with libpng and qt4 installed:) - some fixes for 64-bit machines *********************************************** ** 0.7.0pre4 (2009-09-22) - added configuration script - successfully builds on NetBSD (needs GNU Make), cli only gui: - some fixes in printing/saving results readdvd: - output file option '-i' changed to more obvisious '-o' *********************************************** ** 0.7.0pre3 (2009-09-11) gui: - another fixes in ERRC results - TA graph added to printed/saved results *********************************************** ** 0.7.0pre2 (2009-08-31) gui: - fixed average values in ERRC results - fixed build on x86-64 systems *********************************************** ** 0.7.0pre1 (2009-08-24) - win32(mingw32) and experimental MacOSX support - qpxtool gui completely rewritten using QT4 (gui is just front-end now) - deadreader renamed to readdvd - pxcontrol and pioquiet merged (and named cdvdcontrol) - added qscan: console quality scan tool - added qscand: network wrapper for qscan - added f1tattoo: DiscT@2 tool for Yamaha CRW-F1 qpxtool (gui): - simultaneous scan on miltiple devices - logarythmic/linear scale for error correction graph - user-changable graph colors - results printing readdvd: - parallel reading from multiple drives - reading CSS protected DVD's cdvdcontrol (pxcontrol): - fixed DVD+R(W) testwrite control - added MQCK support pxfw: - now supports Plextor Premium2 - fixed eeprom reading on Premium and PX-712 - fixed Premuim checksum caclulation error and more... *********************************************** ** 0.6.1 (2007-08-19) - Makefile-based build, thanks to Mike Frysinger - added 'uninstall' target - pxfw & pxcontrol man pages: Thomas Maguin - some code cleanup new: - pxfw now in QPxTool package - new tool called deadreader - multi-pass damaged discs reading - pxcontrol: full AutoStrategy support - pxcontrol: experimental AS database save/load, PX755/PX760 only (PX755 output is buggy, PX760 is more or less stable) - media change detection fixed: - it was unable to set Silent Mode speed limits for CD in 0.6.0 - fixed Plextor FE/TE scan if it's not standalone scan - fixed problem with NEC PIE & PIF scan on DVD+RW - fixed bug with DVD-ROM results saving - fixed Cx scan stability issue - fixed SegFault at the and of PIE/PIF scan on LiteOn and Pioneer drives - fixed compilation problems on some Linux distributions *********************************************** ** 0.6.0 (2006-08-25) - scons is used to compile stuff (get it at http://scons.org) - transport and vendor-specific code moved to separate libraries, you can use it for you purposes, but API is far to be stable - more informative SCSI error reporting - stability improved:) - Pi/Cx graph plot rewritten (readability improved) new: - POF on Plextor drives - C1/C2 on Pioneer drives - generic C2 scan on drives supported C2-pointers - changes in Pioneer PIE/PIF scan (especialy DVR-111 support improved) - one-pass PIE/PIF sum8 scan on many drives (separate PIF sum1 on Plextor & Nec only) - scale for all tests (except TA) in saved html - SecuRec support - Pioneer QuietMode support (for XL modifications) - pioquiet - console Pioneer QuietMode control tool fixed: - fixed CD-R detection problems on some drives - changed CD track list reading algorythm, now it should also work on old MMC-1 drives - transfer rate can be performed on Audio-CD now if drive can do DAE - spinup is a time controled now, not fixed sectors count - problem with resolving png's path if it's relative (then saving results as html) - various minor bugfixes - some bugfixes in pxcontrol *********************************************** ** 0.5.4 (2006-07-13) new: - pxcontrol 0.9 - console Plextor control tool - more drives support fixed: - some minor bugfixes *********************************************** ** 0.5.3 (2006-06-05) new: - PIE/PIF on Lite-On drives - BenQ support (Cx and PIE/PIF) *********************************************** ** 0.5.2 (2006-05-29) new: - PIE/PIF scan on NEC drives fixed: - manual vendor-specific command set selection didn't work in 0.5.0 NB: some drives may hang, if you selected Lite-On commands *********************************************** ** 0.5.1 (2006-05-27) - To get full fuctionality of Plextor PX-755/760 you need Plexluthor patched FW. can be found at this page: http://forum.rpc1.org/dl_firmware.php?category=4&manufactor=38 new: - Extended CD scan for Plextor drives. it shows BLER, E11, E21, E31, E12, E22, E32! (this graphs automatically included in saved html if Cx checked) - autoclearing tests results before new scan - manual selection of vendor-specific command set for you drive, if automatic recognition fails. Please report INQUIRY of your drive and command set, if it works! fixed: - more realistic PIE/PIF scan results on Pioneer drives. now it runs with 8ECC interval, also results changed interpreting *********************************************** ** 0.5.0 (2006-03-19) - some optimizations for lower CPU usage new: - Plextor PX-755 now realy works! (with patched FW) - Plextor PX-130 support - PIE/PIF scan on Pioneer drives - C1/C2 scan on LiteOn drives - disc lock and eject ability - full VariRec support: separate Laserpower & Strategy change for CD & DVD - PoweRec support - shows GigaRec rate of inserted CD - Silent Mode support - Bitsetting for DVD+R & DVD+R DL - Simulation on DVD+R(W) - AutoStrategy support - PlexEraser support - FE/TE test fixed: - drive selection is disabled during scan to prevent some problems - fixed speed detection problems on some DVD drives supported Realtime Streaming but refuses GET_PERFORMANCE command *********************************************** ** 0.4.3 (2006-01-26) problem: - PX-7[55|60] are not really supported due to 'authorised commands' new: - shows CD-R(W) manufacturer - Jitter in percentage - spindown setting (works correctly on all drives I have) - reduced CPU usage during Transfer Rate test - supported speeds detection instead fixed speeds list fixed: - maximum speed selection now sets meximum speed on ALL drives *********************************************** ** 0.4.2 (2005-12-09) new: - Plextor PX-755 support (same as PX760, but can't write DVD+/-R at 18x) fixed: - fixed average CD read speed (it was multiplyed by 100) - fixed Segmentation Fault then selecting CD-ROM drive *********************************************** ** 0.4.1 (2005-11-29) fixed: - 'C2/PIF' in Pi/Cx tab was called 'C1/PIF' in 0.4.0 - some minor bugfixes *********************************************** ** 0.4.0 (2005-11-05) - C1/C2 on NEC drives tested. It works. new: - tracks information displaying (type, duration...) - TA results clearing - results saving as .html or individual .png's *********************************************** ** 0.3.5.8 (2005-10-30) fixed: - transfer rate can't run on CD's in 0.3.5 *********************************************** ** 0.3.5 (2005-10-30) - improvements in media check code - changes in Capabilities page: "V" = drive supported this feature "X" = unsupported "?" = detection incomplete new: - C1/C2 scan on NEC drives. UNTESTED! fixed: - now correctly detects DVD+/-R(W)[DL] even if drive is DVD-ROM. only one problem - can't differ DVD-RW Restricted Overwrite from Sequential - some minor bugfixes *********************************************** ** 0.3.4 (2005-10-25) - some GUI changes new: - Plextor PX-760 support - result clearing ability fixed: - speed setting method now different for CD and DVD - swaped DVD-RW Sequential and Restricted Overwrite *********************************************** ** 0.3.3 (2005-10-21) - some GUI changes, added status and menu bar - test order changed: now Transfer Rate runs first new: - simple build script added to prevent come compilation problems fixed: - C1/C2/CU total & max error rate were zeroed at the end of scan - now zeroing writable size if drive is not writer, because readers can't perfectly detect free size *********************************************** ** 0.3.2 (2005-10-07) new: - more drive capabilities detection fixed: - segmentation fault then trying to turn SpeedRead _on_ in 0.3.1 *********************************************** ** 0.3.1 (2005-10-06) new: - shows current sector during test - test duration (for all tests, except TA) - realtime average error rate calculating, not only at the end of test - average speed - reading writer info from RMA (only for DVD-R) fixed: - Plextor Hide CD-R and SingleSession goes off while detecting it (bug only in 0.3.0) - DVD DL media testing *********************************************** ** 0.3.0 (2005-10-02) new: - read/write capabilities detection CD-ROM/R/RW DDCD-ROM/R/RW DVD-ROM/RAM/-R/-RW/-RDL/+R/+RW/+RDL BD-ROM/R/RE - general capabilities detection fixed: - for stability improvement all GUI operations moved to main thread (to prevent X assync reply error) - media type detection problems on MMC-1 drives - CD transfer rate test on drives not supported CD-DA commands *********************************************** ** 0.2.1 (2005-09-21) - added hdu..hdz, sr16..sr21 to scan list fixed: - spinup disc before transfer rate test - broken error calculation in 0.2.0 *********************************************** ** 0.2.0 (2005-09-20) - HISTORY renamed to ChangeLog new: - PX-708A2 support - PX-714 support (same as PX-716) - vertical grid - grid for read transfer rate test - fixed horizontal scale: 750 sectors/pix for CD 4368 sectors/pix for DVD fixed: - missing Plextor Premium ID string - main thread goes down during tests in older versions *********************************************** ** 0.1.2 (2005-09-09) - transport code reorganisation fixed: - fatal error, then exit by window controls, not 'exit' button *********************************************** ** 0.1.1 (2005-09-08) - some code cleanups fixed: - real DVD transfer rate was limited to 3x *********************************************** ** 0.1 (2005-09-04) initial release drives supported for disc quality testing: - Plextor: - PlexWriter Premium - PX-712 - PX-716 features: - bus scanning (hda..hdt, sr0..sr15) - detecting media type (CD-ROM/R/RW, DVD-ROM/RAM/R/RDL/RW/+R/+RW/+RDL) and MID code for DVD's - Plextor features: - GigaRec - Hide-CDR - Single-Session - Speed Read - Read transfer rate test - CD quality tests: - C1/C2/CU (logarythmic scale) - Beta/Jitter - DVD quality tests: - PIE (sum8) (logarythmic scale) - PIF (sum1) (logarythmic scale) - Beta/Jitter - TA (only PX-716 supported this) qpxtool-0.7.1_002/plugins/0000755000175000001440000000000011352116471014540 5ustar shultzusersqpxtool-0.7.1_002/plugins/lib/0000755000175000001440000000000011352127612015305 5ustar shultzusersqpxtool-0.7.1_002/plugins/nec/0000755000175000001440000000000011352127612015304 5ustar shultzusersqpxtool-0.7.1_002/plugins/nec/Makefile0000644000175000001440000000005511255672652016757 0ustar shultzusersLIBN = qscan_nec include ../Makefile.plugin qpxtool-0.7.1_002/plugins/nec/qscan_plugin.h0000644000175000001440000000467511327563112020155 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_NEC_H #define __QSCAN_NEC_H //#include //#include #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = { { "_NEC ", DEV_NEC, "DVD_RW ND-3520", NEC_3520, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-353", NEC_3530, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-354", NEC_3540, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-355", NEC_4550, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-357", NEC_4570, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-365", NEC_4650, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-455", NEC_4550, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-457", NEC_4570, CHK_ERRC_CD | CHK_ERRC_DVD }, { "_NEC ", DEV_NEC, "DVD_RW ND-465", NEC_4650, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Optiarc ", DEV_NEC, "DVD RW AD-717", NEC_4650, CHK_ERRC_CD | CHK_ERRC_DVD }, { "", 0, "", 0} }; static const char plugin_name[]="NEC"; static const char plugin_desc[]="Scan plugin for NEC devices"; class drive_info; class scan_nec : public scan_plugin { public: // scan_nec(drive_info* idev=NULL); scan_nec(drive_info* idev); virtual ~scan_nec(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int* get_test_speeds(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; // CD ERRC methods int cmd_cd_errc_init(); int cmd_cd_errc_block(cd_errc *data); // int cmd_cd_errc_getdata(cd_errc *data); // DVD ERRC methods int cmd_dvd_errc_init(); int cmd_dvd_errc_block(dvd_errc *data); // int cmd_dvd_errc_getdata(dvd_errc *data); int cmd_scan_end(); }; #endif // __QSCAN_NEC_H qpxtool-0.7.1_002/plugins/nec/qscan_plugin.cpp0000644000175000001440000000617511336717044020512 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include static const int SPEEDS_ERRC_CD[] = { /* 4*CD_SPEED_MULT, 8*CD_SPEED_MULT, 24*CD_SPEED_MULT, 32*CD_SPEED_MULT, 40*CD_SPEED_MULT, */ 0 }; static const int SPEEDS_ERRC_DVD[] = { 2*DVD_SPEED_MULT, 5*DVD_SPEED_MULT, 8*DVD_SPEED_MULT, 12*DVD_SPEED_MULT, 16*DVD_SPEED_MULT, 0 }; scan_plugin* plugin_create(drive_info* idev) { return new scan_nec(idev); } void plugin_destroy(scan_plugin* iplugin) { if (iplugin != NULL) delete iplugin; } scan_nec::scan_nec(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_nec()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_nec::~scan_nec() { if (!dev->silent) printf("~scan_nec()\n"); } int scan_nec::probe_drive() { if (!strncmp(dev->ven,"TSSTcorp", 8)) return DEV_FAIL; if (dev->media.type & DISC_CD) { if (cmd_cd_errc_init()) return DEV_FAIL; if (cmd_scan_end()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; if (cmd_scan_end()) return DEV_FAIL; } else { return DEV_FAIL; } return DEV_PROBED; } int scan_nec::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); } return 0; } int scan_nec::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & ~DISC_DVDRAM) return 0; break; default: break; } return -1; } int* scan_nec::get_test_speeds(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & DISC_CD) return NULL; // return (int*)SPEEDS_ERRC_CD; if (dev->media.type & DISC_DVD) return NULL; // return (int*)SPEEDS_ERRC_DVD; break; default: break; } return NULL; } int scan_nec::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; switch (itest) { case CHK_ERRC_CD: lba=ilba; set_read_speed(speed); r = cmd_cd_errc_init(); break; case CHK_ERRC_DVD: lba=ilba; set_read_speed(speed); r = cmd_dvd_errc_init(); break; default: return -1; } if (!r) { test = itest; } else { test = 0; } return r; } int scan_nec::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; default: return -1; } } int scan_nec::end_test() { cmd_scan_end(); test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/nec/qscan_cmd.cpp0000644000175000001440000000573411316367275017764 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2006 Gennady "ShultZ" Kozlov * * * NEC Cx scan commands got from readcd path by Alexander Noe` * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include //#include "media_check_nec.h" // ************* Scan init commands ********* int scan_nec::cmd_cd_errc_init() { /* initialize scan mode */ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x01; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ if(!dev->silent) sperror ("nec_init_cx_scan",dev->err); return 1; } /* set scan interval = 75 sectors */ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x02; dev->cmd[8] = 75; // interval in sectors if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ if(!dev->silent) sperror ("nec_set_cx_scan_interval",dev->err); return 1; } return 0; } int scan_nec::cmd_dvd_errc_init() { /* initialize scan mode */ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x01; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ if(!dev->silent) sperror ("nec_init_cx_scan",dev->err); return 1; } /* set scan interval = 8 ECC */ dev->cmd[0] = 0xF3; dev->cmd[1] = 0x02; dev->cmd[8] = 0x01; // interval in ECC blocks if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ if(!dev->silent) sperror ("nec_set_cx_scan_interval",dev->err); return 1; } return 0; } // ********************** int scan_nec::cmd_cd_errc_block(cd_errc *data) { long tlba; dev->cmd[0] = 0xF3; dev->cmd[1] = 0x03; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ sperror ("nec_cd_errc_do_one_interval",dev->err); if (dev->err == 0x30200) return 1; else return -1; } data->bler = ntoh16(dev->rd_buf+4); data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e22 = ntoh16(dev->rd_buf+6); data->e32 = 0; data->uncr = 0; lba+=75; tlba=((int)dev->rd_buf[1] * 4500 + (int)dev->rd_buf[2] * 75 + (int)dev->rd_buf[3]); if (lbacmd[0] = 0xF3; dev->cmd[1] = 0x03; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ sperror ("nec_dvd_errc_do_one_interval",dev->err); if (dev->err == 0x30200) return 1; else return -1; } data->pie = ntoh16(dev->rd_buf+4); // data->pi8 = data->pie; data->pif = ntoh16(dev->rd_buf+6); data->poe = 0; // data->po8 = data->poe; data->pof = 0; lba=ntoh32(dev->rd_buf); // *lba+=0x80; return 0; } // ************* END SCAN COMMAND ********* int scan_nec::cmd_scan_end() { dev->cmd[0] = 0xF3; dev->cmd[1] = 0x0F; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ sperror ("nec_end_scan",dev->err); return 1; } return 0; } qpxtool-0.7.1_002/plugins/benq/0000755000175000001440000000000011352127612015464 5ustar shultzusersqpxtool-0.7.1_002/plugins/benq/Makefile0000644000175000001440000000005611255672632017136 0ustar shultzusersLIBN = qscan_benq include ../Makefile.plugin qpxtool-0.7.1_002/plugins/benq/qscan_plugin.h0000644000175000001440000000505111331772722020326 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_BENQ_H #define __QSCAN_BENQ_H //#define BENQ_ENABLE_FETE #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { { "BENQ ", DEV_BENQ_WR, "DVD DD DW1620", BENQ_DW1620, CHK_ERRC_CD | CHK_ERRC_DVD }, { "BENQ ", DEV_BENQ_WR, "DVD DD DW1625", BENQ_DW1625, CHK_ERRC_CD | CHK_ERRC_DVD }, { "BENQ ", DEV_BENQ_WR, "DVD DD DW1640", BENQ_DW1640, CHK_ERRC_CD | CHK_ERRC_DVD }, { "BENQ ", DEV_BENQ_WR, "DVD DD DW1650", BENQ_DW1650, CHK_ERRC_CD | CHK_ERRC_DVD }, { "BENQ ", DEV_BENQ_WR, "DVD DD DW1655", BENQ_DW1655, CHK_ERRC_CD | CHK_ERRC_DVD }, // // Plextor PX-740 only works if crossflashed to BENQ DW1640 // { "PLEXTOR ", DEV_BENQ_WR, "DVDR PX-740", BENQ_DW1640, CHK_ERRC_CD | CHK_ERRC_DVD }, { "", 0, "", 0} }; static const char plugin_name[]="BENQ"; static const char plugin_desc[]="Scan plugin for BENQ and BENQ-based devices"; class drive_info; class scan_benq : public scan_plugin { public: // scan_benq(drive_info* idev=NULL); scan_benq(drive_info* idev); virtual ~scan_benq(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int* get_test_speeds(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; int cmd_check_mode_init(); int cmd_check_mode_exit(); int cmd_get_result(); int cmd_set_speed(unsigned char sidx); int cmd_start_errc(int lba); int cmd_start_fete(int lba); int cmd_read_block(); int cmd_getdata(); // CD ERRC methods int cmd_cd_errc_init(int &speed); int cmd_cd_errc_block(cd_errc *data); int cmd_cd_end(); // DVD ERRC methods int cmd_dvd_errc_init(int &speed); int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_end(); #ifdef BENQ_ENABLE_FETE int cmd_dvd_fete_init(int &speed); int cmd_dvd_fete_block(cdvd_ft *data); #endif unsigned char sidx; }; #endif qpxtool-0.7.1_002/plugins/benq/qscan_plugin.cpp0000644000175000001440000000770711336717002020666 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include static const int SPEEDS_ERRC_CD[] = { 8*CD_SPEED_MULT, 12*CD_SPEED_MULT, 24*CD_SPEED_MULT, 32*CD_SPEED_MULT, 40*CD_SPEED_MULT, 48*CD_SPEED_MULT, 0 }; static const int SPEEDS_ERRC_DVD[] = { 1*DVD_SPEED_MULT, 2*DVD_SPEED_MULT, 4*DVD_SPEED_MULT, 6*DVD_SPEED_MULT, 8*DVD_SPEED_MULT, 12*DVD_SPEED_MULT, 16*DVD_SPEED_MULT, 0 }; scan_plugin* plugin_create(drive_info* idev) { return new scan_benq(idev); } void plugin_destroy(scan_plugin* iplugin) { if (iplugin != NULL) delete iplugin; } scan_benq::scan_benq(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_benq()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_benq::~scan_benq() { if (!dev->silent) printf("~scan_benq()\n"); } int scan_benq::probe_drive() { if (dev->media.type & DISC_CD) { int spd=8; if (cmd_cd_errc_init(spd)) return DEV_FAIL; if (cmd_cd_end()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { int spd=4; if (cmd_dvd_errc_init(spd)) return DEV_FAIL; if (cmd_dvd_end()) return DEV_FAIL; } else { return DEV_FAIL; } return DEV_PROBED; } int scan_benq::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E11|ERRC_DATA_E21|ERRC_DATA_E31|ERRC_DATA_E12|ERRC_DATA_E22|ERRC_DATA_E32|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_POE|ERRC_DATA_POF|ERRC_DATA_UNCR); } return 0; } int scan_benq::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: return 0; #ifdef BENQ_ENABLE_FETE case CHK_FETE: // if (dev->media.dstatus) return -1; if (dev->media.type & DISC_DVD & ~DISC_DVDROM) return 0; break; #endif default: break; } return -1; } int* scan_benq::get_test_speeds(unsigned int itest) { switch (itest) { case CHK_ERRC: case CHK_JB: if (dev->media.type & DISC_CD) return (int*)SPEEDS_ERRC_CD; if (dev->media.type & DISC_DVD) return (int*)SPEEDS_ERRC_DVD; break; #ifdef BENQ_ENABLE_FETE #if 0 case CHK_FETE: if (dev->media.type & DISC_DVD) return (int*)SPEEDS_FETE_DVD; break; #endif #endif default: break; } return NULL; } int scan_benq::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; sidx=0; switch (itest) { case CHK_ERRC_CD: lba=ilba; r = cmd_cd_errc_init(speed); break; case CHK_ERRC_DVD: lba=ilba; r = cmd_dvd_errc_init(speed); break; #ifdef BENQ_ENABLE_FETE case CHK_FETE: // if (dev->media.dstatus) return -1; if (dev->media.type & DISC_DVD & ~DISC_DVDROM) { lba=ilba; r = cmd_dvd_fete_init(speed); break; } else { return 0; } #endif default: return -1; } if (!r) { test = itest; return r; } else { test = 0; return r; } } int scan_benq::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; #ifdef BENQ_ENABLE_FETE case CHK_FETE: if (dev->media.type & DISC_DVD & ~DISC_DVDROM) { r = cmd_dvd_fete_block((cdvd_ft*)data); } else { return -1; } #endif default: return -1; } } int scan_benq::end_test() { int r=0; switch (test) { case CHK_ERRC_CD: r = cmd_cd_end(); break; case CHK_ERRC_DVD: r = cmd_dvd_end(); break; #ifdef BENQ_ENABLE_FETE case CHK_FETE: r = cmd_check_mode_exit(); break; #endif default: break; } test=0; return r; } qpxtool-0.7.1_002/plugins/benq/qscan_cmd.cpp0000644000175000001440000003140711332502505020121 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include //#include #include #include #include #include //#define _BENQ_DEBUG 1 #define _BENQ_DEBUG2 1 int scan_benq::cmd_check_mode_init() { dev->cmd[0] = 0xFD; dev->cmd[1] = 0xF1; dev->cmd[2] = 0x42; dev->cmd[3] = 0x45; dev->cmd[4] = 0x4E; dev->cmd[5] = 0x51; #ifdef _BENQ_DEBUG printf("benq_check_mode_init\n"); #endif if ((dev->err=dev->cmd.transport(NONE,NULL,0))){ if(!dev->silent) sperror ("benq_check_mode_init",dev->err); return dev->err; } return 0; } int scan_benq::cmd_check_mode_exit() { dev->cmd[0] = 0xFD; dev->cmd[1] = 0xF2; dev->cmd[2] = 0x42; dev->cmd[3] = 0x45; dev->cmd[4] = 0x4E; dev->cmd[5] = 0x51; #ifdef _BENQ_DEBUG printf("benq_check_mode_exit\n"); #endif if ((dev->err=dev->cmd.transport(NONE,NULL,0))){ if(!dev->silent) sperror ("benq_check_mode_exit",dev->err); return dev->err; } return 0; } int scan_benq::cmd_get_result() { dev->cmd[0] = 0xF8; dev->cmd[8] = 0x02; #ifdef _BENQ_DEBUG printf("BENQ_CHECK_RESULT\n"); #endif if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,2))){ if(!dev->silent) sperror ("BENQ_CHECK_RESULT",dev->err); return dev->err; } printf("BENQ Check result: %02d %02d\n", dev->rd_buf[0], dev->rd_buf[1]); return ( (dev->rd_buf[0] << 8) | dev->rd_buf[1]); } int scan_benq::cmd_set_speed(unsigned char sidx) { dev->rd_buf[0] = 0xD2; dev->rd_buf[1] = 0x0A; dev->rd_buf[2] = sidx; dev->rd_buf[3] = 0x00; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x04; #ifdef _BENQ_DEBUG printf("BENQ_SET_ERRC_SPEED\n"); #endif if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,4))){ if(!dev->silent) sperror ("BENQ_SET_ERRC_SPEED",dev->err); return dev->err; } return (cmd_get_result()); } int scan_benq::cmd_start_errc(int lba) { dev->rd_buf[0] = 0xD4; dev->rd_buf[1] = 0x91; dev->rd_buf[2] = (lba >> 16) & 0xFF; dev->rd_buf[3] = (lba >> 8) & 0xFF; dev->rd_buf[4] = lba & 0xFF; dev->rd_buf[5] = 0x00; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x06; #ifdef _BENQ_DEBUG printf("BENQ_ERRC_SEEK\n"); #endif if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,6))){ if(!dev->silent) sperror ("BENQ_ERRC_SEEK",dev->err); return dev->err; } return (cmd_get_result()); } #ifdef BENQ_ENABLE_FETE int scan_benq::cmd_start_fete(int lba) { dev->cmd[0] = 0xFD; dev->cmd[1] = 0xFB; dev->cmd[2] = 0x42; dev->cmd[3] = 0x45; dev->cmd[4] = 0x4E; dev->cmd[5] = 0x51; dev->cmd[6] = 0x05; dev->cmd[7] = 0x02; dev->cmd[8] = (lba >> 16) & 0xFF; dev->cmd[9] = (lba >> 8) & 0xFF; dev->cmd[10]= lba & 0xFF; dev->cmd[11]= 0x04; #ifdef _BENQ_DEBUG printf("BENQ_START_FETE\n"); #endif if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ if(!dev->silent) sperror ("BENQ_START_FETE",dev->err); return dev->err; } return 0; } #endif // ************* Scan init commands ********* int scan_benq::cmd_cd_errc_init(int &speed) { int r; if ((r = cmd_check_mode_init())) return r; // ************ // available test speeds for CD // 0x00 - 8x // 0x01 - 12x // 0x06 - 24x // 0x08 - 32x // 0x09 - 40x // 0x0B - 48x // 0x10 - 8x CLV // 0x12 - 12x CLV // 0x13 - 16x CLV // 0x14 - 24x P-CAV // 0x15 - 32x P-CAV if (speed>=48) { speed = 48; sidx=0x0B; } // 48x else if (speed>=40) { speed = 40; sidx=0x09; } // 40x else if (speed>=32) { speed = 32; sidx=0x08; } // 32x else if (speed>=24) { speed = 24; sidx=0x06; } // 24x else if (speed>=16) { speed = 16; sidx=0x13; } // 16x CLV else if (speed>=12) { speed = 12; sidx=0x12; } // 12x CLV else { speed = 8; sidx=0x10; } // 8x CLV if (cmd_set_speed(sidx)) return dev->err; // ************ memset(dev->rd_buf, 0, 10); dev->rd_buf[0] = 0xC8; dev->rd_buf[1] = 0x99; dev->rd_buf[2] = 0x79; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x0A; #ifdef _BENQ_DEBUG printf("benq_init_cx_scan_3\n"); #endif if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,10))){ if(!dev->silent) sperror ("benq_init_cx_scan_3",dev->err); return dev->err; } cmd_get_result(); // ************ if (cmd_start_errc(0)) return 1; return 0; } int scan_benq::cmd_dvd_errc_init(int &speed) { int r; if ((r = cmd_check_mode_init())) return r; // ************ // available test speeds for DVD // 0x02 - 4x // 0x04 - 6x // 0x05 - 8x // 0x08 - 12x // 0x0A - 16x // 0x0C - 1x CLV // 0x0D - 2x CLV // 0x0E - 4x CLV // 0x0F - 6x CLV // 0x10 - 8x P-CAV if (speed >= 16) { speed = 16; sidx=0x0A; } // 16x CAV else if (speed >= 12) { speed = 12; sidx=0x08; } // 12X CAV else if (speed >= 8) { speed = 8; sidx=0x05; } // 8x CAV else if (speed >= 6) { speed = 6; sidx=0x0F; } // 6x CLV else if (speed >= 4) { speed = 4; sidx=0x0E; } // 4x CLV else if (speed >= 2) { speed = 2; sidx=0x0D; } // 2x CLV else { speed = 1; sidx=0x0C; } // 1x CLV if (cmd_set_speed(sidx)) return dev->err; // ************ memset(dev->rd_buf, 0, 10); dev->rd_buf[0] = 0xC8; dev->rd_buf[1] = 0x99; dev->rd_buf[2] = 0x79; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x0A; #ifdef _BENQ_DEBUG printf("benq_init_pi_scan_3\n"); #endif if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,10))){ if(!dev->silent) sperror ("benq_init_pi_scan_3",dev->err); return dev->err; } if (cmd_get_result()) return 1; // ************ if (cmd_start_errc(0x030000)) return 1; return 0; } #ifdef BENQ_ENABLE_FETE int scan_benq::cmd_dvd_fete_init(int &speed) { int r; // 0x13 16X // 0x12 12X // 0x11 10X ? // 0x10 8X // 0x0F 6X ? // 0x0E 4X // 0x0D 2.4X / 2X if (speed >= 16) { speed = 16; sidx=0x13; } else if (speed >= 12) { speed = 12; sidx=0x12; } else if (speed >= 10) { speed = 10; sidx=0x11; } else if (speed >= 8) { speed = 8; sidx=0x10; } else if (speed >= 6) { speed = 6; sidx=0x0F; } else if (speed >= 4) { speed = 4; sidx=0x0E; } else { speed = 2; sidx=0x0D; } if ((r = cmd_check_mode_init())) return r; dev->cmd[0] = 0xFD; dev->cmd[1] = 0xFB; dev->cmd[2] = 0x42; dev->cmd[3] = 0x45; dev->cmd[4] = 0x4E; dev->cmd[5] = 0x51; dev->cmd[6] = 0x05; dev->cmd[7] = 0x02; dev->cmd[8] = 0x25; dev->cmd[9] = 0xC0; dev->cmd[10]= 0x00; dev->cmd[11]= 0x03; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ if(!dev->silent) sperror ("benq_fete_init_1",dev->err); return dev->err; } return (cmd_start_fete(0x030000)); } #endif // ************ Scan commands *********** int scan_benq::cmd_read_block() { dev->rd_buf[0] = 0xC1; dev->rd_buf[1] = 0x9A; dev->rd_buf[2] = 0x00; dev->rd_buf[3] = 0x00; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x04; #ifdef _BENQ_DEBUG printf("benq_scan_block\n"); #endif if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,4))){ sperror ("benq_scan_block",dev->err); return dev->err; } return 0; } int scan_benq::cmd_getdata() { dev->cmd[0] = 0xF8; dev->cmd[7] = 0x01; dev->cmd[8] = 0x02; #ifdef _BENQ_DEBUG printf("benq_read_err\n"); #endif if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,258))){ sperror ("benq_read_err",dev->err); return dev->err; } return 0; } // *********** // CD tests // *********** int scan_benq::cmd_cd_errc_block(cd_errc *data) { int i,m,s,f,plba; #ifdef _BENQ_DEBUG printf("benq_cx_do_one_interval. LBA=%d\n",lba); #endif int found=0; int cnt=128; do { cmd_read_block(); cmd_getdata(); if ((!dev->rd_buf[0]) && (dev->rd_buf[1] == 0x63) && (dev->rd_buf[2] == 0x64) && (dev->rd_buf[3] == 0x6E)) { found = 1; #ifdef _BENQ_DEBUG2 printf("\nData block found...\n"); } else { // printf("."); // return 0; #endif } msleep(20); cnt--; } while ((!found) && (cnt)); if (!cnt) return 1; #ifdef _BENQ_DEBUG2 for (i=0; i<32; i++) { if (!(i%8)) printf("| "); printf("%02X ", dev->rd_buf[i] & 0xFF); } printf("|\n"); #endif data->e11 = ntoh16(dev->rd_buf+0x0C); data->e21 = ntoh16(dev->rd_buf+0x0E); // +0x0E or +0x30 ?? data->e31 = ntoh16(dev->rd_buf+0x28); data->bler = data->e11 + data->e21 + data->e31; data->e12 = ntoh16(dev->rd_buf+0x10); data->e22 = ntoh16(dev->rd_buf+0x12); data->e32 = ntoh16(dev->rd_buf+0x2A); // *lba+=75; // cnt++; m = ((dev->rd_buf[7] >> 4) & 0x0F)*10 + (dev->rd_buf[7] & 0x0F); s = ((dev->rd_buf[8] >> 4) & 0x0F)*10 + (dev->rd_buf[8] & 0x0F); f = ((dev->rd_buf[9] >> 4) & 0x0F)*10 + (dev->rd_buf[9] & 0x0F); plba = lba; lba = (m*60 + s)*75 + f; // printf("MSF: %02d:%02d.00 ; LBA: %d; C1:%4d; C2:%4d\n",m,s,*lba,*BLER,*E22); if ((lba-plba) > 150) lba = plba+75; if (lbard_buf[0] * 4500 + (int)dev->rd_buf[3] * 75 + (int)dev->rd_buf[2]); *lba = (((dev->rd_buf[7] & 0xF0)*10 + (dev->rd_buf[7] & 0x0F))*60 + (dev->rd_buf[7] & 0xF0))*10 + (dev->rd_buf[7] & 0x0F); return 0; } */ // *********** // DVD tests // *********** int scan_benq::cmd_dvd_errc_block(dvd_errc *data) { int i,plba; // int pif; #ifdef _BENQ_DEBUG printf("benq_pie_pif_do_one_interval. LBA=%d\n",lba); #endif int found=0; int cnt=256; do { cmd_read_block(); cmd_getdata(); if ((!dev->rd_buf[0]) && (dev->rd_buf[1] == 0x64) && (dev->rd_buf[2] == 0x76) && (dev->rd_buf[3] == 0x64)) { found = 1; #ifdef _BENQ_DEBUG2 printf("\nData block found...\n"); } else { printf("."); // return 0; #endif } msleep(20); cnt--; } while ((!found) && (cnt)); if (!cnt) return 1; #ifdef _BENQ_DEBUG2 for (i=0; i<32; i++) { if (!(i%8)) printf("| "); printf("%02X ", dev->rd_buf[i] & 0xFF); } printf("|\n"); #endif // 1PIE/ROW + 2PIE/ROW + 3PIE/ROW + 4PIE/ROW + 5PIE/ROW data->pie = ntoh16(dev->rd_buf+0x0C) +ntoh16(dev->rd_buf+0x0E) +ntoh16(dev->rd_buf+0x10) +ntoh16(dev->rd_buf+0x12) +ntoh16(dev->rd_buf+0x14); data->pif = ntoh16(dev->rd_buf+0x16); data->poe = // +ntoh16(dev->rd_buf+0x18) +ntoh16(dev->rd_buf+0x1A) +ntoh16(dev->rd_buf+0x1C) +ntoh16(dev->rd_buf+0x1E) +ntoh16(dev->rd_buf+0x20) +ntoh16(dev->rd_buf+0x22); data->pof = ntoh16(dev->rd_buf+0x38); plba = lba; lba = (((dev->rd_buf[7]-3) << 16 )& 0xFF0000) + ((dev->rd_buf[8] << 8)&0xFF00 ) + (dev->rd_buf[9] & 0xFF); // printf("LBA: %d; PIE:%4d; PIF:%4d\n",*lba,*pie, *pif); if ((lba-plba) > 32) lba = plba+32; if (lbacmd[0] = 0xFD; dev->cmd[1] = 0xFB; dev->cmd[2] = 0x42; dev->cmd[3] = 0x45; dev->cmd[4] = 0x4E; dev->cmd[5] = 0x51; dev->cmd[6] = 0x05; dev->cmd[7] = sidx; dev->cmd[8] = (lba >> 16) & 0xFF + 0x03; dev->cmd[9] = (lba >> 8) & 0xFF; dev->cmd[10] = lba & 0xFF; dev->cmd[11] = 0; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ if(!dev->silent) sperror ("benq_fete_block",dev->err); return dev->err; } data->te = (ntoh16(dev->rd_buf+3) + 5) / 10; data->fe = (ntoh16(dev->rd_buf+5) + 5) / 10; lba+=16; return 0; } #endif // ************* END SCAN COMMAND ********* int scan_benq::cmd_cd_end() { int r; #if 1 memset(dev->rd_buf, 0, 10); dev->rd_buf[0] = 0xD4; dev->rd_buf[1] = 0x91; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x0A; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,10))){ sperror ("benq_end_scan_0",dev->err); return dev->err; } cmd_get_result(); // ************ dev->rd_buf[0] = 0xD4; dev->rd_buf[1] = 0x91; dev->rd_buf[2] = 0x00; dev->rd_buf[3] = 0x02; dev->rd_buf[4] = 0x00; dev->rd_buf[5] = 0x00; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x06; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,6))){ sperror ("benq_end_scan_2",dev->err); return dev->err; } cmd_get_result(); #endif // ************ if ((r = cmd_check_mode_exit())) return r; return 0; } int scan_benq::cmd_dvd_end() { int r; #if 1 memset(dev->rd_buf, 0, 10); dev->rd_buf[0] = 0xD4; dev->rd_buf[1] = 0x91; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x0A; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,10))){ sperror ("benq_end_scan_0",dev->err); return dev->err; } cmd_get_result(); // ************ dev->rd_buf[0] = 0xD4; dev->rd_buf[1] = 0x91; dev->rd_buf[2] = 0x03; dev->rd_buf[3] = 0x00; dev->rd_buf[4] = 0x00; dev->rd_buf[5] = 0x00; dev->cmd[0] = 0xF9; dev->cmd[8] = 0x06; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,6))){ sperror ("benq_end_scan_2",dev->err); return dev->err; } cmd_get_result(); #endif // ************ if ((r = cmd_check_mode_exit())) return r; return 0; } qpxtool-0.7.1_002/plugins/asus/0000755000175000001440000000000011352127612015512 5ustar shultzusersqpxtool-0.7.1_002/plugins/asus/Makefile0000644000175000001440000000005611255672625017166 0ustar shultzusersLIBN = qscan_asus include ../Makefile.plugin qpxtool-0.7.1_002/plugins/asus/qscan_plugin.h0000644000175000001440000000361711327565241020363 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_ASUS_H #define __QSCAN_ASUS_H #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { { "ASUS ", DEV_ASUS, "DRW-1612", ASUS_1612, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_ASUS, "DRW-1814", ASUS_1612, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_ASUS, "DRW-2014S1", ASUS_2014, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_ASUS, "DRW-2014L1", ASUS_2014, CHK_ERRC_CD | CHK_ERRC_DVD }, { "", 0, "", 0} }; static const char plugin_name[]="ASUS"; static const char plugin_desc[]="Scan plugin for real ASUS devices (based on MediaTek chip)"; class drive_info; class scan_asus : public scan_plugin { public: // scan_asus(drive_info* idev=NULL); scan_asus(drive_info* idev); virtual ~scan_asus(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int* get_test_speeds(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; int cmd_errc_init(); int cmd_errc_getdata(); int cmd_errc_end(); // CD ERRC methods int cmd_cd_errc_block(cd_errc *data); // DVD ERRC methods int cmd_dvd_errc_block(dvd_errc *data); // end scan }; #endif qpxtool-0.7.1_002/plugins/asus/qscan_plugin.cpp0000644000175000001440000000503611336716766020725 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include scan_plugin* plugin_create(drive_info* idev) { return new scan_asus(idev); } void plugin_destroy(scan_plugin* iplugin) { if (iplugin != NULL) delete iplugin; } scan_asus::scan_asus(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_asus()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_asus::~scan_asus() { if (!dev->silent) printf("~scan_asus()\n"); } /* int scan_asus::probe_drive() { return DEV_FAIL; } */ int scan_asus::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); } return 0; } int scan_asus::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & ~DISC_DVDRAM) return 0; break; default: break; } return -1; } int* scan_asus::get_test_speeds(unsigned int itest) { switch (itest) { case CHK_ERRC: /* if (dev->media.type & DISC_CD) return (int*)SPEEDS_ERRC_CD; if (dev->media.type & DISC_DVD) return (int*)SPEEDS_ERRC_DVD; */ break; default: break; } return NULL; } int scan_asus::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; switch (itest) { case CHK_ERRC_CD: case CHK_ERRC_DVD: lba=ilba; set_read_speed(speed); r = cmd_errc_init(); break; default: return -1; } if (!r) { test = itest; return r; } else { test = 0; return r; } } int scan_asus::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; default: return -1; } } int scan_asus::end_test() { switch (test) { case CHK_ERRC_CD: case CHK_ERRC_DVD: cmd_errc_end(); break; default: break; } test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/asus/qscan_cmd.cpp0000644000175000001440000000542311243443067020156 0ustar shultzusers/* * qscan plugin for ASUS drives: * 1612 * 1814 * 2014S1 * 2014L1 * * This file is part of the QPxTool project. * Copyright (C) 2008-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include int scan_asus::probe_drive() { dev->cmd[0] = 0x5A; dev->cmd[2] = 0x38; dev->cmd[3] = 0x41; dev->cmd[4] = 0x53; dev->cmd[5] = 0x10; dev->cmd[9] = 0x04; if ((dev->err=dev->cmd.transport(READ, dev->rd_buf, 20))){ sperror ("asus_probe",dev->err); return DEV_FAIL; } if (strncmp((char*)dev->rd_buf,"ASUS",4)) return DEV_FAIL; return DEV_PROBED; } // ************* Scan init commands ********* int scan_asus::cmd_errc_init() { /* initialize scan mode */ dev->cmd[0] = 0x5A; dev->cmd[2] = 0x38; dev->cmd[3] = 0x41; dev->cmd[4] = 0x53; dev->cmd[5] = 0x10; dev->cmd[9] = 0x01; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ sperror ("asus_errc_init",dev->err); return 1; } seek(dev,0); return 0; } int scan_asus::cmd_errc_getdata() { /* initialize scan mode */ dev->cmd[0] = 0x5A; dev->cmd[2] = 0x38; dev->cmd[3] = 0x41; dev->cmd[4] = 0x53; dev->cmd[5] = 0x10; dev->cmd[9] = 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ sperror ("asus_errc_getdata",dev->err); return 1; } return 0; } // ********************** int scan_asus::cmd_cd_errc_block(cd_errc *data) { // seek(dev,lba); data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e32 = 0; data->uncr = 0; if (!cmd_errc_getdata()) { data->bler = (dev->rd_buf[1] << 8) | dev->rd_buf[0]; data->e22 = (dev->rd_buf[3] << 8) | dev->rd_buf[2]; } else { data->bler = 0; data->e22 = 0; } lba=((int)dev->rd_buf[5] * 4500 + (int)dev->rd_buf[6] * 75 + (int)dev->rd_buf[7]); // lba+=75; return 0; } int scan_asus::cmd_dvd_errc_block(dvd_errc *data) { seek(dev,lba); data->poe = 0; data->pof = 0; if (!cmd_errc_getdata()) { data->pie = (dev->rd_buf[1] << 8) | dev->rd_buf[0]; data->pif = (dev->rd_buf[3] << 8) | dev->rd_buf[2]; } else { data->pie = 0; data->pif = 0; } // lba = swap4(dev->rd_buf+4); lba+=16; return 0; } // ************* END SCAN COMMAND ********* int scan_asus::cmd_errc_end() { dev->cmd[0] = 0x5A; dev->cmd[2] = 0x38; dev->cmd[3] = 0x41; dev->cmd[4] = 0x53; dev->cmd[5] = 0x10; dev->cmd[9] = 0x02; if ((dev->err=dev->cmd.transport(NONE, NULL, 0))){ sperror ("asus_errc_end",dev->err); return 1; } return 0; } qpxtool-0.7.1_002/plugins/tsst/0000755000175000001440000000000011352127612015534 5ustar shultzusersqpxtool-0.7.1_002/plugins/tsst/Makefile0000644000175000001440000000005611255672671017211 0ustar shultzusersLIBN = qscan_tsst include ../Makefile.plugin qpxtool-0.7.1_002/plugins/tsst/qscan_plugin.h0000644000175000001440000000303511336726666020411 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_TSST_H #define __QSCAN_TSST_H #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = { { "TSSTcorp", DEV_TSST, "CDDVDRW SH-S202N", TSST_H2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "", 0, "", 0} }; static const char plugin_name[]="TSST"; static const char plugin_desc[]="Scan plugin for Toshiba-Samsung devices"; class drive_info; class scan_tsst : public scan_plugin { public: scan_tsst(drive_info* idev); virtual ~scan_tsst(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; // CD ERRC methods int cmd_cd_errc_init(); int cmd_cd_errc_block(cd_errc *data); int cmd_cd_errc_end(); // DVD ERRC methods int cmd_dvd_errc_init(); int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_errc_end(); }; #endif qpxtool-0.7.1_002/plugins/tsst/qscan_plugin.cpp0000644000175000001440000000543511336727306020742 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include scan_plugin* plugin_create(drive_info* idev){ return new scan_tsst(idev); } void plugin_destroy(scan_plugin* iplugin){ if (iplugin != NULL) delete iplugin; } scan_tsst::scan_tsst(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_tsst()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_tsst::~scan_tsst() { if (!dev->silent) printf("~scan_tsst()\n"); } int scan_tsst::probe_drive() { cd_errc tmp_errc; if (strncmp(dev->ven,"TSSTcorp", 8)) return DEV_FAIL; if (dev->media.type & DISC_CD) { if (cmd_cd_errc_init()) return DEV_FAIL; if (cmd_cd_errc_block(&tmp_errc)) return DEV_FAIL; if (cmd_cd_errc_end()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; if (cmd_dvd_errc_end()) return DEV_FAIL; } else { return DEV_FAIL; } printf("TSST probe OK\n"); return DEV_PROBED; } int scan_tsst::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E32|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); } return 0; } int scan_tsst::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & ~DISC_DVDRAM) return 0; break; default: break; } return -1; } int scan_tsst::start_test(unsigned int itest, long ilba, int &speed){ int r=-1; switch (itest) { case CHK_ERRC_CD: lba=ilba; set_read_speed(speed); r = cmd_cd_errc_init(); break; case CHK_ERRC_DVD: lba=ilba; set_read_speed(speed); r = cmd_dvd_errc_init(); break; default: return -1; } if (!r) { test = itest; } else { end_test(); } return r; } int scan_tsst::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; default: return -1; } } int scan_tsst::end_test() { switch (test) { case CHK_ERRC_CD: cmd_cd_errc_end(); break; case CHK_ERRC_DVD: cmd_dvd_errc_end(); break; default: break; } test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/tsst/qscan_cmd.cpp0000644000175000001440000000462711324675340020206 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2006 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include // ************* Scan init commands ********* int scan_tsst::cmd_cd_errc_init() { return seek(dev,0); } // DVD part is same as Lite-On int scan_tsst::cmd_dvd_errc_init() { // 2B 00 00 00 00 00 00 00 00 00 dev->cmd[0] = 0x2B; if ((dev->err=dev->cmd.transport(NONE,NULL,0))){ sperror ("TSST INIT DVD ERRC",dev->err); return 1; } printf("TSST INIT DVD ERRC: OK\n"); return 0; } // ********************** int scan_tsst::cmd_cd_errc_block(cd_errc *data) { dev->cmd[0] = 0xF3; dev->cmd[1] = 0x0E; dev->cmd[8] = 0x4B; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,8))){ sperror ("TSST Cx SCAN INTERVAL",dev->err); return 1; } #if 0 for (int i=0; i<8; i++) { printf(" %02X",dev->rd_buf[i]); } printf("\n"); #endif lba = ntoh32(dev->rd_buf); data->bler = ntoh16(dev->rd_buf+4); data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e22 = ntoh16(dev->rd_buf+6); data->e32 = 0; data->uncr = 0; return 0; } int scan_tsst::cmd_dvd_errc_block(dvd_errc *data) { // int i; // *pie = 0; dev->cmd[0] = 0xF3; dev->cmd[1] = 0x0E; dev->cmd[8] = 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,10))){ sperror ("TSST PI SCAN INTERVAL",dev->err); return 1; } #if 0 for (int i=0; i<8; i++) { printf(" %02X",dev->rd_buf[i]); } printf("\n"); #endif // Data Received: // 00000000 00 00 00 8E 00 00 00 00 ...Ž.... // lba+=16; // lba = ((dev->rd_buf[1] << 16 )& 0xFF0000) + ((dev->rd_buf[2] << 8)&0xFF00 ) + (dev->rd_buf[3] & 0xFF); lba = ntoh32(dev->rd_buf); data->pie = ntoh16(dev->rd_buf+4); // data->pi8 = 0; data->pif = ntoh16(dev->rd_buf+6); data->poe = 0; // data->po8 = 0; data->pof = 0; return 0; } // ************* END SCAN COMMANDS ********* int scan_tsst::cmd_cd_errc_end() { dev->err = 0; return 0; } int scan_tsst::cmd_dvd_errc_end() { dev->err = 0; return 0; } qpxtool-0.7.1_002/plugins/Makefile0000644000175000001440000000153011255674234016207 0ustar shultzusersall: generic plextor pioneer nec liteon asus benq benq_dvdrom tsst clean install uninstall: $(MAKE) -C generic DIR=generic $@ $(MAKE) -C plextor DIR=plextor $@ $(MAKE) -C pioneer DIR=pioneer $@ $(MAKE) -C nec DIR=nec $@ $(MAKE) -C liteon DIR=liteon $@ $(MAKE) -C asus DIR=asus $@ $(MAKE) -C benq DIR=benq $@ $(MAKE) -C benq_dvdrom DIR=benq_dvdrom $@ $(MAKE) -C tsst DIR=tsst $@ generic: $(MAKE) -C generic DIR=generic plextor: $(MAKE) -C plextor DIR=plextor pioneer: $(MAKE) -C pioneer DIR=pioneer nec: $(MAKE) -C nec DIR=nec liteon: $(MAKE) -C liteon DIR=liteon asus: $(MAKE) -C asus DIR=asus benq: $(MAKE) -C benq DIR=benq benq_dvdrom: $(MAKE) -C benq_dvdrom DIR=benq_dvdrom tsst: $(MAKE) -C tsst DIR=tsst .PHONY: all clean install uninstall generic plextor pioneer nec liteon asus benq benq_dvdrom tsst qpxtool-0.7.1_002/plugins/Makefile.plugin0000644000175000001440000000135511352116471017501 0ustar shultzusers SRC = qscan_plugin qscan_cmd HDRS = qscan_plugin.h SRCS = $(patsubst %,%.cpp, $(SRC)) OBJS = $(patsubst %.cpp,%.o,$(SRCS)) LIB_SHORT = lib$(LIBN).so LIB_SONAME = $(LIB_SHORT) LIB = $(LIB_SHORT) CPPFLAGS += -I. -I../../lib/include LDFLAGS += -shared -Wl,-soname,$(LIB_SONAME) LDLIBS += -L../../lib/lib -lqpxtransport -lqpxscan all: $(LIB) $(LIB): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) mkdir -p ../lib ln -fs ../$(DIR)/$(LIB) ../lib/$(LIB_SHORT) clean: rm -f $(LIB_SHORT) $(OBJS) ../lib/$(LIB_SHORT) *~ include/*~ install: mkdir -p $(DESTDIR)$(PLUGINDIR) install -m 755 $(LIB_SHORT) $(DESTDIR)$(PLUGINDIR) uninstall: rm -f $(DESTDIR)$(PLUGINDIR)/$(LIB_SHORT) .PHONY: all clean install uninstall qpxtool-0.7.1_002/plugins/generic/0000755000175000001440000000000011352127612016153 5ustar shultzusersqpxtool-0.7.1_002/plugins/generic/Makefile0000644000175000001440000000006111255672642017622 0ustar shultzusersLIBN = qscan_generic include ../Makefile.plugin qpxtool-0.7.1_002/plugins/generic/qscan_plugin.h0000644000175000001440000000274711327565200021022 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_GENERIC_H #define __QSCAN_GENERIC_H #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { { "", 0, "", 0} }; static const char plugin_name[]="C2P"; static const char plugin_desc[]="Generic scan plugin for devices supported C2 pointers"; class drive_info; class scan_generic : public scan_plugin { public: // scan_generic(drive_info* idev=NULL); scan_generic(drive_info* idev); virtual ~scan_generic(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; int cmd_cd_errc_block(cd_errc *data); // int c2calc(cd_errc *data); int c2calc(unsigned char* buf, unsigned int lba, unsigned char sects); }; #endif qpxtool-0.7.1_002/plugins/generic/qscan_plugin.cpp0000644000175000001440000000401511336725347021355 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include scan_plugin* plugin_create(drive_info* idev){ return new scan_generic(idev); } void plugin_destroy(scan_plugin* iplugin){ if (iplugin != NULL) delete iplugin; } scan_generic::scan_generic(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_generic()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_generic::~scan_generic() { if (!dev->silent) printf("~scan_generic()\n"); } int scan_generic::probe_drive() { if (dev->capabilities & CAP_C2) return DEV_PROBED; else return DEV_FAIL; } int scan_generic::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_E22|ERRC_DATA_UNCR); } return 0; } int scan_generic::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & DISC_CD) return 0; break; default: break; } return -1; } int scan_generic::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; switch (itest) { case CHK_ERRC_CD: lba=ilba; set_read_speed(speed); r = (dev->capabilities & CAP_C2) ? 0 : 1; break; default: return -1; } if (!r) { test = itest; } else { test = 0; } return r; } int scan_generic::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; default: return -1; } } int scan_generic::end_test() { test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/generic/qscan_cmd.cpp0000644000175000001440000000372511336725541020625 0ustar shultzusers/* * generic MMC scan commands implementation ( C2 scan only ) * * This file is part of the QPxTool project. * Copyright (C) 2005 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include "qscan_plugin.h" //int scan_generic::cmd_cd_errc_block(cd_errc *data) int scan_generic::c2calc(unsigned char* buf, unsigned int lba, unsigned char sects) { const unsigned int sect_data = 2352; const unsigned int sect_err = 294; const unsigned int sect_size = sect_data + sect_err; unsigned int c2errs = 0; unsigned int s, offs, i,ii, se; for (s=0; s> ii) & 0x01 ) { // if (!se) printf("C2 in sector %7d, first error in byte %4d ", lba+s, i*8+ii); se++; } } // if (se) printf(", %4d C2\n",se); c2errs += se; } return c2errs; } int scan_generic::cmd_cd_errc_block(cd_errc *data) { int rsize=15; data->bler = 0; data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e22 = 0; data->e32 = 0; data->uncr=0; // if (!lba) return -1; for (int i=0; (i<5) && lbamedia.capacity; i++) { if (lba + rsize > dev->media.capacity) rsize = dev->media.capacity - lba; // else // rsize = 15; if (read_cd(dev, dev->rd_buf, lba, rsize, 0xFA)) data->uncr++; else data->e22 += c2calc(dev->rd_buf, lba, rsize); lba+=rsize; } // *lba = return 0; } qpxtool-0.7.1_002/plugins/liteon/0000755000175000001440000000000011352127612016031 5ustar shultzusersqpxtool-0.7.1_002/plugins/liteon/Makefile0000644000175000001440000000006011255672614017476 0ustar shultzusersLIBN = qscan_liteon include ../Makefile.plugin qpxtool-0.7.1_002/plugins/liteon/qscan_plugin.h0000644000175000001440000001721211336726734020704 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_LITEON_H #define __QSCAN_LITEON_H #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { { "LITE-ON ", DEV_LITEON, "LTR-52327S", LTN_CDR_G7, CHK_ERRC_CD }, { "LITE-ON ", DEV_LITEON, "DVDRW LDW-811S", LTN_DVDR_G1, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW LDW-451S", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW LDW-851S", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-812S", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVD+RW SOHW-802S", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-832S", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVD+RW SOHW-822S", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-1213S", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-1613S", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-1633S", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-1653S", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-1673S", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SOHW-1693S", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SHW-1635S", LTN_DVDR_G5, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SHW-16H5S", LTN_DVDR_G5, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SHW-160P6S", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SHW-160H6S", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SHM-165P6S", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SHM-165H6S", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW SH-16A7", LTN_DVDR_G7, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW LH-16W1", LTN_DVDR_G7, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW LH-16A1", LTN_DVDR_G7, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW LH-18A1", LTN_DVDR_G7, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW LH-20A1", LTN_DVDR_G8, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW DH-20A3", LTN_DVDR_G8, CHK_ERRC_CD | CHK_ERRC_DVD }, { "LITE-ON ", DEV_LITEON, "DVDRW DH-20A4", LTN_DVDR_G8, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-U18A", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DRU-700A", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-D18A", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-U20A", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-U21A", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DRU-710A", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-D22A", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-D23A", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DRU-720A", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-D26A", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DRU-800A", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-Q28A", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-Q30A", LTN_DVDR_G5, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-Q31A", LTN_DVDR_G5, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-Q120A", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-G120A", LTN_DVDR_G6, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_LITEON, "DV-W58G", LTN_DVDR_G1, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_LITEON, "DV-W58G-A", LTN_DVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_LITEON, "DV-W512G", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_LITEON, "DV-W516G", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_LITEON, "DV-W516GA", LTN_DVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_LITEON, "DV-W516GB", LTN_DVDR_G4, CHK_ERRC_CD | CHK_ERRC_DVD }, // { "ASUS ", DEV_LITEON, "DRW-20A1", LTN_DVDR_G7, CHK_ERRC_CD | CHK_ERRC_DVD }, // { "ASUS ", DEV_LITEON, "DRW-20B1", LTN_DVDR_G7, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PLEXTOR ", DEV_LITEON, "DVR PX-806", LTN_iHAx1, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PLEXTOR ", DEV_LITEON, "DVR PX-850", LTN_iHAx3, CHK_ERRC_CD | CHK_ERRC_DVD }, // { "Optiarc ", DEV_LITEON, "DVD RW AD-719", LTN_OLD, CHK_ERRC_CD | CHK_ERRC_DVD }, // Slimtype { "Slimtype", DEV_LITEON, "DVD+RW SDW-421S", LTN_SDVDR_G1, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Slimtype", DEV_LITEON, "DVDRW SDW-431S", LTN_SDVDR_G1, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Slimtype", DEV_LITEON, "DVDRW SOSW-852S", LTN_SDVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Slimtype", DEV_LITEON, "DVD+RW SOSW-862S", LTN_SDVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Slimtype", DEV_LITEON, "DVDRW SOSW-813S", LTN_SDVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Slimtype", DEV_LITEON, "DVDRW SOSW-833S", LTN_SDVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "Slimtype", DEV_LITEON, "DVD A DS8A2S ", LTN_SDVDR_G3, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD RW DW-D56A", LTN_SDVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "SONY ", DEV_LITEON, "DVD+RW DW-R56A", LTN_SDVDR_G2, CHK_ERRC_CD | CHK_ERRC_DVD }, { "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 }, { "", 0, "", 0} }; static const drivedesclist blacklist = { { "TEAC ", DEV_TEAC, "CD-W552E", 0 }, { "HL-DT-ST", DEV_LG, "", 0 }, { "TSSTcorp", DEV_TSST, "", 0 }, { "", 0, "", 0} }; static const char plugin_name[]="LITEON"; static const char plugin_desc[]="Scan plugin for LITE-ON and LITE-ON-based devices"; class drive_info; class scan_liteon : public scan_plugin { public: // scan_liteon(drive_info* idev=NULL); scan_liteon(drive_info* idev); virtual ~scan_liteon(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int* get_test_speeds(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; // CD ERRC methods int cmd_cd_errc_init(); int cmd_cd_errc_block(cd_errc *data); int cmd_cd_errc_read(); int cmd_cd_errc_getdata(cd_errc *data); int cmd_cd_errc_inteval_rst(); int cmd_cd_errc_end(); // DVD ERRC methods int cmd_dvd_errc_init(); int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_errc_end(); int cmd_dvd_fete_init(); int cmd_dvd_fete_block(cdvd_ft *data); }; #endif qpxtool-0.7.1_002/plugins/liteon/qscan_plugin.cpp0000644000175000001440000000722211336727324021233 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include static const int SPEEDS_ERRC_CD[] = { 4*CD_SPEED_MULT, 8*CD_SPEED_MULT, 16*CD_SPEED_MULT, 24*CD_SPEED_MULT, 32*CD_SPEED_MULT, 40*CD_SPEED_MULT, 0 }; static const int SPEEDS_ERRC_DVD[] = { 2*DVD_SPEED_MULT, 5*DVD_SPEED_MULT, 8*DVD_SPEED_MULT, 12*DVD_SPEED_MULT, 16*DVD_SPEED_MULT, 0 }; scan_plugin* plugin_create(drive_info* idev){ return new scan_liteon(idev); } void plugin_destroy(scan_plugin* iplugin){ if (iplugin != NULL) delete iplugin; } scan_liteon::scan_liteon(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_liteon()\n"); devlist = (drivedesc*) &drivelist; blklist = (drivedesc*) &blacklist; test=0; } scan_liteon::~scan_liteon() { if (!dev->silent) printf("~scan_liteon()\n"); } int scan_liteon::probe_drive() { #ifndef PLUGINS_LITEON_NOPROBE if (dev->media.type & DISC_CD) { if (cmd_cd_errc_init()) return DEV_FAIL; if (cmd_cd_errc_end()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; if (cmd_dvd_errc_end()) return DEV_FAIL; } else { return DEV_FAIL; } return DEV_PROBED; #else return DEV_FAIL; #endif } int scan_liteon::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_E32|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); } return 0; } int scan_liteon::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & ~DISC_DVDRAM) return 0; break; case CHK_FETE: if (dev->media.type & (DISC_DVD & ~DISC_DVDRAM)) return 0; break; default: return -1; } return -1; } int* scan_liteon::get_test_speeds(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & DISC_CD) return (int*)SPEEDS_ERRC_CD; // if (dev->media.type & DISC_DVD) // return (int*)SPEEDS_ERRC_DVD; break; default: break; } return NULL; } int scan_liteon::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; switch (itest) { case CHK_ERRC_CD: lba=ilba; set_read_speed(speed); r = cmd_cd_errc_init(); break; case CHK_ERRC_DVD: lba=ilba; set_read_speed(speed); r = cmd_dvd_errc_init(); break; case CHK_FETE: if (dev->media.type & (DISC_DVD & ~DISC_DVDRAM)) { set_write_speed(speed); r = cmd_dvd_fete_init(); } else { r = -1; } break; default: return -1; } if (!r) { test = itest; return r; } else { end_test(); return r; } } int scan_liteon::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_FETE: if (dev->media.type & (DISC_DVD & ~DISC_DVDRAM)) { r = cmd_dvd_fete_block((cdvd_ft*)data); } if(ilba) *ilba = lba; return r; default: return -1; } } int scan_liteon::end_test() { switch (test) { case CHK_ERRC_CD: cmd_cd_errc_end(); break; case CHK_ERRC_DVD: cmd_dvd_errc_end(); case CHK_FETE: return 0; break; default: break; } test=0; return 0; } qpxtool-0.7.1_002/plugins/liteon/qscan_cmd.cpp0000644000175000001440000001656311327521250020476 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2006 Gennady "ShultZ" Kozlov * * * Thanks to Artur Kalimullin (Kaliy) for assistance in LiteOn Cx scan implementation * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include // ************* Scan init commands ********* int scan_liteon::cmd_cd_errc_init() { dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA3; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_A_cx_scan",dev->err); return 1; } // printf("LiteOn_init_A_cx_scan: OK\n"); dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; dev->cmd[4] = 0x02; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_B_cx_scan",dev->err); return 1; } // printf("LiteOn_init_B_cx_scan: OK\n"); dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_C_cx_scan",dev->err); return 1; } // printf("LiteOn_init_C_cx_scan: OK\n"); dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; dev->cmd[4] = 0x04; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_D_cx_scan",dev->err); return 1; } // printf("LiteOn_init_D_scan: OK\n"); dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA0; dev->cmd[4] = 0x02; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_init_E_cx_scan",dev->err); return 1; } // printf("LiteOn_init_E_cx_scan: OK\n"); return 0; } int scan_liteon::cmd_dvd_errc_init() { // 2B 00 00 00 00 00 00 00 00 00 dev->cmd[0] = 0x2B; if ((dev->err=dev->cmd.transport(NONE,NULL,0))){ sperror ("LiteOn_init_pi_scan",dev->err); return 1; } // printf("LiteOn_init_pi_scan: OK\n"); return 0; } int scan_liteon::cmd_dvd_fete_init() { // scan command dev->cmd[0] = 0xDF; dev->cmd[1] = 0x08; dev->cmd[2] = 0x01; dev->cmd[3] = 0x03; /* dev->cmd[3] = ((lba+0x031000) >> 16) & 0xFF; dev->cmd[4] = ((lba+0x0100) >> 8) & 0xFF; dev->cmd[5] = lba & 0xFF; */ dev->cmd[7] = 0x08; // speed or interval ? dev->cmd[8] = 0x00; // 8X or 4M (2048 sectors) memset(dev->rd_buf,0,16); dev->rd_buf[0] = 0x08; dev->rd_buf[1] = 0x02; dev->rd_buf[4] = 0x25; dev->rd_buf[5] = 0x0F; dev->rd_buf[6] = 0x02; dev->rd_buf[9] = 0x03; dev->rd_buf[13] = 0x26; dev->rd_buf[14] = 0x12; dev->rd_buf[15] = 0x7F; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,16))){ sperror ("LiteOn_FETE_init scan",dev->err); return 1; } // fe/te data redout dev->cmd[0] = 0xDF; dev->cmd[1] = 0x08; dev->cmd[2] = 0x02; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ sperror ("LiteOn_FETE_init get data",dev->err); return 1; } // current lba redout dev->cmd[0] = 0xDF; dev->cmd[1] = 0x02; dev->cmd[2] = 0x09; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ sperror ("LiteOn_FETE_init get LBA",dev->err); return 1; } int tlba = (dev->rd_buf[0] << 16) | (dev->rd_buf[1] << 8) | dev->rd_buf[2]; printf("tlba = %d\n", tlba); return 0; } // ********************** CD ERRC commands int scan_liteon::cmd_cd_errc_read() { dev->cmd[0] = 0xDF; dev->cmd[1] = 0x82; dev->cmd[2] = 0x09; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_cx_do_one_interval_scan",dev->err); return 1; } // printf("LiteOn_cx_do_one_interval_scan: OK"); return 0; } int scan_liteon::cmd_cd_errc_getdata(cd_errc* data) { dev->cmd[0] = 0xDF; dev->cmd[1] = 0x82; dev->cmd[2] = 0x05; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_cx_do_one_interval_readout",dev->err); return 1; } // printf("LiteOn_cx_do_one_interval_readout: OK"); #if 0 for (int i=0; i<32; i++) { printf(" %02X",dev->rd_buf[i]); } printf("\n"); #endif data->bler = ntoh16(dev->rd_buf); data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e22 = ntoh16(dev->rd_buf+2); // data->e32 = ntoh16(dev->rd_buf+4); data->e32 = dev->rd_buf[4]; data->uncr = 0; return 0; } int scan_liteon::cmd_cd_errc_inteval_rst() { dev->cmd[0] = 0xDF; dev->cmd[1] = 0x97; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_cx_do_one_interval_rst",dev->err); return 1; } return 0; } // ********************** DVD ERRC commands int scan_liteon::cmd_cd_errc_block(cd_errc *data) { if (cmd_cd_errc_read()) return dev->err; if (cmd_cd_errc_getdata(data)) return dev->err; lba+=75; if (cmd_cd_errc_inteval_rst()) return dev->err; // printf("LiteOn_cx_do_one_interval_rst: OK"); return 0; } int scan_liteon::cmd_dvd_errc_block(dvd_errc *data) { // int i; // *pie = 0; dev->cmd[0] = 0xF3; dev->cmd[1] = 0x0E; dev->cmd[8] = 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,10))){ sperror ("LiteOn_pi_do_one_interval_scan",dev->err); return 1; } #if 0 for (int i=0; i<10; i++) { printf(" %02X",dev->rd_buf[i]); } printf("\n"); #endif // Data Received: // 00000000 00 00 00 8E 00 00 00 00 ...Ž.... // lba+=16; // lba = ((dev->rd_buf[1] << 16 )& 0xFF0000) + ((dev->rd_buf[2] << 8)&0xFF00 ) + (dev->rd_buf[3] & 0xFF); lba = ntoh32(dev->rd_buf); data->pie = ntoh16(dev->rd_buf+4); // data->pi8 = 0; data->pif = ntoh16(dev->rd_buf+6); data->poe = 0; // data->po8 = 0; data->pof = 0; return 0; } // *************** FE/TE scan block int scan_liteon::cmd_dvd_fete_block(cdvd_ft *data) { // scan command dev->cmd[0] = 0xDF; dev->cmd[1] = 0x08; dev->cmd[2] = 0x01; dev->cmd[3] = ((lba+0x031000) >> 16) & 0xFF; dev->cmd[4] = ((lba+0x0100) >> 8) & 0xFF; dev->cmd[5] = lba & 0xFF; dev->cmd[7] = 0x10; // speed or interval ? dev->cmd[8] = 0x00; // 16X or 8M (4096 sectors) memset(dev->rd_buf,0,16); if (!lba) { dev->rd_buf[0] = 0x08; dev->rd_buf[1] = 0x02; dev->rd_buf[4] = 0x25; dev->rd_buf[5] = 0x0F; dev->rd_buf[6] = 0x02; dev->rd_buf[9] = 0x03; dev->rd_buf[13] = 0x26; dev->rd_buf[14] = 0x05; dev->rd_buf[15] = 0x3F; } else { dev->rd_buf[0] = (lba >> 16) & 0xFF; dev->rd_buf[1] = (lba >> 8) & 0xFF; dev->rd_buf[2] = lba & 0xFF; dev->rd_buf[3] = 0x01; dev->rd_buf[5] = 0x04; dev->rd_buf[6] = 0x61; dev->rd_buf[7] = 0x01; } if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,16))){ sperror ("LiteOn_FETE scan",dev->err); return 1; } // fe/te data redout dev->cmd[0] = 0xDF; dev->cmd[1] = 0x08; dev->cmd[2] = 0x02; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ sperror ("LiteOn_FETE get data",dev->err); return 1; } data->te=dev->rd_buf[0]; data->fe=dev->rd_buf[1]; // current lba redout dev->cmd[0] = 0xDF; dev->cmd[1] = 0x02; dev->cmd[2] = 0x09; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,65536))){ sperror ("LiteOn_FETE get LBA",dev->err); return 1; } lba = (dev->rd_buf[0] << 16) | (dev->rd_buf[1] << 8) | dev->rd_buf[2]; return 0; } // ************* END SCAN COMMANDS ********* int scan_liteon::cmd_cd_errc_end() { dev->cmd[0] = 0xDF; dev->cmd[1] = 0xA3; dev->cmd[2] = 0x01; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,256))){ sperror ("LiteOn_end_scan",dev->err); return 1; } return 0; } int scan_liteon::cmd_dvd_errc_end() { dev->err = 0; return 0; } qpxtool-0.7.1_002/plugins/benq_dvdrom/0000755000175000001440000000000011352127612017037 5ustar shultzusersqpxtool-0.7.1_002/plugins/benq_dvdrom/Makefile0000644000175000001440000000006511255672636020515 0ustar shultzusersLIBN = qscan_benq_dvdrom include ../Makefile.plugin qpxtool-0.7.1_002/plugins/benq_dvdrom/qscan_plugin.h0000644000175000001440000000362511327565216021711 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_BENQDVDROM_H #define __QSCAN_BENQDVDROM_H #include "qpx_scan_plugin_api.h" #define cnt_max_cd 4 #define cnt_max_dvd 4 static const drivedesclist drivelist = //static drivedesclist drivelist = { { "PLEXTOR ", DEV_BENQ_RD, "DVD-ROM PX-130", BENQ_DV1650V, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD }, { "", 0, "", 0} }; static const char plugin_name[]="BENQ_DVDROM"; static const char plugin_desc[]="Scan plugin for BENQ DVD-ROM devices"; class drive_info; class scan_benqrom : public scan_plugin { public: // scan_benqrom(drive_info* idev=NULL); scan_benqrom(drive_info* idev); virtual ~scan_benqrom(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; int cmd_scan_init(); // CD ERRC methods int cmd_cd_errc_block(cd_errc *data); int cmd_cd_jb_block(cdvd_jb *data); // DVD ERRC methods int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_jb_block(cdvd_jb *data); // end scan int cmd_cd_end(); int cmd_dvd_end(); int cnt; int _c1[cnt_max_cd]; int _c2[cnt_max_cd]; //int _cu[cnt_max_cd]; int _lba; int _pie[cnt_max_dvd]; int _pif[cnt_max_dvd]; }; #endif qpxtool-0.7.1_002/plugins/benq_dvdrom/qscan_plugin.cpp0000644000175000001440000000556011336717013022236 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include scan_plugin* plugin_create(drive_info* idev) { return new scan_benqrom(idev); } void plugin_destroy(scan_plugin* iplugin) { if (iplugin != NULL) delete iplugin; } scan_benqrom::scan_benqrom(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_benqrom()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_benqrom::~scan_benqrom() { if (!dev->silent) printf("~scan_benqrom()\n"); } int scan_benqrom::probe_drive() { if (dev->media.type & DISC_CD) { if (cmd_scan_init()) return DEV_FAIL; if (cmd_cd_end()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { if (cmd_scan_init()) return DEV_FAIL; if (cmd_dvd_end()) return DEV_FAIL; } else { return DEV_FAIL; } return DEV_PROBED; } int scan_benqrom::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); } return 0; } int scan_benqrom::check_test(unsigned int itest) { switch (itest) { case CHK_JB: case CHK_ERRC: if (dev->media.type & ~DISC_DVDRAM) return 0; break; default: break; } return -1; } int scan_benqrom::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; switch (itest) { case CHK_ERRC_CD: case CHK_ERRC_DVD: case CHK_JB_CD: case CHK_JB_DVD: lba=ilba; set_read_speed(speed); r = cmd_scan_init(); break; default: return -1; } if (!r) { test = itest; } else { test = 0; } return r; } int scan_benqrom::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_JB_CD: r = cmd_cd_jb_block((cdvd_jb*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_JB_DVD: r = cmd_dvd_jb_block((cdvd_jb*)data); if(ilba) *ilba = lba; return r; default: return -1; } } int scan_benqrom::end_test() { switch (test) { case CHK_ERRC_CD: case CHK_JB_CD: cmd_cd_end(); break; case CHK_ERRC_DVD: case CHK_JB_DVD: cmd_dvd_end(); break; default: break; } // cmd_scan_end(); test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/benq_dvdrom/qscan_cmd.cpp0000644000175000001440000001137111276775262021515 0ustar shultzusers/* * BENQ DVDROM scan conmmands implementation * * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include // ************* Scan init commands ********* int scan_benqrom::cmd_scan_init() { dev->cmd[0] = 0xF1; dev->cmd[2] = 0xFF; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,4))){ if(!dev->silent) sperror ("benq_rom_init_scan",dev->err); return dev->err; } cnt=0; return 0; } int scan_benqrom::cmd_cd_errc_block(cd_errc *data) { int len = 34; if (!(cnt%cnt_max_cd)) { dev->cmd[0] = 0x78; if (!lba) { dev->cmd[5] = 0x01; dev->cmd[6] = 0x00; len=32; } else { dev->cmd[5] = 0x00; dev->cmd[6] = 0x01; } dev->cmd[8] = 0x20; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,len))){ sperror ("benq_rom_cx_do_one_interval",dev->err); return dev->err; } for (int i=0; i<4; i++) { _c1[i] = ntoh16(dev->rd_buf+4+i*4); _c2[i] = ntoh16(dev->rd_buf+6+i*4); // _lba=((int)dev->rd_buf[0] * 4500 + (int)dev->rd_buf[3] * 75 + (int)dev->rd_buf[2]); } cnt = 0; } data->bler = _c1[cnt]; data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e22 = _c2[cnt]; data->e32 = 0; //_cu[cnt]; data->uncr= 0; lba+=75; cnt++; // *lba = _lba; return 0; } int scan_benqrom::cmd_cd_jb_block(cdvd_jb* data) { //* if (!lba) { dev->cmd[0] = 0x78; dev->cmd[5] = 0x01; dev->cmd[6] = 0x00; dev->cmd[8] = 0x20; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,32))){ sperror ("benq_rom_jitter_cd_do_one_interval",dev->err); return dev->err; } lba+=75; } dev->cmd[0] = 0x78; dev->cmd[5] = 0x00; dev->cmd[6] = 0x01; dev->cmd[8] = 0x20; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,34))){ sperror ("benq_rom_jitter_cd_do_one_interval",dev->err); return dev->err; } data->jitter = 20*(int)dev->rd_buf[0x20]; data->asymm = 0; // *lba=((int)dev->rd_buf[0] * 4500 + (int)dev->rd_buf[3] * 75 + (int)dev->rd_buf[2]); lba+=75; return 0; } int scan_benqrom::cmd_dvd_errc_block(dvd_errc *data) { if (!(cnt%cnt_max_cd)) { dev->cmd[0] = 0x78; if (!lba) { dev->cmd[6] = 0x00; dev->cmd[7] = 0x10; } else { dev->cmd[6] = 0x01; dev->cmd[7] = 0x00; } dev->cmd[8] = 0x22; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,34))){ sperror ("benq_rom_pie_pif_do_one_interval",dev->err); return dev->err; } for (int i=0; i<4; i++) { _pie[i] = ntoh16(dev->rd_buf+4+i*4); _pif[i] = ntoh16(dev->rd_buf+6+i*4); // _lba=((int)dev->rd_buf[0] * 4500 + (int)dev->rd_buf[3] * 75 + (int)dev->rd_buf[2]); } cnt = 0; } data->pie = _pie[cnt]; data->pif = _pif[cnt]; data->poe = 0; data->pof = 0; lba+=0x100; // printf("BenQ Pi SCAN: cnt=%d\n",cnt); cnt++; // *lba = _lba; return 0; } int scan_benqrom::cmd_dvd_jb_block(cdvd_jb* data) { dev->cmd[0] = 0x78; if (!lba) { dev->cmd[6] = 0x00; dev->cmd[7] = 0x10; } else { dev->cmd[6] = 0x01; dev->cmd[7] = 0x00; } dev->cmd[8] = 0x22; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,34))){ sperror ("benq_rom_cx_do_one_interval",dev->err); return dev->err; } data->jitter = 20*(int)dev->rd_buf[0x20]; data->asymm = 0; // *lba=((int)dev->rd_buf[0] * 4500 + (int)dev->rd_buf[3] * 75 + (int)dev->rd_buf[2]); lba+= 0x400; return 0; } // ************* END SCAN COMMAND ********* int scan_benqrom::cmd_cd_end() { dev->cmd[0] = 0x78; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,32))){ sperror ("benq_rom_end_scan_cd",dev->err); return dev->err; } printf("\n"); return 0; } int scan_benqrom::cmd_dvd_end() { dev->cmd[0] = 0x78; dev->cmd[7] = 0x40; dev->cmd[8] = 0x22; dev->cmd[10]= 0x10; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,34))){ sperror ("benq_rom_end_scan_dvd",dev->err); return dev->err; } return 0; } /* scan_commands commands_list_benq_rom = { NULL, benq_rom_init_scan, benq_rom_cx_do_one_interval, benq_rom_cx_end_scan, NULL, benq_rom_init_scan, benq_rom_jitter_CD_do_one_interval, benq_rom_cx_end_scan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, benq_rom_init_scan, benq_rom_pie_pif_do_one_interval, benq_rom_pi_end_scan, NULL, benq_rom_init_scan, benq_rom_jitter_DVD_do_16_ecc, benq_rom_pi_end_scan, }; scan_commands commands_benq_rom() { return commands_list_benq_rom; } */ qpxtool-0.7.1_002/plugins/pioneer/0000755000175000001440000000000011352127612016200 5ustar shultzusersqpxtool-0.7.1_002/plugins/pioneer/Makefile0000644000175000001440000000006111255672656017654 0ustar shultzusersLIBN = qscan_pioneer include ../Makefile.plugin qpxtool-0.7.1_002/plugins/pioneer/qscan_plugin.h0000644000175000001440000000712011327563075021045 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_PIONEER_H #define __QSCAN_PIONEER_H #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { /* { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-102", PIO_OLD, 0 }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-103", PIO_OLD, 0 }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-104", PIO_OLD, 0 }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-105", PIO_OLD, 0 }, */ { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-106", PIO_DVR_106, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-107", PIO_DVR_107, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-108", PIO_DVR_108, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-109", PIO_DVR_109, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-110", PIO_DVR_110, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-111", PIO_DVR_111, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "DVD-RW DVR-112", PIO_DVR_112, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PIONEER ", DEV_PIONEER, "", PIO_DVR_112, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_PIONEER, "DRW-0402P", PIO_DVR_106, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_PIONEER, "DRW-0804P", PIO_DVR_107, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_PIONEER, "DRW-1604P", PIO_DVR_108, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_PIONEER, "DRW-1608P", PIO_DVR_109, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_PIONEER, "DRW-1608P2", PIO_DVR_110, CHK_ERRC_CD | CHK_ERRC_DVD }, { "ASUS ", DEV_PIONEER, "DRW-1608P3", PIO_DVR_111, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_PIONEER, "DV-W50D", PIO_DVR_106, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_PIONEER, "DV-W58D", PIO_DVR_107, CHK_ERRC_CD | CHK_ERRC_DVD }, { "TEAC ", DEV_PIONEER, "DV-W516D", PIO_DVR_108, CHK_ERRC_CD | CHK_ERRC_DVD }, { "PLEXTOR ", DEV_PIONEER, "DVR PX-810", PIO_DVR_112, CHK_ERRC_CD | CHK_ERRC_DVD }, { "", 0, "", 0} }; static const char plugin_name[]="PIONEER"; static const char plugin_desc[]="Scan plugin for PIONEER and PIONEER-based devices"; class drive_info; class scan_pioneer : public scan_plugin { public: // scan_pioneer(drive_info* idev=NULL); scan_pioneer(drive_info* idev); virtual ~scan_pioneer(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int* get_test_speeds(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; // CD ERRC methods int cmd_cd_errc_init(); int cmd_cd_errc_block(cd_errc *data); int cmd_cd_errc_read(unsigned char sects); int cmd_cd_errc_getdata(cd_errc *data); // DVD ERRC methods int cmd_dvd_errc_init(); int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_errc_read(unsigned char nECC); int cmd_dvd_errc_getdata(dvd_errc *data); // end scan // int cmd_scan_end(); }; #endif qpxtool-0.7.1_002/plugins/pioneer/qscan_plugin.cpp0000644000175000001440000000567611336717055021415 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2008, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include static const int SPEEDS_ERRC_CD[] = { /* 4*CD_SPEED_MULT, 8*CD_SPEED_MULT, 24*CD_SPEED_MULT, 32*CD_SPEED_MULT, 40*CD_SPEED_MULT, */ 0 }; static const int SPEEDS_ERRC_DVD[] = { 3*DVD_SPEED_MULT, 0 }; scan_plugin* plugin_create(drive_info* idev) { return new scan_pioneer(idev); } void plugin_destroy(scan_plugin* iplugin) { if (iplugin != NULL) delete iplugin; } scan_pioneer::scan_pioneer(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_pioneer()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_pioneer::~scan_pioneer() { if (!dev->silent) printf("~scan_pioneer()\n"); } int scan_pioneer::probe_drive() { if (dev->media.type & DISC_CD) { if (cmd_cd_errc_init()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; } else { return DEV_FAIL; } return DEV_PROBED; } int scan_pioneer::errc_data() { if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E22|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_UNCR); } return 0; } int scan_pioneer::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & ~DISC_DVDRAM) return 0; break; default: break; } return -1; } int* scan_pioneer::get_test_speeds(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & DISC_CD) return (int*)SPEEDS_ERRC_CD; if (dev->media.type & DISC_DVD) return (int*)SPEEDS_ERRC_DVD; break; default: break; } return NULL; } int scan_pioneer::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; switch (itest) { case CHK_ERRC_CD: lba=ilba; set_read_speed(speed); r = cmd_cd_errc_init(); break; case CHK_ERRC_DVD: lba=ilba; set_read_speed(speed); r = cmd_dvd_errc_init(); break; default: return -1; } if (!r) { test = itest; } else { test = 0; } return r; } int scan_pioneer::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; default: return -1; } } int scan_pioneer::end_test() { // cmd_scan_end(); test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/pioneer/qscan_cmd.cpp0000644000175000001440000001330011276775077020654 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2006 Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include //#include #include //#define _PIO_ERRC_DEBUG int scan_pioneer::cmd_cd_errc_read(unsigned char sects) { /* CDB: 00000000 3B 02 E1 00 00 00 00 00 20 00 ;.á..... . Data Sent: 00000000 FF 01 00 00 00 60 00 00 00 00 4B 00 00 00 4B 00 ÿ............... 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ */ // lba += 0x006000; int i; for (i=0; i<32; i++) dev->rd_buf[i]=0; dev->rd_buf[0] = 0xFF; dev->rd_buf[1] = 0x01; dev->rd_buf[4] = ((lba+0x006000) >> 16) & 0xFF; dev->rd_buf[5] = ((lba+0x006000) >> 8) & 0xFF; dev->rd_buf[6] = (lba) & 0xFF; // dev->rd_buf[6] = 0x01; dev->rd_buf[8] = (sects >> 16) & 0xFF; dev->rd_buf[9] = (sects >> 8) & 0xFF; dev->rd_buf[10] = sects & 0xFF; dev->rd_buf[12] = (sects >> 16) & 0xFF; dev->rd_buf[13] = (sects >> 8) & 0xFF; dev->rd_buf[14] = sects & 0xFF; /* printf("Pioneer scan Cx CMD data:"); for (i=0; i<16; i++) { if (!(i%0x20)) printf("\n"); printf(" %02X",dev->rd_buf[i] & 0xFF); } printf("\n"); */ dev->cmd[0] = 0x3B; dev->cmd[1] = 0x02; dev->cmd[2] = 0xE1; dev->cmd[8] = 0x20; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,32))) { if(!dev->silent) sperror ("pioneer_send_scan_cx",dev->err); return dev->err; } return 0; } int scan_pioneer::cmd_dvd_errc_read(unsigned char nECC) { /* CDB: 00000000 3B 02 E1 00 00 00 00 00 20 00 ;.á..... . Data Sent: 00000000 FF 01 00 00 03 00 01 00 00 00 80 00 00 00 08 00 ÿ............... 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ */ int i; int sects = nECC*16; // lba += 0x030000; for (i=0; i<32; i++) dev->rd_buf[i]=0; dev->rd_buf[0] = 0xFF; dev->rd_buf[1] = 0x01; dev->rd_buf[4] = ((lba >> 16) + 3) & 0xFF; dev->rd_buf[5] = (lba >> 8) & 0xFF; dev->rd_buf[6] = (lba) & 0xFF; // dev->rd_buf[6] = 0x01; // dev->rd_buf[9] = 0x01; // dev->rd_buf[9] = (nECC >> 4 ) & 0xFF; // dev->rd_buf[10] = (nECC << 4 ) & 0xFF; // dev->rd_buf[14] = nECC; // dev->rd_buf[14] = 0x08; // dev->rd_buf[9] = (sects >> 8) & 0xFF; dev->rd_buf[10] = (sects) & 0xFF; // dev->rd_buf[13] = (sects >> 12) & 0xFF; // dev->rd_buf[14] = nECC; dev->rd_buf[14] = 1; /* printf("Pioneer scan Pi CMD data:"); for (i=0; i<16; i++) { if (!(i%0x20)) printf("\n"); printf(" %02X",dev->rd_buf[i] & 0xFF); } printf("\n"); */ dev->cmd[0] = 0x3B; dev->cmd[1] = 0x02; dev->cmd[2] = 0xE1; dev->cmd[8] = 0x20; if ((dev->err=dev->cmd.transport(WRITE,dev->rd_buf,32))) { if(!dev->silent) sperror ("pioneer_send_scan_pi",dev->err); return dev->err; } return 0; } int scan_pioneer::cmd_cd_errc_getdata(cd_errc *data) { int i; for (i=0; i<32; i++) dev->rd_buf[i]=0; dev->cmd[0] = 0x3C; dev->cmd[1] = 0x02; dev->cmd[2] = 0xE1; dev->cmd[8] = 0x20; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,32))) { sperror ("pioneer_read_error_info",dev->err); return dev->err; } #ifdef _PIO_ERRC_DEBUG printf("Read error info RSP data:"); for (i=0; i<32; i++) { if (!(i%0x20)) printf("\n"); printf(" %02X",dev->rd_buf[i] & 0xFF); } printf("\n"); #endif if ((ntoh16(dev->rd_buf+13) > 300) || (ntoh16(dev->rd_buf+5) > 300)) { data->bler = 0; data->e22 = 0; } else { //data->bler = ntoh16(dev->rd_buf+13) - ntoh16(dev->rd_buf+5); data->bler = ntoh16(dev->rd_buf+13); data->e22 = ntoh16(dev->rd_buf+5); } data->e11 = 0; data->e21 = 0; data->e31 = 0; data->e12 = 0; data->e32 = 0; data->uncr = 0; return 0; } int scan_pioneer::cmd_dvd_errc_getdata(dvd_errc *data) { int i; for (i=0; i<32; i++) dev->rd_buf[i]=0; dev->cmd[0] = 0x3C; dev->cmd[1] = 0x02; dev->cmd[2] = 0xE1; dev->cmd[8] = 0x20; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,32))) { sperror ("pioneer_read_error_info",dev->err); return dev->err; } #ifdef _PIO_ERRC_DEBUG printf("Read error info RSP data:"); for (i=0; i<32; i++) { if (!(i%0x20)) printf("\n"); printf(" %02X",dev->rd_buf[i] & 0xFF); } printf("\n"); #endif if (dev->dev_ID < PIO_DVR_111) { data->pie = max( 0, (ntoh16(dev->rd_buf+13) - ntoh16(dev->rd_buf+5)) / 10); data->pif = ntoh16(dev->rd_buf+13) / 200; } else { data->pie = max( 0, (ntoh16(dev->rd_buf+13) - ntoh16(dev->rd_buf+5))); data->pif = ntoh16(dev->rd_buf+13) / 20; } // data->pi8=data->pie; data->poe=0; // data->po8=0; data->pof=0; return 0; } int scan_pioneer::cmd_cd_errc_block(cd_errc *data) { int r; unsigned char interval = 75; r = cmd_cd_errc_read(interval); if (!r) r = cmd_cd_errc_getdata(data); lba += interval; return r; } int scan_pioneer::cmd_dvd_errc_block(dvd_errc *data) { int r; const char interval = 1; r = cmd_dvd_errc_read(interval); if (!r) r = cmd_dvd_errc_getdata(data); // *pie = max( 0, (ntoh16(dev->rd_buf+13) - 1.5 * ntoh16(dev->rd_buf+5)) / 40); lba+= 16*interval; return r; } int scan_pioneer::cmd_cd_errc_init() { int r; cd_errc data; // spinup(dev, 2); seek(dev, 0); r = cmd_cd_errc_read(75); if (!r) r = cmd_cd_errc_getdata(&data); return r; } int scan_pioneer::cmd_dvd_errc_init() { int r; dvd_errc data; // spinup(dev, 2); seek(dev, 0); r = cmd_dvd_errc_read(1); if (!r) r = cmd_dvd_errc_getdata(&data); return r; } /* int scan_pioneer dummy(dev_info* dev) { dev->err = 0; return 0; } */ qpxtool-0.7.1_002/plugins/plextor/0000755000175000001440000000000011352127612016234 5ustar shultzusersqpxtool-0.7.1_002/plugins/plextor/Makefile0000644000175000001440000000006111255672663017706 0ustar shultzusersLIBN = qscan_plextor include ../Makefile.plugin qpxtool-0.7.1_002/plugins/plextor/qscan_plugin.h0000644000175000001440000000754411327563061021106 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #ifndef __QSCAN_PLEXTOR_H #define __QSCAN_PLEXTOR_H //#include //#include #include "qpx_scan_plugin_api.h" static const drivedesclist drivelist = //static drivedesclist drivelist = { { "PLEXTOR ", DEV_PLEXTOR, "CD-R PREMIUM ", PLEXTOR_PREMIUM, CHK_ERRC_CD | CHK_JB_CD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "CD-R PREMIUM2", PLEXTOR_PREMIUM2, CHK_ERRC_CD | CHK_JB_CD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-708A2", PLEXTOR_708A2, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-712A ", PLEXTOR_712, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-714A ", PLEXTOR_716, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-716A ", PLEXTOR_716, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-716AL", PLEXTOR_716AL, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-755A ", PLEXTOR_755, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "PLEXTOR ", DEV_PLEXTOR, "DVDR PX-760A ", PLEXTOR_760, CHK_ERRC_CD | CHK_JB_CD | CHK_ERRC_DVD | CHK_JB_DVD | CHK_TA_DVD | CHK_FETE }, { "", 0, "", 0} }; // CHK_CD_ERRC | CHK_CD_JB | CHK_FETE_CD | CHK_DVD_ERRC | CHK_DVD_JB | CHK_FETE_DVD | CHK_TA_DVD }, // CHK_CD_ERRC | CHK_CD_JB | CHK_DVD_ERRC | CHK_DVD_JB | CHK_TA_DVD | CHK_FETE }, static const char plugin_name[]="PLEXTOR"; static const char plugin_desc[]="Scan plugin for PLEXTOR devices (based on SANYO chips)"; class drive_info; class scan_plextor : public scan_plugin { public: // scan_plextor(drive_info* idev=NULL); scan_plextor(drive_info* idev); virtual ~scan_plextor(); // virtual int check_drive(); virtual int probe_drive(); virtual int errc_data(); virtual int check_test(unsigned int test); virtual int* get_test_speeds(unsigned int test); virtual int start_test(unsigned int test, long slba, int &speed); virtual int scan_block(void* data,long* ilba); virtual int end_test(); virtual const char* name() { return plugin_name; }; virtual const char* desc() { return plugin_desc; }; private: long lba; int fete_idx; int fete_rsize; /* int plextor_init_fete(fete *data); int plextor_init_dvd_ta(); */ // CD ERRC methods int cmd_cd_errc_init(); int cmd_cd_errc_block(cd_errc *data); int cmd_cd_errc_getdata(cd_errc *data); // CD J/B methods int cmd_cd_jb_init(); int cmd_cd_jb_block(cdvd_jb *data); int cmd_jb_getdata(cdvd_jb *data); // DVD ERRC methods int cmd_dvd_errc_init(); int cmd_dvd_errc_block(dvd_errc *data); int cmd_dvd_errc_getdata(dvd_errc *data); // DVD J/B methods int cmd_dvd_jb_init(); int cmd_dvd_jb_block(cdvd_jb *data); // end scan int cmd_scan_end(); // FE/TE commands int cmd_fete_init(); int cmd_fete_block(cdvd_ft *data); int cmd_fete_getdata(); int cmd_fete_end(); // Time Analyser commands int cmd_dvd_ta_block(cdvd_ta *data); int build_TA_histogram_px716(unsigned char* response_data, int* dest_pit, int* dest_land, int len); int build_TA_histogram_px755(unsigned char* response_data, int* dest_pit, int* dest_land, int len, int dt); int evaluate_histogramme(cdvd_ta* data, int** peaks, int** mins); }; #endif // __QSCAN_PLEXTOR_H qpxtool-0.7.1_002/plugins/plextor/qscan_plugin.cpp0000644000175000001440000001247211336717067021444 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2007-2009, Gennady "ShultZ" Kozlov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. * */ #include #include static const int SPEEDS_ERRC_CD[] = { 4*CD_SPEED_MULT, 8*CD_SPEED_MULT, 24*CD_SPEED_MULT, 32*CD_SPEED_MULT, 40*CD_SPEED_MULT, 0 }; static const int SPEEDS_ERRC_DVD[] = { 2*DVD_SPEED_MULT, 5*DVD_SPEED_MULT, 8*DVD_SPEED_MULT, 12*DVD_SPEED_MULT, 0 }; static const int SPEEDS_JB_CD[] = { 4*CD_SPEED_MULT, 0 }; static const int SPEEDS_JB_DVD[] = { 2*DVD_SPEED_MULT, 0 }; scan_plugin* plugin_create(drive_info* idev) { return new scan_plextor(idev); } void plugin_destroy(scan_plugin* iplugin) { if (iplugin != NULL) delete iplugin; } scan_plextor::scan_plextor(drive_info* idev) : scan_plugin() { dev = idev; if (!dev->silent) printf("scan_plextor()\n"); devlist = (drivedesc*) &drivelist; test=0; } scan_plextor::~scan_plextor() { if (!dev->silent) printf("~scan_plextor()\n"); } int scan_plextor::probe_drive() { if (isPlextor(dev)) plextor_px755_do_auth(dev); if (dev->media.type & DISC_CD) { if (cmd_cd_errc_init()) return DEV_FAIL; if (cmd_scan_end()) return DEV_FAIL; } else if (dev->media.type & DISC_DVD) { if (cmd_dvd_errc_init()) return DEV_FAIL; if (cmd_scan_end()) return DEV_FAIL; } else { return DEV_FAIL; } return DEV_PROBED; } int scan_plextor::errc_data() { if (dev->media.type & ~DISC_DVDRAM) return 0; if (dev->media.type & DISC_CD) { return (ERRC_DATA_BLER|ERRC_DATA_E11|ERRC_DATA_E21|ERRC_DATA_E31|ERRC_DATA_E12|ERRC_DATA_E22|ERRC_DATA_E32|ERRC_DATA_UNCR); } else if (dev->media.type & DISC_DVD) { return (ERRC_DATA_PIE|ERRC_DATA_PIF|ERRC_DATA_POE|ERRC_DATA_POF|ERRC_DATA_UNCR); } return 0; } int scan_plextor::check_test(unsigned int itest) { switch (itest) { case CHK_ERRC: case CHK_JB: if (dev->media.type & ~DISC_DVDRAM) return 0; break; case CHK_FETE: if (dev->media.type & (DISC_CD | DISC_DVD) & ~DISC_CDROM & ~DISC_DVDROM) return 0; break; case CHK_TA: if (dev->media.type & (DISC_DVD & ~DISC_DVDROM)) //if (dev->media.type & DISC_DVD) return 0; break; default: break; } return -1; } int* scan_plextor::get_test_speeds(unsigned int itest) { switch (itest) { case CHK_ERRC: if (dev->media.type & DISC_CD) return (int*)SPEEDS_ERRC_CD; if (dev->media.type & DISC_DVD) return (int*)SPEEDS_ERRC_DVD; break; case CHK_JB: if (dev->media.type & DISC_CD) return (int*)SPEEDS_JB_CD; if (dev->media.type & DISC_DVD) return (int*)SPEEDS_JB_DVD; break; default: break; } return NULL; } int scan_plextor::start_test(unsigned int itest, long ilba, int &speed) { int r=-1; plextor_px755_do_auth(dev); switch (itest) { case CHK_ERRC_CD: lba=ilba; set_read_speed(speed); r = cmd_cd_errc_init(); break; case CHK_JB_CD: lba=ilba; set_read_speed(speed); r = cmd_cd_jb_init(); break; case CHK_ERRC_DVD: lba=ilba; set_read_speed(speed); r = cmd_dvd_errc_init(); break; case CHK_JB_DVD: lba=ilba; set_read_speed(speed); r = cmd_dvd_jb_init(); break; #if 1 case CHK_FETE: #else case CHK_FETE_CD: case CHK_FETE_CDROM: case CHK_FETE_DVD: case CHK_FETE_DVDROM: #endif lba=ilba; set_write_speed(speed); r = cmd_fete_init(); break; case CHK_TA: if (dev->media.type & (DISC_DVD & ~DISC_DVDROM)) { r = 0; test = CHK_TA_DVD; // TA test should run at minimum available speed (2X for DVD-, 2.4X for DVD+) // setting 2X for DVD+ will be 2.4 int taspd=2; set_read_speed(taspd); return 0; } break; default: return -1; } if (!r) { test = itest; } else { test = 0; } return r; } int scan_plextor::scan_block(void *data, long *ilba) { int r=-1; switch (test) { case CHK_ERRC_CD: r = cmd_cd_errc_block((cd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_JB_CD: r = cmd_cd_jb_block((cdvd_jb*)data); if(ilba) *ilba = lba; return r; case CHK_ERRC_DVD: r = cmd_dvd_errc_block((dvd_errc*)data); if(ilba) *ilba = lba; return r; case CHK_JB_DVD: r = cmd_dvd_jb_block((cdvd_jb*)data); if(ilba) *ilba = lba; return r; #if 1 case CHK_FETE: #else case CHK_FETE_CD: case CHK_FETE_CDROM: case CHK_FETE_DVD: case CHK_FETE_DVDROM: #endif r = cmd_fete_block((cdvd_ft*)data); if(ilba) *ilba = lba; return r; case CHK_TA_DVD: cmd_dvd_ta_block((cdvd_ta*)data); return r; default: return -1; } } int scan_plextor::end_test() { switch (test) { case CHK_ERRC_CD: case CHK_ERRC_DVD: case CHK_JB_CD: case CHK_JB_DVD: cmd_scan_end(); break; #if 1 case CHK_FETE: #else case CHK_FETE_CD: case CHK_FETE_CDROM: case CHK_FETE_DVD: case CHK_FETE_DVDROM: #endif cmd_fete_end(); break; case CHK_TA: case CHK_TA_CD: case CHK_TA_CDROM: case CHK_TA_DVD: case CHK_TA_DVDROM: break; default: break; } test=0; return 0; } /* __attribute__((constructor)) void init() { printf("init()\n"); } __attribute__((destructor)) void exit() { printf("exit()\n"); } */ qpxtool-0.7.1_002/plugins/plextor/qscan_cmd.cpp0000644000175000001440000004452111337001624020673 0ustar shultzusers/* * This file is part of the QPxTool project. * Copyright (C) 2005-2009 Gennady "ShultZ" Kozlov * * * Some Plextor commands got from PxScan and CDVDlib (C) Alexander Noe` * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include #include #include #include #include #include #include #include #define FETE_START_LBA #define DEBUG 1 //#define _debug_cx //#define _debug_pi //#define _debug_jb //#define _debug_fete //*********************************// // // commands to start tests // //*********************************// const char PLEX_QCHECK_START = 0x15; const char PLEX_QCHECK_READOUT = 0x16; const char PLEX_QCHECK_END = 0x17; int scan_plextor::cmd_cd_errc_init() { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x00; dev->cmd[3] = 0x01; // dev->cmd[8] = 0x0F; dev->cmd[9] = 0x02; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) { if (!dev->silent) sperror ("PLEXTOR_START_CX", dev->err); return dev->err;} #ifdef _debug_cx printf("00 18 01 01 00 4B | LBA | BLER E31 E21 E11 E32 ??? E22 E12\n"); #endif printf("scan init OK!\n"); return 0; } int scan_plextor::cmd_dvd_errc_init() { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x00; // dev->cmd[3] = 0x09; dev->cmd[3] = 0x01; dev->cmd[8] = 0x01; // dev->cmd[9] = 0x13; dev->cmd[9] = 0x12; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) { if(!dev->silent) sperror ("PLEXTOR_START_PIPO",dev->err); return dev->err;} printf("scan init OK!\n"); return 0; } #if 0 int plextor_start_pie(drive_info* dev) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x00; dev->cmd[3] = 0x00; dev->cmd[8] = 0x08; // scan interval (ECC blocks) dev->cmd[9] = 0x10; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_START_PISUM8",dev->err);return dev->err;} return 0; } int plextor_start_pie_poe(drive_info* dev) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x00; dev->cmd[3] = 0x00; dev->cmd[8] = 0x08; // scan interval (ECC blocks) dev->cmd[9] = 0x11; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_START_PISUM8_POE",dev->err);return dev->err;} return 0; } int plextor_start_pif(drive_info* dev) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x00; dev->cmd[3] = 0x00; dev->cmd[8] = 0x01; // scan interval (ECC blocks) dev->cmd[9] = 0x12; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_START_PIF",dev->err); return dev->err;} return 0; } #endif int scan_plextor::cmd_cd_jb_init() { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x10; dev->cmd[3] = 0x01; // CD // dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_START_JB_CD",dev->err);return dev->err;} printf("scan init OK!\n"); return 0; } int scan_plextor::cmd_dvd_jb_init() { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_START; //0x15; dev->cmd[2] = 0x10; dev->cmd[3] = 0x00; // DVD dev->cmd[8] = 0x10; // scan interval (ECC blocks) // dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_START_JB_DVD",dev->err);return dev->err;} printf("scan init OK!\n"); return 0; } int scan_plextor::cmd_fete_init() { fete_idx=-1; dev->cmd[0] = PLEXTOR_SCAN_TA_FETE; // 0xF3; dev->cmd[1] = 0x1F; dev->cmd[2] = 0x03; dev->cmd[3] = 0x01; #ifdef _debug_fete #ifdef FETE_START_LBA printf("scan_plextor::cmd_fete_init: lba %d - %d\n", lba, dev->media.capacity_total-1); #else printf("scan_plextor::cmd_fete_init: lba %d - %d\n", 0, dev->media.capacity_total-1); #endif #endif if (dev->media.type & DISC_CD) { fete_rsize = 4500; // one FE/TE info block per 60 seconds int sect; msf sect_msf; lba2msf(lba,§_msf); // start address #ifdef FETE_START_LBA dev->cmd[4] = sect_msf.m; dev->cmd[5] = sect_msf.s; dev->cmd[6] = sect_msf.f; #else dev->cmd[4] = 0x00; dev->cmd[5] = 0x00; dev->cmd[6] = 0x00; #endif // end address sect = dev->media.capacity_total-1; lba2msf(sect,§_msf); dev->cmd[7] = sect_msf.m; dev->cmd[8] = sect_msf.s; dev->cmd[9] = sect_msf.f; } else if (dev->media.type & DISC_DVD) { fete_rsize = 25600; // one FE/TE info block per 1600 (?) ECC blocks // start address #ifdef FETE_START_LBA dev->cmd[4] = (lba >> 16) & 0xFF; dev->cmd[5] = (lba >> 8) & 0xFF; dev->cmd[6] = lba & 0xFF; #else dev->cmd[4] = 0x00; dev->cmd[5] = 0x00; dev->cmd[6] = 0x00; #endif // end address dev->cmd[7] = ((dev->media.capacity_total-1) >> 16) & 0xFF; dev->cmd[8] = ((dev->media.capacity_total-1) >> 8) & 0xFF; dev->cmd[9] = (dev->media.capacity_total-1) & 0xFF; } else { return -1; } if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_START_FETE",dev->err);return dev->err;} return 0; } //*********************************// // // end scan commands // //*********************************// int scan_plextor::cmd_scan_end() { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_END; //0x17; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_END_SCAN",dev->err); return dev->err;} return 0; } int scan_plextor::cmd_fete_end() { dev->cmd[0] = PLEXTOR_SCAN_TA_FETE; // 0xF3; dev->cmd[1] = 0x1F; dev->cmd[2] = 0x04; dev->cmd[9] = 0x00; if ((dev->err=dev->cmd.transport() )) {sperror ("PLEXTOR_END_FETE",dev->err); return dev->err;} return 0; } //*********************************// // // test data readout commands // //*********************************// int scan_plextor::cmd_cd_errc_getdata(cd_errc *data) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_READOUT; // 0x16; dev->cmd[2] = 0x01; dev->cmd[10]= 0x1A; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x1A))) {sperror ("PLEXTOR_READ_CD_ERROR_INFO", dev->err);return dev->err;} data->bler = ntoh16(dev->rd_buf+10); data->e31 = ntoh16(dev->rd_buf+12); data->e21 = ntoh16(dev->rd_buf+14); data->e11 = ntoh16(dev->rd_buf+16); data->uncr = ntoh16(dev->rd_buf+18); // check where drive returns E32 data->e32 = ntoh16(dev->rd_buf+20); // and where is UNCR data->e22 = ntoh16(dev->rd_buf+22); data->e12 = ntoh16(dev->rd_buf+24); #ifdef _debug_cx int i; for (i=0x00; i<0x06; i++) printf("%02X ", dev->rd_buf[i] & 0xFF); printf("| "); for (i=0x06; i<0x0A; i++) printf("%02X ", dev->rd_buf[i] & 0xFF); printf("| "); for (i=0x0A; i<0x1A; i+=2) { if (ntoh16(dev->rd_buf+i)) printf("%5d ", ntoh16(dev->rd_buf+i)); else printf("_____ "); } printf("|\n"); #endif return 0; } int scan_plextor::cmd_dvd_errc_getdata(dvd_errc *data) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_READOUT; // 0x16; dev->cmd[2] = 0x00; dev->cmd[10]= 0x34; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x34))) {sperror ("PLEXTOR_READ_DVD_ERROR_INFO",dev->err); return dev->err;} /* test 0x12: 10 UNCR 14 PIE 18 POE 1C 20 24 PIF 28 POF 2C 30 */ data->pie = ntoh32(dev->rd_buf+0x14); // data->pi8 = data->pie; data->pif = ntoh32(dev->rd_buf+0x24); data->poe = ntoh32(dev->rd_buf+0x18)>>4; // data->po8 = data->poe; data->pof = ntoh32(dev->rd_buf+0x28); /* data->pie = ntoh32(dev->rd_buf+0x14); data->pi8 = ntoh32(dev->rd_buf+0x18); data->pif = ntoh32(dev->rd_buf+0x1C); data->poe = ntoh32(dev->rd_buf+0x20); data->po8 = ntoh32(dev->rd_buf+0x24); data->pof = ntoh32(dev->rd_buf+0x28); data->uncr = ntoh32(dev->rd_buf+0x10); */ return 0; } #if 0 int plextor_read_pi_info(drive_info* dev) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_READOUT; // 0x16; dev->cmd[2] = 0x00; dev->cmd[10]= 0x34; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x34))) {sperror ("PLEXTOR_READ_PI",dev->err); return dev->err;} /* printf("READ PI:"); for (int i=0; i<0x34; i++) { if (!(i%0x10)) printf("\n"); printf(" %02X",dev->rd_buf[i] & 0xFF); } printf("\n"); */ #ifdef _debug_pi int i; /* // printf("\n| "); for (i=0x00; i<0x34; i++) { if (!(i%0x20))printf("\n| "); printf("%02X ", dev->rd_buf[i] & 0xFF); } */ for (i=0x00; i<0x06; i++) printf("%02X ", dev->rd_buf[i] & 0xFF); printf("|"); printf(" %6X |", ntoh32(dev->rd_buf+0x06) - 0x030000); printf(" %4X |", ntoh16(dev->rd_buf+0x0A)); printf(" %4X", ntoh16(dev->rd_buf+0x0C)); for (i=0x20; i<0x34; i+=4) { if (!(i%0x10))printf(" |"); if (ntoh32(dev->rd_buf+i)) printf(" %8d", ntoh32(dev->rd_buf+i)); else printf(" ________"); } // printf("\n"); #endif return 0; } #endif int scan_plextor::cmd_jb_getdata(cdvd_jb *data) { dev->cmd[0] = PLEXTOR_QCHECK; //0xEA; dev->cmd[1] = PLEX_QCHECK_READOUT; // 0x16; dev->cmd[2] = 0x10; dev->cmd[10]= 0x10; dev->cmd[11]= 0x00; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0x10))) {sperror ("PLEXTOR_READ_JB",dev->err); return dev->err;} #ifdef _debug_jb int i; printf("\n| J/B data: | "); for (i=0x00; i<0x10; i++) printf("%02X ", dev->rd_buf[i] & 0xFF); printf("|\n"); #endif // if (dev->dev_ID > PLEXTOR_716) { data->asymm = ntoh16(dev->rd_buf+10); data->jitter = ntoh16(dev->rd_buf+12); // } else { // data->asymm = ntoh16(dev->rd_buf+10); // data->jitter = ntoh16(dev->rd_buf+12); // } return 0; } int scan_plextor::cmd_cd_errc_block(cd_errc *data) { int rsize=15; data->uncr=0; // if (!lba) return -1; for (int i=0; (i<5) && lbamedia.capacity; i++) { if (lba + 15 > dev->media.capacity) rsize = dev->media.capacity - lba; // else // rsize = 15; if (read_cd(dev, dev->rd_buf, lba, rsize, 0xFA)) data->uncr++; lba+=rsize; } cmd_cd_errc_getdata(data); // *lba = return 0; } int scan_plextor::cmd_dvd_errc_block(dvd_errc *data) { if (read_one_ecc_block(dev, dev->rd_buf, lba)) data->uncr++; read_one_ecc_block(dev, dev->rd_buf, lba); lba+= 0x10; cmd_dvd_errc_getdata(data); return 0; } #if 0 int plextor_pif_do_one_ecc_block(drive_info* dev, int* lba, int* pif) { read_one_ecc_block(dev, *lba); *lba+= 0x10; plextor_read_pi_info(dev); // *lba = ntoh32(dev->rd_buf+0x06) - 0x00030000; *pif = ntoh32(dev->rd_buf+0x24); #ifdef _debug_pi printf(" * %4d\n", *pif); #endif return 0; } int plextor_pisum8_do_eight_ecc_blocks(drive_info* dev, int* lba, int* pie, int* pof) { for (int i=0;i<8;i++) { if ((dev->err = read_one_ecc_block(dev, *lba)));// i = 8; *lba+= 0x10; } plextor_read_pi_info(dev); // *lba = ntoh32(dev->rd_buf+0x06) - 0x00030000; *pie = ntoh32(dev->rd_buf+0x24); *pof = ntoh32(dev->rd_buf+0x10); // *poe = ntoh32(dev->rd_buf+0x28); // *pif = 0; #ifdef _debug_pi printf(" * %4d\n", *pie); #endif return 0; } int plextor_burst_do_eight_ecc_blocks(drive_info* dev, int* lba, int* pie, int* poe, int* pof) { for (int i=0;i<8;i++) { if ((dev->err = read_one_ecc_block(dev, *lba)));// i = 8; *lba+= 0x10; } plextor_read_pi_info(dev); // *lba = ntoh32(dev->rd_buf+0x06) - 0x00030000; *pie = ntoh32(dev->rd_buf+0x24); // if (ntoh16(dev->rd_buf+0x0C) > ntoh16(dev->rd_buf+0x0A)) *poe = ntoh32(dev->rd_buf+0x28) >> 1; else *poe = 0; *pof = ntoh32(dev->rd_buf+0x10); #ifdef _debug_pi printf(" * %4d * %4d\n", *pie, *poe); #endif return 0; } #endif int scan_plextor::cmd_dvd_jb_block(cdvd_jb *data) { for (int i=0;i<16;i++) { int j = read_one_ecc_block(dev, dev->rd_buf, lba); if (j == COMMAND_FAILED) i=16; lba+= 0x10; } cmd_jb_getdata(data); if (dev->dev_ID > PLEXTOR_716) { data->jitter = 3200 - 2*data->jitter; } else { data->jitter = 3200 - (int)(2.4*data->jitter); } return 0; // return (!(dev->rd_buf[2])); } int scan_plextor::cmd_cd_jb_block(cdvd_jb *data) { int rsize=15; for (int i=0;i<5;i++) { if (lba + 15 > dev->media.capacity) rsize = dev->media.capacity - lba; int j = read_cd(dev, dev->rd_buf, lba, rsize, 0xFA); lba+= rsize; if (j == COMMAND_FAILED) i++; } cmd_jb_getdata(data); if (dev->dev_ID > PLEXTOR_716) { data->jitter = 4800 - 2*(data->jitter); } else { data->jitter = 3600 - (int)(2.4*(data->jitter)); } return 0; // return (!(dev->rd_buf[2])); } int scan_plextor::cmd_fete_getdata() { dev->cmd[0] = PLEXTOR_FETE_READOUT; // 0xF5; dev->cmd[3] = 0x0C; dev->cmd[9] = 0xCE; if ((dev->err=dev->cmd.transport(READ,dev->rd_buf,0xCE))) {sperror ("PLEXTOR_FETE_READOUT",dev->err); return dev->err;} #ifdef _debug_fete for (int i=0; i<0xCE; i++) { if (!(i % 0x20)) printf("\n"); printf("%02X ",dev->rd_buf[i] & 0xFF); } printf("\n"); #endif return 0; } int scan_plextor::cmd_fete_block(cdvd_ft* data) { int rdy = test_unit_ready(dev); int offs=((++fete_idx) << 1) + 8; if (rdy != 0x20408) { printf("test unit ready = %05X, return\n", rdy); return -1; } // if (cmd_fete_getdata()) return -1; // data->te=dev->rd_buf[offs]; // data->fe=dev->rd_buf[offs+1]; data->te=0; data->fe=0; if (fete_idx>99) return 1; lba = (fete_idx+1) * fete_rsize; if (lba > (dev->media.capacity_total-1)) lba = dev->media.capacity_total-1; while ((data->fe==0 || data->te==0) && (fete_idx<=99) && (rdy == 0x20408)) { if (cmd_fete_getdata()) return -1; data->te=dev->rd_buf[offs]; data->fe=dev->rd_buf[offs+1]; if (data->fe==0 || data->te==0) { rdy = test_unit_ready(dev); #ifdef _debug_fete printf("test unit ready = %05X\n", rdy); #endif msleep(10); } } return 0; } int scan_plextor::build_TA_histogram_px716(unsigned char* response_data, int* dest_pit, int* dest_land, int len) { int* dest[] = { dest_land, dest_pit }; int count = ntoh16(response_data+2); // printf("PX-716 Histogram... %d\n",count); int idx=28; int v, pit; for (int i=0;ipit, data->land }; for (int k=0;k<2;k++) { j1=0; j2=0; local_max = 0; for (i=40;i<330;i++) { if (src[k][i-1] <= src[k][i] && src[k][i+1] <= src[k][i] && src[k][i] > 20 && src[k][i] > local_max) { peaks[k][j1] = i; local_max = src[k][i]; next_peak = 1; } else if (peak_found) if (/*src[k][i-3] >= src[k][i-1] && src[k][i-2] > src[k][i-1] && */ src[k][i-1] > src[k][i] && src[k][i+1] >= src[k][i]) { mins[k][j2] = i; if (j2<13) j2++; peak_found = 0; } if (local_max > 2*src[k][i]) { local_max = 2*src[k][i]; if (next_peak) { next_peak = 0; if (j1<13) { j1++; peak_found=1; // printf("%4d",i); } } } } int min_count = j2; for (i=0;imedia.layers); int i, r, m,j; float sum; unsigned char scan_cmd[6][2] = { { 0x04, 0x00 }, { 0x10, 0x00 }, { 0x20, 0x00 }, { 0xFA, 0x28 }, { 0xEA, 0x28 }, { 0xDE, 0x28 }}; const char* scan_txt[] = { "Running TA on L0 inner zone ", "Running TA on L0 middle zone", "Running TA on L0 outer zone", "Running TA on L1 inner zone ", "Running TA on L1 middle zone", "Running TA on L1 outer zone" }; // int ta_response_pit[6][512]; int ta_response_land[6][512]; int peaks_lands[15], peaks_pits[15]; int mins_lands[15], mins_pits[15]; int* peaks[] = { peaks_pits, peaks_lands }; int* mins[] = { mins_pits+1, mins_lands+1 }; if (data->pass<0 || data->pass>6) return -1; wait_unit_ready(dev, 6); // for (int pass=0;(pass<3*dev->media.layers) && (!ctl->skip());pass++) { printf("%s\n",scan_txt[data->pass]); data->clear(); for (i=0;i<9;i++) { dev->cmd[0] = PLEXTOR_SCAN_TA_FETE; // 0xF3; dev->cmd[1] = 0x1F; dev->cmd[2] = 0x23; dev->cmd[3] = 0x00; dev->cmd[4] = 0x00; dev->cmd[5] = scan_cmd[data->pass][0]; dev->cmd[6] = scan_cmd[data->pass][1]; dev->cmd[7] = i<<4; dev->cmd[8] = 0xFF; dev->cmd[9] = 0xFE; dev->cmd[10] = 0x04*!i; dev->cmd[11] = 0x00; dev->cmd.transport(READ, dev->rd_buf, 65534); printf(".\n"); if (!strncmp(dev->dev,"DVDR PX-714A",14) || !strncmp(dev->dev,"DVDR PX-716A",14)) build_TA_histogram_px716(dev->rd_buf, data->pit, data->land, 512); else build_TA_histogram_px755(dev->rd_buf, data->pit, data->land, 512, dev->media.type); // dev->parms.scan_speed_dvd); } ////// mins_lands[0] = 0; mins_pits[0]=0; int p0,p1; int l0,l1; for (j=1;j<400;j++) { // if ((j>40) && (j<360)) { if ( data->pit[j] == 0 ) { p0 = data->pit[j-1]; p1 = data->pit[j+1]; if ((p0>0) && (p1>0)) data->pit[j] = (p0+p1)/2; } if ( data->land[j] == 0 ) { l0 = data->land[j-1]; l1 = data->land[j+1]; if ((l0>0) && (l1>0)) data->land[j] = (l0+l1)/2; } // } // block.pit=ta_response_pit[pass][j]; // block.land=ta_response_land[pass][j]; // ctl->event_block_done(event_block_done_ta, block); } evaluate_histogramme(data, peaks, mins); printf("peak shift pits : "); sum=0; for (m=0;m<10;m++) { r = (int)((float)peaks_pits[m] - 21.5454 * ((m<9)?m:11) - 64); sum+=sqrt(abs(r)); printf("%4d", r); } printf(" sum %f \n",sum); printf("peak shift lands: "); sum=0; for (m=0;m<10;m++) { r = (int)((float)peaks_lands[m] - 21.5454 * ((m<9)?m:11) - 64); sum+=sqrt(abs(r)); printf("%4d", r); } printf(" sum %f \n",sum); // printf("TA test finished\n"); // cmd_scan_end(); return 0; } qpxtool-0.7.1_002/COPYING0000644000175000001440000004307611122707065014124 0ustar shultzusers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.