pinobatch / pently

Scalable music engine for NES games
zlib License
72 stars 4 forks source link

Disable effects at build time #8

Closed pinobatch closed 8 years ago

pinobatch commented 8 years ago

One objective of Pently was to make a space-efficient music engine for NROM-128 games, such as Concentration Room and Thwaite. The player in Thwaite and Zap Ruder (now called Pently 0.03) was compact, but effects added since then toward FamiTracker/FamiTone feature parity have bloated it to 1600 bytes including the period table. This is about half the size of the NerdTracker II player and nearly one-tenth the size of an NROM-128 game's PRG ROM. These effects are fine for NROM-256 and larger games, but an NROM-128 game with simple soundtrack needs may want to use ROM space occupied by unused effects for other reasons.

So I suggest adding defines to dummy out features that some users are unlikely to need, analogous to the defines that disable PAL tempo/pitch correction and enable row callbacks. The following features use a lot of ROM or have limited use cases:

This request doesn't include reducing RAM use (8-12 bytes per effect); that can happen later.

pinobatch commented 8 years ago

Disabling the vibrato effect turned out to save about 150 bytes and arpeggio 60.