Command line ips patching

Hi, first of all this is my first post here, so hello everybody :slight_smile:

Now, I am trying to get some ips patches to work, but so far I had no success. As I read something about patching being automatic, I simply copied the ips file in the same directory as the rom file, but it didn’t work; I tried with the rom both zipped and un-zipped. Then, I added the following to the nes system command line in emulation station (it’s the frontend I am using): " --ips …emulationstation\roms_patches es" (that is the directory where I store the patch files) but again it didn’t work.

I am pretty sure that both the rom and the patch are fine because in nestopia they work great, but I can’t get it to work here. Any help?

Thanks in advance.

AFAIK, it should just work as long as the patch and ROM have exactly the same name (except for the extension, of course).

I can’t get softpatching to work either, is the core supposed to have some special feature or is retroarch supposed to take care of everything ?

I hardpatch all of my roms, but adding --ips /path/to/patch.ips should work also. I’ll try to test this to make sure it still works soon.

There is IPS/UPS/BPS patching for cores that have needs_fullpath=false IIRC. It’s disabled by default now, just enable in options

[QUOTE=Radius;18457]There is IPS/UPS/BPS patching for cores that have needs_fullpath=false IIRC. It’s disabled by default now, just enable in options[/QUOTE]

Could you please elaborate? I can’t find that parameter either in the retroarch GUI or the cfg files

In the current nightlies it’s right there under settings



Thanks, I had the stable 1.0.0.2 version and the patch options didn’t show anywhere. I dl’d the last nightly build and the patch options are indeed there, but after selecting IPS ON, it still doesn’t work :confused:

I have tried both autopatching by putting both rom and ips file together, and also specifying the patch directory through --ips command line parameter, can I try anything else?

I just found out those are just stubs, still not working, but patching does work from the GUI at least, just load a rom that has a patch with the same name and it works (tried ToP with bsnes, snes9x and snes9x-next)

I tried a bps patch with desmume and it didn’t work.

FWIW I forgot to add the cores I tested were fceumm and nestopia, neither worked :confused: (In my first post I mentioned ips patching working in nestopia, obviously I meant the standalone emulator, not the libretro core)

LibRetro is just awesome. Thanks everyone working with it! About the ips patch: I am using the version 1.2.2 and the command line with “–ips PATH_TO_PATCH” is not working too. (linux version)

Also, it would be a nice option to add in config, to choose the location of the ips folder (per core), like for cheats i think. There are some options in config, which maybe is related to it, but i am not sure: ups_pref = “false” bps_pref = “false” ips_pref = “false”

Actually, it was a misunderstood. The “–ips” does not work for searching the ips file in the folder, you have to specify the filename. So the correct is:

retroarch -L /path/core.so ~/room/your_room.zip --ips ~/translate/your_room.ips

Now it works.

Anyway, i created a linux script to search in another folder for an .ips (if find another file, it will try to unpack it, [zip, 7z for example,] and must have the same name inside the zip also). It will work with files like this: Goof Troop (USA).eng.zip Goof Troop (USA).7z Goof Troop (USA).ips

If more then one file is found, it will use the first one.

./exec_emulator.sh “emulator command” “rom path” “translation path”

Example of a command line: ./exec_emulator.sh “retroarch -L /usr/lib/libretro/snes9x_libretro.so” ~/“Games/Roms/Snes/Goof Troop (USA).zip” ~/“Games/Roms/Snes/Translation-ips/”

The code for exec_emulator.sh


#!/bin/bash

emulator_path=$1
rom_path=$2
param3=$3

# FILENAME, EXTENSION
file=$(basename "$rom_path")
filename="${file%.*}"
extension="${file##*.}"

# CHECK --ips PARAM
if [ $param3 ]; then
    # FIND ips FILE > SEARCH SIMILAR NAME
    #find "$param3" -maxdepth 1 -type f -name "$filename"'.*' | while read -r path
    while read -r path
    do
        trans_file=$(basename "$path")
        trans_extension="${trans_file##*.}"
        if [ $trans_extension = "ips" ]; then #IPS FILE > TAKE PATH
            #cp "$path" /tmp/ #IPS FILE > COPY
            ips_file="--ips=$path"
        else #COMPRESSED IPS FILE > EXTRACT TMP
            #/usr/bin/7z x -y -o/tmp/ "$path"
            ips_file="--ips=/tmp/$filename.ips" #POINT NEW IPS FILE ON TMP
        fi
        break # EXIT LOOP ON FIRST MATCH
    done <<< "$(find "$param3" -maxdepth 1 -type f -name "$filename"'.*')"
fi

#EXECUTE EMULATOR
$emulator_path "$rom_path" "$ips_file"