Both the psp have the 3.90 M33.
The PRX that I have inserted was only an example to understand whether to make to go it on slim, the true prx that I would like to do it is this (don't run in slim):
Code: Select all
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <psprtc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <kubridge.h>
#include "main.h"
PSP_MODULE_INFO("video", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
SceUID main_thid;
int pspDveMgrCheckVideoOut();
int pspDveMgrSetVideoOut(int, int, int, int, int, int, int);
int threadMain(void)
{
	SceCtrlData pad;
	int cable, i, u, width, height, displaymode;
	u32 *vram; 
	u64 tick;
	SceKernelUtilsMt19937Context ctx;
	while (1)
	{
		sceCtrlReadBufferPositive(&pad, 1);
		if (pad.Buttons & PSP_CTRL_SELECT)
		{
				if (pspSdkLoadStartModule("dvemgr.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
					{
					   sceKernelExitGame();
					}
			
            cable = pspDveMgrCheckVideoOut();
	        if (cable == 0)
	        {
		       while (cable == 0)
		       {
			         sceKernelDelayThread(10000);
                     cable = pspDveMgrCheckVideoOut();			
               }
            }
	        if (cable != 1 && cable != 2)
	        {
         		sceKernelExitGame();
            }
	        sceKernelDelayThread(5*1000*1000);
	        if (cable == 1) // composite, sdtv
	        {
		              u = 2;
		              width = 720;
		              height = 503;
		              displaymode = 0x1D1;
            }
	        else // 2, component, (and probably d-terminal too)
	        {
		         u = 0;
		         width = 720;
		         height = 480;
		         displaymode = 0x1D2;
            }
    sceRtcGetCurrentTick(&tick);
	sceKernelUtilsMt19937Init(&ctx, (u32)tick);
	vram = (u32 *)(0x40000000 | (u32)sceGeEdramGetAddr());
	
	pspDveMgrSetVideoOut(u, displaymode, width, height, 1, 15, 0);
	sceDisplaySetFrameBuf(vram, 1024, PSP_DISPLAY_PIXEL_FORMAT_8888, 1);			
			
	while (1)
	{			
		sceDisplayWaitVblankStart();
		sceKernelDelayThread(500000);
	}
    }//End if premi SELECT
    } //End while
    return 0;
}
int module_start(SceSize args, void *argp)
{
	main_thid = sceKernelCreateThread("video_main", threadMain, 6, 0x4000, 0, NULL);
	if(main_thid >= 0) sceKernelStartThread(main_thid, args, argp);
	return 0;
	sceKernelExitDeleteThread(0);
}
int module_stop(SceSize args, void *argp)
{
	return 0;
}
Make:
Code: Select all
TARGET = gamevideo
OBJS = main.o pspDveManager.o
BUILD_PRX=1
CFLAGS = -Os -G0 -Wall -fno-strict-aliasing -fno-builtin-printf
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
INCDIR = ../include
LIBDIR = ../lib
LDFLAGS = -mno-crt0 -nostartfiles
LIBS = -lpspkubridge -lpspsysmem_kernel -lpspsystemctrl_kernel -lpsprtc
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak