1
/* -*- mode: C++; tab-width: 4 -*- */
2
/* ===================================================================== *\
3
Copyright (c) 2001 PocketPyro, Inc.
6
This file is part of the Palm OS Emulator.
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
12
\* ===================================================================== */
24
kPatchErrNotImplemented,
36
// Function types for head- and Tailpatch functions.
38
typedef CallROMType (*HeadpatchProc)(void);
39
typedef void (*TailpatchProc)(void);
42
// ==============================================================================
43
// * BEGIN IEmPatchLoader
44
// ==============================================================================
46
const EcmIfName kEmPatchLoaderIfn = "loader.patchmodule.i.ecm";
48
ecm_interface IEmPatchLoader : ecm_extends IEcmComponent
50
virtual Err InitializePL (void) = 0;
51
virtual Err ResetPL (void) = 0;
52
virtual Err DisposePL (void) = 0;
54
virtual Err ClearPL (void) = 0;
55
virtual Err LoadPL (void) = 0;
57
virtual Err LoadAllModules (void) = 0;
58
virtual Err LoadModule (const string& url) = 0;
61
// ==============================================================================
62
// * END IEmPatchLoader
63
// ==============================================================================
67
// ==============================================================================
68
// * BEGIN IEmPatchContainer
69
// ==============================================================================
71
const EcmIfName kEmPatchContainerIfn = "container.patchmodule.i.ecm";
73
ecm_interface IEmPatchContainer : ecm_extends IEcmContainer
78
// ==============================================================================
79
// * END IEmPatchContainer
80
// ==============================================================================
84
// ==============================================================================
85
// * BEGIN IEmPatchDllTempHacks
86
// ==============================================================================
88
const EcmIfName kEmPatchDllTempHacksIfn = "hacks.dll.patchmodule.i.ecm";
90
ecm_interface IEmPatchDllTempHacks : ecm_extends IEcmComponent
92
virtual Err GetGlobalMemBanks(void** membanksPP)=0;
93
virtual Err GetGlobalRegs(void** regsPP)=0;
96
// ==============================================================================
97
// * END IEmPatchDllTempHacks
98
// ==============================================================================
103
// ===========================================================================
104
// IEmPatchModule interface exposed by all patch modules.
105
// this is how all patch modules appear to the patching sub-system
106
// ===========================================================================
108
const EcmIfName kEmPatchModuleIfn = "patchmodule.i.ecm";
110
ecm_interface IEmPatchModule : ecm_extends IEcmComponent
112
virtual Err Initialize(IEmPatchContainer &containerIP) = 0;
113
virtual Err Reset() = 0;
114
virtual Err Dispose() = 0;
116
virtual Err Clear () = 0;
117
virtual Err Load () = 0;
119
virtual const string &GetName() = 0;
121
virtual Err GetHeadpatch (uint16 index, HeadpatchProc &procP) = 0;
122
virtual Err GetTailpatch (uint16 index, TailpatchProc &procP) = 0;
128
// ===========================================================================
129
// IEmPatchModuleMap interface supporting a collection of PatchModules
130
// Basically there is one component which maintains the list of all
131
// installed patch modules, and it is accessed using IEmPatchModuleMap
132
// ===========================================================================
134
const EcmIfName kEmPatchModuleMapIfn = "map.patchmodule.i.ecm";
136
ecm_interface IEmPatchModuleMap : ecm_extends IEcmComponent
138
virtual Err InitializeAll(IEmPatchContainer &containerI) = 0;
139
virtual Err ResetAll() = 0;
140
virtual Err DisposeAll() = 0;
142
virtual Err ClearAll () = 0;
143
virtual Err LoadAll () = 0;
145
virtual Err AddModule (IEmPatchModule *moduleIP) = 0;
147
virtual Err GetModuleByName (const string &nameStr, IEmPatchModule *& moduleIP) = 0;
150
#endif // EmPatchIf_h