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

#ifndef CPUThreadH
#define CPUThreadH
//---------------------------------------------------------------------------
#include <Classes.hpp>

class TOSCABoard;

//---------------------------------------------------------------------------
class Z80Thread : public TThread
{
  typedef struct tagTHREADNAME_INFO
  {
    DWORD dwType;     // must be 0x1000
    LPCSTR szName;    // pointer to name (in user addr space)
    DWORD dwThreadID; // thread ID (-1=caller thread)
    DWORD dwFlags;    // reserved for future use, must be zero
  } THREADNAME_INFO;
private:
	TOSCABoard 			*m_pMainBoard;
	bool					m_bResetting;
	bool					m_bResetComplete;

  void SetName();
  void __fastcall RunCPU(void);
protected:
	void __fastcall Execute();
public:
	void __fastcall Reset(bool resetState);
	bool __fastcall IsReset(void);
	__fastcall Z80Thread(TOSCABoard *mainBoard);
};
//---------------------------------------------------------------------------
#endif
