summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/base/pic_protection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pic/base/pic_protection.cpp')
-rw-r--r--src/devices/pic/base/pic_protection.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp
index 8fac920..3e8f4c9 100644
--- a/src/devices/pic/base/pic_protection.cpp
+++ b/src/devices/pic/base/pic_protection.cpp
@@ -123,7 +123,7 @@ bool Pic::Protection::extractRanges(const TQString &name, TQValueVector<Address>
bool ok1;
end = fromHex(regexp.cap(regexp.numCaptures()), &ok1);
if ( !ok1 ) {
- qDebug("Malformed end address");
+ tqDebug("Malformed end address");
return true;
}
starts.clear();
@@ -133,11 +133,11 @@ bool Pic::Protection::extractRanges(const TQString &name, TQValueVector<Address>
TQString s = (i==1 ? regexp.cap(i) : regexp.cap(i).mid(1));
Address start = fromHex(s, &ok1);
if ( !ok1 ) {
- qDebug("Malformed start address %s", s.latin1());
+ tqDebug("Malformed start address %s", s.latin1());
return true;
}
if ( start>=end && (starts.count()==0 || starts[starts.count()-1]<start) ) {
- qDebug("Start addresses should be ordered");
+ tqDebug("Start addresses should be ordered");
return true;
}
starts.append(start);
@@ -188,7 +188,7 @@ bool Pic::Protection::checkRange(const TQString &mask, const TQString &name) con
if ( ptype!=Nb_Types ) break;
}
if ( ptype==Nb_Types ) {
- qDebug("Unknown protected memory range");
+ tqDebug("Unknown protected memory range");
return false;
}
// #### TODO
@@ -198,13 +198,13 @@ bool Pic::Protection::checkRange(const TQString &mask, const TQString &name) con
Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &mask, const TQString &name, bool &ok) const
{
Q_ASSERT( family()!=CodeGuard );
- //qDebug("extract range %s %s", mask.latin1(), name.latin1());
+ //tqDebug("extract range %s %s", mask.latin1(), name.latin1());
ProtectedRange pr;
ok = false;
TQRegExp rexp("([A-Z]+)(?:_([0-9])|)");
if ( !rexp.exactMatch(mask) ) {
- qDebug("Malformed block range");
+ tqDebug("Malformed block range");
return pr;
}
@@ -221,7 +221,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
ptype = Type(k);
if ( !rexp.cap(2).isEmpty() ) {
if ( isBootBlock || (rtype!=MemoryRangeType::Code && rtype!=MemoryRangeType::Eeprom) ) {
- qDebug("Multiple blocks only for code and eeprom");
+ tqDebug("Multiple blocks only for code and eeprom");
return pr;
}
}
@@ -230,7 +230,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
if ( rtype!=MemoryRangeType::Nb_Types ) break;
}
if ( rtype==MemoryRangeType::Nb_Types ) {
- qDebug("Unknown protected memory range");
+ tqDebug("Unknown protected memory range");
return pr;
}
@@ -244,12 +244,12 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
const MemoryRangeData &rdata = _data.range(rtype);
if ( isAllProtectedValueName(name) ) {
if ( rtype==MemoryRangeType::Code && !isBootBlock && bmask ) {
- qDebug("Protected range should be explicit with boot block");
+ tqDebug("Protected range should be explicit with boot block");
return pr;
}
if (isBootBlock) {
if ( bsmask==0 ) {
- qDebug("Protected range should be explicit when boot size not present");
+ tqDebug("Protected range should be explicit when boot size not present");
return pr;
}
Address start = _data.range(MemoryRangeType::Code).start;
@@ -258,11 +258,11 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
bool ok1;
uint size = bsmask->values[k].name.toUInt(&ok1);
if ( !ok1 ) {
- qDebug("Could not recognize boot size value");
+ tqDebug("Could not recognize boot size value");
return pr;
}
if ( size==0 ) {
- qDebug("Boot size cannot be zero");
+ tqDebug("Boot size cannot be zero");
return pr;
}
Address end = 2 * size - 1; // instruction words
@@ -278,7 +278,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
return pr;
}
if ( isBootBlock && bsmask ) {
- qDebug("Protected range should not be explicit when boot size is present");
+ tqDebug("Protected range should not be explicit when boot size is present");
return pr;
}
@@ -286,20 +286,20 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
Address end;
bool ok1;
if ( !extractRanges(name, pr.starts, end, ok1) ) {
- qDebug("Could not recognized explicit range");
+ tqDebug("Could not recognized explicit range");
return pr;
}
if ( !ok1 ) return pr;
if ( end>rdata.end ) {
- qDebug("End is beyond memory range");
+ tqDebug("End is beyond memory range");
return pr;
}
if ( (rtype!=MemoryRangeType::Code || isBootBlock) && (pr.starts.count()>1 || !rexp.cap(2).isEmpty() || bmask==0) ) {
- qDebug("Only code with blocks and boot can have multiple protected ranges");
+ tqDebug("Only code with blocks and boot can have multiple protected ranges");
return pr;
}
if ( isBootBlock && pr.starts[0]!=0 ) {
- qDebug("Boot block start should be zero");
+ tqDebug("Boot block start should be zero");
return pr;
}
pr.ends.append(end);
@@ -307,7 +307,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
// check with boot block
if ( pr.starts.count()>1 ) {
if ( bmask==0 ) {
- qDebug("No boot mask");
+ tqDebug("No boot mask");
return pr;
}
for (uint i=0; i<uint(bmask->values.count()); i++) {
@@ -316,12 +316,12 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma
ProtectedRange bpr = extractRange(bmask->name, bmask->values[i].name, ok1);
if ( !ok1 ) return pr;
if ( bpr.ends.count()!=pr.starts.count() ) {
- qDebug("Boot number of ends (%i) should be the same as code number of starts (%i)", int(bpr.ends.count()), int(pr.starts.count()));
+ tqDebug("Boot number of ends (%i) should be the same as code number of starts (%i)", int(bpr.ends.count()), int(pr.starts.count()));
return pr;
}
for (uint k=0; k<uint(bpr.ends.count()); k++) {
if ( bpr.ends[k]+1!=pr.starts[k] ) {
- qDebug("%i: End of boot block (%s) doesn't match start of code block (%s)", k, toHexLabelAbs(bpr.ends[k]).latin1(), toHexLabelAbs(pr.starts[k]).latin1());
+ tqDebug("%i: End of boot block (%s) doesn't match start of code block (%s)", k, toHexLabelAbs(bpr.ends[k]).latin1(), toHexLabelAbs(pr.starts[k]).latin1());
return pr;
}
}