/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/fps2bios/kernel/eeload/eedata.c
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/fps2bios/kernel/eeload/eedata.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (10 years, 10 months ago) by william
File MIME type: text/plain
File size: 5476 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 // eedata.c - needed in order to assure
2 // that some of the kernel variables are as close to 0x80000000 as possible
3 // (ie, look in saveContext2)
4 //[made by] [RO]man, zerofrog
5
6 #include <tamtypes.h>
7 #include <kernel.h>
8 #include <stdio.h>
9
10 #include "eekernel.h"
11 #include "eeirq.h"
12
13 eeRegs SavedRegs __attribute((aligned(256)));
14 u128 SavedSP __attribute((aligned(16)));
15 u128 SavedRA __attribute((aligned(16)));
16 u128 SavedAT __attribute((aligned(16)));
17 u64 SavedT9 __attribute((aligned(16)));
18
19 u32 _CpuConfig_0(u32);
20 u32 _CpuConfig_1(u32);
21 u32 _CpuConfig_2(u32);
22 u32 _CpuConfig_3(u32);
23 u32 _CpuConfig_4(u32);
24 u32 _CpuConfig_5(u32);
25 u32 (*table_CpuConfig[6])(u32) = {_CpuConfig_0, _CpuConfig_1, _CpuConfig_2,
26 _CpuConfig_3, _CpuConfig_4, _CpuConfig_5};
27
28 u32 dmac_CHCR[10] = {
29 0xB0008000,
30 0xB0009000,
31 0xB000A000,
32 0xB000B000,
33 0xB000B400,
34 0xB000C000,
35 0xB000C400,
36 0xB000C800,
37 0xB000D000,
38 0xB000D400,
39 };
40
41 void (*VCRTable[14])() = {
42 0, 0, 0, 0,
43 0, 0, 0, 0,
44 SyscException, 0, 0, 0,
45 0, 0
46 };
47
48 void (*VIntTable[8])() = {
49 0, 0, DMACException, INTCException,
50 0, 0, 0, TIMERException,
51 };
52
53 void _DummyINTCHandler(int);
54 void _DummyDMACHandler(int);
55
56 void (*INTCTable[16])(int) = {
57 _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler,
58 _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler,
59 _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler,
60 _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler, _DummyINTCHandler };
61
62 void (*DMACTable[16])(int) = {
63 _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler,
64 _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler,
65 _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler,
66 _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler, _DummyDMACHandler };
67
68
69 void (*table_SYSCALL[0x80])() = {
70 (void (*))_RFU___, // 0x00
71 (void (*))_ResetEE,
72 (void (*))_SetGsCrt,
73 (void (*))_RFU___,
74 (void (*))_Exit, // 0x04
75 (void (*))_RFU005,
76 (void (*))_LoadPS2Exe,
77 (void (*))_ExecPS2,
78 (void (*))_RFU___, // 0x08
79 (void (*))_TlbWriteRandom,
80 (void (*))_AddSbusIntcHandler,
81 (void (*))_RemoveSbusIntcHandler,
82 (void (*))_Interrupt2Iop, // 0x0C
83 (void (*))_SetVTLBRefillHandler,
84 (void (*))_SetVCommonHandler,
85 (void (*))_SetVInterruptHandler,
86 (void (*))_AddIntcHandler, // 0x10
87 (void (*))_RemoveIntcHandler,
88 (void (*))_AddDmacHandler,
89 (void (*))_RemoveDmacHandler,
90 (void (*))__EnableIntc, // 0x14
91 (void (*))__DisableIntc,
92 (void (*))__EnableDmac,
93 (void (*))__DisableDmac,
94 (void (*))_SetAlarm, // 0x18
95 (void (*))_ReleaseAlarm,
96 (void (*))__EnableIntc,
97 (void (*))__DisableIntc,
98 (void (*))__EnableDmac, // 0x1C
99 (void (*))__DisableDmac,
100 (void (*))_SetAlarm,
101 (void (*))_ReleaseAlarm,
102 (void (*))_CreateThread, // 0x20
103 (void (*))_DeleteThread,
104 (void (*))_StartThread,
105 (void (*))_ExitThread,
106 (void (*))_ExitDeleteThread, // 0x24
107 (void (*))_TerminateThread,
108 (void (*))_iTerminateThread,
109 (void (*))_DisableDispatchThread,
110 (void (*))_EnableDispatchThread, // 0x28
111 (void (*))_ChangeThreadPriority,
112 (void (*))_iChangeThreadPriority,
113 (void (*))_RotateThreadReadyQueue,
114 (void (*))_iRotateThreadReadyQueue, // 0x2C
115 (void (*))_ReleaseWaitThread,
116 (void (*))_iReleaseWaitThread,
117 (void (*))_GetThreadId,
118 (void (*))_ReferThreadStatus, // 0x30
119 (void (*))_ReferThreadStatus,
120 (void (*))_SleepThread,
121 (void (*))_WakeupThread,
122 (void (*))_iWakeupThread,
123 (void (*))_CancelWakeupThread,
124 (void (*))_CancelWakeupThread,
125 (void (*))_SuspendThread,
126 (void (*))_SuspendThread,
127 (void (*))_ResumeThread,
128 (void (*))_iResumeThread,
129 (void (*))_JoinThread,
130 (void (*))_InitializeMainThread,
131 (void (*))_InitializeHeapArea,
132 (void (*))_EndOfHeap,
133 (void (*))_RFU___,
134 (void (*))_CreateSema, // 0x40
135 (void (*))_DeleteSema,
136 (void (*))_SignalSema,
137 (void (*))_iSignalSema,
138 (void (*))_WaitSema,
139 (void (*))_PollSema,
140 (void (*))_PollSema,
141 (void (*))_ReferSemaStatus,
142 (void (*))_ReferSemaStatus,
143 (void (*))_iDeleteSema,
144 (void (*))_SetOsdConfigParam,
145 (void (*))_GetOsdConfigParam,
146 (void (*))_GetGsHParam,
147 (void (*))_GetGsVParam,
148 (void (*))_SetGsHParam,
149 (void (*))_SetGsVParam,
150 (void (*))_CreateEventFlag, // 0x50
151 (void (*))_DeleteEventFlag,
152 (void (*))_SetEventFlag,
153 (void (*))_iSetEventFlag,
154 (void (*))_RFU___,
155 (void (*))_RFU___,
156 (void (*))_RFU___,
157 (void (*))_RFU___,
158 (void (*))_RFU___,
159 (void (*))_RFU___,
160 (void (*))_RFU___,
161 (void (*))_RFU___,
162 (void (*))_EnableIntcHandler,
163 (void (*))_DisableIntcHandler,
164 (void (*))_EnableDmacHandler,
165 (void (*))_DisableDmacHandler,
166 (void (*))_KSeg0, // 0x60
167 (void (*))_EnableCache,
168 (void (*))_DisableCache,
169 (void (*))_GetCop0,
170 (void (*))_FlushCache,
171 (void (*))_105,
172 (void (*))_CpuConfig,
173 (void (*))_GetCop0,
174 (void (*))_FlushCache,
175 (void (*))_105,
176 (void (*))_CpuConfig,
177 (void (*))_SifStopDma, //_sceSifStopDma,
178 (void (*))_SetCPUTimerHandler,
179 (void (*))_SetCPUTimer,
180 (void (*))0,//_SetOsdConfigParam2,
181 (void (*))0,//_GetOsdConfigParam2,
182 (void (*))_GsGetIMR, // 0x70
183 (void (*))_GsPutIMR,
184 (void (*))_SetPgifHandler,
185 (void (*))_SetVSyncFlag,
186 (void (*))_SetSYSCALL,
187 (void (*))_print,
188 (void (*))_SifDmaStat,
189 (void (*))_SifSetDma,
190 (void (*))_SifSetDChain,
191 (void (*))_SifSetReg,
192 (void (*))_SifGetReg,
193 (void (*))_ExecOSD,
194 (void (*))_RFU___,
195 (void (*))_PSMode,
196 (void (*))_MachineType,
197 (void (*))_GetMemorySize
198 };

  ViewVC Help
Powered by ViewVC 1.1.22