Results 1 to 30 of 55
[RELEASE] OpenSource File browser
This is a discussion on [RELEASE] OpenSource File browser within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hi guys, I've been working on a file browser last summer, and now, it has been finished for quite a ...
-
10-01-2008, 07:37 AM #1
[RELEASE] OpenSource File browser
Hi guys,
I've been working on a file browser last summer, and now, it has been finished for quite a while, and I haven't a clue of what I could use it for...
So, I just thought I would release the source code under GPL, so that other people can use it.
Here are the few features that makes it a little more than a basic fil browser:
-It has different themes you can change into the option menu
-The display is made in a Rolodex style presentation, dunno if it means what I mean, but that's basically the same idea as Art used in his xflash (but coded from scratch). So, I like it :)
-Other small stuff you'll discover.
So, for any non developer, this is kind of a useless stuff, because if you run the eboot which is in the zip, you'll have a very nice file browser, but which won't do anything when you select a fle...
So, if you do are a dev, just modify it a little, just adding the action you want to apply to the file selected, or modify it a lot, just remember to release it under gpl too, and to quote the author (myself :))
Of course, It'd be great if anyone using the source coud send a little mail to show me how they used it, I would love that!
Here are is a screenshot of the browser with the default theme more are available on my flickr page.

Don't hesitate to send a mail here: [email protected]
And, visit my web blog
Download Source Code & (useless) Binaries
Last edited by maxthebest; 10-01-2008 at 12:20 PM.
-
10-01-2008, 10:04 AM #2
Achievements:
- Join Date
- Aug 2008
- Posts
- 1
- QJ Pts
- 2,337
- Level
- 29
- Downloads
- 0
- Uploads
- 0
Sympa max ;)
-
10-01-2008, 10:29 AM #3
Merci :)
-
10-01-2008, 11:57 AM #4QJ Gamer Bronze
- Join Date
- Jul 2005
- Location
- Canada
- Posts
- 88
- QJ Pts
- 4,784
- Level
- 44
- Downloads
- 3
- Uploads
- 0
maxthebest:
Generally this "rolling way" is called a "rolodex" style presentation (if you ask me, and yeah I remember when rolodexes were still the iPhone/pda of the year gizmo.) See here for an example image of a now seemingly ancient (but surprisingly still not hard to find) uber desktop item.
-
10-01-2008, 12:06 PM #5NetGameOrb Maker

