Commit graph

4908 commits

Author SHA1 Message Date
tildearrow
7490afb810 update copyright year 2026-01-14 17:45:21 -05:00
tildearrow
a862a8ae59 dev242 - OPL4: add options for default FM/PCM leve
issue #2711
2026-01-13 19:08:05 -05:00
tildearrow
60f384f0b0 .ftm import: disregard wave pos effect wiyh val 7F
issue #2476
2026-01-13 17:38:35 -05:00
tildearrow
ca7b63e378 YM2612: don't send VGM stream commands if muted
issue #2752

muted channels not being written in export is the actual issue
2026-01-13 14:54:47 -05:00
tildearrow
b9707a224a AY: fix duplicate register writes in fillStream
issue #2606
2026-01-13 14:42:37 -05:00
tildearrow
857d178860 OPN/A/B: fix PCM and timer FX rates
unfortunately lowest divider (prescaler) is broken in LLE
2026-01-13 03:34:42 -05:00
tildearrow
1692114deb AY: fix timer FX on AtomicSSG
the bus was becoming saturated
2026-01-13 02:56:26 -05:00
tildearrow
9008fb46cc ES5506: fix NOTE_ON and NOTE_PORTA in same tick
issue #2690
let's hope this doesn't break anything else
2026-01-13 02:13:58 -05:00
tildearrow
6be75e4141 OPN/A/B: fix SSG writes using YM2608-LLE core
issue #2746
2026-01-12 19:08:34 -05:00
tildearrow
2c9251945f OPN/OPNA: fix timer FX on ymfm core
issue #2738
don't delay PSG writes
2026-01-12 14:12:03 -05:00
tildearrow
378ba6fe80 hide soft panning effects on hard panning chips
issue #2739
2026-01-11 19:06:58 -05:00
tildearrow
913457be40 MSM5232: fix multi-threaded audio 2026-01-11 00:49:33 -05:00
tildearrow
3c043bd100 pad ADPCM-A/B samples to 256 bytes upon conversion
issue #1910
also warn if the sample is an ADPCM-A or ADPCM-B one and it is not padded
2026-01-10 18:58:06 -05:00
tildearrow
5acb17200a cmdStream: implement panbrello and pan slides 2026-01-10 18:07:53 -05:00
tildearrow
f3e52c03f7 cmdStream: fix tremolo pos not reset upon 0 2026-01-10 04:39:28 -05:00
tildearrow
bf90505e94 FUCUSKVKCFKUCFKC 2026-01-10 03:48:00 -05:00
tildearrow
ef11c2bf97 implement tremolo in command stream player 2026-01-10 03:44:58 -05:00
Eknous-P
192bd8a5ff use absolute values for per-chip peaks and zero out when engine not running 2025-12-30 00:04:52 +04:00
tildearrow
79fa3aba35 remove remnants of legacy sample mode 2025-12-12 04:13:12 -05:00
tildearrow
83f7c80176 audio export: fix per-chip export 2025-12-06 05:03:40 -05:00
tildearrow
eca315b99a prepare for supporting channel count in user syste
ms
2025-11-24 20:48:22 -05:00
tildearrow
6473b5bd12 dev241 - bump version number 2025-11-23 05:14:50 -05:00
tildearrow
aba4744977 DO NOT READ A ZERO POINTER TO GROOVE 2025-11-23 02:27:42 -05:00
tildearrow
36b321794f FIX GROOVE SAVING!!!! 2025-11-23 02:25:10 -05:00
tildearrow
d4f2130650 FIX CRITICAL ISSUES WHEN LOADING
- compat flags not loading
- song comment disappearing
2025-11-23 02:08:29 -05:00
tildearrow
87da7a5f40 IT import: possibly fix channel count 2025-11-21 20:26:04 -05:00
tildearrow
6ad8a0893b dev240 - Merge branch 'inf2' - READ
this introduces several major changes to Furnace. I hope this message explains everything.

**File Format Changes**

a new song info header (`INF2`) has been introduced, which:
- cleans up the mess I made when adding sub-songs to Furnace
- allows better forward compatibility and extensibility
- uses 16-bit chip IDs
- moves compatibility flags to another block and is stored as a DivConfig
- stores channel count in the file, allowing chips with dynamic channel count (e.g. Namco 163)

a new sub-song data block has been introduced as well.

check out papers/format.md for information.

**Furnace Changes**

