cf6080af286c66d11fff7f9d97fd8bf480f4cecb
Adds six new core options for individually scaling the output of each emulated Famicom expansion-audio chip: - fceumm_apu_fds - Famicom Disk System 2C33 wavetable - fceumm_apu_s5b - Sunsoft 5B (YM2149F clone) - fceumm_apu_n163 - Namco 163 - fceumm_apu_vrc6 - Konami VRC6 - fceumm_apu_vrc7 - Konami VRC7 (YM2413-clone) - fceumm_apu_mmc5 - Nintendo MMC5 PCM + square Each is a 0..100 range in steps of 5: 100 (default) is the unscaled output and is bit-identical to pre-patch builds; 0 silences the chip; intermediate values do (sample * vol) / 256 with vol in the internal 0..256 range used by the existing per-NES-APU-channel TriangleVolume / SquareVolume / NoiseVolume / PCMVolume fields. The original report (#512) asked for on/off toggles; the followup asked for volume. This implements volume - on/off falls out as the endpoints (0/100) of the same control, matching what fceumm_next exposes. The three rare PCM/speech chips mentioned in the original report (NEC uPD7755C/56C Jaleco, Mitsubishi M50805 Bandai) are not included; they're outside fceumm_next's scope as well and not all of those chip emulations have a clean output stage to wrap. Implementation: - One new int[6] in FSettings (fceu.h) and an init loop in fceu.c that sets all six slots to 256 on startup. Matches the existing per-NES-APU per-channel volume convention so the default mixing path stays unchanged. - One enum (SND_FDS..SND_MMC5, sound.h) and one helper, GetExpOutput (sound.c), that wraps the per-channel scale. Fast path on the default value 256 returns the input unchanged with no multiply, so the hot mixing loops keep the same instruction sequence as before. - Each of the six chip's audio module wraps its output amplitude through GetExpOutput(SND_XXX, amp) at the point where the computed sample is written into Wave[] / WaveHi[]. For VRC7 the wrap is a small dispatch helper (VRC7Mix) that defers to plain OPLL_fillbuf at vol=256 and falls back to a local mix loop calling OPLL_calc when scaling is needed - this keeps the default path identical to before the patch. For the FDS module the wrap is at the cached sample-out point, reusing the same site (and reinstating the GetOutput-style scaling that the recent MDFN backport had to drop for lack of the API). - libretro.c's check_variables polls the six new options at the same point it polls the existing fceumm_apu_1..5 bitmask, via a small {SND_XXX, "fceumm_apu_xxx"} table. Validation on Vs. Excitebike (Japan) FDS, 9000-frame headless capture: - default (no opts set): md5 9c62be1651... - --opt fceumm_apu_fds=100: md5 9c62be1651... (bit-identical) - --opt fceumm_apu_s5b=0 ... mmc5=0: md5 9c62be1651... (no-op on FDS-only game) - --opt fceumm_apu_fds=50: race-window amplitude std 7662 -> 5623, FDS contribution scales linearly within integer rounding (RMS error 30 of 5547) - --opt fceumm_apu_fds=0: race-window std 7662 -> 4457, FDS muted A non-FDS test ROM (mapper 64, Skull & Crossbones) runs cleanly with arbitrary expansion-chip options set - those values are no-op for the chip the game doesn't use. Performance: GetExpOutput is one bounds check, one array load, one compare, and on the default value an immediate return. The mixing loops compile to the same hot path as before for default settings. Non-default values add one multiply + one shift per sample, which is the same cost the per-NES-APU per-channel scaling already pays.
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
Languages
C
97.7%
Python
2%
C++
0.2%