Banner
Views: 852,663,877
Time:
14 users online: Amine Retro, BoingBoing, Cheolpeoduck, ForthRightMC, Ice Man, KaidenThelens, Losoall, NerDose, OEO6, Oskise,  RussianMan, The Bluenote X, TheMorganah, underway - Guests: 52 - Bots: 74 Users: 47,015 (2,517 active)
Latest: smallroguefish
Tip: You can draw more event tiles under the default Layer 2 Event tiles on the overworld for custom use!Not logged in.
Why are SPC files always 65k?
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - Why are SPC files always 65k?
Pages: « 1 »
I feel like I remember this format just being a dump of ARAM so is it just that 64k plus a header of some kind? Seems like it would be easy to compress the data though I doubt anyone is short 64k

This thread is dumb lol
OKAY. WINDOWS SETTINGS... GAMING... XBOX GAME BAR... ENABLE
According to VGMPF:

"Unlike other console music formats, SPC doesn't store the actual sound code, but instead stores the memory of the extrapolated music files sent to S-SMP chip. This makes it much easier to rip music for SNES games, but it also has several disadvantages. For one, because an SPC file is a dump of the entire 64 KB block of memory, and not the used portion of memory, every song, even short ones, are 64 KB in size, each containing a lot of wasted space."
Yeah that's what I thought but what's the extra 1k come from? Is there a header appended to it or something?
OKAY. WINDOWS SETTINGS... GAMING... XBOX GAME BAR... ENABLE
An SPC file is not only a snapshot of the SPC700 RAM, but also of its registers and of the DSP registers. Additionally there's a header and some metadata (for example, song title, artist, etc.). The entire format is documented here.
Wouldn't the 64 vs 65 difference also depend on whether you think of a kb as 1000 or 1024 bytes?

For example, if you have 65536 bytes of aram, you could either do:
65536/1000 = 65.536 kB
Or
65536/1024 = 64 KB
Iirc Windows uses 1024, while many other things use 1000. That could alone explain the 64 vs 65 difference, though as KevinM said there is extra data inside apart from aram, so that inflates it a bit. Still in Windows, when I look at an spc, I get 64 KB and some change.
I'm not an expert on this kind of stuff though so I could be missing something.
Edit: clarified some points

--------------------
Make more of less, that way you won't make less of more!
Looking at a bunch of SPC files I have, it looks like they're all in the range of 66000-66200 bytes (I never noticed they have variable size), which is about 64.5KiB (KiB = 1024 bytes). So I guess depending on your OS it could be shown as 64KiB or 65KiB if the size is rounded. (This also made me realize that MacOS uses KB rather than KiB, since on my pc SPC files are shown as 66KB).
Yeah, all SPC files will have a minimum of 0x10200 (66048 decimal) bytes, with potential to have additional bytes in the form of Extended ID666, or xid6 for short. xid6 holds tags longer than can be stored in the file's header, and tags that aren't present in the header at all. AMK (and afaik, any previous Addmusic) doesn't bother with xid6.

I don't think it's a huge deal that the full uncompressed ARAM is dumped to the file, due to it being only 64k. Makes it easier to read the binary too #fim{:P}
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - Why are SPC files always 65k?

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy