2013-04-17 22:43:11 -04:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 22:43:11 -04:00
|
|
|
// Refer to the license.txt file included.
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2009-07-06 02:10:26 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2014-09-07 20:06:58 -05:00
|
|
|
#include "Common/CommonTypes.h"
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2014-03-12 15:33:41 -04:00
|
|
|
bool Assemble(const std::string& text, std::vector<u16> &code, bool force = false);
|
2009-07-06 02:10:26 +00:00
|
|
|
bool Disassemble(const std::vector<u16> &code, bool line_numbers, std::string &text);
|
|
|
|
bool Compare(const std::vector<u16> &code1, const std::vector<u16> &code2);
|
2013-01-15 17:50:50 -05:00
|
|
|
void GenRandomCode(u32 size, std::vector<u16> &code);
|
2009-07-06 02:10:26 +00:00
|
|
|
void CodeToHeader(const std::vector<u16> &code, std::string _filename,
|
|
|
|
const char *name, std::string &header);
|
|
|
|
void CodesToHeader(const std::vector<u16> *codes, const std::vector<std::string> *filenames,
|
2013-01-15 17:50:50 -05:00
|
|
|
u32 numCodes, const char *name, std::string &header);
|
2009-07-06 02:10:26 +00:00
|
|
|
|
|
|
|
// Big-endian, for writing straight to file using File::WriteStringToFile.
|
|
|
|
void CodeToBinaryStringBE(const std::vector<u16> &code, std::string &str);
|
|
|
|
void BinaryStringBEToCode(const std::string &str, std::vector<u16> &code);
|
|
|
|
|
|
|
|
// Load code (big endian binary).
|
2014-03-12 15:33:41 -04:00
|
|
|
bool LoadBinary(const std::string& filename, std::vector<u16> &code);
|
|
|
|
bool SaveBinary(const std::vector<u16> &code, const std::string& filename);
|