Add a 2x by 3x line3x mode for the PSP's 480x272.

Temporary commit, I don't want people to use this mode until I can
implement 3x by 3x line3x.
This commit is contained in:
Russell Harmon 2020-06-14 09:54:14 +00:00
parent c2b0687e7b
commit 2995f43728
4 changed files with 8443 additions and 8561 deletions

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ static const char *l5_fmt_desc[] = { "1920x1080", "1600x1200", "1920x1200" };
static const char *pm_240p_desc[] = { LNG("Passthru","パススルー"), "Line2x", "Line3x", "Line4x", "Line5x" };
static const char *pm_480i_desc[] = { LNG("Passthru","パススルー"), "Line2x (bob)", "Line3x (laced)", "Line4x (bob)" };
static const char *pm_384p_desc[] = { LNG("Passthru","パススルー"), "Line2x", "Line2x 240x360", "Line3x 240x360", "Line3x Generic" };
static const char *pm_480p_desc[] = { LNG("Passthru","パススルー"), "Line2x" };
static const char *pm_480p_desc[] = { LNG("Passthru","パススルー"), "Line2x", "Line3x 480x272" };
static const char *pm_1080i_desc[] = { LNG("Passthru","パススルー"), "Line2x (bob)" };
static const char *ar_256col_desc[] = { "4:3", "8:7" };
static const char *tx_mode_desc[] = { "HDMI (RGB)", "HDMI (YCbCr444)", "DVI" };

View File

@ -91,8 +91,9 @@ alt_8 get_mode_id(alt_u32 totlines, alt_u8 progressive, alt_u32 hz, video_type t
case 2: // VESA 640x480@60
continue;
case 3: // PSP 480x272
// force optimized Line2x mode for 480x272
// force optimized Line2x/3x mode for 480x272
valid_lm[1] = MODE_L2_480x272;
valid_lm[2] = MODE_L3_480x272;
break;
}
} else { // "640x480" on the list
@ -229,6 +230,15 @@ alt_8 get_mode_id(alt_u32 totlines, alt_u8 progressive, alt_u32 hz, video_type t
cm.sample_mult = 7;
cm.hsync_cut = 13;
break;
case MODE_L3_480x272:
cm.fpga_vmultmode = FPGA_V_MULTMODE_3X;
cm.fpga_hmultmode = FPGA_H_MULTMODE_OPTIMIZED;
if (cm.cc.upsample2x) {
cm.sample_mult = 2;
} else {
cm.tx_pixelrep = TX_PIXELREP_2X;
}
break;
case MODE_L4_GEN_4_3:
cm.fpga_vmultmode = FPGA_V_MULTMODE_4X;
cm.fpga_hmultmode = FPGA_H_MULTMODE_FULLWIDTH;

View File

@ -83,16 +83,17 @@ typedef enum {
MODE_L3_320_COL = (1<<14),
MODE_L3_256_COL = (1<<15),
MODE_L3_240x360 = (1<<16),
MODE_L4_GEN_4_3 = (1<<17),
MODE_L4_512_COL = (1<<18),
MODE_L4_384_COL = (1<<19),
MODE_L4_320_COL = (1<<20),
MODE_L4_256_COL = (1<<21),
MODE_L5_GEN_4_3 = (1<<22),
MODE_L5_512_COL = (1<<23),
MODE_L5_384_COL = (1<<24),
MODE_L5_320_COL = (1<<25),
MODE_L5_256_COL = (1<<26),
MODE_L3_480x272 = (1<<17),
MODE_L4_GEN_4_3 = (1<<18),
MODE_L4_512_COL = (1<<19),
MODE_L4_384_COL = (1<<20),
MODE_L4_320_COL = (1<<21),
MODE_L4_256_COL = (1<<22),
MODE_L5_GEN_4_3 = (1<<23),
MODE_L5_512_COL = (1<<24),
MODE_L5_384_COL = (1<<25),
MODE_L5_320_COL = (1<<26),
MODE_L5_256_COL = (1<<27),
} mode_flags;
typedef struct {
@ -150,7 +151,7 @@ typedef struct {
{ "480i", HDMI_480i60, 720, 240, 858, 0, 525, 57, 15, 62, 3, DEFAULT_SAMPLER_PHASE, (VIDEO_SDTV | VIDEO_PC), GROUP_480I, (MODE_PT | MODE_L2 | MODE_L3_GEN_16_9 | MODE_L4_GEN_4_3 | MODE_PLLDIVBY2 | MODE_INTERLACED) }, \
{ "480p", HDMI_480p60, 720, 480, 858, 0, 525, 60, 30, 62, 6, DEFAULT_SAMPLER_PHASE, (VIDEO_EDTV | VIDEO_PC), GROUP_480P, (MODE_PT | MODE_L2) }, \
/* 480p PSP in-game */ \
{ "480x272", HDMI_480p60_16x9, 480, 272, 858, 0, 525, 177,134, 62, 6, DEFAULT_SAMPLER_PHASE, (VIDEO_EDTV), GROUP_480P, (MODE_PT | MODE_L2_480x272) }, \
{ "480x272", HDMI_480p60_16x9, 480, 272, 858, 0, 525, 177,134, 62, 6, DEFAULT_SAMPLER_PHASE, (VIDEO_EDTV), GROUP_480P, (MODE_PT | MODE_L2_480x272 | MODE_L3_480x272) }, \
{ "640x480", HDMI_640x480p60, 640, 480, 800, 0, 525, 48, 33, 96, 2, DEFAULT_SAMPLER_PHASE, (VIDEO_PC | VIDEO_EDTV), GROUP_480P, (MODE_PT | MODE_L2) }, \
/* X68k @ 31kHz */ \
{ "640x512", HDMI_Unknown, 640, 512, 800, 0, 568, 48, 28, 96, 2, DEFAULT_SAMPLER_PHASE, (VIDEO_PC | VIDEO_EDTV), GROUP_480P, (MODE_PT | MODE_L2) }, \