Reverting of POP() (from r12754) for both v20 and v25 for now pending more information. (no whatsnew)

This commit is contained in:
Scott Stone 2011-06-01 05:56:08 +00:00
parent 50c4a12869
commit d5370bdafb
5 changed files with 5 additions and 9 deletions

View File

@ -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;

View File

@ -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); }

View File

@ -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()

View File

@ -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;

View File

@ -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()