// Copyright 2009 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #pragma once #include #include #include "Common/CommonTypes.h" namespace DSP { bool Assemble(const std::string& text, std::vector& code, bool force = false); bool Disassemble(const std::vector& code, bool line_numbers, std::string& text); bool Compare(const std::vector& code1, const std::vector& code2); void GenRandomCode(u32 size, std::vector& code); void CodeToHeader(const std::vector& code, std::string _filename, const char* name, std::string& header); void CodesToHeader(const std::vector* codes, const std::vector* filenames, u32 numCodes, const char* name, std::string& header); // Big-endian, for writing straight to file using File::WriteStringToFile. void CodeToBinaryStringBE(const std::vector& code, std::string& str); void BinaryStringBEToCode(const std::string& str, std::vector& code); // Load code (big endian binary). bool LoadBinary(const std::string& filename, std::vector& code); bool SaveBinary(const std::vector& code, const std::string& filename); } // namespace DSP