If you are running a custom firmware, just copy the whole PicoDrive directory to\r
/PSP/GAME or /PSP/GAMEXXX directory in your memory stick (it shouldn't matter\r
which one GAME* directory to use).\r
-\r
-If you are on 1.5, there is a separate KXploited version for it.\r
#endif\r
#ifdef PANDORA\r
Just copy the .pnd to <sd card>/pandora/menu or <sd card>/pandora/desktop.\r
endif\r
endif\r
\r
+include ../../config.mak\r
+\r
+#PSPSDK ?= $(shell psp-config --pspsdk-path)\r
+#include $(PSPSDK)/lib/build.mak\r
+\r
+#PSP_EBOOT_TITLE = PicoDrive\r
+#PSP_EBOOT_ICON = data/icon.png\r
+\r
+#EBOOT.PBP:\r
+\r
../../tools/textfilter: ../../tools/textfilter.c\r
make -C ../../tools/ textfilter\r
\r
readme.txt: ../../tools/textfilter ../base_readme.txt ../../ChangeLog\r
../../tools/textfilter ../base_readme.txt $@ PSP\r
\r
-# ?\r
rel: ../../EBOOT.PBP readme.txt ../game_def.cfg\r
- mkdir -p PicoDrive/skin/\r
- cp $^ PicoDrive/\r
- cp skin/* PicoDrive/skin/\r
- zip -9 -r ../../PicoDrive_psp_$(VER).zip PicoDrive\r
- rm -rf PicoDrive\r
- mkdir bin_to_cso_mp3\r
- cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/\r
- zip -9 -r ../../PicoDrive_psp_$(VER).zip bin_to_cso_mp3\r
- rm -rf bin_to_cso_mp3\r
-\r
-rel_kxploit: readme.txt ../game_def.cfg\r
- mkdir -p PicoDrive/skin/\r
- cp $^ PicoDrive/\r
- cp skin/* PicoDrive/skin/\r
- zip -9 -r ../../PicoDrive_psp_$(VER)_kxploit.zip PicoDrive\r
- zip -9 -r ../../PicoDrive_psp_$(VER)_kxploit.zip PicoDrive%\r
- mkdir bin_to_cso_mp3\r
- cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/\r
- zip -9 -r ../../PicoDrive_psp_$(VER)_kxploit.zip bin_to_cso_mp3\r
- rm -rf bin_to_cso_mp3\r
-\r
+ mkdir -p out/PicoDrive/skin/ out/bin_to_cso_mp3\r
+ cp $^ out/PicoDrive/\r
+ cp ../../skin/* out/PicoDrive/skin/\r
+ #mkdir -p out/bin_to_cso_mp3\r
+ #cp ../../tools/bin_to_cso_mp3/* out/bin_to_cso_mp3/\r
+ cd out && zip -9 -r ../../../PicoDrive_psp_$(VER).zip *\r
+ rm -rf out\r
/* display a completed frame buffer and prepare a new render buffer */
void plat_video_flip(void)
{
- int offs = (psp_screen == VRAM_FB0) ? VRAMOFFS_FB0 : VRAMOFFS_FB1;
+ unsigned long offs;
g_menubg_src_ptr = psp_screen;
sceGuSync(0, 0); // sync with prev
- psp_video_flip(currentConfig.EmuOpt & EOPT_VSYNC, 0);
+ psp_video_flip(currentConfig.EmuOpt & EOPT_VSYNC);
+ offs = (unsigned long)psp_screen - VRAM_ADDR; // back buffer offset
sceGuStart(GU_DIRECT, guCmdList);
- sceGuDrawBuffer(GU_PSM_5650, (void *)offs, 512); // point to back buffer
+ sceGuDrawBuffer(GU_PSM_5650, (void *)offs, 512);
sceGuClearColor(0);
sceGuClearDepth(0);
sceGuClear(GU_COLOR_BUFFER_BIT | GU_DEPTH_BUFFER_BIT);
sceGuFinish();
- g_screen_ptr = VRAM_CACHED_STUFF + (psp_screen - VRAM_FB0);
+ g_screen_ptr = VRAM_CACHED_STUFF + offs;
plat_video_set_buffer(g_screen_ptr);
}
/* switch from emulation display to menu display */
void plat_video_menu_enter(int is_rom_loaded)
{
+ g_screen_ptr = NULL;
}
/* start rendering a menu screen */
void plat_video_menu_end(void)
{
g_menuscreen_ptr = NULL;
- psp_video_flip(1, 0);
+ psp_video_flip(1);
}
/* terminate menu display */
unsigned int __attribute__((aligned(16))) guCmdList[GU_CMDLIST_SIZE];
-void *psp_screen = VRAM_FB0;
-
-static int current_screen = 0; /* front bufer */
+void *psp_screen = VRAM_FB0; /* back buffer */
static SceUID main_thread_id = -1;
/* video */
sceDisplaySetMode(0, 480, 272);
sceDisplaySetFrameBuf(VRAM_FB1, 512, PSP_DISPLAY_PIXEL_FORMAT_565, PSP_DISPLAY_SETBUF_NEXTFRAME);
- current_screen = 1;
psp_screen = VRAM_FB0;
/* gu */
sceKernelExitGame();
}
-void psp_video_flip(int wait_vsync, int other)
+void psp_video_flip(int wait_vsync)
{
- unsigned long fb = (unsigned long)psp_screen & ~0x40000000;
- if (other) fb ^= 0x44000;
if (wait_vsync) sceDisplayWaitVblankStart();
- sceDisplaySetFrameBuf((void *)fb, 512, PSP_DISPLAY_PIXEL_FORMAT_565,
+ sceDisplaySetFrameBuf(psp_screen, 512, PSP_DISPLAY_PIXEL_FORMAT_565,
PSP_DISPLAY_SETBUF_IMMEDIATE);
- current_screen ^= 1;
- psp_screen = current_screen ? VRAM_FB0 : VRAM_FB1;
+ psp_screen = (void *)((unsigned long)psp_screen ^ (VRAMOFFS_FB1 ^ VRAMOFFS_FB0));
}
void *psp_video_get_active_fb(void)
{
- return current_screen ? VRAM_FB1 : VRAM_FB0;
-}
-
-void psp_video_switch_to_single(void)
-{
- psp_screen = VRAM_FB0;
- sceDisplaySetFrameBuf(psp_screen, 512, PSP_DISPLAY_PIXEL_FORMAT_565, PSP_DISPLAY_SETBUF_NEXTFRAME);
- current_screen = 0;
+ return (void *)((unsigned long)psp_screen ^ (VRAMOFFS_FB1 ^ VRAMOFFS_FB0));
}
void psp_msleep(int ms)
#define VRAMOFFS_DEPTH 0x00088000
#define VRAMOFFS_STUFF 0x000cc000
-#define VRAM_FB0 ((void *) (0x44000000+VRAMOFFS_FB0))
-#define VRAM_FB1 ((void *) (0x44000000+VRAMOFFS_FB1))
-#define VRAM_STUFF ((void *) (0x44000000+VRAMOFFS_STUFF))
+#define VRAM_ADDR 0x44000000
+#define VRAM_FB0 ((void *) (VRAM_ADDR+VRAMOFFS_FB0))
+#define VRAM_FB1 ((void *) (VRAM_ADDR+VRAMOFFS_FB1))
+#define VRAM_STUFF ((void *) (VRAM_ADDR+VRAMOFFS_STUFF))
-#define VRAM_CACHED_STUFF ((void *) (0x04000000+VRAMOFFS_STUFF))
+#define VRAM_CACHEDADDR 0x04000000
+#define VRAM_CACHED_STUFF ((void *) (VRAM_CACHEDADDR+VRAMOFFS_STUFF))
#define GU_CMDLIST_SIZE (16*1024)
void *psp_video_get_active_fb(void);
void psp_video_switch_to_single(void);
-void psp_video_flip(int wait_vsync, int other);
+void psp_video_flip(int wait_vsync);
extern void *psp_screen;
unsigned int psp_pad_read(int blocking);