Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/6522.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,34 +62,34 @@ void SY6522::Reset(const bool powerCycle)

//---------------------------------------------------------------------------

void SY6522::StartTimer1(void)
void SY6522::StartTimer1()
{
m_timer1Active = true;
}

// The assumption was that timer1 was only active if IER.TIMER1=1
// . Not true, since IFR can be polled (with IER.TIMER1=0)
void SY6522::StartTimer1_LoadStateV1(void)
void SY6522::StartTimer1_LoadStateV1()
{
if ((m_regs.IER & IxR_TIMER1) == 0x00)
return;

m_timer1Active = true;
}

void SY6522::StopTimer1(void)
void SY6522::StopTimer1()
{
m_timer1Active = false;
}

//-----------------------------------------------------------------------------

void SY6522::StartTimer2(void)
void SY6522::StartTimer2()
{
m_timer2Active = true;
}

void SY6522::StopTimer2(void)
void SY6522::StopTimer2()
{
m_timer2Active = false;
}
Expand Down
26 changes: 13 additions & 13 deletions source/6522.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SY6522
Reset(true);
}

~SY6522(void)
~SY6522()
{
}

Expand All @@ -27,11 +27,11 @@ class SY6522

void Reset(const bool powerCycle);

void StartTimer1(void);
void StopTimer1(void);
bool IsTimer1Active(void) { return m_timer1Active; }
void StopTimer2(void);
bool IsTimer2Active(void) { return m_timer2Active; }
void StartTimer1();
void StopTimer1();
bool IsTimer1Active() { return m_timer1Active; }
void StopTimer2();
bool IsTimer2Active() { return m_timer2Active; }

void UpdateIFR(BYTE clr_ifr, BYTE set_ifr = 0);

Expand All @@ -53,14 +53,14 @@ class SY6522
_ASSERT(0);
return 0;
}
BYTE GetBusViewOfORB(void) { return m_regs.ORB & m_regs.DDRB; } // Return how the AY8913 sees ORB on the bus (ie. not CPU's view which will be OR'd with !DDRB)
USHORT GetRegT1C(void) { return m_regs.TIMER1_COUNTER.w; }
USHORT GetRegT2C(void) { return m_regs.TIMER2_COUNTER.w; }
BYTE GetBusViewOfORB() { return m_regs.ORB & m_regs.DDRB; } // Return how the AY8913 sees ORB on the bus (ie. not CPU's view which will be OR'd with !DDRB)
USHORT GetRegT1C() { return m_regs.TIMER1_COUNTER.w; }
USHORT GetRegT2C() { return m_regs.TIMER2_COUNTER.w; }
void GetRegs(BYTE regs[SIZE_6522_REGS]) { memcpy(&regs[0], (BYTE*)&m_regs, SIZE_6522_REGS); } // For debugger
void SetRegIRA(BYTE reg) { m_regs.ORA = reg; }
bool IsTimer1IrqDelay(void) { return m_timer1IrqDelay ? true : false; }
bool IsTimer1IrqDelay() { return m_timer1IrqDelay ? true : false; }
void SetBusBeingDriven(bool state) { m_isBusDriven = state; }
bool IsBad(void) { return m_bad6522; }
bool IsBad() { return m_bad6522; }

BYTE Read(BYTE nReg);
void Write(BYTE nReg, BYTE nValue);
Expand Down Expand Up @@ -99,8 +99,8 @@ class SY6522
UINT GetOpcodeCyclesForWrite(BYTE reg);
UINT GetOpcodeCycles(BYTE reg, UINT zpOpcodeCycles, UINT opcodeCycles, BYTE zpOpcode, BYTE opcode, bool abs16x, bool abs16y, bool indx, bool indy);

void StartTimer2(void);
void StartTimer1_LoadStateV1(void);
void StartTimer2();
void StartTimer1_LoadStateV1();

#pragma pack(push)
#pragma pack(1) // Ensure 'struct Regs' is packed so that GetRegs() can just do a memcpy()
Expand Down
2 changes: 1 addition & 1 deletion source/6821.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class C6821
m_stOutB.func = NULL;
};

~C6821() {};
~C6821() {}

// AppleWin:TC
void SetPA(BYTE byData) { m_byIA = byData; }
Expand Down
20 changes: 10 additions & 10 deletions source/AY8910.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,23 +111,23 @@ static int rstereopos, rchan1pos, rchan2pos, rchan3pos;
double AY8913::m_fCurrentCLK_AY8910 = 0.0;


