Skip to content

Commit

Permalink
standardize naming of a few functions in emu/cores
Browse files Browse the repository at this point in the history
  • Loading branch information
ValleyBell committed Nov 6, 2021
1 parent f36c871 commit 4ff819e
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 68 deletions.
12 changes: 6 additions & 6 deletions emu/cores/2612intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static DEVDEF_RWFUNC devFunc_MAME[] =
{
{RWF_REGISTER | RWF_WRITE, DEVRW_A8D8, 0, ym2612_write},
{RWF_REGISTER | RWF_READ, DEVRW_A8D8, 0, ym2612_read},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, ym2612_set_mutemask},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, ym2612_set_mute_mask},
{0x00, 0x00, 0, NULL}
};
static DEV_DEF devDef_MAME =
Expand All @@ -43,8 +43,8 @@ static DEV_DEF devDef_MAME =
ym2612_reset_chip,
ym2612_update_one,

ym2612_setoptions, // SetOptionBits
ym2612_set_mutemask,
ym2612_set_options, // SetOptionBits
ym2612_set_mute_mask, // SetMuteMask
NULL, // SetPanning
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand All @@ -69,7 +69,7 @@ static DEV_DEF devDef_Gens =
ym2612_gens_update,

(DEVFUNC_OPTMASK)YM2612_SetOptions, // SetOptionBits
(DEVFUNC_OPTMASK)YM2612_SetMute,
(DEVFUNC_OPTMASK)YM2612_SetMute, // SetMuteMask
NULL, // SetPanning
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand All @@ -94,7 +94,7 @@ static DEV_DEF devDef_Nuked =
nukedopn2_update,

nukedopn2_set_options, // SetOptionBits
nukedopn2_set_mutemask,
nukedopn2_set_mute_mask, // SetMuteMask
NULL, // SetPanning
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand Down Expand Up @@ -186,7 +186,7 @@ static UINT8 device_start_ym2612_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI
if (chip == NULL)
return 0xFF;

nukedopn2_set_mutemask(chip, 0x00);
nukedopn2_set_mute_mask(chip, 0x00);

devData = (DEV_DATA*)chip;
devData->chipInf = chip;
Expand Down
10 changes: 5 additions & 5 deletions emu/cores/262intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static DEVDEF_RWFUNC devFunc262_MAME[] =
{RWF_REGISTER | RWF_READ, DEVRW_A8D8, 0, ymf262_read},
{RWF_VOLUME | RWF_WRITE, DEVRW_VALUE, 0, ymf262_set_volume},
{RWF_VOLUME_LR | RWF_WRITE, DEVRW_VALUE, 0, ymf262_set_vol_lr},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, ymf262_set_mutemask},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, ymf262_set_mute_mask},
{0x00, 0x00, 0, NULL}
};
static DEV_DEF devDef262_MAME =
Expand All @@ -44,7 +44,7 @@ static DEV_DEF devDef262_MAME =
ymf262_update_one,

NULL, // SetOptionBits
ymf262_set_mutemask,
ymf262_set_mute_mask,
NULL, // SetPanning
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand Down Expand Up @@ -87,7 +87,7 @@ static DEVDEF_RWFUNC devFunc262_Nuked[] =
{RWF_REGISTER | RWF_READ, DEVRW_A8D8, 0, nukedopl3_read},
{RWF_VOLUME | RWF_WRITE, DEVRW_VALUE, 0, nukedopl3_set_volume},
{RWF_VOLUME_LR | RWF_WRITE, DEVRW_VALUE, 0, nukedopl3_set_vol_lr},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopl3_set_mutemask},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopl3_set_mute_mask},
{0x00, 0x00, 0, NULL}
};
static DEV_DEF devDef262_Nuked =
Expand All @@ -100,7 +100,7 @@ static DEV_DEF devDef262_Nuked =
nukedopl3_update,

NULL, // SetOptionBits
nukedopl3_set_mutemask,
nukedopl3_set_mute_mask,
NULL, // SetPanning
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand Down Expand Up @@ -186,7 +186,7 @@ static UINT8 device_start_ymf262_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI
return 0xFF;

nukedopl3_set_volume(chip, 0x10000);
nukedopl3_set_mutemask(chip, 0x000000);
nukedopl3_set_mute_mask(chip, 0x000000);

