mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
partially revived platform support for PSP (unfinished) #2
scaling, release generation, fixes still not planning to make this officially supported.
This commit is contained in:
parent
cdc6aac4c0
commit
6c5784f07f
13 changed files with 129 additions and 93 deletions
|
@ -1227,6 +1227,7 @@ void emu_cmn_forced_frame(int no_scale, int do_emu)
|
|||
PicoIn.opt |= POPT_EN_SOFTSCALE;
|
||||
|
||||
PicoDrawSetOutFormat(PDF_RGB555, 1);
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_ppitch * 2);
|
||||
Pico.m.dirtyPal = 1;
|
||||
Pico.est.rendstatus |= PDRAW_DIRTY_SPRITES;
|
||||
if (do_emu)
|
||||
|
|
|
@ -126,6 +126,20 @@ static void make_bg(int no_scale)
|
|||
menu_darken_bg(dst, src, w, 1);
|
||||
}
|
||||
|
||||
static void copy_bg(int dir)
|
||||
{
|
||||
unsigned short *bg = (void *)g_menubg_ptr;
|
||||
unsigned short *sc = (void *)g_menuscreen_ptr;
|
||||
int h = g_menuscreen_h;
|
||||
|
||||
for (; h > 0; sc += g_menuscreen_pp, bg += g_menuscreen_w, h--) {
|
||||
if (dir)
|
||||
memcpy(bg, sc, g_menuscreen_w * 2);
|
||||
else
|
||||
memcpy(sc, bg, g_menuscreen_w * 2);
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_enter(int is_rom_loaded)
|
||||
{
|
||||
if (is_rom_loaded)
|
||||
|
@ -182,7 +196,7 @@ static void load_progress_cb(int percent)
|
|||
len = g_menuscreen_w;
|
||||
|
||||
menu_draw_begin(0, 1);
|
||||
memcpy(g_menuscreen_ptr, g_menubg_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
copy_bg(0);
|
||||
dst = (unsigned short *)g_menuscreen_ptr + g_menuscreen_pp * me_sfont_h * 2;
|
||||
for (ln = me_sfont_h - 2; ln > 0; ln--, dst += g_menuscreen_pp)
|
||||
memset(dst, 0xff, len * 2);
|
||||
|
@ -197,7 +211,7 @@ static void cdload_progress_cb(const char *fname, int percent)
|
|||
menu_draw_begin(0, 1);
|
||||
dst = (unsigned short *)g_menuscreen_ptr + g_menuscreen_pp * me_sfont_h * 2;
|
||||
|
||||
memcpy(g_menuscreen_ptr, g_menubg_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
copy_bg(0);
|
||||
menuscreen_memset_lines(dst, 0xff, me_sfont_h - 2);
|
||||
|
||||
smalltext_out16(1, 3 * me_sfont_h, "Processing CD image / MP3s", 0xffff);
|
||||
|
@ -224,8 +238,8 @@ void menu_romload_prepare(const char *rom_name)
|
|||
menu_draw_begin(1, 1);
|
||||
smalltext_out16(1, 1, "Loading", 0xffff);
|
||||
smalltext_out16(1, me_sfont_h, p, 0xffff);
|
||||
/* background screen for callbacks */
|
||||
memcpy(g_menubg_ptr, g_menuscreen_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
/* copy menu to bg for callbacks. OK since we are not in menu_loop here */
|
||||
copy_bg(1);
|
||||
menu_draw_end();
|
||||
|
||||
PicoCartLoadProgressCB = load_progress_cb;
|
||||
|
@ -239,7 +253,7 @@ void menu_romload_end(void)
|
|||
PicoCDLoadProgressCB = NULL;
|
||||
|
||||
menu_draw_begin(0, 1);
|
||||
memcpy(g_menuscreen_ptr, g_menubg_ptr, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
copy_bg(0);
|
||||
smalltext_out16(1, (cdload_called ? 6 : 3) * me_sfont_h,
|
||||
"Starting emulation...", 0xffff);
|
||||
menu_draw_end();
|
||||
|
|
|
@ -66,6 +66,7 @@ typedef enum
|
|||
MA_OPT3_SCALE, /* psp (all OPT3) */
|
||||
MA_OPT3_HSCALE32,
|
||||
MA_OPT3_HSCALE40,
|
||||
MA_OPT3_GAMMAA,
|
||||
MA_OPT3_PRES_NOSCALE,
|
||||
MA_OPT3_PRES_SCALE43,
|
||||
MA_OPT3_PRES_FULLSCR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue