Page 2 of 2

Re: DevSound discussion

Posted: Fri Mar 01, 2019 4:40 am
by ISSOtm
I have a nearly-finished DevSound refactor that uses macros to avoid duplicating code between handling each channel - it's not complete because I can't wrap my head around some details in CH4, and DevEd is busy so I'm help-less (pun intended). I can publish it here, if there's interest.

Re: DevSound discussion

Posted: Fri Mar 01, 2019 10:54 am
by dougeff
macros
Maybe I'm misunderstanding your use of "macro", but to me, a macro is a compiler/assembler pattern that will ultimately assemble to a LARGER binary.

Maybe you mean something more like a subroutine of common code. That would reduce code size?

Or maybe just using macros to make the source code easier to read. ?

Re: DevSound discussion

Posted: Fri Mar 01, 2019 1:39 pm
by tepples
As I understand nullsleep's tutorial, "macros" in MML mean the same thing as "sequences" in FamiTracker. They're essentially envelopes, which MML assigns directly to a channel but FT binds to an instrument.

Re: DevSound discussion

Posted: Sun Mar 03, 2019 5:06 pm
by ISSOtm
dougeff wrote: Or maybe just using macros to make the source code easier to read. ?
The goal was to deduplicate code without increasing runtime costs, yes. Basically, all the channels share some code (mainly, the command reader and processor), so I basically made a giant `update_channel` ASM macro.