Fixed RETN and RETI Z80 instructions

This commit is contained in:
fabio.olimpieri 2012-06-10 20:14:52 +00:00
parent 4bb2beede6
commit 5d45fc349f

View File

@ -243,7 +243,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 69: // RETN case 69: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -279,8 +279,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 77: // RETI case 77: // RETI
processor->IFF1=2; processor->IFF1=processor->IFF2;
processor->IFF2=1;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -316,7 +315,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 85: // RETN case 85: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -352,7 +351,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 93: // RETN case 93: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -388,7 +387,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 101: // RETN case 101: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -424,7 +423,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 109: // RETN case 109: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -460,7 +459,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 117: // RETN case 117: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;
@ -495,7 +494,7 @@ int Z80free_codesED (Z80FREE *processor,byte opcode) {
return (4); return (4);
break; break;
case 125: // RETN case 125: // RETN
processor->IFF1=(processor->IFF2 ? 2 : 0); processor->IFF1=processor->IFF2;
processor->PC=Z80free_doPop(processor); processor->PC=Z80free_doPop(processor);
return (10); return (10);
break; break;