mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-27 16:21:53 +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();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user