//
#include "DSPDasmWin.h"
-//#include "memory.h"
#include "dsp.h"
#include "gpu.h"
#include "jagdasm.h"
DSPDasmWindow::DSPDasmWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog),
-// layout(new QVBoxLayout), text(new QTextBrowser),
layout(new QVBoxLayout), text(new QLabel),
- //refresh(new QPushButton(tr("Refresh"))),
- //go(new QPushButton(tr("Go"))),
- //address(new QLineEdit),
- //gpu(new QRadioButton(tr("GPU"))),
- //dsp(new QRadioButton(tr("DSP"))),
- //memBase(0x4000)
memBase(DSPReadLong(0xF1A110, DEBUG))
{
- //setWindowTitle(tr("RISC Disassembly Browser"));
-
- //address->setInputMask("hhhhhh");
- //QHBoxLayout * hbox1 = new QHBoxLayout;
- //hbox1->addWidget(refresh);
- //hbox1->addWidget(address);
- //hbox1->addWidget(go);
-
- // Need to set the size as well...
-// resize(560, 480);
-
QFont fixedFont("Lucida Console", 8, QFont::Normal);
-// QFont fixedFont("", 8, QFont::Normal);
fixedFont.setStyleHint(QFont::TypeWriter);
text->setFont(fixedFont);
-//// layout->setSizeConstraint(QLayout::SetFixedSize);
setLayout(layout);
layout->addWidget(text);
-// layout->addWidget(refresh);
- //layout->addLayout(hbox1);
-
- //connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));
- //connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));
}
void DSPDasmWindow::RefreshContents(void)
{
- char string[1024];//, buf[64];
+ char string[1024];
QString s;
char buffer[2048];
int pc = memBase, oldpc;
s += QString(buffer);
}
-// text->clear();
if (DSPPCShow)
{
text->setText(s);
}
-#if 0
-void DSPDasmWindow::keyPressEvent(QKeyEvent * e)
-{
- if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return)
- hide();
-#if 1
- else if (e->key() == Qt::Key_PageUp)
- {
- memBase -= 64;
-
- if (memBase < 0)
- memBase = 0;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_PageDown)
- {
- memBase += 64;
-
- if (memBase > (0x1000000 - 480))
- memBase = 0x1000000 - 480;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)
- {
- memBase -= 2;
-
- if (memBase < 0)
- memBase = 0;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)
- {
- memBase += 2;
-
- if (memBase > (0x1000000 - 480))
- memBase = 0x1000000 - 480;
-
- RefreshContents();
- }
-#endif
-}
-#endif
-
-
-#if 0
-void DSPDasmWindow::GoToAddress(void)
-{
- bool ok;
- QString newAddress = address->text();
- memBase = newAddress.toUInt(&ok, 16);
- RefreshContents();
-}
-#endif
-
-
// Set mem base PC address using the 68K pc current address
void DSPDasmWindow::UseDSPPCAddress(void)
{
memBase = DSPReadLong(0xF1A110, DEBUG);
}
-
-// Set mem base PC address
-#if 0
-void DSPDasmWindow::SetAddress(int address)
-{
- memBase = address;
- // RefreshContents();
-}
-#endif
public:
DSPDasmWindow(QWidget * parent = 0);
-
public slots:
-// void DefineAllKeys(void);
void RefreshContents(void);
- //void GoToAddress(void);
void UseDSPPCAddress(void);
- //void SetAddress(int address);
protected:
- //void keyPressEvent(QKeyEvent *);
private:
QVBoxLayout * layout;
-// QTextBrowser * text;
QLabel * text;
- //QPushButton * refresh;
- //QPushButton * go;
- //QLineEdit * address;
- //QRadioButton * gpu;
- //QRadioButton * dsp;
-
int32_t memBase;
};
//
#include "GPUDasmWin.h"
-//#include "memory.h"
#include "dsp.h"
#include "gpu.h"
#include "jagdasm.h"
GPUDasmWindow::GPUDasmWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog),
-// layout(new QVBoxLayout), text(new QTextBrowser),
layout(new QVBoxLayout), text(new QLabel),
- //refresh(new QPushButton(tr("Refresh"))),
- //go(new QPushButton(tr("Go"))),
- //address(new QLineEdit),
- //gpu(new QRadioButton(tr("GPU"))),
- //dsp(new QRadioButton(tr("DSP"))),
- //memBase(0x4000)
memBase(GPUReadLong(0xF02110, DEBUG))
{
- //setWindowTitle(tr("RISC Disassembly Browser"));
-
- //address->setInputMask("hhhhhh");
- //QHBoxLayout * hbox1 = new QHBoxLayout;
- //hbox1->addWidget(refresh);
- //hbox1->addWidget(address);
- //hbox1->addWidget(go);
-
- // Need to set the size as well...
-// resize(560, 480);
-
QFont fixedFont("Lucida Console", 8, QFont::Normal);
-// QFont fixedFont("", 8, QFont::Normal);
fixedFont.setStyleHint(QFont::TypeWriter);
text->setFont(fixedFont);
-//// layout->setSizeConstraint(QLayout::SetFixedSize);
setLayout(layout);
layout->addWidget(text);
-// layout->addWidget(refresh);
- //layout->addLayout(hbox1);
-
- //connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));
- //connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));
}
void GPUDasmWindow::RefreshContents(void)
{
- char string[1024];//, buf[64];
+ char string[1024];
QString s;
char buffer[2048];
int pc = memBase, oldpc;
s += QString(buffer);
}
-// text->clear();
if (GPUPCShow)
{
text->setText(s);
}
-#if 0
-void GPUDasmWindow::keyPressEvent(QKeyEvent * e)
-{
- if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return)
- hide();
-#if 1
- else if (e->key() == Qt::Key_PageUp)
- {
- memBase -= 64;
-
- if (memBase < 0)
- memBase = 0;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_PageDown)
- {
- memBase += 64;
-
- if (memBase > (0x1000000 - 480))
- memBase = 0x1000000 - 480;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)
- {
- memBase -= 2;
-
- if (memBase < 0)
- memBase = 0;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)
- {
- memBase += 2;
-
- if (memBase > (0x1000000 - 480))
- memBase = 0x1000000 - 480;
-
- RefreshContents();
- }
-#endif
-}
-#endif
-
-
-#if 0
-void GPUDasmWindow::GoToAddress(void)
-{
- bool ok;
- QString newAddress = address->text();
- memBase = newAddress.toUInt(&ok, 16);
- RefreshContents();
-}
-#endif
-
-
// Set mem base PC address using the 68K pc current address
void GPUDasmWindow::UseGPUPCAddress(void)
{
memBase = GPUReadLong(0xF02110, DEBUG);
}
-
-// Set mem base PC address
-#if 0
-void GPUDasmWindow::SetAddress(int address)
-{
- memBase = address;
- // RefreshContents();
-}
-#endif
public:
GPUDasmWindow(QWidget * parent = 0);
-
public slots:
-// void DefineAllKeys(void);
void RefreshContents(void);
- //void GoToAddress(void);
void UseGPUPCAddress(void);
- //void SetAddress(int address);
protected:
- //void keyPressEvent(QKeyEvent *);
private:
QVBoxLayout * layout;
-// QTextBrowser * text;
QLabel * text;
- //QPushButton * refresh;
- //QPushButton * go;
- //QLineEdit * address;
- //QRadioButton * gpu;
- //QRadioButton * dsp;
-
int32_t memBase;
};
Q_OBJECT\r
\r
//\r
- struct WatchInfo\r
+ typedef struct WatchInfo\r
{\r
- //size_t TypeEncoding;\r
- //size_t TypeByteSize;\r
size_t addr;\r
size_t TypeTag;\r
char *PtrVariableName;\r
public:\r
AllWatchBrowserWindow(QWidget *parent = 0);\r
~AllWatchBrowserWindow(void);\r
+ void Reset(void);\r
\r
public slots:\r
-// void DefineAllKeys(void);\r
void RefreshContents(void);\r
-// void GoToAddress(void);\r
\r
protected:\r
-// void keyPressEvent(QKeyEvent *);\r
+ void keyPressEvent(QKeyEvent *);\r
\r
private:\r
QVBoxLayout *layout;\r
-// QTextBrowser * text;\r
-// QLabel *text;\r
QTextBrowser *text;\r
-// QPushButton *refresh;\r
-// QLineEdit *address;\r
-// QPushButton *go;\r
WatchInfo *PtrWatchInfo;\r
-// int32_t memBase;\r
size_t NbWatch;\r
};\r
\r
//
-// exceptionvectortable.cpp - All Watch
+// exceptionvectortable.cpp - Exception Vector Table
//
// by Jean-Paul Mari
//
//
// STILL TO DO:
+// Better display presentation
//
#include "debugger/exceptionvectortablebrowser.h"
ExceptionVectorTableBrowserWindow::ExceptionVectorTableBrowserWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog),
layout(new QVBoxLayout), text(new QTextBrowser),
-// layout(new QVBoxLayout), text(new QLabel),
refresh(new QPushButton(tr("Refresh")))
-// address(new QLineEdit),
-// go(new QPushButton(tr("Go"))),
-// memBase(0),
-// NbWatch(0),
-// PtrWatchInfo(NULL)
{
setWindowTitle(tr("Exception Vector Table"));
-// address->setInputMask("hhhhhh");
QHBoxLayout *hbox1 = new QHBoxLayout;
hbox1->addWidget(refresh);
-// hbox1->addWidget(address);
-// hbox1->addWidget(go);
-
- // Need to set the size as well...
-// resize(560, 480);
QFont fixedFont("Lucida Console", 8, QFont::Normal);
-// QFont fixedFont("", 8, QFont::Normal);
fixedFont.setStyleHint(QFont::TypeWriter);
text->setFont(fixedFont);
-//// layout->setSizeConstraint(QLayout::SetFixedSize);
setLayout(layout);
layout->addWidget(text);
layout->addWidget(refresh);
-// layout->addLayout(hbox1);
connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));
-// connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));
}
//
ExceptionVectorTableBrowserWindow::~ExceptionVectorTableBrowserWindow(void)
{
-// NbWatch = 0;
-// free(PtrWatchInfo);
}
}
-#if 0
void ExceptionVectorTableBrowserWindow::keyPressEvent(QKeyEvent * e)
{
if (e->key() == Qt::Key_Escape)
- hide();
- else if (e->key() == Qt::Key_PageUp)
- {
- memBase -= 480;
-
- if (memBase < 0)
- memBase = 0;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_PageDown)
- {
- memBase += 480;
-
- if (memBase > (0x200000 - 480))
- memBase = 0x200000 - 480;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)
- {
- memBase -= 16;
-
- if (memBase < 0)
- memBase = 0;
-
- RefreshContents();
- }
- else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)
{
- memBase += 16;
-
- if (memBase > (0x200000 - 480))
- memBase = 0x200000 - 480;
-
- RefreshContents();
+ hide();
}
}
-#endif
-
-
-#if 0
-void ExceptionVectorTableBrowserWindow::GoToAddress(void)
-{
- bool ok;
- QString newAddress = address->text();
- memBase = newAddress.toUInt(&ok, 16);
- RefreshContents();
-}
-#endif
-
~ExceptionVectorTableBrowserWindow(void);
public slots:
-// void DefineAllKeys(void);
void RefreshContents(void);
-// void GoToAddress(void);
protected:
-// void keyPressEvent(QKeyEvent *);
+ void keyPressEvent(QKeyEvent *);
private:
QVBoxLayout *layout;
-// QTextBrowser * text;
-// QLabel *text;
QTextBrowser *text;
QPushButton *refresh;
-// QLineEdit *address;
-// QPushButton *go;
-// WatchInfo *PtrWatchInfo;
-// int32_t memBase;
-// size_t NbWatch;
};
#endif // __EXCEPTIONVECTORTABLEBROWSER_H__
//\r
-// allwatch.cpp - All Watch\r
+// heapallocatorbrowser.cpp: Memory heap allocation\r
//\r
// by Jean-Paul Mari\r
//\r
\r
HeapAllocatorBrowserWindow::HeapAllocatorBrowserWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog),\r
layout(new QVBoxLayout), text(new QTextBrowser),\r
-// layout(new QVBoxLayout), text(new QLabel),\r
-// refresh(new QPushButton(tr("Refresh"))),\r
-// address(new QLineEdit),\r
-// go(new QPushButton(tr("Go"))),\r
-// memBase(0),\r
-// NbWatch(0),\r
-// PtrWatchInfo(NULL)\r
Adr(0)\r
-//PtrAdr(NULL)\r
{\r
setWindowTitle(tr("Heap Allocation"));\r
\r
-// address->setInputMask("hhhhhh");\r
-// QHBoxLayout * hbox1 = new QHBoxLayout;\r
-// hbox1->addWidget(refresh);\r
-// hbox1->addWidget(address);\r
-// hbox1->addWidget(go);\r
-\r
- // Need to set the size as well...\r
-// resize(560, 480);\r
-\r
QFont fixedFont("Lucida Console", 8, QFont::Normal);\r
-// QFont fixedFont("", 8, QFont::Normal);\r
fixedFont.setStyleHint(QFont::TypeWriter);\r
text->setFont(fixedFont);\r
-//// layout->setSizeConstraint(QLayout::SetFixedSize);\r
setLayout(layout);\r
\r
layout->addWidget(text);\r
-// layout->addWidget(refresh);\r
-// layout->addLayout(hbox1);\r
-\r
-// connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));\r
-// connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));\r
}\r
\r
\r
//\r
HeapAllocatorBrowserWindow::~HeapAllocatorBrowserWindow(void)\r
{\r
-// NbWatch = 0;\r
-// free(PtrAdr);\r
}\r
\r
\r
void HeapAllocatorBrowserWindow::RefreshContents(void)\r
{\r
char string[1024];\r
-// char buf[64];\r
QString HA;\r
size_t Adr68K;\r
size_t Error = 0;\r
else\r
{\r
return RefreshContents();\r
- //sprintf(string, "<font color='#0000ff'><b>Memory allocator has been initialised</b></font>");\r
}\r
}\r
else\r
{\r
hide();\r
}\r
-#if 0\r
- else if (e->key() == Qt::Key_PageUp)\r
- {\r
- memBase -= 480;\r
-\r
- if (memBase < 0)\r
- memBase = 0;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_PageDown)\r
- {\r
- memBase += 480;\r
-\r
- if (memBase > (0x200000 - 480))\r
- memBase = 0x200000 - 480;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)\r
- {\r
- memBase -= 16;\r
-\r
- if (memBase < 0)\r
- memBase = 0;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)\r
- {\r
- memBase += 16;\r
-\r
- if (memBase > (0x200000 - 480))\r
- memBase = 0x200000 - 480;\r
-\r
- RefreshContents();\r
- }\r
-#endif\r
-}\r
-\r
-\r
-#if 0\r
-void HeapAllocatorBrowserWindow::GoToAddress(void)\r
-{\r
- bool ok;\r
- QString newAddress = address->text();\r
- memBase = newAddress.toUInt(&ok, 16);\r
- RefreshContents();\r
}\r
-#endif\r
\r
//
-// memoryheapallocatorbrowser.h: All Watch
+// heapallocatorbrowser.h: Memory heap allocation
//
-// by James Hammons
-// (C) 2012 Underground Software
+// by Jean-Paul Mari
//
#ifndef __HEAPALLOCATORBROWSER_H__
{
Q_OBJECT
- struct HeapAllocation
+ typedef struct HeapAllocation
{
- //UINT32 nextalloc;
uint32_t nextalloc;
- //UINT32 size;
uint32_t size;
- //UINT16 used;
uint16_t used;
}S_HeapAllocation;
~HeapAllocatorBrowserWindow(void);
public slots:
-// void DefineAllKeys(void);
void RefreshContents(void);
void Reset(void);
-// void GoToAddress(void);
protected:
void keyPressEvent(QKeyEvent *);
private:
QVBoxLayout *layout;
-// QTextBrowser * text;
-// QLabel *text;
QTextBrowser *text;
-// QPushButton *refresh;
-// QLineEdit *address;
-// QPushButton *go;
-// WatchInfo *PtrWatchInfo;
-// int32_t memBase;
-// int32_t NbWatch;
size_t Adr;
-// HeapAllocation HeapAllocation;
};
#endif // __HEAPALLOCATORBROWSER_H__
// \r
LocalBrowserWindow::LocalBrowserWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog),\r
layout(new QVBoxLayout), text(new QTextBrowser),\r
-// layout(new QVBoxLayout), text(new QLabel),\r
-// refresh(new QPushButton(tr("Refresh"))),\r
-// address(new QLineEdit),\r
-// go(new QPushButton(tr("Go"))),\r
-// memBase(0),\r
NbLocal(0),\r
FuncName((char *)calloc(1, 1)),\r
LocalInfo(NULL)\r
{\r
setWindowTitle(tr("Local"));\r
\r
-// address->setInputMask("hhhhhh");\r
-// QHBoxLayout * hbox1 = new QHBoxLayout;\r
-// hbox1->addWidget(refresh);\r
-// hbox1->addWidget(address);\r
-// hbox1->addWidget(go);\r
-\r
- // Need to set the size as well...\r
-// resize(560, 480);\r
-\r
QFont fixedFont("Lucida Console", 8, QFont::Normal);\r
-// QFont fixedFont("", 8, QFont::Normal);\r
fixedFont.setStyleHint(QFont::TypeWriter);\r
text->setFont(fixedFont);\r
-//// layout->setSizeConstraint(QLayout::SetFixedSize);\r
setLayout(layout);\r
\r
layout->addWidget(text);\r
-// layout->addWidget(refresh);\r
-// layout->addLayout(hbox1);\r
-\r
-// connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));\r
-// connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));\r
}\r
\r
\r
{\r
free(LocalInfo);\r
free(FuncName);\r
-// NbLocal = 0;\r
}\r
\r
\r
void LocalBrowserWindow::RefreshContents(void)\r
{\r
char string[1024];\r
-// char buf[64];\r
QString Local;\r
char Value[100];\r
char *PtrValue;\r
-// size_t NbWatch, Adr;\r
-// WatchInfo PtrLocalInfo;\r
\r
const char *CPURegName[] = { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7" };\r
\r
{\r
if (UpdateInfos())\r
{\r
-//#ifdef _MSC_VER\r
- //#pragma message("Warning: !!! Need to check the memory desalocation for LocalInfo !!!")\r
-//#else\r
- //#warning "!!! Need to do the memory desalocation for LocalInfo !!!"\r
-//#endif // _MSC_VER\r
-//#ifdef _MSC_VER\r
- //#pragma message("Warning: !!! Need to check the memory desalocation for FuncName !!!")\r
-//#else\r
- //#warning "!!! Need to do the memory desalocation for FuncName !!!"\r
-//#endif // _MSC_VER\r
-\r
for (size_t i = 0; i < NbLocal; i++)\r
{\r
if (LocalInfo[i].PtrVariableName)\r
{\r
hide();\r
}\r
-#if 0\r
- else if (e->key() == Qt::Key_PageUp)\r
- {\r
- memBase -= 480;\r
-\r
- if (memBase < 0)\r
- memBase = 0;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_PageDown)\r
- {\r
- memBase += 480;\r
-\r
- if (memBase > (0x200000 - 480))\r
- memBase = 0x200000 - 480;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)\r
- {\r
- memBase -= 16;\r
-\r
- if (memBase < 0)\r
- memBase = 0;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)\r
- {\r
- memBase += 16;\r
-\r
- if (memBase > (0x200000 - 480))\r
- memBase = 0x200000 - 480;\r
-\r
- RefreshContents();\r
- }\r
-#endif\r
-}\r
-\r
-\r
-#if 0\r
-void LocalBrowserWindow::GoToAddress(void)\r
-{\r
- bool ok;\r
- QString newAddress = address->text();\r
- memBase = newAddress.toUInt(&ok, 16);\r
- RefreshContents();\r
}\r
-#endif\r
-\r
//\r
-// localbrowser.h: All Watch\r
+// localbrowser.h: Local variables\r
//\r
// by Jean-Paul Mari\r
//\r
Q_OBJECT\r
\r
//\r
- struct WatchInfo\r
+ typedef struct WatchInfo\r
{\r
- //size_t TypeEncoding;\r
- //size_t TypeByteSize;\r
size_t Op;\r
size_t Adr;\r
int Offset;\r
~LocalBrowserWindow(void);\r
\r
public slots:\r
-// void DefineAllKeys(void);\r
void RefreshContents(void);\r
bool UpdateInfos(void);\r
-// void GoToAddress(void);\r
\r
protected:\r
void keyPressEvent(QKeyEvent *);\r
\r
private:\r
QVBoxLayout *layout;\r
-// QTextBrowser * text;\r
-// QLabel *text;\r
QTextBrowser *text;\r
-// QPushButton *refresh;\r
-// QLineEdit *address;\r
-// QPushButton *go;\r
WatchInfo *LocalInfo;\r
-// int32_t memBase;\r
size_t NbLocal;\r
char *FuncName;\r
};\r
\r
#include <stdlib.h>\r
#include "debugger/m68kDasmWin.h"\r
-//#include "memory.h"\r
#include "m68000/m68kinterface.h"\r
#include "dsp.h"\r
#include "gpu.h"\r
-//#include "jaguar.h"\r
-//#include "ELFManager.h"\r
#include "DBGManager.h"\r
-//extern jaguarRunAddress;\r
#include "settings.h"\r
\r
\r
// \r
m68KDasmWindow::m68KDasmWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog),\r
layout(new QVBoxLayout), text(new QTextBrowser),\r
-// layout(new QTabWidget), text(new QLabel),\r
-#if 0\r
- refresh(new QPushButton(tr("Refresh"))),\r
- address(new QLineEdit),\r
- go(new QPushButton(tr("Go"))),\r
-#endif\r
-// memBase(0x4000)\r
- //sb(new QScrollBar),\r
memBase(0)\r
{\r
-// m68kDasmWindow *m68kDasmWin = new m68kDasmWindow();\r
-// setWindowTitle(tr("Jaguar Disassembly Window"));\r
-// layout->addTab(new m68KDasmWindow(), tr("M68K Disassembly"));\r
- //layout = new QTabWidget;\r
- //layout->QWidget();\r
-\r
-#if 0\r
- address->setInputMask("hhhhhh");\r
- QHBoxLayout * hbox1 = new QHBoxLayout;\r
- hbox1->addWidget(refresh);\r
- hbox1->addWidget(address);\r
- hbox1->addWidget(go);\r
-#endif\r
-\r
- // Need to set the size as well...\r
-// resize(560, 480);\r
-\r
QFont fixedFont("Lucida Console", 8, QFont::Normal);\r
-// QFont fixedFont("", 8, QFont::Normal);\r
fixedFont.setStyleHint(QFont::Monospace); //TypeWriter\r
fixedFont.setLetterSpacing(QFont::PercentageSpacing, 100);\r
text->setFont(fixedFont);\r
-// sb = layout->text->verticalScrollBar();\r
-// text->setStyleSheet("background-color: DeepSkyBlue;");\r
-//// layout->setSizeConstraint(QLayout::SetFixedSize);\r
setLayout(layout);\r
\r
layout->addWidget(text);\r
-// layout->addWidget(refresh);\r
-#if 0\r
- layout->addLayout(hbox1);\r
-#endif\r
-\r
-#if 0\r
- connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));\r
- connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));\r
-#endif\r
}\r
\r
\r
//\r
void m68KDasmWindow::RefreshContents(void)\r
{\r
- //char ; //, buf[64];\r
QString s;\r
char buffer[1024], string[1024], adresse[16];\r
size_t pc = memBase, oldpc;\r
size_t nbr = vjs.nbrdisasmlines;\r
char *PtrFullSource, *CurrentPtrFullSource = (char *)calloc(1, 1);\r
size_t NumLine; // , CurrentNumLine = 0;\r
-// size_t CurrentNumLine = DBGManager_GetNumLineFromAdr(pc, DBG_NO_TAG) - 1;\r
size_t CurrentNumLine;\r
char singleCharString[2] = { 0, 0 };\r
\r
- //text->clear();\r
-\r
for (i = 0; i < nbr; i++)\r
{\r
- //sb->setValue(sb->maximum());\r
- //j = text->verticalScrollBar()->maximum();\r
- //text->verticalScrollBar()->setValue(text->verticalScrollBar()->maximum());\r
- //if (text->verticalScrollBar()->value())\r
- //{\r
- // j = 1;\r
- //}\r
-\r
oldpc = pc;\r
-// WriteLog("%06X: %s\n", oldpc, buffer);\r
adr = constant = equal = false;\r
\r
// Display source filename based on the program address\r
if (strcmp(OldPtrFullSource, PtrFullSource))\r
#endif\r
{\r
-#if 1\r
if (i)\r
{\r
nbr++;\r
s += QString("<br>");\r
}\r
-#endif\r
+\r
CurrentNumLine = DBGManager_GetNumLineFromAdr(pc, DBG_NO_TAG) - 1;\r
nbr++;\r
CurrentPtrFullSource = (char *)realloc(CurrentPtrFullSource, strlen(PtrFullSource) + 1);\r
}\r
\r
buffer[0] = 0; // Clear string\r
- //char singleCharString[2] = { 0, 0 };\r
\r
for (j = 0; j < strlen(string); j++)\r
{\r
}\r
\r
Symbol = NULL;\r
- // s += QString(string);\r
s += QString(buffer);\r
- // text->setStyleSheet("QLabel { background-color : red; color : blue; }");\r
}\r
}\r
}\r
}\r
\r
\r
-#if 0\r
-// \r
-void m68KDasmWindow::keyPressEvent(QKeyEvent * e)\r
-{\r
-// if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return)\r
-// hide();\r
-#if 0\r
- else if (e->key() == Qt::Key_PageUp)\r
- {\r
- memBase -= 64;\r
-\r
- if (memBase < 0)\r
- memBase = 0;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_PageDown)\r
- {\r
- memBase += 64;\r
-\r
- if (memBase > (0xF00000 - 64))\r
- memBase = 0xF00000 - 64;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)\r
- {\r
- memBase -= 16;\r
-\r
- if (memBase < 0)\r
- memBase = 0;\r
-\r
- RefreshContents();\r
- }\r
- else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)\r
- {\r
- memBase += 16;\r
-\r
- if (memBase > (0xF00000 - 64))\r
- memBase = 0xF00000 - 64;\r
-\r
- RefreshContents();\r
- }\r
-#endif\r
-}\r
-#endif\r
-\r
-\r
// Set mem base PC address using the 68K pc current address\r
void m68KDasmWindow::Use68KPCAddress(void)\r
{\r
void m68KDasmWindow::SetAddress(int address)\r
{\r
memBase = address;\r
-// RefreshContents();\r
}\r
-\r
-\r
-#if 0\r
-// Set mem base PC address based on user interaction\r
-void m68KDasmWindow::GoToAddress(void)\r
-{\r
- bool ok;\r
-\r
- QString newAddress = address->text();\r
- memBase = newAddress.toUInt(&ok, 16);\r
- RefreshContents();\r
-}\r
-#endif\r
m68KDasmWindow(QWidget * parent = 0);\r
\r
public slots:\r
-// void DefineAllKeys(void);\r
void RefreshContents(void);\r
-#if 0\r
- void GoToAddress(void);\r
-#endif\r
void SetAddress(int address);\r
void Use68KPCAddress(void);\r
\r
protected:\r
-#if 0\r
- void keyPressEvent(QKeyEvent *);\r
-#endif\r
\r
private:\r
QVBoxLayout *layout;\r
QTextBrowser *text;\r
-// QScrollBar *sb;\r
-// QLabel * text;\r
-#if 0\r
- QPushButton * refresh;\r
- QLineEdit * address;\r
- QPushButton * go;\r
-#endif\r
size_t memBase;\r
};\r
\r
//
Memory1BrowserWindow::Memory1BrowserWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog),
-// layout(new QVBoxLayout), text(new QTextBrowser),
layout(new QVBoxLayout), text(new QLabel),
refresh(new QPushButton(tr("Refresh"))),
address(new QLineEdit),
go(new QPushButton(tr("Go"))),
memBase(0), memOrigin(0), NumWinOrigin(0)
{
- //setWindowTitle(tr("Memory 1 Browser"));
-
- //address->setInputMask("hhhhhh");
address->setPlaceholderText("0x<value>, decimal value or symbol name");
QHBoxLayout * hbox1 = new QHBoxLayout;
hbox1->addWidget(address);
hbox1->addWidget(go);
- // Need to set the size as well...
-// resize(560, 480);
-
QFont fixedFont("Lucida Console", 8, QFont::Normal);
-// QFont fixedFont("", 8, QFont::Normal);
fixedFont.setStyleHint(QFont::TypeWriter);
text->setFont(fixedFont);
-//// layout->setSizeConstraint(QLayout::SetFixedSize);
setLayout(layout);
layout->addWidget(text);
- //layout->addWidget(refresh);
layout->addLayout(hbox1);
connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContentsWindow()));
//
// memory1browser.h: Jaguar memory window 1 browser
//
-// by James Hammons
-// (C) 2012 Underground Software
+// by Jean-Paul Mari
//
#ifndef __MEMORY1BROWSER_H__
Memory1BrowserWindow(QWidget * parent = 0);
public slots:
-// void DefineAllKeys(void);
void RefreshContents(size_t NumWin);
void RefreshContentsWindow(void);
void GoToAddress(void);
private:
QVBoxLayout * layout;
- // QTextBrowser * text;
QLabel * text;
QPushButton * refresh;
QLineEdit * address;
QPushButton * go;
-
int memBase;
size_t memOrigin;
size_t NumWinOrigin;
// DRAM size max\r
if (strcmp(argv[i], "--dram-max") == 0)\r
{\r
- printf("DRAM size set at 8 Mbytes.\n");\r
+ printf("DRAM size set at 8 MBytes.\n");\r
vjs.DRAM_size = 0x800000;\r
}\r
\r