分享一个使用xdelta制作rom补丁/打补丁的技巧

三级用户 aadream 4天前 438

https://github.com/jmacd/xdelta


适用场景: 你有个redump格式或者no-intro格式的rom, 汉化组发布了一个新游戏, 压缩后4G, 只有百度云而你没有百度云会员只能80kb/s下载的时候, 可以找找有没有热心网友制作一个汉化补丁


或者你准备发一个改版游戏或者汉化游戏, 不想上传4G到百度云为难别人, 可以用redump的rom和汉化好的rom做比对, 制作出增量补丁, 然后公开发布


简单使用方法

make patch:

  xdelta3.exe -e -s old_file new_file delta_file

apply patch:

  xdelta3.exe -d -s old_file delta_file decoded_new_file


举个例子

.rw-r--r-- yazi yazi 4.2 GB Tue Dec 24 23:32:00 1996  'Super Robot Taisen OG - Original Generations (Japan, Korea).iso'
.rw-r--r-- yazi yazi 4.2 GB Tue Jan 15 01:34:47 2013  超级机器人大战OGS[简体汉化v20120827][cerberus].iso

这里有两个rom, 一个redump原版的机战OGS, 一个从爱酱那里下载的汉化版rom


制作补丁的话, 只需要执行

xdelta3 -e -s "Super Robot Taisen OG - Original Generations (Japan, Korea).iso" "超级机器人大战OGS[简体汉化v20120827][cerberus].iso" SRWOGS_CN.xdelta

补丁大小和制作补丁时间

.rw-r--r-- yazi yazi 2.0 MB Tue Oct  8 12:31:30 2024  SRWOGS_CN.xdelta

xdelta3 -e -s   SRWOGS_CN.xdelta  1.72s user 2.87s system 91% cpu 5.004 total

5秒和2MB~


给rom打补丁和打补丁花费时间

xdelta3 -d -s "Super Robot Taisen OG - Original Generations (Japan, Korea).iso" "SRWOGS_CN.xdelta" "SRWOGS_CN.iso"

xdelta3 -d -s  "SRWOGS_CN.xdelta" "SRWOGS_CN.iso"  1.19s user 4.50s system 96% cpu 5.924 total

同样只需要5秒


验证一下原汉化rom和打补丁的rom


屏幕截图_20241008_123904.png

文件摘要是一致的, 说明文件内容相同


屏幕截图_20241008_124014.png

那自然打好补丁的rom也可以正常运行


上一篇:今年最佳股民出现了
下一篇:Switch更新19.0.0系统
最新回复 (5)
  • 三级用户 aadream 4天前
    1 2
    其实xdelta普遍使用在app和手游的增量更新上, 我是用了retroachievement的系统之后才了解到这个技术...

    目前貌似没有模拟器支持在运行时加载xdelta补丁, 有点可惜, 不然的话以后可以只收藏redump和no-intro的rom了, 汉化游戏留个补丁就行
  • 四级用户 ruanxiaorui 4天前
    0 3
    学到了 感谢分享
  • 四级用户 chenhandong126 4天前
    0 4
    xdelta和ips是啥区别呢
  • 三级用户 aadream 4天前
    0 5
    chenhandong126 xdelta和ips是啥区别呢
    IPS it's the most common format but doesn't enforce checksum checks, can't be used for games over 16MB, and doesn't encrypt the data (if the game patch contains some copyright material data, cannot be submitted to ROMhacking.net) Cannot handle unchanged data moving around the patching process treats the whole data as "changes"
    It's probably the format that it's supported the most by the emulators.

    UPS validates the ROM checksum, supports any ROM sizes, can expand ROM size, and also have the functionality of reverting a patched ROM into its original form by using the same patch file. Cannot handle unchanged data moving around the patching process treats the whole data as "changes"

    xdelta validates the ROM checksum, supports any ROM sizes, supports unchanged data moving around, only certain addresses are checked while patching, generates small patch sizes.

    BPS was designed to improve and replace IPS\UPS and xdelta, generates smaller size patches, validates the ROM checksum, supports any ROM sizes, and can expand ROM sizes, the same patch can be applied for headered and unheadered SNES ROMs, and it was created by the legendary byuu\near

    TLDR:
    Anything it's better than IPS
    BPS it's probably the best patch format, just needs more awareness and emulators support, xdelta it's good option also.


    国外reddit老哥的总结, ips不支持16mb以上的rom, 不检查文件一致性, 不会处理未改变的内容
  • 三级用户 aadream 4天前
    0 6
    看上去貌似bps是最好的补丁形式

    https://docs.libretro.com/guides/softpatching/
    libretro的一些核心可以动态打补丁, 但是都是卡带格式的游戏, 最多也只支持sfc/md/gba, 这些rom都很小, 感觉意义不是很大....

    啥时候能支持cd格式的游戏就好了, 比如ps ps2 ss dc啥的
    • 老男人游戏网配套论坛
      7
        立即登录 立即注册
发新帖
本论坛禁止发布SWITCH和PS4相关资源,若有其他侵权内容,请致邮3360342659#qq.com(#替换成@)删除。