Advertisement
Guest User

The .sfrom Header Format Conclusions - DarkAkuma

a guest
Oct 9th, 2017
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. My sfrom Header Format Conclusions - DarkAkuma
  2.  
  3. After trial-n-error, and a bit of research from https://www.3dbrew.org/ 3DS and WiiU wiki's, the format of the SNES Classic has been determined to be the following. It's not EXACTLY the same, but often similar enough.
  4.  
  5. Header 1:
  6.  
  7. Addr: Size: Description:
  8. 0x00 0x04 Always 0x00000100
  9. 0x04 0x04 File size (Including ROM, Headers, PCM audio samples region, PCM audio samples index, and SDD-1 graphics data if present.)
  10. 0x08 0x04 Always 0x00000030
  11. 0x0C 0x04 End of the ROM region (not the file) / PCM audio samples region start.
  12. 0x10 0x04 Start of the footer region (Index for the PCM audio samples). Set to the end of the file or Header3 if using SDD-1 graphics data, if not using PCM audio.
  13. 0x14 0x04 Points to the Header2 (starts with 3C generally)
  14. 0x18 0x04 End of the file or Header3 if using decompressed SDD-1 graphics data.
  15. 0x1C 0x04 Always 0x00000000
  16. 0x20 0x04 Points to Header2:0x1B.
  17. 0x24 0x08 SNES Classic/3DS/Wii U Virtual Console Game ID (WUP-J**X, X = title region (J=Japan, E=US, P=Europe))
  18. 0x2C 0x04 Always 0x00000000
  19.  
  20. Header 2:
  21.  
  22. Addr: Size: Description:
  23. 0x00 0x01 Emulation speed in FPS (always 0x3C in official VC, maybe 0x32 for PAL smc/sfc conversions)
  24. 0x01 0x02 Always 0x0000. Might be part of the following ROM size.
  25. 0x03 0x01 ROM size (In Mbits? I'm not great with Mbit. Rounding up seems to work fine.)
  26. 0x04 0x01 Always 0x00. Might be part of the previous ROM size.
  27. 0x05 0x03 Size of the converted PCM audio samples region (starting after ROM). 0x000000 if PCM data is not used.
  28. 0x08 0x01 Always 0x00. Might be part of the previous PCM audio region size.
  29. 0x09 0x02 PCM footer region size. 0x0000 if PCM data is not used.
  30. 0x0B 0x02 Always 0x0000. Might be part of the previous PCM footer size.
  31. 0x0D 0x02 Game Preset ID? 0x10XX = Early VC releases, 0x11XX range = Mostly Capcom games, 0x12XX range = Super FX games.
  32. 0x0F 0x01 Almost always 0x02. Seems to control the amount of controllers to read input from. (Though setting it to 0x00 still lets 1 player work.)
  33. 0x10 0x01 Sound volume (Known range = 0x28-0x91. 0x64 is most common)
  34. 0x11 0x01 ROM type (0x14 = LoROM / 0x15 = HiROM)
  35. 0x12 0x01 Super FX flag (0xC0 = Super FX game. 0x00 = Anything else)
  36. 0x13 0x08 Always 0x0000000000000000
  37. 0x1B 0x04 Unknown1. Always 0x00000001 (Referred to by Header1:0x20)
  38. 0x1F 0x04 Unknown2. Always 0x00000001 ??? (This is present in every ROM except FF3)
  39. 0x23+ 0xXX Null padding to round to the next 16 bytes.
  40.  
  41. !!! Only use with SDD-1 !!!
  42. Header3:
  43. 0x00 0x04 SDD-1 (And SMRPG for no reason) uses this. Point +0x0C (12) bytes forward.
  44. 0x04 0x0C 0x000000000000000000000000 (Would you look at that... 12 bytes...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement