| View previous topic :: View next topic |
| Author |
Message |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Mon Jun 26, 2006 10:17 am Post subject: Homebrew - External files? |
|
|
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 |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Mon Jun 26, 2006 10:23 am Post subject: |
|
|
ps2link provides this nifty 'host0' filesystem, which lets you read files from your pc _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Mon Jun 26, 2006 10:58 am Post subject: |
|
|
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 |
|
 |
jbit Site Admin

Joined: 28 May 2005 Posts: 293 Location: København, Danmark
|
Posted: Mon Jun 26, 2006 12:08 pm Post subject: |
|
|
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 |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Mon Jun 26, 2006 12:32 pm Post subject: |
|
|
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 |
|
 |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Mon Jun 26, 2006 12:40 pm Post subject: |
|
|
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 |
|
 |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Mon Jun 26, 2006 1:09 pm Post subject: |
|
|
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 |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Mon Jun 26, 2006 9:26 pm Post subject: |
|
|
blah = fopen("host:somefile.txt"); _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Mon Jun 26, 2006 11:47 pm Post subject: |
|
|
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 |
|
 |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Wed Jun 28, 2006 8:05 pm Post subject: Use the files Luke, the files. |
|
|
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 |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Wed Jun 28, 2006 8:17 pm Post subject: |
|
|
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 |
|
 |
Kojima
Joined: 26 Jun 2006 Posts: 275
|
Posted: Wed Jun 28, 2006 11:16 pm Post subject: |
|
|
| 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 |
|
 |
|