TimeBase ("Divider" in the UI) has been REMOVED. it was a DefleMask leftover.
to compensate, the speeds are now 16-bit. older songs will have their speeds converted, but this may fail if you use grooves or change speed mid-song.

dynamic channel count support has been added. the following chips are currently supported:
- Namco 163 (1-8 channels)
- ES5506 (5-32 channels)
- Generic PCM DAC (1-128 channels, with software mixing!)

channel colors have been added (thanks Eknous!).

SegaPCM (compatible 5-channel mode) and Neo Geo CD have been REMOVED. when loading previous files, including .dmf ones, these will have compatible SegaPCM and Neo Geo CD chips converted to normal SegaPCM and YM2610 respectively.
their channel count remains unaltered though. you can fix this by going into the chip manager and clicking the button next to "irregular channel count" in each chip config section.

**Code Changes**

a couple refactors have been made for the sake of code cleanliness and depending less on DivEngine...

=> Chip Channel Count

two new values, adjacent to the channel count, have been added to DivSysDef.
these specify the minimum and maximum channel count for a chip.

if your chip doesn't require dynamic channels, feel free to set these to the channel count.

for example, here's an old definition:

```
sysDefs[DIV_SYSTEM_NES]=new DivSysDef(
  _("NES (Ricoh 2A03)"), NULL, 0x06, 0x06, 5 /* channel count*/, false, true, 0x161, false, (1U<<DIV_SAMPLE_DEPTH_1BIT_DPCM)|(1U<<DIV_SAMPLE_DEPTH_8BIT), 0, 0,
  ...
```

and here's how it looks now:

```
sysDefs[DIV_SYSTEM_NES]=new DivSysDef(
  _("NES (Ricoh 2A03)"), NULL, 0x06, 0x06, 5 /* nominal channel count*/, 5 /* min channels */, 5 /* max channels */,
  false, true, 0x161, false, (1U<<DIV_SAMPLE_DEPTH_1BIT_DPCM)|(1U<<DIV_SAMPLE_DEPTH_8BIT), 0, 0,
  ...
```

=> New Channel Definition

a new way to define chip channels has been introduced, replacing the old one.
it looks cleaner and is more flexible (even supporting dynamic channel count).

it works by defining a function in the chip definition, which returns a DivChanDef with channel information (name, short name, type and instrument type(s)).
alternatively, a list can be provided in the DivChanDefFunc() constructor, in the event channels differ greatly and/or the number of channels is small.
for example, if your chip's channel definition code looked like this:

```
{_("Pulse 1"), _("Pulse 2"), _("Triangle"), _("Noise"), _("DPCM")}, // names
{"S1", "S2", "TR", "NO", "DMC"}, // short names
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_WAVE, DIV_CH_NOISE, DIV_CH_PCM}, // types
{DIV_INS_NES, DIV_INS_NES, DIV_INS_NES, DIV_INS_NES, DIV_INS_NES}, // ins types
{DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_AMIGA}, // secondary ins types
```

now they look like this:

```
DivChanDefFunc({
  DivChanDef(_("Pulse 1") , "S1" , DIV_CH_PULSE, DIV_INS_NES),
  DivChanDef(_("Pulse 2") , "S2" , DIV_CH_PULSE, DIV_INS_NES),
  DivChanDef(_("Triangle"), "TR" , DIV_CH_WAVE , DIV_INS_NES),
  DivChanDef(_("Noise")   , "NO" , DIV_CH_NOISE, DIV_INS_NES),
  DivChanDef(_("DPCM")    , "DMC", DIV_CH_PCM  , DIV_INS_NES, DIV_INS_AMIGA)
}),
```

some helper templates, such as stockChanDef and simpleChanDef also exist, which automatically map channel names and types regardless of count.
this is useful if all your channels happen to be named "Channel 1", "Channel 2" and so on, while sharing the same type and instrument type (this is the case for many sampler chips).

if you've been working on a custom chip, make sure to adapt your chip definitions.

=> More Chip Definition Changes

the DivSystem enum is now in src/engine/sysDef.h

channel definitions are cached in the DivSong.

=> Reducing Dependency on DivEngine

many functions have been moved away from DivEngine where possible. these include:

- recalcChans() (now on DivSong)
  - chans, sysOfChan, dispatchOfChan, dispatchChanOfChan and dispatchFirstChan have been moved to DivSong as well.