- Join Date
- Jan 2008
- Location
- New York
- Posts
- 683
- QJ Pts
- 6,138
- Level
- 50
- My Mood
-
- Downloads
- 2
- Uploads
- 0
maxthebest,cool thanks for giving the source code. it may be helpful for some people here.
GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.
Stats Blog:http://netgameorb.blogspot.com/
Website:http://www.netgameorb.com/
-
10-01-2008, 12:21 PM #6
-
10-01-2008, 01:03 PM #7QJ Gamer Blue
- Join Date
- Jul 2007
- Posts
- 296
- QJ Pts
- 3,795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
A few reasons why I wouldn't use this:
- There is no modularity. Everything is thrown together into one sourcefile, which, granted, will run out the box and show people how it works. However, there is not sense of being able to copy and paste the code and use it in my own project, which is the point of a library. This would be fine if it was specifically built just to make file browsing easier, but as it stands, this would be one PITA to integrate into my own project.
- Do not define pspDebugScreenPrintf() to printf(). They are not the same thing. Even concept wise they do not do the same thing. The standard C function printf() is used to print text to the Standard Output, or stdout. pspDebugScreenPrintf(), rather, is used to print debug text to the PSPs screen, in software. Not only is this slow, its name pretty much sums it up. It is part of the pspDebug library, which is used for debugging, and if you are releasing this to the public it should be far away from the beta/debug stage. (Also, no, I understand that you will always be debugging something, but you shouldn't release something that uses a debug library to the public.)
- Use snprintf() rather than sprintf(). It's safer, and takes just one extra parameter, the length of the buffer so that it does not overrun it.
- You are using the standard C file IO library in this. This may be good for portability, sure. But on the PSP speed is usually the key and it is MUCH faster to use the native librarys (sceIo*) rather than use the newlib wrappers for them.
- Holy hell, globals. Get rid of them. They are evil.
- You aren't using meaningful variable names. How should you expect someone to use this without knowing what the variables 'a', 'IRS', 'file', 'osel, 'fosel', and 'but' do?
- You should either A) Prefix your functions with a specfic, unique prefix to avoid duplicate function names, or B) Compile with g++ and use a namespace.
- You have a whole lot of hardcoded nonsense going on in the current selection and printing of the files part of your code, You should go over that and use a loop to improve readability.
- Try generating the colors manually, so that you aren't limited to the fixed amount of theme options you have there.
- Declare variables when you need them rather than at the very top of the file so you don't have you continuously scroll up to see which variable is which.
- DO NOT INCLUDE SOURCE FILES. That's what header files are for. Never, ever, ever, ever #include a .c file. Ever. Ever. Ever. Ever.
- Use consistant function names. Don't have one function called This_Is_A_Function() and another called ohheythisisalsoafunction( ). Pick one and stick to it, it will improve readability. Consistancy is always good.
Well, good luck with this. I hope you don't take any of the above personally, I'm only trying to help.
-
10-01-2008, 01:56 PM #8
Well, thanks a lot for all of this, I' taking notes of this...
But, first, it first was a personal project, so, the variables names are very understandable for me, and that's all I cared about.
I is not meant to be any kind of library, it's just a code sample I thought I wuld use, but didn't (yet), and any programer can use this in his text, as the tittle suggests, it's an open source file browser, and not a file browser library.
About the debug stuff, I think that everyone uses the debug library for printing... maybe it's not great, but it works for me... and I don't know any other ways to print text.
About including *.c files, I know it's evil, but well, it was easuer for me, and ... it works, lol
What do you mean by generating manually colors?
Anyways, thanks again, I'll try to remember that, but I have to say, about the variable names and place of declaration: I guess it depends on the programmer's choice, I feel like it's esier to have all the declarations at the same place, so, you know where to look for it.
-
10-01-2008, 02:01 PM #9QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
Globals are slower than local vars.
-
10-01-2008, 02:19 PM #10QJ Gamer Silver

- Join Date
- Jun 2006
- Location
- UK
- Posts
- 2,326
- QJ Pts
- 10,263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Not necessarily but it does help the compiler optimise better at times. There are also some rare cases where using a global over a local variable can make it run faster.
@maxthebest: The advice given is for future reference and to make you a better programmer. Some the advice such as variable naming is more to do with working with other people and making it as easy as possible to work with your code.Last edited by FreePlay; 10-01-2008 at 03:17 PM.
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
10-01-2008, 03:39 PM #11
Yeah, I understand that, and thank all of you very much for that :)
By the way, noob question: what are globals?
-
10-01-2008, 04:38 PM #12QJ Gamer Gold

- Join Date
- Jul 2005
- Location
- everywhere
- Posts
- 3,526
- QJ Pts
- 17,453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
max, globals are variables declared at the top of the scope of the program
anyways, globals are not evil when making an damn game, i can understand why their evil in a library, but if your designing a game with a few function's that rely on multiple variables, it's far easier to have a global variable which can be easily accessed from any point in the program, than to have to pass a million parameters though your function1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
10-01-2008, 09:58 PM #13
OH, okay, thanks.
Yeah, it's sometimes easier, but I'll try to do better next time :)
Thanks again :)
-
10-02-2008, 03:27 AM #14QJ Gamer Bronze
- Join Date
- Jul 2005
- Location
- Canada
- Posts
- 88
- QJ Pts
- 4,784
- Level
- 44
- Downloads
- 3
- Uploads
- 0
max, if you're like me you do what works until you find (or are taught, rather than ridiculed into) a better way ;)
A short read that I've found quite helpful and touches on a lot of the previous comments, google for the pdf of:
C & C++ Programming Style Guidelines Fred Richards
-
10-02-2008, 07:36 AM #15
Okay thanks, I'll check that out ;)
-
10-02-2008, 12:31 PM #16
globals should never be used in programs, in a library it is ok as you only use a few that you realy need as they are not visable to the software when the library is linked.
that is what you should try and keep to and is what \i try to keep to in my software, too many globals in software can cause major issues as your program grows
-
10-02-2008, 12:57 PM #17QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-
10-02-2008, 04:24 PM #18QJ Gamer Silver

