Refactor USHORT -> uint16_t

This commit is contained in:
Aaron Culliney 2015-06-07 11:35:45 -07:00
parent a5d36c7dff
commit 4b28e33906
4 changed files with 7 additions and 8 deletions

View File

@ -519,7 +519,7 @@ static void sound_ay_overlay(CAY8910 *_this)
// cpufreq = machine_current->timings.processor_speed / HZ_COMMON_DENOMINATOR;
cpufreq = (libspectrum_dword) (m_fCurrentCLK_AY8910 / HZ_COMMON_DENOMINATOR); // [TC]
for( f = 0; f < _this->ay_change_count; f++ )
_this->ay_change[f].ofs = (USHORT) (( _this->ay_change[f].tstates * sfreq ) / cpufreq); // [TC] Added cast
_this->ay_change[f].ofs = (uint16_t) (( _this->ay_change[f].tstates * sfreq ) / cpufreq); // [TC] Added cast
libspectrum_signed_word* pBuf1 = g_ppSoundBuffers[0];
libspectrum_signed_word* pBuf2 = g_ppSoundBuffers[1];

View File

@ -166,7 +166,7 @@ static UINT g_nMBTimerDevice = TIMERDEVICE_INVALID; // SY6522 device# which is g
static uint64_t g_uLastCumulativeCycles = 0;
// SSI263 vars:
static USHORT g_nSSI263Device = 0; // SSI263 device# which is generating phoneme-complete IRQ
static uint16_t g_nSSI263Device = 0; // SSI263 device# which is generating phoneme-complete IRQ
static int g_nCurrentActivePhoneme = -1;
static bool g_bStopPhoneme = false;
static bool g_bVotraxPhoneme = false;
@ -279,7 +279,7 @@ static void StartTimer(SY6522_AY8910* pMB)
if((pMB->sy6522.IER & IxR_TIMER1) == 0x00)
return;
USHORT nPeriod = pMB->sy6522.TIMER1_LATCH.w;
uint16_t nPeriod = pMB->sy6522.TIMER1_LATCH.w;
// if(nPeriod <= 0xff) // Timer1L value has been written (but TIMER1H hasn't)
// return;
@ -2030,15 +2030,15 @@ void MB_UpdateCycles(void)
printf("OOPS!!! Mockingboard failed assert!\n");
return;
}
USHORT nClocks = (USHORT) uCycles;
uint16_t nClocks = (uint16_t) uCycles;
for(unsigned int i=0; i<NUM_SY6522; i++)
{
SY6522_AY8910* pMB = &g_MB[i];
USHORT OldTimer1 = pMB->sy6522.TIMER1_COUNTER.w;
uint16_t OldTimer1 = pMB->sy6522.TIMER1_COUNTER.w;
#ifndef APPLE2IX
USHORT OldTimer2 = pMB->sy6522.TIMER2_COUNTER.w;
uint16_t OldTimer2 = pMB->sy6522.TIMER2_COUNTER.w;
#endif
pMB->sy6522.TIMER1_COUNTER.w -= nClocks;

View File

@ -27,7 +27,7 @@ typedef struct
BYTE l;
BYTE h;
};
USHORT w;
uint16_t w;
};
} IWORD;

View File

@ -34,7 +34,6 @@ typedef long LONG;
typedef unsigned int UINT;
typedef char TCHAR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef unsigned short WORD;
typedef unsigned char BYTE;