Scaling for Hanheld system - ZFEbHVUE/Batocera-CRT-Script GitHub Wiki

Scaling for Handheld System

Example GameBoy Advance using a Shader

  1. Start a game from Emulation Station
  2. Go into the Quick Menu with [HOTKEY] + South button or Shift+F1
  3. Now back to the Main Menu
  4. Settings -> Video -> Scaling -> Aspect Ratio
  5. Set it from Core provided to Full
  6. Now back again to the Quick Menu
  7. Override -> Save Content Directory Override
  8. Exit out from the emulator and go into the newly created folder named in this example to VBA-M in the folder /userdata/system/configs/retroarch/config
  9. Edit the file gba.cfg and delete everything except these two lines:
    • aspect_ratio_index = "24"
    • auto_shaders_enable = "true"
  10. Now let's make a switchres.ini override file:
  • From the terminal type:
    cp /etc/switchres.ini /userdata/system/configs/retroarch/config/VBA-M/gba.switchres.ini
  1. Edit the file gba.switchres.ini
    Find the line:
  • user_mode auto
    Change it to:
  • user_mode 320x240
  • You can also use super resolutions if you want a little bit crisper image.
    • 320*8 = 2560
  • user_mode 2560x240 Also change this:
  • dotclock_min 0
    To this:
  • dotclock_min 25.0
  1. Save the file.
  2. Start the GBA game again from Emulation Station
  3. Go into the Quick Menu with [HOTKEY] + South button or Shift+F1
  4. Quick Menu -> Shaders -> Load Preset
  • Navigate to the Pixel-art-scaling folder
  • Then choose the shader pixel_aa_xform.slangp or box_filter_aa_xform.slangp (more lightweight)
  1. Go into Shader Parameters and change the following settings in this order:
  • Force integer scaling horizontally = (1.00)
  • Force integer scaling vertically = (1.00)
  1. Go out of the Shader Parameters and save the shader setting.
  • Shaders -> Save Preset -> Save Content Directory Preset
  • The file named gba.slangp will now be saved to the directory /userdata/system/configs/retroarch/config/VBA-M
  • Next time you load up any GameBoy Advance game, the settings will be applied to all games.

Example Game Gear using a Shader

Game Gear is a special case since it needs to be stretched to 4:3.
The original hardware internally outputs 160x144 pixels, then horizontally stretched to 4:3 on the hardware while the internal aspect ratio is 10:9.

  1. Start a game from Emulation Station
  2. Go into the Quick Menu with [HOTKEY] + South button or Shift+F1
  3. Now back to the Main Menu
  4. Settings -> Video -> Scaling -> Aspect Ratio
  5. Set it from Core provided to Full
  6. Now back again to the Quick Menu
  7. Override -> Save Content Directory Override
  8. Exit out from the emulator and go into the newly created folder named in this example to Genesis Plus GX in the folder /userdata/system/configs/retroarch/config
  9. Edit the file gamegear.cfg and delete everything except these two lines:
    • aspect_ratio_index = "24"
    • auto_shaders_enable = "true"
  10. Now let's make a switchres.ini override file:
    • From the terminal type:
      cp /etc/switchres.ini /userdata/system/configs/retroarch/config/Genesis Plus GX/gamegear.switchres.ini
  11. Edit the file gamegear.switchres.ini
    Find the line:
    • user_mode auto
      Change it to:
    • user_mode 320x240
    • You can also use super resolutions if you want a little bit crisper image.
      • 320*8 = 2560
    • user_mode 2560x240 Also change this:
    • dotclock_min 0
      To this:
    • dotclock_min 25.0
  12. Save the file.
  13. Start the GBA game again from Emulation Station
  14. Go into the Quick Menu with [HOTKEY] + South button or Shift+F1
  15. Quick Menu -> Shaders -> Load Preset
    • Navigate to the Pixel-art-scaling folder
    • Then choose the shader pixel_aa_xform.slangp or box_filter_aa_xform.slangp (more lightweight)
  16. Go into Shader Parameters and change the following settings in this order:
    • Force aspect ratio = (0.00)
    • Horizontal aspect ratio = (4.00)
    • Vertical aspect ratio = (3.00)
    • Force integer scaling vertically = (1.00)
  17. Go out of the Shader Parameters and save the shader setting.
    • Shaders -> Save Preset -> Save Content Directory Preset
    • The file named gamegear.slangp will now be saved to the directory /userdata/system/configs/retroarch/config/Genesis Plus GX
    • Next time you load up any Game Gear game, the settings will be applied to all games.

Overlays in RetroArch using a Shader

Edit the file *.*.cfg and add these lines:

  • aspect_ratio_index = "24"
  • auto_shaders_enable = "true"
  • input_osk_overlay_opacity = "0.700000"
  • input_overlay = "~/configs/retroarch/overlays/borders/overlay_name.cfg"
  • input_overlay_enable = "true"
  • input_overlay_enable_autopreferred = "true"
  • input_overlay_opacity = "0.700000"
  • input_overlay_scale_landscape = "1.000000"
  • input_overlay_scale_portrait = "1.000000"
  • input_overlay_behind_menu = "true"

Overlays are in the folder /userdata/system/Batocera-CRT-Script/extra/overlays
Copy the borders folder to /userdata/system/configs/retroarch/overlays/


Example GameBoy Advance - Without Using a Shader (Not Recommended)

  1. Start a game from Emulation Station
  2. Go into the Quick Menu with [HOTKEY] + South button or Shift+F1
  3. Now back to the Main Menu
  4. Settings -> Video -> Scaling -> Aspect Ratio
  5. Set it from Core provided to custom
  6. Now back again to the Quick Menu
  7. Override -> Save Content Directory Override
  8. Exit out from the emulator and go into the newly created folder named in this example to VBA-M in the folder /userdata/system/configs/retroarch/config
  9. Edit the file gba.cfg and delete everything except this line:
    • aspect_ratio_index = "23" Then add these 4 lines:
    • menu_linear_filter = "true"
    • custom_viewport_height = "160"
    • custom_viewport_width = "240"
    • video_scale_integer = "true"
  10. Now let's make a switchres.ini override file:
    • From the terminal type:
      cp /etc/switchres.ini /userdata/system/configs/retroarch/config/VBA-M/gba.switchres.ini
  11. Edit the file gba.switchres.ini
    Find the line:
    • user_mode auto
      Change it to:
    • user_mode 320x240
    • You can also use super resolutions if you want a little bit crisper image.
      • 320*8 = 2560
    • user_mode 2560x240 Also change this:
    • dotclock_min 0
      To this:
    • dotclock_min 25.0
    • Next time you load up any GameBoy Advance game, the settings will be applied to all games.