forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Homebrew - External files?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jun 26, 2006 10:17 am    Post subject: Homebrew - External files? Reply with quote

I'm new at this so I don't know the inner workings yet, but one thing just struck me. How do you access external files/models/textures etc in ps2 homebrew using ps2link?(Or naplink even)

I have a modded ps2, am I right in thinking once you require external media you have to either A) pack them in the source like on a gba etc or B) Start burning your game and media to cd every time and running directly?

I can do either without problem, I'd just rather know for sure I'm using the best method everyone else is.
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Jun 26, 2006 10:23 am    Post subject: Reply with quote

ps2link provides this nifty 'host0' filesystem, which lets you read files from your pc
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jun 26, 2006 10:58 am    Post subject: Reply with quote

Very nice, I wasn't looking forward to burning a game every build.

Know how it compares to reading from a dvd drive speed wise? I heard pslink transmits at 100mbs so I guess pretty good? (Said the bloke who had no idea at what speed a dvd is read)
Back to top
View user's profile Send private message
jbit
Site Admin


Joined: 28 May 2005
Posts: 293
Location: København, Danmark

PostPosted: Mon Jun 26, 2006 12:08 pm    Post subject: Reply with quote

The PS2 ethernet hardware is 100mbps. But the PS2 IP stack is very slow and unoptimized at the moment, you're lucky if you see 5-10mbit/sec.
And ontop of that "host:" is still a bit flakey, music will skip when streaming audio for example.
Some of us are in the process of fixing the PS2 IP stack, so it should get better in the future.
But for now, I wouldn't expect any decent speed out of the "host:" filesystem.
Back to top
View user's profile Send private message Visit poster's website
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Jun 26, 2006 12:32 pm    Post subject: Reply with quote

In the majority of cases you are likely to hit anytime soon, it should be 'good enough' ...

The main thing to keep in mind is to be smart about things; probably the biggest no-no to avoid is doing lots of small reads. Doing lots of small reads is horribly slow.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jun 26, 2006 12:40 pm    Post subject: Reply with quote

yeah it should be enough, I'm just learning at the moment so I don't expect to be greating 50gb games with a hundred levels.
Just very cool that I can stream data if needed.


jbit, expect to gain any big speed increases with your IP stack fix or will it just be more consistant? (I'm guessing it stalls based on his no small reads comment)
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jun 26, 2006 1:09 pm    Post subject: Reply with quote

Btw, Drakonite is there any special way of reading the host 'drive' or is it does it integerate as the local dir?

I.e would I do,

blah = fopen("Somefile.txt");

or

blah = fopen("host:\somefile.txt")

or a 3rd option?

Sorry if it's a dumb question :)
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Jun 26, 2006 9:26 pm    Post subject: Reply with quote

blah = fopen("host:somefile.txt");
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jun 26, 2006 11:47 pm    Post subject: Reply with quote

Ta.

Good work on ps2link btw. I can't believe I've had a ps2 for over a year and only just now discovered your program as means to do homebrew.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Wed Jun 28, 2006 8:05 pm    Post subject: Use the files Luke, the files. Reply with quote

Hey drak is it possible to write a file on the pc side as well?

I mean what would happen if I did something like (And the code will be wrong, I've been using C# for too long) fwrite("host:screenshot.raw")

could I then dump the screenbuffer pc side?

If not I suggest adding it please :) I think it would be a great feature for those of us without screen captures etc.
Back to top
View user's profile Send private message
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Wed Jun 28, 2006 8:17 pm    Post subject: Reply with quote

That's entirely possible. Not only that, but there is a debug.h floating around in the sdk somewhere which contains a function to dump the screen buffer to a tga file.. which for me usually is "host:sshot.tga".
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Wed Jun 28, 2006 11:16 pm    Post subject: Reply with quote

nice, shame the connection isn't 100mbs then we could do caching etc on the hd, open up the possiblities for deus ex style games.(Best game ever made by a man not called Hideo Kojima)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> General Discussion All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group