libretroadmin 3f23e2b98f sound: fix noise LFSR power-on state to match real hardware (fixes #466)
The internal noise shift register in this file uses a bit-reversed
layout vs the canonical nesdev wiki model: output is read from bit 14
(not bit 0), the feedback taps are at 13/14 in long mode and 8/14 in
short mode (mirrors of 0/1 and 0/6), and the register shifts left
rather than right.  The algorithm is algebraically equivalent to the
wiki form, but the power-on state has to be mirrored as well.

Real hardware initialises the LFSR to $0001 with bit 0 set.  Under
this file's mirroring, the equivalent state has bit 14 set - i.e.
nreg = 0x4000, not nreg = 1.  Starting at 1 placed the LFSR 14 steps
off-phase from real hardware in long mode and at an entirely
different position in the 93-cycle short-mode loop.

Reported by NSFPlay author Brad Smith (rainwarrior) comparing
moon8.nes audio against Mesen.  Reproduced via headless libretro
harness with per-channel solo bisection against negativeExponent's
fceumm_next branch (which uses the un-mirrored nesdev layout):

  channel    RMS diff vs _next (noise solo, 22-60s window)
  -------    ----------------------------------------------
  square1                1   ( 0.4%) - bit-identical
  square2                1   ( 0.4%) - bit-identical
  triangle             178   (14.0%) - minor difference
  noise               1914   (125.8%) - completely off
  dmc                    2   ( 0.4%) - bit-identical

After this patch the noise-solo RMS drops to 6 (0.4%), bringing the
noise channel into bit-exact agreement with _next/Mesen/NSFPlay.
Full-mix moon8 audio RMS vs _next falls from 1135 to 126 across the
60-second test.
2026-06-14 18:43:14 +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%