1
/*====================================================================
3
project: GameCube DSP Tool (gcdsp)
7
Copyright (c) 2005 Duddie
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
====================================================================*/
25
#ifndef _DSP_DISASSEMBLE_H
26
#define _DSP_DISASSEMBLE_H
32
#include "DSPTables.h"
35
struct AssemblerSettings
43
decode_registers(true),
55
bool decode_registers;
65
DSPDisassembler(const AssemblerSettings &settings);
68
bool Disassemble(int start_pc, const std::vector<u16> &code, int base_addr, std::string &text);
70
// Warning - this one is trickier to use right.
71
// Use pass == 2 if you're just using it by itself.
72
bool DisOpcode(const u16 *binbuf, int base_addr, int pass, u16 *pc, std::string &dest);
75
// Moves PC forward and writes the result to dest.
76
bool DisFile(const char* name, int base_addr, int pass, std::string &output);
78
char* DisParams(const DSPOPCTemplate& opc, u16 op1, u16 op2, char* strbuf);
79
std::map<u16, int> unk_opcodes;
81
const AssemblerSettings settings_;
86
#endif // _DSP_DISASSEMBLE_H