[NFS Undercover N-Gage] incorrectly sorted notes in .mod

Codecs, formats, encoding/decoding of game audio, video and music
link12738
Posts: 10
Joined: Tue May 30, 2017 3:28 pm

[NFS Undercover N-Gage] incorrectly sorted notes in .mod

Post by link12738 »

--
Last edited by link12738 on Sat Dec 30, 2017 12:48 pm, edited 1 time in total.
link12738
Posts: 10
Joined: Tue May 30, 2017 3:28 pm

--

Post by link12738 »

--
Last edited by link12738 on Sat Dec 30, 2017 12:48 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [NFS Undercover N-Gage] incorrectly sorted notes in .mod

Post by aluigi »

Do you mean like this?

Code: Select all

findloc OFFSET string "8CHN"
math OFFSET + 6
goto OFFSET
get SIZE asize
log MEMORY_FILE 0 OFFSET
goto OFFSET MEMORY_FILE
append
for OFFSET = OFFSET < SIZE
    get TMP1 short
    get TMP2 byte
    math TMP1 z 8
    math TMP2 z 4
    put TMP1 short MEMORY_FILE
    put TMP2 byte MEMORY_FILE
next OFFSET + 3
append

get NAME basename
get EXT extension
string NAME + "_ok."
string NAME + EXT
log NAME 0 SIZE MEMORY_FILE
The swapping starts from offset 0x104b0 of the sample you provided because it's the only way to match the file length with the 3 bytes step, you didn't provide info about that.
link12738
Posts: 10
Joined: Tue May 30, 2017 3:28 pm

--

Post by link12738 »

--