SN76489_Context* SN76489_Init( int PSGClockValue, int SamplingRate) { int i; SN76489_Context* chip = (SN76489_Context*)malloc(sizeof(SN76489_Context)); if(chip) { chip->dClock=(float)(PSGClockValue & 0x7FFFFFF)/16/SamplingRate; SN76489_SetMute(chip, MUTE_ALLON); SN76489_Config(chip, /*MUTE_ALLON,*/ FB_SEGAVDP, SRW_SEGAVDP, 1); for( i = 0; i <= 3; i++ ) centre_panning(chip->panning[i]); //SN76489_Reset(chip); if ((PSGClockValue & 0x80000000) && LastChipInit != NULL) { // Activate special NeoGeoPocket Mode LastChipInit->NgpFlags = 0x80 | 0x00; chip->NgpFlags = 0x80 | 0x01; chip->NgpChip2 = LastChipInit; LastChipInit->NgpChip2 = chip; LastChipInit = NULL; } else { chip->NgpFlags = 0x00; chip->NgpChip2 = NULL; LastChipInit = chip; } } return chip; }
void sn764xx_set_mute_mask(UINT8 ChipID, UINT32 MuteMask) { sn764xx_state *info = &SN764xxData[ChipID]; switch(EMU_CORE) { case EC_MAME: sn76496_set_mutemask(info->chip, MuteMask); break; #ifdef ENABLE_ALL_CORES case EC_MAXIM: SN76489_SetMute(info->chip, ~MuteMask & 0x0F); break; #endif } return; }
void sn764xx_set_mute_mask(void *_info, UINT32 MuteMask) { sn764xx_state *info = (sn764xx_state*)_info; switch(info->EMU_CORE) { case EC_MAME: sn76496_set_mutemask(info->chip, MuteMask); break; #ifdef ENABLE_ALL_CORES case EC_MAXIM: SN76489_SetMute(info->chip, ~MuteMask & 0x0F); break; #endif } return; }