Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vsariola opened this issue Apr 7, 2020 · 0 comments
Open

Comments

@vsariola
Copy link

vsariola commented Apr 7, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant