usb

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
outtony
Posts: 26
Joined: Thu Oct 13, 2005 2:46 am
Location: Slovakia
Contact:

usb

Post by outtony »

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
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: usb

Post by Shine »

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 :-)
User avatar
outtony
Posts: 26
Joined: Thu Oct 13, 2005 2:46 am
Location: Slovakia
Contact:

Re: usb

Post by outtony »

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
f_bohmann
Posts: 16
Joined: Mon May 02, 2005 7:15 pm
Location: hamburg, germany

Post by f_bohmann »

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
User avatar
outtony
Posts: 26
Joined: Thu Oct 13, 2005 2:46 am
Location: Slovakia
Contact:

Post by outtony »

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
memon
Posts: 63
Joined: Mon Oct 03, 2005 10:51 pm

Post by memon »

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 :)
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
User avatar
outtony
Posts: 26
Joined: Thu Oct 13, 2005 2:46 am
Location: Slovakia
Contact:

Post by outtony »

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
User avatar
outtony
Posts: 26
Joined: Thu Oct 13, 2005 2:46 am
Location: Slovakia
Contact:

Post by outtony »

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
PspPet
Posts: 210
Joined: Wed Mar 30, 2005 2:13 am
Contact:

Post by PspPet »

> 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.
Post Reply