changed EI handling a bit and types

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@471 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-05-30 13:51:19 +00:00
parent 28d596af36
commit c299a73848
3 changed files with 7 additions and 9 deletions

View file

@ -242,6 +242,7 @@ INT32 Cz80_Exec(cz80_struc *CPU, INT32 cycles)
UINT32 res; UINT32 res;
UINT32 val; UINT32 val;
int afterEI = 0; int afterEI = 0;
union16 *data;
PC = CPU->PC; PC = CPU->PC;
#if CZ80_ENCRYPTED_ROM #if CZ80_ENCRYPTED_ROM
@ -255,7 +256,8 @@ INT32 Cz80_Exec(cz80_struc *CPU, INT32 cycles)
Cz80_Exec: Cz80_Exec:
if (CPU->ICount > 0) if (CPU->ICount > 0)
{ {
union16 *data = pzHL; Cz80_Exec_nocheck:
data = pzHL;
Opcode = READ_OP(); Opcode = READ_OP();
#if CZ80_EMULATE_R_EXACTLY #if CZ80_EMULATE_R_EXACTLY
zR++; zR++;

View file

@ -24,7 +24,7 @@ extern "C" {
#endif #endif
#ifndef INT8 #ifndef INT8
#define INT8 char #define INT8 signed char
#endif #endif
#ifndef UINT16 #ifndef UINT16
@ -32,7 +32,7 @@ extern "C" {
#endif #endif
#ifndef INT16 #ifndef INT16
#define INT16 short #define INT16 signed short
#endif #endif
#ifndef UINT32 #ifndef UINT32
@ -40,7 +40,7 @@ extern "C" {
#endif #endif
#ifndef INT32 #ifndef INT32
#define INT32 int #define INT32 signed int
#endif #endif
/*************************************/ /*************************************/

View file

@ -715,13 +715,9 @@ OP_EI:
CPU->ExtraCycles += 1 - CPU->ICount; CPU->ExtraCycles += 1 - CPU->ICount;
CPU->ICount = 1; CPU->ICount = 1;
} }
else if (CPU->ICount <= 0)
{
CPU->ICount = 1;
}
} }
else zIFF2 = (1 << 2); else zIFF2 = (1 << 2);
goto Cz80_Exec; goto Cz80_Exec_nocheck;
/*----------------------------------------- /*-----------------------------------------
INC r16 INC r16