Files you need
PSP Type "B" Driver - attached
PSPLink - download
This guide is for debugging your LPE programs on the fly with your psp and pc. The first thing you need to do is download and install the PSP Type "B" Driver. Once you have that done you need to download the psplink.zip, and unzip it. Inside there should be two folders, "PC" and "PSP". Go into the "PSP" folder and you should see a folder called "PSPLink", copy that into your PSP's game folder. Now go into the "PC" folder and you should see to applications "usbhostfs_pc.exe" and "pspsh.exe". First thing you want to do start up psplink on your psp and connect you psp to your computer with a usb cable, you should see this screen:
Next go back to your "PC" folder, and double click on the "usbhostfs_pc.exe" application. You should get a cmd screen pop up that should look something like this:
Now start the "pspsh.exe" application, keeping the "usbhostfs_pc.exe" window open. You should get a screen that says "host0:/>", type in ldstart LPE and press enter. You should get an error of "error: cannot open index.lua: No such file or directory" on the screen, look at your psp ;). Now its just like when you use lpe without psplink, we need to create a index.lua. Instead of making a index.lua on the psp we'll do it in the "PC" folder. Let's create a index.lua in the "PC" folder, use this code and image (hint save images as "bk.png" in the "PC" folder):
Now save it, and press start to restart. Now look at the "pspsh.exe" window and press home on your psp, you should see a 0, probably a lot of zeros (until you press home again), try pressing cross or triangle then home to see what happens. This shows how you can use PSP link to get variables on your computer, i used home because most programs wont ever use this button, so theres no harm in pressing it. The code that does this is simply print(), all you have to do is put a variable in the parenthesis. If you wish to update your script (or if it freezes), simply save it and type "reset" into the "pspsh.exe" window; that will restart it (you will need to write "ldstart lpe" again)Code:-- PSPLink Example -- By Cmbeke -- Thanks To Emcp cool = 0 img = Image.load("bk.png") function coolFunc() if pad:cross() then cool = cool + 1 end if pad:triangle() then cool = cool - 1 end if pad:home() then print(cool) end end while true do pad = Controls.read() System.draw() screen:clear() screen:blit(0,0, img) coolFunc() System.endDraw() screen:flip() end
Now the zip I included has LPEv8, I'm guessing that there will be plenty of updates to LPE, so i will tell you how to update this your self. First you need a program that can extract the data.psp from the LPE eboot, I use pbp-unpacker. Extract that and copy that to your "PC" folder. When you go to start up "pspsh.exe" instead of typing ldstart lpe, write ldstart data.psp.
That ends this tutotrial, if you have any questions please ask them here. Hope this helped.