- asset dir storage/modification/check finctions (now on src/engine/assetDir.cpp)
- DivEngine::getSystemDef() is now a static function, so it can be called without a DivEngine (engine still has to initialize systems first!)

IMPORTANT: hasLoadedSomething is no longer set in recalcChans() because it is part of DivEngine. if you have import code, MAKE SURE TO SET hasLoadedSomething TO true AFTER SWITCHING THE SONG (song=ds).

=> Dynamic Channel Count

a new array called systemChans[] has been added to DivSong, allowing you to define the number of channels for each chip.
if you change this, make sure to call recalcChans() afterwards.

if you use dispatchChanOfChan[], treat `-1` as "no channel". this is set when the channel count is higher than the chip's maximum.

if you're working on import code, and are certain you won't use dynamic channel count, call DivSong::initDefaultSystemChans() before recalcChans(). this will set up default channel counts for you.
otherwise, set systemChans[] appropriately.
2025-11-21 11:26:27 -05:00
tildearrow
c3394594a6 giga-refactor, part 21
store channel colors!
2025-11-21 11:08:13 -05:00
tildearrow
fea3bab550 Merge branch 'chanColorsEtc' into inf2 2025-11-21 10:51:44 -05:00
tildearrow
1882a4f12d consider channel color for the rest of functions 2025-11-21 10:51:03 -05:00
tildearrow
47e2910498 giga-refactor, part 20
convert compat SegaPCM to normal SegaPCM with 5 channels
convert Neo Geo CD to YM2610
2025-11-21 04:58:56 -05:00
Eknous-P
62afabbc0b GBA DMA: initalize wtMem to 0 on reset 2025-11-21 13:09:38 +04:00
tildearrow
26993d2b40 giga-refactor, part 19
fix Namco 163 stuff
2025-11-19 19:35:18 -05:00
tildearrow
5f2c309abd IT/S3M/XM import: use systemChans 2025-11-19 19:00:39 -05:00
tildearrow
caea061cbb giga-refactor, part 17
don't clear chip flags when changing channel count
2025-11-19 01:47:14 -05:00
tildearrow
bdd916a4c7 PCM DAC: fix mixing 2025-11-18 15:40:53 -05:00
tildearrow
5032394507 giga-refactor, part 16
fix ds.chans not being set when loading old .fur
2025-11-18 03:27:37 -05:00
tildearrow
8f7fd0a229 Merge branch 'master' into inf2 2025-11-18 03:12:11 -05:00
tildearrow
0bae94ad2c fix certain issues with TimeMicros 2025-11-18 02:51:20 -05:00
tildearrow
8138a3c252 fix legacy sample conversion for Y8950 2025-11-18 01:19:56 -05:00
tildearrow
cb72e3e46f fix DIV_PAT_IS_EFFECT 2025-11-17 23:53:20 -05:00
tildearrow
1a113a4d52 giga-refactor, part 15
dynamic PCM DAC
2025-11-17 21:09:43 -05:00
tildearrow
9b35ca77c5 giga-refactor, part 14 - READ
a new way to define chip channels has been introduced, replacing the old one.
it looks cleaner and is more flexible (even supporting dynamic channel count).

it works by defining a function in the chip definition, which returns a DivChanDef with channel information (name, short name, type and instrument type(s)).
alternatively, a list can be provided in the DivChanDefFunc() constructor, in the event channels differ greatly and/or the number of channels is small.

some helper templates, such as stockChanDef and simpleChanDef also exist, which automatically map channel names and types regardless of count.
2025-11-17 19:38:45 -05:00
tildearrow
f6d0979209 don't allow chip channel count to be set to 0 2025-11-16 17:05:43 -05:00
tildearrow
663f32d9d4 giga-refactor, part 13
get rid of time base
2025-11-16 15:45:24 -05:00
tildearrow
334d8708e2 giga-refactor, part 12
loading works
2025-11-16 07:13:30 -05:00
tildearrow
94044ef210 giga-refactor, part 1
work on loading - NOT WORKING
2025-11-16 05:42:47 -05:00
tildearrow
dc0eda0445 giga-refactor, part 10
fix saving
2025-11-16 02:59:02 -05:00
tildearrow
90a9a86e09 giga-refactor, part 9
new format saving
compatibility flags now part of own struct
2025-11-16 01:41:17 -05:00
tildearrow
7bb770ad01 giga-refactor, part 7 2025-11-15 05:09:11 -05:00