libretroadmin bc5a7a9fec fds_apu: backport MDFN-derived modulator/carrier model (fixes #560)
The previous Xodnizel implementation modeled the FDS modulator unit's
output via a bit-serial b8shiftreg88 mechanism but omitted the
modulator's sweep-bias accumulator entirely.  Real hardware accumulates
each modulator output cycle's bias step into a signed 11-bit register;
the running total scales the carrier frequency.  Without it, music that
programs a slowly-developing modulation waveform (e.g. VS. Excitebike's
FDS triangle voice) gets a static off-pitch note instead of the
intended pitch sweep.

Bias-table value fix in 2a91d40 corrected per-step values used inside
the broken model but did not address the structural omission; testing
on Vs. Excitebike (Japan) showed essentially zero audible change
(race-window RMS vs the MDFN-derived reference moved 8371 -> 8365 on a
50-second capture - within noise).

Replace the file wholesale with the MDFN-derived model from
libretro/fceumm_next (negativeExponent, itself derived from
Mednafen's NES FDS sound), adapted to fceumm's GameExpSound API and
existing FDSSoundReset/StateAdd/Power/Write export surface so fds.c
does not change.  Differences from the _next version:
  - Uses upstream's openbus (X.DB) for FDS register read top bits
    instead of the OPENBUS=0x40 constant.
  - Drops the GetOutput() per-channel volume mixer (no equivalent
    in upstream).
  - Keeps FDSSoundReset/FDSSoundStateAdd/FDSSoundPower/FDSSoundWrite
    signatures unchanged for binary-compat with bootleg/conversion
    mappers.

Validation on Vs. Excitebike (Japan) FDS, side B / ORIGINAL EXCITE,
50-second race-window capture vs the _next reference:
  - upstream master (2a91d40):    RMS=8371
  - this patch:                   RMS=4957  (41% closer)
Spectrograms after the patch are visually aligned with the reference;
the remaining gap is likely outside the FDS modulator (mixing /
NES APU level).

Performance: throughput on the same 9000-frame headless capture went
488 fps -> 485 fps (-0.6%, within measurement noise).  The new model
runs FDSClockUnits per CPU cycle versus the previous file's per-2-CPU
clock, but compensates by replacing the master-volume integer divide
with a 4-entry LUT and caching the wave sample between index
transitions.

Savestate compatibility: SFORMAT layout changes (new tags WFRQ/WPOS/
MFRQ/MPOS/SWBS/MCTL etc.; old tags B88/CLOC/B60/B66/B68/B76/SPSG/AMPL
are dropped).  Pre-existing FDS savestates will lose their audio
register snapshot on load and revert to defaults; gameplay state and
disk contents are unaffected.
2026-06-14 20:09:13 +02:00
2024-09-23 05:55:21 -07:00
2023-01-02 19:47:36 +01:00
2026-04-02 10:14:04 +01:00
Fix
2017-12-21 20:40:28 +09:00
2014-12-23 09:50:29 +01:00
2015-08-06 13:28:43 +02:00
2025-09-03 16:20:50 +02:00
2019-06-28 23:44:06 +02:00

Build Status Build status

FCE Ultra mappers modified

FCEU "mappers modified" is an unofficial build of FCEU Ultra by CaH4e3, which supports a lot of new mappers including some obscure mappers such as one for unlicensed NES ROM's.

Sequential targets Light Guns support added

Support for Sequential targets Light Guns has been added. "Gun Aux A" serves as light sensor logic input.

Description
Pinned internal source mirror of libretro/libretro-fceumm for Supergame releases
Readme 4.3 MiB
Languages
C 97.7%
Python 2%
C++ 0.2%