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!

ini handeling

This is a discussion on ini handeling within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; how do u read and write ini files in c for psp and how can u detect what psp u ...

Reply
 
LinkBack Thread Tools
Old 02-23-2008, 11:30 AM   #1
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default ini handeling

how do u read and write ini files in c for psp and how can u detect what psp u have? slim or fat
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 11:42 AM   #2

Enter Custom Title
 
sakya's Avatar
 
Join Date: Jan 2006
Posts: 279
Trader Feedback: 0
Default

Hi!
Quote:
Originally Posted by thecobra
how do u read and write ini files in c for psp
I don't know of any library for this but...ini are just text file: open it and read/write it.
EDIT: I found one: confParser by A_Noob
http://www.psp-programming.com/forum...p?topic=2978.0

Quote:
and how can u detect what psp u have? slim or fat
kuKernelGetModel

Ciaooo
Sakya
__________________
"And they're giving me a wonderful potion,
'Cos I cannot contain my emotion.
And even though, I'm feeling good,
Something tells me, I'd better activate my prayer capsule."
Supper's Ready (Genesis)
sakya is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 12:13 PM   #3
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default

Quote:
Originally Posted by sakya
Hi!

I don't know of any library for this but...ini are just text file: open it and read/write it.
EDIT: I found one: confParser by A_Noob
http://www.psp-programming.com/forum...p?topic=2978.0

i read it but it doesnt read ini _ i want to read ini beacause it the easy way of a database


Quote:
kuKernelGetModel
how do u use it and what file must be include
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 12:26 PM   #4

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Quote:
Originally Posted by thecobra
how do u read and write ini files in c
The same way you read and write any other text file in C.
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 12:33 PM   #5

Enter Custom Title
 
sakya's Avatar
 
Join Date: Jan 2006
Posts: 279
Trader Feedback: 0
Default

Hi!
Quote:
Originally Posted by thecobra
i read it but it doesnt read ini _ i want to read ini beacause it the easy way of a database
Sorry, I don't understand: what do you mean you can read ini "the easy way of a database"?
A Windows ini file is just a plain text file with sections and named values. I thought you just wanted a configuration file...
Btw if you really need a database there's a SQLite port for psp.

EDIT: I forgot: kuKernelGetModel is in kubridge.h (in the 3.x sdk).

Ciaooo
Sakya
__________________
"And they're giving me a wonderful potion,
'Cos I cannot contain my emotion.
And even though, I'm feeling good,
Something tells me, I'd better activate my prayer capsule."
Supper's Ready (Genesis)
sakya is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 12:40 PM   #6
Ænima
 
Judas's Avatar
 
Join Date: Sep 2007
Posts: 587
Trader Feedback: 0
Default

If you mean read and write Windows .ini files, then you're going to have to come up with your own way. But if you want to create your own configuration files, then do it just like you would open any other file.
__________________
[IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]

Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.
Judas is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 03:24 PM   #7
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default

so far there no way of making or reading window type ini?


is there any post or tutoring on how to make configary file?
for psp
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 03:30 PM   #8
 
foXtrot's Avatar
 
Join Date: Jul 2005
Location: Electro World
Posts: 2,559
Trader Feedback: 0
Default

Its simple to do,

write something like this for each config you want to save
variableName=value

then reading a config, go line by line until you hit the variableName you're looking for and read what is to the right of the equals sign.
__________________
I R homaki on [URL=http://forums.**********.net/]M4M[/URL] i.e. im not on QJ for anything anymore.
foXtrot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 04:24 PM   #9
No longer a community member.
 
a_noob's Avatar
 
Join Date: Sep 2006
Location: Over there.
Posts: 666
Trader Feedback: 0
Default

dude just use my confparser or if you can wait a few days I'll release my newer version with array support and sectioning.
a_noob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-23-2008, 05:10 PM   #10

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 a_noob
dude just use my confparser or if you can wait a few days I'll release my newer version with array support and sectioning.
about the string handling, will stings be wraped between quotes ? example name="Varg Viekerness"

becuase now it isn't, and i think thats why im getting that one directory error.
__________________
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 02-24-2008, 08:26 AM   #11
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default

Quote:
Originally Posted by a_noob
dude just use my confparser or if you can wait a few days I'll release my newer version with array support and sectioning.
i'll check it out
maybe i will wait untill u release a new one
how long will that take?
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-24-2008, 10:23 AM   #12
No longer a community member.
 
a_noob's Avatar
 
Join Date: Sep 2006
Location: Over there.
Posts: 666
Trader Feedback: 0
Default

blackshark yes.
a_noob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-24-2008, 01:57 PM   #13
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default

a_noob@
could u give a link from were i could see ur latest version of config
i cant find it
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-24-2008, 02:54 PM   #14
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

Here:
http://www.psp-programming.com/forum...p?topic=2978.0
The Windows ini file is just a text file, source might need some alteration
depending on how it determines where values are but, it would work just the same.
I have used this and it worked ok.
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-24-2008, 03:03 PM   #15
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default

Quote:
Originally Posted by Art
Here:
http://www.psp-programming.com/forum...p?topic=2978.0
The Windows ini file is just a text file, source might need some alteration
depending on how it determines where values are but, it would work just the same.
I have used this and it worked ok.
thx
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
handeling , ini

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 05:53 AM.



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