krosk escribió:No es necesario modificar el hard de la psp, con eso apuesto mi vida, y no te lo digo como desconociendo el tema:
/*
* PSPGROOVE
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPGROOVE root for details.
*
* main.c - PSPGROOVE Main code
*
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspkdebug.h>
#include <pspsdk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pspusb.h>
#include <pspusbbus.h>
#include "pspgroove.h"
int psplinkSetK1(int k1);
PSP_MODULE_INFO(MODULE_NAME, PSP_MODULE_KERNEL, 1, 1);
/* Main USB event flags */
enum UsbEvents
{
USB_EVENT_ATTACH = 1,
USB_EVENT_DETACH = 2,
USB_EVENT_ASYNC = 4,
USB_EVENT_CONNECT = 8,
USB_EVENT_ALL = 0xFFFFFFFF
};
/* USB transfer event flags */
enum UsbTransEvents
{
USB_TRANSEVENT_BULKOUT_DONE = 1,
USB_TRANSEVENT_BULKIN_DONE = 2,
};
/* Main USB thread id */
static SceUID g_thid = -1;
/* Main USB event flag */
static SceUID g_mainevent = -1;
/* Main USB transfer event flag */
static SceUID g_transevent = -1;
/* Asynchronous input event flag */
static SceUID g_asyncevent = -1;
/* Main USB semaphore */
static SceUID g_mainsema = -1;
/* Static bulkin request structure */
static struct UsbdDeviceReq g_bulkin_req;
...
/* HI-Speed device descriptor */
struct DeviceDescriptor devdesc_hi =
{
.bLength = 12,
.bDescriptorType = 0x01,
.bcdUSB = 0x200,
.bDeviceClass = 9,
.bDeviceSubClass = 0,
.bDeviceProtocol = 1,
.bMaxPacketSize = 8,
.idVendor = 0,
.idProduct = 0xCCCC,
.bcdDevice = 0x100,
.iManufacturer = 0,
.iProduct = 0,
.iSerialNumber = 0,
.bNumConfigurations = 1
};
/* Hi-Speed configuration descriptor */
struct ConfigDescriptor confdesc_hi =
{
.bLength = 9,
.bDescriptorType = 2,
.wTotalLength = 0x19,
.bNumInterfaces = 1,
.bConfigurationValue = 1,
.iConfiguration = 0x01,
.bmAttributes = 0xE0,
.bMaxPower = 0
};
/* Hi-Speed interface descriptor */
struct InterfaceDescriptor interdesc_hi =
{
.bLength = 9,
.bDescriptorType = 4,
.bInterfaceNumber = 0,
.bAlternateSetting = 0,
.bNumEndpoints = 1,
.bInterfaceClass = 0x09,
.bInterfaceSubClass = 0,
.bInterfaceProtocol = 0,
.iInterface = 0
};
/* Hi-Speed endpoint descriptors */
struct EndpointDescriptor endpdesc_hi =
{
.bLength = 7,
.bDescriptorType = 5,
.bEndpointAddress = 0x81,
.bmAttributes = 3,
.wMaxPacketSize = 1,
.bInterval = 0x0c
};
...
int start_func(int size, void *p)
{
int ret;
/* Fill in the descriptor tables */
memset(usbdata, 0, sizeof(usbdata));
memcpy(usbdata[0].devdesc, &devdesc_hi, sizeof(devdesc_hi));
usbdata[0].config.pconfdesc = &usbdata[0].confdesc;
usbdata[0].config.pinterfaces = &usbdata[0].interfaces;
usbdata[0].config.pinterdesc = &usbdata[0].interdesc;
usbdata[0].config.pendp = usbdata[0].endp;
memcpy(usbdata[0].confdesc.desc, &confdesc_hi, sizeof(confdesc_hi));
usbdata[0].confdesc.pinterfaces = &usbdata[0].interfaces;
usbdata[0].interfaces.pinterdesc[0] = &usbdata[0].interdesc;
usbdata[0].interfaces.intcount = 1;
memcpy(usbdata[0].interdesc.desc, &interdesc_hi, sizeof(interdesc_hi));
usbdata[0].interdesc.pendp = usbdata[0].endp;
Aquí yo veo como cambia la descripción del dispositivo USB
Lo que se necesitará, obviamente, es una PSP con CFW, HBL no sirve porque esto necesita acceso kernel.