mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
Refactor length types
This commit is contained in:
parent
c5fb837314
commit
a46a882a3d
@ -988,9 +988,9 @@ void SetCLK(double CLK)
|
|||||||
|
|
||||||
static CAY8910 g_AY8910[MAX_8910];
|
static CAY8910 g_AY8910[MAX_8910];
|
||||||
#ifdef APPLE2IX
|
#ifdef APPLE2IX
|
||||||
static int64_t g_uLastCumulativeCycles = 0;
|
static uint64_t g_uLastCumulativeCycles = 0;
|
||||||
#else
|
#else
|
||||||
static unsigned __int64 g_uLastCumulativeCycles = 0;
|
static uint64_t g_uLastCumulativeCycles = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -1011,7 +1011,7 @@ void AY8910UpdateSetCycles()
|
|||||||
g_uLastCumulativeCycles = cycles_count_total;
|
g_uLastCumulativeCycles = cycles_count_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AY8910Update(int chip, INT16** buffer, int nNumSamples)
|
void AY8910Update(int chip, int16_t** buffer, int nNumSamples)
|
||||||
{
|
{
|
||||||
AY8910UpdateSetCycles();
|
AY8910UpdateSetCycles();
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
void _AYWriteReg(int chip, int r, int v);
|
void _AYWriteReg(int chip, int r, int v);
|
||||||
//void AY8910_write_ym(int chip, int addr, int data);
|
//void AY8910_write_ym(int chip, int addr, int data);
|
||||||
void AY8910_reset(int chip);
|
void AY8910_reset(int chip);
|
||||||
void AY8910Update(int chip, INT16** buffer, int nNumSamples);
|
void AY8910Update(int chip, int16_t** buffer, int nNumSamples);
|
||||||
|
|
||||||
void AY8910_InitAll(int nClock, int nSampleRate);
|
void AY8910_InitAll(int nClock, int nSampleRate);
|
||||||
void AY8910_InitClock(int nClock);
|
void AY8910_InitClock(int nClock);
|
||||||
@ -32,7 +32,7 @@ void AY8910UpdateSetCycles();
|
|||||||
// FUSE stuff
|
// FUSE stuff
|
||||||
|
|
||||||
typedef ULONG libspectrum_dword;
|
typedef ULONG libspectrum_dword;
|
||||||
typedef UCHAR libspectrum_byte;
|
typedef uint8_t libspectrum_byte;
|
||||||
typedef SHORT libspectrum_signed_word;
|
typedef SHORT libspectrum_signed_word;
|
||||||
|
|
||||||
struct CAY8910;
|
struct CAY8910;
|
||||||
|
@ -163,7 +163,7 @@ static ULONG g_n6522TimerPeriod = 0;
|
|||||||
static const UINT TIMERDEVICE_INVALID = -1;
|
static const UINT TIMERDEVICE_INVALID = -1;
|
||||||
#endif
|
#endif
|
||||||
static UINT g_nMBTimerDevice = TIMERDEVICE_INVALID; // SY6522 device# which is generating timer IRQ
|
static UINT g_nMBTimerDevice = TIMERDEVICE_INVALID; // SY6522 device# which is generating timer IRQ
|
||||||
static UINT64 g_uLastCumulativeCycles = 0;
|
static uint64_t g_uLastCumulativeCycles = 0;
|
||||||
|
|
||||||
// SSI263 vars:
|
// SSI263 vars:
|
||||||
static USHORT g_nSSI263Device = 0; // SSI263 device# which is generating phoneme-complete IRQ
|
static USHORT g_nSSI263Device = 0; // SSI263 device# which is generating phoneme-complete IRQ
|
||||||
@ -181,9 +181,9 @@ static short* ppAYVoiceBuffer[NUM_VOICES] = {0};
|
|||||||
|
|
||||||
#ifdef APPLE2IX
|
#ifdef APPLE2IX
|
||||||
bool g_bDisableDirectSoundMockingboard = false;
|
bool g_bDisableDirectSoundMockingboard = false;
|
||||||
static int64_t g_nMB_InActiveCycleCount = 0;
|
static uint64_t g_nMB_InActiveCycleCount = 0;
|
||||||
#else
|
#else
|
||||||
static unsigned __int64 g_nMB_InActiveCycleCount = 0;
|
static uint64_t g_nMB_InActiveCycleCount = 0;
|
||||||
#endif
|
#endif
|
||||||
static bool g_bMB_RegAccessedFlag = false;
|
static bool g_bMB_RegAccessedFlag = false;
|
||||||
static bool g_bMB_Active = false;
|
static bool g_bMB_Active = false;
|
||||||
@ -256,7 +256,7 @@ static const double g_f6522TimerPeriod_NoIRQ = CLK_6502 / 60.0; // Constant wha
|
|||||||
// External global vars:
|
// External global vars:
|
||||||
bool g_bMBTimerIrqActive = false;
|
bool g_bMBTimerIrqActive = false;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
UINT32 g_uTimer1IrqCount = 0; // DEBUG
|
uint32_t g_uTimer1IrqCount = 0; // DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@ -849,7 +849,7 @@ static void MB_Update()
|
|||||||
#ifdef APPLE2IX
|
#ifdef APPLE2IX
|
||||||
else if(cycles_count_total - g_nMB_InActiveCycleCount > (uint64_t)cycles_persec_target/10)
|
else if(cycles_count_total - g_nMB_InActiveCycleCount > (uint64_t)cycles_persec_target/10)
|
||||||
#else
|
#else
|
||||||
else if(cycles_count_total - g_nMB_InActiveCycleCount > (unsigned __int64)cycles_persec_target/10)
|
else if(cycles_count_total - g_nMB_InActiveCycleCount > (uint64_t)cycles_persec_target/10)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// After 0.1 sec of Apple time, assume MB is not active
|
// After 0.1 sec of Apple time, assume MB is not active
|
||||||
@ -1353,13 +1353,13 @@ static bool MB_DSInit()
|
|||||||
FALSE, // bManualReset (FALSE = auto-reset)
|
FALSE, // bManualReset (FALSE = auto-reset)
|
||||||
FALSE, // bInitialState (FALSE = non-signaled)
|
FALSE, // bInitialState (FALSE = non-signaled)
|
||||||
NULL); // lpName
|
NULL); // lpName
|
||||||
LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[0]=0x%08X\n", (UINT32)g_hSSI263Event[0]);
|
LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[0]=0x%08X\n", (uint32_t)g_hSSI263Event[0]);
|
||||||
|
|
||||||
g_hSSI263Event[1] = CreateEvent(NULL, // lpEventAttributes
|
g_hSSI263Event[1] = CreateEvent(NULL, // lpEventAttributes
|
||||||
FALSE, // bManualReset (FALSE = auto-reset)
|
FALSE, // bManualReset (FALSE = auto-reset)
|
||||||
FALSE, // bInitialState (FALSE = non-signaled)
|
FALSE, // bInitialState (FALSE = non-signaled)
|
||||||
NULL); // lpName
|
NULL); // lpName
|
||||||
LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[1]=0x%08X\n", (UINT32)g_hSSI263Event[1]);
|
LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[1]=0x%08X\n", (uint32_t)g_hSSI263Event[1]);
|
||||||
|
|
||||||
if((g_hSSI263Event[0] == NULL) || (g_hSSI263Event[1] == NULL))
|
if((g_hSSI263Event[0] == NULL) || (g_hSSI263Event[1] == NULL))
|
||||||
{
|
{
|
||||||
@ -1486,7 +1486,7 @@ static bool MB_DSInit()
|
|||||||
NULL, // lpParameter
|
NULL, // lpParameter
|
||||||
0, // dwCreationFlags : 0 = Run immediately
|
0, // dwCreationFlags : 0 = Run immediately
|
||||||
&dwThreadId); // lpThreadId
|
&dwThreadId); // lpThreadId
|
||||||
LogFileOutput("MB_DSInit: CreateThread(), g_hThread=0x%08X\n", (UINT32)g_hThread);
|
LogFileOutput("MB_DSInit: CreateThread(), g_hThread=0x%08X\n", (uint32_t)g_hThread);
|
||||||
|
|
||||||
bool bRes2 = SetThreadPriority(g_hThread, THREAD_PRIORITY_TIME_CRITICAL);
|
bool bRes2 = SetThreadPriority(g_hThread, THREAD_PRIORITY_TIME_CRITICAL);
|
||||||
LogFileOutput("MB_DSInit: SetThreadPriority(), bRes=%d\n", bRes2 ? 1 : 0);
|
LogFileOutput("MB_DSInit: SetThreadPriority(), bRes=%d\n", bRes2 ? 1 : 0);
|
||||||
@ -2023,7 +2023,7 @@ void MB_UpdateCycles(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
timing_checkpoint_cycles();
|
timing_checkpoint_cycles();
|
||||||
UINT64 uCycles = cycles_count_total - g_uLastCumulativeCycles;
|
uint64_t uCycles = cycles_count_total - g_uLastCumulativeCycles;
|
||||||
g_uLastCumulativeCycles = cycles_count_total;
|
g_uLastCumulativeCycles = cycles_count_total;
|
||||||
//_ASSERT(uCycles < 0x10000);
|
//_ASSERT(uCycles < 0x10000);
|
||||||
if (uCycles >= 0x10000) {
|
if (uCycles >= 0x10000) {
|
||||||
|
@ -93,7 +93,7 @@ typedef struct
|
|||||||
|
|
||||||
extern bool g_bMBTimerIrqActive;
|
extern bool g_bMBTimerIrqActive;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
extern UINT32 g_uTimer1IrqCount; // DEBUG
|
extern uint32_t g_uTimer1IrqCount; // DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void MB_Initialize();
|
void MB_Initialize();
|
||||||
|
@ -32,11 +32,7 @@ typedef UInt32 ULONG;
|
|||||||
typedef unsigned long ULONG;
|
typedef unsigned long ULONG;
|
||||||
typedef long LONG;
|
typedef long LONG;
|
||||||
typedef unsigned int UINT;
|
typedef unsigned int UINT;
|
||||||
typedef uint32_t UINT32;
|
|
||||||
typedef uint64_t UINT64;
|
|
||||||
typedef char TCHAR;
|
typedef char TCHAR;
|
||||||
typedef uint8_t UCHAR;
|
|
||||||
typedef int16_t INT16;
|
|
||||||
typedef short SHORT;
|
typedef short SHORT;
|
||||||
typedef unsigned short USHORT;
|
typedef unsigned short USHORT;
|
||||||
typedef unsigned short WORD;
|
typedef unsigned short WORD;
|
||||||
@ -62,8 +58,6 @@ typedef unsigned int UINT_PTR;
|
|||||||
|
|
||||||
typedef void *HWND; // HACK
|
typedef void *HWND; // HACK
|
||||||
|
|
||||||
typedef int64_t __int64;
|
|
||||||
|
|
||||||
typedef void* HANDLE;
|
typedef void* HANDLE;
|
||||||
|
|
||||||
#define VOID void
|
#define VOID void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user