QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Reading Psp Firmware Version Using Lua

This is a discussion on Reading Psp Firmware Version Using Lua within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; --Want to read your PSP Firmware Version then paste this code in your file white = Color.new(255,255,255) file = io.open("flash0:/vsh/etc/version.txt","r") ...

Reply
 
LinkBack Thread Tools
Old 03-13-2007, 05:19 PM   #1
 
xpack's Avatar
 
Join Date: Aug 2006
Location: Under Your Bed
Posts: 3,084
Trader Feedback: 0
Exclamation Reading Psp Firmware Version Using Lua

--Want to read your PSP Firmware Version then paste this code in your file

white = Color.new(255,255,255)

file = io.open("flash0:/vsh/etc/version.txt","r")
mystring = file:read()
file:close()

newstring = string.sub(mystring,9,12)

screen:clear(white)
screen:print(155,136,"Fir mware Version: "..newstring)screen.flip( )
screen.waitVblankStart()

Last edited by xpack; 03-15-2007 at 10:57 PM..
xpack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2007, 05:46 PM   #2

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Either put that in code tags or disable smilies in your post. But other than that, nice. I believe this is useable without my modded lua player, as your only reading from flash.
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 08:09 AM   #3


Developer
 
daaa57150's Avatar
 
Join Date: Sep 2006
Location: france
Posts: 167
Trader Feedback: 0
Thumbs up

cool, do you know how to read the user's name in a similar way? at least in which file it is? I was looking for this before.
__________________
Try my latest game:
MEGA DROPS 2

daaa57150 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 09:40 AM   #4
 
Join Date: Sep 2006
Location: Cape Town, South Africa
Posts: 717
Trader Feedback: 0
Default

I think the nickname is in flash1:/registry/system.dreg, although there might be another way.
coolguy5678 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 09:52 AM   #5

Developer
 
cools's Avatar
 
Join Date: Aug 2005
Posts: 472
Trader Feedback: 0
Default

I know this isn't helpful as of now, but Lua Player Mod 4 will have a System.nickName() function that returns the PSP's nick name.
__________________

PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
http://www.cools.biaklan.com
Currently Working on ?????

Quote of the Week
cools is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 09:53 AM   #6
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

cool. Glad to see your still working cools.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 09:54 AM   #7

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

Quote:
Originally Posted by cools
I know this isn't helpful as of now, but Lua Player Mod 4 will have a System.nickName() function that returns the PSP's nick name.
Quote:
coolshakil007 (8:55:55 PM): hprm may be comming to lua!
coolshakil007 (8:55:57 PM): g2g!
coolshakil007 signed off at 8:56:07 PM.
youresam1 (8:56:20 PM): I already did that
...did you get my PM?
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 10:13 AM   #8

Developer
 
cools's Avatar
 
Join Date: Aug 2005
Posts: 472
Trader Feedback: 0
Default

Yeah! Mod4 will be pretty interesting
__________________

PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
http://www.cools.biaklan.com
Currently Working on ?????

Quote of the Week
cools is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 10:23 AM   #9

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

Quote:
Originally Posted by daaa57150
cool, do you know how to read the user's name in a similar way? at least in which file it is? I was looking for this before.
Code:
white = Color.new(255,255,255) 

name = io.open("flash1:/registry/system.dreg","r")  
name:seek("set", 0x2380) 
user = name:read(27) 
name:close() 

while true do 

screen:clear()  
 
screen:print(100,100, "Your PSP name is:" , white) 
screen:print(100,115, user , white) 
screen:print(100, 30, "now search next time!", white)

screen.waitVblankStart() 
screen.flip() 
end
also, Mod4 sounds pretty cool Cool, can't wait
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 01:10 PM   #10

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Default

nice black=-)
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 03:38 PM   #11

.info
 
Yongobongo's Avatar
 
Join Date: Jun 2006
Location: ACT, Australia
Posts: 1,674
Trader Feedback: 0
Default

Quote:
Originally Posted by cools
I know this isn't helpful as of now, but Lua Player Mod 4 will have a System.nickName() function that returns the PSP's nick name.
Sick!
MAC address reading if possible would also be cool

This firmware reading snippet, IMO is useful for making flashers in lua, to prevent people using a flasher designed for eg. 3.03OE (icons) on 3.10OE
__________________

http://www.yongobongo.com
PSN - yongobongo
Yongobongo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 03:44 PM   #12

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

Yet again, I already added everything you are all asking for in ipodmocks luaplayer, lol.

Code:
static int Wlan_getmac(lua_State *L)
{
unsigned char sVal[7];
char themac[18];
memset(sVal, 0, 7);
sceWlanGetEtherAddr(sVal); 	
sprintf(themac,"%02X:%02X:%02X:%02X:%02X:%02X", sVal[0], sVal[1], sVal[2], sVal[3], sVal[4], sVal[5]);
lua_pushstring(L, themac);
return 1;
}
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 03:54 PM   #13

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

