add physical address display to memory viewer

This commit is contained in:
Ash Wolf 2019-12-20 22:25:05 +00:00
parent 9bc338ad18
commit 3851109a0a
3 changed files with 47 additions and 36 deletions

View File

@ -41,6 +41,8 @@ Resources
Special thanks to [PsiLinux/OpenPsion](http://linux-7110.sourceforge.net/index.shtml) for providing an avenue to learn about the hardware definitions (registers, etc). Special thanks to [PsiLinux/OpenPsion](http://linux-7110.sourceforge.net/index.shtml) for providing an avenue to learn about the hardware definitions (registers, etc).
More information on the hardware is available in the NetBSD port: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/epoc32/?only_with_tag=MAIN
The EPOC C++ SDK is available here: https://web.archive.org/web/20071010101808/http://www.psionteklogix.com/teknet/pdk/netpad-pdk/epoc_downloads.htm The EPOC C++ SDK is available here: https://web.archive.org/web/20071010101808/http://www.psionteklogix.com/teknet/pdk/netpad-pdk/epoc_downloads.htm
The ARM variant used in the 5mx is documented here: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0033d/DDI0033D_710a_prelim_ds.pdf The ARM variant used in the 5mx is documented here: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0033d/DDI0033D_710a_prelim_ds.pdf

View File

@ -273,6 +273,8 @@ void MainWindow::updateMemory()
uint32_t virtBase = ui->memoryViewAddress->text().toUInt(nullptr, 16) & ~0xFF; uint32_t virtBase = ui->memoryViewAddress->text().toUInt(nullptr, 16) & ~0xFF;
uint32_t physBase = emu->virtToPhys(virtBase); uint32_t physBase = emu->virtToPhys(virtBase);
bool ok = (physBase != 0xFFFFFFFF) && emu->isPhysAddressValid(physBase); bool ok = (physBase != 0xFFFFFFFF) && emu->isPhysAddressValid(physBase);
if (ok && (virtBase != physBase))
ui->physicalAddressLabel->setText(QStringLiteral("Physical: %1").arg(physBase, 8, 16, QLatin1Char('0')));
uint8_t block[0x100]; uint8_t block[0x100];
if (ok) { if (ok) {

View File

@ -133,6 +133,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="5">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="5"> <item row="1" column="5">
<widget class="QToolButton" name="memorySub4"> <widget class="QToolButton" name="memorySub4">
<property name="text"> <property name="text">
@ -154,6 +167,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="13">
<widget class="QLabel" name="memoryViewLabel">
<property name="font">
<font>
<family>Courier New</family>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="2" column="4"> <item row="2" column="4">
<widget class="QToolButton" name="memoryAdd1"> <widget class="QToolButton" name="memoryAdd1">
<property name="text"> <property name="text">
@ -161,6 +186,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="10">
<widget class="QLabel" name="physicalAddressLabel">
<property name="text">
<string>Physical: XXXXXXXX</string>
</property>
</widget>
</item>
<item row="2" column="7"> <item row="2" column="7">
<widget class="QToolButton" name="memoryAdd100"> <widget class="QToolButton" name="memoryAdd100">
<property name="text"> <property name="text">
@ -168,33 +200,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="9"> <item row="0" column="12" rowspan="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="5">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="10" rowspan="3">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>Write</string> <string>Write</string>
@ -220,17 +226,18 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="11"> <item row="0" column="11">
<widget class="QLabel" name="memoryViewLabel"> <spacer name="horizontalSpacer_2">
<property name="font"> <property name="orientation">
<font> <enum>Qt::Horizontal</enum>
<family>Courier New</family>
</font>
</property> </property>
<property name="text"> <property name="sizeHint" stdset="0">
<string>TextLabel</string> <size>
<width>40</width>
<height>20</height>
</size>
</property> </property>
</widget> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>