OK I figured it out. I chopped up rstoyguy's script for deconstructing roms, cut out the last part because at that part the files I wanted would be deleted:
from
http://forum.ppcgeeks.com/showthread.php?t=25529
Code:
@ECHO ON
@REM
@REM This file cleans up anything done prior, pulls the .nbh and renames, and slices
@REM it into a pkg'd dump. Thanks to sfaure3 and tadzio and bepe for the basis of this .bat
@REM and all the awesome tools.
@REM
@echo Processing Input.nbh
@REM
@REM Clean up anything prior
@REM
@echo Cleaning up prior runs....
@rd /s /q .\OEM
@rd /s /q .\SYS
@rd /s /q .\ROM
@rd /s /q .\Temp
@rd /s /q .\Temp2
@rd /s /q .\Output
@rd /s /q .\Logs
@mkdir .\Temp
@echo .... Done.
@echo Locating Starting .nbh...
@ren *.nbh Input.nbh
@cd .\Temp
@echo .... Done.
@echo Extracting the OS from the ROM...
@mkdir extract
@cd extract
@..\..\tools\NBHextract.exe ..\..\Input.nbh > nbhExtract.log
@REM Rename and Move OS.nb, then Clean up Junk.
@move *_OS.nb OS.nb
@move OS.nb ..
@cd ..
@rd /s /q extract
@echo .... Done.
@REM Split the ROM OS file.
@..\Tools\NBSplit.exe -titan OS.nb > nbsplit.log
@copy OS.nb.payload OS.nb.xip
@if errorlevel 1 goto error
@REM Cleaning again.
@del OS.nb.extra
@echo Pulling boot.rgu....
@start /wait ..\Tools\RomMaster.exe -x -w 5 OS.nb.xip -o xip.bin
@mkdir XIP
@start /wait ..\Tools\dumprom.exe -d XIP -x -5 xip.bin
@cd ..
@mkdir ROM
@mkdir ROM\XIP
@move Temp\XIP\boot.rgu ROM\XIP
@cd Temp
@rd /s /q .\dump
@rd /s /q .\XIP
@copy OS.nb.payload ..\ROM\8004000-OS.nb
@echo ... Done.
@REM Cleaning again.
@del OS.nb
@del xip.bin
@del OS.nb.xip
@echo Creating imgfs.bin...
@..\Tools\ImgfsFromNB.exe OS.nb.payload imgfs.bin > imgfsfromnb.log
@if errorlevel 1 goto error
@echo Building the dump folder....
@..\Tools\ImgfstoDump.exe imgfs.bin > imgfsdump.log
then look in temp/dump and all the files will be there, waiting to be accessed.