@@ -13,10 +13,6 @@ unit mainloop; |
| 13 |
|
13 |
|
| 14 |
interface |
14 |
interface |
| 15 |
|
15 |
|
| 16 |
uses ExtCtrls; |
|
|
| 17 |
|
|
|
| 18 |
function main_loop(a: DWord): DWORD; |
|
|
| 19 |
|
|
|
| 20 |
function z80_decode: byte; |
16 |
function z80_decode: byte; |
| 21 |
procedure z80_reset; |
17 |
procedure z80_reset; |
| 22 |
|
18 |
|
@@ -87,14 +83,6 @@ begin |
| 87 |
end; |
83 |
end; |
| 88 |
end; |
84 |
end; |
| 89 |
|
85 |
|
| 90 |
function main_loop(a: DWord): DWORD; |
|
|
| 91 |
begin |
|
|
| 92 |
repeat |
|
|
| 93 |
z80_decode; |
|
|
| 94 |
until f_stopped; |
|
|
| 95 |
Result := 0; |
|
|
| 96 |
end; |
|
|
| 97 |
|
|
|
| 98 |
procedure LCDControl; |
86 |
procedure LCDControl; |
| 99 |
(* |
87 |
(* |
| 100 |
------------------------------------------+---------------+--------------- |
88 |
------------------------------------------+---------------+--------------- |
@@ -318,12 +306,7 @@ begin |
| 318 |
asm |
306 |
asm |
| 319 |
CLC |
307 |
CLC |
| 320 |
end; // Set the Carry-Flag to zero |
308 |
end; // Set the Carry-Flag to zero |
| 321 |
if (RomName[2] <> 'A') and (code <> 118) then Writeln('OP ', code); |
|
|
| 322 |
if (RomName[2] <> 'A') and (code <> 118) then |
|
|
| 323 |
Writeln('REGS_BEFOR pc=', pc.w, ' sp=', sp_.w, ' f=', remap(af.l), ' a=', af.h, ' b=', bc.h, ' c=', bc.l, ' d=', de.h, ' e=', de.l, ' h=', hl.h, ' l=', hl.l); |
|
|
| 324 |
Count := z80[code](); |
309 |
Count := z80[code](); |
| 325 |
if (RomName[2] <> 'A') and (code <> 118) then |
|
|
| 326 |
Writeln('REGS_AFTER pc=', pc.w, ' sp=', sp_.w, ' f=', remap(af.l), ' a=', af.h, ' b=', bc.h, ' c=', bc.l, ' d=', de.h, ' e=', de.l, ' h=', hl.h, ' l=', hl.l); |
|
|
| 327 |
SoundUpdate(Count * (3 - gb_speed)); |
310 |
SoundUpdate(Count * (3 - gb_speed)); |
| 328 |
cnumber := Count div gb_speed; |
311 |
cnumber := Count div gb_speed; |
| 329 |
|
312 |
|