devData = (DEV_DATA*)chip;
devData->chipInf = chip;
Expand Down
18 changes: 9 additions & 9 deletions emu/cores/fmopn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ void * ym2203_init(void *param, UINT32 clock, UINT32 rate,
OPNLinkSSG(&F2203->OPN, NULL, NULL);
OPNSetSmplRateChgCallback(&F2203->OPN, NULL, NULL);

ym2203_set_mutemask(F2203, 0x00);
ym2203_set_mute_mask(F2203, 0x00);

return F2203;
}
Expand Down Expand Up @@ -2649,7 +2649,7 @@ UINT8 ym2203_timer_over(void *chip,UINT8 c)
return F2203->OPN.ST.irq;
}

void ym2203_set_mutemask(void *chip, UINT32 MuteMask)
void ym2203_set_mute_mask(void *chip, UINT32 MuteMask)
{
YM2203 *F2203 = (YM2203 *)chip;
UINT8 CurChn;
Expand Down Expand Up @@ -3234,7 +3234,7 @@ void * ym2608_init(void *param, UINT32 clock, UINT32 rate,

Init_ADPCMATable();

ym2608_set_mutemask(F2608, 0x00);
ym2608_set_mute_mask(F2608, 0x00);

return F2608;
}
Expand Down Expand Up @@ -3556,7 +3556,7 @@ void ym2608_write_pcmromb(void* chip, UINT32 offset, UINT32 length, const UINT8*
return;
}

void ym2608_set_mutemask(void *chip, UINT32 MuteMask)
void ym2608_set_mute_mask(void *chip, UINT32 MuteMask)
{
YM2608 *F2608 = (YM2608 *)chip;
UINT8 CurChn;
Expand Down Expand Up @@ -3980,7 +3980,7 @@ void *ym2610_init(void *param, UINT32 clock, UINT32 rate,

Init_ADPCMATable();

ym2610_set_mutemask(F2610, 0x00);
ym2610_set_mute_mask(F2610, 0x00);

return F2610;
}
Expand Down Expand Up @@ -4291,7 +4291,7 @@ void ym2610_write_pcmromb(void* chip, UINT32 offset, UINT32 length, const UINT8*
return;
}

void ym2610_set_mutemask(void *chip, UINT32 MuteMask)
void ym2610_set_mute_mask(void *chip, UINT32 MuteMask)
{
YM2610 *F2610 = (YM2610 *)chip;
UINT8 CurChn;
Expand Down Expand Up @@ -4567,7 +4567,7 @@ void * ym2612_init(void *param, UINT32 clock, UINT32 rate,
OPNLinkSSG(&F2612->OPN, NULL, NULL);
OPNSetSmplRateChgCallback(&F2612->OPN, NULL, NULL);

ym2612_set_mutemask(F2612, 0x00);
ym2612_set_mute_mask(F2612, 0x00);

return F2612;
}
Expand Down Expand Up @@ -4753,7 +4753,7 @@ UINT8 ym2612_timer_over(void *chip,UINT8 c)
}


void ym2612_set_mutemask(void *chip, UINT32 MuteMask)
void ym2612_set_mute_mask(void *chip, UINT32 MuteMask)
{
YM2612 *F2612 = (YM2612 *)chip;
UINT8 CurChn;
Expand All @@ -4765,7 +4765,7 @@ void ym2612_set_mutemask(void *chip, UINT32 MuteMask)
return;
}

void ym2612_setoptions(void *chip, UINT32 Flags)
void ym2612_set_options(void *chip, UINT32 Flags)
{
YM2612 *F2612 = (YM2612 *)chip;
UINT8 PseudoStereo;
Expand Down
10 changes: 5 additions & 5 deletions emu/cores/fmopn.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ UINT8 ym2203_timer_over(void *chip, UINT8 c);
/*
** Channel Muting
*/
void ym2203_set_mutemask(void *chip, UINT32 MuteMask);
void ym2203_set_mute_mask(void *chip, UINT32 MuteMask);
#endif /* BUILD_YM2203 */

#if BUILD_YM2608
Expand All @@ -157,7 +157,7 @@ UINT8 ym2608_timer_over(void *chip, UINT8 c );
void ym2608_alloc_pcmromb(void* chip, UINT32 memsize);
void ym2608_write_pcmromb(void* chip, UINT32 offset, UINT32 length, const UINT8* data);

void ym2608_set_mutemask(void *chip, UINT32 MuteMask);
void ym2608_set_mute_mask(void *chip, UINT32 MuteMask);
#endif /* BUILD_YM2608 */

#if (BUILD_YM2610||BUILD_YM2610B)
Expand All @@ -181,7 +181,7 @@ void ym2610_write_pcmroma(void* chip, UINT32 offset, UINT32 length, const UINT8*
void ym2610_alloc_pcmromb(void* chip, UINT32 memsize);
void ym2610_write_pcmromb(void* chip, UINT32 offset, UINT32 length, const UINT8* data);

void ym2610_set_mutemask(void *chip, UINT32 MuteMask);
void ym2610_set_mute_mask(void *chip, UINT32 MuteMask);
#endif /* (BUILD_YM2610||BUILD_YM2610B) */

#if (BUILD_YM2612||BUILD_YM3438)
Expand All @@ -195,8 +195,8 @@ void ym2612_write(void *chip, UINT8 a, UINT8 v);
UINT8 ym2612_read(void *chip, UINT8 a);
UINT8 ym2612_timer_over(void *chip, UINT8 c );

void ym2612_set_mutemask(void *chip, UINT32 MuteMask);
void ym2612_setoptions(void *chip, UINT32 Flags);
void ym2612_set_mute_mask(void *chip, UINT32 MuteMask);
void ym2612_set_options(void *chip, UINT32 Flags);
#endif /* (BUILD_YM2612||BUILD_YM3438) */

#endif // __FMOPN_H__
2 changes: 1 addition & 1 deletion emu/cores/nukedopl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ void nukedopl3_update(void *chip, UINT32 samples, DEV_SMPL **out)
}
}

void nukedopl3_set_mutemask(void *chip, UINT32 MuteMask)
void nukedopl3_set_mute_mask(void *chip, UINT32 MuteMask)
{
opl3_chip* opl3 = (opl3_chip*)chip;

Expand Down
2 changes: 1 addition & 1 deletion emu/cores/nukedopl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void* nukedopl3_init(UINT32 clock, UINT32 rate);
void nukedopl3_shutdown(void *chip);
void nukedopl3_reset_chip(void *chip);
void nukedopl3_update(void *chip, UINT32 samples, DEV_SMPL **out);
void nukedopl3_set_mutemask(void *chip, UINT32 MuteMask);
void nukedopl3_set_mute_mask(void *chip, UINT32 MuteMask);
void nukedopl3_set_volume(void *chip, INT32 volume);
void nukedopl3_set_vol_lr(void *chip, INT32 volLeft, INT32 volRight);

Expand Down
10 changes: 5 additions & 5 deletions emu/cores/nukedopll.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ static UINT8 device_start_ym2413_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI
static void nukedopll_shutdown(void *chip);
static void nukedopll_reset_chip(void *chip);
static void nukedopll_update(void *chip, UINT32 samples, DEV_SMPL **out);
static void nukedopll_set_mutemask(void *chip, UINT32 MuteMask);
static void nukedopll_set_mute_mask(void *chip, UINT32 MuteMask);


static DEVDEF_RWFUNC devFunc[] =
{
{RWF_REGISTER | RWF_WRITE, DEVRW_A8D8, 0, nukedopll_write},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopll_set_mutemask},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopll_set_mute_mask},
{0x00, 0x00, 0, NULL}
};
DEV_DEF devDef_YM2413_Nuked =
Expand All @@ -55,7 +55,7 @@ DEV_DEF devDef_YM2413_Nuked =
nukedopll_update,

NULL, // SetOptionBits
nukedopll_set_mutemask,
nukedopll_set_mute_mask,
NULL,
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand Down Expand Up @@ -1343,7 +1343,7 @@ static UINT8 device_start_ym2413_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI
chip->clock = cfg->clock;
chip->smplRate = rate; // save for reset
chip->chip_type = (cfg->flags & 0x01) ? opll_type_ds1001 : opll_type_ym2413;
nukedopll_set_mutemask(chip, 0x00);
nukedopll_set_mute_mask(chip, 0x00);

chip->_devData.chipInf = chip;
INIT_DEVINF(retDevInf, &chip->_devData, rate, &devDef_YM2413_Nuked);
Expand Down Expand Up @@ -1399,7 +1399,7 @@ static const uint32_t MUTE_MASK_MAP[14] = {
9, 10, 11, 12, 13
};

static void nukedopll_set_mutemask(void *chipptr, UINT32 MuteMask)
static void nukedopll_set_mute_mask(void *chipptr, UINT32 MuteMask)
{
opll_t *chip = (opll_t *)chipptr;
UINT8 chn;
Expand Down
10 changes: 5 additions & 5 deletions emu/cores/nukedopm.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ static UINT8 device_start_ym2151_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI
static void nukedopm_shutdown(void *chip);
static void nukedopm_reset_chip(void *chipptr);
static void nukedopm_update(void *chipptr, UINT32 samples, DEV_SMPL **out);
static void nukedopm_set_mutemask(void *chipptr, UINT32 MuteMask);
static void nukedopm_set_mute_mask(void *chipptr, UINT32 MuteMask);


static DEVDEF_RWFUNC devFunc[] =
{
{RWF_REGISTER | RWF_WRITE, DEVRW_A8D8, 0, nukedopm_write},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopm_set_mutemask},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopm_set_mute_mask},
{0x00, 0x00, 0, NULL}
};
DEV_DEF devDef_YM2151_Nuked =
Expand All @@ -58,7 +58,7 @@ DEV_DEF devDef_YM2151_Nuked =
nukedopm_update,

