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

#ifndef FormDebugH
#define FormDebugH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Grids.hpp>
#include <Mask.hpp>
#include <ExtCtrls.hpp>
#include "ThdTimer.hpp"

extern int ThrotMaint, BreakPt;
extern unsigned int cycles, frames, timcnt;
extern DWORD lastTimeUpdate;

//---------------------------------------------------------------------------
class TDebugForm : public TForm
{
__published:	// IDE-managed Components
  TGroupBox *GrpSource;
  TListBox *SourceList;
  TGroupBox *GrpRegs;
  TLabel *LabelAF;
  TLabel *LabelBC;
  TLabel *LabelDE;
  TLabel *LabelHL;
  TLabel *LabelAFAlt;
  TLabel *LabelBCAlt;
  TLabel *LabelDEAlt;
  TLabel *LabelHLAlt;
  TLabel *LabelIX;
  TLabel *LabelIYAlt;
  TLabel *LabelSP;
  TLabel *LabelPC;
  TMaskEdit *EditAF;
  TMaskEdit *EditBC;
  TMaskEdit *EditDE;
  TMaskEdit *EditHL;
  TMaskEdit *EditAAF;
  TMaskEdit *EditABC;
  TMaskEdit *EditADE;
  TMaskEdit *EditAHL;
  TMaskEdit *EditIX;
  TMaskEdit *EditIY;
  TMaskEdit *EditSP;
  TMaskEdit *EditPC;
  TGroupBox *GrpMem;
  TStringGrid *MemoryGrid;
  TScrollBar *MemoryScroll;
  TGroupBox *GrpControl;
  TButton *BtnStep;
  TButton *BtnRun;
  TButton *BtnTrace;
  TButton *BtnStepOver;
  TGroupBox *GrpFlags;
  TLabel *LabelS;
  TLabel *LabelZ;
  TLabel *Label15;
  TLabel *LabelH;
  TLabel *LabelN;
  TLabel *LabelC;
  TLabel *Label13;
  TLabel *LabelP;
  TLabel *LblFlagPri;
  TLabel *LblFlagAlt;
  TCheckBox *FlagS;
  TCheckBox *FlagZ;
  TCheckBox *Flag5;
  TCheckBox *FlagH;
  TCheckBox *FlagN;
  TCheckBox *FlagC;
  TCheckBox *FlagP;
  TCheckBox *Flag3;
  TCheckBox *FlagAS;
  TCheckBox *FlagAZ;
  TCheckBox *FlagA5;
  TCheckBox *FlagAC;
  TCheckBox *FlagAN;
  TCheckBox *FlagAP;
  TCheckBox *FlagA3;
  TCheckBox *FlagAH;
  TCheckBox *TagSourceTrace;
  TButton *BtnReset;
  TThreadedTimer *CPUTimer;
  TLabel *LabelI;
  TLabel *LabelR;
  TMaskEdit *EditR;
  TMaskEdit *EditI;
  TLabel *LabelIM;
  TMaskEdit *EditIM;
	TLabel *LblBP;
	TMaskEdit *EditBP;
	TCheckBox *ChkBP;
  void __fastcall UpdateStuff(TObject *Sender);
  void __fastcall ScrollChange(TObject *Sender);
  void __fastcall PrepareGrids(TObject *Sender);
  void __fastcall BtnStepOverClick(TObject *Sender);
  void __fastcall DoCPU(TObject *Sender);
  void __fastcall BtnStepClick(TObject *Sender);
  void __fastcall BtnRunClick(TObject *Sender);
  void __fastcall BtnResetClick(TObject *Sender);
	void __fastcall BPChange(TObject *Sender);
	void __fastcall ChkBPClick(TObject *Sender);
private:	// User declarations
public:		// User declarations
  void __fastcall Repopulate(void);
  __fastcall TDebugForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TDebugForm *DebugForm;
//---------------------------------------------------------------------------
#endif
