1 /*	Copyright 2015 Theo Berkau <cwx@cyberwarriorx.com>
2 
3 	This file is part of Yabause.
4 
5 	Yabause is free software; you can redistribute it and/or modify
6 	it under the terms of the GNU General Public License as published by
7 	the Free Software Foundation; either version 2 of the License, or
8 	(at your option) any later version.
9 
10 	Yabause is distributed in the hope that it will be useful,
11 	but WITHOUT ANY WARRANTY; without even the implied warranty of
12 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 	GNU General Public License for more details.
14 
15 	You should have received a copy of the GNU General Public License
16 	along with Yabause; if not, write to the Free Software
17 	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18 */
19 #include "UIDebugSCSPDSP.h"
20 #include "../CommonDialogs.h"
21 #include "UIYabause.h"
22 
SCSPDSPDis(void * context,u32 addr,char * string)23 int SCSPDSPDis(void *context, u32 addr, char *string)
24 {
25    ScspDspDisasm((u8)addr, string);
26    return 1;
27 }
28 
SCSPDSPBreakpointHandler(u32 addr)29 void SCSPDSPBreakpointHandler (u32 addr)
30 {
31    UIYabause* ui = QtYabause::mainWindow( false );
32 }
33 
UIDebugSCSPDSP(YabauseThread * mYabauseThread,QWidget * p)34 UIDebugSCSPDSP::UIDebugSCSPDSP( YabauseThread *mYabauseThread, QWidget* p )
35    : UIDebugCPU( PROC_SCSPDSP, mYabauseThread, p )
36 {
37    this->setWindowTitle(QtYabause::translate("Debug SCSP DSP"));
38    gbRegisters->setTitle(QtYabause::translate("DSP Registers"));
39 	pbMemoryTransfer->setVisible( true );
40 	gbMemoryBreakpoints->setVisible( false );
41 
42    QSize size = lwRegisters->minimumSize();
43    size.setWidth(size.width() + lwRegisters->fontMetrics().averageCharWidth());
44    lwRegisters->setMinimumSize(size);
45 
46    size = lwDisassembledCode->minimumSize();
47    size.setWidth(lwRegisters->fontMetrics().averageCharWidth() * 80);
48    lwDisassembledCode->setMinimumSize(size);
49    lwDisassembledCode->setDisassembleFunction(SCSPDSPDis);
50    lwDisassembledCode->setEndAddress(128);
51 }
52 
updateRegList()53 void UIDebugSCSPDSP::updateRegList()
54 {
55 }
56 
updateCodeList(u32 addr)57 void UIDebugSCSPDSP::updateCodeList(u32 addr)
58 {
59 }
60 
getRegister(int index,int * size)61 u32 UIDebugSCSPDSP::getRegister(int index, int *size)
62 {
63    *size = 0;
64    return 0;
65 }
66 
setRegister(int index,u32 value)67 void UIDebugSCSPDSP::setRegister(int index, u32 value)
68 {
69 }
70 
addCodeBreakpoint(u32 addr)71 bool UIDebugSCSPDSP::addCodeBreakpoint(u32 addr)
72 {
73 	return true;
74 }
75 
delCodeBreakpoint(u32 addr)76 bool UIDebugSCSPDSP::delCodeBreakpoint(u32 addr)
77 {
78 	return true;
79 }
80 
stepInto()81 void UIDebugSCSPDSP::stepInto()
82 {
83 }
84 
85 
86