mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-03 10:26:36 +00:00
Adding APU Debugger window
Separating APU ram from its component
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// Created by anonymus-raccoon on 2/17/20.
|
||||
//
|
||||
|
||||
#include <bitset>
|
||||
#include "Utility.hpp"
|
||||
|
||||
namespace ComSquare::Utility
|
||||
@@ -26,4 +27,21 @@ namespace ComSquare::Utility
|
||||
sprintf(buf, "0x%06X", i);
|
||||
return buf;
|
||||
}
|
||||
|
||||
std::string to_binary(uint8_t i)
|
||||
{
|
||||
return std::bitset<8>(i).to_string();
|
||||
}
|
||||
|
||||
std::string to_binary(uint16_t i)
|
||||
{
|
||||
return std::bitset<16>(i).to_string();
|
||||
|
||||
}
|
||||
|
||||
std::string to_binary(uint24_t i)
|
||||
{
|
||||
return std::bitset<24>(i).to_string();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,12 @@ namespace ComSquare::Utility
|
||||
std::string to_hex(uint16_t i);
|
||||
|
||||
std::string to_hex(uint24_t i);
|
||||
|
||||
std::string to_binary(uint8_t i);
|
||||
|
||||
std::string to_binary(uint16_t i);
|
||||
|
||||
std::string to_binary(uint24_t i);
|
||||
}
|
||||
|
||||
#endif //COMSQUARE_UTILITY_HPP
|
||||
|
||||
Reference in New Issue
Block a user