youresam - You know, thats really cool. One thing... you havent released it, so no sense in talking all high of yourself like were idiots for considering implementing something you already have...
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 05:08 PM   #14

lol
 
Anti-QuickJay's Avatar
 
Join Date: Aug 2006
Real First Name: Robert
Location: Whittier, CA
Just Played: Madden 10
Posts: 5,791
Trader Feedback: 0
Default

Quote:
Originally Posted by youresam
Yet again, I already added everything you are all asking for in ipodmocks luaplayer, lol.

Code:
static int Wlan_getmac(lua_State *L)
{
unsigned char sVal[7];
char themac[18];
memset(sVal, 0, 7);
sceWlanGetEtherAddr(sVal);     
sprintf(themac,"%02X:%02X:%02X:%02X:%02X:%02X", sVal[0], sVal[1], sVal[2], sVal[3], sVal[4], sVal[5]);
lua_pushstring(L, themac);
return 1;
}
Might as well release it XD
Anti-QuickJay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 05:33 PM   #15

<font color=black>Develo per
 
SuperBatXS's Avatar
 
Join Date: May 2006
Location: Behind you.
Posts: 1,813
Trader Feedback: 0
Default

Quote:
Originally Posted by SG57
youresam - You know, thats really cool. One thing... you havent released it, so no sense in talking all high of yourself like were idiots for considering implementing something you already have...
You know, you don't always have to say the name of the guy you want to talk to by using "[enter name here] - [enter discussion here]". There is a quote button here; it may be helpful.
__________________
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195

"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
SuperBatXS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 05:38 PM   #16

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Default

even so theres no point to these lua mods when noone wants to seem to achnowlege(i know i misspelled it) lua any longer
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-15-2007, 05:52 PM   #17
 
xpack's Avatar
 
Join Date: Aug 2006
Location: Under Your Bed
Posts: 3,084
Trader Feedback: 0
Default

Quote:
Originally Posted by youresam
Yet again, I already added everything you are all asking for in ipodmocks luaplayer, lol.

Code:
static int Wlan_getmac(lua_State *L)
{
unsigned char sVal[7];
char themac[18];
memset(sVal, 0, 7);
sceWlanGetEtherAddr(sVal); 	
sprintf(themac,"%02X:%02X:%02X:%02X:%02X:%02X", sVal[0], sVal[1], sVal[2], sVal[3], sVal[4], sVal[5]);
lua_pushstring(L, themac);
return 1;
}
YOU MAY HAVE IMPLEMENTED ALL THAT BUT AN UNRELEASED MOD DOES NOBODY ANYGOOD.
xpack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 12:01 PM   #18


Developer
 
daaa57150's Avatar
 
Join Date: Sep 2006
Location: france
Posts: 167
Trader Feedback: 0
Default

Nice, so it is possible.. Thanks! That will be useful if I develop another game sometime.
__________________
Try my latest game:
MEGA DROPS 2

daaa57150 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 02:39 PM   #19
 
myschoo's Avatar
 
Join Date: Jul 2006
Location: Middle Europe
Posts: 1,281
Trader Feedback: 0
Default

Quote:
Originally Posted by BlackShark
Code:
white = Color.new(255,255,255) 

name = io.open("flash1:/registry/system.dreg","r")  
name:seek("set", 0x2380) 
user = name:read(27) 
name:close() 

while true do 

screen:clear()  
 
screen:print(100,100, "Your PSP name is:" , white) 
screen:print(100,115, user , white) 
screen:print(100, 30, "now search next time!", white)

