fix firm/kernel version and added defines

This commit is contained in:
Lectem 2015-06-26 22:18:15 +02:00
parent 2791ab4850
commit 5b6d9b1ad9
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,10 @@
#define SYSTEM_VERSION(major, minor, revision) \ #define SYSTEM_VERSION(major, minor, revision) \
(((major)<<24)|((minor)<<16)|((revision)<<8)) (((major)<<24)|((minor)<<16)|((revision)<<8))
#define GET_VERSION_MAJOR(version) ((version) >>24)
#define GET_VERSION_MINOR(version) (((version)>>16)&0xFF)
#define GET_VERSION_REVISION(version) (((version)>> 8)&0xFF)
u32 osConvertVirtToPhys(u32 vaddr); u32 osConvertVirtToPhys(u32 vaddr);
u32 osConvertOldLINEARMemToNew(u32 addr);//Converts 0x14* vmem to 0x30*. Returns the input addr when it's already within the new vmem. Returns 0 when outside of either LINEAR mem areas. u32 osConvertOldLINEARMemToNew(u32 addr);//Converts 0x14* vmem to 0x30*. Returns the input addr when it's already within the new vmem. Returns 0 when outside of either LINEAR mem areas.
const char* osStrError(u32 error); const char* osStrError(u32 error);

View File

@ -110,13 +110,13 @@ u64 osGetTime() {
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
u32 osGetFirmVersion() { u32 osGetFirmVersion() {
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
return (*(u32*)0x1FF80000) & ~0xFF; return (*(u32*)0x1FF80060) & ~0xFF;
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
u32 osGetKernelVersion() { u32 osGetKernelVersion() {
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
return (*(u32*)0x1FF80060) & ~0xFF; return (*(u32*)0x1FF80000) & ~0xFF;
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------