diff --git a/src/audio/mockingboard.c b/src/audio/mockingboard.c index 426f9a8d..492b649b 100644 --- a/src/audio/mockingboard.c +++ b/src/audio/mockingboard.c @@ -197,7 +197,7 @@ static bool g_bMB_RegAccessedFlag = false; static bool g_bMB_Active = false; #ifdef APPLE2IX -static pthread_t mockingboard_thread = (pthread_t)-1; +//static pthread_t mockingboard_thread = (pthread_t)-1; static pthread_t g_hThread = 0; #else static HANDLE g_hThread = NULL; @@ -253,8 +253,8 @@ static pthread_mutex_t mockingboard_mutex = PTHREAD_MUTEX_INITIALIZER; static uint8_t quit_event = false; #else static HANDLE g_hSSI263Event[g_nNumEvents] = {NULL}; // 1: Phoneme finished playing, 2: Exit thread -#endif static DWORD g_dwMaxPhonemeLen = 0; +#endif // When 6522 IRQ is *not* active use 60Hz update freq for MB voices static const double g_f6522TimerPeriod_NoIRQ = CLK_6502 / 60.0; // Constant whatever the CLK is set to @@ -817,7 +817,6 @@ static void Votrax_Write(BYTE nDevice, BYTE nValue) static void MB_Update() { - char szDbg[200]; #ifdef APPLE2IX static int nNumSamplesError = 0; if (!MockingboardVoice.bActive || !g_bMB_Active) @@ -826,6 +825,7 @@ static void MB_Update() return; } #else + char szDbg[200]; if (!MockingboardVoice.bActive) return; #endif @@ -2059,14 +2059,18 @@ void MB_UpdateCycles(ULONG uExecutedCycles) SY6522_AY8910* pMB = &g_MB[i]; USHORT OldTimer1 = pMB->sy6522.TIMER1_COUNTER.w; +#ifndef APPLE2IX USHORT OldTimer2 = pMB->sy6522.TIMER2_COUNTER.w; +#endif pMB->sy6522.TIMER1_COUNTER.w -= nClocks; pMB->sy6522.TIMER2_COUNTER.w -= nClocks; // Check for counter underflow bool bTimer1Underflow = (!(OldTimer1 & 0x8000) && (pMB->sy6522.TIMER1_COUNTER.w & 0x8000)); +#ifndef APPLE2IX bool bTimer2Underflow = (!(OldTimer2 & 0x8000) && (pMB->sy6522.TIMER2_COUNTER.w & 0x8000)); +#endif if( bTimer1Underflow && (g_nMBTimerDevice == i) && g_bMBTimerIrqActive ) { diff --git a/src/audio/soundcore-openal.c b/src/audio/soundcore-openal.c index fc95224d..5de5866b 100644 --- a/src/audio/soundcore-openal.c +++ b/src/audio/soundcore-openal.c @@ -115,7 +115,6 @@ long SoundSystemCreate(const char *sound_device, SoundSystemStruct **sound_struc assert(*sound_struct == NULL); assert(voices == NULL); - int err = -1; ALCcontext *ctx = NULL; do { @@ -763,7 +762,6 @@ static long OpenALCreateSoundBuffer(ALBufferParamsStruct *params, ALSoundBufferS assert(ctx != NULL); ALVoice *voice = NULL; - int err = -1; do { diff --git a/src/audio/soundcore.c b/src/audio/soundcore.c index a6abaf17..599499f2 100644 --- a/src/audio/soundcore.c +++ b/src/audio/soundcore.c @@ -386,8 +386,10 @@ bool DSZeroVoiceWritableBuffer(PVOICE Voice, char* pszDevName, DWORD dwBufferSiz //----------------------------------------------------------------------------- static bool g_bTimerActive = false; +#ifndef APPLE2IX static eFADE g_FadeType = FADE_NONE; static UINT_PTR g_nTimerID = 0; +#endif //------------------------------------- @@ -745,13 +747,13 @@ void SoundCore_SetErrorMax(const int nErrorMax) //============================================================================= -static DWORD g_dwAdviseToken; #ifndef APPLE2IX +static DWORD g_dwAdviseToken; static IReferenceClock *g_pRefClock = NULL; static HANDLE g_hSemaphore = NULL; -#endif static bool g_bRefClockTimerActive = false; static DWORD g_dwLastUsecPeriod = 0; +#endif bool SysClk_InitTimer() diff --git a/src/audio/speaker.c b/src/audio/speaker.c index c72733e3..709cb0dc 100644 --- a/src/audio/speaker.c +++ b/src/audio/speaker.c @@ -100,8 +100,8 @@ double g_fClksPerSpkrSample; // Setup in SetClksPerSpkrSample() // Globals #ifndef APPLE2IX static DWORD lastcyclenum = 0; -#endif static DWORD toggles = 0; +#endif static unsigned __int64 g_nSpkrQuietCycleCount = 0; static unsigned __int64 g_nSpkrLastCycle = 0; static bool g_bSpkrToggleFlag = false; @@ -109,9 +109,9 @@ static VOICE SpeakerVoice = {0}; static bool g_bSpkrAvailable = false; +#ifndef APPLE2IX // Globals (SOUND_DIRECT/SOUND_SMART) static BOOL directio = 0; -#ifndef APPLE2IX static DWORD lastdelta[2] = {0,0}; static DWORD quietcycles = 0; static DWORD soundeffect = 0; @@ -763,6 +763,7 @@ void SpkrUpdate(DWORD totalcycles) #endif } +#ifndef APPLE2IX // Called from SoundCore_TimerFunc() for FADE_OUT void SpkrUpdate_Timer() { @@ -781,7 +782,6 @@ void SpkrUpdate_Timer() //============================================================================= -#ifndef APPLE2IX static DWORD dwByteOffset = (DWORD)-1; #endif static int nNumSamplesError = 0; @@ -991,7 +991,9 @@ static ULONG Spkr_SubmitWaveBuffer_FullSpeed(short* pSpeakerBuffer, ULONG nNumSa static ULONG Spkr_SubmitWaveBuffer(short* pSpeakerBuffer, ULONG nNumSamples) { +#ifndef APPLE2IX char szDbg[200]; +#endif nDbgSpkrCnt++; if(!SpeakerVoice.bActive) diff --git a/src/display.c b/src/display.c index 2a341f97..3f785717 100644 --- a/src/display.c +++ b/src/display.c @@ -782,8 +782,6 @@ static inline void _calculate_interp_color(uint8_t *color_buf, const unsigned in // PlotPixelsExtra static inline void _plot_hires_pixels(uint8_t *dst, const uint8_t *src) { - uint8_t pix; - for (unsigned int i=2; i; i--) { for (unsigned int j=DYNAMIC_SZ-1; j; j--) { uint16_t pix = *src; diff --git a/src/interface.c b/src/interface.c index 78401ab8..d70d4cc4 100644 --- a/src/interface.c +++ b/src/interface.c @@ -362,7 +362,6 @@ void c_interface_select_diskette( int drive ) struct dirent **namelist; bool nextdir = false; int i, entries; - pid_t pid; static int curpos=0; int ch = -1; @@ -712,7 +711,6 @@ void c_interface_parameters() int ch; static interface_enum_t option = OPT_CPU; static int cur_y = 0, cur_off = 0, cur_x = 0, cur_pos = 0; - int current_mode = apple_mode; /* reset the x position, so we don't lose our cursor if path changes */ cur_x = 0; @@ -1120,15 +1118,6 @@ void c_interface_parameters() { timing_initialize(); video_set(0); /* redo colors */ - -#if 0 - /* reboot machine if different */ - if (current_mode != apple_mode) - { - // FIXME : broken ... - cpu65_interrupt(RebootSig); - } -#endif c_initialize_sound_hooks(); c_interface_exit(ch); return; @@ -1493,8 +1482,6 @@ void c_interface_keyboard_layout() "| (Press any key to exit) |", "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" }; - int i; - video_setpage( 0 ); screen[ 6 ][ 68 ] = MOUSETEXT_BEGIN + 0x0b; diff --git a/src/joystick.c b/src/joystick.c index dd7a65ac..ccbabec6 100644 --- a/src/joystick.c +++ b/src/joystick.c @@ -293,7 +293,6 @@ static void c_calibrate_pc_joystick() "| ESC quits calibration |", "||||||||||||||||||||||||||||||||||||||||" }; - uint8_t x_val=0, y_val=0; uint8_t x_last=CALIBRATE_JOYMENU_W>>1, y_last=CALIBRATE_JOYMENU_H>>1; const char* const spinney = "|/-\\"; uint8_t spinney_idx=0; diff --git a/src/misc.c b/src/misc.c index d4dec615..aa4bbd32 100644 --- a/src/misc.c +++ b/src/misc.c @@ -580,8 +580,6 @@ void c_initialize_vm() { void reinitialize(void) { - int i; - c_initialize_vm(); softswitches = SS_TEXT | SS_IOUDIS | SS_C3ROM | SS_LCWRT | SS_LCSEC;