Banner
Views: 674,118,686
Time:
13 users online: blaze800000, Diego, GreenLightningx6, idol, illTANK, jona255, LHB, o Manofer, Mr. Pixelator, Nezequo, TheInsanity115, Tobio, Zandro - Guests: 56 - Bots: 104Users: 35,699 (1,391 active)
Latest: DudeTheGuyMan
Tip: The music in SMW's default castle/ghost house intros and boss battles can be changed by hex-editing. See $0584DB-$0584E2 in the ROM map.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).

--------------------
Have you ever wanted to play ASMT on something better than ZSNES/Snes9x 1.51, or even on a real SNES?
oh and A2MT too
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 - 2018 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 23

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented