BizHawk/BizHawk.Emulation.DiscSystem/DiscUtils.cs

16 lines
305 B
C#
Raw Normal View History

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
/// </summary>
2015-07-08 03:33:05 +00:00
public static int BCD_Byte(this int val)
{
byte ret = (byte)(val % 10);
ret += (byte)(16 * (val / 10));
return ret;
}
}
}