Guest User

ea_schl_movie_demuxer.bms

a guest
Jul 31st, 2018
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. # EA SCHl movie demuxer
  2. # for movies that include SCHl or SHxx (.vp6/mad/etc)
  3. # v1 by bnnm
  4.  
  5. ######################
  6.  
  7. get FILE_SIZE asize
  8. set OFFSET long 0
  9.  
  10. append #on
  11. do
  12. goto OFFSET
  13.  
  14. endian big
  15. get BLOCK_ID long
  16.  
  17. #todo: guess_endianness32bit for early Saturn/Mac movies
  18. # for now change next line to "endian big" for those
  19. endian little
  20. get BLOCK_SIZE long
  21.  
  22. # accept standard SCHl
  23. if BLOCK_ID == 0x5343486C || BLOCK_ID == 0x5343436C || BLOCK_ID == 0x5343446C || BLOCK_ID == 0x53434C6C || BLOCK_ID == 0x5343456C #"SCHl/SCCl/SCDl/SCLl/SCEl"
  24. log MEMORY_FILE OFFSET BLOCK_SIZE
  25. endif
  26.  
  27. # accept movie SHxx (EN/FR/GE/IT/SP/RU/JA), default EN
  28. # for movies with multiaudio uncomment your target language and comment the rest
  29. if BLOCK_ID == 0x5348454E || BLOCK_ID == 0x5343454E || BLOCK_ID == 0x5344454E || BLOCK_ID == 0x5345454E #"SHEN/SCEN/SDEN/SEEN"
  30. #if BLOCK_ID == 0x53484652 || BLOCK_ID == 0x53434652 || BLOCK_ID == 0x53444652 || BLOCK_ID == 0x53454652 #"SHFR/SCFR/SDFR/SEFR"
  31. #if BLOCK_ID == 0x53484745 || BLOCK_ID == 0x53434745 || BLOCK_ID == 0x53444745 || BLOCK_ID == 0x53454745 #"SHGE/SCGE/SDGE/SEGE"
  32. #if BLOCK_ID == 0x53484954 || BLOCK_ID == 0x53434954 || BLOCK_ID == 0x53444954 || BLOCK_ID == 0x53454954 #"SHIT/SCIT/SDIT/SEIT"
  33. #if BLOCK_ID == 0x53485350 || BLOCK_ID == 0x53435350 || BLOCK_ID == 0x53445350 || BLOCK_ID == 0x53455350 #"SHSP/SCSP/SDSP/SESP"
  34. #if BLOCK_ID == 0x53485255 || BLOCK_ID == 0x53435255 || BLOCK_ID == 0x53445255 || BLOCK_ID == 0x53455255 #"SHRU/SCRU/SDRU/SERU"
  35. #if BLOCK_ID == 0x53484A41 || BLOCK_ID == 0x53434A41 || BLOCK_ID == 0x53444A41 || BLOCK_ID == 0x53454A41 #"SHJA/SCJA/SDJA/SEJA"
  36. log MEMORY_FILE OFFSET BLOCK_SIZE
  37. endif
  38.  
  39. math OFFSET += BLOCK_SIZE
  40.  
  41. while OFFSET < FILE_SIZE
  42. append #off
  43.  
  44.  
  45. get NAME basename
  46. get EXT extension
  47. string NAME += EXT
  48. string NAME += ".sng"
  49. get SIZE asize MEMORY_FILE
  50.  
  51. if SIZE == 0
  52. print "File doesn't contain audio"
  53. cleanexit
  54. endif
  55.  
  56. log NAME 0 SIZE MEMORY_FILE
Add Comment
Please, Sign In to add comment