System.usbDiskModeActivate() ?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
KawaGeo
Posts: 191
Joined: Sat Aug 27, 2005 6:52 am
Location: Calif Mountains

System.usbDiskModeActivate() ?

Post by KawaGeo »

What is the real purpose of using the functions, System.usbDiskModeActivate() and System.usbDiskModeDeactivate()?

Should I leave either one upon the final release?

During development, I sometimes got corrupted folders on memory stick. I had to reformat it. Will one of those functions help to prevent the mishaps?

Thanks
Geo Massar
Retired Engineer
psiko_scweek
Posts: 42
Joined: Sat Nov 12, 2005 2:30 am

as far as iknow

Post by psiko_scweek »

as far as i know, the USB mode activate command is used for easier debugging of the code as it puts the PSP in USB mode while the Lua script is running, making it easier to fix code, press start (if break is set for start) and see the changes immediately. about the corrupt folder things, i think there is something about not writing to the memory stick from within Lua while in USB mode or it will require formatting the card, so removing the USB mode code should fixt that problem!

regards,
PSIKO

[edit: fixed spelling errors, some of em anyways]
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Well, Ive found out that:
you cannot write to a file while USB mode is enabled and a cord is plugged

if you are writing from the computer to the PSP WHILE the PSP is writing a file, the file the PSP writes becomes corrupt. And even though everything will still work the way it should, you cannot delete the file or its parent folders

I hope this helps.
psyberjock
Posts: 28
Joined: Fri Dec 15, 2006 10:26 pm

Post by psyberjock »

You can always scandisk it in windows. That's what I do if I accidentally unplug the USB too fast after a transfer. It fixes the bad files then you can delete them or recopy or whatever.
bolk
Posts: 10
Joined: Sun Jan 07, 2007 2:09 am

Post by bolk »

It's very useful feature! I wrote file manager with usb support.
the underminer
Posts: 123
Joined: Mon Oct 03, 2005 4:25 am
Location: Netherlands

Post by the underminer »

I'm having this corruption problem a lot. Either happens:

1. I have to save my script twice each time I change the code
2. I have to delete the file with windows and save it again
3. I have to backup and reformat the stick to make it work again.

By the way, wich IDE do we all use? I myself use QDE; has a very handy autocomplete function; wich also works for variables/functions.

Disadvantage: crashes on startup when psp not connected (wich holds the last edited project, is thus not accessible and the program chrashes)
Backups are placed in the project folder; wich must be on psp. (When your memstick totally corrupts you lose everything; never happened to me)

Tested Zeus too, not very handy autocomplete
Behold! The Underminer got hold of a PSP
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

I use ConTEXT. I had used it for programming Java at my university so I already had it. Just downloaded a LUA syntax file for it. Doesn't have auto completion. Just highlights stuff, but it looks nice I think. Never bothered to look for anything else.
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

Notepad only for me. I find simplicitiy is a better way to program.
PSPJunkie
Posts: 14
Joined: Tue Jan 23, 2007 12:55 pm
Location: Jersey
Contact:

Post by PSPJunkie »

get notepad++, best text editor for windows ive ever seen.
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

I don't need it. If I wanted a better Text Editor I would have downloaded one by now.
Post Reply