+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Creating an NDS Patch
Pages: [1]
Author Topic: Creating an NDS Patch  (Read 2 times)
Blazer
Guest
« on: September 09, 2008, 03:41:20 pm »

Quote
I'm going to be straightforward. I need to create a patch for an NDS ROM-- the original and the compiled ones are very different and things like Tsukiyomi (.UPS patcher) won't work. I've heard of things like XDelta however after using the search feature and google I have not come up with much. Help is appreciated.

Quote
A 'patch' that will look at the differences between 2 ROMs and apply the differences to the original ROM to create the new ROM. As said, .ups won't work because I have edited the files in the decompiled ROM folders rather than directly editing through 64 MB of a ROM.

Simple explanation: I made a hack. I want to share this hack with others. I want to make a patch (like .ips, but not IPS Tongue) but do not know how, and I need help. Hopefully you guys can help me unlike some other forums.. xP
Ryusui
Guest
« Reply #1 on: September 09, 2008, 03:52:05 pm »

Use xdelta.

Code:
xdelta -e -s unmodified_rom.nds modified_rom.nds patch_file.pat

Just replace the filenames as appropriate. You might also want to supply xdelta itself and a batch file with your patch:

Code:
xdelta -d -s unmodified_rom.nds patch_file.pat modified_rom.nds
DarthNemesis
Guest
« Reply #2 on: September 09, 2008, 08:26:46 pm »

Create Patch.bat
Code:
@echo off
if "%~1"=="" goto help
echo Creating patch...
"%~dp0xdelta" -efs "%~dp0unmodified_rom.nds" %1 "%~dp1patch_file.pat"
echo Done!
goto end

:help
echo Usage: Drag modified rom onto this file to create a patch.

:end
echo.
pause
cls

Apply Patch.bat
Code:
@echo off
if "%~1"=="" goto help
echo Patching...
"%~dp0xdelta" -dfs %1 "%~dp0patch_file.pat" "%~dpn1-patched%~x1"
if %ERRORLEVEL%==9009 goto missingxdelta
if %ERRORLEVEL%==1 goto patchfailed
echo Done! The patched file has been created in the same folder as the original.
echo If the patch does not work, make sure that you applied it to the original,
echo unpatched, untrimmed ROM.
goto end

:missingxdelta
echo.
echo Unable to find the xdelta patching utility. Make sure that you extract all
echo of the patch files to the same folder before running this.
goto end

:patchfailed
echo.
echo The xdelta patching utility was unable to apply the patch. Make sure to use the
echo original (unpatched, untrimmed) ROM and extract all of the patch files to the
echo same folder before running this.
goto end

:help
echo You're almost there, but don't try to open the Drop Rom Here file by itself.
echo To patch your game, close this window and drag the original (unpatched,
echo untrimmed) ROM onto the Drop Rom Here file. The patched ROM will be created in
echo the same folder as the original, with a different name.

:end
echo.
pause
cls

Replace unmodified_rom.nds and patch_file.pat with whichever filenames you decide to use.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC