diff options
Diffstat (limited to 'src/devices/sound/ymdeltat.cpp')
-rw-r--r-- | src/devices/sound/ymdeltat.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/devices/sound/ymdeltat.cpp b/src/devices/sound/ymdeltat.cpp index ad8c0f12b13..68ad3add2e8 100644 --- a/src/devices/sound/ymdeltat.cpp +++ b/src/devices/sound/ymdeltat.cpp @@ -78,13 +78,13 @@ /* Forecast to next Forecast (rate = *8) */ /* 1/8 , 3/8 , 5/8 , 7/8 , 9/8 , 11/8 , 13/8 , 15/8 */ -static const INT32 ym_deltat_decode_tableB1[16] = { +static const int32_t ym_deltat_decode_tableB1[16] = { 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15, }; /* delta to next delta (rate= *64) */ /* 0.9 , 0.9 , 0.9 , 0.9 , 1.2 , 1.6 , 2.0 , 2.4 */ -static const INT32 ym_deltat_decode_tableB2[16] = { +static const int32_t ym_deltat_decode_tableB2[16] = { 57, 57, 57, 57, 77, 102, 128, 153, 57, 57, 57, 57, 77, 102, 128, 153 }; @@ -101,9 +101,9 @@ void YM_DELTAT_BRDY_callback(YM_DELTAT *DELTAT) } #endif -UINT8 YM_DELTAT_ADPCM_Read(YM_DELTAT *DELTAT) +uint8_t YM_DELTAT_ADPCM_Read(YM_DELTAT *DELTAT) { - UINT8 v = 0; + uint8_t v = 0; /* external memory read */ if ( (DELTAT->portstate & 0xe0)==0x20 ) @@ -153,7 +153,7 @@ UINT8 YM_DELTAT_ADPCM_Read(YM_DELTAT *DELTAT) /* 0-DRAM x1, 1-ROM, 2-DRAM x8, 3-ROM (3 is bad setting - not allowed by the manual) */ -static const UINT8 dram_rightshift[4]={3,0,0,0}; +static const uint8_t dram_rightshift[4]={3,0,0,0}; /* DELTA-T ADPCM write register */ void YM_DELTAT_ADPCM_Write(YM_DELTAT *DELTAT,int r,int v) @@ -383,12 +383,12 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: case 0x09: /* DELTA-N L (ADPCM Playback Prescaler) */ case 0x0a: /* DELTA-N H */ DELTAT->delta = (DELTAT->reg[0xa]*0x0100 | DELTAT->reg[0x9]); - DELTAT->step = (UINT32)( (double)(DELTAT->delta /* *(1<<(YM_DELTAT_SHIFT-16)) */ ) * (DELTAT->freqbase) ); + DELTAT->step = (uint32_t)( (double)(DELTAT->delta /* *(1<<(YM_DELTAT_SHIFT-16)) */ ) * (DELTAT->freqbase) ); /*logerror("DELTAT deltan:09=%2x 0a=%2x\n",DELTAT->reg[0x9], DELTAT->reg[0xa]);*/ break; case 0x0b: /* Output level control (volume, linear) */ { - INT32 oldvol = DELTAT->volume; + int32_t oldvol = DELTAT->volume; DELTAT->volume = (v&0xff) * (DELTAT->output_range/256) / YM_DELTAT_DECODE_RANGE; /* v * ((1<<16)>>8) >> 15; * thus: v * (1<<8) >> 15; @@ -426,7 +426,7 @@ void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode,device_t DELTAT->prev_acc = 0; DELTAT->adpcmd = 127; DELTAT->adpcml = 0; - DELTAT->emulation_mode = (UINT8)emulation_mode; + DELTAT->emulation_mode = (uint8_t)emulation_mode; DELTAT->portstate = (emulation_mode == YM_DELTAT_EMULATION_MODE_YM2610) ? 0x20 : 0; DELTAT->control2 = (emulation_mode == YM_DELTAT_EMULATION_MODE_YM2610) ? 0x01 : 0; /* default setting depends on the emulation mode. MSX demo called "facdemo_4" doesn't setup control2 register at all and still works */ DELTAT->DRAMportshift = dram_rightshift[DELTAT->control2 & 3]; @@ -440,7 +440,7 @@ void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode,device_t (DELTAT->status_set_handler)(DELTAT->status_change_which_chip, DELTAT->status_change_BRDY_bit); } -void YM_DELTAT_postload(YM_DELTAT *DELTAT,UINT8 *regs) +void YM_DELTAT_postload(YM_DELTAT *DELTAT,uint8_t *regs) { int r; @@ -478,7 +478,7 @@ void YM_DELTAT_savestate(device_t *device,YM_DELTAT *DELTAT) static inline void YM_DELTAT_synthesis_from_external_memory(YM_DELTAT *DELTAT) { - UINT32 step; + uint32_t step; int data; DELTAT->now_step += DELTAT->step; @@ -559,7 +559,7 @@ static inline void YM_DELTAT_synthesis_from_external_memory(YM_DELTAT *DELTAT) static inline void YM_DELTAT_synthesis_from_CPU_memory(YM_DELTAT *DELTAT) { - UINT32 step; + uint32_t step; int data; DELTAT->now_step += DELTAT->step; |