Lines Matching refs:F2608

2699 static inline void YM2608IRQFlagWrite(FM_OPN *OPN, ym2608_state *F2608, int v)  in YM2608IRQFlagWrite()  argument
2707 F2608->flagmask = (~(v&0x1f)); in YM2608IRQFlagWrite()
2708 FM_IRQMASK_SET(&OPN->ST, (F2608->irqmask & F2608->flagmask) ); in YM2608IRQFlagWrite()
2713 static inline void YM2608IRQMaskWrite(FM_OPN *OPN, ym2608_state *F2608, int v) in YM2608IRQMaskWrite() argument
2724 F2608->irqmask = v&0x1f; in YM2608IRQMaskWrite()
2725 FM_IRQMASK_SET(&OPN->ST, (F2608->irqmask & F2608->flagmask) ); in YM2608IRQMaskWrite()
2731 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_update_one() local
2732 FM_OPN *OPN = &F2608->OPN; in ym2608_update_one()
2733 YM_DELTAT *DELTAT = &F2608->deltaT; in ym2608_update_one()
2742 cch[0] = &F2608->CH[0]; in ym2608_update_one()
2743 cch[1] = &F2608->CH[1]; in ym2608_update_one()
2744 cch[2] = &F2608->CH[2]; in ym2608_update_one()
2745 cch[3] = &F2608->CH[3]; in ym2608_update_one()
2746 cch[4] = &F2608->CH[4]; in ym2608_update_one()
2747 cch[5] = &F2608->CH[5]; in ym2608_update_one()
2801 if( F2608->adpcm[j].flag ) in ym2608_update_one()
2802 F2608->ADPCMA_calc_chan( &F2608->adpcm[j]); in ym2608_update_one()
2866 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_postload() local
2870 OPNPrescaler_w(&F2608->OPN,1,2); in ym2608_postload()
2871 F2608->deltaT.freqbase = F2608->OPN.ST.freqbase; in ym2608_postload()
2873 YM2608IRQMaskWrite(&F2608->OPN, F2608, F2608->REGS[0x29]); in ym2608_postload()
2877 (*F2608->OPN.ST.SSG->write)(F2608->OPN.ST.device,0,r); in ym2608_postload()
2878 (*F2608->OPN.ST.SSG->write)(F2608->OPN.ST.device,1,F2608->REGS[r]); in ym2608_postload()
2886 OPNWriteReg(&F2608->OPN,r,F2608->REGS[r]); in ym2608_postload()
2887 OPNWriteReg(&F2608->OPN,r|0x100,F2608->REGS[r|0x100]); in ym2608_postload()
2893 OPNWriteReg(&F2608->OPN,r,F2608->REGS[r]); in ym2608_postload()
2894 OPNWriteReg(&F2608->OPN,r|0x100,F2608->REGS[r|0x100]); in ym2608_postload()
2899 F2608->FM_ADPCMAWrite(1,F2608->REGS[0x111]); in ym2608_postload()
2901 F2608->FM_ADPCMAWrite(r,F2608->REGS[r+0x110]); in ym2608_postload()
2903 F2608->deltaT.postload( &F2608->REGS[0x100] ); in ym2608_postload()
2907 static void YM2608_save_state(ym2608_state *F2608, device_t *device) in YM2608_save_state() argument
2909 device->save_item(NAME(F2608->REGS)); in YM2608_save_state()
2910 FMsave_state_st(device,&F2608->OPN.ST); in YM2608_save_state()
2911 FMsave_state_channel(device,F2608->CH,6); in YM2608_save_state()
2913 device->save_item(NAME(F2608->OPN.SL3.fc)); in YM2608_save_state()
2914 device->save_item(NAME(F2608->OPN.SL3.fn_h)); in YM2608_save_state()
2915 device->save_item(NAME(F2608->OPN.SL3.kcode)); in YM2608_save_state()
2917 device->save_item(NAME(F2608->addr_A1)); in YM2608_save_state()
2919 FMsave_state_adpcma(device,F2608->adpcm); in YM2608_save_state()
2921 F2608->deltaT.savestate(device); in YM2608_save_state()
2927 ym2608_state *F2608 = (ym2608_state *)chip; in YM2608_deltat_status_set() local
2928 FM_STATUS_SET(&(F2608->OPN.ST), changebits); in YM2608_deltat_status_set()
2932 ym2608_state *F2608 = (ym2608_state *)chip; in YM2608_deltat_status_reset() local
2933 FM_STATUS_RESET(&(F2608->OPN.ST), changebits); in YM2608_deltat_status_reset()
2941 ym2608_state *F2608; in ym2608_init() local
2944 F2608 = auto_alloc_clear(device->machine(), <ym2608_state>()); in ym2608_init()
2948 auto_free( device->machine(), F2608 ); in ym2608_init()
2952 F2608->device = device; in ym2608_init()
2953 F2608->OPN.type = TYPE_YM2608; in ym2608_init()
2954 F2608->OPN.P_CH = F2608->CH; in ym2608_init()
2955 F2608->OPN.ST.device = device; in ym2608_init()
2956 F2608->OPN.ST.clock = clock; in ym2608_init()
2957 F2608->OPN.ST.rate = rate; in ym2608_init()
2960 F2608->OPN.ST.timer_handler = timer_handler; in ym2608_init()
2961 F2608->OPN.ST.IRQ_Handler = IRQHandler; in ym2608_init()
2962 F2608->OPN.ST.SSG = ssg; in ym2608_init()
2965 F2608->deltaT.read_byte = ExternalReadByte; in ym2608_init()
2966 F2608->deltaT.write_byte = ExternalWriteByte; in ym2608_init()
2971 F2608->deltaT.status_set_handler = YM2608_deltat_status_set; in ym2608_init()
2972 F2608->deltaT.status_reset_handler = YM2608_deltat_status_reset; in ym2608_init()
2973 F2608->deltaT.status_change_which_chip = F2608; in ym2608_init()
2974 F2608->deltaT.status_change_EOS_bit = 0x04; /* status flag: set bit2 on End Of Sample */ in ym2608_init()
2975 F2608->deltaT.status_change_BRDY_bit = 0x08; /* status flag: set bit3 on BRDY */ in ym2608_init()
2976F2608->deltaT.status_change_ZERO_bit = 0x10; /* status flag: set bit4 if silence continues for … in ym2608_init()
2979 F2608->read_byte = InternalReadByte; in ym2608_init()
2984 YM2608_save_state(F2608, device); in ym2608_init()
2986 return F2608; in ym2608_init()
2991 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_clock_changed() local
2993 F2608->OPN.ST.clock = clock; in ym2608_clock_changed()
2994 F2608->OPN.ST.rate = rate; in ym2608_clock_changed()
3000 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_shutdown() local
3003 auto_free(F2608->OPN.ST.device->machine(), F2608); in ym2608_shutdown()
3010 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_reset_chip() local
3011 FM_OPN *OPN = &F2608->OPN; in ym2608_reset_chip()
3012 YM_DELTAT *DELTAT = &F2608->deltaT; in ym2608_reset_chip()
3016 F2608->deltaT.freqbase = OPN->ST.freqbase; in ym2608_reset_chip()
3025 YM2608IRQMaskWrite(OPN, F2608, 0x1f ); /* default value for D4-D0 is 1 */ in ym2608_reset_chip()
3028 …YM2608IRQFlagWrite(OPN, F2608, 0x1c ); /* default: enable timer A and B, disable EOS, BRDY and ZE… in ym2608_reset_chip()
3037 reset_channels( &OPN->ST , F2608->CH , 6 ); in ym2608_reset_chip()
3055F2608->adpcm[i].step = (uint32_t)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/3.0… in ym2608_reset_chip()
3057F2608->adpcm[i].step = (uint32_t)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/6.0… in ym2608_reset_chip()
3059 F2608->adpcm[i].start = YM2608_ADPCM_ROM_addr[i*2]; in ym2608_reset_chip()
3060 F2608->adpcm[i].end = YM2608_ADPCM_ROM_addr[i*2+1]; in ym2608_reset_chip()
3062 F2608->adpcm[i].now_addr = 0; in ym2608_reset_chip()
3063 F2608->adpcm[i].now_step = 0; in ym2608_reset_chip()
3065 F2608->adpcm[i].vol_mul = 0; in ym2608_reset_chip()
3066 F2608->adpcm[i].pan = &OPN->out_adpcm[OUTD_CENTER]; /* default center */ in ym2608_reset_chip()
3067 F2608->adpcm[i].flagMask = 0; in ym2608_reset_chip()
3068 F2608->adpcm[i].flag = 0; in ym2608_reset_chip()
3069 F2608->adpcm[i].adpcm_acc = 0; in ym2608_reset_chip()
3070 F2608->adpcm[i].adpcm_step= 0; in ym2608_reset_chip()
3071 F2608->adpcm[i].adpcm_out = 0; in ym2608_reset_chip()
3073 F2608->adpcmTL = 0x3f; in ym2608_reset_chip()
3075 F2608->adpcm_arrivedEndAddress = 0; /* not used */ in ym2608_reset_chip()
3082 DELTAT->ADPCM_Reset(OUTD_CENTER,YM_DELTAT::EMULATION_MODE_NORMAL,F2608->device); in ym2608_reset_chip()
3091 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_write() local
3092 FM_OPN *OPN = &F2608->OPN; in ym2608_write()
3102 F2608->addr_A1 = 0; in ym2608_write()
3110 F2608->deltaT.freqbase = OPN->ST.freqbase; in ym2608_write()
3115 if (F2608->addr_A1 != 0) in ym2608_write()
3119 F2608->REGS[addr] = v; in ym2608_write()
3128 F2608->FM_ADPCMAWrite(addr-0x10,v); in ym2608_write()
3134 YM2608IRQMaskWrite(OPN, F2608, v); in ym2608_write()
3149 F2608->addr_A1 = 1; in ym2608_write()
3153 if (F2608->addr_A1 != 1) in ym2608_write()
3157 F2608->REGS[addr | 0x100] = v; in ym2608_write()
3165 F2608->device->logerror("YM2608: write to DAC data (unimplemented) value=%02x\n",v); in ym2608_write()
3169 F2608->deltaT.ADPCM_Write(addr,v); in ym2608_write()
3175 YM2608IRQFlagWrite(OPN, F2608, v); in ym2608_write()
3187 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_read() local
3188 int addr = F2608->OPN.ST.address; in ym2608_read()
3195 ret = FM_STATUS_FLAG(&F2608->OPN.ST) & 0x83; in ym2608_read()
3199 if( addr < 16 ) ret = (*F2608->OPN.ST.SSG->read)(F2608->OPN.ST.device); in ym2608_read()
3205 …ret = (FM_STATUS_FLAG(&F2608->OPN.ST) & (F2608->flagmask|0x80)) | ((F2608->deltaT.PCM_BSY & 1)<<5)… in ym2608_read()
3211 ret = F2608->deltaT.ADPCM_Read(); in ym2608_read()
3217 F2608->device->logerror("YM2608 A/D conversion is accessed but not implemented !\n"); in ym2608_read()
3228 ym2608_state *F2608 = (ym2608_state *)chip; in ym2608_timer_over() local
3235 F2608->deltaT.BRDY_callback(); in ym2608_timer_over()
3241 TimerBOver( &(F2608->OPN.ST) ); in ym2608_timer_over()
3246 ym2608_device::update_request(F2608->OPN.ST.device); in ym2608_timer_over()
3248 TimerAOver( &(F2608->OPN.ST) ); in ym2608_timer_over()
3250 if( F2608->OPN.ST.mode & 0x80 ) in ym2608_timer_over()
3252 CSMKeyControll( F2608->OPN.type, &(F2608->CH[2]) ); in ym2608_timer_over()
3260 return F2608->OPN.ST.irq; in ym2608_timer_over()