2014-12-04 05:40:10 +00:00
|
|
|
namespace BizHawk.Emulation.DiscSystem
|
|
|
|
{
|
|
|
|
public static class DiscUtils
|
|
|
|
{
|
|
|
|
/// <summary>
|
2015-07-08 03:33:05 +00:00
|
|
|
/// converts the given int to a BCD value
|
2014-12-04 05:40:10 +00:00
|
|
|
/// </summary>
|
2015-07-08 03:33:05 +00:00
|
|
|
public static int BCD_Byte(this int val)
|
2014-12-04 05:40:10 +00:00
|
|
|
{
|
|
|
|
byte ret = (byte)(val % 10);
|
|
|
|
ret += (byte)(16 * (val / 10));
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|