Code: Select all
#include <pspdisplay.h>
#include <pspctrl.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspgu.h>
#include <png.h>
#include <stdio.h>
#include "graphics.h"
#include <pspsdk.h>
#include <pspctrl.h>
#include <psploadexec_kernel.h>
#include <pspusb.h>
PSP_MODULE_INFO("Camera", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
int main()
{
pspDebugScreenInit();
initGraphics();
pspSdkLoadStartModule("flash0:/kn/usbacc.prx", PSP_MEMORY_PARTITION_KERNEL);
pspSdkLoadStartModule("flash0:/kn/usbcam.prx", PSP_MEMORY_PARTITION_KERNEL);
pspSdkLoadStartModule("flash0:/vsh/nodule/camera_plugin.prx", PSP_MEMORY_PARTITION_KERNEL);
while(1)
{
if (sceUsbStart("USBBusDriver", 0, 0) )
{
printTextScreen(30,30, "Loading of USBBus driver failed!", 0xFFFFFF);
}
if (sceUsbStart("USBAccBaseDriver", 0, 0))
{
printTextScreen(30,40, "Loading of USBAccBaseDriver failed!", 0xFFFFFF);
}
if (sceUsbStart("USBCamDriver", 0, 0) )
{
printTextScreen(30,50, "Loading of CamDriver driver failed!", 0xFFFFFF);
}
if (sceUsbStart("USBCamMicDriver", 0, 0))
{
printTextScreen(30,60, "Loading of USBCamMicDriver failed!", 0xFFFFFF);
}
flipScreen();
sceKernelSleepThread();
}
}
Code: Select all
TARGET = Camera
OBJS = main.o graphics.o framebuffer.o
YOURLIBS=
INCDIR =
CFLAGS = -G4 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
STDLIBS= -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm-lpng -lz -lpspsdk -lpspctrl -lpspumd -lpspusb
LIBS=$(STDLIBS)$(YOURLIBS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Camera
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak