// ###########################################################################
// #
// # OSCATimer - Definition of OSCA Timer Module
// # Copyright (C) 2009-2011 Tony Friery [DialTone]
// #
// # ALL RIGHTS RESERVED
// #
// ###########################################################################

#ifndef OSCATimerH
#define OSCATimerH

#include "z80.h"

///////////////////////////////////////////////////////////////////////
//
//		Definition of Timer Class
//
///////////////////////////////////////////////////////////////////////

class TOSCATimer
{
	private:
		bool					fTimerIRQ;   	// Timer IRQ Flagged
		byte					fTimerSeed;		// Timer Re-Seed Value
		byte					fTimerValue;	// Current Timer Count
		unsigned int		fPrescaler;		// Timer Clock Prescaler

	public:
		void __fastcall	Reset(void);
		bool __fastcall	GetTimerIRQ(void);
		void __fastcall	ClearIRQ(void);
		void __fastcall	SetTimerSeed(byte SeedValue);
		bool __fastcall	Tick(unsigned int NumCycles);

		__fastcall 			TOSCATimer();
};

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

#endif

