In‐Game resolution switching for Wine (Windows) or Steam - ZFEbHVUE/Batocera-CRT-Script GitHub Wiki

In‐Game Resolution Switching for Wine (Windows) or Steam

Using PadToKey Profile

This example demonstrates resolution switching for Steam and the game Teenage Mutant Ninja Turtles Shredder's Revenge.

  1. Hold down button A (South).
  2. Navigate to OPTIONS and CREATE PADTOKEY PROFILE.
  3. Scroll down to COMBINATIONS.
  4. Select Hotkey + South and assign it to any key of your choice.
  5. Save the profile.

Edit the PadToKey File

Locate and open the PadToKey file for the game:

/userdata/roms/steam/Teenage Mutant Ninja Turtles Shredder's Revenge.steam.keys  

Replace the following block:

{
    "trigger": [
        "b",
        "hotkey"
    ],
    "type": "key",
    "target": "KEY_A"
}

With this, and change the hotkey combination to trigger L2:

{
    "trigger": [
        "hotkey",
        "l2"
    ],
    "type": "exec",
    "target": "batocera-resolution setMode 480x240.60.00031",
    "description": "Switch Resolution"
}

Starting and Switching Resolutions

  1. Start the game in 480x270p.
  2. Switch to 480x240p during gameplay using Hotkey + L2 (left analog trigger).

Final PadToKey Configuration

This is how the file should look after editing:

{
    "actions_player1": [
        {
            "trigger": [
                "hotkey",
                "start"
            ],
            "type": "exec",
            "target": "kill $(pidof steam)",
            "description": "Exit Steam"
        },
        {
            "trigger": [
                "hotkey",
                "l2"
            ],
            "type": "exec",
            "target": "batocera-resolution setMode 480x240.60.00031",
            "description": "Switch Resolution"
        }
    ]
}

Resolution Note

The batocera-resolution setMode 480x240.60.00031 value may vary depending on your monitor profile.

To find the correct resolution for your setup:

  1. Open the file:

    /userdata/system/videomodes.conf  
    
  2. Look for the relevant entry. For example:

    For arcade_15:

    480x240.60.00031:480x240 1.0:0:0 15KHz 60Hz  
    
    • Equivalent:
      batocera-resolution setMode 480x240.60.00031  
      

    For NTSC:

    480x240.60.00026:480x240 1.0:0:0 15KHz 59.94Hz  
    
    • Equivalent:
      batocera-resolution setMode 480x240.60.00026