TEMU
2
The Terma Emulator
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
VTables.h
Go to the documentation of this file.
1
//===------------------------------------------------------------*- C++ -*-===//
2
//
3
// T-EMU: The Terma Emulator
4
// (c) Terma 2016
5
// Authors: Mattias Holm <maho (at) terma.com>
6
//
7
//===----------------------------------------------------------------------===//
8
9
// This file contains all the public VTables used. Note that even
10
// though this is a public header, the code here is UNSTABLE. That is,
11
// the structures may change without notice (though not between bug
12
// fix releases).
13
//
14
// For that reason use this with care and only for code where it is
15
// unpractical for you to use interfaces directly.
16
17
#ifndef TEMU_SUPPORT_VTABLE_H
18
#define TEMU_SUPPORT_VTABLE_H
19
20
#include "
temu-c/Models/Machine.h
"
21
#include "
temu-c/Support/Events.h
"
22
#include "
temu-c/Models/IrqController.h
"
23
#include "
temu-c/Memory/Memory.h
"
24
#include "
temu-c/Models/Clock.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
30
// Typically you would call:
31
// temu_setVTable(Cls, &MyVT);
32
// temu_qualifyAsMachine/Cpu/Memory(Cls);
33
// In your machine implementation.
34
35
typedef
struct
{
36
temu_CpuIface
*
Cpu
;
37
temu_IrqCtrlIface
*
Irq
;
38
temu_EventIface
*
Event
;
39
temu_MemAccessIface
*
InvalidAccess
;
40
temu_ClockIface
*
Clock
;
41
}
temu_CpuVTable
;
42
43
44
// All machines must implement this VTable interface. These are used
45
// to speedup certain operations on machine objects.
46
typedef
struct
{
47
temu_MachineIface
*
Machine
;
48
temu_EventIface
*
Event
;
49
}
temu_MachineVTable
;
50
51
// Fast memory operations
52
typedef
struct
{
53
temu_MemAccessIface
*
MemAccess
;
54
temu_MemoryIface
*
Memory
;
55
}
temu_MemVTable
;
56
57
#ifdef __cplusplus
58
}
59
#endif
60
61
#endif
/* ! TEMU_SUPPORT_VTABLE_H */
temu_IrqControllerIface
Definition:
IrqController.h:24
temu_CpuVTable::Event
temu_EventIface * Event
Definition:
VTables.h:38
temu_CpuVTable
Definition:
VTables.h:35
temu_MemAccessIface
Definition:
Memory.h:110
temu_MemoryIface
Definition:
Memory.h:148
temu_CpuVTable::Irq
temu_IrqCtrlIface * Irq
Definition:
VTables.h:37
temu_CpuVTable::InvalidAccess
temu_MemAccessIface * InvalidAccess
Definition:
VTables.h:39
temu_EventIface
Definition:
Events.h:86
temu_CpuVTable::Clock
temu_ClockIface * Clock
Definition:
VTables.h:40
Clock.h
temu_MachineIface
Definition:
Machine.h:22
temu_MachineVTable
Definition:
VTables.h:46
temu_ClockIface
Definition:
Clock.h:36
Machine.h
temu_MachineVTable::Machine
temu_MachineIface * Machine
Definition:
VTables.h:47
temu_MemVTable::MemAccess
temu_MemAccessIface * MemAccess
Definition:
VTables.h:53
Events.h
IrqController.h
temu_MemVTable
Definition:
VTables.h:52
temu_CpuIface
Common CPU interface.
Definition:
Cpu.h:164
temu_MachineVTable::Event
temu_EventIface * Event
Definition:
VTables.h:48
Memory.h
temu_CpuVTable::Cpu
temu_CpuIface * Cpu
Definition:
VTables.h:36
temu_MemVTable::Memory
temu_MemoryIface * Memory
Definition:
VTables.h:54
include
temu-c
Support
VTables.h
Generated on Fri May 22 2020 02:47:41 for TEMU by
1.8.5