From b052dcb402042d1a37bc5b2024050c0f9574d635 Mon Sep 17 00:00:00 2001 From: yz70s Date: Sun, 29 Nov 2015 18:02:43 +0100 Subject: First commit for issue #476 "byte per chunk" is sostituted by "data format" data formats lesser than 9 work as before, data format 9 is 32 but floating point in the debug_view_memory class method bytes_per_chunk is substituted by get_data_format, set_bytes_per_chunk is substituted by set_data_format floating point values cannot be edited currently floating point values are available only in the windows debugger, next commit will add them to the qt debugger, osx i won't be able to do it afterwards 64 and 80 bit formats will be added --- src/osd/modules/debugger/qt/memorywindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/osd/modules/debugger/qt/memorywindow.cpp') diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp index 3aee20a0cd0..e18a4df2c88 100644 --- a/src/osd/modules/debugger/qt/memorywindow.cpp +++ b/src/osd/modules/debugger/qt/memorywindow.cpp @@ -143,7 +143,7 @@ void MemoryWindow::memoryRegionChanged(int index) // Update the chunk size radio buttons to the memory region's default debug_view_memory* memView = downcast(m_memTable->view()); - switch(memView->bytes_per_chunk()) + switch(memView->get_data_format()) { case 1: chunkSizeMenuItem("chunkActOne")->setChecked(true); break; case 2: chunkSizeMenuItem("chunkActTwo")->setChecked(true); break; @@ -176,15 +176,15 @@ void MemoryWindow::chunkChanged(QAction* changedTo) debug_view_memory* memView = downcast(m_memTable->view()); if (changedTo->text() == "1-byte chunks") { - memView->set_bytes_per_chunk(1); + memView->set_data_format(1); } else if (changedTo->text() == "2-byte chunks") { - memView->set_bytes_per_chunk(2); + memView->set_data_format(2); } else if (changedTo->text() == "4-byte chunks") { - memView->set_bytes_per_chunk(4); + memView->set_data_format(4); } m_memTable->viewport()->update(); } -- cgit v1.2.3-70-g09d2 From 0b0701b32d0fe523421d6cf8d9d267399a8c433a Mon Sep 17 00:00:00 2001 From: yz70s Date: Mon, 30 Nov 2015 22:43:14 +0100 Subject: Show 32 bit floating point values in qt debugger memory view (issue #476) Since i was at it also 8 byte chunks --- src/osd/modules/debugger/qt/memorywindow.cpp | 101 +++++++++++++++++---------- src/osd/modules/debugger/qt/memorywindow.h | 8 +-- 2 files changed, 67 insertions(+), 42 deletions(-) (limited to 'src/osd/modules/debugger/qt/memorywindow.cpp') diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp index e18a4df2c88..2e293040bb8 100644 --- a/src/osd/modules/debugger/qt/memorywindow.cpp +++ b/src/osd/modules/debugger/qt/memorywindow.cpp @@ -59,26 +59,37 @@ MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) : // // Menu bars // - // Create a byte-chunk group - QActionGroup* chunkGroup = new QActionGroup(this); - chunkGroup->setObjectName("chunkgroup"); - QAction* chunkActOne = new QAction("1-byte chunks", this); - chunkActOne->setObjectName("chunkActOne"); - QAction* chunkActTwo = new QAction("2-byte chunks", this); - chunkActTwo->setObjectName("chunkActTwo"); - QAction* chunkActFour = new QAction("4-byte chunks", this); - chunkActFour->setObjectName("chunkActFour"); - chunkActOne->setCheckable(true); - chunkActTwo->setCheckable(true); - chunkActFour->setCheckable(true); - chunkActOne->setActionGroup(chunkGroup); - chunkActTwo->setActionGroup(chunkGroup); - chunkActFour->setActionGroup(chunkGroup); - chunkActOne->setShortcut(QKeySequence("Ctrl+1")); - chunkActTwo->setShortcut(QKeySequence("Ctrl+2")); - chunkActFour->setShortcut(QKeySequence("Ctrl+4")); - chunkActOne->setChecked(true); - connect(chunkGroup, SIGNAL(triggered(QAction*)), this, SLOT(chunkChanged(QAction*))); + + // Create a data format group + QActionGroup* dataFormat = new QActionGroup(this); + dataFormat->setObjectName("dataformat"); + QAction* formatActOne = new QAction("1-byte chunks", this); + QAction* formatActTwo = new QAction("2-byte chunks", this); + QAction* formatActFour = new QAction("4-byte chunks", this); + QAction* formatActEight = new QAction("8-byte chunks", this); + QAction* formatAct32bitFloat = new QAction("32 bit floating point", this); + formatActOne->setObjectName("formatActOne"); + formatActTwo->setObjectName("formatActTwo"); + formatActFour->setObjectName("formatActFour"); + formatActEight->setObjectName("formatActEight"); + formatAct32bitFloat->setObjectName("formatAct32bitFloat"); + formatActOne->setCheckable(true); + formatActTwo->setCheckable(true); + formatActFour->setCheckable(true); + formatActEight->setCheckable(true); + formatAct32bitFloat->setCheckable(true); + formatActOne->setActionGroup(dataFormat); + formatActTwo->setActionGroup(dataFormat); + formatActFour->setActionGroup(dataFormat); + formatActEight->setActionGroup(dataFormat); + formatAct32bitFloat->setActionGroup(dataFormat); + formatActOne->setShortcut(QKeySequence("Ctrl+1")); + formatActTwo->setShortcut(QKeySequence("Ctrl+2")); + formatActFour->setShortcut(QKeySequence("Ctrl+4")); + formatActEight->setShortcut(QKeySequence("Ctrl+8")); + formatAct32bitFloat->setShortcut(QKeySequence("Ctrl+9")); + formatActOne->setChecked(true); + connect(dataFormat, SIGNAL(triggered(QAction*)), this, SLOT(formatChanged(QAction*))); // Create a address display group QActionGroup* addressGroup = new QActionGroup(this); @@ -111,7 +122,7 @@ MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) : // Assemble the options menu QMenu* optionsMenu = menuBar()->addMenu("&Options"); - optionsMenu->addActions(chunkGroup->actions()); + optionsMenu->addActions(dataFormat->actions()); optionsMenu->addSeparator(); optionsMenu->addActions(addressGroup->actions()); optionsMenu->addSeparator(); @@ -141,13 +152,15 @@ void MemoryWindow::memoryRegionChanged(int index) m_memTable->view()->set_source(*m_memTable->view()->source_list().find(index)); m_memTable->viewport()->update(); - // Update the chunk size radio buttons to the memory region's default + // Update the data format radio buttons to the memory region's default debug_view_memory* memView = downcast(m_memTable->view()); switch(memView->get_data_format()) { - case 1: chunkSizeMenuItem("chunkActOne")->setChecked(true); break; - case 2: chunkSizeMenuItem("chunkActTwo")->setChecked(true); break; - case 4: chunkSizeMenuItem("chunkActFour")->setChecked(true); break; + case 1: dataFormatMenuItem("formatActOne")->setChecked(true); break; + case 2: dataFormatMenuItem("formatActTwo")->setChecked(true); break; + case 4: dataFormatMenuItem("formatActFour")->setChecked(true); break; + case 8: dataFormatMenuItem("formatActEight")->setChecked(true); break; + case 9: dataFormatMenuItem("formatAct32bitFloat")->setChecked(true); break; default: break; } } @@ -171,7 +184,7 @@ void MemoryWindow::expressionSubmitted() } -void MemoryWindow::chunkChanged(QAction* changedTo) +void MemoryWindow::formatChanged(QAction* changedTo) { debug_view_memory* memView = downcast(m_memTable->view()); if (changedTo->text() == "1-byte chunks") @@ -186,6 +199,14 @@ void MemoryWindow::chunkChanged(QAction* changedTo) { memView->set_data_format(4); } + else if (changedTo->text() == "8-byte chunks") + { + memView->set_data_format(8); + } + else if (changedTo->text() == "32 bit floating point") + { + memView->set_data_format(9); + } m_memTable->viewport()->update(); } @@ -254,7 +275,7 @@ void MemoryWindow::setToCurrentCpu() // I have a hard time storing QActions as class members. This is a substitute. -QAction* MemoryWindow::chunkSizeMenuItem(const QString& itemName) +QAction* MemoryWindow::dataFormatMenuItem(const QString& itemName) { QList menus = menuBar()->findChildren(); for (int i = 0; i < menus.length(); i++) @@ -349,13 +370,17 @@ void MemoryWindowQtConfig::buildFromQWidget(QWidget* widget) else if (addressGroup->checkedAction()->text() == "Physical Addresses") m_addressMode = 1; - QActionGroup* chunkGroup = window->findChild("chunkgroup"); - if (chunkGroup->checkedAction()->text() == "1-byte chunks") - m_chunkSize = 0; - else if (chunkGroup->checkedAction()->text() == "2-byte chunks") - m_chunkSize = 1; - else if (chunkGroup->checkedAction()->text() == "4-byte chunks") - m_chunkSize = 2; + QActionGroup* dataFormat = window->findChild("dataformat"); + if (dataFormat->checkedAction()->text() == "1-byte chunks") + m_dataFormat = 0; + else if (dataFormat->checkedAction()->text() == "2-byte chunks") + m_dataFormat = 1; + else if (dataFormat->checkedAction()->text() == "4-byte chunks") + m_dataFormat = 2; + else if (dataFormat->checkedAction()->text() == "8-byte chunks") + m_dataFormat = 3; + else if (dataFormat->checkedAction()->text() == "32 bit floating point") + m_dataFormat = 4; } @@ -372,8 +397,8 @@ void MemoryWindowQtConfig::applyToQWidget(QWidget* widget) QActionGroup* addressGroup = window->findChild("addressgroup"); addressGroup->actions()[m_addressMode]->trigger(); - QActionGroup* chunkGroup = window->findChild("chunkgroup"); - chunkGroup->actions()[m_chunkSize]->trigger(); + QActionGroup* dataFormat = window->findChild("dataformat"); + dataFormat->actions()[m_dataFormat]->trigger(); } @@ -383,7 +408,7 @@ void MemoryWindowQtConfig::addToXmlDataNode(xml_data_node* node) const xml_set_attribute_int(node, "memoryregion", m_memoryRegion); xml_set_attribute_int(node, "reverse", m_reverse); xml_set_attribute_int(node, "addressmode", m_addressMode); - xml_set_attribute_int(node, "chunksize", m_chunkSize); + xml_set_attribute_int(node, "dataformat", m_dataFormat); } @@ -393,5 +418,5 @@ void MemoryWindowQtConfig::recoverFromXmlNode(xml_data_node* node) m_memoryRegion = xml_get_attribute_int(node, "memoryregion", m_memoryRegion); m_reverse = xml_get_attribute_int(node, "reverse", m_reverse); m_addressMode = xml_get_attribute_int(node, "addressmode", m_addressMode); - m_chunkSize = xml_get_attribute_int(node, "chunksize", m_chunkSize); + m_dataFormat = xml_get_attribute_int(node, "dataformat", m_dataFormat); } diff --git a/src/osd/modules/debugger/qt/memorywindow.h b/src/osd/modules/debugger/qt/memorywindow.h index 5233c619d19..75b3c994bb7 100644 --- a/src/osd/modules/debugger/qt/memorywindow.h +++ b/src/osd/modules/debugger/qt/memorywindow.h @@ -26,7 +26,7 @@ public: private slots: void memoryRegionChanged(int index); void expressionSubmitted(); - void chunkChanged(QAction* changedTo); + void formatChanged(QAction* changedTo); void addressChanged(QAction* changedTo); void reverseChanged(bool changedTo); void increaseBytesPerLine(bool changedTo); @@ -36,7 +36,7 @@ private slots: private: void populateComboBox(); void setToCurrentCpu(); - QAction* chunkSizeMenuItem(const QString& itemName); + QAction* dataFormatMenuItem(const QString& itemName); private: @@ -75,7 +75,7 @@ public: WindowQtConfig(WIN_TYPE_MEMORY), m_reverse(0), m_addressMode(0), - m_chunkSize(0), + m_dataFormat(0), m_memoryRegion(0) { } @@ -85,7 +85,7 @@ public: // Settings int m_reverse; int m_addressMode; - int m_chunkSize; + int m_dataFormat; int m_memoryRegion; void buildFromQWidget(QWidget* widget); -- cgit v1.2.3-70-g09d2 From e76dc648688f98ee58ef3579b4346ff44e4ef3a6 Mon Sep 17 00:00:00 2001 From: yz70s Date: Sun, 6 Dec 2015 21:33:49 +0100 Subject: Show 64 and 80 bit floats in windows and qt debugger (issue #476) --- src/emu/debug/dvmemory.cpp | 115 +++++++++++++++++++++---- src/emu/debug/dvmemory.h | 6 +- src/osd/modules/debugger/qt/memorywindow.cpp | 23 ++++- src/osd/modules/debugger/win/debugwininfo.h | 2 + src/osd/modules/debugger/win/memorywininfo.cpp | 12 +++ 5 files changed, 137 insertions(+), 21 deletions(-) (limited to 'src/osd/modules/debugger/qt/memorywindow.cpp') diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp index 88062c9209a..2b9798c5c5e 100644 --- a/src/emu/debug/dvmemory.cpp +++ b/src/emu/debug/dvmemory.cpp @@ -20,7 +20,7 @@ // GLOBAL VARIABLES //************************************************************************** -const debug_view_memory::memory_view_pos debug_view_memory::s_memory_pos_table[9] = +const debug_view_memory::memory_view_pos debug_view_memory::s_memory_pos_table[12] = { /* 0 bytes per chunk: */ { 0, { 0 } }, /* 1 byte per chunk: 00 11 22 33 44 55 66 77 */ { 3, { 0x04, 0x00, 0x80 } }, @@ -30,7 +30,10 @@ const debug_view_memory::memory_view_pos debug_view_memory::s_memory_pos_table[9 /* 5 bytes per chunk: */ { 0, { 0 } }, /* 6 bytes per chunk: */ { 0, { 0 } }, /* 7 bytes per chunk: */ { 0, { 0 } }, - /* 8 bytes per chunk: 0011223344556677 */ { 24, { 0xbc, 0xbc, 0xbc, 0xbc, 0x3c, 0x38, 0x34, 0x30, 0x2c, 0x28, 0x24, 0x20, 0x1c, 0x18, 0x14, 0x10, 0x0c, 0x08, 0x04, 0x00, 0x80, 0x80, 0x80, 0x80 } } + /* 8 bytes per chunk: 0011223344556677 */ { 24, { 0xbc, 0xbc, 0xbc, 0xbc, 0x3c, 0x38, 0x34, 0x30, 0x2c, 0x28, 0x24, 0x20, 0x1c, 0x18, 0x14, 0x10, 0x0c, 0x08, 0x04, 0x00, 0x80, 0x80, 0x80, 0x80 } }, + /* 32 bit floating point: */ { 16, { 0 } }, + /* 64 bit floating point: */ { 32, { 0 } }, + /* 80 bit floating point: */ { 32, { 0 } }, }; @@ -219,6 +222,22 @@ INLINE float uint32_to_float(UINT32 value) return v.f; } +//------------------------------------------------- +// uint64_to_double - return a floating point number +// whose 64 bit representation is value +//------------------------------------------------- + +INLINE float uint64_to_double(UINT64 value) +{ + union { + double f; + UINT64 i; + } v; + + v.i = value; + return v.f; +} + //------------------------------------------------- // view_update - update the contents of the // memory view @@ -233,7 +252,7 @@ void debug_view_memory::view_update() recompute(); // get positional data - const memory_view_pos &posdata = s_memory_pos_table[m_bytes_per_chunk]; + const memory_view_pos &posdata = s_memory_pos_table[m_data_format]; // loop over visible rows for (UINT32 row = 0; row < m_visible.y; row++) @@ -278,9 +297,9 @@ void debug_view_memory::view_update() int chunkindex = m_reverse_view ? (m_chunks_per_row - 1 - chunknum) : chunknum; int spacing = posdata.m_spacing; - UINT64 chunkdata; - bool ismapped = read(m_bytes_per_chunk, addrbyte + chunknum * m_bytes_per_chunk, chunkdata); if (m_data_format <= 8) { + UINT64 chunkdata; + bool ismapped = read(m_bytes_per_chunk, addrbyte + chunknum * m_bytes_per_chunk, chunkdata); dest = destrow + m_section[1].m_pos + 1 + chunkindex * spacing; for (int ch = 0; ch < posdata.m_spacing; ch++, dest++) if (dest >= destmin && dest < destmax) @@ -292,22 +311,41 @@ void debug_view_memory::view_update() } else { int ch; - char valuetext[20]; + char valuetext[64]; + UINT64 chunkdata; + floatx80 chunkdata80; + bool ismapped; + + if (m_data_format != 11) + ismapped = read(m_bytes_per_chunk, addrbyte + chunknum * m_bytes_per_chunk, chunkdata); + else + ismapped = read(m_bytes_per_chunk, addrbyte + chunknum * m_bytes_per_chunk, chunkdata80); - spacing = 16; - dest = destrow + m_section[1].m_pos + 1 + chunkindex * spacing; if (ismapped) - sprintf(valuetext, "%g", uint32_to_float((UINT32)chunkdata)); + switch (m_data_format) + { + case 9: + sprintf(valuetext, "%g", uint32_to_float((UINT32)chunkdata)); + break; + case 10: + sprintf(valuetext, "%g", uint64_to_double(chunkdata)); + break; + case 11: + float64 f64 = floatx80_to_float64(chunkdata80); + sprintf(valuetext, "%g", uint64_to_double(f64)); + break; + } else { valuetext[0] = '*'; valuetext[1] = 0; } + dest = destrow + m_section[1].m_pos + 1 + chunkindex * spacing; // first copy the text - for (ch = 0; (ch < 16) && (valuetext[ch] != 0); ch++, dest++) + for (ch = 0; (ch < spacing) && (valuetext[ch] != 0); ch++, dest++) if (dest >= destmin && dest < destmax) dest->byte = valuetext[ch]; // then fill with spaces - for (; ch < 16; ch++, dest++) + for (; ch < spacing; ch++, dest++) if (dest >= destmin && dest < destmax) dest->byte = ' '; } @@ -529,8 +567,11 @@ void debug_view_memory::recompute() m_section[0].m_width = 1 + 8 + 1; if (m_data_format <= 8) m_section[1].m_width = 1 + 3 * m_bytes_per_row + 1; - else - m_section[1].m_width = 1 + 16 * m_chunks_per_row + 1; + else { + const memory_view_pos &posdata = s_memory_pos_table[m_data_format]; + + m_section[1].m_width = 1 + posdata.m_spacing * m_chunks_per_row + 1; + } m_section[2].m_width = m_ascii_view ? (1 + m_bytes_per_row + 1) : 0; // compute the section positions @@ -599,11 +640,11 @@ debug_view_memory::cursor_pos debug_view_memory::get_cursor_pos(const debug_view { // start with the base address for this row cursor_pos pos; + const memory_view_pos &posdata = s_memory_pos_table[m_data_format]; pos.m_address = m_byte_offset + cursor.y * m_bytes_per_chunk * m_chunks_per_row; // determine the X position within the middle section, clamping as necessary if (m_data_format <= 8) { - const memory_view_pos &posdata = s_memory_pos_table[m_bytes_per_chunk]; int xposition = cursor.x - m_section[1].m_pos - 1; if (xposition < 0) xposition = 0; @@ -627,7 +668,7 @@ debug_view_memory::cursor_pos debug_view_memory::get_cursor_pos(const debug_view // check for lower limit if (xposition < 0) xposition = 0; - int chunknum = xposition / 16; + int chunknum = xposition / posdata.m_spacing; // check for upper limit if (chunknum >= m_chunks_per_row) chunknum = m_chunks_per_row - 1; @@ -650,7 +691,7 @@ debug_view_memory::cursor_pos debug_view_memory::get_cursor_pos(const debug_view void debug_view_memory::set_cursor_pos(cursor_pos pos) { - const memory_view_pos &posdata = s_memory_pos_table[m_bytes_per_chunk]; + const memory_view_pos &posdata = s_memory_pos_table[m_data_format]; // offset the address by the byte offset if (pos.m_address < m_byte_offset) @@ -675,7 +716,7 @@ void debug_view_memory::set_cursor_pos(cursor_pos pos) m_cursor.x += m_section[1].m_pos + 1 + posdata.m_spacing * chunknum; } else { - m_cursor.x = m_section[1].m_pos + 1 + 16 * chunknum; + m_cursor.x = m_section[1].m_pos + 1 + posdata.m_spacing * chunknum; } // clamp to the window bounds @@ -741,6 +782,31 @@ bool debug_view_memory::read(UINT8 size, offs_t offs, UINT64 &data) } +//------------------------------------------------- +// read - read a 80 bit value +//------------------------------------------------- + +bool debug_view_memory::read(UINT8 size, offs_t offs, floatx80 &data) +{ + UINT64 t; + bool mappedhi, mappedlo; + const debug_view_memory_source &source = downcast(*m_source); + + if (source.m_endianness == ENDIANNESS_LITTLE) { + mappedlo = read(8, offs, data.low); + mappedhi = read(2, offs+8, t); + data.high = (bits16)t; + } + else { + mappedhi = read(2, offs, t); + data.high = (bits16)t; + mappedlo = read(8, offs + 2, data.low); + } + + return mappedhi && mappedlo; +} + + //------------------------------------------------- // write - generic memory view data writer //------------------------------------------------- @@ -837,7 +903,7 @@ void debug_view_memory::set_data_format(int format) cursor_pos pos; // should never be - if (format <= 0) + if ((format <= 0) || (format > 11)) return; // no need to change if (format == m_data_format) @@ -869,7 +935,18 @@ void debug_view_memory::set_data_format(int format) m_edit_enabled = false; m_cursor_visible = false; - m_bytes_per_chunk = 4; + switch (format) + { + case 9: + m_bytes_per_chunk = 4; + break; + case 10: + m_bytes_per_chunk = 8; + break; + case 11: + m_bytes_per_chunk = 10; + break; + } } m_chunks_per_row = m_bytes_per_row / m_bytes_per_chunk; pos.m_shift = 0; diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h index 4039136e558..afe597b8477 100644 --- a/src/emu/debug/dvmemory.h +++ b/src/emu/debug/dvmemory.h @@ -11,6 +11,9 @@ #ifndef __DVMEMORY_H__ #define __DVMEMORY_H__ +#include "softfloat/mamesf.h" +#include "softfloat/softfloat.h" + //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -94,6 +97,7 @@ private: // memory access bool read(UINT8 size, offs_t offs, UINT64 &data); void write(UINT8 size, offs_t offs, UINT64 data); + bool read(UINT8 size, offs_t offs, floatx80 &data); // internal state debug_view_expression m_expression; // expression describing the start address @@ -122,7 +126,7 @@ private: UINT8 m_spacing; /* spacing between each entry */ UINT8 m_shift[24]; /* shift for each character */ }; - static const memory_view_pos s_memory_pos_table[9]; // table for rendering at different chunk sizes + static const memory_view_pos s_memory_pos_table[12]; // table for rendering at different data formats // constants static const int MEM_MAX_LINE_WIDTH = 1024; diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp index 2e293040bb8..e78691db6f8 100644 --- a/src/osd/modules/debugger/qt/memorywindow.cpp +++ b/src/osd/modules/debugger/qt/memorywindow.cpp @@ -68,21 +68,29 @@ MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) : QAction* formatActFour = new QAction("4-byte chunks", this); QAction* formatActEight = new QAction("8-byte chunks", this); QAction* formatAct32bitFloat = new QAction("32 bit floating point", this); + QAction* formatAct64bitFloat = new QAction("64 bit floating point", this); + QAction* formatAct80bitFloat = new QAction("80 bit floating point", this); formatActOne->setObjectName("formatActOne"); formatActTwo->setObjectName("formatActTwo"); formatActFour->setObjectName("formatActFour"); formatActEight->setObjectName("formatActEight"); formatAct32bitFloat->setObjectName("formatAct32bitFloat"); + formatAct64bitFloat->setObjectName("formatAct64bitFloat"); + formatAct80bitFloat->setObjectName("formatAct80bitFloat"); formatActOne->setCheckable(true); formatActTwo->setCheckable(true); formatActFour->setCheckable(true); formatActEight->setCheckable(true); formatAct32bitFloat->setCheckable(true); + formatAct64bitFloat->setCheckable(true); + formatAct80bitFloat->setCheckable(true); formatActOne->setActionGroup(dataFormat); formatActTwo->setActionGroup(dataFormat); formatActFour->setActionGroup(dataFormat); formatActEight->setActionGroup(dataFormat); formatAct32bitFloat->setActionGroup(dataFormat); + formatAct64bitFloat->setActionGroup(dataFormat); + formatAct80bitFloat->setActionGroup(dataFormat); formatActOne->setShortcut(QKeySequence("Ctrl+1")); formatActTwo->setShortcut(QKeySequence("Ctrl+2")); formatActFour->setShortcut(QKeySequence("Ctrl+4")); @@ -90,7 +98,6 @@ MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) : formatAct32bitFloat->setShortcut(QKeySequence("Ctrl+9")); formatActOne->setChecked(true); connect(dataFormat, SIGNAL(triggered(QAction*)), this, SLOT(formatChanged(QAction*))); - // Create a address display group QActionGroup* addressGroup = new QActionGroup(this); addressGroup->setObjectName("addressgroup"); @@ -161,6 +168,8 @@ void MemoryWindow::memoryRegionChanged(int index) case 4: dataFormatMenuItem("formatActFour")->setChecked(true); break; case 8: dataFormatMenuItem("formatActEight")->setChecked(true); break; case 9: dataFormatMenuItem("formatAct32bitFloat")->setChecked(true); break; + case 10: dataFormatMenuItem("formatAct64bitFloat")->setChecked(true); break; + case 11: dataFormatMenuItem("formatAct80bitFloat")->setChecked(true); break; default: break; } } @@ -207,6 +216,14 @@ void MemoryWindow::formatChanged(QAction* changedTo) { memView->set_data_format(9); } + else if (changedTo->text() == "64 bit floating point") + { + memView->set_data_format(10); + } + else if (changedTo->text() == "80 bit floating point") + { + memView->set_data_format(11); + } m_memTable->viewport()->update(); } @@ -381,6 +398,10 @@ void MemoryWindowQtConfig::buildFromQWidget(QWidget* widget) m_dataFormat = 3; else if (dataFormat->checkedAction()->text() == "32 bit floating point") m_dataFormat = 4; + else if (dataFormat->checkedAction()->text() == "64 bit floating point") + m_dataFormat = 5; + else if (dataFormat->checkedAction()->text() == "80 bit floating point") + m_dataFormat = 6; } diff --git a/src/osd/modules/debugger/win/debugwininfo.h b/src/osd/modules/debugger/win/debugwininfo.h index 08e08d79de9..c0825bcf8d1 100644 --- a/src/osd/modules/debugger/win/debugwininfo.h +++ b/src/osd/modules/debugger/win/debugwininfo.h @@ -83,6 +83,8 @@ protected: ID_4_BYTE_CHUNKS, ID_8_BYTE_CHUNKS, ID_FLOATING_POINT_32BIT, + ID_FLOATING_POINT_64BIT, + ID_FLOATING_POINT_80BIT, ID_LOGICAL_ADDRESSES, ID_PHYSICAL_ADDRESSES, ID_REVERSE_VIEW, diff --git a/src/osd/modules/debugger/win/memorywininfo.cpp b/src/osd/modules/debugger/win/memorywininfo.cpp index 0d5163954c3..b6d2b83614b 100644 --- a/src/osd/modules/debugger/win/memorywininfo.cpp +++ b/src/osd/modules/debugger/win/memorywininfo.cpp @@ -36,6 +36,8 @@ memorywin_info::memorywin_info(debugger_windows_interface &debugger) : AppendMenu(optionsmenu, MF_ENABLED, ID_4_BYTE_CHUNKS, TEXT("4-byte chunks\tCtrl+4")); AppendMenu(optionsmenu, MF_ENABLED, ID_8_BYTE_CHUNKS, TEXT("8-byte chunks\tCtrl+8")); AppendMenu(optionsmenu, MF_ENABLED, ID_FLOATING_POINT_32BIT, TEXT("32 bit floating point\tCtrl+9")); + AppendMenu(optionsmenu, MF_ENABLED, ID_FLOATING_POINT_64BIT, TEXT("64 bit floating point")); + AppendMenu(optionsmenu, MF_ENABLED, ID_FLOATING_POINT_80BIT, TEXT("80 bit floating point")); AppendMenu(optionsmenu, MF_DISABLED | MF_SEPARATOR, 0, TEXT("")); AppendMenu(optionsmenu, MF_ENABLED, ID_LOGICAL_ADDRESSES, TEXT("Logical Addresses\tCtrl+L")); AppendMenu(optionsmenu, MF_ENABLED, ID_PHYSICAL_ADDRESSES, TEXT("Physical Addresses\tCtrl+Y")); @@ -182,6 +184,8 @@ void memorywin_info::update_menu() CheckMenuItem(menu, ID_4_BYTE_CHUNKS, MF_BYCOMMAND | (memview->data_format() == 4 ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(menu, ID_8_BYTE_CHUNKS, MF_BYCOMMAND | (memview->data_format() == 8 ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(menu, ID_FLOATING_POINT_32BIT, MF_BYCOMMAND | (memview->data_format() == 9 ? MF_CHECKED : MF_UNCHECKED)); + CheckMenuItem(menu, ID_FLOATING_POINT_64BIT, MF_BYCOMMAND | (memview->data_format() == 10 ? MF_CHECKED : MF_UNCHECKED)); + CheckMenuItem(menu, ID_FLOATING_POINT_80BIT, MF_BYCOMMAND | (memview->data_format() == 11 ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(menu, ID_LOGICAL_ADDRESSES, MF_BYCOMMAND | (memview->physical() ? MF_UNCHECKED : MF_CHECKED)); CheckMenuItem(menu, ID_PHYSICAL_ADDRESSES, MF_BYCOMMAND | (memview->physical() ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(menu, ID_REVERSE_VIEW, MF_BYCOMMAND | (memview->reverse() ? MF_CHECKED : MF_UNCHECKED)); @@ -234,6 +238,14 @@ bool memorywin_info::handle_command(WPARAM wparam, LPARAM lparam) memview->set_data_format(9); return true; + case ID_FLOATING_POINT_64BIT: + memview->set_data_format(10); + return true; + + case ID_FLOATING_POINT_80BIT: + memview->set_data_format(11); + return true; + case ID_LOGICAL_ADDRESSES: memview->set_physical(false); return true; -- cgit v1.2.3-70-g09d2