summaryrefslogtreecommitdiffstats
path: root/private/mvdm/softpc.new/host/inc/sim32.h
blob: 41edf81a40eeaf76726c4e732439575515b76dca (plain) (blame)
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
/*
 *      sim32.h -       Sim32 for Microsoft NT SoftPC include file.
 *
 *      Ade Brownlow
 *      Wed Jun 5 91
 *
 *      %W% %G% (c) Insignia Solutions 1991
 */

/* Microsoft Sas memory map extension */
typedef struct _IMEM
{
        struct _IMEM *Next;
        sys_addr StartAddress;
        sys_addr EndAddress;
        half_word Type;
} IMEMBLOCK, *PIMEMBLOCK;

/* structures for passing our registers about */
typedef union
{
        word x;
        struct
        {
                half_word l;
                half_word h;
        }       byte;
}       REG;

typedef struct _VDMREG
{
        /* registers */
        REG SS,SP;

}       VDMREG;

//
// Constants
//
#define MSW_PE              0x1


UCHAR *Sim32pGetVDMPointer(ULONG addr, UCHAR pm);
#define Sim32GetVDMPointer(Addr,Size,Mode) Sim32pGetVDMPointer(Addr,Mode)


#ifdef MONITOR
#include <monsim32.h>
#else
/********************************************************/
#ifdef ANSI
/* Sas/gmi Sim32 crossovers */
extern BOOL Sim32FlushVDMPointer (double_word, word, UTINY *, BOOL);
extern BOOL Sim32FreeVDMPointer (double_word, word, UTINY *, BOOL);
extern BOOL Sim32GetVDMMemory (double_word, word, UTINY *, BOOL);
extern BOOL Sim32SetVDMMemory (double_word, word, UTINY *, BOOL);

/* Sim32 cpu crossovers */
extern VDMREG *EnterIdle(void);
extern void LeaveIdle(void);

/* Sim32 cpu idle interrupt handler should only be called by the event manager */
extern void Sim32_cpu_stall(int);

/* Microsoft sas extensions */
extern IMEMBLOCK *sas_mem_map(void);
extern void sas_clear_map(void);

#else   /*ANSI*/
/* Sas/gmi Sim32 crossovers */
extern BOOL Sim32FlushVDMPointer ();
extern BOOL Sim32FreeVDMPointer ();
extern BOOL Sim32GetVDMMemory ();
extern BOOL Sim32SetVDMMemory ();

/* Sim32 cpu crossovers */
extern VDMREG *EnterIdle();
extern void LeaveIdle();

/* Sim32 cpu idle interrupt handler should only be called by the event manager */
extern void Sim32_cpu_stall();
#endif /* ANSI */

/* Microsoft sas extensions */
extern IMEMBLOCK *sas_mem_map ();
extern void sas_clear_map();

#endif /* MONITOR */

/* This flag is used to signal that the cpu has gone idle due to a call to EnterIdle */
extern BOOL cpu_flagged_idle;
extern sys_addr sim32_effective_addr(double_word, BOOL);