Skip to content

Commit

Permalink
Beta 23
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomasa committed Mar 19, 2023
1 parent ff0cb4c commit 16694c3
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 41 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@ The links below belong to our official channels. Links other than this may have
This feature will enable dynamic native resolution detection and switch in real time.
This feature has been tested only with Raspberry Pi4 using KMS/DRM and DPI interface.

Please do note that you need to load every single kms video mode before using this feature.
As of now, only RGB-Pi OS includes such DB out of the box.

## Build on Pi4

Install dependencies:
Expand All @@ -361,16 +358,20 @@ Install dependencies:

Configure and build (32-bit):

`CFLAGS='-march=armv8-a+crc+simd -mcpu=cortex-a72 -mtune=cortex-a72 -mfloat-abi=hard -mfpu=neon-fp-armv8' CXXFLAGS="${CFLAGS}" ./configure --disable-caca --disable-jack --disable-opengl1 --disable-oss --disable-sdl --disable-sdl2 --disable-videocore --disable-vulkan --disable-wayland --disable-x11 --enable-alsa --enable-egl --enable-floathard --enable-kms --enable-neon --enable-opengles --enable-opengles3_1 --disable-pulse --enable-udev --enable-ffmpeg`
`CFLAGS='-march=armv8-a+crc+simd -mcpu=cortex-a72 -mtune=cortex-a72 -mfloat-abi=hard -mfpu=neon-fp-armv8' CXXFLAGS="${CFLAGS}" ./configure --disable-caca --disable-jack --disable-opengl1 --disable-oss --disable-sdl --disable-sdl2 --disable-videocore --disable-vulkan --disable-wayland --disable-x11 --enable-alsa --enable-egl --enable-floathard --enable-kms --enable-neon --enable-opengles --enable-opengles3_1 --disable-pulse --enable-udev --enable-ffmpeg --disable-v4l2 --enable-dynares`

Configure and build (64-bit):

`CFLAGS='-march=armv8-a+crc+simd -mcpu=cortex-a72 -mtune=cortex-a72' CXXFLAGS="${CFLAGS}" ./configure --disable-caca --disable-sixel --disable-jack --disable-oss --disable-sdl --disable-sdl2 --disable-videocore --disable-wayland --disable-x11 --enable-alsa --enable-egl --enable-kms --disable-opengl1 --disable-opengl --enable-opengl_core --enable-opengles --enable-vulkan --disable-pulse --enable-udev --disable-ffmpeg --disable-xmb --disable-ozone --disable-materialui --disable-discord --disable-bluetooth --disable-gfx_widgets --disable-xrandr --disable-online_updater --disable-translate --disable-cdrom --enable-dynares`
`CFLAGS='-march=armv8-a+crc+simd -mcpu=cortex-a72 -mtune=cortex-a72' CXXFLAGS="${CFLAGS}" ./configure --disable-caca --disable-sixel --disable-jack --disable-oss --disable-sdl --disable-sdl2 --disable-videocore --disable-wayland --disable-x11 --enable-alsa --enable-egl --enable-kms --disable-opengl1 --disable-opengl --disable-opengl_core --enable-opengles --enable-opengles3 --enable-opengles3_1 --disable-vulkan --disable-pulse --enable-udev --enable-ffmpeg --disable-v4l2 --disable-xmb --disable-ozone --disable-materialui --disable-discord --disable-bluetooth --disable-gfx_widgets --disable-xrandr --disable-online_updater --disable-translate --disable-cdrom --disable-libretrodb --disable-freetype --enable-dynares`

Then make and install:

`make -j4`

Check compiled features:

`retroarch --features`

At this point I prefer to use checkinstall instead of simply make install. You'll have a deb package that you can save somewhere for when you reinstall Raspberry OS (change to the correct version in the instructions below):

`sudo apt install checkinstall`
Expand Down
22 changes: 15 additions & 7 deletions gfx/video_dynares.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ int dynares_is_mame_rotated()
return string_is_equal(sys_name, "MAME") && (rotation == 1 || rotation == 3);
}


