Skip to content

Commit 1275976

Browse files
committed
rebased to upstream
1 parent f30d6c5 commit 1275976

File tree

18 files changed

+494
-122
lines changed

18 files changed

+494
-122
lines changed

README.md

Lines changed: 4 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,7 @@
1-
# FinalBurn Neo
2-
Official Forum: https://neo-source.com
1+
# FinalBurn Neo chvolmod
32

4-
Discord: https://discord.gg/8EGVd9v
3+
This fork provides extra core options for per-channel audio volume in the libretro port only.
54

6-
This is the official repository of FinalBurn Neo, an Emulator for Arcade Games & Select Consoles. It is based on the emulators FinalBurn and old versions of [MAME](https://www.mamedev.org)
5+
See the [original issue here](https://github.com/libretro/FBNeo/issues/605) and read the [full story here](http://eadmaster.altervista.org/wordpress/archives/90).
76

8-
Use of this program and its source code is subject to the license conditions provided in the [license.txt](/src/license.txt) file in the src folder.
9-
10-
# Work in Progress builds
11-
You can download the latest builds by clicking on the badge below. Please note that the downloads might not be available immediately after a new commit. As this build is of the last commit occasionally you might run into incomplete code, crashes or other issues that [official releases](https://github.com/finalburnneo/FBNeo/releases) will not have.
12-
13-
[![nightly-release](https://github.com/finalburnneo/FBNeo/actions/workflows/nightly-release.yml/badge.svg)](https://github.com/finalburnneo/FBNeo/releases/tag/latest)
14-
15-
# Ports
16-
17-
Raspberry Pi [build instructions](README-PI.md).
18-
19-
macOS [build instructions](README-macOS.md) and [releases](https://github.com/fbn-mac/FBNeo/releases).
20-
21-
[LibRetro port](https://github.com/libretro/FBNeo) with builds availble via [RetroArch](https://www.retroarch.com/) for a lot of cool platforms.
22-
23-
For SDL1.2 builds just type `make sdl` (requires SDL1.2 and GCC, make, perl and nasm) [instructions](README-SDL.md)
24-
25-
For SDL2 builds just type `make sdl2` (requires SDL2, SDL2_image, gcc, make, perl and nasm) [instructions](README-SDL.md)
26-
27-
# Reporting Issues
28-
29-
Please raise an issue on the [project GitHub](https://github.com/finalburnneo/FBNeo/issues) or report on the forums at [Neosource](https://neo-source.com)
30-
31-
# What about FB Alpha?
32-
33-
Many of the developers of this project also worked on FB Alpha. Due to a [controversy](https://www.google.com/search?q=capcom+home+arcade+illegal&oq=capcom+home+arcade+illegal), we no longer do, and recommend that everyone use this emulator instead.
34-
35-
# Contributing
36-
37-
We welcome pull requests and other submissions from anyone. We maintain a list of known bugs and features that would be nice to add on the [issue tracker](https://github.com/finalburnneo/FBNeo/issues), some of which would be a good starting point for new contributors.
38-
39-
One of the focuses of FBNeo is ensuring that the codebase is compilable on older systems. This is for many reasons, not least because older hardware still has a use outside of landfill or being stored in a recycling center, but also it can be a lot of fun porting and running FBNeo to other platforms. Currently, this means we will always aim for [C++03 compliance](https://en.wikipedia.org/wiki/C%2B%2B03) as a minimum. Any pull requests should keep this in mind!
40-
41-
## Notes on Contributions
42-
43-
In the root of the source tree there is an [.editorconfig](https://editorconfig.org/) that mandates:
44-
45-
* tabs for indentation
46-
* tabs use 4 columns
47-
48-
Please see the following function for some ideas on how naming, brackets and braces should be
49-
50-
51-
```
52-
void FunctionName(UINT8 var1, UINT16 var2)
53-
{
54-
UINT64 result;
55-
if (var1 * var2 >= 10) {
56-
result = var1 * var2;
57-
} else {
58-
result = var1;
59-
}
60-
}
61-
62-
```
63-
## Source tree structure
64-
65-
The source for FBNeo is layed out in a similar way to how things were in the days of the original FinalBurn. It's just that there are now more directories and source files as the emulator has grown significantly.
66-
```
67-
src/
68-
--/burn <-- This is where the emulation code lives
69-
----/devices <-- This is where emulated devices (EEPROMS, etc) live
70-
----/drv <-- This is where the drivers for Games and Systems live
71-
----/snd <-- This is where the emulation for sound chips and other sound generating devices live
72-
--/burner <-- This is where the frontend code lives
73-
--/cpu <-- This is where the CPU emulation lives
74-
--/dep <-- This is where external dependencies live (such as libpng)
75-
--/intf <-- This is where the platform specific code for each platform that FBNeo supports live (e.g. Video and Sound output)
76-
```
77-
## Porting FBNeo to different systems
78-
79-
In the main source tree, you will see in the intf directory various implementations for different platforms. You should look in here when porting to new platforms. We also encourage new ports, and are happy to have them merged in to the main sourcetree. There is probably a project there for someone to re-implement some of the older ports using the intf standard, should they want to.
80-
81-
For portability we define the following types
82-
```
83-
unsigned char UINT8;
84-
signed char INT8;
85-
unsigned short UINT16;
86-
signed short INT16;
87-
unsigned int UINT32;
88-
signed int INT32;
89-
signed int64 INT64;
90-
unsigned int64 UINT64;
91-
92-
```
93-
It is recommended that you take a look at the other #defines and structs in the header files in Burn and Burner, and don't forget that some of the existing code in the intf directory will come in handy for new ports.
7+
UPDATE: added another hack for [hiscores loading in all the datfile supported games](https://github.com/libretro/FBNeo/issues/702).

src/burn/burn.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ INT32 nFMInterpolation = 0; // Desired interpolation level for FM sound
6666

6767
UINT8 nBurnLayer = 0xFF; // Can be used externally to select which layers to show
6868
UINT8 nSpriteEnable = 0xFF; // Can be used externally to select which layers to show
69+
int nBurnFMSoundChannelVolumes[256]; // Can be used externally to control FM sound channel volumes
70+
int nBurnADPCMSoundChannelVolumes[256]; // Can be used externally to control ADPCM sound channel volumes
71+
int nBurnPSGSoundChannelVolumes[256]; // Can be used externally to control PSG sound channel volumes
6972

7073
INT32 bRunAhead = 0;
7174

@@ -96,6 +99,11 @@ extern "C" INT32 BurnLibInit()
9699
BurnSoundInit();
97100

98101
bBurnUseMMX = BurnCheckMMXSupport();
102+
103+
int i;
104+
for(i=0; i<16; i++) nBurnFMSoundChannelVolumes[i] = 100; // init as full volume
105+
for(i=0; i<16; i++) nBurnADPCMSoundChannelVolumes[i] = 100;
106+
for(i=0; i<16; i++) nBurnPSGSoundChannelVolumes[i] = 100;
99107

100108
return 0;
101109
}

src/burn/burn.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ extern INT32 nBurnBpp; // Bytes per pixel (2, 3, or 4)
271271

272272
extern UINT8 nBurnLayer; // Can be used externally to select which layers to show
273273
extern UINT8 nSpriteEnable; // Can be used externally to select which Sprites to show
274+
extern int nBurnFMSoundChannelVolumes[]; // Can be used externally to control sound channel volumes
275+
extern int nBurnADPCMSoundChannelVolumes[]; // Can be used externally to control sound channel volumes
276+
extern int nBurnPSGSoundChannelVolumes[]; // Can be used externally to control sound channel volumes
274277

275278
extern INT32 bRunAhead; // "Run Ahead" lag-reduction technique UI option (on/off)
276279

src/burn/hiscore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static INT32 CheckHiscoreAllowed()
154154
INT32 Allowed = 1;
155155

156156
if (!EnableHiscores) Allowed = 0;
157-
if (!(BurnDrvGetFlags() & BDF_HISCORE_SUPPORTED)) Allowed = 0;
157+
//if (!(BurnDrvGetFlags() & BDF_HISCORE_SUPPORTED)) Allowed = 0;
158158

159159
return Allowed;
160160
}

src/burn/snd/ay8910.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
#include "ay8910.h"
2525
#undef AY8910_CORE
2626

27+
extern UINT8 DebugSnd_AY8910Initted;
28+
2729
#if defined FBNEO_DEBUG
2830
#ifdef __GNUC__
2931
// MSVC doesn't like this - this module only supports debug tracking with GCC only
3032
#include <tchar.h>
31-
extern UINT8 DebugSnd_AY8910Initted;
3233
extern INT32 (__cdecl *bprintf) (INT32 nStatus, TCHAR* szFormat, ...);
3334
#define PRINT_ERROR (3)
3435
#endif
@@ -78,6 +79,8 @@ extern UINT32 nCurrentFrame;
7879
extern INT16 *pBurnSoundOut;
7980
extern INT32 FM_IS_POSTLOADING;
8081

82+
extern int nBurnPSGSoundChannelVolumes[10];
83+
8184
// Streambuffer handling
8285
static INT32 SyncInternal()
8386
{
@@ -703,7 +706,11 @@ void AY8910Update(INT32 chip, INT16 **buffer, INT32 length)
703706
if (PSG->EnvelopeC) PSG->VolC = PSG->VolE;
704707
}
705708
}
706-
709+
710+
if(nBurnPSGSoundChannelVolumes[0] < 100) vola = vola * nBurnPSGSoundChannelVolumes[0] / 100;
711+
if(nBurnPSGSoundChannelVolumes[1] < 100) volb = vola * nBurnPSGSoundChannelVolumes[1] / 100;
712+
if(nBurnPSGSoundChannelVolumes[2] < 100) volc = vola * nBurnPSGSoundChannelVolumes[2] / 100;
713+
707714
*(buf1++) = (vola * PSG->VolA) / STEP;
708715
*(buf2++) = (volb * PSG->VolB) / STEP;
709716
*(buf3++) = (volc * PSG->VolC) / STEP;
@@ -845,11 +852,7 @@ INT32 AY8910InitCore(INT32 chip, INT32 clock, INT32 sample_rate,
845852
{
846853
struct AY8910 *PSG = &AYPSG[chip];
847854

848-
#if defined FBNEO_DEBUG
849-
#ifdef __GNUC__
850855
DebugSnd_AY8910Initted = 1;
851-
#endif
852-
#endif
853856

854857
AYStreamUpdate = dummy_callback;
855858

src/burn/snd/es5506.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,18 @@ void ES5506Update(INT16 *outputs, INT32 samples_len)
899899
INT32 *pBufL = chip->scratch + 0 + 5;
900900
INT32 *pBufR = chip->scratch + 4096 + 5;
901901

902+
// TODO: fix noisy audio?
903+
double chip_volume0 = chip->volume[0];
904+
double chip_volume1 = chip->volume[1];
905+
/*
906+
if(nBurnADPCMSoundChannelVolumes[curr_voice_index]<100) {
907+
// overrides the volumes
908+
//printf("vol0=%f\n", chip->volume[0]);
909+
//printf("vol0_scaled=%f\n", chip_volume0 );
910+
911+
printf("curr_voice_index=%d\n", curr_voice_index );
912+
}*/
913+
902914
for (INT32 i = (nFractionalPosition & 0xFFFF0000) >> 15; i < (samples_len << 1); i += 2, nFractionalPosition += nSampleSize) {
903915
INT32 nLeftSample[4] = {0, 0, 0, 0};
904916
INT32 nRightSample[4] = {0, 0, 0, 0};
@@ -917,8 +929,13 @@ void ES5506Update(INT16 *outputs, INT32 samples_len)
917929
nTotalLeftSample = INTERPOLATE4PS_16BIT((nFractionalPosition >> 4) & 0x0fff, nLeftSample[0], nLeftSample[1], nLeftSample[2], nLeftSample[3]);
918930
nTotalRightSample = INTERPOLATE4PS_16BIT((nFractionalPosition >> 4) & 0x0fff, nRightSample[0], nRightSample[1], nRightSample[2], nRightSample[3]);
919931

920-
outputs[i + 0] = BURN_SND_CLIP(nTotalLeftSample * chip->volume[0]);
921-
outputs[i + 1] = BURN_SND_CLIP(nTotalRightSample * chip->volume[1]);
932+
//outputs[i + 0] = BURN_SND_CLIP(nTotalLeftSample * chip->volume[0]);
933+
//outputs[i + 1] = BURN_SND_CLIP(nTotalRightSample * chip->volume[1]);
934+
//UINT8 curr_voice_index = (&chip->voice[chip->current_page & 0x1f])->index;
935+
//chip_volume0 = chip->volume[0] * nBurnADPCMSoundChannelVolumes[curr_voice_index] / 100;
936+
//chip_volume1 = chip->volume[1] * nBurnADPCMSoundChannelVolumes[curr_voice_index] / 100;
937+
outputs[i + 0] = BURN_SND_CLIP(nTotalLeftSample * chip_volume0);
938+
outputs[i + 1] = BURN_SND_CLIP(nTotalRightSample * chip_volume1);
922939
}
923940

924941
if (samples_len >= nBurnSoundLen) {

src/burn/snd/fm.c

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@
119119
#undef AY8910_CORE
120120
#include "fm.h"
121121

122+
extern int nBurnFMSoundChannelVolumes[];
123+
extern int nBurnADPCMSoundChannelVolumes[];
124+
122125

123126
#ifndef PI
124127
#define PI 3.14159265358979323846
@@ -2350,6 +2353,10 @@ void YM2203UpdateOne(int num, INT16 *buffer, int length)
23502353
/* buffering */
23512354
{
23522355
int lt;
2356+
2357+
if (nBurnFMSoundChannelVolumes[0] < 100) out_fm[0] = (out_fm[0] * nBurnFMSoundChannelVolumes[0]) / 100;
2358+
if (nBurnFMSoundChannelVolumes[1] < 100) out_fm[1] = (out_fm[1] * nBurnFMSoundChannelVolumes[1]) / 100;
2359+
if (nBurnFMSoundChannelVolumes[2] < 100) out_fm[2] = (out_fm[2] * nBurnFMSoundChannelVolumes[2]) / 100;
23532360

23542361
lt = out_fm[0] + out_fm[1] + out_fm[2];
23552362

@@ -2699,12 +2706,11 @@ static void Init_ADPCMATable(void){
26992706
}
27002707

27012708
/* ADPCM A (Non control type) : calculate one channel output */
2702-
INLINE void ADPCMA_calc_chan( YM2610 *F2610, ADPCM_CH *ch )
2709+
INLINE void ADPCMA_calc_chan( YM2610 *F2610, ADPCM_CH *ch, int ch_no )
27032710
{
27042711
UINT32 step;
27052712
UINT8 data;
27062713

2707-
27082714
ch->now_step += ch->step;
27092715
if ( ch->now_step >= (1<<ADPCM_SHIFT) )
27102716
{
@@ -2752,9 +2758,13 @@ INLINE void ADPCMA_calc_chan( YM2610 *F2610, ADPCM_CH *ch )
27522758
}while(--step);
27532759

27542760
/* calc pcm * volume data */
2755-
ch->adpcm_out = ((ch->adpcm_acc * ch->vol_mul) >> ch->vol_shift) & ~3; /* multiply, shift and mask out 2 LSB bits */
2761+
if (nBurnADPCMSoundChannelVolumes[ch_no] == 100) {
2762+
ch->adpcm_out = ((ch->adpcm_acc * ch->vol_mul) >> ch->vol_shift) & ~3; /* multiply, shift and mask out 2 LSB bits */
2763+
} else {
2764+
ch->adpcm_out = ((ch->adpcm_acc * ch->vol_mul * nBurnADPCMSoundChannelVolumes[ch_no] / 100) >> ch->vol_shift) & ~3; /* multiply, shift and mask out 2 LSB bits */
2765+
}
27562766
}
2757-
2767+
27582768
/* output for work of output channels (out_adpcm[OPNxxxx])*/
27592769
*(ch->pan) += ch->adpcm_out;
27602770
}
@@ -3076,7 +3086,7 @@ void YM2608UpdateOne(int num, INT16 **buffer, int length)
30763086
for( j = 0; j < 6; j++ )
30773087
{
30783088
if( F2608->adpcm[j].flag )
3079-
ADPCMA_calc_chan( F2608, &F2608->adpcm[j]);
3089+
ADPCMA_calc_chan( F2608, &F2608->adpcm[j], j);
30803090
}
30813091

30823092
/* buffering */
@@ -3087,6 +3097,15 @@ void YM2608UpdateOne(int num, INT16 **buffer, int length)
30873097
rt = out_adpcm[OUTD_RIGHT] + out_adpcm[OUTD_CENTER];
30883098
lt += (out_delta[OUTD_LEFT] + out_delta[OUTD_CENTER])>>9;
30893099
rt += (out_delta[OUTD_RIGHT] + out_delta[OUTD_CENTER])>>9;
3100+
3101+
/* apply user volume scaling to FM channels*/
3102+
if (nBurnFMSoundChannelVolumes[0] < 100) out_fm[0] = (out_fm[0] * nBurnFMSoundChannelVolumes[0]) / 100;
3103+
if (nBurnFMSoundChannelVolumes[1] < 100) out_fm[1] = (out_fm[1] * nBurnFMSoundChannelVolumes[1]) / 100;
3104+
if (nBurnFMSoundChannelVolumes[2] < 100) out_fm[2] = (out_fm[2] * nBurnFMSoundChannelVolumes[2]) / 100;
3105+
if (nBurnFMSoundChannelVolumes[3] < 100) out_fm[3] = (out_fm[3] * nBurnFMSoundChannelVolumes[3]) / 100;
3106+
if (nBurnFMSoundChannelVolumes[4] < 100) out_fm[4] = (out_fm[4] * nBurnFMSoundChannelVolumes[4]) / 100;
3107+
if (nBurnFMSoundChannelVolumes[5] < 100) out_fm[5] = (out_fm[5] * nBurnFMSoundChannelVolumes[5]) / 100;
3108+
30903109
lt += ((out_fm[0]>>1) & OPN->pan[0]); /* shift right verified on real YM2608 */
30913110
rt += ((out_fm[0]>>1) & OPN->pan[1]);
30923111
lt += ((out_fm[1]>>1) & OPN->pan[2]);
@@ -3674,18 +3693,23 @@ void YM2610UpdateOne(int num, INT16 **buffer, int length)
36743693
for( j = 0; j < 6; j++ )
36753694
{
36763695
if( F2610->adpcm[j].flag )
3677-
ADPCMA_calc_chan( F2610, &F2610->adpcm[j]);
3696+
ADPCMA_calc_chan( F2610, &F2610->adpcm[j], j);
36783697
}
3679-
3698+
36803699
/* buffering */
36813700
{
36823701
int lt,rt;
3683-
3702+
36843703
lt = out_adpcm[OUTD_LEFT] + out_adpcm[OUTD_CENTER];
36853704
rt = out_adpcm[OUTD_RIGHT] + out_adpcm[OUTD_CENTER];
36863705
lt += (out_delta[OUTD_LEFT] + out_delta[OUTD_CENTER])>>9;
36873706
rt += (out_delta[OUTD_RIGHT] + out_delta[OUTD_CENTER])>>9;
36883707

3708+
/* apply user volume scaling */
3709+
if (nBurnFMSoundChannelVolumes[0] < 100) out_fm[1] = (out_fm[1] * nBurnFMSoundChannelVolumes[0]) / 100;
3710+
if (nBurnFMSoundChannelVolumes[1] < 100) out_fm[2] = (out_fm[2] * nBurnFMSoundChannelVolumes[1]) / 100;
3711+
if (nBurnFMSoundChannelVolumes[2] < 100) out_fm[4] = (out_fm[4] * nBurnFMSoundChannelVolumes[2]) / 100;
3712+
if (nBurnFMSoundChannelVolumes[3] < 100) out_fm[5] = (out_fm[5] * nBurnFMSoundChannelVolumes[3]) / 100;
36893713

36903714
lt += ((out_fm[1]>>1) & OPN->pan[2]); /* the shift right was verified on real chip */
36913715
rt += ((out_fm[1]>>1) & OPN->pan[3]);
@@ -3815,13 +3839,21 @@ void YM2610BUpdateOne(int num, INT16 **buffer, int length)
38153839
for( j = 0; j < 6; j++ )
38163840
{
38173841
if( F2610->adpcm[j].flag )
3818-
ADPCMA_calc_chan( F2610, &F2610->adpcm[j]);
3842+
ADPCMA_calc_chan( F2610, &F2610->adpcm[j], j);
38193843
}
38203844

38213845
/* buffering */
38223846
{
38233847
int lt,rt;
38243848

3849+
/* apply user volume scaling */
3850+
if (nBurnFMSoundChannelVolumes[0] < 100) out_fm[0] = (out_fm[0] * nBurnFMSoundChannelVolumes[0]) / 100;
3851+
if (nBurnFMSoundChannelVolumes[1] < 100) out_fm[1] = (out_fm[1] * nBurnFMSoundChannelVolumes[1]) / 100;
3852+
if (nBurnFMSoundChannelVolumes[2] < 100) out_fm[2] = (out_fm[2] * nBurnFMSoundChannelVolumes[2]) / 100;
3853+
if (nBurnFMSoundChannelVolumes[3] < 100) out_fm[3] = (out_fm[3] * nBurnFMSoundChannelVolumes[3]) / 100;
3854+
if (nBurnFMSoundChannelVolumes[4] < 100) out_fm[4] = (out_fm[4] * nBurnFMSoundChannelVolumes[4]) / 100;
3855+
if (nBurnFMSoundChannelVolumes[5] < 100) out_fm[5] = (out_fm[5] * nBurnFMSoundChannelVolumes[5]) / 100;
3856+
38253857
lt = out_adpcm[OUTD_LEFT] + out_adpcm[OUTD_CENTER];
38263858
rt = out_adpcm[OUTD_RIGHT] + out_adpcm[OUTD_CENTER];
38273859
lt += (out_delta[OUTD_LEFT] + out_delta[OUTD_CENTER])>>9;
@@ -4383,6 +4415,14 @@ void YM2612UpdateOne(int num, INT16 **buffer, int length)
43834415
{
43844416
int lt,rt;
43854417

4418+
/* apply user volume scaling */
4419+
if (nBurnFMSoundChannelVolumes[0] < 100) out_fm[0] = (out_fm[0] * nBurnFMSoundChannelVolumes[0]) / 100;
4420+
if (nBurnFMSoundChannelVolumes[1] < 100) out_fm[1] = (out_fm[1] * nBurnFMSoundChannelVolumes[1]) / 100;
4421+
if (nBurnFMSoundChannelVolumes[2] < 100) out_fm[2] = (out_fm[2] * nBurnFMSoundChannelVolumes[2]) / 100;
4422+
if (nBurnFMSoundChannelVolumes[3] < 100) out_fm[3] = (out_fm[3] * nBurnFMSoundChannelVolumes[3]) / 100;
4423+
if (nBurnFMSoundChannelVolumes[4] < 100) out_fm[4] = (out_fm[4] * nBurnFMSoundChannelVolumes[4]) / 100;
4424+
if (nBurnFMSoundChannelVolumes[5] < 100) out_fm[5] = (out_fm[5] * nBurnFMSoundChannelVolumes[5]) / 100;
4425+
43864426
lt = ((out_fm[0]>>0) & OPN->pan[0]);
43874427
rt = ((out_fm[0]>>0) & OPN->pan[1]);
43884428
lt += ((out_fm[1]>>0) & OPN->pan[2]);

src/burn/snd/ics2115.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#include "timer.h"
2222

23+
extern int nBurnADPCMSoundChannelVolumes[];
24+
2325

2426
// if defined, comform to hardware limits: wavetable increase at 33.075, use 1024-step linear interpolator
2527
// otherwise, wavetable increase at final samplerate, allow the use of a more precise cubic interpolator
@@ -1399,7 +1401,7 @@ void ics2115_scan(INT32 nAction, INT32* pnMin)
13991401
SCAN_VAR(m_voice[i].vol.pan);
14001402
SCAN_VAR(m_voice[i].vol_ctrl.value);
14011403
SCAN_VAR(m_voice[i].vol.mode);
1402-
SCAN_VAR(m_voice[i].ramp);
1404+
SCAN_VAR(m_voice[i].ramp); // TODO: reduce volume
14031405

14041406
SCAN_VAR(m_voice[i].prev_addr);
14051407
SCAN_VAR(m_voice[i].int_buf);

src/burn/snd/k054539.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ void K054539Update(INT32 chip, INT16 *outputs, INT32 samples_len)
671671

672672
if (tap == 0) chan->delay_on = 0;
673673
}
674-
674+
675675
lval += chan->val * chan->lvol;
676676
rval += chan->val * chan->rvol;
677677
}

0 commit comments

Comments
 (0)