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 

usb

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
outtony



Joined: 13 Oct 2005
Posts: 26
Location: Slovakia

PostPosted: Mon Nov 21, 2005 11:11 pm    Post subject: usb Reply with quote

hi there,
i have tested usb connection (usbstorage sample)
well, the strange thing is, that i am modifing file on card (added some code to sample), but via usb connection there's still old data...

any ideas?
_________________
-----------------------------
Tony

www.n3.sk
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Mon Nov 21, 2005 11:58 pm    Post subject: Re: usb Reply with quote

Windows caches USB harddisks, because it doesn't expect that the data is changed from other sources, so you have to deactivate and reactivate the USB connection to force Windows to reload the FAT etc.

Note: Accessing the memory stick from PC and PSP programs at the same time is a good technique to corrupt your memory stick filesystem :-)
Back to top
View user's profile Send private message
outtony



Joined: 13 Oct 2005
Posts: 26
Location: Slovakia

PostPosted: Tue Nov 22, 2005 12:00 am    Post subject: Re: usb Reply with quote

Shine wrote:
Windows caches USB harddisks, because it doesn't expect that the data is changed from other sources, so you have to deactivate and reactivate the USB connection to force Windows to reload the FAT etc.


uh, thanks. That's not good news ;-)
_________________
-----------------------------
Tony

www.n3.sk
Back to top
View user's profile Send private message Send e-mail Visit poster's website
f_bohmann



Joined: 02 May 2005
Posts: 16
Location: hamburg, germany

PostPosted: Tue Nov 22, 2005 12:16 am    Post subject: Reply with quote

my current setup enables usb when i launch my program (to upload new builds etc), and when i need to write something to the memcard from the psp (screenshots or something) i disable usb, write the stuff and then reenable usb. works flawlessly.

f
Back to top
View user's profile Send private message
outtony



Joined: 13 Oct 2005
Posts: 26
Location: Slovakia

PostPosted: Tue Nov 22, 2005 12:19 am    Post subject: Reply with quote

f_bohmann wrote:
my current setup enables usb when i launch my program (to upload new builds etc), and when i need to write something to the memcard from the psp (screenshots or something) i disable usb, write the stuff and then reenable usb. works flawlessly.

f



heh, it's slow as a hell :)
i need fast access to PC
_________________
-----------------------------
Tony

www.n3.sk
Back to top
View user's profile Send private message Send e-mail Visit poster's website
memon



Joined: 03 Oct 2005
Posts: 63

PostPosted: Tue Nov 22, 2005 7:06 am    Post subject: Reply with quote

Some computer also allow to disable the write cache. In win2k you can find that by right clicking on the drive, choose Properties. From there go to the Hardware tab, press on the Properties button and there select the Disk Properties tab. There you can find Write Cache Enable check box. On my computer it does not work with PSP though, but for some people it works :)
Back to top
View user's profile Send private message
ector



Joined: 12 May 2005
Posts: 195

PostPosted: Tue Nov 22, 2005 7:32 am    Post subject: Reply with quote

WinXP does not cache USB "disks" by default, so if you're having problems you're probably still on 2K :)

I'd recommend an upgrade and then turning off all useless eyecandy. Stripped XP is better than 2K in every way.
_________________
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Nov 22, 2005 11:12 am    Post subject: Reply with quote

Windows XP puts a little icon in the lower right part of the screen whenever you plug in a hot-pluggable drive (USB floppy, pen drive, etc). When you wish to remove a hot-plug drive, you have to go click on that icon and select the device you are planning to remove. This tells Windows to flush the damn buffers to the device. It will put up a little balloon saying it is safe to remove the device once it's done. ONLY THEN should you remove the pen drive.
Back to top
View user's profile Send private message AIM Address
outtony



Joined: 13 Oct 2005
Posts: 26
Location: Slovakia

PostPosted: Tue Nov 22, 2005 6:20 pm    Post subject: Reply with quote

ector wrote:
WinXP does not cache USB "disks" by default, so if you're having problems you're probably still on 2K :)

I'd recommend an upgrade and then turning off all useless eyecandy. Stripped XP is better than 2K in every way.


well, i have xp :)
_________________
-----------------------------
Tony

www.n3.sk
Back to top
View user's profile Send private message Send e-mail Visit poster's website
outtony



Joined: 13 Oct 2005
Posts: 26
Location: Slovakia

PostPosted: Tue Nov 22, 2005 6:29 pm    Post subject: Reply with quote

memon wrote:
Some computer also allow to disable the write cache. In win2k you can find that by right clicking on the drive, choose Properties. From there go to the Hardware tab, press on the Properties button and there select the Disk Properties tab. There you can find Write Cache Enable check box. On my computer it does not work with PSP though, but for some people it works :)


there's no "Write Cache Enable check box"
but thanks anyway
_________________
-----------------------------
Tony

www.n3.sk
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Wed Nov 23, 2005 2:31 am    Post subject: Reply with quote

> there's no "Write Cache Enable check box"
FWIW: it moved under WinXP
Find the proper device, open Properties, and look for "Policies"
Check to make sure it says "optimize for quick removal"
As mentioned this should be the default for USB deices.

NOTE: this won't fix all scenarios -- even if write caching is disabled, it may still cache reads.
There are other tricks possible to make the shared file scenario happen (eg: write to a new file all the time, or append, or do something else to force the PC to reload from the USB drive). If speed and low latency is required, you'll need to do some experimentation to see what works fastest for your setup.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development 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