-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTYPES.H
119 lines (95 loc) · 3.32 KB
/
TYPES.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* types.h
*
* This file is part of Emu42
*
* Copyright (C) 2004 Christoph Gießelink
*
*/
// HST bits
#define XM 1
#define SB 2
#define SR 4
#define MP 8
#define SWORD SHORT // signed 16 Bit variable
#define QWORD ULONGLONG // unsigned 64 Bit variable
typedef struct
{
SWORD nPosX; // position of window
SWORD nPosY;
BYTE type; // calculator type
DWORD pc;
DWORD d0;
DWORD d1;
DWORD rstkp;
DWORD rstk[8];
BYTE A[16];
BYTE B[16];
BYTE C[16];
BYTE D[16];
BYTE R0[16];
BYTE R1[16];
BYTE R2[16];
BYTE R3[16];
BYTE R4[16];
BYTE ST[4];
BYTE HST;
BYTE P;
WORD out;
WORD in;
BOOL SoftInt;
BOOL Shutdn;
BOOL mode_dec;
BOOL inte; // interrupt status flag (FALSE = int in service)
BOOL intk; // 1 ms keyboard scan flag (TRUE = enable)
BOOL intd; // keyboard interrupt pending (TRUE = int pending)
BOOL carry;
WORD crc; // CRC content
BOOL bShutdnWake; // flag for wake up from SHUTDN mode
#if defined _USRDLL // DLL version
QWORD cycles; // oscillator cycles
#else // EXE version
DWORD cycles; // oscillator cycles
DWORD cycles_reserved; // reserved for MSB of oscillator cycles
#endif
WORD wRomCrc; // fingerprint of ROM
BOOL bSlave; // slave controller assembled
DWORD RegBase, RegMask; // MMU Registers (16 bits)
DWORD DispBase, DispMask; // MMU Display/Timer (10 bits)
DWORD NCE2Base, NCE2Mask; // MMU NCE2 Memory (10 bits)
DWORD NCE3Base, NCE3Mask; // MMU NCE3 Memory (10 bits)
DWORD RomBase, RomMask; // MMU ROM (6 bits)
BYTE IORam[0x400]; // display/timer/control registers
BOOL NCE2Ram; // type of memory (FALSE = ROM | TRUE = RAM)
DWORD NCE2Size; // real size of module in Nibbles
DWORD dwUnused1; // not used, was memory pointer NCE2
BOOL NCE3Ram; // type of memory (FALSE = ROM | TRUE = RAM)
DWORD NCE3Size; // real size of module in Nibbles
DWORD dwUnused2; // not used, was memory pointer NCE3
DWORD RomSize; // real size of ROM in Nibbles
BYTE t1; // timer1 content
DWORD t2; // timer2 content
WORD Keyboard_Row[10]; // keyboard Out lines
WORD IR15X; // ON-key state
// BYTE contrast; // display contrast setting
} CHIPSET_M;
typedef struct
{
WORD crc; // CRC content
DWORD RegBase, RegMask; // MMU Registers (16 bits)
DWORD DispBase, DispMask; // MMU Display/Timer (10 bits)
DWORD NCE2Base, NCE2Mask; // MMU NCE2 Memory (10 bits)
DWORD NCE3Base, NCE3Mask; // MMU NCE3 Memory (10 bits)
DWORD RomBase, RomMask; // MMU ROM (6 bits)
BYTE IORam[0x400]; // display/timer/control registers (slave)
BOOL NCE2Ram; // type of memory (FALSE = ROM | TRUE = RAM)
DWORD NCE2Size; // real size of module in Nibbles
DWORD dwUnused1; // not used, was memory pointer NCE2
BOOL NCE3Ram; // type of memory (FALSE = ROM | TRUE = RAM)
DWORD NCE3Size; // real size of module in Nibbles
DWORD dwUnused2; // not used, was memory pointer NCE3
DWORD RomSize; // real size of ROM in Nibbles
BYTE t1; // timer1 content
DWORD t2; // timer2 content
BOOL bLcdSyncErr; // master/slave LCD controller synchronization error
} CHIPSET_S;