Commit f0d47100 authored by Sergio Costas's avatar Sergio Costas

Fixed the codes

parent ba35952c
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#include "Z80free.h" #include "Z80free.h"
int Z80free_codes (Z80FREE *processor,uint8_t opcode) { int Z80free_codes (Z80FREE *processor, uint8_t opcode) {
static uint8_t tmp1; static uint8_t tmp1;
static uint16_t tmp2; static uint16_t tmp2;
switch (opcode) { switch (opcode) {
...@@ -267,7 +267,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) { ...@@ -267,7 +267,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) {
return (11); return (11);
break; break;
case 54: // LD (HL),n case 54: // LD (HL),n
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,Z80free_read_param_8(processor)); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, Z80free_read_param_8(processor));
return (10); return (10);
break; break;
case 55: // SCF case 55: // SCF
...@@ -509,27 +509,27 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) { ...@@ -509,27 +509,27 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) {
return (4); return (4);
break; break;
case 112: // LD (HL),B case 112: // LD (HL),B
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.B); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.B);
return (7); return (7);
break; break;
case 113: // LD (HL),C case 113: // LD (HL),C
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.C); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.C);
return (7); return (7);
break; break;
case 114: // LD (HL),D case 114: // LD (HL),D
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.D); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.D);
return (7); return (7);
break; break;
case 115: // LD (HL),E case 115: // LD (HL),E
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.E); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.E);
return (7); return (7);
break; break;
case 116: // LD (HL),H case 116: // LD (HL),H
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.H); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.H);
return (7); return (7);
break; break;
case 117: // LD (HL),L case 117: // LD (HL),L
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.L); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.L);
return (7); return (7);
break; break;
case 118: // HALT case 118: // HALT
...@@ -538,7 +538,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) { ...@@ -538,7 +538,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) {
return (4); return (4);
break; break;
case 119: // LD (HL),A case 119: // LD (HL),A
Z80free_Wr_Internal(processor, processor->Rm.wr.HL,processor->Rm.br.A); Z80free_Wr_Internal(processor, processor->Rm.wr.HL, processor->Rm.br.A);
return (7); return (7);
break; break;
case 120: // LD A,B case 120: // LD A,B
...@@ -963,7 +963,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) { ...@@ -963,7 +963,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) {
break; break;
case 211: // OUT n,A case 211: // OUT n,A
tmp1 = processor->Rm.br.A; tmp1 = processor->Rm.br.A;
tmp2 = ((uint16_t)tmp1) << 8; tmp2 = ((uint16_t) tmp1) << 8;
Z80free_Out_Internal(processor, tmp2 + ((uint16_t)Z80free_read_param_8(processor)), tmp1); Z80free_Out_Internal(processor, tmp2 + ((uint16_t)Z80free_read_param_8(processor)), tmp1);
return (11); return (11);
break; break;
...@@ -1020,7 +1020,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) { ...@@ -1020,7 +1020,7 @@ int Z80free_codes (Z80FREE *processor,uint8_t opcode) {
} }
break; break;
case 219: // IN A,n case 219: // IN A,n
tmp2 = ((uint16_t)processor->Rm.br.A) << 8; tmp2 = ((uint16_t) processor->Rm.br.A) << 8;
processor->Rm.br.A = Z80free_In_Internal(processor, tmp2 + ((uint16_t)Z80free_read_param_8(processor))); processor->Rm.br.A = Z80free_In_Internal(processor, tmp2 + ((uint16_t)Z80free_read_param_8(processor)));
return (11); return (11);
break; break;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment