Views: 737,895,919
19 users online: BlooberryPi, cosmo, o Deeke, ECS.98, Fostelif, Fullcannon, Haidar, idol, killerofkings07, Knucklesfan, Kusrry, MM102, noodle7077, RollingRigatonis, Ruberjig, Rykon-V73, tchfunkta, Tob, vandread83 - Guests: 70 - Bots: 190Users: 38,822 (1,928 active)
Latest: DanielDonut
Tip: Read the F.A.Q. before/after registering.Not logged in.
optimizing and producing lowest insert size
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - optimizing and producing lowest insert size
Pages: « 1 »
Hi all,
I'm sure some or even all of this has been asked before, but I have a couple questions about optimization and how best to reduce the insert size of a port.
1. Loop start and loop end commands take up some space (haven't read enough about the hex commands to learn exactly how they work). And IIRC superloops and label loops take up more than regular loops though I could be wrong. In any case, if you have a loop that has a few commands and it's only used a couple times, you'll actually have a bigger insert size. Something like [c]4 would be larger than c c c c. I think deciding whether looped or unlooped is smaller would depend on working out how many bytes the data would be in a loop or expanded form, and obviously whichever version is smaller is the one you use. I'm just not sure how to work that out.

2. Using the ^ command to tie notes together. I remember playing with this a few months back, and discovering that the use of ^ doesn't affect insert size for me. So, you could use c16^16^16^16 or c4, and they would both be the same insert size. Is this accurate enough to be relied on, say, for breaking syncopated rhythms to make writing them easier if you are doing things by hand? It seems to be, but I was wondering if it's still more efficient on ram to not use ^ unless it's actually necessary.

Those are the two big things that I've been thinking about as I've worked on ports. I also have another question about sample groups, but I'll save it for later I think. Any tips/advice is welcome!

Make more of less, that way you won't make less of more!
Loop start takes 4 bytes (E9 XXXX YY, XXXX-address, YY-number of loops) and the end takes 1 byte (00-end of data). Label loop is just only a copy of the loop start. Not sure about the superloops.
Also I think that the length and q are redefined in every loop.

I'm sure that AMK actually optimizes the ^s, by for example changing ^16^16 into ^8 or c4^8 into c=72 (also c1 doesn't exist, it's actualy c2^2).

Check out Team Hack Fix/Translations' thread full of fixed and translated SMW hacks!

Tag (div) was not opened.
Yeah I thought the longest note you could have was a half note and anything longer would be tied together which would take more bytes. The readme does say something about some commands not working with notes longer than 80 ticks though, which would be 16 ticks less than a half note. Not sure if that has to do with the same thing.

Make more of less, that way you won't make less of more!
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - optimizing and producing lowest insert size

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

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

Total queries: 25


Follow Us On

  • Facebook
  • Twitter
  • YouTube


  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • MFGG
  • Gaming Reinvented