Detect type of BIOS
This commit is contained in:
@@ -17,6 +17,34 @@ R31 ra Return address (set by function call)
|
||||
*/
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace BIOS {
|
||||
struct Version {
|
||||
struct {
|
||||
uint8_t day;
|
||||
uint8_t month;
|
||||
uint16_t year;
|
||||
} date;
|
||||
const char* kernel_maker;
|
||||
const char* version_str;
|
||||
const char* gui_version;
|
||||
const char* copyright;
|
||||
};
|
||||
|
||||
enum struct Type {
|
||||
Devboard,
|
||||
PS1,
|
||||
PS2,
|
||||
PS3,
|
||||
PSCompatible, // internal usage only
|
||||
No$psx,
|
||||
XEBRA,
|
||||
Unkown
|
||||
};
|
||||
|
||||
Version get_bios_version();
|
||||
extern Type type;
|
||||
}
|
||||
|
||||
namespace SysCall {
|
||||
static constexpr const uint32_t Table_A = 0xA0;
|
||||
static constexpr const uint32_t Table_B = 0xB0;
|
||||
@@ -55,20 +83,6 @@ namespace JabyEngine {
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct BIOSVersion {
|
||||
struct {
|
||||
uint8_t day;
|
||||
uint8_t month;
|
||||
uint16_t year;
|
||||
} date;
|
||||
const char* kernel_maker;
|
||||
const char* version_str;
|
||||
const char* gui_version;
|
||||
const char* copyright;
|
||||
};
|
||||
|
||||
BIOSVersion get_bios_version();
|
||||
|
||||
#define __syscall_function_cast(table, ...) reinterpret_cast<__VA_ARGS__>(table)
|
||||
|
||||
static __always_inline void* memcpy(void *dst, const void *src, size_t len) {
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include "PSX/jabyengine_defines.h"
|
||||
|
||||
START_C_FUNCTIONS
|
||||
int strncmp(const char* s1, const char* s2, size_t n);
|
||||
size_t strlen(const char* str);
|
||||
END_C_FUNCTIONS
|
||||
|
||||
|
Reference in New Issue
Block a user