summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/nec
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu/nec')
-rw-r--r--src/emu/cpu/nec/nec.c3
-rw-r--r--src/emu/cpu/nec/necinstr.c4
-rw-r--r--src/emu/cpu/nec/necpriv.h3
-rw-r--r--src/emu/cpu/nec/v25.c1
-rw-r--r--src/emu/cpu/nec/v25priv.h3
5 files changed, 5 insertions, 9 deletions
diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c
index 2a9dd2cef90..b95326b78d5 100644
--- a/src/emu/cpu/nec/nec.c
+++ b/src/emu/cpu/nec/nec.c
@@ -204,7 +204,7 @@ static CPU_RESET( nec )
nec_state->TF = 0;
nec_state->IF = 0;
nec_state->DF = 0;
- nec_state->MF = 1;
+ nec_state->MF = 1; // brkem should set to 0 when implemented
nec_state->SignVal = 0;
nec_state->AuxVal = 0;
nec_state->OverVal = 0;
@@ -215,7 +215,6 @@ static CPU_RESET( nec )
nec_state->nmi_state = 0;
nec_state->irq_state = 0;
nec_state->poll_state = 1;
- nec_state->noem = 1; // brkem should set to 0 when implemented
Sreg(PS) = 0xffff;
Sreg(SS) = 0;
diff --git a/src/emu/cpu/nec/necinstr.c b/src/emu/cpu/nec/necinstr.c
index 3e0f5268490..1fb8ee1d195 100644
--- a/src/emu/cpu/nec/necinstr.c
+++ b/src/emu/cpu/nec/necinstr.c
@@ -357,8 +357,8 @@ OP( 0x98, i_cbw ) { Breg(AH) = (Breg(AL) & 0x80) ? 0xff : 0; CLK(2); }
OP( 0x99, i_cwd ) { Wreg(DW) = (Breg(AH) & 0x80) ? 0xffff : 0; CLK(4); }
OP( 0x9a, i_call_far ) { UINT32 tmp, tmp2; tmp = FETCHWORD(); tmp2 = FETCHWORD(); PUSH(Sreg(PS)); PUSH(nec_state->ip); nec_state->ip = (WORD)tmp; Sreg(PS) = (WORD)tmp2; CHANGE_PC; CLKW(29,29,13,29,21,9,Wreg(SP)); }
OP( 0x9b, i_wait ) { if (!nec_state->poll_state) nec_state->ip--; CLK(5); }
-OP( 0x9c, i_pushf ) { UINT16 tmp = CompressFlags(); tmp |= (nec_state->noem << 15); PUSH( tmp ); CLKS(12,8,3); }
-OP( 0x9d, i_popf ) { UINT32 tmp; POP(tmp); tmp |= (nec_state->noem << 15); ExpandFlags(tmp); CLKS(12,8,5); if (nec_state->TF) nec_trap(nec_state); }
+OP( 0x9c, i_pushf ) { UINT16 tmp = CompressFlags(); PUSH( tmp ); CLKS(12,8,3); }
+OP( 0x9d, i_popf ) { UINT32 tmp; POP(tmp); ExpandFlags(tmp); CLKS(12,8,5); if (nec_state->TF) nec_trap(nec_state); }
OP( 0x9e, i_sahf ) { UINT32 tmp = (CompressFlags() & 0xff00) | (Breg(AH) & 0xd5); ExpandFlags(tmp); CLKS(3,3,2); }
OP( 0x9f, i_lahf ) { Breg(AH) = CompressFlags() & 0xff; CLKS(3,3,2); }
diff --git a/src/emu/cpu/nec/necpriv.h b/src/emu/cpu/nec/necpriv.h
index a19279a912e..94402ba47b2 100644
--- a/src/emu/cpu/nec/necpriv.h
+++ b/src/emu/cpu/nec/necpriv.h
@@ -60,7 +60,6 @@ struct _nec_state_t
direct_read_data *direct;
address_space *io;
int icount;
- int noem;
UINT8 prefetch_size;
UINT8 prefetch_cycles;
@@ -132,7 +131,7 @@ typedef enum {
#define PUSH(val) { Wreg(SP)-=2; write_mem_word((((Sreg(SS)<<4)+Wreg(SP))),val); }
-#define POP(var) { Wreg(SP)+=2; var = read_mem_word((((Sreg(SS)<<4)+Wreg(SP)-2))); }
+#define POP(var) { var = read_mem_word((((Sreg(SS)<<4)+Wreg(SP)))); Wreg(SP)+=2; }
#define GetModRM UINT32 ModRM=FETCH()
diff --git a/src/emu/cpu/nec/v25.c b/src/emu/cpu/nec/v25.c
index a73e4325faa..d3f8c3c374b 100644
--- a/src/emu/cpu/nec/v25.c
+++ b/src/emu/cpu/nec/v25.c
@@ -181,7 +181,6 @@ static CPU_RESET( v25 )
nec_state->intp_state[0] = 0;
nec_state->intp_state[1] = 0;
nec_state->intp_state[2] = 0;
- nec_state->noem = 1;
nec_state->TM0 = nec_state->MD0 = nec_state->TM1 = nec_state->MD1 = 0;
nec_state->TMC0 = nec_state->TMC1 = 0;
diff --git a/src/emu/cpu/nec/v25priv.h b/src/emu/cpu/nec/v25priv.h
index a94731d8979..df71b50c10e 100644
--- a/src/emu/cpu/nec/v25priv.h
+++ b/src/emu/cpu/nec/v25priv.h
@@ -108,7 +108,6 @@ struct _v25_state_t
direct_read_data *direct;
address_space *io;
int icount;
- int noem;
const nec_config *config;
@@ -212,7 +211,7 @@ void v25_write_word(v25_state_t *nec_state, unsigned a, UINT16 d);
#define PUSH(val) { Wreg(SP)-=2; write_mem_word((((Sreg(SS)<<4)+Wreg(SP))),val); }
-#define POP(var) { Wreg(SP)+=2; var = read_mem_word((((Sreg(SS)<<4)+Wreg(SP)-2))); }
+#define POP(var) { var = read_mem_word((((Sreg(SS)<<4)+Wreg(SP)))); Wreg(SP)+=2; }
#define GetModRM UINT32 ModRM=FETCH()