Skip to content

Incorrect GO4K_FSTG_ID when exporting songs that don't use glitch #7

@vsariola

Description

@vsariola

Working on the current master branch.

When exporting a song with a global store and without a glitch, in the exported .inc file GO4K_FSTG_ID is set to 13 but should be 12, because there is no glitch op code and thus _go4kFSTG_func is at index 12 in the go4k_synth_commands table. See here

The 'else' branch (that adds filler in case glitch is not used) was removed on purpose to maintain compatibility with pre-glitch songs, but the current exporter always exports GO4K_FSTG_ID as 13.

The 4klang.asm version in Go4kVSTI/win directory works by adding the filler but in the process breaks compatibility.

Short term solution is to export GO4K_FSTG_ID as 12 if glitch is not used, and 13 if glitch is used.

However, would it be possible to not include the function pointers in the go4k_synth_commands in case a particular unit is not used? This should even save a few bytes, right? And then give all units IDs accordingly in a running manner in the exported .inc file, in case the unit was used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions