[TG01 ROM Development] ffboy2009:
extreloc can port xip too!

see this:

:MENU
cls
ECHO. =-=-=-=-=XIP Porting=-=-=-=-=
ECHO.
ECHO. 1 Use MSXIPKernel porting xip!
ECHO. 2 Use new xip.BIN to porting xip
ECHO. 3 Countinue
ECHO.
ECHO. =-=-=-=-=XIP Porting=-=-=-=-=

echo. Select say to XIP PORTING：
set /p ID=
if "%id%"=="1" goto cmd1

if "%id%"=="2" goto cmd2

if "%id%"=="3" goto cmd3
PAUSE

:cmd1
del xip_out.bin
cls
echo Use MSXIPKernel porting xip!
echo Press“OK” when showing erro windows
@echo off
title XIP AUTO REPLANTING KITCHEN PROVIDED BY EXTReloc

IF NOT EXIST XIPNEW\MSXIPKernel ECHO NO MSXIPKernel IN CURRENT DIRECTORY!&PAUSE&EXIT

IF EXIST TOOLS\PACKAGE\MSXIPKernel RD /S /Q TOOLS\PACKAGE\MSXIPKernel>nul
XCOPY /y /h /r /k /e /Q /i XIPNEW\MSXIPKernel TOOLS\PACKAGE\MSXIPKernel>nul

START "" /B /WAIT "TOOLS\buildxip.bat"

::===============================================================================

CD TOOLS

IF EXIST OUT RD /S /Q OUT
IF EXIST OUT-NEW RD /S /Q OUT-NEW
IF EXIST xip_out.bin del xip_out.bin>nul

title 1.DUMPING AND PACKAGEING NEW xip.bin ...
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "dump xip.bin" /clickbutton "write maps" /clickbutton "make pkgs" /kill
DEL xip.bin>NUL
ren OUT OUT-NEW

::===============================================================================

title 2.DUMPING AND PACKAGEING LOCOLE xip.bin ...
ren my.xip.bin xip.bin
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "dump xip.bin" /clickbutton "write maps" /clickbutton "make pkgs" /kill
ren xip.bin my.xip.bin

::===============================================================================

title 3.COPYING FILES AND MODULES ...

rd /s /q OUT\FILES\MSXIPKernel>nul
rd /s /q OUT\MODULES\MSXIPKernel>nul
XCOPY /y /h /r /k /e /Q /i OUT-NEW\FILES\MSXIPKernel OUT\FILES\MSXIPKernel 1>nul 0>nul
XCOPY /y /h /r /k /e /Q /i OUT-NEW\MODULES\MSXIPKernel OUT\MODULES\MSXIPKernel 1>nul 0>nul
RD /S /Q OUT-NEW
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "undo" /kill

FOR /F "eol=; delims==" %%i in (Remove.ini) do (
IF EXIST %%i\* RD /S /Q %%i
IF EXIST %%i DEL /f %%i>nul 0>nul

)

::===============================================================================

title 4.RELOCING MODULES WITH EXTReloc ...
cd..
[COLOR="red"]TOOLS\EXTReloc.exe -dX.\TOOLS -d.\SYS -l -DllLo -relDLL -WM65[/COLOR]

cd TOOLS
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "realloc P" /clickbutton "write maps" /kill

cd..
[COLOR="red"]TOOLS\EXTReloc.exe -dX.\TOOLS -d.\SYS -relNK -WM65[/COLOR]

cd TOOLS
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "realloc P" /clickbutton "write maps" /clickbutton "build xip_out.bin" /kill

MOVE /y xip_out.bin ..\xip_out.bin
cd..

GOTO MENU

:cmd2
del xip_out.bin
cls
echo Use new xip.BIN to porting xip
echo Press“OK” when showing erro windows
@echo off
title XIP AUTO REPLANTING KITCHEN PROVIDED BY EXTReloc
IF NOT EXIST XIPNEW\xip.bin ECHO NO xip.bin IN CURRENT DIRECTORY!&PAUSE&EXIT
COPY /Y XIPNEW\xip.bin TOOLS\xip.bin>NUL
CD TOOLS

IF EXIST OUT RD /S /Q OUT
IF EXIST OUT-NEW RD /S /Q OUT-NEW
IF EXIST xip_out.bin del xip_out.bin>nul

title 1.DUMPING AND PACKAGEING NEW xip.bin ...
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "dump xip.bin" /clickbutton "write maps" /clickbutton "make pkgs" /kill
DEL xip.bin>NUL
ren OUT OUT-NEW

title 2.DUMPING AND PACKAGEING LOCOLE xip.bin ...
ren my.xip.bin xip.bin
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "dump xip.bin" /clickbutton "write maps" /clickbutton "make pkgs" /kill
ren xip.bin my.xip.bin

title 3.COPYING FILES AND MODULES ...

rd /s /q OUT\FILES\MSXIPKernel>nul
rd /s /q OUT\MODULES\MSXIPKernel>nul
XCOPY /y /h /r /k /e /Q /i OUT-NEW\FILES\MSXIPKernel OUT\FILES\MSXIPKernel 1>nul 0>nul
XCOPY /y /h /r /k /e /Q /i OUT-NEW\MODULES\MSXIPKernel OUT\MODULES\MSXIPKernel 1>nul 0>nul
RD /S /Q OUT-NEW
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "undo" /kill

FOR /F "eol=; delims==" %%i in (Remove.ini) do (
IF EXIST %%i\* RD /S /Q %%i
IF EXIST %%i DEL /f %%i>nul 0>nul

)

title 4.RELOCING MODULES WITH EXTReloc ...
cd..
[COLOR="red"]TOOLS\EXTReloc.exe -dX.\TOOLS -d.\SYS -l -DllLo -relDLL -WM65[/COLOR]

cd TOOLS
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "realloc P" /clickbutton "write maps" /kill

cd..
[COLOR="Red"]TOOLS\EXTReloc.exe -dX.\TOOLS -d.\SYS -relNK -WM65[/COLOR]

cd TOOLS
xipport\AutoExecAndClick.exe /launch "xipport\XIPPort.exe" /clickbutton "realloc P" /clickbutton "write maps" /clickbutton "build xip_out.bin" /kill

MOVE /y xip_out.bin ..\xip_out.bin
cd..

GOTO MENU