<MinimalRebuild>false</MinimalRebuild>\r
</ClCompile>\r
<Link>\r
- <AdditionalDependencies>qtmain.lib;Qt5OpenGL.lib;shell32.lib;jaguarcore.lib;zlib-1.2.11_vs2017_x64.lib;m68000.lib;gdi32.lib;user32.lib;SDL-1.2.15_vs2017_x64.lib;libelf-0.8.13_vs2017_x64.lib;legacy_stdio_definitions.lib;OpenGL32.lib;libdwarf_x64.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;opengl32.lib;glu32.lib;Ws2_32.lib;imm32.lib;winmm.lib;Advapi32.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <AdditionalDependencies>Qt5PlatformCompositorSupport.lib;qtmain.lib;Qt5OpenGL.lib;shell32.lib;jaguarcore.lib;zlib-1.2.11_vs2017_x64.lib;m68000.lib;gdi32.lib;user32.lib;SDL-1.2.15_vs2017_x64.lib;libelf-0.8.13_vs2017_x64.lib;legacy_stdio_definitions.lib;OpenGL32.lib;libdwarf_x64.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;opengl32.lib;glu32.lib;Ws2_32.lib;imm32.lib;winmm.lib;Advapi32.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins\platforms;obj;..\src\m68000\obj;C:\SDK\zlib\zlib-1.2.11\lib;C:\SDK\SDL\SDL-1.2.15\lib\x64\static;C:\SDK\Elf\libelf-0.8.13\lib;m68000\x64\Release;jaguarcore\x64\Release;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64;C:\SDK\DWARF\libdwarf-20210305-VS2017\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>\r
<DataExecutionPrevention>true</DataExecutionPrevention>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="GeneratedFiles\Debug\moc_VideoWin.cpp">\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
</ClCompile>\r
<ClCompile Include="..\src\debugger\DasmWin.cpp" />\r
<ClCompile Include="..\src\debugger\DBGManager.cpp" />\r
<ClCompile Include="GeneratedFiles\Release\moc_stackbrowser.cpp">\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="GeneratedFiles\Release\moc_VideoWin.cpp">\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<CustomBuild Include="..\src\debugger\BreakpointsWin.h">\r
</ClCompile>\r
<ClCompile Include="GeneratedFiles\Debug\moc_VideoWin.cpp">\r
<Filter>Generated Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="GeneratedFiles\Release\moc_VideoWin.cpp">\r
+ <Filter>Generated Files</Filter>\r
</ClCompile>\r
<ClCompile Include="GeneratedFiles\Debug\moc_stackbrowser.cpp">\r
<Filter>Generated Files</Filter>\r
24) Improve the DWARF source line number reporting
25) Added a #line in the call stack window
26) Add a search feature in the all watches window
+27) Added video output display in a specific window
Release 4a (15th August 2019)
-----------------------------
//
-// VideoWin.cpp: Windows video display
+// VideoWin.cpp: Video output window
//
// by Jean-Paul Mari
//
// WHO WHEN WHAT
// --- ---------- ------------------------------------------------------------
// JPM 06/23/2016 Created this file
+// JPM April/2021 Added video output display in the window
#include "VideoWin.h"
+#include "tom.h"
+#include "settings.h"
//#include "mainwin.h"
//
-VideoOutputWindow::VideoOutputWindow(QWidget * parent/*= 0*/) : QWidget(parent),
-layout(new QHBoxLayout), text(new QLabel)
+VideoOutputWindow::VideoOutputWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog),
+layout(new QVBoxLayout),
+hbox1(new QHBoxLayout)
+//gl(new GLWidget)
+//layout(0),
+//hbox1(0)
+//statusbar(new QStatusBar),
+//text(new QTextBrowser)
{
- setWindowTitle(tr("Video windows"));
+ setWindowTitle(tr("Output Video"));
//setCentralWidget(videoWidget);
// QFont fixedFont("Lucida Console", 8, QFont::Normal);
// fixedFont.setStyleHint(QFont::TypeWriter);
// text->setFont(fixedFont);
// setLayout(layout);
+#if 0
+ QHBoxLayout * hbox1 = new QHBoxLayout;
+ hbox1->addWidget(gl);
+ layout->addLayout(hbox1);
-// layout->addWidget(text);
+ gl->setFixedSize(VIRTUAL_SCREEN_WIDTH, (vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL));
+#endif
+ //layout->addWidget(statusbar);
+ //statusbar->setStyleSheet("background-color: lightgreen; font: bold");
+ //layout->addWidget(text);
+ //layout->addWidget(gl);
- QWidget* myWidget = new QWidget;
- myWidget->setStyleSheet("QWidget{ background: red; }");
+ //QWidget* myWidget = new QWidget;
+ //myWidget->setStyleSheet("QWidget{ background: red; }");
- GLWidget *glWidget = new GLWidget;
+ //GLWidget *glWidget = new GLWidget;
//QHBoxLayout *mainLayout = new QHBoxLayout;
- layout->addWidget(myWidget);
- layout->setContentsMargins(100, 100, 100, 100);
- setLayout(layout);
+ //layout->addWidget(myWidget);
+ //layout->setContentsMargins(100, 100, 100, 100);
+ //setLayout(layout);
+
+ //hbox1->addWidget(gl);
+ //layout->addLayout(hbox1);
+ //setLayout(layout);
+}
+
+
+//
+void VideoOutputWindow::SetupVideo(GLWidget *Lt)
+{
+ if (isVisible())
+ {
+ //layout = new QVBoxLayout;
+ //hbox1 = new QHBoxLayout;
+ // QHBoxLayout * hbox1 = new QHBoxLayout;
+ //Lt->setFixedSize(VIRTUAL_SCREEN_WIDTH, (vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL));
+ //QHBoxLayout * hbox1 = new QHBoxLayout;
+ hbox1->addWidget(Lt);
+ //hbox1->replaceWidget(gl, Lt);
+ layout->addLayout(hbox1);
+ setLayout(layout);
+ //layout->addLayout(hbox1);
+ //setLayout(layout);
+ //layout->addLayout(hbox1);
+ //setLayout(layout);
+ //show();
+ //resize(100, 100);
+ //adjustSize();
+ glViewport(0, 0, (VIRTUAL_SCREEN_WIDTH * 2), (vjs.hardwareTypeNTSC ? (VIRTUAL_SCREEN_HEIGHT_NTSC * 2) : (VIRTUAL_SCREEN_HEIGHT_PAL * 2)));
+ //adjustSize();
+ //resize(minimumWidth(), minimumHeight());
+ }
}
// Refresh / Display the window contents
void VideoOutputWindow::RefreshContents(GLWidget *Lt)
{
- layout->addWidget(Lt);
- setLayout(layout);
-// QString memDump;
+#if 0
+ if (isVisible())
+ {
+ for (uint32_t i = 0; i < (uint32_t)(Lt->textureWidth * Lt->rasterHeight); i++)
+ {
+ uint32_t pixel = Lt->buffer[i];
+ uint8_t r = (pixel >> 24) & 0xFF, g = (pixel >> 16) & 0xFF, b = (pixel >> 8) & 0xFF;
+ pixel = ((r + g + b) / 3) & 0x00FF;
+ gl->buffer[i] = 0x000000FF | (pixel << 16) | (pixel << 8);
+ }
+
+ gl->updateGL();
+ //adjustSize();
+ }
+#endif
+#if 0
+ if (isVisible())
+ {
+
+ QHBoxLayout * hbox1 = new QHBoxLayout;
+ hbox1->addWidget(Lt);
+ layout->addLayout(hbox1);
+ setLayout(layout);
+
+ //gl->setFixedSize(VIRTUAL_SCREEN_WIDTH, (vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL));
-// memDump += QString("Test");
+#if 0
+ for (uint32_t y = 0; y < Lt->rasterHeight; y++)
+ {
+ if (vjs.hardwareTypeNTSC)
+ {
+ memcpy(gl->buffer + (y * gl->textureWidth), Lt + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t));
+ }
+ else
+ {
+ memcpy(gl->buffer + (y * gl->textureWidth), Lt + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t));
+ }
+ }
+#endif
+#if 0
+ for (uint32_t i = 0; i < (uint32_t)(Lt->textureWidth * Lt->rasterHeight); i++)
+ {
+ uint32_t pixel = Lt->buffer[i];
+ uint8_t r = (pixel >> 24) & 0xFF, g = (pixel >> 16) & 0xFF, b = (pixel >> 8) & 0xFF;
+ pixel = ((r + g + b) / 3) & 0x00FF;
+ gl->buffer[i] = 0x000000FF | (pixel << 16) | (pixel << 8);
+ }
+#else
+ //gl->updateGL();
-// text->clear();
-// text->setText(memDump);
+ //layout->addWidget(Lt);
+ //setLayout(layout);
+ // QString memDump;
+
+ // memDump += QString("Test");
+
+ // text->clear();
+ // text->setText(memDump);
+
+ //adjustSize();
+#endif
+ }
+#endif
+}
+
+
+//
+void VideoOutputWindow::keyPressEvent(QKeyEvent * e)
+{
+ if (e->key() == Qt::Key_Escape)
+ {
+ hide();
+ }
}
//
VideoOutputWindow::~VideoOutputWindow()
{
+ //delete gl;
+ delete hbox1;
+ delete layout;
}
//
-// VideoWin.h: Credits where credits are due ;-)
+// VideoWin.h: Video output
+//
+// by Jean-Paul Mari
//
-// based on the work from James Hammons
-// (C) 2010 Underground Software
//
#ifndef __VIDEOWIN_H__
public slots:
// void DefineAllKeys(void);
void RefreshContents(GLWidget *Lt);
+ void SetupVideo(GLWidget *Lt);
protected:
- //void keyPressEvent(QKeyEvent *);
+ void keyPressEvent(QKeyEvent *);
private:
- QHBoxLayout *layout;
- QLabel * text;
+ QVBoxLayout *layout;
+ QHBoxLayout *hbox1;
+ //QTextBrowser * text;
+ //QStatusBar *statusbar;
+ GLWidget *gl;
};
#endif // __VIDEOWIN_H__
// JPM Aug./2019 Update texts descriptions, set cartridge view menu for debugger mode only, added a HW registers browser and source level tracing\r
// JPM Marc./2020 Added the step over for source level tracing\r
// RG Jan./2021 Linux build fixes\r
-// JPM Apr./2021 Handle number of M68K cycles used in tracing mode\r
+// JPM Apr./2021 Handle number of M68K cycles used in tracing mode, added video output display in a window\r
//\r
\r
// FIXED:\r
#include "m68000/m68kinterface.h"\r
\r
#include "debugger/DBGManager.h"\r
-//#include "debugger/VideoWin.h"\r
+#include "debugger/VideoWin.h"\r
//#include "debugger/DasmWin.h"\r
#include "debugger/SourcesWin.h"\r
#include "debugger/m68kDasmWin.h"\r
// Windows debugger mode features\r
if (vjs.softTypeDebugger)\r
{\r
- //VideoOutputWin = new VideoOutputWindow(this);\r
+ VideoOutputWin = new VideoOutputWindow(this);\r
+ //VideoOutputWin->show();\r
//VideoOutputWin->setCentralWidget()\r
//DasmWin = new DasmWindow();\r
//DasmWin = new DasmWindow(this);\r
saveDumpAsAct->setDisabled(false);\r
connect(saveDumpAsAct, SIGNAL(triggered()), this, SLOT(ShowSaveDumpAsWin()));\r
\r
- //VideoOutputAct = new QAction(tr("Output Video"), this);\r
- //VideoOutputAct->setStatusTip(tr("Shows the output video window"));\r
- //connect(VideoOutputAct, SIGNAL(triggered()), this, SLOT(ShowVideoOutputWin()));\r
+ VideoOutputAct = new QAction(tr("Output Video"), this);\r
+ VideoOutputAct->setStatusTip(tr("Shows the output video window"));\r
+ connect(VideoOutputAct, SIGNAL(triggered()), this, SLOT(ShowVideoOutputWin()));\r
\r
//DasmAct = new QAction(tr("Disassembly"), this);\r
//DasmAct->setStatusTip(tr("Shows the disassembly window"));\r
debugWindowExceptionMenu = debugWindowsMenu->addMenu(tr("&Exception"));\r
debugWindowExceptionMenu->addAction(exceptionVectorTableBrowseAct);\r
debugWindowsMenu->addSeparator();\r
-#if 0\r
debugWindowOutputMenu = debugWindowsMenu->addMenu(tr("&Output"));\r
debugWindowOutputMenu->addAction(VideoOutputAct);\r
debugWindowsMenu->addSeparator();\r
-#endif\r
debugWindowsWatchMenu = debugWindowsMenu->addMenu(tr("&Watch"));\r
debugWindowsWatchMenu->addAction(allWatchBrowseAct);\r
debugWindowsMenu->addAction(LocalBrowseAct);\r
\r
//if (!vjs.softTypeDebugger)\r
videoWidget->updateGL();\r
+ //vjs.softTypeDebugger ? VideoOutputWin->RefreshContents(videoWidget) : NULL;\r
\r
// FPS handling\r
// Approach: We use a ring buffer to store times (in ms) over a given\r
}\r
\r
videoWidget->updateGL();\r
+ //vjs.softTypeDebugger ? VideoOutputWin->RefreshContents(videoWidget) : NULL;\r
\r
cpuBrowseWin->HoldBPM();\r
cpuBrowseWin->HandleBPMContinue();\r
JaguarExecuteNew();\r
//if (!vjs.softTypeDebugger)\r
videoWidget->updateGL();\r
+ //vjs.softTypeDebugger ? VideoOutputWin->RefreshContents(videoWidget) : NULL;\r
ToggleRunState();\r
// Need to execute 1 frames' worth of DSP thread as well :-/\r
\r
\r
\r
// \r
-#if 0\r
void MainWin::ShowVideoOutputWin(void)\r
{\r
//VideoOutputWindowCentrale = mainWindowCentrale->addSubWindow(videoWidget);\r
//VideoOutputWindowCentrale->setWindowTitle(QString(tr("Video output")));\r
//VideoOutputWindowCentrale->show();\r
//memBrowseWin->show();\r
- //VideoOutputWin->show();\r
+ VideoOutputWin->show();\r
+ VideoOutputWin->SetupVideo(videoWidget);\r
+ //VideoOutputWin->adjustSize();\r
//VideoOutputWin->RefreshContents(videoWidget);\r
}\r
-#endif\r
\r
\r
// Resize video window based on zoom factor\r
size = settings.value("SaveDumpAsWinSize", QSize(400, 400)).toSize();\r
SaveDumpAsWin->resize(size);\r
\r
+ // save output video UI information\r
+ pos = settings.value("VideoOutputWinPos", QPoint(200, 200)).toPoint();\r
+ VideoOutputWin->move(pos);\r
+ settings.value("VideoOutputWinIsVisible", false).toBool() ? ShowVideoOutputWin() : void();\r
+ size = settings.value("VideoOutputWinSize", QSize(400, 400)).toSize();\r
+ VideoOutputWin->resize(size);\r
+\r
// Breakpoints UI information\r
pos = settings.value("BreakpointsWinPos", QPoint(200, 200)).toPoint();\r
BreakpointsWin->move(pos);\r
settings.setValue("SaveDumpAsWinPos", SaveDumpAsWin->pos());\r
settings.setValue("SaveDumpAsWinIsVisible", SaveDumpAsWin->isVisible());\r
settings.setValue("SaveDumpAsWinSize", SaveDumpAsWin->size());\r
+ settings.setValue("VideoOutputWinPos", VideoOutputWin->pos());\r
+ settings.setValue("VideoOutputWinIsVisible", VideoOutputWin->isVisible());\r
+ settings.setValue("VideoOutputWinSize", VideoOutputWin->size());\r
\r
for (i = 0; i < vjs.nbrmemory1browserwindow; i++)\r
{\r
{\r
if (vjs.softTypeDebugger)\r
{\r
+ //VideoOutputWin->RefreshContents(videoWidget);\r
FilesrcListWin->RefreshContents();\r
SourcesWin->RefreshContents();\r
m68kDasmWin->RefreshContents();\r
class AboutWindow;\r
class HelpWindow;\r
class FilePickerWindow;\r
-//class VideoOutputWindow;\r
+class VideoOutputWindow;\r
//class DasmWindow;\r
class EmuStatusWindow;\r
\r
void DisableAllBreakpoints(void);\r
void ShowSaveDumpAsWin(void);\r
void SelectdasmtabWidget(const int);\r
-#if 0\r
void ShowVideoOutputWin(void);\r
- void ShowDasmWin(void);\r
-#endif\r
+ //void ShowDasmWin(void);\r
void ShowCartFilesListWin(void);\r
// Alpine\r
void ShowMemoryBrowserWin(void);\r
M68KDasmBrowserWindow *m68kDasmBrowseWin;\r
RISCDasmBrowserWindow *riscDasmBrowseWin;\r
HWRegsBrowserWindow *hwRegsBrowseWin;\r
- //VideoOutputWindow *VideoOutputWin;\r
+ VideoOutputWindow *VideoOutputWin;\r
AllWatchBrowserWindow *allWatchBrowseWin;\r
LocalBrowserWindow *LocalBrowseWin;\r
CallStackBrowserWindow *CallStackBrowseWin;\r
QAction *traceStepOverAct;\r
QAction *traceStepIntoAct;\r
QAction *restartAct;\r
- //QAction *VideoOutputAct;\r
+ QAction *VideoOutputAct;\r
QAction *heapallocatorBrowseAct;\r
QAction *allWatchBrowseAct;\r
QAction *LocalBrowseAct;\r