OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [clsThor.h] - Diff between revs 30 and 32

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 30 Rev 32
Line 1... Line 1...
#pragma once
#pragma once
#include "clsCPU.h"
#include "clsCPU.h"
 
 
extern clsSystem system1;
extern class clsSystem system1;
 
 
class clsThor : public clsCPU
class clsThor : public clsCPU
{
{
 
        bool StatusHWI;
 
        bool StatusDBG;
 
        __int16 StatusEXL;
 
        __int64 string_pc;
 
        unsigned __int64 imm;
 
        bool imm_prefix;
 
        unsigned __int64 ea;
 
        unsigned int mode : 2;
 
 
 
        void SetGP(int rg, __int64 val);
 
        int GetMode();
 
        void SetSpr(int Sprn, __int64 val);
 
        __int64 GetSpr(int Sprn);
 
        void dRn(int b1, int b2, int b3, int *Ra, int *Sg, __int64 *disp);
 
        void ndx(int b1, int b2, int b3, int *Ra, int *Rb, int *Rt, int *Sg, int *Sc);
 
        int WriteMask(int ad, int sz);
 
        unsigned __int64 ReadByte(int ad);
 
        unsigned __int64 ReadChar(int ad);
 
        unsigned __int64 ReadHalf(int ad);
 
        unsigned __int64 Read(int ad);
public:
public:
        __int64 pc;
        unsigned __int32 pc;
        __int64 gp[64];         // general purpose registers
        __int64 gp[64];         // general purpose registers
        __int64 ca[16];         // code address registers
        __int64 ca[16];         // code address registers
        __int8 pr[16];          // predicate registers
        __int8 pr[16];          // predicate registers
        __int64 seg_base[8];
        __int64 seg_base[8];
        __int64 seg_limit[8];
        __int64 seg_limit[8];
        __int64 lc;
        __int64 lc;
        __int64 tick;
        __int64 tick;
        __int8 bir;
        __int8 bir;
        __int64 dbad0,dbad1,dbad2,dbad3;
        __int64 dbad0,dbad1,dbad2,dbad3;
        __int64 dbctrl,dbstat;
        __int64 dbctrl,dbstat;
        unsigned __int64 imm;
 
        bool imm_prefix;
 
        unsigned __int64 ea;
 
        bool im;
        bool im;
        int imcd;
        int imcd;
        int pred;
        int pred;
 
        __int64 GetGP(int rg);
 
        bool IsKM();
        void Reset();
        void Reset();
        void Step();
        void Step();
        unsigned __int64 ReadByte(int ad) { return system1->ReadByte(ad); };
private:
        void dRn(int b1, int b2, int b3, int *Ra, int *Sg, __int64 *disp);
        inline bool IRQActive() { return !StatusHWI && irq && !im; };
 
        int GetBit(__int64 a, int b);
 
        void SetBit(__int64 *a, int b);
 
        void ClearBit(__int64 *a, int b);
};
};
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.