Commit 8322fee

Nick committed on
Fix another emulator bug with res x, [hl]
commit 8322fee1bd2e8e67ad44fbd3517d8b0000fd9611 parent 5cea740
1 changed files +8−8
ModifiedCPU/z80cpu.pas +8−8
@@ -3283,7 +3283,7 @@ end;
3283 3283
3284 function res0: byte; 3284 function res0: byte;
3285 begin 3285 begin
3286 spokeb(Addr, speekb(Addr) and 254); 3286 spokeb(hl.w, speekb(hl.w) and 254);
3287 3287
3288 Result := 16; 3288 Result := 16;
3289 end; 3289 end;
@@ -3339,7 +3339,7 @@ end;
3339 3339
3340 function res1: byte; 3340 function res1: byte;
3341 begin 3341 begin
3342 spokeb(Addr, speekb(Addr) and 253); 3342 spokeb(hl.w, speekb(hl.w) and 253);
3343 3343
3344 Result := 16; 3344 Result := 16;
3345 end; 3345 end;
@@ -3395,7 +3395,7 @@ end;
3395 3395
3396 function res2: byte; 3396 function res2: byte;
3397 begin 3397 begin
3398 spokeb(Addr, speekb(Addr) and 251); 3398 spokeb(hl.w, speekb(hl.w) and 251);
3399 3399
3400 Result := 16; 3400 Result := 16;
3401 end; 3401 end;
@@ -3451,7 +3451,7 @@ end;
3451 3451
3452 function res3: byte; 3452 function res3: byte;
3453 begin 3453 begin
3454 spokeb(Addr, speekb(Addr) and 247); 3454 spokeb(hl.w, speekb(hl.w) and 247);
3455 3455
3456 Result := 16; 3456 Result := 16;
3457 end; 3457 end;
@@ -3507,7 +3507,7 @@ end;
3507 3507
3508 function res4: byte; 3508 function res4: byte;
3509 begin 3509 begin
3510 spokeb(Addr, speekb(Addr) and 239); 3510 spokeb(hl.w, speekb(hl.w) and 239);
3511 3511
3512 Result := 16; 3512 Result := 16;
3513 end; 3513 end;
@@ -3563,7 +3563,7 @@ end;
3563 3563
3564 function res5: byte; 3564 function res5: byte;
3565 begin 3565 begin
3566 spokeb(Addr, speekb(Addr) and 223); 3566 spokeb(hl.w, speekb(hl.w) and 223);
3567 3567
3568 Result := 16; 3568 Result := 16;
3569 end; 3569 end;
@@ -3619,7 +3619,7 @@ end;
3619 3619
3620 function res6: byte; 3620 function res6: byte;
3621 begin 3621 begin
3622 spokeb(Addr, speekb(Addr) and 191); 3622 spokeb(hl.w, speekb(hl.w) and 191);
3623 3623
3624 Result := 16; 3624 Result := 16;
3625 end; 3625 end;
@@ -3675,7 +3675,7 @@ end;
3675 3675
3676 function res7: byte; 3676 function res7: byte;
3677 begin 3677 begin
3678 spokeb(Addr, speekb(Addr) and 127); 3678 spokeb(hl.w, speekb(hl.w) and 127);
3679 3679
3680 Result := 16; 3680 Result := 16;
3681 end; 3681 end;