Homebrew [Question] How to Interpret System.getFirmware()?

BringusStudios

Well-Known Member
OP
Member
Joined
Oct 3, 2011
Messages
442
Trophies
1
Age
24
Website
bringus.studio
XP
608
Country
United States
I have a LPP app that needs to know your firmware version for something. I ran System.getFirmware(), and it returned 36569088 for a 9.0.0 console... Is there a way to translate the output to a normal firmware version or vice versa, or is there documentation of this somewhere? I've attached an app to output your 'firmware version' below.
 

Attachments

  • returnversion.zip
    726.2 KB · Views: 232
Last edited by BringusStudios, , Reason: added zip

Helreizer543

Well-Known Member
Newcomer
Joined
Nov 24, 2014
Messages
49
Trophies
0
Age
102
XP
119
Country
United States
this is the lpp-3ds authors code straight from the library itself:
static int lua_getFW(lua_State *L)
{ int argc = lua_gettop(L);
if (argc != 0) return luaL_error(L, "wrong number of arguments");
u32 fw_id = osGetFirmVersion();
lua_pushinteger(L,GET_VERSION_MAJOR(fw_id));
lua_pushinteger(L,GET_VERSION_MINOR(fw_id));
lua_pushinteger(L,GET_VERSION_REVISION(fw_id));
return 3; }
are you passing something into the function?
cause it seem like you should be doing system.getFirmware(lua_State *L);
and them printing L;

but *disclaimer* I have not used lpp-3ds nor do I know lua. This information was gathered in a short amount of time.
It is still worth trying :-)
 

BringusStudios

Well-Known Member
OP
Member
Joined
Oct 3, 2011
Messages
442
Trophies
1
Age
24
Website
bringus.studio
XP
608
Country
United States
this is the lpp-3ds authors code straight from the library itself:
static int lua_getFW(lua_State *L)
{ int argc = lua_gettop(L);
if (argc != 0) return luaL_error(L, "wrong number of arguments");
u32 fw_id = osGetFirmVersion();
lua_pushinteger(L,GET_VERSION_MAJOR(fw_id));
lua_pushinteger(L,GET_VERSION_MINOR(fw_id));
lua_pushinteger(L,GET_VERSION_REVISION(fw_id));
return 3; }
are you passing something into the function?
cause it seem like you should be doing system.getFirmware(lua_State *L);
and them printing L;

but *disclaimer* I have not used lpp-3ds nor do I know lua. This information was gathered in a short amount of time.
It is still worth trying :-)
That's very strange, because the documentation says:

u32 System.getFirmware(void) - Returns firmware version.

Sample usage: fw_ver = System.getFirmware()

So I don't think I should be passing anything into it?
 

WulfyStylez

SALT/Bemani Princess
Member
Joined
Nov 3, 2013
Messages
1,149
Trophies
0
XP
2,867
Country
United States
36569088 == 0x022E0000, for the record. That's [02] [2E] [00] [00], or 2.46-0/9.0 FIRM according to the list of kernel versions here. Kernel versions like this are generally only useful for apps that need to be generally compatible with specific FIRM versions, rather than specific service/application versions.
 

BringusStudios

Well-Known Member
OP
Member
Joined
Oct 3, 2011
Messages
442
Trophies
1
Age
24
Website
bringus.studio
XP
608
Country
United States
36569088 == 0x022E0000, for the record. That's [02] [2E] [00] [00], or 2.46-0/9.0 FIRM according to the list of kernel versions here. Kernel versions like this are generally only useful for apps that need to be generally compatible with specific FIRM versions, rather than specific service/application versions.
Perfect! I'll just write a base 16 to 10 converter into my app, and use that chart to determine the FW version. Thanks a ton!
 
Last edited by BringusStudios,

RednaxelaNnamtra

Well-Known Member
Member
Joined
Dec 8, 2011
Messages
1,208
Trophies
1
XP
3,342
Country
Germany
If you check the firmware in this way, firmlaunch will break it. The best way is to check kernel and cver/nver I think. Yellows8 is checking it this way in his menuhax installer.
 

BringusStudios

Well-Known Member
OP
Member
Joined
Oct 3, 2011
Messages
442
Trophies
1
Age
24
Website
bringus.studio
XP
608
Country
United States
If you check the firmware in this way, firmlaunch will break it. The best way is to check kernel and cver/nver I think. Yellows8 is checking it this way in his menuhax installer.
Right after I finished the code... crap. What do you mean firmlaunch will break it? What I need to do essentially is determine "if <= 9.2 then true, otherwise false", would that work for various consoles, and give correct results based on what firmware the console is on?
 

RednaxelaNnamtra

Well-Known Member
Member
Joined
Dec 8, 2011
Messages
1,208
Trophies
1
XP
3,342
Country
Germany
It depends on for what you need to check it, to check if you can use libkhax you should check the kernel, if yo need to know which version of a module is installed for example you should check cver and nver.
 

RednaxelaNnamtra

Well-Known Member
Member
Joined
Dec 8, 2011
Messages
1,208
Trophies
1
XP
3,342
Country
Germany
Yes, for this the kernel version needs to be checkt, not the firmware version itself. Also if firmlaunch is active a direct cfw boot without reboot is not possible. So when checking the kernel your application will automaticaly say its not possible to use a cfw, if you use the application in cfws.
 

BringusStudios

Well-Known Member
OP
Member
Joined
Oct 3, 2011
Messages
442
Trophies
1
Age
24
Website
bringus.studio
XP
608
Country
United States
Yes, for this the kernel version needs to be checkt, not the firmware version itself. Also if firmlaunch is active a direct cfw boot without reboot is not possible. So when checking the kernel your application will automaticaly say its not possible to use a cfw, if you use the application in cfws.
Interesting... Thank's for the help. I'll mess around with it on some different systems for the time being, but If it gets to complicated for me then oh well :wacko:. I guess If you're running a CFW and you run it

EDIT: Yeah, you're right, I tested it on a 9.0.0 with themehax and it said yes, and then tried from a ninjhax .cia from rxTools and it said no. Is there any way to determine if a CFW is currently running on the system (in lpp3ds)?
 
Last edited by BringusStudios,

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Interesting... Thank's for the help. I'll mess around with it on some different systems for the time being, but If it gets to complicated for me then oh well :wacko:. I guess If you're running a CFW and you run it

EDIT: Yeah, you're right, I tested it on a 9.0.0 with themehax and it said yes, and then tried from a ninjhax .cia from rxTools and it said no. Is there any way to determine if a CFW is currently running on the system (in lpp3ds)?

You can use System.checkBuild but don't know if R3 ones is good (i recently patched this function also in repository).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-