Vendor Teakra, make emulator own DSP RAM and add DSP RAM to fastmem (#806)
* DSP: Own DSP RAM and add it to fastmem * Vendor Teakra * Add MacOS support to fastmem * Fix MacOS fastmem paths * Fix iOS build
This commit is contained in:
23
third_party/teakra/src/disassembler_c.cpp
vendored
Normal file
23
third_party/teakra/src/disassembler_c.cpp
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "teakra/disassembler.h"
|
||||
#include "teakra/disassembler_c.h"
|
||||
|
||||
extern "C" {
|
||||
bool Teakra_Disasm_NeedExpansion(uint16_t opcode) {
|
||||
return Teakra::Disassembler::NeedExpansion(opcode);
|
||||
}
|
||||
|
||||
size_t Teakra_Disasm_Do(char* dst, size_t dstlen,
|
||||
uint16_t opcode, uint16_t expansion /*= 0*/) {
|
||||
std::string r = Teakra::Disassembler::Do(opcode, expansion);
|
||||
|
||||
if (dst) {
|
||||
size_t i = 0;
|
||||
for (; i < (dstlen-1) && i < r.length(); ++i) {
|
||||
dst[i] = r[i];
|
||||
}
|
||||
dst[dstlen-1] = '\0';
|
||||
}
|
||||
|
||||
return r.length();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user