Skip to content

Instantly share code, notes, and snippets.

@noromanba
Created January 1, 2012 12:40
Show Gist options
  • Select an option

  • Save noromanba/1547235 to your computer and use it in GitHub Desktop.

Select an option

Save noromanba/1547235 to your computer and use it in GitHub Desktop.
Compare NSF Music Data. Ignoring Strings Header(small nsf util like 'cmp')
@rem ===========================================================================
@rem Compare NSF Music Data. Ignoring Strings Header.
@rem @author noromanba
@rem @license MIT License http://noromanba.mit-license.org/2012
@rem @see https://gist.github.com/1547235
@rem @see http://uraran.jp/psg/nsfspec_j.txt
@rem @see http://dic.nicovideo.jp/a/nsf
@rem @see http://man.cx/cmp(1)/ja
@rem ===========================================================================
@echo off
cd %~dp0
if "%2"=="" @echo Usage: nsfcmp FILE1.nsf FILE2.nsf && exit /b 2
::TextInfoHeaderAddr=0x0E-0x6F
set PREHEAD=0x0D
set PREBODY=0x6D
cmp -n %PREHEAD% %1 %2 && cmp -i %PREBODY% %1 %2
::echo %ERRORLEVEL%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment