@@ -115,8 +115,6 @@ var |
| 115 |
sio_count: byte; |
115 |
sio_count: byte; |
| 116 |
|
116 |
|
| 117 |
m_cgbram: array[0..32767] of byte; |
117 |
m_cgbram: array[0..32767] of byte; |
| 118 |
{pal_b, pal_o: array[0..7, 0..3, 0..2] of byte; |
|
|
| 119 |
pal_dx_b, pal_dx_o: array[0..7, 0..3] of DWord;} |
|
|
| 120 |
palramb, palramo: array[0..16383] of byte; |
118 |
palramb, palramo: array[0..16383] of byte; |
| 121 |
hdma: DWord; |
119 |
hdma: DWord; |
| 122 |
gb_speed: byte; |
120 |
gb_speed: byte; |
@@ -312,50 +310,8 @@ procedure load(Name: string); |
| 312 |
function ReadGameState(filename: string): byte; |
310 |
function ReadGameState(filename: string): byte; |
| 313 |
function SaveGameState(filename: string): boolean; |
311 |
function SaveGameState(filename: string): boolean; |
| 314 |
|
312 |
|
| 315 |
procedure make_pix; |
|
|
| 316 |
function finde(Data: DWord): DWord; |
|
|
| 317 |
function zaehle(Data: DWord): Dword; |
|
|
| 318 |
|
|
|
| 319 |
implementation |
313 |
implementation |
| 320 |
|
314 |
|
| 321 |
function finde(Data: DWord): DWord; |
|
|
| 322 |
var |
|
|
| 323 |
res: DWord; |
|
|
| 324 |
begin |
|
|
| 325 |
if Data = 0 then |
|
|
| 326 |
Result := 0 |
|
|
| 327 |
else |
|
|
| 328 |
begin |
|
|
| 329 |
res := 0; |
|
|
| 330 |
while True do |
|
|
| 331 |
begin |
|
|
| 332 |
if (Data and 1) > 0 then |
|
|
| 333 |
begin |
|
|
| 334 |
Result := res; |
|
|
| 335 |
exit; |
|
|
| 336 |
exit; |
|
|
| 337 |
end; |
|
|
| 338 |
Data := Data shr 1; |
|
|
| 339 |
Inc(res); |
|
|
| 340 |
end; |
|
|
| 341 |
end; |
|
|
| 342 |
end; |
|
|
| 343 |
|
|
|
| 344 |
function zaehle(Data: DWord): Dword; |
|
|
| 345 |
var |
|
|
| 346 |
res: DWord; |
|
|
| 347 |
i: integer; |
|
|
| 348 |
begin |
|
|
| 349 |
res := 0; |
|
|
| 350 |
for i := 0 to 31 do |
|
|
| 351 |
begin |
|
|
| 352 |
if (Data and 1) > 0 then |
|
|
| 353 |
Inc(res); |
|
|
| 354 |
Data := Data shr 1; |
|
|
| 355 |
end; |
|
|
| 356 |
Result := res; |
|
|
| 357 |
end; |
|
|
| 358 |
|
|
|
| 359 |
procedure load(Name: string); |
315 |
procedure load(Name: string); |
| 360 |
var |
316 |
var |
| 361 |
cf: file; |
317 |
cf: file; |
@@ -653,35 +609,4 @@ begin |
| 653 |
closefile(f); |
609 |
closefile(f); |
| 654 |
end; |
610 |
end; |
| 655 |
|
611 |
|
| 656 |
procedure make_pix; |
|
|
| 657 |
var |
|
|
| 658 |
o0, o1: word; |
|
|
| 659 |
zm: word; |
|
|
| 660 |
begin |
|
|
| 661 |
for zm := 0 to 65535 do |
|
|
| 662 |
begin |
|
|
| 663 |
o0 := zm shr 8; |
|
|
| 664 |
o1 := zm and $ff; |
|
|
| 665 |
pix[zm][7][0] := ((o0 and 1) shl 1) or (o1 and 1); |
|
|
| 666 |
pix[zm][6][0] := ((o0 and 2)) or ((o1 and 2) shr 1); |
|
|
| 667 |
pix[zm][5][0] := ((o0 and 4) shr 1) or ((o1 and 4) shr 2); |
|
|
| 668 |
pix[zm][4][0] := ((o0 and 8) shr 2) or ((o1 and 8) shr 3); |
|
|
| 669 |
pix[zm][3][0] := ((o0 and 16) shr 3) or ((o1 and 16) shr 4); |
|
|
| 670 |
pix[zm][2][0] := ((o0 and 32) shr 4) or ((o1 and 32) shr 5); |
|
|
| 671 |
pix[zm][1][0] := ((o0 and 64) shr 5) or ((o1 and 64) shr 6); |
|
|
| 672 |
pix[zm][0][0] := ((o0 and 128) shr 6) or ((o1 and 128) shr 7); |
|
|
| 673 |
pix[zm][0][1] := ((o0 and 1) shl 1) or (o1 and 1); |
|
|
| 674 |
pix[zm][1][1] := ((o0 and 2)) or ((o1 and 2) shr 1); |
|
|
| 675 |
pix[zm][2][1] := ((o0 and 4) shr 1) or ((o1 and 4) shr 2); |
|
|
| 676 |
pix[zm][3][1] := ((o0 and 8) shr 2) or ((o1 and 8) shr 3); |
|
|
| 677 |
pix[zm][4][1] := ((o0 and 16) shr 3) or ((o1 and 16) shr 4); |
|
|
| 678 |
pix[zm][5][1] := ((o0 and 32) shr 4) or ((o1 and 32) shr 5); |
|
|
| 679 |
pix[zm][6][1] := ((o0 and 64) shr 5) or ((o1 and 64) shr 6); |
|
|
| 680 |
pix[zm][7][1] := ((o0 and 128) shr 6) or ((o1 and 128) shr 7); |
|
|
| 681 |
end; |
|
|
| 682 |
end; |
|
|
| 683 |
|
|
|
| 684 |
|
|
|
| 685 |
|
|
|
| 686 |
|
|
|
| 687 |
end. |
612 |
end. |