screen.waitVblankStart() 
screen.flip() 
end
also, Mod4 sounds pretty cool Cool, can't wait
yep, im glad to see lot of ppl using this example code from evilmana
__________________
[CENTER][SIZE="1"][1 Year QJ Member]
[COLOR="Sienna"][LUA Coder and C Learner][/COLOR]
[URL="http://dl.qj.net/Ball-Revamped-Clone-v.1-PSP-Homebrew-Games/pg/12/fid/15231/catid/195"] [COLOR="SlateGray"][Ball Revamped Clone v0.1][/COLOR] [/URL]
[URL="http://dl.qj.net/Phil-s-Shooting-Range-v0.3-PSP-Homebrew-Games/pg/12/fid/11542/catid/194"] [COLOR="SlateGray"][Phil's Shooting Range v0.3][/COLOR] [/URL]
[URL="http://dl.qj.net/Organization-Apps/pg/12/fid/14248/catid/190"][COLOR="SlateGray"][HideFile PRX v2][/COLOR][/URL]
[URL="http://dl.qj.net/SSR-PRX-v1.1-PSP-Homebrew-Applications/pg/12/fid/14725/catid/151"][COLOR="SlateGray"][SSR PRX v1.1][/COLOR][/URL] [/SIZE][/CENTER]
myschoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 02:42 PM   #20

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

yup, but he should have gotten it himselfe, thats y I put,

Code:
screen:print(100, 30, "now search next time!", white)
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 03:25 PM   #21
 
yolarry's Avatar
 
Join Date: Sep 2006
Posts: 890
Trader Feedback: 0
Default

No way to make a lua app says "This is not 3.03 OE-C!" then it returns you to the xmb?
__________________
No longer comes to this site...
yolarry is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 03:41 PM   #22
 
xpack's Avatar
 
Join Date: Aug 2006
Location: Under Your Bed
Posts: 3,084
Trader Feedback: 0
Default

You code try something like this

Code:
white = Color.new(255,255,255)

file = io.open("flash0:/vsh/etc/version.txt","r")
mystring = file:read()
file:close()

newstring = string.sub(mystring,9,12) 

while true do
screen:clear(white)

if newstring ~= "3.03" then
Sytem.Quit() -- For mods
else
screen:print(155,136,"Fir mware Version: "..newstring) -or whatever you want
end
end

screen.flip( )
screen.waitVblankStart()
Havent tested it let me know if it works
xpack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:12 PM   #23
 
yolarry's Avatar
 
Join Date: Sep 2006
Posts: 890
Trader Feedback: 0
Default

error "then"
__________________
No longer comes to this site...
yolarry is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:19 PM   #24
 
xpack's Avatar
 
Join Date: Aug 2006
Location: Under Your Bed
Posts: 3,084
Trader Feedback: 0
Default

Quote:
Originally Posted by yolarry
error "then"
O wrote this in about 15 second so like I said might not work but what error did you get
xpack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:22 PM   #25
 
Join Date: Sep 2006
Posts: 484
Trader Feedback: 0
Default

Code:
white = Color.new(255,255,255)

file = io.open("flash0:/vsh/etc/version.txt","r")
mystring = file:read()
file:close()

newstring = string.sub(mystring,9,12) 

while true do
screen:clear(white)

if newstring == "3.03" then
Sytem.Quit() -- For mods
else
screen:print(155,136,"Fir mware Version: "..newstring) -or whatever you want
end
end

screen.flip( )
screen.waitVblankStart()
-= Double Post =-
fixed and do you want 3.03 or 3.03 OE-C
__________________
Need a GFX Guy for EBOOT ICONS, BACkGROUNDS?? I can help you there.
Just see some of my work. PM me for GFX.

Last edited by pspfreak9; 03-18-2007 at 04:23 PM.. Reason: Automerged Doublepost
pspfreak9 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:23 PM   #26
 
yolarry's Avatar
 
Join Date: Sep 2006
Posts: 890
Trader Feedback: 0
Default

Oe-c
__________________
No longer comes to this site...
yolarry is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:25 PM   #27
 
Join Date: Sep 2006
Posts: 484
Trader Feedback: 0
Default

Code:
white = Color.new(255,255,255)

file = io.open("flash0:/vsh/etc/version.txt","r")
mystring = file:read()
file:close()

newstring = string.sub(mystring,9,12) 

while true do
screen:clear(white)

if newstring == "3.03 OE-C" then
screen:print(155,136,"Fir mware Version: "..newstring) -or whatever you want
else
Sytem.Quit() -- For mods
end
end

screen.flip( )
screen.waitVblankStart()
there 3.03 OE-C WORKING
__________________
Need a GFX Guy for EBOOT ICONS, BACkGROUNDS?? I can help you there.
Just see some of my work. PM me for GFX.
pspfreak9 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:25 PM   #28
 
xpack's Avatar
 
Join Date: Aug 2006
Location: Under Your Bed
Posts: 3,084
Trader Feedback: 0
Default

Quote:
Originally Posted by pspfreak9
Code:
white = Color.new(255,255,255)

file = io.open("flash0:/vsh/etc/version.txt","r")
mystring = file:read()
file:close()

newstring = string.sub(mystring,9,12) 

while true do
screen:clear(white)

if newstring == "3.03" then
Sytem.Quit() -- For mods
else
screen:print(155,136,"Fir mware Version: "..newstring) -or whatever you want
end
end

screen.flip( )
screen.waitVblankStart()
-= Double Post =-
fixed and do you want 3.03 or 3.03 OE-C
I'm an idiot cant believe i forgot the extra "="
xpack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:26 PM   #29
 
Join Date: Sep 2006
Posts: 484
Trader Feedback: 0
Default

no thats wrong I just read you first post wait editing
-= Double Post =-
Fished editing my last post now it should work xpack you had it backwards if you had 3.03 OE-C it kicked you out! lol
__________________
Need a GFX Guy for EBOOT ICONS, BACkGROUNDS?? I can help you there.
Just see some of my work. PM me for GFX.

Last edited by pspfreak9; 03-18-2007 at 04:29 PM.. Reason: Automerged Doublepost
pspfreak9 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-18-2007, 04:37 PM   #30
 
xpack's Avatar
 
Join Date: Aug 2006
Location: Under Your Bed
Posts: 3,084
Trader Feedback: 0
Default

he wanted it so that if it is not 3.03 then quit the app. and if it is the run the program
xpack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
firmware , lua , psp , reading , version

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 08:46 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us