- Join Date
- Jun 2006
- Location
- UK
- Posts
- 2,326
- QJ Pts
- 10,263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
10-02-2008, 05:34 PM #19NetGameOrb Maker

- Join Date
- Jan 2008
- Location
- New York
- Posts
- 683
- QJ Pts
- 6,138
- Level
- 50
- My Mood
-
- Downloads
- 2
- Uploads
- 0
yeah that good but like davee i use global for array and some int variable when it used a lot in my program like for example "file browsing". i usually update the array of file every time i search the dir. also when the user execute a file and also like in 4 or more part of my script that i can't remember right now. but passing them as parameter is also good :)
GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.
Stats Blog:http://netgameorb.blogspot.com/
Website:http://www.netgameorb.com/
-
10-03-2008, 02:47 AM #20
okay, I'll try to forget about globals, and try as often as I can not to use them.
Thanks for all those advice!
-
10-03-2008, 08:26 AM #21QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-
10-03-2008, 08:28 AM #22QJ Gamer Green
- Join Date
- Jan 2008
- Posts
- 612
- QJ Pts
- 3,721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
-
10-03-2008, 08:29 AM #23QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-
10-03-2008, 08:34 AM #24QJ Gamer Green
- Join Date
- Jan 2008
- Posts
- 612
- QJ Pts
- 3,721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Function hooks aren't commonly used it programs in this sense, but I will agree they are one use for it.
[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
10-03-2008, 08:42 AM #25QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-
10-03-2008, 10:27 AM #26
Well, I know in some cases it makes it pretty much easier to use globals, because sometimes, you're having troubles passing arrays in parameters (well, I had that kind of problem, dunno why... so I chose the easy way...)
-
10-03-2008, 11:04 AM #27
Globals should never be used in general and you can write software with zero globals, for libs you never going to make any globals if used accessible so globals in lib can in away be ok to a point.
Any one writing software knows this.
If you need a global you need to think again about your software code structure.
I admit I have used globals myself as we have all done it as it is a lazy and quick and dirty hack out of a issue of recoding stuff but if global is used must be address in some stage of development of the software.
One way you could easly solve your issue is to create a struct then pass it to a function, struct pointers
-
10-03-2008, 12:12 PM #28QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
Once again, function hooks usually require a global. Since you cannot pass vars through.
For example if you need to check a certain file is opened. You would record the return SceUID into a global. Then when it comes to reading the file you would compare the passed SceUID with the one in the global.
-
10-03-2008, 12:47 PM #29QJ Gamer Blue
- Join Date
- Jul 2007
- Posts
- 296
- QJ Pts
- 3,795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
That is almost completely PSP specific, I doubt he'll be doing anything like that on any other platform.
-
10-03-2008, 01:31 PM #30QJ Gamer Silver
- Join Date
- Sep 2006
- Location
- Perth, Scotland
- Posts
- 1,094
- QJ Pts
- 8,475
- Level
- 62
- Downloads
- 0
- Uploads
- 0


LinkBack URL
About LinkBacks
Reply With Quote

Hello all members here at QuickJump Gaming Network. How are you all doing?
Hi Everyone