Commit 1b1a63e

Nick committed on
Excising windows-specific graphics stuff
commit 1b1a63e20b7f2106cae92a1c4714d68d3b142057 parent 5fe3cbe
6 changed files +98−501
ModifiedGBEmu.lps +72−73
@@ -11,7 +11,7 @@
11 <EditorIndex Value="-1"/> 11 <EditorIndex Value="-1"/>
12 <TopLine Value="2"/> 12 <TopLine Value="2"/>
13 <CursorPos X="14" Y="7"/> 13 <CursorPos X="14" Y="7"/>
14 <UsageCount Value="56"/> 14 <UsageCount Value="57"/>
15 <DefaultSyntaxHighlighter Value="Delphi"/> 15 <DefaultSyntaxHighlighter Value="Delphi"/>
16 </Unit0> 16 </Unit0>
17 <Unit1> 17 <Unit1>
@@ -22,9 +22,9 @@
22 <ResourceBaseClass Value="Form"/> 22 <ResourceBaseClass Value="Form"/>
23 <IsVisibleTab Value="True"/> 23 <IsVisibleTab Value="True"/>
24 <EditorIndex Value="1"/> 24 <EditorIndex Value="1"/>
25 <TopLine Value="500"/> 25 <TopLine Value="519"/>
26 <CursorPos X="3" Y="514"/> 26 <CursorPos X="5" Y="549"/>
27 <UsageCount Value="56"/> 27 <UsageCount Value="57"/>
28 <Loaded Value="True"/> 28 <Loaded Value="True"/>
29 <LoadedDesigner Value="True"/> 29 <LoadedDesigner Value="True"/>
30 <DefaultSyntaxHighlighter Value="Delphi"/> 30 <DefaultSyntaxHighlighter Value="Delphi"/>
@@ -35,7 +35,7 @@
35 <EditorIndex Value="-1"/> 35 <EditorIndex Value="-1"/>
36 <TopLine Value="1374"/> 36 <TopLine Value="1374"/>
37 <CursorPos X="22" Y="1374"/> 37 <CursorPos X="22" Y="1374"/>
38 <UsageCount Value="56"/> 38 <UsageCount Value="57"/>
39 <DefaultSyntaxHighlighter Value="Delphi"/> 39 <DefaultSyntaxHighlighter Value="Delphi"/>
40 </Unit2> 40 </Unit2>
41 <Unit3> 41 <Unit3>
@@ -45,7 +45,7 @@
45 <WindowIndex Value="-1"/> 45 <WindowIndex Value="-1"/>
46 <TopLine Value="-1"/> 46 <TopLine Value="-1"/>
47 <CursorPos X="-1" Y="-1"/> 47 <CursorPos X="-1" Y="-1"/>
48 <UsageCount Value="56"/> 48 <UsageCount Value="57"/>
49 <DefaultSyntaxHighlighter Value="Delphi"/> 49 <DefaultSyntaxHighlighter Value="Delphi"/>
50 </Unit3> 50 </Unit3>
51 <Unit4> 51 <Unit4>
@@ -55,25 +55,24 @@
55 <WindowIndex Value="-1"/> 55 <WindowIndex Value="-1"/>
56 <TopLine Value="-1"/> 56 <TopLine Value="-1"/>
57 <CursorPos X="-1" Y="-1"/> 57 <CursorPos X="-1" Y="-1"/>
58 <UsageCount Value="56"/> 58 <UsageCount Value="57"/>
59 <DefaultSyntaxHighlighter Value="Delphi"/> 59 <DefaultSyntaxHighlighter Value="Delphi"/>
60 </Unit4> 60 </Unit4>
61 <Unit5> 61 <Unit5>
62 <Filename Value="Gpu\ddraw_out.pas"/> 62 <Filename Value="Gpu\ddraw_out.pas"/>
63 <IsPartOfProject Value="True"/> 63 <IsPartOfProject Value="True"/>
64 <EditorIndex Value="4"/> 64 <EditorIndex Value="-1"/>
65 <CursorPos X="13" Y="21"/> 65 <CursorPos X="13" Y="21"/>
66 <UsageCount Value="56"/> 66 <UsageCount Value="57"/>
67 <Loaded Value="True"/>
68 <DefaultSyntaxHighlighter Value="Delphi"/> 67 <DefaultSyntaxHighlighter Value="Delphi"/>
69 </Unit5> 68 </Unit5>
70 <Unit6> 69 <Unit6>
71 <Filename Value="Gpu\dib_out.pas"/> 70 <Filename Value="Gpu\dib_out.pas"/>
72 <IsPartOfProject Value="True"/> 71 <IsPartOfProject Value="True"/>
73 <EditorIndex Value="3"/> 72 <EditorIndex Value="-1"/>
74 <CursorPos X="14" Y="13"/> 73 <TopLine Value="78"/>
75 <UsageCount Value="56"/> 74 <CursorPos X="17" Y="92"/>
76 <Loaded Value="True"/> 75 <UsageCount Value="57"/>
77 <DefaultSyntaxHighlighter Value="Delphi"/> 76 <DefaultSyntaxHighlighter Value="Delphi"/>
78 </Unit6> 77 </Unit6>
79 <Unit7> 78 <Unit7>
@@ -82,7 +81,7 @@
82 <EditorIndex Value="-1"/> 81 <EditorIndex Value="-1"/>
83 <TopLine Value="332"/> 82 <TopLine Value="332"/>
84 <CursorPos Y="332"/> 83 <CursorPos Y="332"/>
85 <UsageCount Value="56"/> 84 <UsageCount Value="57"/>
86 <DefaultSyntaxHighlighter Value="Delphi"/> 85 <DefaultSyntaxHighlighter Value="Delphi"/>
87 </Unit7> 86 </Unit7>
88 <Unit8> 87 <Unit8>
@@ -91,7 +90,7 @@
91 <EditorIndex Value="-1"/> 90 <EditorIndex Value="-1"/>
92 <TopLine Value="284"/> 91 <TopLine Value="284"/>
93 <CursorPos X="10" Y="297"/> 92 <CursorPos X="10" Y="297"/>
94 <UsageCount Value="56"/> 93 <UsageCount Value="57"/>
95 <DefaultSyntaxHighlighter Value="Delphi"/> 94 <DefaultSyntaxHighlighter Value="Delphi"/>
96 </Unit8> 95 </Unit8>
97 <Unit9> 96 <Unit9>
@@ -101,7 +100,7 @@
101 <EditorIndex Value="-1"/> 100 <EditorIndex Value="-1"/>
102 <TopLine Value="7"/> 101 <TopLine Value="7"/>
103 <CursorPos X="15" Y="17"/> 102 <CursorPos X="15" Y="17"/>
104 <UsageCount Value="56"/> 103 <UsageCount Value="57"/>
105 <DefaultSyntaxHighlighter Value="Delphi"/> 104 <DefaultSyntaxHighlighter Value="Delphi"/>
106 </Unit9> 105 </Unit9>
107 <Unit10> 106 <Unit10>
@@ -109,17 +108,17 @@
109 <IsPartOfProject Value="True"/> 108 <IsPartOfProject Value="True"/>
110 <TopLine Value="19"/> 109 <TopLine Value="19"/>
111 <CursorPos X="32" Y="22"/> 110 <CursorPos X="32" Y="22"/>
112 <UsageCount Value="56"/> 111 <UsageCount Value="57"/>
113 <Loaded Value="True"/> 112 <Loaded Value="True"/>
114 <DefaultSyntaxHighlighter Value="Delphi"/> 113 <DefaultSyntaxHighlighter Value="Delphi"/>
115 </Unit10> 114 </Unit10>
116 <Unit11> 115 <Unit11>
117 <Filename Value="Global\vars.pas"/> 116 <Filename Value="Global\vars.pas"/>
118 <IsPartOfProject Value="True"/> 117 <IsPartOfProject Value="True"/>
119 <EditorIndex Value="7"/> 118 <EditorIndex Value="5"/>
120 <TopLine Value="74"/> 119 <TopLine Value="74"/>
121 <CursorPos X="3" Y="98"/> 120 <CursorPos X="3" Y="98"/>
122 <UsageCount Value="56"/> 121 <UsageCount Value="57"/>
123 <Loaded Value="True"/> 122 <Loaded Value="True"/>
124 <DefaultSyntaxHighlighter Value="Delphi"/> 123 <DefaultSyntaxHighlighter Value="Delphi"/>
125 </Unit11> 124 </Unit11>
@@ -127,9 +126,8 @@
127 <Filename Value="mainloop.pas"/> 126 <Filename Value="mainloop.pas"/>
128 <IsPartOfProject Value="True"/> 127 <IsPartOfProject Value="True"/>
129 <EditorIndex Value="2"/> 128 <EditorIndex Value="2"/>
130 <TopLine Value="12"/> 129 <CursorPos X="15" Y="29"/>
131 <CursorPos X="34" Y="31"/> 130 <UsageCount Value="57"/>
132 <UsageCount Value="56"/>
133 <Loaded Value="True"/> 131 <Loaded Value="True"/>
134 <DefaultSyntaxHighlighter Value="Delphi"/> 132 <DefaultSyntaxHighlighter Value="Delphi"/>
135 </Unit12> 133 </Unit12>
@@ -139,56 +137,56 @@
139 <HasResources Value="True"/> 137 <HasResources Value="True"/>
140 <EditorIndex Value="-1"/> 138 <EditorIndex Value="-1"/>
141 <CursorPos Y="21"/> 139 <CursorPos Y="21"/>
142 <UsageCount Value="56"/> 140 <UsageCount Value="57"/>
143 <DefaultSyntaxHighlighter Value="Delphi"/> 141 <DefaultSyntaxHighlighter Value="Delphi"/>
144 </Unit13> 142 </Unit13>
145 <Unit14> 143 <Unit14>
146 <Filename Value="DirectX\Direct3DRM.pas"/> 144 <Filename Value="DirectX\Direct3DRM.pas"/>
147 <IsPartOfProject Value="True"/> 145 <IsPartOfProject Value="True"/>
148 <EditorIndex Value="-1"/> 146 <EditorIndex Value="-1"/>
149 <UsageCount Value="56"/> 147 <UsageCount Value="57"/>
150 <DefaultSyntaxHighlighter Value="Delphi"/> 148 <DefaultSyntaxHighlighter Value="Delphi"/>
151 </Unit14> 149 </Unit14>
152 <Unit15> 150 <Unit15>
153 <Filename Value="DirectX\DirectInput.pas"/> 151 <Filename Value="DirectX\DirectInput.pas"/>
154 <IsPartOfProject Value="True"/> 152 <IsPartOfProject Value="True"/>
155 <EditorIndex Value="-1"/> 153 <EditorIndex Value="-1"/>
156 <UsageCount Value="56"/> 154 <UsageCount Value="57"/>
157 <DefaultSyntaxHighlighter Value="Delphi"/> 155 <DefaultSyntaxHighlighter Value="Delphi"/>
158 </Unit15> 156 </Unit15>
159 <Unit16> 157 <Unit16>
160 <Filename Value="DirectX\DirectMusic.pas"/> 158 <Filename Value="DirectX\DirectMusic.pas"/>
161 <IsPartOfProject Value="True"/> 159 <IsPartOfProject Value="True"/>
162 <EditorIndex Value="-1"/> 160 <EditorIndex Value="-1"/>
163 <UsageCount Value="56"/> 161 <UsageCount Value="57"/>
164 <DefaultSyntaxHighlighter Value="Delphi"/> 162 <DefaultSyntaxHighlighter Value="Delphi"/>
165 </Unit16> 163 </Unit16>
166 <Unit17> 164 <Unit17>
167 <Filename Value="DirectX\DirectPlay.pas"/> 165 <Filename Value="DirectX\DirectPlay.pas"/>
168 <IsPartOfProject Value="True"/> 166 <IsPartOfProject Value="True"/>
169 <EditorIndex Value="-1"/> 167 <EditorIndex Value="-1"/>
170 <UsageCount Value="56"/> 168 <UsageCount Value="57"/>
171 <DefaultSyntaxHighlighter Value="Delphi"/> 169 <DefaultSyntaxHighlighter Value="Delphi"/>
172 </Unit17> 170 </Unit17>
173 <Unit18> 171 <Unit18>
174 <Filename Value="DirectX\DirectSetup.pas"/> 172 <Filename Value="DirectX\DirectSetup.pas"/>
175 <IsPartOfProject Value="True"/> 173 <IsPartOfProject Value="True"/>
176 <EditorIndex Value="-1"/> 174 <EditorIndex Value="-1"/>
177 <UsageCount Value="56"/> 175 <UsageCount Value="57"/>
178 <DefaultSyntaxHighlighter Value="Delphi"/> 176 <DefaultSyntaxHighlighter Value="Delphi"/>
179 </Unit18> 177 </Unit18>
180 <Unit19> 178 <Unit19>
181 <Filename Value="DirectX\DirectSound.pas"/> 179 <Filename Value="DirectX\DirectSound.pas"/>
182 <IsPartOfProject Value="True"/> 180 <IsPartOfProject Value="True"/>
183 <EditorIndex Value="-1"/> 181 <EditorIndex Value="-1"/>
184 <UsageCount Value="56"/> 182 <UsageCount Value="57"/>
185 <DefaultSyntaxHighlighter Value="Delphi"/> 183 <DefaultSyntaxHighlighter Value="Delphi"/>
186 </Unit19> 184 </Unit19>
187 <Unit20> 185 <Unit20>
188 <Filename Value="DirectX\Direct3D.pas"/> 186 <Filename Value="DirectX\Direct3D.pas"/>
189 <IsPartOfProject Value="True"/> 187 <IsPartOfProject Value="True"/>
190 <EditorIndex Value="-1"/> 188 <EditorIndex Value="-1"/>
191 <UsageCount Value="56"/> 189 <UsageCount Value="57"/>
192 <DefaultSyntaxHighlighter Value="Delphi"/> 190 <DefaultSyntaxHighlighter Value="Delphi"/>
193 </Unit20> 191 </Unit20>
194 <Unit21> 192 <Unit21>
@@ -198,7 +196,7 @@
198 <EditorIndex Value="-1"/> 196 <EditorIndex Value="-1"/>
199 <TopLine Value="372"/> 197 <TopLine Value="372"/>
200 <CursorPos X="33" Y="405"/> 198 <CursorPos X="33" Y="405"/>
201 <UsageCount Value="56"/> 199 <UsageCount Value="57"/>
202 <DefaultSyntaxHighlighter Value="Delphi"/> 200 <DefaultSyntaxHighlighter Value="Delphi"/>
203 </Unit21> 201 </Unit21>
204 <Unit22> 202 <Unit22>
@@ -264,8 +262,9 @@
264 </Unit29> 262 </Unit29>
265 <Unit30> 263 <Unit30>
266 <Filename Value="Gpu\lcl_out.pas"/> 264 <Filename Value="Gpu\lcl_out.pas"/>
267 <EditorIndex Value="5"/> 265 <EditorIndex Value="3"/>
268 <CursorPos X="4" Y="19"/> 266 <TopLine Value="16"/>
267 <CursorPos Y="22"/>
269 <UsageCount Value="11"/> 268 <UsageCount Value="11"/>
270 <Loaded Value="True"/> 269 <Loaded Value="True"/>
271 <DefaultSyntaxHighlighter Value="Delphi"/> 270 <DefaultSyntaxHighlighter Value="Delphi"/>
@@ -273,133 +272,133 @@
273 <Unit31> 272 <Unit31>
274 <Filename Value="..\..\bgracontrols-5.0\bgracontrols-5.0\bcbutton.pas"/> 273 <Filename Value="..\..\bgracontrols-5.0\bgracontrols-5.0\bcbutton.pas"/>
275 <UnitName Value="BCButton"/> 274 <UnitName Value="BCButton"/>
276 <EditorIndex Value="6"/> 275 <EditorIndex Value="4"/>
277 <TopLine Value="713"/> 276 <TopLine Value="713"/>
278 <CursorPos X="34" Y="728"/> 277 <CursorPos X="12" Y="720"/>
279 <UsageCount Value="11"/> 278 <UsageCount Value="11"/>
280 <Loaded Value="True"/> 279 <Loaded Value="True"/>
281 </Unit31> 280 </Unit31>
282 </Units> 281 </Units>
283 <JumpHistory Count="30" HistoryIndex="29"> 282 <JumpHistory Count="30" HistoryIndex="29">
284 <Position1> 283 <Position1>
285 <Filename Value="Gpu\lcl_out.pas"/> 284 <Filename Value="mainloop.pas"/>
286 <Caret Line="36" Column="12" TopLine="21"/> 285 <Caret Line="31" Column="34" TopLine="12"/>
287 </Position1> 286 </Position1>
288 <Position2> 287 <Position2>
289 <Filename Value="Gpu\lcl_out.pas"/> 288 <Filename Value="UnitMain.pas"/>
290 <Caret Line="46" Column="38" TopLine="21"/> 289 <Caret Line="18" Column="3" TopLine="5"/>
291 </Position2> 290 </Position2>
292 <Position3> 291 <Position3>
293 <Filename Value="Gpu\lcl_out.pas"/> 292 <Filename Value="UnitMain.pas"/>
294 <Caret Line="45" Column="28" TopLine="21"/> 293 <Caret Line="190" Column="38" TopLine="174"/>
295 </Position3> 294 </Position3>
296 <Position4> 295 <Position4>
297 <Filename Value="UnitMain.pas"/> 296 <Filename Value="UnitMain.pas"/>
298 <Caret Line="408" Column="5" TopLine="390"/> 297 <Caret Line="384" Column="3" TopLine="367"/>
299 </Position4> 298 </Position4>
300 <Position5> 299 <Position5>
301 <Filename Value="UnitMain.pas"/> 300 <Filename Value="UnitMain.pas"/>
302 <Caret Line="214" Column="40" TopLine="199"/> 301 <Caret Line="476" Column="7" TopLine="460"/>
303 </Position5> 302 </Position5>
304 <Position6> 303 <Position6>
305 <Filename Value="UnitMain.pas"/> 304 <Filename Value="UnitMain.pas"/>
306 <Caret Line="227" TopLine="218"/> 305 <Caret Line="483" Column="7" TopLine="467"/>
307 </Position6> 306 </Position6>
308 <Position7> 307 <Position7>
309 <Filename Value="UnitMain.pas"/> 308 <Filename Value="UnitMain.pas"/>
310 <Caret Line="143" Column="24" TopLine="132"/> 309 <Caret Line="18" Column="3" TopLine="2"/>
311 </Position7> 310 </Position7>
312 <Position8> 311 <Position8>
313 <Filename Value="UnitMain.pas"/> 312 <Filename Value="UnitMain.pas"/>
314 <Caret Line="210" Column="25" TopLine="188"/> 313 <Caret Line="190" Column="5" TopLine="175"/>
315 </Position8> 314 </Position8>
316 <Position9> 315 <Position9>
317 <Filename Value="UnitMain.pas"/> 316 <Filename Value="UnitMain.pas"/>
318 <Caret Line="212" Column="40" TopLine="188"/> 317 <Caret Line="383" Column="5" TopLine="367"/>
319 </Position9> 318 </Position9>
320 <Position10> 319 <Position10>
321 <Filename Value="UnitMain.pas"/> 320 <Filename Value="UnitMain.pas"/>
322 <Caret Line="252" Column="9" TopLine="246"/> 321 <Caret Line="476" Column="7" TopLine="460"/>
323 </Position10> 322 </Position10>
324 <Position11> 323 <Position11>
325 <Filename Value="UnitMain.pas"/> 324 <Filename Value="UnitMain.pas"/>
326 <Caret Line="394" Column="51" TopLine="384"/> 325 <Caret Line="483" Column="7" TopLine="467"/>
327 </Position11> 326 </Position11>
328 <Position12> 327 <Position12>
329 <Filename Value="Gpu\lcl_out.pas"/> 328 <Filename Value="UnitMain.pas"/>
330 <Caret Line="10" Column="47"/> 329 <Caret Line="516" Column="5" TopLine="498"/>
331 </Position12> 330 </Position12>
332 <Position13> 331 <Position13>
333 <Filename Value="UnitMain.pas"/> 332 <Filename Value="UnitMain.pas"/>
334 <Caret Line="206" TopLine="191"/> 333 <Caret Line="515" Column="5" TopLine="499"/>
335 </Position13> 334 </Position13>
336 <Position14> 335 <Position14>
337 <Filename Value="UnitMain.pas"/> 336 <Filename Value="UnitMain.pas"/>
338 <Caret Line="389" Column="15" TopLine="362"/> 337 <Caret Line="514" Column="3" TopLine="500"/>
339 </Position14> 338 </Position14>
340 <Position15> 339 <Position15>
341 <Filename Value="UnitMain.pas"/> 340 <Filename Value="UnitMain.pas"/>
342 <Caret Line="505" Column="20" TopLine="478"/> 341 <Caret Line="500" TopLine="487"/>
343 </Position15> 342 </Position15>
344 <Position16> 343 <Position16>
345 <Filename Value="mainloop.pas"/> 344 <Filename Value="UnitMain.pas"/>
346 <Caret Line="31" Column="34" TopLine="12"/> 345 <Caret Line="190" Column="5" TopLine="173"/>
347 </Position16> 346 </Position16>
348 <Position17> 347 <Position17>
349 <Filename Value="UnitMain.pas"/> 348 <Filename Value="UnitMain.pas"/>
350 <Caret Line="18" Column="3" TopLine="5"/> 349 <Caret Line="18" Column="3"/>
351 </Position17> 350 </Position17>
352 <Position18> 351 <Position18>
353 <Filename Value="Gpu\ddraw_out.pas"/> 352 <Filename Value="UnitMain.pas"/>
354 <Caret Line="221" Column="23" TopLine="210"/> 353 <Caret Line="187" Column="3" TopLine="171"/>
355 </Position18> 354 </Position18>
356 <Position19> 355 <Position19>
357 <Filename Value="Gpu\ddraw_out.pas"/> 356 <Filename Value="UnitMain.pas"/>
358 <Caret Line="21" Column="13"/> 357 <Caret Line="186" Column="20" TopLine="171"/>
359 </Position19> 358 </Position19>
360 <Position20> 359 <Position20>
361 <Filename Value="UnitMain.pas"/> 360 <Filename Value="UnitMain.pas"/>
362 <Caret Line="190" Column="38" TopLine="174"/> 361 <Caret Line="188" Column="12" TopLine="189"/>
363 </Position20> 362 </Position20>
364 <Position21> 363 <Position21>
365 <Filename Value="UnitMain.pas"/> 364 <Filename Value="UnitMain.pas"/>
366 <Caret Line="384" Column="3" TopLine="367"/> 365 <Caret Line="209" Column="29" TopLine="193"/>
367 </Position21> 366 </Position21>
368 <Position22> 367 <Position22>
369 <Filename Value="UnitMain.pas"/> 368 <Filename Value="UnitMain.pas"/>
370 <Caret Line="476" Column="7" TopLine="460"/> 369 <Caret Line="379" TopLine="364"/>
371 </Position22> 370 </Position22>
372 <Position23> 371 <Position23>
373 <Filename Value="UnitMain.pas"/> 372 <Filename Value="UnitMain.pas"/>
374 <Caret Line="483" Column="7" TopLine="467"/> 373 <Caret Line="471" Column="20" TopLine="456"/>
375 </Position23> 374 </Position23>
376 <Position24> 375 <Position24>
377 <Filename Value="UnitMain.pas"/> 376 <Filename Value="UnitMain.pas"/>
378 <Caret Line="18" Column="3" TopLine="2"/> 377 <Caret Line="477" Column="20" TopLine="462"/>
379 </Position24> 378 </Position24>
380 <Position25> 379 <Position25>
381 <Filename Value="UnitMain.pas"/> 380 <Filename Value="UnitMain.pas"/>
382 <Caret Line="190" Column="5" TopLine="175"/> 381 <Caret Line="502" Column="51" TopLine="492"/>
383 </Position25> 382 </Position25>
384 <Position26> 383 <Position26>
385 <Filename Value="UnitMain.pas"/> 384 <Filename Value="UnitMain.pas"/>
386 <Caret Line="383" Column="5" TopLine="367"/> 385 <Caret Line="501" Column="51" TopLine="491"/>
387 </Position26> 386 </Position26>
388 <Position27> 387 <Position27>
389 <Filename Value="UnitMain.pas"/> 388 <Filename Value="UnitMain.pas"/>
390 <Caret Line="476" Column="7" TopLine="460"/> 389 <Caret Line="500" Column="51" TopLine="490"/>
391 </Position27> 390 </Position27>
392 <Position28> 391 <Position28>
393 <Filename Value="UnitMain.pas"/> 392 <Filename Value="UnitMain.pas"/>
394 <Caret Line="483" Column="7" TopLine="467"/> 393 <Caret Line="499" Column="51" TopLine="489"/>
395 </Position28> 394 </Position28>
396 <Position29> 395 <Position29>
397 <Filename Value="UnitMain.pas"/> 396 <Filename Value="UnitMain.pas"/>
398 <Caret Line="516" Column="5" TopLine="498"/> 397 <Caret Line="498" Column="51" TopLine="488"/>
399 </Position29> 398 </Position29>
400 <Position30> 399 <Position30>
401 <Filename Value="UnitMain.pas"/> 400 <Filename Value="UnitMain.pas"/>
402 <Caret Line="515" Column="5" TopLine="499"/> 401 <Caret Line="184" Column="12" TopLine="178"/>
403 </Position30> 402 </Position30>
404 </JumpHistory> 403 </JumpHistory>
405 </ProjectSession> 404 </ProjectSession>
DeletedGpu/ddraw_out.pas +0−246
@@ -1,246 +0,0 @@
1 {+-----------------------------------------------------------------------------+
2 | Author: Christian Hackbart
3 | Description: DirectDraw display functions
4 | Copyright (c) 2000 Christian Hackbart
5 | Stand: 31.10.2000
6 |
7 | http://www.tu-ilmenau.de/~hackbart
8 +----------------------------------------------------------------------------+}
9
10 unit ddraw_out;
11
12 {$MODE Delphi}
13
14 interface
15
16 uses Windows, Graphics;
17
18 const
19 frameskip: byte = 1;
20 screen_updated: DWord = 0;
21 StatBottom: byte = 0;
22 Frames: byte = 0;
23
24 function InitFail(awnd: HWND; hRet: HRESULT; szError: LPCTSTR): HResult;
25 procedure UpdateDDraw(handle: HWND);
26 procedure ReleaseAllObjects;
27
28 function start_dx(Handle: HWND): integer;
29
30
31 function skip_asm: boolean;
32 procedure MyGetClientRect(Handle: Hwnd; var rect: Trect);
33
34 implementation
35
36 uses DirectDraw, vars, SysUtils;
37
38 const
39 g_pDD: IDIRECTDRAW4 = nil;
40 g_pDDSPrimary: IDIRECTDRAWSURFACE4 = nil;
41 g_pDDSOne: IDIRECTDRAWSURFACE4 = nil;
42 g_pClipper: IDIRECTDRAWCLIPPER = nil;
43 g_pDDPal: IDIRECTDRAWPALETTE = nil;
44
45 procedure ReleaseAllObjects;
46 begin
47 if assigned(g_pDD) then
48 begin
49 g_pDDSPrimary := nil;
50 g_pDDSOne := nil;
51 g_pDDPal := nil;
52 g_pDD := nil;
53 end;
54 end;
55
56 function InitFail(awnd: HWND; hRet: HRESULT; szError: LPCTSTR): HResult;
57 begin
58 ReleaseAllObjects;
59 MessageBox(aWnd, szerror, 'DDraw error', MB_OK);
60 DestroyWindow(aWnd);
61 Result := hRet;
62 end;
63
64 function skip_asm: boolean; assembler;
65 asm
66 INC screen_updated
67
68 MOV AL,frames
69 INC AL
70 CMP AL,frameskip
71 JL @ende
72 XOR AL,AL
73 @ende:
74 MOV frames,AL
75 MOV result,AL
76 end;
77
78 procedure MyGetClientRect(Handle: Hwnd; var rect: Trect);
79 var
80 Count: integer;
81 begin
82 getclientrect(handle, rect);
83 Count := rect.Bottom - STATbottom;
84 if Count > 0 then
85 rect.Bottom := Count
86 else
87 rect.bottom := rect.top;
88 end;
89
90 procedure UpdateDDraw(Handle: Hwnd);
91 var
92 rcRect, destRect: TRect;
93 hRet: HRESULT;
94 pt: TPOINT;
95 ddsd: TDDSURFACEDESC2;
96
97 begin
98 if skip_asm then
99 exit;
100
101 rcRect.left := 0;
102 rcRect.top := 0;
103 rcRect.right := 160;
104 rcRect.bottom := 144;
105 MyGetClientRect(Handle, destRect);
106
107 // destRect :=rcRect;
108 {+-------------------------------------------------------+
109 | Testen, ob wir überhaupt etwas sehen, wenn nicht dann |
110 | zeichnen wir nix !!! |
111 +-------------------------------------------------------+}
112
113 with destrect do
114 if (Right = left) or (top = bottom) then
115 exit;
116
117 pt.x := 0;
118 pt.y := 0;
119 ClientToScreen(Handle, pt);
120 OffsetRect(destRect, pt.x, pt.y);
121 g_pClipper.SetHWnd(0, Handle);
122 zeromemory(@ddsd, sizeof(ddsd));
123 ddsd.dwSize := sizeof(ddsd);
124 g_pDDSOne.Lock(nil, ddsd, DDLOCK_WAIT or DDLOCK_SURFACEMEMORYPTR, 0);
125
126 if ddsd.lpSurface <> nil then
127 move(dx_buffer[0], ddsd.lpSurface^, ddsd.lPitch * 36 shl 2);
128
129 g_pDDSOne.Unlock(nil);
130 hRet := g_pDDSPrimary.Blt(@destRect, g_pDDSOne, @rcRect, 0, nil);
131 //hRet:=g_pDDSPrimary.BltFast(0,0,g_pDDSOne,@RcRect,0);//@destRect,g_pDDSOne,@rcRect,0,NIL);
132 case hRet of
133 DD_OK: exit;
134 DDERR_SURFACELOST:
135 begin
136 while (g_pDDSPrimary._Restore <> DD_OK) and
137 (g_pDDSOne._Restore <> DD_OK) do ;
138 initfail(handle, hret, PChar(dderrorstring(hret) + #0));
139 exit;
140 end;
141 else
142 begin
143 initfail(handle, hret, PChar(dderrorstring(hret) + #0));
144 exit;
145 end
146 end;
147
148 end;
149
150
151 function start_dx(Handle: HWND): integer;
152 var
153 pdd: IDIRECTDRAW;
154 ddsd3: TDDSURFACEDESC2;
155 ddsd: TDDSURFACEDESC2;
156 ddsd2: TDDSURFACEDESC2;
157 hret: hresult;
158 begin
159 frames := 0;
160
161 hRet := DirectDrawCreate(nil, pDD, nil);
162 if hRet <> DD_OK then
163 begin
164 Result := InitFail(handle, hRet, 'DirectDrawCreate FAILED');
165 exit;
166 end;
167 hRet := pDD.QueryInterface(IID_IDirectDraw4, g_pDD);
168 if hRet <> DD_OK then
169 begin
170 Result := InitFail(handle, hRet, 'QueryInterface FAILED');
171 exit;
172 end;
173 hRet := g_pDD.SetCooperativeLevel(handle, DDSCL_NORMAL);
174 if hRet <> DD_OK then
175 begin
176 Result := InitFail(handle, hRet, 'SetCooperativeLevel FAILED');
177 exit;
178 end;
179 ZeroMemory(@ddsd, sizeof(ddsd));
180 ddsd.dwSize := sizeof(ddsd);
181 ddsd.dwFlags := DDSD_CAPS;
182 ddsd.ddsCaps.dwCaps := DDSCAPS_PRIMARYSURFACE;
183 hRet := g_pDD.CreateSurface(ddsd, g_pDDSPrimary, nil);
184 if hRet <> DD_OK then
185 begin
186 Result := InitFail(handle, hRet, 'CreateSurface FAILED');
187 exit;
188 end;
189 hRet := g_pDD.CreateClipper(0, g_pClipper, nil);
190 if hRet <> DD_OK then
191 begin
192 Result := InitFail(handle, hRet, 'CreateClipper FAILED');
193 exit;
194 end;
195 hRet := g_pClipper.SetHWnd(0, handle);
196 if hRet <> DD_OK then
197 begin
198 Result := InitFail(handle, hRet, 'SetHWnd FAILED');
199 exit;
200 end;
201 hRet := g_pDDSPrimary.SetClipper(g_pClipper);
202 if hRet <> DD_OK then
203 begin
204 Result := InitFail(handle, hRet, 'SetClipper FAILED');
205 exit;
206 end;
207 ZeroMemory(@ddsd3, sizeof(ddsd));
208 ddsd3.dwSize := sizeof(ddsd);
209 ddsd3.dwFlags := DDSD_CAPS or DDSD_HEIGHT or DDSD_WIDTH;
210 ddsd3.ddsCaps.dwCaps := DDSCAPS_OFFSCREENPLAIN;
211 ddsd3.dwWidth := 160;
212 ddsd3.dwHeight := 200;
213 if (g_pDD.CreateSurface(ddsd3, g_pDDSOne, nil) <> DD_OK) then
214 begin
215 Result := InitFail(handle, hRet, 'CBuffer FAILED');
216 exit;
217 end;
218 zeromemory(@ddsd2, sizeof(ddsd2));
219 ddsd2.dwSize := sizeof(ddsd2);
220 ddsd2.dwFlags := DDSD_PIXELFORMAT;
221 Sleep(500);//*MAGIC*
222 hret := g_pDDSOne.Lock(nil, ddsd2, DDLOCK_SURFACEMEMORYPTR or DDLOCK_WAIT, 0);
223 if hret <> 0 then
224 begin
225 Result := initfail(handle, hret, PChar(dderrorstring(hret) + #0));
226 exit;
227 end;
228 dx_bits := ddsd2.ddpfPixelFormat.dwRGBBitCount;
229 dx_r := ddsd2.ddpfPixelFormat.dwRBitMask;
230 dx_g := ddsd2.ddpfPixelFormat.dwGBitMask;
231 dx_b := ddsd2.ddpfPixelFormat.dwBBitMask;
232 dx_pitch := ddsd2.lPitch;
233 cmov := ddsd2.lPitch div 4;
234 dx_bits := dx_bits div 8;
235 dx_sr := finde(dx_r);
236 dx_sg := finde(dx_g);
237 dx_sb := finde(dx_b);
238 dx_r := zaehle(dx_r);
239 dx_g := zaehle(dx_g);
240 dx_b := zaehle(dx_b);
241 g_pDDSOne.Unlock(nil);
242 Result := 0;
243 end;
244
245
246 end.
DeletedGpu/dib_out.pas +0−129
@@ -1,129 +0,0 @@
1 {+-----------------------------------------------------------------------------+
2 | Author: Christian Hackbart
3 | Description: DirectDIB :) display functions
4 | Copyright (c) 2001 Christian Hackbart
5 | Stand: 18.1.2001
6 |
7 | Bug: - The Display is flipped?
8 | - 8 & 16 bit are not working properly
9 | - horribly sloooooooooooooooow uhhhh what a mess!!
10 | http://www.tu-ilmenau.de/~hackbart
11 +----------------------------------------------------------------------------+}
12
13 unit dib_out;
14
15 {$MODE Delphi}
16
17 interface
18
19 uses Windows;
20
21 procedure start_Dib(Handle: Hwnd; Bits: byte);
22 procedure UpdateDIB(Handle: Hwnd);
23
24 implementation
25
26 uses vars, ddraw_out;
27
28 type
29 TPalBitmapInfo = record
30 bmiHeader: TBitmapInfoHeader;
31 bmiColors: array[0..15] of word;
32 end;
33
34 var
35 DibInfo: TPalBitmapInfo;
36
37
38 procedure start_Dib(Handle: Hwnd; Bits: byte);
39 var
40 i: byte;
41 begin
42 frames := 0;
43 with DIBInfo do
44 begin
45 with bmiHeader do
46 begin
47 bisize := sizeof(bmiheader);
48 biwidth := 160;
49 biheight := -144;
50 biplanes := 1;{4}
51 bibitcount := bits;
52 bicompression := BI_RGB;
53 bisizeimage := 0;
54 bixpelspermeter := 0;
55 biypelspermeter := 0;
56 biclrused := 16; //colors in bmiColors
57 biclrimportant := 0;
58 end;
59 for i := 0 to 15 do
60 bmiColors[i] := i;
61 end;
62
63 {!!!!}
64
65 case dibinfo.bmiHeader.biBitCount of
66 8:
67 begin
68 dx_r := 0;
69 dx_g := 0;
70 dx_b := 0;
71 end;
72 16:
73 begin
74 dx_r := $F800;
75 dx_g := $07e0;
76 dx_b := $001f;
77 end;
78 32:
79 begin
80 dx_r := $FF0000;
81 dx_g := $00FF00;
82 dx_b := $0000FF;
83 end;
84 end;
85
86 dx_bits := dibinfo.bmiHeader.biBitCount div 8;
87 dx_pitch := dx_bits * DIBInfo.bmiHeader.biWidth;
88 cmov := dx_pitch div 4;
89
90 dx_sr := finde(dx_r);
91 dx_sg := finde(dx_g);
92 dx_sb := finde(dx_b);
93 dx_r := zaehle(dx_r);
94 dx_g := zaehle(dx_g);
95 dx_b := zaehle(dx_b);
96
97 end;
98
99 procedure UpdateDIB(Handle: HWnd);
100 var
101 DC: HDC;
102 destRect: TRect;
103
104 begin
105 if skip_asm then
106 exit;
107
108 DC := GetDC(Handle);
109 MyGetClientRect(Handle, destRect);
110
111 StretchDIBits(
112 DC, // handle of device context
113 destrect.left, // x-coordinate of upper-left corner of dest. rect.
114 destrect.top, // y-coordinate of upper-left corner of dest. rect.
115 destrect.Right, // width of destination rectangle
116 destrect.Bottom, // height of destination rectangle
117 0, // x-coordinate of upper-left corner of source rect.
118 0, // y-coordinate of upper-left corner of source rect.
119 160, // width of source rectangle
120 144, // height of source rectangle
121 @dx_buffer, // address of bitmap bits
122 pBitmapInfo(@DIBInfo)^, // address of bitmap data
123 dib_rgb_colors, // usage
124 SRCCOPY // raster operation code
125 );
126 ReleaseDC(Handle, DC);
127 end;
128
129 end.
ModifiedGpu/lcl_out.pas +22−0
@@ -8,6 +8,7 @@ uses
8 Graphics, BGRABitmap; 8 Graphics, BGRABitmap;
9 9
10 procedure UpdateCanvas(Width, Height: Integer; Canvas: TCanvas); 10 procedure UpdateCanvas(Width, Height: Integer; Canvas: TCanvas);
11 procedure StartLCL;
11 12
12 implementation 13 implementation
13 14
@@ -19,6 +20,27 @@ uses
19 var 20 var
20 bmp: TBGRABitmap; 21 bmp: TBGRABitmap;
21 22
23 procedure StartLCL;
24 begin
25 frames := 0;
26
27 dx_r := $FF0000;
28 dx_g := $00FF00;
29 dx_b := $0000FF;
30
31 //TODO: Move these somewhere better.
32 dx_bits := 4;
33 dx_pitch := 640;
34 cmov := 160;
35
36 dx_sr := finde(dx_r);
37 dx_sg := finde(dx_g);
38 dx_sb := finde(dx_b);
39 dx_r := zaehle(dx_r);
40 dx_g := zaehle(dx_g);
41 dx_b := zaehle(dx_b);
42 end;
43
22 //TODO: Screen tearing issues-- probably double buffer related 44 //TODO: Screen tearing issues-- probably double buffer related
23 procedure UpdateCanvas(Width, Height: Integer; Canvas: TCanvas); 45 procedure UpdateCanvas(Width, Height: Integer; Canvas: TCanvas);
24 var 46 var
ModifiedUnitMain.lfm +2−17
@@ -1,7 +1,7 @@
1 object frmGameboy: TfrmGameboy 1 object frmGameboy: TfrmGameboy
2 Left = 2633 2 Left = 1416
3 Height = 354 3 Height = 354
4 Top = 313 4 Top = 550
5 Width = 318 5 Width = 318
6 Caption = 'Gameboy' 6 Caption = 'Gameboy'
7 ClientHeight = 320 7 ClientHeight = 320
@@ -222,21 +222,6 @@ object frmGameboy: TfrmGameboy
222 end 222 end
223 object Video1: TMenuItem 223 object Video1: TMenuItem
224 Caption = '&Video' 224 Caption = '&Video'
225 object Outputmode1: TMenuItem
226 Caption = '&Output'
227 object mnuDirectdraw: TMenuItem
228 Caption = '&Directdraw'
229 OnClick = mnuOutputClick
230 end
231 object mnuDib: TMenuItem
232 Caption = 'D&ib'
233 Checked = True
234 OnClick = mnuOutputClick
235 end
236 end
237 object N5: TMenuItem
238 Caption = '-'
239 end
240 object x11: TMenuItem 225 object x11: TMenuItem
241 Caption = 'x&1 window' 226 Caption = 'x&1 window'
242 GroupIndex = 2 227 GroupIndex = 2
ModifiedUnitMain.pas +2−36
@@ -15,7 +15,7 @@ interface
15 15
16 uses 16 uses
17 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 17 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
18 ddraw_out, dib_out, lcl_out, DirectDraw, vars, z80cpu, 18 lcl_out, DirectDraw, vars, z80cpu,
19 gfx, mainloop, machine, debugger, sound, 19 gfx, mainloop, machine, debugger, sound,
20 StdCtrls, ExtCtrls, ComCtrls, Menus; 20 StdCtrls, ExtCtrls, ComCtrls, Menus;
21 21
@@ -103,10 +103,6 @@ type
103 Debugger: TMenuItem; 103 Debugger: TMenuItem;
104 SaveDialog: TSaveDialog; 104 SaveDialog: TSaveDialog;
105 Timer: TTimer; 105 Timer: TTimer;
106 N5: TMenuItem;
107 Outputmode1: TMenuItem;
108 mnuDirectdraw: TMenuItem;
109 mnuDib: TMenuItem;
110 procedure FormCreate(Sender: TObject); 106 procedure FormCreate(Sender: TObject);
111 procedure FormClose(Sender: TObject; var Action: TCloseAction); 107 procedure FormClose(Sender: TObject; var Action: TCloseAction);
112 procedure FileOpenClick(Sender: TObject); 108 procedure FileOpenClick(Sender: TObject);
@@ -131,7 +127,6 @@ type
131 procedure SetSound(Sender: TObject); 127 procedure SetSound(Sender: TObject);
132 procedure TimerTimer(Sender: TObject); 128 procedure TimerTimer(Sender: TObject);
133 procedure SetAudioChannel(Sender: TObject); 129 procedure SetAudioChannel(Sender: TObject);
134 procedure mnuOutputClick(Sender: TObject);
135 private 130 private
136 { Private-Deklarationen} 131 { Private-Deklarationen}
137 fullwindow: boolean; 132 fullwindow: boolean;
@@ -184,22 +179,8 @@ begin
184 randomize; 179 randomize;
185 Height := 144 * 2; 180 Height := 144 * 2;
186 Width := 160 * 2; 181 Width := 160 * 2;
187 statbottom := statusbar.Height;
188 182
189 start_dib(Handle, 32); //initialize DIB 183 StartLCL;
190 mnuDirectdraw.Enabled := (start_dx(Handle) = 0); // is Directdraw?
191 isddraw := mnuDirectdraw.Enabled;
192
193 if mnuDirectdraw.Enabled then
194 begin
195 mnuDirectDraw.Checked := True;
196 mnuDib.Checked := False;
197 end
198 else
199 begin
200 mnuDirectDraw.Checked := False;
201 mnuDib.Checked := True;
202 end;
203 184
204 make_pix; 185 make_pix;
205 SetPriority(priority2); // normal Priority 186 SetPriority(priority2); // normal Priority
@@ -380,7 +361,6 @@ begin
380 n41.Checked := False; 361 n41.Checked := False;
381 n51.Checked := False; 362 n51.Checked := False;
382 363
383 frameskip := tmenuitem(Sender).tag + 1;
384 tmenuitem(Sender).Checked := True; 364 tmenuitem(Sender).Checked := True;
385 end; 365 end;
386 366
@@ -473,14 +453,12 @@ begin
473 begin 453 begin
474 Menu := nil; 454 Menu := nil;
475 statusbar.Hide; 455 statusbar.Hide;
476 Statbottom := 0;
477 RemoveCaption; 456 RemoveCaption;
478 end 457 end
479 else 458 else
480 begin 459 begin
481 Menu := mainmenu; 460 Menu := mainmenu;
482 statusbar.Show; 461 statusbar.Show;
483 StatBottom := statusbar.Height;
484 ShowCaption; 462 ShowCaption;
485 end; 463 end;
486 end; 464 end;
@@ -506,14 +484,9 @@ begin
506 end; 484 end;
507 485
508 procedure TfrmGameboy.FormResize(Sender: TObject); 486 procedure TfrmGameboy.FormResize(Sender: TObject);
509 var
510 oldskip: byte;
511 begin 487 begin
512 if f_stopped then 488 if f_stopped then
513 exit; 489 exit;
514 oldskip := frameskip;
515 frameskip := 1;
516 frameskip := oldskip;
517 statusbar.Panels[0].Text := IntToStr(Height) + ':' + IntToStr(Width); 490 statusbar.Panels[0].Text := IntToStr(Height) + ':' + IntToStr(Width);
518 end; 491 end;
519 492
@@ -574,11 +547,4 @@ begin
574 snd[4].ChannelOFF := not CH4.Checked; 547 snd[4].ChannelOFF := not CH4.Checked;
575 end; 548 end;
576 549
577 procedure TfrmGameboy.mnuOutputClick(Sender: TObject);
578 begin
579 isddraw := (Sender = mnuDirectDraw);
580 mnuDirectdraw.Checked := isddraw;
581 mnuDib.Checked := not isddraw;
582 end;
583
584 end. 550 end.