Display BIOS date correctly
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <PSX/Auxiliary/math_helper.hpp>
|
||||
#include <PSX/System/syscalls.hpp>
|
||||
|
||||
namespace JabyEngine {
|
||||
@@ -5,7 +6,11 @@ namespace JabyEngine {
|
||||
BIOSVersion get_bios_version() {
|
||||
BIOSVersion version;
|
||||
|
||||
version.date_bcd = *reinterpret_cast<uint32_t*>(0xBFC00100);
|
||||
const auto date_bcd = *reinterpret_cast<uint32_t*>(0xBFC00100);
|
||||
|
||||
version.date.day = from_bcd(static_cast<uint8_t>(date_bcd & 0xFF));
|
||||
version.date.month = from_bcd(static_cast<uint8_t>((date_bcd >> 8) & 0xFF));
|
||||
version.date.year = from_bcd(static_cast<uint16_t>(date_bcd >> 16));
|
||||
version.kernel_maker = reinterpret_cast<const char*>(0xBFC00108);
|
||||
version.gui_version = reinterpret_cast<const char*>(0xBFC7FF32);
|
||||
return version;
|
||||
|
Reference in New Issue
Block a user