Last commit made on 2024-04-01
Get this branch:
git clone -b packed-ram

Branch merges

Branch information


Recent commits

282b95c... by Damien Ciabrini

Fix CI warning due to use of old github action

803e86a... by Damien Ciabrini

nullsound: refactor nss-ssg module

84f7014... by Damien Ciabrini

nullsound: switch to LSB addition for 16bits pointers

583f49a... by Damien Ciabrini

nullsound: check validity of 8bit pointer addition

In order to optimize speed and size of Z80 code, one can do
8bit addition on 16bit pointers, assuming the result of the addition
will not change the MSB of the pointer.
This works as long as nullsound data are linked appropriately in
the Z80 address space by using the right .bndry statements.

To verify that nullsound binaries have the expected boundary
properties, add a validating script that checks that data surrounded
by labels _state_XXX_start to _state_XXX_end are always allocated
by sdld to addresses with the same MSB.

c458df3... by Damien Ciabrini

nullsound: new NSS opcode to simulate auto-envelope

Furnace has a feature that reconfigures the SSG envelope based
on the current note's frequency and a configurable quotient
numerator/denominator. This maps into the YM2610's envelope
We don't want to do math on the Z80 at runtime, so we have
to simulate this feature by precomputing the quotient prior
to playing the note at runtime.

Add a new opcode SSG_ENV_PERIOD that is inserted automatically
by in a new compilation pass.
This requires nsstool to know the autoenv configuration for the
instrument in use, so make nsstool parse the instrument section
of the Furnace module before generating NSS data.

6a540e0... by Damien Ciabrini

nullsound: rework SSG macros and how they are applied

Two major updates to how SSG macro work in nullsound:

The logic of update_ssg_macro used run macro steps for each
SSG channel and then load the mirrored state of all channels.
This is not ideal as it cannot detect when a macro is finished,
and thus it keep uploading mirrored state into the YM2610 at
every step even when not necessary.
Now the algorithm group update and load together, so it won't
load data into the YM2610 when a macro is finished.

The SSG register common to all channels must not be updated at
every tick. For instance, when doing so with the envelope channel,
this resets the envelope shape on every note, which is not the
behaviour implemented by Furnace.
Split macros into two subparts: one is only called once when the
macro is set up for a SSG channel. The other parts contains the
remaining data that must be run on every tick while a note is

ec88c52... by Damien Ciabrini

nsstool: ability to filter channels to be processed

f993ead... by Damien Ciabrini

furtool: fix detune format conversion for YM2610

Furnace stores the detune parameter of a FM instrument in
a different way as what is natively supported by the YM2610.
Convert the value in the generated instrument data to fix
the discrepancy.

3777c29... by Damien Ciabrini

nullsound: add NSS opcode for FM volume

4a1757f... by Damien Ciabrini

furtool: do not export generated macro load functions

macro load functions are named after the order of the instrument
in the module, but they are not unique across modules.

make the macro name static to their file, so that the linker
can link multiple musics in a single IHX without name conflicts.