void dynares_check_rotation(unsigned *width, unsigned *height)
{
RARCH_LOG("[DynaRes]: Check rotation: System: %s, resolution: %dx%d, rotation: %d\n", sys_name, *width, *height, rotation);
Expand All @@ -97,9 +96,9 @@ void dynares_video_show_info(int width, int height, int interlaced, float hz)
char msg[128];
settings_t *settings = config_get_ptr();

char* mode = "x";
char *mode = "x";

if(interlaced)
if (interlaced)
{
mode = "i";
if (settings->bools.dynares_flicker_reduction)
Expand Down Expand Up @@ -325,9 +324,18 @@ void dynares_init(unsigned *width, unsigned *height, unsigned base_width, unsign
sr_set_monitor(crt_type);
sr_set_interlace_force_even(1);
sr_set_v_shift_correct(0);
sr_set_user_mode(320, 240, 60.0);
sr_init_disp("auto");
sr_get_timing(320, 240, 60.0, crt_type, 0, &srtiming);
if (string_is_equal(crt_type, "arcade_31"))
{
sr_set_user_mode(640, 480, 60.0);
sr_init_disp("auto");
sr_get_timing(640, 480, 60.0, crt_type, 0, &srtiming);
}
else
{
sr_set_user_mode(320, 240, 60.0);
sr_init_disp("auto");
sr_get_timing(320, 240, 60.0, crt_type, 0, &srtiming);
}
snprintf(sys_timing, sizeof(sys_timing), "%d %d %d %d %d %d %d %d %d %d %d %d %d %f %d %ld %d",
srtiming.hhh, srtiming.hsync, srtiming.h_f_porch, srtiming.h_b_porch, srtiming.h_total,
srtiming.vvv, srtiming.vsync, srtiming.v_f_porch, srtiming.v_b_porch, srtiming.v_total,
Expand Down Expand Up @@ -376,7 +384,7 @@ void dynares_init(unsigned *width, unsigned *height, unsigned base_width, unsign
RARCH_LOG("[DynaRes]: Init: %s(%s): Game timing requested: %s\n", dynares, crt_type, gam_timing);
RARCH_LOG("[DynaRes]: Init: Game timing transformation (15K/25/31Khz): %u %u %f\n", srtiming.hhh, srtiming.vvv, fps);
sr_deinit();
if(srtiming.vvv != *height)
if (srtiming.vvv != *height)
{
*width = srtiming.hhh;
*height = srtiming.vvv;
Expand Down
65 changes: 37 additions & 28 deletions menu/drivers/rgui.c
Original file line number Diff line number Diff line change
Expand Up @@ -5521,40 +5521,49 @@ static void rgui_render(void *data,
/* Print menu sublabel/core name (if required) */
if (menu_show_sublabels && !string_is_empty(rgui->menu_sublabel))
{
char sublabel_buf[MENU_SUBLABEL_MAX_LENGTH];
sublabel_buf[0] = '\0';

if (use_smooth_ticker)
/* RGB-Pi Restrict menu sublabels */
const char* cheevos_list_menu;
cheevos_list_menu = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST);
bool is_cheevos_list_menu = string_is_equal(rgui->menu_title, cheevos_list_menu);
if (is_cheevos_list_menu)
{
ticker_smooth.selected = true;
ticker_smooth.field_width = core_name_len * rgui->font_width_stride;
ticker_smooth.src_str = rgui->menu_sublabel;
ticker_smooth.dst_str = sublabel_buf;
ticker_smooth.dst_str_len = sizeof(sublabel_buf);
ticker_smooth.x_offset = &ticker_x_offset;
//fprintf(stdout,"[DEBUG]: Menu title: %s, Sublabel: %s\n",rgui->menu_title,rgui->menu_sublabel);
char sublabel_buf[MENU_SUBLABEL_MAX_LENGTH];
sublabel_buf[0] = '\0';

gfx_animation_ticker_smooth(&ticker_smooth);
}
else
{
ticker.s = sublabel_buf;
ticker.len = core_name_len;
ticker.str = rgui->menu_sublabel;
ticker.selected = true;
if (use_smooth_ticker)
{
ticker_smooth.selected = true;
ticker_smooth.field_width = core_name_len * rgui->font_width_stride;
ticker_smooth.src_str = rgui->menu_sublabel;
ticker_smooth.dst_str = sublabel_buf;
ticker_smooth.dst_str_len = sizeof(sublabel_buf);
ticker_smooth.x_offset = &ticker_x_offset;

gfx_animation_ticker_smooth(&ticker_smooth);
}
else
{
ticker.s = sublabel_buf;
ticker.len = core_name_len;
ticker.str = rgui->menu_sublabel;
ticker.selected = true;

gfx_animation_ticker(&ticker);
}
gfx_animation_ticker(&ticker);
}

blit_line(rgui,
fb_width,
ticker_x_offset + rgui->term_layout.start_x + rgui->font_width_stride,
(rgui->term_layout.height * rgui->font_height_stride) +
rgui->term_layout.start_y + 2, sublabel_buf,
rgui->colors.hover_color, rgui->colors.shadow_color);
blit_line(rgui,
fb_width,
ticker_x_offset + rgui->term_layout.start_x + rgui->font_width_stride,
(rgui->term_layout.height * rgui->font_height_stride) +
rgui->term_layout.start_y + 2, sublabel_buf,
rgui->colors.hover_color, rgui->colors.shadow_color);
}
}
else if (menu_core_enable)
{
char core_title[64];
/* RGB-Pi Remove Core name in some menu sublabels */
/*char core_title[64];
char core_title_buf[64];
core_title[0] = core_title_buf[0] = '\0';
Expand Down Expand Up @@ -5586,7 +5595,7 @@ static void rgui_render(void *data,
ticker_x_offset + rgui->term_layout.start_x + rgui->font_width_stride,
(rgui->term_layout.height * rgui->font_height_stride) +
rgui->term_layout.start_y + 2, core_title_buf,
rgui->colors.hover_color, rgui->colors.shadow_color);
rgui->colors.hover_color, rgui->colors.shadow_color);*/
}

/* Print clock (if required) */
Expand Down
2 changes: 1 addition & 1 deletion menu/menu_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -6015,7 +6015,7 @@ unsigned menu_event(
else if (ok_trigger)
ret = MENU_ACTION_OK;
else if (BIT256_GET_PTR(p_trigger_input, menu_cancel_btn)) {
/* Get Current Menu Entry */
/* RGB-Pi Get Current Menu Entry */
//char current_label[128];
//get_current_menu_label(menu_st, current_label, sizeof(current_label));
if (settings->bools.rgbpi_restrict_ui)
Expand Down

0 comments on commit 16694c3

Please sign in to comment.