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

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [clsSystem.h] - Blame information for rev 37

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 robfinch
#pragma once
2 32 robfinch
#include "clsThor.h"
3 35 robfinch
// Test System Emulator
4
//
5
// Emulates the test system that the Thor processor is part of.
6
// Currently the screen display is not fully implemented as an
7
// emulation. The register set isn't present.
8
// Other devices present in the system are aggregated into the
9
// clsSystem class.
10 30 robfinch
 
11
extern char refscreen;
12
extern unsigned int dataBreakpoints[30];
13
extern int numDataBreakpoints;
14 32 robfinch
extern bool runstop;
15 30 robfinch
extern volatile unsigned __int8 keybd_status;
16
extern volatile unsigned __int8 keybd_scancode;
17
 
18
class clsSystem
19
{
20
public:
21
        unsigned __int64 memory[16777216];      // 128 MB
22
        unsigned __int64 rom[32768];
23
        unsigned long VideoMem[4096];
24
        bool VideoMemDirty[4096];
25 32 robfinch
        unsigned long DBGVideoMem[4096];
26
        bool DBGVideoMemDirty[4096];
27 30 robfinch
        unsigned int leds;
28
        int m_z;
29
        int m_w;
30
        char write_error;
31
        unsigned int radr1;
32
        unsigned int radr2;
33
        bool WriteROM;
34 32 robfinch
        bool quit;
35
        clsThor cpu2;
36
        clsPIC pic1;
37
        clsUart uart1;
38
        clsKeyboard keybd;
39 35 robfinch
        clsSevenSeg sevenseg;
40 30 robfinch
 
41
        clsSystem();
42
        void Reset();
43
        unsigned __int64 Read(unsigned int ad, int sr=0);
44
        unsigned __int64 ReadByte(unsigned int ad);
45 32 robfinch
        unsigned __int64 ReadChar(unsigned int ad);
46
        unsigned __int64 ReadHalf(unsigned int ad);
47 30 robfinch
        int Write(unsigned int ad, unsigned __int64 dat, unsigned int mask, int cr=0);
48
        int random();
49 32 robfinch
        void Run();
50
        void Step();
51 30 robfinch
};

powered by: WebSVN 2.1.0

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