Previous 15994 Revisions Next

r7722 Monday 5th April, 2010 at 18:53:57 UTC by Wilbert Pol
uPD7801: Fixed the MOV MC,A instruction.
[src/emu/cpu/upd7810]7810ops.c 7810tbl.c

src/emu/cpu/upd7810/7810ops.c
r7721r7722
94689468   /* Reload the timer */
94699469   cpustate->ovc0 = 16 * ( TM0 + ( ( TM1 & 0x0f ) << 8 ) );
94709470}
9471
9472static void MOV_MC_A_7801(upd7810_state *cpustate)
9473{
9474   /* On the 7801 the mode C bits function as follows: */
9475   /*       Cn=1   Cn=0         */
9476   /* PC0  Input   Output       */
9477   /* PC1  Input   Output       */
9478   /* PC2  Input   -SCS Input   */
9479   /* PC3  Output  SAK Output   */
9480   /* PC4  Output  To Output    */
9481   /* PC5  Output  IO/-M Output */
9482   /* PC6  Output  HLDA Output  */
9483   /* PC7  Input   HOLD Input   */
9484   MC = 0x84 | ( ( A & 0x02 ) ? 0x02 : 0x00 ) | ( ( A & 0x01 ) ? 0x01 : 0x00 );
9485}
9486
src/emu/cpu/upd7810/7810tbl.c
r7721r7722
10441044static void INR_C_7801(upd7810_state *cpustate);
10451045static void INRW_wa_7801(upd7810_state *cpustate);
10461046static void STM_7801(upd7810_state *cpustate);
1047static void MOV_MC_A_7801(upd7810_state *cpustate);
10471048
10481049
10491050static const struct opcode_s op48[256] =
r7721r7722
39703971   /* 0xC0 - 0xDF */
39713972   {MOV_PA_A,      2,10,10,L0|L1},   {MOV_PB_A,      2,10,10,L0|L1},
39723973   {MOV_PC_A,      2,10,10,L0|L1},   {MOV_MKL_A,      2,10,10,L0|L1},
3973   {MOV_MB_A,      2,10,10,L0|L1},   {MOV_MC_A,      2,10,10,L0|L1},
3974   {MOV_MB_A,      2,10,10,L0|L1},   {MOV_MC_A_7801,   2,10,10,L0|L1},
39743975   {MOV_TM0_A,    2,10,10,L0|L1},   {MOV_TM1_A,    2,10,10,L0|L1},
39753976   {MOV_S_A,      2,10,10,L0|L1},   {illegal2,      2, 8, 8,L0|L1},
39763977   {illegal2,      2, 8, 8,L0|L1},   {illegal2,      2, 8, 8,L0|L1},

Previous 15994 Revisions Next


© 1998-2018 The MESS Team