diff --git a/rpcs3/Emu/Cell/Modules/cellRec.cpp b/rpcs3/Emu/Cell/Modules/cellRec.cpp index fda113309a..77b35893c0 100644 --- a/rpcs3/Emu/Cell/Modules/cellRec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRec.cpp @@ -408,16 +408,19 @@ void rec_info::set_video_params(s32 video_format) switch(g_cfg.video.resolution) { - case video_resolution::_1080: - case video_resolution::_720: + case video_resolution::_1080p: + case video_resolution::_1080i: + case video_resolution::_720p: case video_resolution::_1600x1080: case video_resolution::_1440x1080: case video_resolution::_1280x1080: case video_resolution::_960x1080: hd = true; break; - case video_resolution::_480: - case video_resolution::_576: + case video_resolution::_480p: + case video_resolution::_480i: + case video_resolution::_576p: + case video_resolution::_576i: hd = false; break; } diff --git a/rpcs3/Emu/Cell/Modules/cellVideoOut.cpp b/rpcs3/Emu/Cell/Modules/cellVideoOut.cpp index eaf3ef4b51..9f246023fc 100644 --- a/rpcs3/Emu/Cell/Modules/cellVideoOut.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVideoOut.cpp @@ -13,10 +13,13 @@ LOG_CHANNEL(cellSysutil); // NOTE: Unused in this module, but used by gs_frame to determine window size const extern std::unordered_map, value_hash> g_video_out_resolution_map { - { video_resolution::_1080, { 1920, 1080 } }, - { video_resolution::_720, { 1280, 720 } }, - { video_resolution::_480, { 720, 480 } }, - { video_resolution::_576, { 720, 576 } }, + { video_resolution::_1080p, { 1920, 1080 } }, + { video_resolution::_1080i, { 1920, 1080 } }, + { video_resolution::_720p, { 1280, 720 } }, + { video_resolution::_480p, { 720, 480 } }, + { video_resolution::_480i, { 720, 480 } }, + { video_resolution::_576p, { 720, 576 } }, + { video_resolution::_576i, { 720, 576 } }, { video_resolution::_1600x1080, { 1600, 1080 } }, { video_resolution::_1440x1080, { 1440, 1080 } }, { video_resolution::_1280x1080, { 1280, 1080 } }, @@ -25,16 +28,34 @@ const extern std::unordered_map, value_has const extern std::unordered_map> g_video_out_resolution_id { - { video_resolution::_1080, CELL_VIDEO_OUT_RESOLUTION_1080 }, - { video_resolution::_720, CELL_VIDEO_OUT_RESOLUTION_720 }, - { video_resolution::_480, CELL_VIDEO_OUT_RESOLUTION_480 }, - { video_resolution::_576, CELL_VIDEO_OUT_RESOLUTION_576 }, + { video_resolution::_1080p, CELL_VIDEO_OUT_RESOLUTION_1080 }, + { video_resolution::_1080i, CELL_VIDEO_OUT_RESOLUTION_1080 }, + { video_resolution::_720p, CELL_VIDEO_OUT_RESOLUTION_720 }, + { video_resolution::_480p, CELL_VIDEO_OUT_RESOLUTION_480 }, + { video_resolution::_480i, CELL_VIDEO_OUT_RESOLUTION_480 }, + { video_resolution::_576p, CELL_VIDEO_OUT_RESOLUTION_576 }, + { video_resolution::_576i, CELL_VIDEO_OUT_RESOLUTION_576 }, { video_resolution::_1600x1080, CELL_VIDEO_OUT_RESOLUTION_1600x1080 }, { video_resolution::_1440x1080, CELL_VIDEO_OUT_RESOLUTION_1440x1080 }, { video_resolution::_1280x1080, CELL_VIDEO_OUT_RESOLUTION_1280x1080 }, { video_resolution::_960x1080, CELL_VIDEO_OUT_RESOLUTION_960x1080 }, }; +const extern std::unordered_map> g_video_out_scan_mode +{ + { video_resolution::_1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_1080i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE }, + { video_resolution::_720p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_480p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_480i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE }, + { video_resolution::_576p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_576i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE }, + { video_resolution::_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, + { video_resolution::_960x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE }, +}; + const extern std::unordered_map> g_video_out_aspect_id { { video_aspect::_16_9, CELL_VIDEO_OUT_ASPECT_16_9 }, @@ -124,7 +145,7 @@ error_code cellVideoOutGetState(u32 videoOut, u32 deviceIndex, vm::ptrstate = CELL_VIDEO_OUT_OUTPUT_STATE_ENABLED; state->colorSpace = CELL_VIDEO_OUT_COLOR_SPACE_RGB; state->displayMode.resolutionId = conf.state ? conf.resolution_id : ::at32(g_video_out_resolution_id, g_cfg.video.resolution); - state->displayMode.scanMode = CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE; + state->displayMode.scanMode = conf.state ? conf.scan_mode : ::at32(g_video_out_scan_mode, g_cfg.video.resolution); state->displayMode.conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE; state->displayMode.aspect = conf.state ? conf.aspect : ::at32(g_video_out_aspect_id, g_cfg.video.aspect_ratio); state->displayMode.refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_59_94HZ; @@ -283,7 +304,6 @@ error_code cellVideoOutGetDeviceInfo(u32 videoOut, u32 deviceIndex, vm::ptrportType = CELL_VIDEO_OUT_PORT_HDMI; info->colorSpace = CELL_VIDEO_OUT_COLOR_SPACE_RGB; info->latency = 100; - info->availableModeCount = 1; info->state = CELL_VIDEO_OUT_DEVICE_STATE_AVAILABLE; info->rgbOutputRange = 1; info->colorInfo.blueX = 0xFFFF; @@ -295,21 +315,109 @@ error_code cellVideoOutGetDeviceInfo(u32 videoOut, u32 deviceIndex, vm::ptrcolorInfo.whiteX = 0xFFFF; info->colorInfo.whiteY = 0xFFFF; info->colorInfo.gamma = 100; - info->availableModes[0].aspect = ::at32(g_video_out_aspect_id, g_cfg.video.aspect_ratio); - info->availableModes[0].conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE; - info->availableModes[0].refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_60HZ | CELL_VIDEO_OUT_REFRESH_RATE_59_94HZ; - info->availableModes[0].resolutionId = ::at32(g_video_out_resolution_id, g_cfg.video.resolution); - info->availableModes[0].scanMode = CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE; - if (g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled && g_cfg.video.resolution == video_resolution::_720) + u32 mode_count = 0; + + const auto add_mode = [&](u8 resolutionId, u8 scanMode, u8 conversion, u8 aspect) + { + info->availableModes[mode_count].resolutionId = resolutionId; + info->availableModes[mode_count].scanMode = scanMode; + info->availableModes[mode_count].conversion = conversion; + info->availableModes[mode_count].aspect = aspect; + info->availableModes[mode_count].refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_60HZ | CELL_VIDEO_OUT_REFRESH_RATE_59_94HZ; + mode_count++; + }; + + switch (g_cfg.video.resolution.get()) + { + case video_resolution::_1080p: + add_mode(CELL_VIDEO_OUT_RESOLUTION_1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + break; + case video_resolution::_1080i: + add_mode(CELL_VIDEO_OUT_RESOLUTION_1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + break; + case video_resolution::_720p: + add_mode(CELL_VIDEO_OUT_RESOLUTION_720, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + break; + case video_resolution::_480p: + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3); + if (g_cfg.video.aspect_ratio == video_aspect::_16_9) + { + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + } + break; + case video_resolution::_480i: + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3); + if (g_cfg.video.aspect_ratio == video_aspect::_16_9) + { + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + } + break; + case video_resolution::_576p: + add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3); + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3); + if (g_cfg.video.aspect_ratio == video_aspect::_16_9) + { + add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + } + break; + case video_resolution::_576i: + add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3); + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3); + if (g_cfg.video.aspect_ratio == video_aspect::_16_9) + { + add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + } + break; + case video_resolution::_1600x1080: + add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + break; + case video_resolution::_1440x1080: + add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + break; + case video_resolution::_1280x1080: + add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + break; + case video_resolution::_960x1080: + add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9); + break; + } + + if (g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled && g_cfg.video.resolution == video_resolution::_720p) { // Register 3D-capable display mode - info->availableModes[1] = info->availableModes[0]; - info->availableModes[1].conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING; - info->availableModes[1].resolutionId = CELL_VIDEO_OUT_RESOLUTION_720_3D_FRAME_PACKING; - info->availableModeCount++; + if (true) // TODO + { + // 3D stereo + add_mode(CELL_VIDEO_OUT_RESOLUTION_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1024x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_960x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_800x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_640x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + } + else + { + // SimulView + add_mode(CELL_VIDEO_OUT_RESOLUTION_720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_1024x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_960x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_800x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + add_mode(CELL_VIDEO_OUT_RESOLUTION_640x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9); + } } + info->availableModeCount = mode_count; + return CELL_OK; } @@ -346,7 +454,7 @@ error_code cellVideoOutGetResolutionAvailability(u32 videoOut, u32 resolutionId, return not_an_error(1); } - if ((g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled) && g_cfg.video.resolution == video_resolution::_720) + if ((g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled) && g_cfg.video.resolution == video_resolution::_720p) { switch (resolutionId) { diff --git a/rpcs3/Emu/Cell/lv2/sys_uart.cpp b/rpcs3/Emu/Cell/lv2/sys_uart.cpp index 2982cf0bc9..90c6f4f469 100644 --- a/rpcs3/Emu/Cell/lv2/sys_uart.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_uart.cpp @@ -172,13 +172,17 @@ struct av_get_monitor_info_cmd : public ps3av_cmd { switch (g_cfg.video.resolution) { - case video_resolution::_1080: + case video_resolution::_1080p: return PS3AV_RESBIT_1920x1080P; + case video_resolution::_1080i: + return PS3AV_RESBIT_1920x1080I; case video_resolution::_1600x1080: case video_resolution::_1440x1080: case video_resolution::_1280x1080: - case video_resolution::_720: + case video_resolution::_720p: return PS3AV_RESBIT_1280x720P; + case video_resolution::_576p: + return PS3AV_RESBIT_720x576P; default: return PS3AV_RESBIT_720x480P; } diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index b82d34d080..ef8a6183d8 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -728,7 +728,14 @@ namespace rsx void avconf::save(utils::serial& ar) { - ar(*this); + [[maybe_unused]] const s32 version = GET_OR_USE_SERIALIZATION_VERSION(ar.is_writing(), rsx); + + ar(stereo_mode, format, aspect, resolution_id, scanline_pitch, gamma, resolution_x, resolution_y, state); + + if (ar.is_writing() || version >= 3) + { + ar(scan_mode); + } } void thread::capture_frame(const std::string &name) diff --git a/rpcs3/Emu/RSX/rsx_utils.h b/rpcs3/Emu/RSX/rsx_utils.h index 07cc4cc6ab..d97c5ff62c 100644 --- a/rpcs3/Emu/RSX/rsx_utils.h +++ b/rpcs3/Emu/RSX/rsx_utils.h @@ -162,6 +162,7 @@ namespace rsx u32 resolution_x = 1280; // X RES u32 resolution_y = 720; // Y RES atomic_t state = 0; // 1 after cellVideoOutConfigure was called + u8 scan_mode = 1; // CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE ENABLE_BITWISE_SERIALIZATION; SAVESTATE_INIT_POS(12); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 0c9b5f79ba..689b5574be 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -274,18 +274,21 @@ static void fixup_settings(const psf::registry* _psf) { const std::map resolutions { - { video_resolution::_480, psf::resolution_flag::_480p | psf::resolution_flag::_480p_16_9 }, - { video_resolution::_576, psf::resolution_flag::_576p | psf::resolution_flag::_576p_16_9 }, - { video_resolution::_720, psf::resolution_flag::_720p }, - { video_resolution::_1080, psf::resolution_flag::_1080p }, - { video_resolution::_1600x1080, psf::resolution_flag::_1080p }, - { video_resolution::_1440x1080, psf::resolution_flag::_1080p }, - { video_resolution::_1280x1080, psf::resolution_flag::_1080p }, - { video_resolution::_960x1080, psf::resolution_flag::_1080p }, + { video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 }, + { video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 }, + { video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 }, + { video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 }, + { video_resolution::_720p, psf::resolution_flag::_720 }, + { video_resolution::_1080p, psf::resolution_flag::_1080 }, + { video_resolution::_1080i, psf::resolution_flag::_1080 }, + { video_resolution::_1600x1080, psf::resolution_flag::_1080 }, + { video_resolution::_1440x1080, psf::resolution_flag::_1080 }, + { video_resolution::_1280x1080, psf::resolution_flag::_1080 }, + { video_resolution::_960x1080, psf::resolution_flag::_1080 }, }; const video_resolution resolution = g_cfg.video.resolution; - constexpr video_resolution new_resolution = video_resolution::_720; + constexpr video_resolution new_resolution = video_resolution::_720p; if (!resolutions.contains(resolution) || !(psf_resolution & resolutions.at(resolution))) { diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index de5bc8d486..4415f4d5ba 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -55,7 +55,7 @@ SERIALIZATION_VER(lv2_config, 9, 1) namespace rsx { - SERIALIZATION_VER(rsx, 10, 1, 2/*Pending flip*/) + SERIALIZATION_VER(rsx, 10, 1, 2/*Pending flip*/, 3/*avconf scan_mode*/) } namespace np diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index feb65a6e6d..bbba463b10 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -127,7 +127,7 @@ struct cfg_root : cfg::node cfg::_enum renderer{ this, "Renderer", video_renderer::opengl }; #endif - cfg::_enum resolution{ this, "Resolution", video_resolution::_720 }; + cfg::_enum resolution{ this, "Resolution", video_resolution::_720p }; cfg::_enum aspect_ratio{ this, "Aspect ratio", video_aspect::_16_9 }; cfg::_enum frame_limit{ this, "Frame limit", frame_limit_type::_auto, true }; cfg::_float<0, 1000> second_frame_limit{ this, "Second Frame Limit", 0, true }; // 0 disables its effect diff --git a/rpcs3/Emu/system_config_types.cpp b/rpcs3/Emu/system_config_types.cpp index 94acfc0ba4..5140037f41 100644 --- a/rpcs3/Emu/system_config_types.cpp +++ b/rpcs3/Emu/system_config_types.cpp @@ -40,10 +40,13 @@ void fmt_class_string::format(std::string& out, u64 arg) { switch (value) { - case video_resolution::_1080: return "1920x1080"; - case video_resolution::_720: return "1280x720"; - case video_resolution::_480: return "720x480"; - case video_resolution::_576: return "720x576"; + case video_resolution::_1080p: return "1920x1080"; + case video_resolution::_1080i: return "1920x1080i"; + case video_resolution::_720p: return "1280x720"; + case video_resolution::_480p: return "720x480"; + case video_resolution::_480i: return "720x480i"; + case video_resolution::_576p: return "720x576"; + case video_resolution::_576i: return "720x576i"; case video_resolution::_1600x1080: return "1600x1080"; case video_resolution::_1440x1080: return "1440x1080"; case video_resolution::_1280x1080: return "1280x1080"; diff --git a/rpcs3/Emu/system_config_types.h b/rpcs3/Emu/system_config_types.h index d194c4fe0f..28e4693a02 100644 --- a/rpcs3/Emu/system_config_types.h +++ b/rpcs3/Emu/system_config_types.h @@ -197,10 +197,13 @@ enum class pad_handler_mode enum class video_resolution { - _1080, - _720, - _480, - _576, + _1080p, + _1080i, + _720p, + _480p, + _480i, + _576p, + _576i, _1600x1080, _1440x1080, _1280x1080, diff --git a/rpcs3/Loader/PSF.h b/rpcs3/Loader/PSF.h index 98be890b75..044a6543c5 100644 --- a/rpcs3/Loader/PSF.h +++ b/rpcs3/Loader/PSF.h @@ -23,12 +23,12 @@ namespace psf enum resolution_flag : s32 { - _480p = 1 << 0, - _576p = 1 << 1, - _720p = 1 << 2, - _1080p = 1 << 3, - _480p_16_9 = 1 << 4, - _576p_16_9 = 1 << 5, + _480 = 1 << 0, + _576 = 1 << 1, + _720 = 1 << 2, + _1080 = 1 << 3, + _480_16_9 = 1 << 4, + _576_16_9 = 1 << 5, }; enum class format : u16 diff --git a/rpcs3/rpcs3qt/localized.cpp b/rpcs3/rpcs3qt/localized.cpp index b259729371..78e5577b00 100644 --- a/rpcs3/rpcs3qt/localized.cpp +++ b/rpcs3/rpcs3qt/localized.cpp @@ -79,12 +79,12 @@ std::string Localized::GetStringFromU32(const u32& key, const std::map gui_settings, std { const std::map resolutions { - { video_resolution::_480, psf::resolution_flag::_480p | psf::resolution_flag::_480p_16_9 }, - { video_resolution::_576, psf::resolution_flag::_576p | psf::resolution_flag::_576p_16_9 }, - { video_resolution::_720, psf::resolution_flag::_720p }, - { video_resolution::_1080, psf::resolution_flag::_1080p }, - { video_resolution::_1600x1080, psf::resolution_flag::_1080p }, - { video_resolution::_1440x1080, psf::resolution_flag::_1080p }, - { video_resolution::_1280x1080, psf::resolution_flag::_1080p }, - { video_resolution::_960x1080, psf::resolution_flag::_1080p }, + { video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 }, + { video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 }, + { video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 }, + { video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 }, + { video_resolution::_720p, psf::resolution_flag::_720 }, + { video_resolution::_1080p, psf::resolution_flag::_1080 }, + { video_resolution::_1080i, psf::resolution_flag::_1080 }, + { video_resolution::_1600x1080, psf::resolution_flag::_1080 }, + { video_resolution::_1440x1080, psf::resolution_flag::_1080 }, + { video_resolution::_1280x1080, psf::resolution_flag::_1080 }, + { video_resolution::_960x1080, psf::resolution_flag::_1080 }, }; const int saved_index = ui->resBox->currentIndex(); @@ -496,7 +499,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std { const auto [text, value] = get_data(ui->resBox, i); - if (static_cast(value) == video_resolution::_720) + if (static_cast(value) == video_resolution::_720p) { // Rename the default resolution for users ui->resBox->setItemText(i, tr("1280x720 (Recommended)", "Resolution"));