Skip to content

Commit

Permalink
Merge pull request #8 from dougg3/mac-fixes
Browse files Browse the repository at this point in the history
Fix Mac build, update about screen, misc
  • Loading branch information
dougg3 authored Jun 9, 2023
2 parents 1047276 + f5de87a commit c0a899e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ROMSIMMFlasher.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ QT += core gui widgets

TARGET = SIMMProgrammer
TEMPLATE = app

QMAKE_TARGET_BUNDLE_PREFIX = com.downtowndougbrown

SOURCES += main.cpp\
mainwindow.cpp \
Expand Down
16 changes: 8 additions & 8 deletions aboutbox.ui
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By &lt;a href=&quot;http://www.downtowndougbrown.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Doug Brown&lt;/span&gt;&lt;/a&gt; (&lt;a href=&quot;mailto:macg3@mac.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;macg3@mac.com&lt;/span&gt;&lt;/a&gt;), &lt;a href=&quot;http://www.bigmessowires.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Steve Chamberlin&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By &lt;a href=&quot;http://www.downtowndougbrown.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Doug Brown&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;http://www.bigmessowires.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Steve Chamberlin&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand All @@ -60,7 +60,7 @@
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;See the &lt;a href=&quot;http://www.bigmessowires.com/mac-rom-inator-ii/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Mac ROM-inator II page&lt;/span&gt;&lt;/a&gt; for more information, or the &lt;a href=&quot;http://68kmla.org/forums/viewtopic.php?f=29&amp;amp;t=16544&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;68Kmla forums&lt;/span&gt;&lt;/a&gt; for details about this project's origins and its early history.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;See the &lt;a href=&quot;http://www.bigmessowires.com/mac-rom-inator-ii/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Mac ROM-inator II page&lt;/span&gt;&lt;/a&gt; for more information, or the &lt;a href=&quot;https://68kmla.org/bb/index.php?threads/another-iici-rom-hack.23519/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;68Kmla forums&lt;/span&gt;&lt;/a&gt; for details about this project's origins and its early history.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down Expand Up @@ -91,18 +91,18 @@ p, li { white-space: pre-wrap; }
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This program is licensed under the terms of the &lt;/span&gt;&lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;GNU General Public License version 2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;. Code is available &lt;/span&gt;&lt;a href=&quot;https://github.com/steve-chamberlin/mac-rom-simm-programmer.software&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This program is licensed under the terms of the &lt;/span&gt;&lt;a href=&quot;https://www.gnu.org/licenses/old-licenses/gpl-2.0.html&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;GNU General Public License version 2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;. Code is available &lt;/span&gt;&lt;a href=&quot;https://github.com/dougg3/mac-rom-simm-programmer.software&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;It also uses the following libraries:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://qt.nokia.com/&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;Qt&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; -- for excellent cross-platform user interface compatibility&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://github.com/qt/qt5&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;Qt&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; -- for excellent cross-platform user interface compatibility&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;The Qt GUI Toolkit is Copyright © 2012 Nokia Corporation and/or its subsidiary(-ies).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Contact: Nokia Corporation (&lt;/span&gt;&lt;a href=&quot;qt-info@nokia.com&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;qt-info@nokia.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Qt Toolkit is Copyright (C) 2016 The Qt Company Ltd.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Contact: &lt;a href=&quot;http://www.qt.io/licensing/&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.qt.io/licensing/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Qt is licensed under the &lt;/span&gt;&lt;a href=&quot;http://www.gnu.org/licenses/lgpl-2.1.html&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;GNU Lesser General Public License version 2.1&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Qt is licensed under the &lt;/span&gt;&lt;a href=&quot;https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;GNU General Public License version 2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://code.google.com/p/qextserialport/&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;QextSerialPort&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; -- for communication with the SIMM programmer board (note: I use a custom version of it available at &lt;/span&gt;&lt;a href=&quot;http://code.google.com/r/doug-qextserialport-linuxnotifications/&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;this location&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;):&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://github.com/qextserialport/qextserialport&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;QextSerialPort&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; -- for communication with the SIMM programmer board:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Copyright © 2000-2003 Wayne Roth&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Copyright © 2004-2007 Stefan Sander&lt;/span&gt;&lt;/p&gt;
Expand Down
8 changes: 6 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,9 @@ void MainWindow::programmerIdentifyStatusChanged(IdentificationStatus newStatus)
uint8_t device0 = 0, device1 = 0;
p->getChipIdentity(x*2, &manufacturer0, &device0);
p->getChipIdentity(x*2+1, &manufacturer1, &device1);
thisString.sprintf("\nIC%d: Manufacturer 0x%04X, Device 0x%04X", (x + 1), (((uint16_t)manufacturer1) << 8) | manufacturer0, (((uint16_t)device1) << 8) | device0);
thisString = QString("\nIC%1: Manufacturer 0x%2, Device 0x%3").arg(x + 1)
.arg(QString::number((static_cast<uint16_t>(manufacturer1) << 8) | manufacturer0, 16).toUpper(), 4, QChar('0'))
.arg(QString::number((static_cast<uint16_t>(device1) << 8) | device0, 16).toUpper(), 4, QChar('0'));
identifyString.append(thisString);
}
}
Expand All @@ -829,7 +831,9 @@ void MainWindow::programmerIdentifyStatusChanged(IdentificationStatus newStatus)
uint8_t manufacturer = 0;
uint8_t device = 0;
p->getChipIdentity(x, &manufacturer, &device);
thisString.sprintf("\nIC%d: Manufacturer 0x%02X, Device 0x%02X", (x + 1), manufacturer, device);
thisString = QString("\nIC%1: Manufacturer 0x%2, Device 0x%3").arg(x + 1)
.arg(QString::number(manufacturer, 16).toUpper(), 2, QChar('0'))
.arg(QString::number(device, 16).toUpper(), 2, QChar('0'));
identifyString.append(thisString);
}
}
Expand Down
9 changes: 5 additions & 4 deletions programmer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ QString Programmer::electricalTestPinName(uint8_t index)
{
if (index <= LAST_ADDRESS_LINE_FAIL_INDEX)
{
return QString().sprintf("A%d", index - FIRST_ADDRESS_LINE_FAIL_INDEX);
return QString("A%1").arg(index - FIRST_ADDRESS_LINE_FAIL_INDEX);
}
else if (index <= LAST_DATA_LINE_FAIL_INDEX)
{
Expand All @@ -1378,7 +1378,7 @@ QString Programmer::electricalTestPinName(uint8_t index)
{
index = index - 24;
}
return QString().sprintf("D%d", index);
return QString("D%1").arg(index);
}
else if (index == CS_FAIL_INDEX)
{
Expand Down Expand Up @@ -1541,8 +1541,9 @@ void Programmer::portDiscovered_internal()

void Programmer::portRemoved(const QextPortInfo &info)
{
if ((info.vendorID == PROGRAMMER_USB_VENDOR_ID) &&
(info.productID == PROGRAMMER_USB_DEVICE_ID) &&
const bool matchingVIDPID = info.vendorID == PROGRAMMER_USB_VENDOR_ID && info.productID == PROGRAMMER_USB_DEVICE_ID;
const bool matchingPortName = programmerBoardPortName != "" && info.portName == programmerBoardPortName;
if ((matchingVIDPID || matchingPortName) &&
(foundState == ProgrammerBoardFound))
{
programmerBoardPortName = "";
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#define VERSION_MAJOR 1
#define VERSION_MINOR 1
#define VERSION_REVISION 1
#define VERSION_REVISION 2

#define STRINGIFY_GUTS(x) #x
#define STRINGIFY(x) STRINGIFY_GUTS(x)
Expand Down

0 comments on commit c0a899e

Please sign in to comment.