Skip to content

Commit

Permalink
Bugfixes, frames, pixel-perfect scanlines
Browse files Browse the repository at this point in the history
  • Loading branch information
ClusterM committed Oct 12, 2017
1 parent bb08ac2 commit 7a4e408
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 28 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes
18 changes: 18 additions & 0 deletions CloverApp-ForSNES/CLV-Z-RARCH.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Desktop Entry]

This comment has been minimized.

Copy link
@shaggy45

shaggy45 Feb 1, 2018

32x_genesis2

Type=Application
Exec=/bin/retroarch-mini null
Path=/var/lib/clover/profiles/0/CLV-Z-RARCH
Name=RetroArch
Icon=/usr/share/games/CLV-Z-RARCH/CLV-Z-RARCH.png

[X-CLOVER Game]
Code=CLV-Z-RARCH
TestID=777
ID=0
Players=1
Simultaneous=0
ReleaseDate=2017-01-01
SaveCount=0
SortRawTitle=retroarch
SortRawPublisher=LIBRETRO
Copyright=hakchi2 ©2017 Alexey 'Cluster' Avdyukhin
Binary file added CloverApp-ForSNES/CLV-Z-RARCH.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CloverApp-ForSNES/CLV-Z-RARCH_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion make_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ mkdir -p release/cores
echo "\nPacking core template, BIOS template and CloverApp\n\n"
zip -rq release/libretro_core_template.zip libretro_core_template.hmod/*
zip -rq release/bios_template.zip bios_template.hmod/*
zip -rq release/CloverApp.zip CloverApp
zip -rq release/CloverApp-ForNES.zip CloverApp-ForNES
zip -rq release/CloverApp-ForSNES.zip CloverApp-ForSNES
echo "Packing retroarch.hmod"
cd retroarch.hmod && tar -czf ../release/retroarch.hmod * && cd ..
printf "\nModules:\n"
Expand Down
21 changes: 12 additions & 9 deletions retroarch.hmod/bin/retroarch-clover-child
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ while [ $# -gt 0 ]; do
[ "$1" == "--save-screenshot-on-quit" ] && screenshot=$2
[ "$1" == "--save-data-backing-file" ] && sram=$2
[ "$1" == "--graphic-filter" ] && filter=$2
[ "$1" == "--video-mode" ] && [ "$2" == "crt-filter" ] && filter=crt720
[ "$1" == "--video-mode" ] && [ "$2" == "crt-filter" ] && filter=crt720 && crt=1
[ "$1" == "--video-mode" ] && [ "$2" == "keep-aspect-ratio" ] && filter=gpu720
[ "$1" == "--video-mode" ] && [ "$2" == "pixel-perfect" ] && filter=ppu
[ "$1" == "--ra-extra" ] && extra=$2
[ "$1" == "--ra-nosaves" ] && nosaves=1
[ "$1" == "--save-time-path" ] && timefile=$2
[ "$1" == "--replay-inputs" ] && demo=1
[ "$1" == "--decorative-frame-path" ] && frame=$2
shift
done

Expand All @@ -56,20 +57,22 @@ else
[ ! -z "$sram" ] && [ -f "$sram" ] && cp -f "$sram" "$rsram"
fi

# core provided ratio for CRT mode
[ "$filter" == "crt720" ] && ratio=21 && smooth=false && crt=1
# core provided ratio for 4:3 mode
[ "$filter" == "gpu720" ] && ratio=21 && smooth=false
# pixel perfect - 1:1 for pixel perfect mode
[ "$filter" == "ppu" ] && ratio=20 && smooth=false

smooth=$(cat /etc/libretro/$filter.smooth)
sed -i -e 's/video_smooth = "[^"]*"/video_smooth = "'$smooth'"/g' /etc/libretro/retroarch.cfg
ratio=$(cat /etc/libretro/$filter.ratio)
sed -i -e 's/aspect_ratio_index = "[^"]*"/aspect_ratio_index = "'$ratio'"/g' /etc/libretro/retroarch.cfg
overlay=$(cat /etc/libretro/$filter.overlay)
sed -i -e 's/input_overlay_enable = "[^"]*"/input_overlay_enable = "'$overlay'"/g' /etc/libretro/retroarch.cfg

[ ! -z "$crt" ] && overlay1=scanlines.png
if [ ! -z "$frame" ]; then
[ -z "$crt" ] && overlay1=$frame.png || overlay2=$frame.png
fi
overlay1=$(echo "$overlay1" | sed 's/\//\\\//g')
overlay2=$(echo "$overlay2" | sed 's/\//\\\//g')
sed -i -e 's/overlay0_overlay = "[^"]*"/overlay0_overlay = "'$overlay1'"/g' /etc/libretro/.config/retroarch/overlay/scanlines.cfg
sed -i -e 's/overlay0_desc0_overlay = "[^"]*"/overlay0_desc0_overlay = "'$overlay2'"/g' /etc/libretro/.config/retroarch/overlay/scanlines.cfg

# Start timestamp
ts=$(date +"%s")
tm=0
Expand Down Expand Up @@ -164,7 +167,7 @@ echo $tm > "$timefile"

grep video_smooth /etc/libretro/retroarch.cfg | grep true && current_smooth=true || current_smooth=false
echo $current_smooth > /etc/libretro/$filter.smooth
grep video_smooth /etc/libretro/retroarch.cfg | grep true && current_overlay=true || current_overlay=false
grep input_overlay_enable /etc/libretro/retroarch.cfg | grep true && current_overlay=true || current_overlay=false
echo $current_overlay > /etc/libretro/$filter.overlay
current_ratio=$(cat /etc/libretro/retroarch.cfg | grep "aspect_ratio_index" | sed 's/[^0-9]*//g')
echo $current_ratio > /etc/libretro/$filter.ratio
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
overlays = 1
overlay0_overlay = scanlines.png
overlays = "1"
overlay0_overlay = "scanlines.png"
overlay0_full_screen = true
overlay0_descs = 0
overlay0_rect = "0.0,0.0,1.0,1.0"
overlay0_descs = "1"
overlay0_desc0 = "none,640,360,rect,640,360"
overlay0_desc0_overlay = "/usr/share/backgrounds/09_speaker/09_speaker_4_3.png"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion retroarch.hmod/etc/libretro/crt720.ratio
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21
22
14 changes: 12 additions & 2 deletions retroarch.hmod/etc/libretro/retroarch-core-options.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ genesis_plus_gx_lcd_filter = "disabled"
genesis_plus_gx_overscan = "disabled"
genesis_plus_gx_gg_extra = "disabled"
genesis_plus_gx_render = "single field"
genesis_plus_gx_gun_cursor = "no"
genesis_plus_gx_invert_mouse = "no"
genesis_plus_gx_gun_cursor = "disabled"
genesis_plus_gx_invert_mouse = "disabled"
fceumm_palette = "asqrealc"
fceumm_nospritelimit = "disabled"
fceumm_overclocking = "disabled"
Expand Down Expand Up @@ -54,3 +54,13 @@ mupen64-vcache-vbo = "off"
mupen64-boot-device = "Default"
mupen64-64dd-hardware = "disabled"
gba_hle = "enabled"
fceumm_turbo_enable = "Both"
fceumm_turbo_delay = "3"
fceumm_region = "Auto"
genesis_plus_gx_ym3438 = "mame"
genesis_plus_gx_sound_output = "stereo"
genesis_plus_gx_audio_filter = "disabled"
genesis_plus_gx_lowpass_range = "60"
genesis_plus_gx_aspect_ratio = "auto"
genesis_plus_gx_overclock = "100%"
genesis_plus_gx_no_sprite_limit = "disabled"
24 changes: 12 additions & 12 deletions retroarch.hmod/etc/libretro/retroarch.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ playlist_directory = "~/.config/retroarch/playlists"
audio_filter_dir = "/"
savefile_directory = "/var/cache"
savestate_directory = "/var/cache"
rgui_browser_directory = "/usr/share/games/nes/kachikachi"
rgui_browser_directory = "/usr/share/games"
rgui_config_directory = "~/.config/retroarch/config"
overlay_directory = "~/.config/retroarch/overlay"
screenshot_directory = "~/.config/retroarch/screenshots"
Expand All @@ -45,7 +45,7 @@ video_refresh_rate = "60.000027"
audio_rate_control_delta = "0.005000"
audio_max_timing_skew = "0.050000"
audio_volume = "0.000000"
input_overlay_opacity = "0.500000"
input_overlay_opacity = "1.000000"
input_overlay_scale = "1.000000"
menu_wallpaper_opacity = "0.300000"
menu_footer_opacity = "1.000000"
Expand All @@ -67,7 +67,7 @@ rewind_granularity = "1"
autosave_interval = "10"
libretro_log_level = "0"
keyboard_gamepad_mapping_type = "1"
input_poll_type_behavior = "2"
input_poll_type_behavior = "1"
video_monitor_index = "0"
video_fullscreen_x = "0"
video_fullscreen_y = "0"
Expand All @@ -79,10 +79,10 @@ menu_thumbnails = "3"
materialui_menu_color_theme = "0"
menu_shader_pipeline = "1"
audio_out_rate = "48000"
custom_viewport_width = "768"
custom_viewport_height = "720"
custom_viewport_x = "256"
custom_viewport_y = "0"
custom_viewport_width = "880"
custom_viewport_height = "672"
custom_viewport_x = "200"
custom_viewport_y = "24"
content_history_size = "100"
video_frame_delay = "0"
video_max_swapchain_images = "3"
Expand Down Expand Up @@ -176,8 +176,8 @@ video_aspect_ratio_auto = "false"
video_allow_rotate = "true"
video_windowed_fullscreen = "true"
video_crop_overscan = "false"
video_scale_integer = "true"
video_smooth = "true"
video_scale_integer = "false"
video_smooth = "false"
video_force_aspect = "true"
video_threaded = "false"
video_shared_context = "false"
Expand Down Expand Up @@ -216,9 +216,9 @@ rgui_show_start_screen = "false"
menu_navigation_wraparound_enable = "true"
menu_navigation_browser_filter_supported_extensions_enable = "false"
menu_show_advanced_settings = "true"
input_overlay_enable = "true"
input_overlay_enable = "false"
input_overlay_enable_autopreferred = "true"
input_overlay_hide_in_menu = "true"
input_overlay_hide_in_menu = "false"
network_cmd_enable = "false"
stdin_cmd_enable = "false"
block_sram_overwrite = "false"
Expand Down Expand Up @@ -1561,7 +1561,7 @@ xmb_menu_color_theme = "4"
xmb_shadows_enable = "true"
xmb_show_settings = "true"
xmb_show_history = "true"
input_overlay = "/etc/libretro/.config/retroarch/overlay/scanlines.cfg"
input_overlay = "~/.config/retroarch/overlay/scanlines.cfg"
xmb_font = ""
netplay_nickname = ""
video_filter = ""
Expand Down

0 comments on commit 7a4e408

Please sign in to comment.