From 2d99e2b7f7b3905d8c73f5e83c4c2ea8b030dc9c Mon Sep 17 00:00:00 2001 From: Jean-Paul Mari Date: Wed, 21 Aug 2019 02:49:37 -0400 Subject: [PATCH] Added a HW registers browser window and set a tab for the Blitter --- Win-VS2017/virtualjaguar.vcxproj | 69 ++++++++++- Win-VS2017/virtualjaguar.vcxproj.filters | 33 +++++- docs/vj_HistoryNotes.txt | 1 + res/help.html | 3 + res/tool-hw-regs.png | Bin 0 -> 4373 bytes src/gui/debug/hwregsblitterbrowser.cpp | 139 +++++++++++++++++++++++ src/gui/debug/hwregsblitterbrowser.h | 37 ++++++ src/gui/debug/hwregsbrowser.cpp | 70 ++++++++++++ src/gui/debug/hwregsbrowser.h | 39 +++++++ src/gui/mainwin.cpp | 33 +++++- src/gui/mainwin.h | 4 + src/gui/virtualjaguar.qrc | 1 + virtualjaguar.pro | 2 + 13 files changed, 426 insertions(+), 5 deletions(-) create mode 100644 res/tool-hw-regs.png create mode 100644 src/gui/debug/hwregsblitterbrowser.cpp create mode 100644 src/gui/debug/hwregsblitterbrowser.h create mode 100644 src/gui/debug/hwregsbrowser.cpp create mode 100644 src/gui/debug/hwregsbrowser.h diff --git a/Win-VS2017/virtualjaguar.vcxproj b/Win-VS2017/virtualjaguar.vcxproj index 52a6b6d..f1f5e6e 100644 --- a/Win-VS2017/virtualjaguar.vcxproj +++ b/Win-VS2017/virtualjaguar.vcxproj @@ -288,6 +288,11 @@ + + + + + @@ -378,9 +383,19 @@ true true + + true + true + + + true + true + false + true true + false true @@ -524,7 +539,9 @@ true true - + + true + true true @@ -565,9 +582,18 @@ true true + + true + true + + + true + true + true true + false true @@ -805,6 +831,46 @@ .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_UNICODE "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\OpenGL\include" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.11\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\GeneratedFiles" + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-IC:\SDK\SDL-1.2.15\include" "-IC:\SDK\mesa-11.2.0-rc4\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)" "-I.\GeneratedFiles" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.8\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-IC:\SDK\OpenGL\include" "-I.\GeneratedFiles" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)" "-I.\GeneratedFiles" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\OpenGL\include" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.11\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I.\GeneratedFiles" + + + + + + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-IC:\SDK\SDL-1.2.15\include" "-IC:\SDK\mesa-11.2.0-rc4\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)" "-I.\GeneratedFiles" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.8\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-IC:\SDK\OpenGL\include" "-I.\GeneratedFiles" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)" "-I.\GeneratedFiles" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D%(PreprocessorDefinitions) "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\OpenGL\include" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.11\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I.\GeneratedFiles" + @@ -1659,6 +1725,7 @@ true true + diff --git a/Win-VS2017/virtualjaguar.vcxproj.filters b/Win-VS2017/virtualjaguar.vcxproj.filters index 530696e..6c74ae9 100644 --- a/Win-VS2017/virtualjaguar.vcxproj.filters +++ b/Win-VS2017/virtualjaguar.vcxproj.filters @@ -445,6 +445,24 @@ Source Files\debugger + + Source Files\alpine + + + Generated Files + + + Generated Files + + + Generated Files + + + Generated Files + + + Source Files\alpine + @@ -468,9 +486,6 @@ Header Files\gui - - Header Files\debugger - Header Files\debugger @@ -498,6 +513,9 @@ Header Files + + Header Files\debugger + @@ -760,6 +778,12 @@ Header Files\debugger + + Header Files\alpine + + + Header Files\alpine + @@ -805,5 +829,8 @@ Resource Files + + Resource Files + \ No newline at end of file diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index c427baa..fd9fc6c 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -6,6 +6,7 @@ Release 5 (TBA) -- Alert box will display a message and then the code will stop 2) Added a specific breakpoint for the M68K address error exception -- Alert box will display a message and then the code will stop +3) Added a HW registers browser window and set a tab for the Blitter Release 4a (15th August 2019) ----------------------------- diff --git a/res/help.html b/res/help.html index 47649cf..cf23d34 100644 --- a/res/help.html +++ b/res/help.html @@ -258,6 +258,7 @@
  • OP Browser
  • M68K Disassembly Browser
  • RISC Disassembly Browser
  • +
  • HW Registers Browser
  • Memory Browser

    This window lets you inspect Virtual Jaguar’s emulated memory space. The PgDn key will advance the top of the window’s memory location by 480 bytes, and PgUp will go back by the same amount. The Plus (+) key will advance the top of the window’s memory location by 16 bytes, and Minus (-) will go back by the same amount. Entering a memory location, in hexadecimal, in the edit field and pressing the Go button will display memory from that location. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    @@ -271,6 +272,8 @@

    This window provides a disassembly of 68000 opcodes. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    RISC Disassembly Browser

    This window provides a disassembly of RISC opcodes. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    +

    HW Registers Browser

    +

    This window provides a list of the hardware registers content; for the moment, only the blitter is displayed. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    The aforementioned options will only work when Virtual Jaguar is run in Alpine or Debugger mode, that is, when the --alpine or --debugger flag is passed in. If you do not pass such flag, Virtual Jaguar will run as it normally does, i.e., as a stock Jaguar, and nothing will be loaded by default.

    For The Curious

    If you’re wondering why some cartridges have labels in the “Insert Cartridge...” dialogue and some don’t, read on...

    diff --git a/res/tool-hw-regs.png b/res/tool-hw-regs.png new file mode 100644 index 0000000000000000000000000000000000000000..76d2b8087826ba94a58fee70920756c275c7750d GIT binary patch literal 4373 zcmV+w5$f)VP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D5UNQ;K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0P4Nbh)_Xn0lqE2#!R(T3Ebjwz98gDrj?_*Hqw9-^_? zw)jPGWqZdQs?sp>RQ^Dps+reQ4Zthg;)$D1;>5Z(_v1^cYZh&L^gxo-?a2eA|+X z=pCzlq&_GW^Gc~R5tr)@>VPx zMXFR80gha#^LTZrefrfthV<4!*J2&Cr*g>Yo8*>nBGb^cdDb~aVj4$5%$XhyX2wq|+ z;+Z@(3_87YGb*18=J@vfUbU1-VajAL0>#0Tlrix>gVuQ#c@;US$~6Z(zwNmhS?AUr zs*P6|V~)nZh14^c!A?vrTzu>b7S#8*$Lh=0sfD*92P<>UiP!rw8=4hX0I?T=y!G(O zhVed&hQtpBJZsyKJp6T_2$nrJR=GK0{bG9!sCG@_EU6{fQppp!MlfUv6|X`#W$4DZ zu7|=%+n&2`g_5c87QaIGl4b)Vi@ktcskKxE3{;v7!i~23mee6+bdCXvo&x&-1{a>^ zWaQATn1QRs}iUA#81n~*vA`GbmK6k@U@LY)l#~7@)f-=VT^3iirh?u z=Wl7mF@r_Be+_S==YShh^m0dlm5(SU#uF*)V~Mz-UI3=Io^UMU2CyOImXYz?&FiGd z6QP~*6EI%tWpa1o2H{3vEhNYz7A4(s;1Eg`rruZTi*Vx0CykB76zmi+nXq?L&-H_}fx>mh^@goO<2&JGlX*Abp%J9`Qv|@q{20=I~h2m`dj0 z1~Qe!&(R0dKw|k0knksXUOQ$d*fA{3SSVsSCK#3Y$yzlK8xDI(xxklF<)&&(UA=w! zv{) +// +// Who When What +// --- ---------- ----------------------------------------------------------- +// JPM 08/20/2019 Created this file +// + +// STILL TO DO: +// + +#include "hwregsbrowser.h" +#include "blitter.h" + + +// +struct BlitterInfoTable +{ + unsigned int Address; + unsigned int NbBits; + const char *Name; + const char *Type; +} +S_BlitterInfoTable; + +// +BlitterInfoTable TabBlitterInfoTable[] = { + { 0xF02200, sizeof(long), "A1 base address", "32-bit register containing a pointer to the base of the window pointer to by A1.\nThis address must be phrase aligned." }, + { 0xF02204, sizeof(long), "Flags Register", "A set of flags controlling various aspects of the A1 window and how addresses are updated." }, + { 0xF02208, sizeof(long), "A1 Clipping Window Size", "This register contains the size in pixels, and may be used for clipping writes, so that if the pointer leaves the window bounds no write is performed." }, + { 0xF0220C, sizeof(long), "A1 Window Pixel Pointer", "This register contains the X (low word) and Y (high word) pointers onto the window, and are the location where the next pixel will be written.\nThey are sixteen - bit signed values." }, + { 0xF02210, sizeof(long), "A1 Step Value", "The step register contains two signed sixteen bit values, which are the X step (low word) and Y step (high word)." }, + { 0xF02214, sizeof(long), "A1 Step Fraction Value", "The step fraction register may be added to the fractional parts of the A1 pointer in the same manner as the step value." }, + { 0xF02218, sizeof(long), "A1 Window Pixel Pointer Fraction", "" }, + { 0xF0221C, sizeof(long), "A1 Pixel Pointer Increment", "" }, + { 0xF02220, sizeof(long), "A1 Pixel Pointer Increment Fraction", "This is the fractional parts of the increment described above." }, + { 0xF02224, sizeof(long), "A2 Base Register", "32-bit register containing a pointer to the base of the window pointer to by A2.\nThis address must be phrase aligned." }, + { 0xF02228, sizeof(long), "A2 Flags Register", "A set of flags controlling various aspects of the A2 window and how addresses are updated." }, + { 0xF0222C, sizeof(long), "A2 Window Mask", "" }, + { 0xF02230, sizeof(long), "A2 Window Pointer", "" }, + { 0xF02234, sizeof(long), "A2 Step Value", "" }, + { 0xF02238, sizeof(long), "Status Register", "" }, + { 0xF0223C, sizeof(long), "Counters Register", "" }, + { 0xF02240, sizeof(long long), "Source Data Register", "" }, + { 0xF02248, sizeof(long long), "Destination Data Register", "" }, + { 0xF02250, sizeof(long long), "Destination Z Register", "" }, + { 0xF02258, sizeof(long long), "Source Z Register 1", "The source Z register 1 is also used to hold the four integer parts of computed Z." }, + { 0xF02260, sizeof(long long), "Source Z Register 2", "The source Z register 2 is also used to hold the four fraction parts of computed Z." }, + { 0xF02268, sizeof(long long), "Pattern Data Register", "The pattern data register also serves to hold the computed intensity integer parts and their associated colours." }, + { 0xF02270, sizeof(long), "Intensity Increment", "This thirty-two bit register holds the integer and fractional parts of the intensity increment used for Gouraud shading." }, + { 0xF02274, sizeof(long), "Z Increment", "This thirty-two bit register holds the integer and fractional parts of the Z increment used for computed Z polygon drawing." }, + { 0xF02278, sizeof(long), "Collision control", "" }, + { 0xF0227C, sizeof(long), "Intensity 0", "" }, + { 0xF02280, sizeof(long), "Intensity 1", "" }, + { 0xF02284, sizeof(long), "Intensity 2", "" }, + { 0xF02288, sizeof(long), "Intensity 3", "" }, + { 0xF0228C, sizeof(long), "Z 0", "These registers are analogous to the intensity registers, and are for Z buffer operation." }, + { 0xF02290, sizeof(long), "Z 1", "These registers are analogous to the intensity registers, and are for Z buffer operation." }, + { 0xF02294, sizeof(long), "Z 2", "These registers are analogous to the intensity registers, and are for Z buffer operation." }, + { 0xF02298, sizeof(long), "Z 3", "These registers are analogous to the intensity registers, and are for Z buffer operation." }, + }; + + +// +HWRegsBlitterBrowserWindow::HWRegsBlitterBrowserWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog), +layout(new QVBoxLayout), +TableView(new QTableView), +model(new QStandardItemModel) +{ + unsigned int i; + + // Set the font + QFont fixedFont("Lucida Console", 8, QFont::Normal); + fixedFont.setStyleHint(QFont::TypeWriter); + + // Set the new layout with proper identation and readibility + model->setColumnCount(4); + model->setHeaderData(0, Qt::Horizontal, QObject::tr("Name")); + model->setHeaderData(1, Qt::Horizontal, QObject::tr("Address")); + model->setHeaderData(2, Qt::Horizontal, QObject::tr("# bits")); + model->setHeaderData(3, Qt::Horizontal, QObject::tr("Value")); + //model->setHeaderData(4, Qt::Horizontal, QObject::tr("Reference")); + // Information table + TableView->setModel(model); + TableView->setEditTriggers(QAbstractItemView::NoEditTriggers); + TableView->setShowGrid(0); + TableView->setFont(fixedFont); + TableView->verticalHeader()->setDefaultSectionSize(TableView->verticalHeader()->minimumSectionSize()); + TableView->verticalHeader()->setDefaultAlignment(Qt::AlignRight); + + // Set basic infos in the layout + for (i = 0; i < (sizeof(TabBlitterInfoTable) / sizeof(struct BlitterInfoTable)); i++) + { + model->insertRow(i); + model->setItem(i, 0, new QStandardItem(QString("%1").arg(TabBlitterInfoTable[i].Name))); + model->setItem(i, 1, new QStandardItem(QString("0x%1").arg(TabBlitterInfoTable[i].Address, 4, 16, QChar('0')))); + model->setItem(i, 2, new QStandardItem(QString("%1").arg(TabBlitterInfoTable[i].NbBits * 8))); + //model->setItem(i, 4, new QStandardItem(QString("%1").arg(TabBlitterInfoTable[i].Type))); + } + + // Set the layout + layout->addWidget(TableView); + setLayout(layout); +} + + +// +HWRegsBlitterBrowserWindow::~HWRegsBlitterBrowserWindow(void) +{ + Reset(); +} + + +// +void HWRegsBlitterBrowserWindow::Reset(void) +{ +} + + +// +void HWRegsBlitterBrowserWindow::RefreshContents(void) +{ + char string[1024]; + unsigned int i; + + if (isVisible()) + { + for (i = 0; i < (sizeof(TabBlitterInfoTable) / sizeof(struct BlitterInfoTable)); i++) + { + // Emulator handles the blitter in a separate array + sprintf(string, "0x%08x", BlitterReadLong(TabBlitterInfoTable[i].Address)); + model->setItem(i, 3, new QStandardItem(QString("%1").arg(string))); + } + } +} diff --git a/src/gui/debug/hwregsblitterbrowser.h b/src/gui/debug/hwregsblitterbrowser.h new file mode 100644 index 0000000..998374a --- /dev/null +++ b/src/gui/debug/hwregsblitterbrowser.h @@ -0,0 +1,37 @@ +// +// hwregsblitterbrowser.h: Hardware registers blitter browser +// +// by Jean-Paul Mari +// + +#ifndef __HWREGSBLITTERBROWSER_H__ +#define __HWREGSBLITTERBROWSER_H__ + +#include +#include + + +// +class HWRegsBlitterBrowserWindow : public QWidget +{ + Q_OBJECT + +public: + HWRegsBlitterBrowserWindow(QWidget *parent = 0); + ~HWRegsBlitterBrowserWindow(void); + void Reset(void); + +public slots: + void RefreshContents(void); + +protected: + //void keyPressEvent(QKeyEvent *); + +private: + QVBoxLayout *layout; + QTableView *TableView; + QStandardItemModel *model; +}; + + +#endif diff --git a/src/gui/debug/hwregsbrowser.cpp b/src/gui/debug/hwregsbrowser.cpp new file mode 100644 index 0000000..97e03cf --- /dev/null +++ b/src/gui/debug/hwregsbrowser.cpp @@ -0,0 +1,70 @@ +// +// hwregsbrowser.h: Hardware registers browser +// +// by Jean-Paul Mari +// +// JPM = Jean-Paul Mari +// +// Who When What +// --- ---------- ----------------------------------------------------------- +// JPM 08/20/2019 Created this file +// + +// STILL TO DO: +// + +#include "hwregsbrowser.h" + + +// +HWRegsBrowserWindow::HWRegsBrowserWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog), +layout(new QVBoxLayout), +//statusbar(new QStatusBar), +hwregstabWidget(new QTabWidget), +hwregsblitterWin(new HWRegsBlitterBrowserWindow) +{ + setWindowTitle(tr("Hardware Registers Browser")); + + // Set the font + QFont fixedFont("Lucida Console", 8, QFont::Normal); + fixedFont.setStyleHint(QFont::TypeWriter); + + // + hwregstabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + hwregstabWidget->addTab(hwregsblitterWin, tr("Blitter")); + layout->addWidget(hwregstabWidget); + + // Status bar + //layout->addWidget(statusbar); + setLayout(layout); +} + + +// +HWRegsBrowserWindow::~HWRegsBrowserWindow(void) +{ + Reset(); +} + + +// +void HWRegsBrowserWindow::Reset(void) +{ +} + + +// +void HWRegsBrowserWindow::RefreshContents(void) +{ + hwregsblitterWin->RefreshContents(); +} + + +// +void HWRegsBrowserWindow::keyPressEvent(QKeyEvent * e) +{ + if (e->key() == Qt::Key_Escape) + { + hide(); + } +} diff --git a/src/gui/debug/hwregsbrowser.h b/src/gui/debug/hwregsbrowser.h new file mode 100644 index 0000000..42d3400 --- /dev/null +++ b/src/gui/debug/hwregsbrowser.h @@ -0,0 +1,39 @@ +// +// hwregsbrowser.h: Hardware registers browser +// +// by Jean-Paul Mari +// + +#ifndef __HWREGSBROWSER_H__ +#define __HWREGSBROWSER_H__ + +#include +#include +#include "hwregsblitterbrowser.h" + + +// +class HWRegsBrowserWindow : public QWidget +{ + Q_OBJECT + +public: + HWRegsBrowserWindow(QWidget *parent = 0); + ~HWRegsBrowserWindow(void); + void Reset(void); + +public slots: + void RefreshContents(void); + +protected: + void keyPressEvent(QKeyEvent *); + +private: + //QStatusBar *statusbar; + QVBoxLayout *layout; + QTabWidget *hwregstabWidget; + HWRegsBlitterBrowserWindow *hwregsblitterWin; +}; + + +#endif diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index a25fad1..98f1df8 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -23,7 +23,7 @@ // JPM Oct./2018 Added search paths in the settings, breakpoints feature, cartridge view menu // JPM 11/18/2018 Fix crash with non-debugger mode // JPM April/2019 Added ELF sections check, added a save memory dump -// JPM Aug./2019 Update texts descriptions, set cartridge view menu for debugger mode only +// JPM Aug./2019 Update texts descriptions, set cartridge view menu for debugger mode only, added a HW registers browser // // FIXED: @@ -71,6 +71,7 @@ #include "debug/stackbrowser.h" #include "debug/opbrowser.h" #include "debug/riscdasmbrowser.h" +#include "debug/hwregsbrowser.h" #include "dac.h" #include "jaguar.h" @@ -194,6 +195,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), opBrowseWin = new OPBrowserWindow(this); m68kDasmBrowseWin = new M68KDasmBrowserWindow(this); riscDasmBrowseWin = new RISCDasmBrowserWindow(this); + hwRegsBrowseWin = new HWRegsBrowserWindow(this); // Windows debugger mode features if (vjs.softTypeDebugger) @@ -515,6 +517,11 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), m68kDasmBrowseAct->setStatusTip(tr("Shows the 68K disassembly browser window")); connect(m68kDasmBrowseAct, SIGNAL(triggered()), this, SLOT(ShowM68KDasmBrowserWin())); + // HW registers browser window + hwRegsBrowseAct = new QAction(QIcon(":/res/tool-hw-regs.png"), tr("HW Registers Browser"), this); + hwRegsBrowseAct->setStatusTip(tr("Shows the HW registers browser window")); + connect(hwRegsBrowseAct, SIGNAL(triggered()), this, SLOT(ShowHWRegsBrowserWin())); + // Risc (DSP / GPU) disassembly browser window riscDasmBrowseAct = new QAction(QIcon(":/res/tool-risc-dis.png"), tr("RISC Listing Browser"), this); riscDasmBrowseAct->setStatusTip(tr("Shows the RISC disassembly browser window")); @@ -592,6 +599,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugWindowsBrowsesMenu->addAction(opBrowseAct); debugWindowsBrowsesMenu->addAction(m68kDasmBrowseAct); debugWindowsBrowsesMenu->addAction(riscDasmBrowseAct); + debugWindowsBrowsesMenu->addAction(hwRegsBrowseAct); debugMenu->addSeparator(); debugMenu->addAction(pauseAct); debugMenu->addAction(frameAdvanceAct); @@ -620,6 +628,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugMenu->addAction(opBrowseAct); debugMenu->addAction(m68kDasmBrowseAct); debugMenu->addAction(riscDasmBrowseAct); + debugMenu->addAction(hwRegsBrowseAct); } } @@ -676,6 +685,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugbar->addAction(opBrowseAct); debugbar->addAction(m68kDasmBrowseAct); debugbar->addAction(riscDasmBrowseAct); + debugbar->addAction(hwRegsBrowseAct); } // Add actions to the main window, as hiding widgets with them @@ -1764,6 +1774,7 @@ void MainWin::ShowCPUBrowserWin(void) } +// Show the OP browser window void MainWin::ShowOPBrowserWin(void) { opBrowseWin->show(); @@ -1771,6 +1782,15 @@ void MainWin::ShowOPBrowserWin(void) } +// Show the HW registers browser window +void MainWin::ShowHWRegsBrowserWin(void) +{ + hwRegsBrowseWin->show(); + hwRegsBrowseWin->RefreshContents(); +} + + +// Show the M68K browser window void MainWin::ShowM68KDasmBrowserWin(void) { m68kDasmBrowseWin->show(); @@ -2027,6 +2047,13 @@ void MainWin::ReadUISettings(void) size = settings.value("opBrowseWinSize", QSize(400, 400)).toSize(); opBrowseWin->resize(size); + // HW registers UI information + pos = settings.value("hwRegsBrowseWinPos", QPoint(200, 200)).toPoint(); + hwRegsBrowseWin->move(pos); + settings.value("hwRegsBrowseWinIsVisible", false).toBool() ? ShowHWRegsBrowserWin() : void(); + size = settings.value("hwRegsBrowseWinSize", QSize(400, 400)).toSize(); + hwRegsBrowseWin->resize(size); + // RISC disassembly UI information pos = settings.value("riscDasmBrowseWinPos", QPoint(200, 200)).toPoint(); riscDasmBrowseWin->move(pos); @@ -2290,6 +2317,9 @@ void MainWin::WriteUISettings(void) settings.setValue("opBrowseWinPos", opBrowseWin->pos()); settings.setValue("opBrowseWinIsVisible", opBrowseWin->isVisible()); settings.setValue("opBrowseWinSize", opBrowseWin->size()); + settings.setValue("hwRegsBrowseWinPos", hwRegsBrowseWin->pos()); + settings.setValue("hwRegsBrowseWinIsVisible", hwRegsBrowseWin->isVisible()); + settings.setValue("hwRegsBrowseWinSize", hwRegsBrowseWin->size()); settings.setValue("riscDasmBrowseWinPos", riscDasmBrowseWin->pos()); settings.setValue("riscDasmBrowseWinIsVisible", riscDasmBrowseWin->isVisible()); settings.setValue("m68kDasmBrowseWinPos", m68kDasmBrowseWin->pos()); @@ -2357,6 +2387,7 @@ void MainWin::AlpineRefreshWindows(void) opBrowseWin->RefreshContents(); riscDasmBrowseWin->RefreshContents(); m68kDasmBrowseWin->RefreshContents(); + hwRegsBrowseWin->RefreshContents(); } diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index e76f4ff..466c2a4 100644 --- a/src/gui/mainwin.h +++ b/src/gui/mainwin.h @@ -33,6 +33,7 @@ class CPUBrowserWindow; class OPBrowserWindow; class M68KDasmBrowserWindow; class RISCDasmBrowserWindow; +class HWRegsBrowserWindow; // Debugger class m68KDasmWindow; @@ -125,6 +126,7 @@ class MainWin: public QMainWindow void ShowCPUBrowserWin(void); void ShowOPBrowserWin(void); void ShowM68KDasmBrowserWin(void); + void ShowHWRegsBrowserWin(void); void ShowRISCDasmBrowserWin(void); private: @@ -151,6 +153,7 @@ class MainWin: public QMainWindow OPBrowserWindow *opBrowseWin; M68KDasmBrowserWindow *m68kDasmBrowseWin; RISCDasmBrowserWindow *riscDasmBrowseWin; + HWRegsBrowserWindow *hwRegsBrowseWin; //VideoOutputWindow *VideoOutputWin; AllWatchBrowserWindow *allWatchBrowseWin; LocalBrowserWindow *LocalBrowseWin; @@ -235,6 +238,7 @@ class MainWin: public QMainWindow QAction *cpuBrowseAct; QAction *opBrowseAct; QAction *m68kDasmBrowseAct; + QAction *hwRegsBrowseAct; QAction *riscDasmBrowseAct; // Debugger diff --git a/src/gui/virtualjaguar.qrc b/src/gui/virtualjaguar.qrc index ddedc8f..44ba3f7 100644 --- a/src/gui/virtualjaguar.qrc +++ b/src/gui/virtualjaguar.qrc @@ -24,6 +24,7 @@ ../../res/tool-op.png ../../res/tool-68k-dis.png ../../res/tool-risc-dis.png + ../../res/tool-hw-regs.png ../../res/generic.png ../../res/cart-blank.png ../../res/label-blank.png diff --git a/virtualjaguar.pro b/virtualjaguar.pro index 19bd96a..515223c 100644 --- a/virtualjaguar.pro +++ b/virtualjaguar.pro @@ -107,6 +107,7 @@ HEADERS = \ src/gui/debug/opbrowser.h \ src/gui/debug/riscdasmbrowser.h \ src/gui/debug/stackbrowser.h \ + src/gui/debug/hwregsbrowser.h \ src/debugger/debuggertab.h \ src/debugger/DasmWin.h \ src/debugger/m68kDasmWin.h \ @@ -162,6 +163,7 @@ SOURCES = \ src/gui/debug/opbrowser.cpp \ src/gui/debug/riscdasmbrowser.cpp \ src/gui/debug/stackbrowser.cpp \ + src/gui/debug/hwregsbrowser.cpp \ src/debugger/debuggertab.cpp \ src/debugger/DasmWin.cpp \ src/debugger/m68kDasmWin.cpp \ -- 2.20.1