19 lines
754 B
C++
19 lines
754 B
C++
#include <PSX/Auxiliary/math_helper.hpp>
|
|
#include <PSX/System/syscalls.hpp>
|
|
|
|
namespace JabyEngine {
|
|
namespace SysCall {
|
|
BIOSVersion get_bios_version() {
|
|
BIOSVersion version;
|
|
|
|
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;
|
|
}
|
|
}
|
|
} |