NULL, // SetOptionBits
nukedopm_set_mutemask,
nukedopm_set_mute_mask,
NULL,
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand Down Expand Up @@ -2151,7 +2151,7 @@ static UINT8 device_start_ym2151_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI

chip->clock = cfg->clock;
chip->smplRate = rate; // save for reset
nukedopm_set_mutemask(chip, 0x00);
nukedopm_set_mute_mask(chip, 0x00);

chip->_devData.chipInf = chip;
INIT_DEVINF(retDevInf, &chip->_devData, rate, &devDef_YM2151_Nuked);
Expand Down Expand Up @@ -2202,7 +2202,7 @@ static void nukedopm_update(void *chipptr, UINT32 samples, DEV_SMPL **out)
return;
}

static void nukedopm_set_mutemask(void *chipptr, UINT32 MuteMask)
static void nukedopm_set_mute_mask(void *chipptr, UINT32 MuteMask)
{
opm_t *chip = (opm_t *)chipptr;
UINT8 chn;
Expand Down
6 changes: 3 additions & 3 deletions emu/cores/oplintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static DEVDEF_RWFUNC devFunc3812_Nuked[] =
{
{RWF_REGISTER | RWF_WRITE, DEVRW_A8D8, 0, nukedopl3_write},
{RWF_REGISTER | RWF_READ, DEVRW_A8D8, 0, nukedopl3_read},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopl3_set_mutemask},
{RWF_CHN_MUTE | RWF_WRITE, DEVRW_ALL, 0, nukedopl3_set_mute_mask},
{0x00, 0x00, 0, NULL}
};
static DEV_DEF devDef3812_Nuked =
Expand All @@ -103,7 +103,7 @@ static DEV_DEF devDef3812_Nuked =
nukedopl3_update,

NULL, // SetOptionBits
nukedopl3_set_mutemask,
nukedopl3_set_mute_mask,
NULL, // SetPanning
NULL, // SetSampleRateChangeCallback
NULL, // LinkDevice
Expand Down Expand Up @@ -261,7 +261,7 @@ static UINT8 device_start_ym3812_nuked(const DEV_GEN_CFG* cfg, DEV_INFO* retDevI
return 0xFF;

nukedopl3_set_volume(chip, 0x10000);
nukedopl3_set_mutemask(chip, 0x000000);
nukedopl3_set_mute_mask(chip, 0x000000);

devData = (DEV_DATA*)chip;
devData->chipInf = chip;
Expand Down
Loading

0 comments on commit 4ff819e

Please sign in to comment.