Gravity Rush (PSVITA) - "sxd" files
- 
				AnonBaiter
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Gravity Rush (PSVITA) - "sxd" files
Here is a preliminary script for .sxd1/.sxd2 files. So far it supports files with looping references, but it still could use some work. Anyway, do you guys think I'm doing well with this?
EDIT: Right now, the post will become a bit too big to read because the "code" function doesn't break the lines automatically like it should. So instead, here's an attachment file.
This new revision fixes the decoding issue with at9tool.exe(not attached because I don't want a DMCA witch-hunt) by having the script perform the MATH operation of increasing(+ symbol) the output size by both 0x64(for un-looped files) and 0xa8(for looped files).
See this thread for the sxd_at9.bms script.
			
			
													EDIT: Right now, the post will become a bit too big to read because the "code" function doesn't break the lines automatically like it should. So instead, here's an attachment file.
This new revision fixes the decoding issue with at9tool.exe(not attached because I don't want a DMCA witch-hunt) by having the script perform the MATH operation of increasing(+ symbol) the output size by both 0x64(for un-looped files) and 0xa8(for looped files).
See this thread for the sxd_at9.bms script.
					Last edited by AnonBaiter on Mon Oct 03, 2016 2:01 am, edited 12 times in total.
									
			
						
										
						- 
				AnonBaiter
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Gravity Rush (PSVITA) - "sxd" files
And here is a (messy) script I wrote for .sxd files.
			
			
									
						
										
						Code: Select all
get SXD_SIZE asize
getdstring SIGN 4
get DUMMY1 short
get DUMMY2 long
getdstring DUMMY3 0x6
getdstring DUMMY4 0x10
get NAME string
set OFFSET 0x60
goto OFFSET
idstring "TONE"
get TONE_SIZE long
for
   savepos TMP
   if TMP >= TONE_SIZE
      break
   endif
   get TONE1 long
   get TONE2 long
   get TONE3 long
next
idstring "REQD"
get REQD_SIZE long
for
   savepos TMP
   if TMP >= REQD_SIZE
      break
   endif
   get REQD1 long
   get REQD2 long
   get REQD3 long
   get REQD4 long
   get REQD5 long
next
idstring "NAME"
get NAME_SIZE long
for
   savepos TMP
   if TMP >= REQD_SIZE
      break
   endif
   get NAME_ID long
   get NAME_ORDER long
   get NAME_CRC long
   get NAME string
next
idstring "WAVE"
get WAVE_SIZE long
for
   savepos TMP
   if TMP >= WAVE_SIZE
      break
   endif
   get ZERO long
   get WAVES_OFF long
   goto WAVES_OFF
   get DUMMY1 long
   get SAMPLERATE long
   get INTERLEAVE long
   get DUMMY2 long
   get FRAMES1 long
   get DUMMY3 longlong
   get BLOCKSIZE long
   get FRAMES2 long
   get DUMMY4 long
   get DUMMY5 long
   get DUMMY6 long
next
idstring "SEQD"
get SEQD_SIZE long
for
   savepos TMP
   if TMP >= WAVE_SIZE
      break
   endif
   get INSTRUMENT_ID long
   get INSTURMENT_NOTE long
   get INSTRUMENT_VOLUME long
next
idstring "DATA"
get DATA_SIZE long