void AY8913::init(void)
void AY8913::init()
{
// Init the statics that were in sound_ay_overlay()
rng = 1;
noise_toggle = 0;
env_first = 1; env_rev = 0; env_counter = 15;
}

AY8913::AY8913(void)
AY8913::AY8913()
{
memset(sound_ay_registers, 0, sizeof(sound_ay_registers));
init();
m_fCurrentCLK_AY8910 = g_fCurrentCLK6502;
};


void AY8913::sound_ay_init( void )
void AY8913::sound_ay_init()
{
/* AY output doesn't match the claimed levels; these levels are based
* on the measurements posted to comp.sys.sinclair in Dec 2001 by
Expand Down Expand Up @@ -320,15 +320,15 @@ void AY8913::sound_init( const char *device )

#if 0
void
sound_pause( void )
sound_pause()
{
if( sound_enabled )
sound_end();
}


void
sound_unpause( void )
sound_unpause()
{
/* No sound if fastloading in progress */
if( settings_current.fastload && tape_is_playing() )
Expand All @@ -339,7 +339,7 @@ sound_unpause( void )
#endif


void AY8913::sound_end( void )
void AY8913::sound_end()
{
#if 0
if( sound_enabled ) {
Expand Down Expand Up @@ -471,7 +471,7 @@ sound_write_buf_pstereo( libspectrum_signed_word * out, int c )
#define HZ_COMMON_DENOMINATOR 50
#include "Log.h"

void AY8913::sound_ay_overlay( void )
void AY8913::sound_ay_overlay()
{
int tone_level[3];
int mixer, envshape;
Expand Down Expand Up @@ -792,7 +792,7 @@ void AY8913::sound_ay_write( int reg, int val, libspectrum_dword now )
/* no need to call this initially, but should be called
* on reset otherwise.
*/
void AY8913::sound_ay_reset( void )
void AY8913::sound_ay_reset()
{
int f;

Expand Down Expand Up @@ -836,7 +836,7 @@ void AY8913::sound_ay_reset( void )

#ifdef HAVE_SAMPLERATE
static void
sound_resample( void )
sound_resample()
{
int error;
SRC_DATA data;
Expand Down Expand Up @@ -873,7 +873,7 @@ sound_resample( void )
}
#endif /* #ifdef HAVE_SAMPLERATE */

void AY8913::sound_frame( void )
void AY8913::sound_frame()
{
#if 0
libspectrum_signed_word *ptr, *tptr;
Expand Down
18 changes: 9 additions & 9 deletions source/AY8910.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ typedef SHORT libspectrum_signed_word;
class AY8913
{
public:
AY8913(void);
~AY8913(void) {};
AY8913();
~AY8913() {};

void sound_ay_init( void );
void sound_ay_init();
void sound_init( const char *device );
BYTE sound_ay_read( int reg ); // TC
void sound_ay_write( int reg, int val, libspectrum_dword now );
void sound_ay_reset( void );
void sound_frame( void );
BYTE* GetAYRegsPtr( void ) { return &sound_ay_registers[0]; }
void sound_ay_reset();
void sound_frame();
BYTE* GetAYRegsPtr() { return &sound_ay_registers[0]; }
void SetFramesize(int frameSize) { sound_generator_framesiz = frameSize; }
void SetSoundBuffers(INT16** buffers) { ppSoundBuffers = buffers; }
static void SetCLK( double CLK ) { m_fCurrentCLK_AY8910 = CLK; }
void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper, const std::string& suffix);
bool LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, const std::string& suffix);

private:
void init( void );
void sound_end( void );
void sound_ay_overlay( void );
void init();
void sound_end();
void sound_ay_overlay();

private:
/* foo_subcycles are fixed-point with low 16 bits as fractional part.
Expand Down
22 changes: 11 additions & 11 deletions source/CPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static bool g_irqOnLastOpcodeCycle = false;
static eCpuType g_MainCPU = CPU_65C02;
static eCpuType g_ActiveCPU = CPU_65C02;

eCpuType GetMainCpu(void)
eCpuType GetMainCpu()
{
return g_MainCPU;
}
Expand Down Expand Up @@ -175,7 +175,7 @@ void SetMainCpuDefault(eApple2Type apple2Type)
SetMainCpu( ProbeMainCpuDefault(apple2Type) );
}

eCpuType GetActiveCpu(void)
eCpuType GetActiveCpu()
{
return g_ActiveCPU;
}
Expand All @@ -185,27 +185,27 @@ void SetActiveCpu(eCpuType cpu)
g_ActiveCPU = cpu;
}

bool IsIrqAsserted(void)
bool IsIrqAsserted()
{
return g_bmIRQ ? true : false;
}

bool Is6502InterruptEnabled(void)
bool Is6502InterruptEnabled()
{
return !(regs.ps & AF_INTERRUPT);
}

void ResetCyclesExecutedForDebugger(void)
void ResetCyclesExecutedForDebugger()
{
g_nCyclesExecuted = 0;
}

bool IsInterruptInLastExecution(void)
bool IsInterruptInLastExecution()
{
return g_interruptInLastExecutionBatch;
}

void SetIrqOnLastOpcodeCycle(void)
void SetIrqOnLastOpcodeCycle()
{
if (!(regs.ps & AF_INTERRUPT))
g_irqOnLastOpcodeCycle = true;
Expand Down Expand Up @@ -280,7 +280,7 @@ char g_OutputBuffer[OUTPUT_BUFFER_SIZE+1+1]; // +1 for EOL, +1 for NULL
UINT OutputBufferIdx = 0;
bool bEscMode = false;

void CaptureCOUT(void)
void CaptureCOUT()
{
const char ch = regs.a & 0x7f;

Expand Down Expand Up @@ -753,7 +753,7 @@ uint32_t CpuExecute(const uint32_t uCycles, const bool bVideoUpdate)
// Called by:
// . CpuInitialize()
// . SY6522.Reset()
void CpuCreateCriticalSection(void)
void CpuCreateCriticalSection()
{
if (!g_bCritSectionValid)
{
Expand All @@ -766,7 +766,7 @@ void CpuCreateCriticalSection(void)

// Called from RepeatInitialization():
// . MemInitialize() -> MemReset()
void CpuInitialize(void)
void CpuInitialize()
{
regs.a = regs.x = regs.y = 0xFF;
regs.sp = 0x01FF;
Expand Down Expand Up @@ -923,7 +923,7 @@ void CpuNmiDeassert(eIRQSRC Device)
#define SS_YAML_VALUE_6502 "6502"
#define SS_YAML_VALUE_65C02 "65C02"

static const std::string& CpuGetSnapshotStructName(void)
static const std::string& CpuGetSnapshotStructName()
{
static const std::string name("CPU");
return name;
Expand Down
24 changes: 12 additions & 12 deletions source/CPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ enum {
extern regsrec regs;
extern unsigned __int64 g_nCumulativeCycles;

void CpuDestroy ();
void CpuDestroy();
void CpuCalcCycles(ULONG nExecutedCycles);
uint32_t CpuExecute(const uint32_t uCycles, const bool bVideoUpdate);
ULONG CpuGetCyclesThisVideoFrame(ULONG nExecutedCycles);
void CpuCreateCriticalSection(void);
void CpuInitialize(void);
void CpuSetupBenchmark ();
void CpuCreateCriticalSection();
void CpuInitialize();
void CpuSetupBenchmark();
void CpuIrqReset();
void CpuIrqAssert(eIRQSRC Device);
void CpuIrqDeassert(eIRQSRC Device);
void CpuNmiReset();
void CpuNmiAssert(eIRQSRC Device);
void CpuNmiDeassert(eIRQSRC Device);
void CpuReset ();
void CpuReset();
void CpuSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void CpuLoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT version);

Expand All @@ -50,15 +50,15 @@ void CpuWrite(USHORT addr, BYTE value, ULONG uExecutedCycles);

enum eCpuType {CPU_UNKNOWN=0, CPU_6502=1, CPU_65C02, CPU_Z80}; // Don't change! Persisted to Registry

eCpuType GetMainCpu(void);
eCpuType GetMainCpu();
void SetMainCpu(eCpuType cpu);
eCpuType ProbeMainCpuDefault(eApple2Type apple2Type);
void SetMainCpuDefault(eApple2Type apple2Type);
eCpuType GetActiveCpu(void);
eCpuType GetActiveCpu();
void SetActiveCpu(eCpuType cpu);

bool IsIrqAsserted(void);
bool Is6502InterruptEnabled(void);
void ResetCyclesExecutedForDebugger(void);
bool IsInterruptInLastExecution(void);
void SetIrqOnLastOpcodeCycle(void);
bool IsIrqAsserted();
bool Is6502InterruptEnabled();
void ResetCyclesExecutedForDebugger();
bool IsInterruptInLastExecution();
void SetIrqOnLastOpcodeCycle();
2 changes: 1 addition & 1 deletion source/Card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const std::string& Card::GetCardNameEmpty()
return name;
}

std::string Card::GetCardName(void)
std::string Card::GetCardName()
{
return GetCardName(m_type);
}
Expand Down
Loading